/* Leaderboard. Uses the Practice Center pill bar (practice.css .pc-nav). */

.lb-head { display: flex; align-items: center; gap: 18px; margin: 0 0 20px; }
.lb-head-ic { width: 72px; height: 72px; flex: none; border-radius: 50%; display: grid; place-items: center;
    background: radial-gradient(circle at 35% 30%, var(--surface), #FDE7B0); color: #D97706;
    box-shadow: 0 10px 24px -14px rgba(217, 119, 6, .6); }
.lb-head-ic .ic { width: 36px; height: 36px; fill: #FCD34D; }
.lb-head h1 { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.7rem); font-weight: 800; letter-spacing: -.02em; margin: 0; }
.lb-head p { margin: .25rem 0 0; color: var(--ink-2); font-size: 1.02rem; }
.lb-periods { display: inline-flex; margin-bottom: 22px; }

/* Empty state */
.lb-empty { text-align: center; padding: 46px 24px; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--rule));
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface));
    box-shadow: 0 10px 30px -22px rgba(15, 23, 42, .4); }
.lb-empty-ic { width: 86px; height: 86px; border-radius: 50%; display: inline-grid; place-items: center; margin-bottom: 14px;
    background: #FEF3C7; color: #D97706; }
.lb-empty-ic .ic { width: 42px; height: 42px; fill: #FCD34D; }
.lb-empty h2 { font-size: 1.45rem; font-weight: 700; margin: 0 0 .4rem; }
.lb-empty p { color: var(--ink-2); margin: 0 0 1.3rem; }
.lb-pill { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; padding: .75rem 1.5rem; font-weight: 700;
    box-shadow: 0 12px 24px -10px color-mix(in srgb, var(--accent) 75%, transparent); }
.lb-pill .ic { width: 18px; height: 18px; }

/* Podium */
.lb-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: end; margin-bottom: 20px; }
.lb-place { --tone: #F59E0B; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
    padding: 26px 18px 20px; border-radius: 20px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--tone) 35%, var(--rule));
    box-shadow: 0 12px 28px -20px color-mix(in srgb, var(--tone) 70%, transparent); }
.lb-place.p1 { order: 2; padding-top: 38px; background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 14%, var(--surface)), var(--surface)); }
.lb-place.p2 { --tone: #94A3B8; order: 1; }
.lb-place.p3 { --tone: #C2783E; order: 3; }
.lb-place.me { outline: 2px solid var(--accent); outline-offset: 2px; }
.lb-medal { position: absolute; top: -14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    background: var(--tone); color: #fff; font-weight: 800; box-shadow: 0 6px 14px -6px var(--tone); }
.lb-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; font-weight: 800;
    background: color-mix(in srgb, var(--tone) 18%, var(--surface)); color: color-mix(in srgb, var(--tone) 70%, var(--ink)); }
.lb-avatar.sm { --tone: var(--accent); width: 34px; height: 34px; font-size: .9rem; flex: none; }
.lb-name { font-size: 1.08rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-wpm { color: var(--muted); }
.lb-wpm b { font: 800 1.7rem var(--mono); color: var(--ink); }
.lb-place small { color: var(--muted); }

/* Table */
.lb-table { border-radius: 20px; overflow: hidden; border: 1px solid var(--rule); background: var(--surface);
    box-shadow: 0 10px 30px -24px rgba(15, 23, 42, .45); overflow-x: auto; }
.lb-table table { width: 100%; border-collapse: collapse; }
.lb-table th { text-align: left; padding: 14px 18px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
    background: color-mix(in srgb, var(--accent) 6%, var(--surface)); border-bottom: 1px solid var(--rule); }
.lb-table td { padding: 12px 18px; border-bottom: 1px solid var(--rule); }
.lb-table tbody tr:last-child td { border-bottom: 0; }
.lb-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.lb-table tr.me { background: var(--accent-wash); }
.lb-table .num { text-align: right; font-family: var(--mono); }
.lb-strong { font-weight: 700; color: var(--ink); }
.lb-rank { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 .9rem var(--mono);
    background: var(--paper); color: var(--ink-2); }
.lb-rank.r1 { background: #FDE68A; color: #92400E; }
.lb-rank.r2 { background: #E2E8F0; color: #334155; }
.lb-rank.r3 { background: #F5D0B5; color: #7C2D12; }
.lb-who { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.lb-you { padding: .1rem .5rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .72rem; font-weight: 700; }

.lb-note { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: .88rem; color: var(--muted); }
.lb-note .ic { width: 16px; height: 16px; color: var(--accent); }

@media (max-width: 760px) {
    .lb-podium { grid-template-columns: 1fr; }
    .lb-place, .lb-place.p1, .lb-place.p2, .lb-place.p3 { order: 0; }
    .lb-periods { display: flex; }
}
