/* LEADERBOARD tab (js/leaderboard.js). Reuses .panel, .section-head, .section-sub and .empty. */
.view-leaderboard { max-width: 760px; margin: 0 auto; }
.lb-list { display: grid; gap: 0.45rem; }
.lb-row {
  display: grid; grid-template-columns: 3.4rem 2.4rem 1fr auto; align-items: center; gap: 0.7rem; width: 100%;
  padding: 0.5rem 0.9rem 0.5rem 0.6rem; border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 12px;
  background: rgba(0, 0, 0, 0.22); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background-color 0.15s;
}
.lb-row:hover { transform: translateX(4px); border-color: var(--accent); background: rgba(255, 255, 255, 0.07); }
.lb-rank { font: 400 1.15rem var(--font-display); text-align: center; color: var(--muted); }
.lb-avatar { width: 2.4rem; height: 2.4rem; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font: 400 1.1rem var(--font-display); background: var(--accent); color: var(--accent-ink, #1a1205); }
.lb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.lb-you { color: var(--accent); font-weight: 800; }
.lb-points { text-align: right; white-space: nowrap; }
.lb-points b { font: 400 1.2rem var(--font-display); font-variant-numeric: tabular-nums; }
.lb-points small { color: var(--muted); font-weight: 800; }
.lb-top .lb-rank { color: var(--ink); font-size: 1.4rem; }
.lb-top-1 { border-left-color: #ffc43a; background: linear-gradient(90deg, rgba(255, 196, 58, 0.2), rgba(0, 0, 0, 0.22)); }
.lb-top-2 { border-left-color: #cfd6e4; background: linear-gradient(90deg, rgba(207, 214, 228, 0.16), rgba(0, 0, 0, 0.22)); }
.lb-top-3 { border-left-color: #d98a4a; background: linear-gradient(90deg, rgba(217, 138, 74, 0.18), rgba(0, 0, 0, 0.22)); }
.lb-me { border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.lb-msg { padding: 1.2rem 0 0.4rem; text-align: center; }
.lb-msg:empty { display: none; }
@media (max-width: 560px) { .lb-row { grid-template-columns: 2.8rem 2.2rem 1fr auto; gap: 0.5rem; } .lb-avatar { width: 2.2rem; height: 2.2rem; } }
@media (prefers-reduced-motion: reduce) { .lb-row { transition: none; } .lb-row:hover { transform: none; } }

/* TOP BAR room for the extra tab. The bar had no overflow handling, and a ninth button pushed the coins / account
   off narrow screens. Tabs now tighten their side padding as the window narrows (never above the old 1.15rem). If that
   still isn't enough (narrow window, or the biome pill showing) the tab strip scrolls sideways with a thin scrollbar
   instead of pushing the account button away; main.js showTab keeps the open tab in view. */
.tab { padding-inline: clamp(0.55rem, 0.9vw, 1.15rem); }
.tabs { min-width: 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent; }
.tabs::-webkit-scrollbar { height: 5px; }
.tabs::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(255, 255, 255, 0.25); }
