/* Fantasy Draft edition — extends the Market Matchup token system
   (style.css). Original, logo-free identity: position tiles use POSITION
   hues (a game semantic we own), never NFL team colors. */

.edition-tag {
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border-1));
  border-radius: 999px; padding: 0.15rem 0.65rem;
}

/* format segmented control */
.format-tabs { display: inline-flex; gap: var(--sp-1); background: var(--surface-1); border: 1px solid var(--border-1); border-radius: 999px; padding: var(--sp-1); }
.format-tab { background: none; border: none; color: var(--text-2); padding: var(--sp-2) var(--sp-4); border-radius: 999px; font-weight: 650; font-size: var(--text-s); cursor: pointer; }
.format-tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.format-note { color: var(--text-3); font-size: var(--text-xs); margin: var(--sp-2) 0 0; min-height: 1.1em; }

/* team-brand rail: a 3px top accent in the team's derived primary.
   Gameplay state ALWAYS outranks team color: the :not() chain hands the
   top border back to selected/correct/dimmed treatments, and focus
   outlines are a separate property entirely. All cards reserve the 3px
   top border so states never shift layout. */
.card { border-top-width: 3px; }
.card.team-branded:not(.selected):not(.correct-side):not(.dimmed) {
  border-top-color: var(--team-rail, var(--border-1));
}

/* position tiles: team-branded via inline styles from the registry;
   the data-pos hues below remain as a no-JS/neutral fallback only */
.pos-tile {
  --pos-h: 210;
  width: 84px; height: 84px; border-radius: 20px; flex: none;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.04em;
  color: hsl(var(--pos-h) 45% 82%);
  background: radial-gradient(120% 120% at 25% 15%, hsl(var(--pos-h) 30% 26%), hsl(var(--pos-h) 32% 15%) 75%);
  border: 1px solid hsl(var(--pos-h) 30% 34%);
  font-size: 1.6rem; text-transform: uppercase;
}
.pos-tile[data-pos="QB"] { --pos-h: 265; }
.pos-tile[data-pos="RB"] { --pos-h: 160; }
.pos-tile[data-pos="WR"] { --pos-h: 210; }
.pos-tile[data-pos="TE"] { --pos-h: 28; }
.pos-tile[data-pos="K"], .pos-tile[data-pos="PK"] { --pos-h: 48; }
.pos-tile[data-pos="DEF"], .pos-tile[data-pos="DST"] { --pos-h: 0; }
.pos-tile .tile-team { font-size: 0.72rem; font-weight: 650; letter-spacing: 0.12em; opacity: 0.75; }

.card .entity-name { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; line-height: 1.08; text-transform: uppercase; letter-spacing: 0.01em; max-width: 100%; overflow-wrap: break-word; }
.entity-kind {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3); border: 1px solid var(--border-1); border-radius: 999px; padding: 0.14rem 0.55rem;
}

/* reveal */
.adp-reveal { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.adp-sub { color: var(--text-3); font-size: var(--text-xs); }
.market-line { color: var(--text-2); margin: var(--sp-1) 0 0; }

/* disclosure */
.disclosure {
  margin-top: var(--sp-5); color: var(--text-3); font-size: var(--text-xs);
  border: 1px solid var(--border-1); border-radius: var(--radius-m);
  padding: var(--sp-3) var(--sp-4); text-align: center; max-width: 60ch;
}
.disclosure b { color: var(--text-2); font-weight: 650; }

/* stats panel */
.format-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); width: 100%; margin: var(--sp-4) 0; }
.format-stat-card { background: var(--surface-1); border: 1px solid var(--border-1); border-radius: var(--radius-m); padding: var(--sp-3) var(--sp-4); }
.format-stat-card h3 { font-family: var(--font-display); text-transform: uppercase; margin: 0 0 var(--sp-2); font-size: var(--text-m); letter-spacing: 0.04em; }
.format-stat-card dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 2px var(--sp-3); font-size: var(--text-xs); }
.format-stat-card dt { color: var(--text-3); }
.format-stat-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }

