/* Production leaderboard, modeled on the inventory-management-web arena: dense, readable across the floor. */
.lb {
    --lb-panel: #17191d; --lb-head: #23262b; --lb-row: #1d2024; --lb-row-alt: #1a1c20; --lb-line: #2c3036;
    position: relative; padding: clamp(18px, 2.4vw, 28px); border: 1px solid var(--lb-line); border-radius: 20px; background: #111316; box-shadow: 0 40px 120px -40px #000;
}
.lb__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.lb__eyebrow { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.lb__title { margin-top: 4px; font-size: clamp(1.3rem, 2vw, 1.8rem); font-weight: 850; letter-spacing: .01em; text-transform: uppercase; }
.lb__meta { display: flex; align-items: center; gap: 18px; }
.lb__live { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
.lb__total { color: var(--muted); font-size: .85rem; }
.lb__total strong { color: var(--text); font-family: var(--font-mono); font-size: 1.05rem; font-variant-numeric: tabular-nums; }

.lb__layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.lb__table-wrap { border-radius: 12px; overflow: hidden; background: var(--lb-panel); }
.lb__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lb__table thead th { padding: 11px 16px; background: var(--lb-head); color: var(--muted); font-size: .8rem; font-weight: 600; text-align: left; white-space: nowrap; }
.lb__table thead th.lb-col-sorted { color: var(--gold); }
.lb__table td { padding: 8px 16px; vertical-align: middle; }
.lb-row { background: var(--lb-row); will-change: transform; }
.lb-row:nth-child(even) { background: var(--lb-row-alt); }
.lb-row.is-bumped td { animation: lb-bump 1.2s var(--ease); }
@keyframes lb-bump { 0% { background: #ff6a1a26; } 100% { background: transparent; } }
.lb-col-num { text-align: right !important; white-space: nowrap; }
.lb-col-rank { width: 96px; }
.lb-rank { display: flex; align-items: center; gap: 8px; min-height: 46px; }
.lb-rank__num { min-width: 40px; text-align: center; font-size: 1.15rem; font-weight: 800; }
.lb-move { font-size: .72rem; font-weight: 800; }
.lb-move--up { color: var(--green); }
.lb-move--down { color: var(--red); }

.lb-person { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; }
.lb-person strong { font-size: 1.05rem; font-weight: 800; }
.lb-person > span { color: var(--muted); font-size: .76rem; font-weight: 600; }
.lb-score { font-size: 1.1rem; font-weight: 800; }
.lb-row--leader .lb-score { color: var(--gold); }
.lb-col-minor { color: #d0d4da; font-weight: 700; }
.lb-gap { color: var(--muted); font-weight: 700; }
.lb-gap--leader { color: var(--green); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }

/* Flair */
.lb-flair { display: inline-flex; align-items: center; gap: 6px; align-self: center; }
.lb-hot { display: inline-grid; place-items: center; width: 20px; height: 20px; color: #ff6a2b; filter: drop-shadow(0 0 6px #ff6a2b99); animation: lb-flicker 1.6s ease-in-out infinite; }
.lb-hot svg { width: 18px; height: 18px; fill: currentColor; }
.lb-streak { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px 1px 6px; border-radius: 999px; background: #ffb4241f; color: #ffb424; font-size: .72rem; font-weight: 850; }
@keyframes lb-flicker { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.12) rotate(-4deg); opacity: .85; } 70% { transform: scale(.96) rotate(3deg); } }

/* Hexagonal podium badges, #1 burns */
.lb-badge { --ring: #33373d; --ink: #c7cbd1; display: inline-grid; place-items: center; flex: none; width: 40px; height: 44px; background: var(--ring); clip-path: polygon(50% 0, 96% 25%, 96% 75%, 50% 100%, 4% 75%, 4% 25%); }
.lb-badge > span { display: grid; place-items: center; width: calc(100% - 5px); height: calc(100% - 5px); background: #151619; clip-path: inherit; color: var(--ink); font-size: 1.1rem; font-weight: 900; }
.lb-badge--1 { --ring: linear-gradient(160deg, #fff1a0, #d6a728); --ink: #fff; }
.lb-badge--1 > span { background: radial-gradient(circle at 50% 30%, #3a3320, #151619 70%); }
.lb-badge--2 { --ink: #b9c2cf; }
.lb-badge--3 { --ink: #d49a6a; }
.lb-fire-wrap { position: relative; display: inline-grid; place-items: center; isolation: isolate; }
.lb-fire-wrap > .lb-badge { position: relative; z-index: 1; }
.lb-fire-wrap::before { content: ""; position: absolute; inset: -30% -35%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, #ff8a1f66, #ff5a0026 45%, transparent 70%); animation: lb-glow 1.8s ease-in-out infinite; }
.lb-fire { position: absolute; left: 50%; bottom: 34%; width: 140%; height: 100%; translate: -50% 0; pointer-events: none; filter: blur(.5px); }
.lb-fire i { position: absolute; bottom: 0; left: 50%; width: 46%; aspect-ratio: 1; translate: -50% 0; transform-origin: 50% 100%; mix-blend-mode: screen; animation: lb-flame 1.05s ease-in-out infinite alternate; }
.lb-fire i::before { content: ""; position: absolute; inset: 0; border-radius: 50% 0 50% 50%; rotate: -45deg; background: radial-gradient(circle at 30% 70%, #fff6c4, #ffd23f 24%, #ff8a1f 52%, #ff4d00d9 76%, #ff2a0000); }
.lb-fire i:nth-child(1) { left: 24%; width: 36%; animation-duration: .8s; animation-delay: -.35s; }
.lb-fire i:nth-child(2) { bottom: 6%; }
.lb-fire i:nth-child(3) { left: 76%; width: 38%; animation-duration: 1.25s; animation-delay: -.7s; }
@keyframes lb-flame { 0% { transform: scale(1, 1.3) rotate(-4deg); opacity: .85; } 35% { transform: scale(.88, 1.55) rotate(3deg); } 70% { transform: scale(1.05, 1.2) rotate(-2deg); opacity: .75; } 100% { transform: scale(.94, 1.45) rotate(4deg); } }
@keyframes lb-glow { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }

/* Side cards */
.lb__side { display: grid; gap: 16px; }
.lb-card { padding: 16px; border-radius: 12px; background: var(--lb-panel); }
.lb-card h4 { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lb-card__sub { margin-top: 4px; color: var(--muted); font-size: .78rem; }
.lb-card__who { margin-top: 14px; font-size: 1.15rem; font-weight: 800; }
.lb-card__value { margin-top: 2px; font-size: 1.8rem; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.lb-card__value small { margin-left: 4px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.lb-card--hot { box-shadow: inset 0 0 0 1px #ff6a2b55, 0 0 24px #ff6a2b1f; }
.lb-card--hot h4 { color: #ff8a4c; }
.lb-card--hot .lb-card__value { color: #ff8a4c; }

.lb-duel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.lb-duel > div { display: grid; gap: 2px; }
.lb-duel > div:last-child { text-align: right; }
.lb-duel span { color: var(--muted); font-size: .76rem; font-weight: 700; }
.lb-duel strong { font-size: 1.25rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.lb-team-0 { color: var(--steel); }
.lb-team-1 { color: #c79bff; }
.lb-duel .is-leading strong::after { content: " ▲"; font-size: .7rem; color: var(--green); }
.lb-rope { position: relative; height: 10px; margin-top: 14px; border-radius: 999px; overflow: hidden; display: flex; background: #000; }
.lb-rope i { display: block; height: 100%; transition: width 1s var(--ease); }
.lb-rope i:first-child { background: linear-gradient(90deg, #3d8fd6, var(--steel)); }
.lb-rope i:last-child { background: linear-gradient(90deg, #c79bff, #8d5ce6); }
.lb-rope::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: #ffffffaa; }
.lb-knot { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px #111316, 0 0 12px #f7d65b88; transition: left 1s var(--ease); }
.lb-rope-wrap { position: relative; }

@media (max-width: 980px) { .lb__layout { grid-template-columns: 1fr; } .lb__side { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
    .lb__side { grid-template-columns: 1fr; }
    .lb-col-minor, .lb-col-gap { display: none; }
    .lb__table td, .lb__table thead th { padding-inline: 10px; }
    .lb-col-rank { width: 70px; }
}
@media (prefers-reduced-motion: reduce) { .lb-fire i, .lb-fire-wrap::before, .lb-hot { animation: none; } }
