  /* ── Stat column alignment ──────────────────────────────────────────────
     Centering (rather than right-aligning) the numeric columns keeps each
     value visually locked under its header instead of hugging the far
     right edge of a variable-width column. */
  .lb-wrap th.num, .lb-wrap td.num {
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* ── Time range selector ────────────────────────────────────────────────
     Stacked (label above chips), pushed to the far right of the controls
     row, with larger, more confident chips. */
  .window-select-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
  .window-select-label {
    font-family: var(--mono);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  /* Single joined segmented control instead of separate floating pills -
     one bordered track, buttons butt up against each other with no gap,
     the active segment gets its own pill inset inside the track. */
  .window-pills {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
  }
  .window-pill {
    font: inherit;
    font-family: 'Inter', sans-serif;
    font-size: .82rem;
    font-weight: 500;
    padding: 0 18px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background .15s, color .15s;
  }
  .window-pill:hover { color: var(--text); background: rgba(255,255,255,.05); }
  .window-pill.active {
    color: var(--text);
    background: var(--accent-dim);
    box-shadow: 0 0 0 1px var(--accent-border) inset;
    font-weight: 600;
  }
  /* When a tab hides one of the four pills (e.g. login streak drops "Day"),
     the remaining pills get extra horizontal padding so the track reads as
     intentional - same track, fewer/bigger buttons, not empty space. */
  .window-pills.compact-3 .window-pill { padding: 0 26px; }
  @media (max-width: 640px) {
    .window-select-wrap { align-items: stretch; margin-left: 0; }
    .window-pills { justify-content: stretch; }
    .window-pill { flex: 1 1 auto; justify-content: center; }
  }

  /* ── Category dropdown (replaces native <select>) ───────────────────────
     Custom button + floating menu, matching the site's existing
     .nav-dropdown / .nav-dd-menu pattern instead of an unstyled native
     select with its default browser arrow. */
  .category-dd { position: relative; }
  .category-dd-btn {
    height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: .84rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
    min-width: 200px;
    justify-content: space-between;
  }
  .category-dd-btn:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.04); }
  .category-dd-btn:focus-visible, .category-dd.open .category-dd-btn {
    outline: none;
    border-color: var(--accent-border);
    box-shadow: 0 0 0 3px var(--accent-dim);
  }
  .category-dd-caret {
    width: 11px; height: 11px; flex-shrink: 0; color: var(--muted);
    transition: transform .15s;
  }
  .category-dd.open .category-dd-caret { transform: rotate(180deg); }
  .category-dd-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 250px;
    max-height: 380px;
    overflow-y: auto;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.45);
    padding: 8px;
    z-index: 40;
  }
  .category-dd.open .category-dd-menu {
    display: block;
    animation: catDdIn .12s ease-out;
  }
  @keyframes catDdIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .category-dd-group { padding: 2px 0; }
  .category-dd-group + .category-dd-group {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border2);
  }
  .category-dd-group-label {
    font-family: var(--mono);
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted2);
    padding: 6px 10px 6px;
  }
  .category-dd-item {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: .82rem;
    font-weight: 400;
    cursor: pointer;
    transition: background .12s, color .12s;
  }
  .category-dd-item:hover { background: rgba(255,255,255,.07); }
  .category-dd-item.active {
    color: var(--accent);
    background: var(--accent-dim);
    font-weight: 600;
  }
  /* Center "Category" label over the dropdown button itself, matching the
     Time Range label above the segmented control. */
  .category-select-wrap { align-items: center; }
  .category-select-wrap .category-select-label { text-align: center; }

  /* ── Pagination controls ─────────────────────────────────────────────── */
  .lb-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
  }
  .lb-page-btn {
    font: inherit;
    font-family: 'Inter', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    padding: 0 18px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: background .15s, border-color .15s, opacity .15s;
  }
  .lb-page-btn:hover:not(:disabled) { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.05); }
  .lb-page-btn:disabled { opacity: .35; cursor: default; }
  .lb-page-info {
    font-family: var(--mono);
    font-size: .74rem;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--muted);
    min-width: 64px;
    text-align: center;
  }

  /* ── Top-3 medal icons ───────────────────────────────────────────────── */
  .rank-medal-icon { width: 26px; height: 26px; object-fit: contain; display: inline-block; }

  /* ── Slimmer, fully-clickable/highlightable player cell ─────────────────
     Leaderboard rows can carry two player cells (rivalries), so the click
     target lives on the cell itself rather than relying on a row-level
     onclick keyed to a single platform_id. Slimmed down (smaller avatar,
     tighter gaps/padding) since the leaderboard table is denser than the
     player-search results page. Highlight is the same full-row tint used
     on the profiles page (tr:hover td) rather than a boxed cell. */
  .lb-wrap .player-cell { gap: 12px; }
  /* A little more space before the platform icon than the shared default
     (.player-sub gap: 5px) - scoped to .lb-wrap only, so this doesn't touch
     the platform icon spacing on the profiles list or player search page,
     which reuse the same .player-sub class. */
  .lb-wrap .player-sub { gap: 12px; }
  /* No rounded corners on avatars anywhere in the product — keep this square. */
  .lb-wrap .list-av { width: 44px; height: 44px; border-radius: 0; }
  .lb-wrap .player-id-block { gap: 1px; min-height: 44px; justify-content: center; }
  .lb-wrap .player-name { font-size: .92rem; }
  /* Same orange-tinted row hover used on the profiles page's results
     table (.results-panel tr:hover td), so hovering a leaderboard row
     highlights the whole card in accent color instead of just the name. */
  .lb-wrap tr:hover td { background: rgba(255,204,0,.05); }
  .player-cell-link {
    display: flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
  }
  .player-cell-link:focus-visible {
    outline: 2px solid var(--accent-border);
    outline-offset: 2px;
    border-radius: 6px;
  }

  /* ── Rank-search bar merged into the results card ────────────────────────
     Same flattening technique as the profiles search page's .mh-card: the
     "find your rank" bar now lives inside .lb-wrap as its header row instead
     of floating above it as a separate box, with a hairline seam instead of
     two stacked panels. */
  .lb-wrap.mh-card { padding: 0; overflow: hidden; }
  .lb-wrap.mh-card .lb-controls-search {
    margin: 0; padding: 0; flex: 1 1 240px; min-width: 200px;
  }
  .lb-wrap.mh-card .lb-controls-search .mh-search-wrap {
    height: 42px; margin-bottom: 0; box-shadow: none;
  }
  .lb-wrap.mh-card .mh-search-wrap:focus-within { box-shadow: none; }
  .lb-wrap.mh-card .table-scroll thead tr { border-top: none; }

  /* ── Controls merged into the same card ─────────────────────────────────
     Category dropdown, time range, and the rank-search bar now live
     together as the card's single first row instead of the search bar
     stacking below as its own row - matching the weapons leaderboard. */
  .lb-wrap.mh-card .lb-controls-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border2);
  }
  @media (max-width: 640px) {
    .lb-wrap.mh-card .lb-controls-row { flex-direction: column; align-items: stretch; }
    .lb-wrap.mh-card .lb-controls-search { flex: 1 1 auto; }
  }

  /* Leaderboard description text (e.g. "Total time connected across all
     sessions") reads better as regular prose than as mono/code text. */
  .lb-meta-note {
    font-family: 'Inter', sans-serif;
    font-size: .8rem;
    font-weight: 400;
    color: var(--muted);
  }

  /* ── Graffiti decal ──────────────────────────────────────────────────────
     Absolutely positioned against body (see body's position:relative in
     styles.css) rather than .page, and appended to body - so left/right
     offsets still measure from the full page width (keeping it out in
     the margin beside the content, not overlapping it), while top sits
     just below the sticky topbar (50px) so it stays near the top of the
     page instead of trailing down to the footer. Previously
     position:fixed with a translateZ compositing hack that didn't
     actually fix the underlying problem. */
  .graff-decal {
    position: absolute;
    top: 400px;
    z-index: 4;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
  }
  .graff-decal--shrug { right: 70px; width: 200px; }
  @media (max-width: 899px) {
    .graff-decal--shrug { display: none; }
  }