@media (max-width: 720px) {
  .format-stats { grid-template-columns: 1fr; }
  .pos-tile { width: 64px; height: 64px; font-size: 1.2rem; border-radius: 14px; }
  .card .entity-name { font-size: 1.25rem; }
  .format-tabs { flex-wrap: wrap; border-radius: var(--radius-m); }
  /* the base shell hides .app-nav on mobile in favor of baseball's bottom
     nav; the fantasy edition uses a deliberate two-row header instead:
     brand on top, a full-width four-item nav row beneath — comfortable
     touch targets, no edge-flush overflow at narrow widths */
  .app-header { flex-wrap: wrap; height: auto; padding: var(--sp-2) var(--sp-3); row-gap: var(--sp-1); }
  .app-nav { display: flex; order: 3; width: 100%; justify-content: space-between; gap: 2px; }
  .nav-link { padding: 0.5rem 0.4rem; font-size: 0.78rem; flex: 1; text-align: center; }
  .header-context { display: none; }
  .edition-tag { margin-left: auto; }
}

/* Fantasy pages: paint the dark canvas on the full document, not the
   first viewport. background-attachment:fixed (shared style.css) leaves
   everything below the fold WHITE in full-page rendering and on iOS
   Safari, which broke long history/completion pages. Scoped here so
   Baseball keeps its existing look. */
html { background: var(--bg-0, #0b0f14); }
body {
  background-attachment: scroll;
  background-repeat: repeat, repeat, repeat, repeat, no-repeat;
  background-size: auto, auto, auto, auto, 100% 100%;
}

/* ===== Fantasy-first token layer (scoped; Baseball untouched) ===== */
#view-s9, #view-s9-history {
  --s9-bg-raised: rgba(255,255,255,.045);
  --s9-bg-surface: rgba(0,0,0,.28);
  --s9-border: rgba(255,255,255,.14);
  --s9-border-strong: rgba(255,255,255,.30);
  --s9-text-muted: rgba(255,255,255,.62);
  --s9-radius: 12px;
  --s9-radius-sm: 8px;
  --s9-content-max: min(720px, 100%);
  --s9-play-max: min(980px, 100%);
}

/* ===== P0 responsive containment =====
   Root cause: the 9-slot roster's fixed per-slot widths propagated
   max-content width through flex parents lacking min-width:0, forcing the
   whole view to ~804px (mobile) / 624px+ (desktop floors). Every fantasy
   shell child is now viewport-constrained; ONLY the roster strip may
   scroll horizontally, and it owns that overflow internally. */
#view-s9 .game-main, #view-s9-history .game-main { width: 100%; min-width: 0; }
#view-s9 .game-main > *, #view-s9-history .game-main > * {
  width: 100%; max-width: var(--s9-content-max); min-width: 0;
}
#view-s9 .game-main > #s9-draft { max-width: var(--s9-play-max); }
.s9-board {
  width: 100%; max-width: 100%; min-width: 0;
  grid-template-columns: repeat(9, minmax(0, 1fr));
}
#view-s9 .game-main {
  padding-left: max(var(--sp-4, 16px), env(safe-area-inset-left));
  padding-right: max(var(--sp-4, 16px), env(safe-area-inset-right));
  padding-bottom: calc(var(--sp-7, 40px) + env(safe-area-inset-bottom));
}

/* Fantasy header compact treatment (fantasy pages only — Baseball never
   loads this sheet): below 900px the six-item nav becomes a full-width
   second row that scrolls internally; the page never inherits its width.
   The header may also wrap at ANY width (inert when everything fits) so
   high zoom levels never force the page wider than the viewport. */
.app-header { flex-wrap: wrap; row-gap: 6px; min-width: 0; }
.app-header .app-nav { min-width: 0; flex: 1 1 auto; flex-wrap: wrap; }
.app-header .header-context { min-width: 0; }
@media (max-width: 900px) {
  .app-header { flex-wrap: wrap; row-gap: 6px; }
  .app-header .app-nav {
    order: 3; width: 100%; min-width: 0; flex: 1 1 100%;
    display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain; scrollbar-width: none; gap: 2px;
  }
  .app-header .app-nav::-webkit-scrollbar { display: none; }
  .app-header .app-nav .nav-link { flex: 0 0 auto; white-space: nowrap; }
  .app-header .header-context { margin-left: auto; min-width: 0; }
  .app-header .header-context .stats { flex-wrap: wrap; justify-content: flex-end; }
}

/* ===== Starting 9 ===== */
.s9-setup-grid { display: grid; gap: var(--space-4, 16px); margin-bottom: 16px; }
.s9-field { border: none; padding: 0; margin: 0; }
.s9-field legend { font-family: 'Barlow Condensed', sans-serif; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; opacity: .8; margin-bottom: 6px; }

/* roster board: 9 compact slot tiles; desktop grid, mobile single strip */
.s9-board { display: grid; grid-template-columns: repeat(9, minmax(64px, 1fr)); gap: 6px; margin: 10px 0; }
.s9-slot { position: relative; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 6px 6px 6px 9px; min-height: 46px; display: flex; flex-direction: column; gap: 2px; background: rgba(0,0,0,.25); overflow: hidden; }
.s9-slot::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--s9-rail, transparent); }
.s9-slot-label { font-family: 'Barlow Condensed', sans-serif; font-size: .72rem; letter-spacing: .06em; opacity: .75; }
.s9-slot-body { font-size: .72rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s9-slot.filled { border-color: rgba(255,255,255,.3); }
.s9-slot.filled .s9-slot-body { font-weight: 600; }
.s9-mark { position: absolute; top: 4px; right: 6px; font-size: .7rem; }
.s9-mark.good { color: var(--good, #38c172); }
.s9-mark.bad { color: var(--bad, #e3342f); }
@media (max-width: 720px) {
  /* compact strip: matchup stays the visual focus, board scrolls sideways
     INSIDE its own bounds; the page never inherits its width */
  .s9-board { display: flex; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .s9-slot { flex: 0 0 84px; }
}

.s9-runline { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-bottom: 6px; }
.s9-pickline { font-family: 'Barlow Condensed', sans-serif; font-size: 1.3rem; letter-spacing: .04em; text-transform: uppercase; }
.s9-context { font-size: .8rem; opacity: .8; }
.s9-slot-reveal { font-family: 'Barlow Condensed', sans-serif; font-size: 1.6rem; letter-spacing: .05em; text-transform: uppercase; margin: 8px 0; }

.s9-final-board { display: grid; gap: 6px; margin-bottom: 14px; }
.s9-final-row { position: relative; display: grid; grid-template-columns: 52px 1fr auto auto; gap: 10px; align-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 8px 10px 8px 13px; background: rgba(0,0,0,.25); overflow: hidden; }
.s9-final-row::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--s9-rail, transparent); }
.s9-final-slot { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .05em; opacity: .8; }
.s9-final-name { font-weight: 600; }
.s9-final-meta { font-size: .75rem; opacity: .75; white-space: pre-line; }
.s9-final-row .s9-mark { position: static; }
.s9-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.s9-history-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.s9-history-filters select { background: rgba(0,0,0,.35); color: inherit; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 6px 8px; }
.s9-history-card { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 10px 12px; background: rgba(0,0,0,.25); color: inherit; cursor: pointer; margin-bottom: 8px; }
.s9-history-card:hover { border-color: rgba(255,255,255,.35); }
.s9-history-head { font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; opacity: .75; }
.s9-history-body { font-size: .9rem; }
.s9-history-compare { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; opacity: .8; text-decoration: underline; }
.s9-history-pick { font-size: .82rem; margin: 4px 0; opacity: .9; }
@media (max-width: 720px) {
  #nav-history { font-size: 0; }
  #nav-history::after { content: attr(data-mobile-label); font-size: .8rem; }
}


/* ===== Starting 9 multi-option grid ===== */
.s9-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.s9-options .card { min-height: 132px; }
.s9-options[data-count="3"] .card:first-child { grid-column: 1 / -1; } /* 2+1: earliest row spans */
.s9-status { display: block; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; margin-top: 4px; }
.s9-status.good { color: var(--good, #38c172); }
.s9-status.bad { color: var(--bad, #e3342f); }
@media (max-width: 720px) {
  .s9-options { gap: 7px; }
  .s9-options .card { min-height: 116px; padding: 10px 8px; }
  .s9-options .entity-name { font-size: .95rem; }
}

/* ===== Fantasy-first visual refinement (phase 2) ===== */
.s9-eyebrow { font-family: var(--font-display, 'Barlow Condensed'); font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent, #38c172); margin: 0 0 2px; }

/* navigation hierarchy: Starting 9 flagship, Baseball separated */
#nav-s9 { font-weight: 700; }
#nav-s9.active { box-shadow: inset 0 -2px 0 var(--accent, #38c172); }
.app-nav .edition-link { margin-left: auto; opacity: .75; border-left: 1px solid var(--s9-border, rgba(255,255,255,.14)); border-radius: 0; padding-left: 12px; }
@media (max-width: 900px) { .app-nav .edition-link { margin-left: 8px; } }

/* setup: draft-lobby framing */
.s9-setup-grid { background: var(--s9-bg-raised); border: 1px solid var(--s9-border); border-radius: var(--s9-radius); padding: 14px; }
.s9-scoring-help { margin-top: 12px; color: var(--s9-text-muted); font-size: .82rem; max-width: 52ch; }
.s9-scoring-help summary { cursor: pointer; color: inherit; }
.s9-ranked-used-note { color: var(--s9-text-muted); }
.link-btn { background: none; border: none; color: var(--accent, #38c172); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

/* option cards: crisp surfaces, purposeful interaction states */
.s9-options .card { background: var(--s9-bg-raised); border: 1px solid var(--s9-border); border-radius: var(--s9-radius); transition: transform var(--dur-1, .12s), border-color var(--dur-1, .12s); }
.s9-options .card:hover:not(:disabled) { border-color: var(--s9-border-strong); transform: translateY(-1px); }
.s9-options .card:active:not(:disabled) { transform: translateY(0) scale(.99); }
.s9-options .card:disabled { cursor: default; }
@media (prefers-reduced-motion: reduce) { .s9-options .card, .s9-options .card:hover { transform: none; transition: none; } }

/* verdict panel: compact, above the evidence board */
.s9-verdict { background: var(--s9-bg-raised); border: 1px solid var(--s9-border); border-radius: var(--s9-radius); padding: 10px 14px; margin: 10px 0; text-align: left; }
.s9-verdict-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.s9-verdict .result-banner { margin: 0; font-size: 1.5rem; }
.s9-verdict .result-points, .s9-verdict .market-line { margin: 4px 0 0; }

/* roster strip affordance + rail on wide screens */
@media (max-width: 720px) {
  .s9-board { mask-image: linear-gradient(to right, black 92%, transparent); }
}
@media (min-width: 1024px) {
  #s9-draft { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 8px 20px;
    grid-template-areas: 'runline roster' 'slotreveal roster' 'verdict roster' 'cards roster' 'skeleton roster' 'error roster' 'progress roster' 'disclosure roster'; align-items: start; }
  #s9-draft > .s9-runline { grid-area: runline; }
  #s9-draft > #s9-slot-reveal { grid-area: slotreveal; }
  #s9-draft > #s9-result { grid-area: verdict; }
  #s9-draft > #s9-cards { grid-area: cards; }
  #s9-draft > #s9-skeleton { grid-area: skeleton; }
  #s9-draft > #s9-error { grid-area: error; }
  #s9-draft > #s9-progress { grid-area: progress; }
  #s9-draft > #s9-disclosure { grid-area: disclosure; }
  #s9-draft > #s9-roster { grid-area: roster; display: grid; grid-template-columns: 1fr; gap: 6px; position: sticky; top: 76px; }
  #s9-draft > #s9-roster .s9-slot { min-height: 40px; flex-direction: row; align-items: center; gap: 8px; }
  #s9-draft .s9-options .card { min-height: 190px; }
}

/* Starting 9 leaderboard + stats surfaces */
.s9-board-mode { margin-bottom: 12px; }
.s9-board-context { margin: 0 0 10px; font-size: .8rem; }
.s9-lb-rows { display: grid; gap: 6px; }
.s9-lb-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  background: var(--s9-bg-raised); border: 1px solid var(--s9-border); border-radius: var(--s9-radius-sm); padding: 10px 12px; }
.s9-lb-rank { font-family: var(--font-display, 'Barlow Condensed'); font-size: 1.1rem; color: var(--s9-text-muted); }
.s9-lb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s9-lb-detail { font-size: .75rem; color: var(--s9-text-muted); }
.s9-lb-score { font-family: var(--font-display, 'Barlow Condensed'); font-size: 1.35rem; font-weight: 700; }
.s9-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.s9-stat-card { background: var(--s9-bg-raised); border: 1px solid var(--s9-border); border-radius: var(--s9-radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.s9-stat-card strong { font-family: var(--font-display, 'Barlow Condensed'); font-size: 1.6rem; line-height: 1; }
.s9-stat-card span { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--s9-text-muted); }
.s9-stat-primary strong { color: var(--accent, #38c172); }

/* history cards + compare buttons */
.s9-history-card { position: relative; }
.s9-history-compare.ghost { width: auto; align-self: flex-start; margin-top: 6px; font-size: .72rem; padding: 4px 10px; }

/* landscape phones: compact context, verdict stays lean */
@media (max-height: 480px) and (orientation: landscape) {
  .s9-slot-reveal { font-size: 1.1rem; margin: 4px 0; }
  .s9-verdict .result-banner { font-size: 1.15rem; }
  .s9-options .card { min-height: 96px; }
  #view-s9 .page-head { margin-bottom: 8px; }
}

/* corrective phase 2: leaderboard + stats dashboard */
.s9-lb-me { border-color: var(--accent, #38c172); box-shadow: inset 3px 0 0 var(--accent, #38c172); }
#s9-lb-formats { margin-bottom: 8px; }
@media (min-width: 1024px) {
  #s9-stats-panel .s9-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #s9-stats-panel .s9-stat-primary strong { font-size: 2.2rem; }
  #s9-stats-panel .s9-stat-primary { padding: 18px; }
}
@media (min-width: 700px) and (max-width: 1023px) {
  #s9-stats-panel .s9-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.s9-stat-note { background: var(--s9-bg-raised); border: 1px solid var(--s9-border); border-radius: var(--s9-radius-sm); padding: 10px 12px; margin: 0 0 8px; }

/* corrective phase 3: compact reveal on short viewports */
@media (max-height: 700px) {
  .s9-verdict { padding: 8px 12px; margin: 6px 0; }
  .s9-verdict .result-banner { font-size: 1.2rem; }
  .s9-options .card .adp-reveal { font-size: 1.15rem; }
}
/* nav + roster affordances */
@media (max-width: 900px) {
  .app-header .app-nav { mask-image: linear-gradient(to right, black 94%, transparent); }
}
.s9-swipe-hint { font-size: .7rem; color: var(--s9-text-muted); margin: 2px 0 0; }

/* ---- corrective final pass: board-mode exclusivity + error state ---- */
/* Quick Match's own async board render re-flips [hidden] on these after
   a mode switch; while Starting 9 owns the view the class, not the
   attribute, is the visibility authority, so late QM paints stay inert. */
#view-ranks.s9-board-active .board,
#view-ranks.s9-board-active #board-empty,
#view-ranks.s9-board-active #me-panel,
#view-ranks.s9-board-active .format-tabs:not(#s9-lb-formats):not(#s9-board-mode),
#view-ranks.s9-board-active .tabs:not(#s9-lb-timeframes) { display: none !important; }
#view-stats.s9-stats-active #format-stats { display: none !important; }

.s9-lb-error { display: grid; justify-items: center; gap: 10px; }
.s9-lb-error p { margin: 0; }
.s9-lb-error .ghost { min-height: 44px; padding: 8px 22px; }

/* ---- fantasy-first flow: landing secondary CTA + empty-state CTAs ---- */
.s9-quick-match-cta { display: grid; justify-items: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.s9-quick-match-cta p { margin: 0; }
.s9-quick-match-cta .ghost, .s9-empty-state .ghost { min-height: 44px; padding: 8px 22px; }
.s9-empty-state { display: grid; justify-items: center; gap: 10px; }
.s9-empty-state p { margin: 0; }

/* consumed-Ranked actions: clearly separated, wrap cleanly, stay secondary */
.s9-ranked-used-note { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 4px; }
.s9-ranked-used-note .s9-note-sep { opacity: .45; }

/* private beta marker (remove at public launch) */
.s9-beta-tag { color: var(--accent, #4ade80); letter-spacing: .08em; }
.s9-beta-note { opacity: .8; }

/* display-name claim (shared leaderboard surface) */
.fantasy-claim { display: grid; gap: 8px; justify-items: center; margin: 6px auto 14px; max-width: 420px; }
.fantasy-claim label { font-size: .85rem; opacity: .85; }
.fantasy-claim-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.fantasy-claim input { min-height: 44px; padding: 6px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: inherit; min-width: 0; }
.fantasy-claim .primary { min-height: 44px; padding: 8px 18px; }

/* ghost buttons: restrained, but unmistakably buttons (audit L1) */
.ghost { border: 1px solid rgba(255,255,255,.22); border-radius: 999px; }
.ghost:hover { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.06); color: var(--text-1, #fff); }
.ghost:focus-visible { outline: 2px solid var(--accent, #4ade80); outline-offset: 2px; }
.ghost:disabled { opacity: .45; cursor: not-allowed; }

/* Public Draft Card: accessible leaderboard rows + aggregate dialog.
   Today rows are anchors (same-tab navigation, native modifier-click);
   aggregate rows are buttons — both render identically. */
button.s9-lb-row, a.s9-lb-row { width: 100%; text-align: left; background: none; font: inherit; color: inherit; cursor: pointer; }
a.s9-lb-row { text-decoration: none; }
button.s9-lb-row:hover, a.s9-lb-row:hover { background: rgba(255,255,255,.05); }
button.s9-lb-row:focus-visible, a.s9-lb-row:focus-visible { outline: 2px solid var(--accent, #4ade80); outline-offset: -2px; }
button.s9-lb-row:disabled { cursor: default; opacity: .8; }
.s9-agg-dialog { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; z-index: 50; }
.s9-agg-box { background: var(--bg-1, #12171e); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; max-width: 460px; width: 100%; max-height: 80vh; overflow: auto; padding: 18px; }
.s9-agg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.s9-agg-head h2 { font-size: 1.1rem; margin: 0; }
.s9-agg-list { display: grid; gap: 8px; margin-top: 12px; }
.s9-agg-item { display: block; padding: 11px 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; color: var(--text-1, #fff); text-decoration: none; min-height: 44px; }
.s9-agg-item:hover { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.05); }
.s9-agg-item:focus-visible { outline: 2px solid var(--accent, #4ade80); outline-offset: 2px; }
