/* Buzzer: dark broadcast look. Accent comes from ui/config.js (set on :root at boot). */
:root {
  --bg: #0E0F12;
  --panel: #15171C;
  --panel-2: #1D2027;
  --line: #2a2c33;
  --text: #F4F1EA;
  --muted: #8e8f97;
  --accent: #E5322D;
  --on-accent: #F4F1EA; /* text on the red */
  --green: #3CC46A; --yellow: #F0C419; --orange: #F08A24; --red: #B3261E; /* grades: red is the miss, deeper than the brand red */
  --sheet-peek: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
html { overscroll-behavior: none; }
body { font: 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
#app { min-height: 100dvh; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* --- shared pieces --------------------------------------------------------- */
.btn { border: 0; border-radius: 12px; padding: 12px 16px; background: var(--panel-2); font-weight: 650; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-go { width: 100%; background: var(--accent); color: var(--on-accent); font-size: 18px; font-weight: 800; letter-spacing: 0.02em; padding: 14px; }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.chip[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip.rare::after { content: " \00b7 rarely"; font-weight: 500; opacity: 0.7; }
.chip.secondary { border-style: dashed; }
.pchip { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 3px 4px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); font-size: 13px; font-weight: 700; cursor: pointer; }
.pchip[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.pchip .pct { color: var(--muted); font-weight: 600; min-width: 34px; }
.pchip .nm { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pchip[aria-pressed=true] .pct { color: var(--text); }
.pchip .info { border: 0; background: transparent; color: var(--muted); font-size: 15px; padding: 2px 6px; line-height: 1; }
.players-row.dim .pchip { opacity: 0.55; }
.label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 10px 0 6px; }
.badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 6px; background: var(--accent); color: var(--on-accent); }
.badge.practice { background: #5a4710; color: #ffe38a; }
.grade-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; padding: 5px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; color: #111; white-space: nowrap; }
.grade-chip.green { background: var(--green); } .grade-chip.yellow { background: var(--yellow); }
.grade-chip.orange { background: var(--orange); } .grade-chip.red { background: var(--red); color: #fff; }
.grade-chip.pending { background: var(--panel-2); color: var(--muted); }
.grade-chip.unknown, .grade-chip.none { background: #3a3b40; color: #c7c7cc; }
.progress { height: 4px; border-radius: 2px; background: var(--panel-2); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }

/* Headshots: initials underneath, photo on top, optional rating ring. */
.hs { position: relative; width: var(--hs); height: var(--hs); border-radius: 50%; background: var(--team); color: var(--team-text); overflow: hidden; flex: 0 0 auto; display: grid; place-items: center; }
.hs-ring { box-shadow: 0 0 0 3px var(--ring, #555); }
.hs-ini { font-weight: 800; font-size: calc(var(--hs) * 0.36); }
.hs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.35); transform-origin: 50% 25%; }
.rating { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px; font-weight: 800; font-size: 13px; color: #111; }

/* --- intro ------------------------------------------------------------------- */
.intro { max-width: 560px; margin: 0 auto; padding: 18px 16px 32px; }
.brand { display: flex; align-items: baseline; justify-content: space-between; }
.brand h1 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -0.02em; }
.brand h1 b { color: var(--accent); }
.scen-title { font-size: 22px; font-weight: 800; margin: 18px 0 4px; }
.scen-state { display: flex; align-items: center; gap: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.scen-state b { color: var(--text); font-size: 18px; }
.tagline { margin: 14px 0 18px; font-size: 17px; font-weight: 700; }
.tagline span { color: var(--accent); }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.side-btn { border: 2px solid transparent; border-radius: 16px; padding: 14px 10px 12px; background: var(--team); color: var(--team-text); text-align: left; transition: transform 0.1s; }
.side-btn:active { transform: scale(0.98); }
.side-btn[aria-pressed=true] { border-color: #fff; box-shadow: 0 0 0 3px var(--accent); }
.side-btn .abbr { font-size: 28px; font-weight: 900; line-height: 1; }
.side-btn .full { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.side-btn .where { font-size: 12px; font-weight: 700; margin-top: 8px; opacity: 0.9; }
.lineup { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.lineup .p { display: grid; justify-items: center; gap: 4px; width: 48px; font-size: 10px; text-align: center; color: var(--team-text); }
.intro-go { margin-top: 18px; }
.intro-note { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }

/* --- game ---------------------------------------------------------------------- */
.game { display: flex; flex-direction: column; min-height: 100dvh; touch-action: manipulation; overscroll-behavior: none; } /* no double-tap zoom, no pull-to-refresh */
.scoreboard { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 28px 1fr auto 1fr; align-items: center; gap: 6px; padding: 6px 10px; background: #000; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.sb-team { display: flex; align-items: center; gap: 8px; }
.sb-team.right { flex-direction: row-reverse; text-align: right; }
.sb-chip { min-width: 46px; padding: 4px 6px; border-radius: 6px; background: var(--team); color: var(--team-text); font-weight: 900; text-align: center; font-size: 14px; }
.sb-score { font-size: 26px; font-weight: 900; }
.sb-meta { display: grid; gap: 2px; font-size: 10px; color: var(--muted); }
.sb-team.right .sb-meta { justify-items: end; }
.sb-fouls b { color: var(--text); }
.sb-bonus { color: #111; background: var(--yellow); border-radius: 3px; padding: 0 3px; font-weight: 800; margin-left: 3px; }
.sb-dots { letter-spacing: 1px; color: var(--text); }
.sb-dots .used { opacity: 0.25; }
.sb-mid { display: grid; justify-items: center; line-height: 1.05; }
.sb-clock { font-size: 24px; font-weight: 900; color: #ffcf33; }
.sb-sub { font-size: 11px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.sb-shot { color: #ff5a4f; font-weight: 800; font-size: 14px; }
.sb-poss { font-size: 12px; color: var(--accent); visibility: hidden; }
.sb-poss.on { visibility: visible; }
.court-wrap { position: relative; }
.court-wrap canvas { display: block; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.look { position: absolute; left: 10px; top: 10px; padding: 5px 10px; border-radius: 12px; background: rgba(0,0,0,0.75); font-size: 13px; font-weight: 700; pointer-events: none; display: grid; }
.look-note { font-size: 11px; font-weight: 600; color: var(--yellow); }
.look-note:empty { display: none; }
.court-badge { position: absolute; right: 10px; top: 10px; }
/* Overtime montage card (OVERTIME, then who has the ball at 2:00). */
.ot-card { position: absolute; inset: 0; bottom: auto; height: min(100%, 60vh); display: grid; place-content: center; justify-items: center; gap: 2px; background: rgba(14,15,18,0.72); pointer-events: none; }
.ot-card[hidden] { display: none; }
.ot-card b { font-family: 'Anton', Impact, 'Arial Narrow', sans-serif; font-weight: 400; font-size: 44px; letter-spacing: 0.04em; color: var(--text); line-height: 1; }
.ot-card span { font-size: 15px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }

/* Bottom sheet: peek / half / full; a right rail on wide screens. */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: var(--sheet-h, var(--sheet-peek)); background: var(--panel); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,0.5); display: flex; flex-direction: column; transition: height 0.22s ease; }
.sheet.dragging { transition: none; }
.sheet-handle { position: relative; flex: 0 0 auto; display: grid; place-items: center; height: 24px; touch-action: none; cursor: grab; }
/* 44px touch target: the hit area reaches 20px above the sheet's edge. */
.sheet-handle::before { content: ''; position: absolute; left: 0; right: 0; top: -20px; height: 44px; }
.sheet-handle i { width: 40px; height: 5px; border-radius: 3px; background: #4a4b52; }
.sheet-peek { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px 10px; font-weight: 700; }
.sheet-body { flex: 1 1 auto; overflow-y: auto; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.confirm { display: flex; align-items: center; gap: 10px; padding: 10px 0; margin-top: 4px; border-top: 1px solid var(--line); }
.confirm .who { flex: 1; min-width: 0; }
.confirm .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.confirm .who span { font-size: 13px; color: var(--muted); }
.confirm .odds { font-size: 22px; font-weight: 900; }
.toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.toggle button { border: 0; background: transparent; padding: 8px 14px; font-weight: 600; font-size: 14px; }
.toggle button[aria-pressed=true] { background: var(--accent); color: var(--on-accent); }
.small-link { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 4px 0; font-size: 13px; }

/* Result card (inside the sheet) */
.result .outcome { font-size: 18px; font-weight: 800; margin: 2px 0 10px; }
.result .row { display: flex; align-items: center; gap: 14px; }
.result .move { font-size: 44px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.result .move.up { color: var(--green); } .result .move.down { color: var(--red); }
.result .why { margin: 10px 0 14px; color: #d0d0d6; }

/* Player card */
.pcard { padding-top: 4px; }
.pcard-head { display: flex; gap: 14px; align-items: center; }
.pcard-head h2 { margin: 0; font-size: 22px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { background: var(--panel-2); border-radius: 10px; padding: 8px 10px; }
.stat b { display: block; font-size: 20px; }
.stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* --- end card ---------------------------------------------------------------------- */
.end { max-width: 640px; margin: 0 auto; padding: 18px 16px 40px; }
.finals { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 14px 0; }
.final-box .v div { opacity: 0.6; }
.final-box .v div.win { opacity: 1; }
.final-box { background: var(--panel); border-radius: 14px; padding: 12px; }
.final-box .k { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.final-box .v { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; margin-top: 4px; }
.strip { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin: 4px 0; }
.strip .who { width: 82px; font-size: 12px; color: var(--muted); }
.strip .g { width: 22px; height: 22px; border-radius: 6px; }
.strip .g.green { background: var(--green); } .strip .g.yellow { background: var(--yellow); }
.strip .g.orange { background: var(--orange); } .strip .g.red { background: var(--red); }
.strip .g.unknown, .strip .g.pending, .strip .g.none { background: #3a3b40; }
.strip-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.strip-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--muted); margin-right: 5px; vertical-align: -1px; }
.strip-legend .lg.bottom { opacity: 0.5; }
.pairs { display: flex; flex-wrap: wrap; gap: 14px 5px; margin-bottom: 6px; } /* row gap keeps wrapped pairs apart */
.pair { display: grid; gap: 3px; }
.pair .g { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; }
.pair .g.green { background: var(--green); } .pair .g.yellow { background: var(--yellow); }
.pair .g.orange { background: var(--orange); } .pair .g.red { background: var(--red); }
.pair .g.unknown, .pair .g.pending, .pair .g.none { background: #3a3b40; }
.pair .g.dash { background: transparent; border: 1px dashed var(--line); color: var(--muted); font-size: 11px; }
.story { margin: 8px 0 14px; }
.story-result { font-size: 22px; font-weight: 800; line-height: 1.25; }
.story-odds { font-size: 16px; color: var(--muted); line-height: 1.35; margin-top: 4px; }
.story-odds:empty { display: none; }
.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.end-actions { display: grid; gap: 10px; margin-top: 20px; }
.end-court { margin-top: 16px; border-radius: 12px; overflow: hidden; }
.percentile-slot { font-size: 13px; color: var(--muted); }
@media (max-width: 899px) {
  .final-box .v { font-size: 22px; }
  .strip { flex-wrap: nowrap; }
  .strip .who { width: 66px; flex: 0 0 auto; }
  .strip .g { width: 19px; height: 19px; border-radius: 5px; flex: 0 0 auto; }
  .pair .g { width: 24px; height: 24px; }
}
.debug-hud { position: fixed; right: 6px; top: 58px; z-index: 100; max-width: calc(100vw - 12px); background: rgba(0,0,0,0.82); color: #7cfc9a; font: 11px/1.35 ui-monospace, Menlo, Consolas, monospace; padding: 6px 8px; border-radius: 6px; pointer-events: none; white-space: pre-wrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #fff; color: #111; padding: 10px 16px; border-radius: 999px; font-weight: 700; z-index: 50; }

/* --- wide: court left, sheet becomes a right rail ------------------------------------- */
@media (min-width: 900px) {
  .game { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto 1fr; min-height: 100vh; }
  .scoreboard { grid-column: 1 / -1; }
  .court-wrap { grid-column: 1; padding: 12px; }
  .sheet { position: relative; /* anchors the first-call hint */  grid-column: 2; grid-row: 2; height: auto !important; border-radius: 0; box-shadow: none; border-left: 1px solid var(--line); }
  .sheet-handle { display: none; }
  .sheet-peek { padding-top: 14px; }
  .intro { max-width: 760px; }
}
.chip .cost { margin-left: 6px; font-size: 11px; font-weight: 700; opacity: 0.8; }
.chip .cost.away { color: #ffd60a; opacity: 1; }
.chip[aria-pressed=true] .cost.away { color: var(--on-accent); }

/* --- Friday polish ----------------------------------------------------------------- */
.grading-line { margin: 6px 0 2px; font-size: 14px; color: var(--muted); }
.links { display: flex; justify-content: center; gap: 22px; margin-top: 18px; font-size: 14px; }
.links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 10px 0; }
.final-box.reveal { width: 100%; text-align: left; border: 1px dashed var(--line); cursor: pointer; font: inherit; color: inherit; }
.final-box.reveal .v { color: var(--accent); }
.sheet-hint { position: absolute; left: 50%; top: -46px; transform: translateX(-50%); z-index: 20; white-space: nowrap;
  background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 14px; padding: 8px 14px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45); pointer-events: none; animation: hint-in 0.3s ease-out; }
.sheet-hint::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--accent); }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, 6px); } }
@media (min-width: 900px) { .sheet-hint { top: 40px; } .sheet-hint::after { display: none; } }
.splash { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; }
.splash p { margin: 0; color: var(--muted); font-size: 15px; }

/* --- daily score, challenge, board (Phase 4b) --------------------------------------- */
.score-block { margin: 14px 0 4px; padding: 12px; border-radius: 14px; background: var(--panel); }
.score-line { font-size: 16px; font-weight: 700; }
.score-num { font-size: 22px; color: var(--accent); }
.formula, .sides-split { font-size: 13px; margin-top: 4px; }
.sides-split:empty { display: none; }
.board-link { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 700; text-decoration: none; padding: 6px 0; }
.name-form { margin-top: 10px; display: grid; gap: 6px; font-size: 14px; }
.name-row { display: flex; gap: 8px; }
.name-row input { flex: 1; min-width: 0; font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.name-row .btn { padding: 10px 14px; }
.name-err { font-size: 12px; color: #ff8a80; min-height: 1em; }
.challenge { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: #2a1213; border: 1px solid var(--accent); color: var(--text); font-weight: 700; }
.challenge-story { margin-top: 4px; font-weight: 500; font-size: 14px; color: var(--muted); line-height: 1.35; }
.board { max-width: 560px; margin: 0 auto; padding: 18px 16px 32px; }
.board .brand h1 a { color: var(--text); text-decoration: none; }
.board .brand .back { color: var(--accent); font-weight: 700; text-decoration: none; }
.board-title { font-size: 22px; margin: 18px 0 10px; }
.board-tabs { margin-bottom: 10px; }
.board-meta { font-size: 13px; margin: 4px 0 10px; }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board-me .board-list { margin-bottom: 14px; }
.board-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel); font-variant-numeric: tabular-nums; }
.board-row.mine { box-shadow: 0 0 0 2px var(--accent) inset; }
.board-row .rank { width: 28px; text-align: right; color: var(--muted); font-weight: 800; }
.board-row .who { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row .you { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.board-row .pts { font-size: 18px; font-weight: 900; min-width: 36px; text-align: right; }
.side-badge { font-size: 11px; font-weight: 900; padding: 3px 7px; border-radius: 6px; background: var(--team); color: var(--team-text); }

/* --- brand tokens (focus, grade glyphs) ------------------------------------------------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.strip .g, .pair .g { display: inline-grid; place-items: center; color: #111; font-size: 13px; font-weight: 900; line-height: 1; }
.strip .g.red, .pair .g.red { color: #fff; }
.pair .g.unknown, .pair .g.pending, .pair .g.none, .strip .g.unknown, .strip .g.none { color: #c7c7cc; }

/* --- brand placement --------------------------------------------------------------------- */
.lockup { display: flex; align-items: center; gap: 12px; margin: 0; }
.lockup .siren { width: 34px; height: 34px; flex: 0 0 auto; }
.lockup .wordmark { font-family: 'Anton', Impact, 'Arial Narrow', sans-serif; font-weight: 400; font-size: 32px; line-height: 1; letter-spacing: 0.02em; color: #F4F1EA; }
.lockup-img { margin: 0; line-height: 0; }
.lockup-img img { height: 26px; width: auto; }
.brand .today { display: inline-flex; align-items: center; gap: 8px; }
.brand { align-items: center; }
.sb-siren { width: 28px; height: 28px; }
.sb-home { display: flex; line-height: 0; } /* home, when the app header is hidden on short phones */
.splash .siren-mark { width: 88px; height: 88px; }
.splash .siren-mark .rays { transform-origin: 48px 48px; animation: rays-pulse 1.1s ease-out 1; }
@keyframes rays-pulse { 0% { opacity: 0.2; transform: scale(0.85); } 45% { opacity: 1; transform: scale(1.12); } 100% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .splash .siren-mark .rays { animation: none; } }

/* --- win-chance panel ------------------------------------------------------------------- */
.wc-panel { margin: 10px 12px calc(var(--sheet-peek) + 12px); padding: 12px 14px; border-radius: 14px; background: var(--panel); }
.wc-panel.compact { margin: 12px 0 0; padding: 10px 12px; background: var(--panel-2); }
.wc-top { display: flex; align-items: baseline; gap: 8px; }
.wc-num { font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.wc-panel.compact .wc-num { font-size: 24px; }
.wc-label { font-size: 13px; color: var(--muted); }
.wc-chart { display: block; width: 100%; height: 84px; margin: 8px 0 6px; overflow: visible; }
.wc-panel.compact .wc-chart { height: 56px; }
.wc-chart .wc-line { fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.wc-chart .wc-mid { stroke: rgba(244, 241, 234, 0.12); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.wc-chart .wc-dot { fill: var(--accent); }
.wc-log { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); display: grid; gap: 2px; }
.wc-log li:first-child { color: var(--text); }
@media (min-width: 900px) { .wc-panel { grid-column: 1; margin: 0 24px 24px; } }
.boards-hint { font-size: 13px; margin: 6px 0 2px; }

/* --- play rows (pick-and-roll handler/screener, screen-for variant) ---------------------- */
.play-row { margin: 2px 0 6px; padding: 8px 10px; border-radius: 12px; background: var(--panel-2); }
.play-row .chips { padding-bottom: 2px; }
.mini-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 4px 0 4px; }

/* Phase 5 pages: home, board, stats, profile (ui/page.js shell). */
.page { max-width: 560px; margin: 0 auto; padding: 18px 16px 32px; display: grid; gap: 12px; }
.page-head { align-items: center; }
.lockup-link { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.page .lockup .wordmark { font-size: 28px; }
.account-chip { font-size: 13px; display: flex; gap: 10px; align-items: center; }
.account-chip a { color: var(--text); font-weight: 700; text-decoration: none; }
.card { background: var(--panel); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.card .label { margin: 0; }
.card .btn { text-align: center; text-decoration: none; display: block; color: inherit; }
.card .btn-go { color: var(--on-accent); }
.today-card .scen-title { margin: 6px 0 0; }
.today-card .today { display: flex; gap: 10px; align-items: center; }
.today-done { font-weight: 700; display: flex; gap: 8px; align-items: center; }
.streak-num { font-size: 15px; color: var(--text); }
.streak-num b { font-size: 28px; font-weight: 900; color: var(--accent); }
.board-list.mini .board-row { padding: 8px 10px; }
.archive-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 220px; overflow: auto; }
.archive-list a { color: var(--text); font-weight: 700; }
.notice { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.signin { display: grid; gap: 8px; padding: 10px 0 2px; }
.signin-lead { font-weight: 700; }
.signin-row .btn { width: 100%; background: #F4F1EA; color: #0E0F12; }
.signin-email, .league-form { display: flex; gap: 8px; }
.signin-email input, .league-form input, .name-row input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; }
.signin-msg, .league-msg { font-size: 13px; min-height: 1em; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-grid div { background: var(--panel-2); border-radius: 10px; padding: 10px; display: grid; gap: 2px; }
.stat-grid b { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat-grid span { font-size: 11px; color: var(--muted); }
.strip { display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; }
.strip .sq { aspect-ratio: 1; border-radius: 2px; background: var(--line); }
.strip .sq.green { background: var(--green); } .strip .sq.yellow { background: var(--yellow); }
.strip .sq.orange { background: var(--orange); } .strip .sq.red { background: var(--red); }
.awards { display: flex; flex-wrap: wrap; gap: 6px; }
.award { font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: #3a2d0a; color: #ffe38a; }
.end-awards { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.end-awards .label { margin: 0; }
.board-tabs { display: flex; flex-wrap: wrap; }
.league-bar { display: grid; gap: 8px; margin-bottom: 8px; }
.league-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.league-invite code { font-size: 12px; word-break: break-all; }
.board-row .who a { color: var(--text); }
.profile-edit summary { cursor: pointer; margin-top: 12px; }
@media (max-width: 380px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

/* Call sheet (round 3): nothing scrolls sideways. Actions and schemes are a two-column
   grid of pills; every other row wraps; the five players share one row. */
.sheet-body .chips { flex-wrap: wrap; overflow-x: visible; }
.sheet-body .chips.actions, .sheet-body .chips.schemes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sheet-body .chips.actions .chip, .sheet-body .chips.schemes .chip { padding: 9px 8px; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.sheet-body .chip.rare::after { content: " \00b7 rare"; }
.sheet-body .players-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.sheet-body .players-row .pchip { position: relative; flex-direction: column; justify-content: center; gap: 1px; padding: 5px 2px 4px; border-radius: 12px; font-size: 12px; min-width: 0; }
.sheet-body .players-row .pchip .pct { min-width: 0; font-size: 11px; }
.sheet-body .players-row .pchip .info { position: absolute; top: 0; right: 0; padding: 3px 4px; font-size: 12px; }

/* Slim app header on every screen (ui/page.js appHeader). */
:root { --hdr-h: 40px; }
.app-header { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.app-bar { height: calc(var(--hdr-h) - 1px); /* + the 1px border = --hdr-h */ display: flex; align-items: center; gap: 10px; padding: 0 12px; max-width: 1200px; margin: 0 auto; }
.app-home { display: flex; line-height: 0; padding: 4px; margin-left: -4px; }
.app-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-account { font-size: 13px; }
.app-account a { color: var(--text); font-weight: 700; text-decoration: none; }
.app-signin:not(:empty) { padding: 0 16px 10px; max-width: 560px; margin: 0 auto; }
.game { min-height: calc(100dvh - var(--hdr-h)); }
.back-home { color: var(--accent); font-weight: 700; text-decoration: none; font-size: 14px; }
.signout-row { justify-content: flex-end; }
.share-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.share-row .home-btn { display: flex; align-items: center; text-decoration: none; color: inherit; padding: 0 22px; }
@media (min-width: 900px) { .game { min-height: calc(100vh - var(--hdr-h)); } }

/* Home attract mode (ui/attract.js) and the finished-today strip. */
.today-visual:empty { display: none; }
.attract { position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; margin: -2px -2px 4px; }
.attract canvas { display: block; width: 100%; }
.attract-sb { position: absolute; left: 8px; top: 8px; display: flex; gap: 10px; padding: 4px 9px; border-radius: 9px; background: rgba(0,0,0,0.72); font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; }
.attract-tap { position: absolute; right: 8px; bottom: 8px; padding: 5px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 800; pointer-events: none; }
.grade-strip { display: flex; flex-wrap: wrap; gap: 3px; }
.grade-strip .sq { width: 16px; height: 16px; border-radius: 3px; background: var(--line); }
.grade-strip .sq.green { background: var(--green); } .grade-strip .sq.yellow { background: var(--yellow); }
.grade-strip .sq.orange { background: var(--orange); } .grade-strip .sq.red { background: var(--red); }
/* Short phones (iPhone SE class): tighter pills so the action grid fits the half sheet. */
@media (max-height: 720px) {
  .sheet-body .chips.actions, .sheet-body .chips.schemes { gap: 5px; }
  .sheet-body .chips.actions .chip, .sheet-body .chips.schemes .chip { padding: 6px 6px; font-size: 13px; }
  .sheet-body .label { margin: 4px 0 4px; }
}
/* Short phones: the game screen gives the header's height back to the court (the
   scoreboard keeps the siren). Every other screen keeps the header. */
@media (max-height: 699px) {
  .on-game .app-header { display: none; }
  .on-game .game { min-height: 100dvh; }
}

/* Home round 2. Lighter dark palette for home, board, stats, profiles and the end card
   (html.theme-lift); the game screen keeps its own court and scoreboard. Contrast on
   cards: text 11.9:1, secondary 6.4:1, labels >= 5.2:1. */
html.theme-lift { --bg: #121419; --panel: #1A1D24; --panel-2: #222631; --line: #262A33; --text: #D6D9E0; --muted: #9AA0AB; }
html.theme-lift .card { border: 1px solid #262A33; }
html.theme-lift .label { color: #9AA0AB; }
.brand-header .app-bar { height: 56px; }
.brand-header .lockup { gap: 10px; text-decoration: none; }
.brand-header .lockup .wordmark { font-size: 30px; }
.home-tagline { margin: 2px 0 0; font-size: 15px; line-height: 1.3; color: #F4F1EA; }
.today-card .today { display: flex; gap: 10px; align-items: center; }
.today-card .scen-title { margin: 2px 0 0; font-size: 21px; }
.today-card .teams-line { font-size: 13px; }
.today-card .attract { aspect-ratio: 16 / 10; margin: 4px 0 0; }
.today-card .attract canvas { position: absolute; left: 0; top: 0; }
.today-card .one-to-beat { font-size: 12px; }
.home-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.home-pair > div { min-width: 0; display: grid; gap: 6px; align-content: start; }
.home-pair .streak-num b { font-size: 26px; }
.home-pair .board-list.mini { gap: 4px; }
.home-pair .board-row { padding: 6px 8px; gap: 6px; font-size: 13px; }
.home-pair .board-row .rank { width: 16px; }
.home-pair .board-row .pts { font-size: 15px; min-width: 24px; }
.home-pair .board-row .side-badge { display: none; }
.home-signin:empty { display: none; }
@media (max-width: 359px) { .home-pair { grid-template-columns: 1fr; } }
/* The page column never grows past the viewport (a wide child used to push it sideways at 340 px). */
.page { grid-template-columns: minmax(0, 1fr); }
.page > * { min-width: 0; }
.attract canvas { max-width: 100%; }
.card { grid-template-columns: minmax(0, 1fr); }
.home-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 359px) { .home-pair { grid-template-columns: minmax(0, 1fr); } }
.signin { grid-template-columns: minmax(0, 1fr); }

/* Play cards (Plays chip) and nudges. */
.plays-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 6px 0; }
.plays-grid[hidden] { display: none; }
.play-card { position: relative; display: grid; gap: 2px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); text-align: left; }
.play-card[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.play-diagram { width: 100%; height: auto; display: block; color: #F4F1EA; }
.play-diagram .dg-line { fill: none; stroke: rgba(244,241,234,0.35); stroke-width: 0.35; }
.play-diagram .dg-rim { fill: none; stroke: var(--accent); stroke-width: 0.4; }
.play-diagram .dg-move { fill: none; stroke: #F4F1EA; stroke-width: 0.45; }
.play-diagram .dg-pass { fill: none; stroke: #F0C419; stroke-width: 0.45; stroke-dasharray: 1.2 0.9; color: #F0C419; }
.play-diagram .dg-screen { stroke: #F4F1EA; stroke-width: 0.9; stroke-linecap: round; }
.play-diagram text { font: 800 1.9px system-ui, sans-serif; text-anchor: middle; }
.play-diagram .dg-primary circle { stroke: #F0C419; stroke-width: 0.45; }
.pc-label { font-size: 13px; font-weight: 800; }
.pc-for { font-size: 12px; }
.chip.nudge, .play-card.nudge { position: relative; }
.chip.nudge::before, .play-card.nudge::before { content: ""; position: absolute; top: 4px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.nudge-line:empty { display: none; }
.nudge-line { font-size: 13px; margin: 2px 0 4px; }
.sb-arena { font-size: 9px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }

/* Scoreboard (round 4): three fixed columns, nothing runs off at 340 px. */
.scoreboard { grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr); gap: 4px; padding: 5px 8px; }
.sb-team { gap: 5px; min-width: 0; }
.sb-chip { min-width: 0; width: 40px; flex: 0 0 40px; padding: 3px 0; font-size: 13px; }
.sb-score { flex: 0 0 3ch; width: 3ch; text-align: center; font-size: 23px; }
.sb-meta { min-width: 0; white-space: nowrap; font-size: 10px; }
.sb-fs { display: none; }
.sb-bonus { font-size: 9px; padding: 0 3px; }
.sb-mid { min-width: 0; }
.sb-mid .sb-home { display: flex; align-items: center; gap: 3px; text-decoration: none; line-height: 1; }
.sb-mid .sb-siren { width: 14px; height: 14px; }
.sb-word { font-family: 'Anton', Impact, 'Arial Narrow', sans-serif; font-size: 12px; letter-spacing: 0.05em; color: #F4F1EA; }
.sb-clock { font-size: 22px; line-height: 1.05; }
.sb-sub { gap: 3px; white-space: nowrap; }
.sb-dot { color: var(--muted); }
.sb-poss { font-size: 11px; }
@media (max-width: 420px) { .sb-fl { display: none; } .sb-fs { display: inline; } }
/* Call sheet, two steps (choose the call; finish it). Step 2 and the result card raise
   the sheet to 60% and crop the court to the frontcourt (scaled to fit above it); Go sits
   at the end of the step-2 content, which fits without scrolling. */
.court-wrap { transition: height 0.22s ease; }
.court-wrap canvas { transition: transform 0.22s ease; }
.court-wrap.front { height: var(--court-h); overflow: hidden; }
.court-wrap.front canvas { transform: scale(var(--court-k, 1)); transform-origin: 50% 0; margin: 0 auto; }
.go-bar { margin-top: 6px; }
.go-bar .confirm { margin-top: 0; }
.go-bar .btn-go { margin-top: 0; }
.subrows:empty { display: none; }
.subrows .play-row { margin: 0 0 6px; }
.foul-target[hidden] { display: none; }
.pace-box { margin: 0 0 6px; }
.pace-box .chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pace-box .chip { text-align: center; padding: 7px 6px; }
.pace-note:empty { display: none; }
.pace-note { font-size: 12px; margin-top: 3px; }
.sheet-body .chip.off, .sheet-body .chip:disabled { opacity: 0.4; cursor: not-allowed; }
.sheet-body .chips.goals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 4px; }
.sheet-body .chips.goals .chip { padding: 7px 6px; text-align: center; }
/* Content past the sheet's bottom edge (rare): a small hint. */
.sheet.more::after { content: '▾ more'; position: absolute; left: 50%; bottom: calc(6px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  padding: 2px 10px; border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 11px; font-weight: 700; pointer-events: none; }
.step[hidden] { display: none; }
.step-head { display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; }
.step-back { border: 0; background: var(--panel-2); color: var(--text); width: 34px; height: 34px; border-radius: 10px; font-size: 24px; line-height: 1; padding: 0 0 3px; }
.step-title { font-size: 17px; font-weight: 800; }
.step2 .players-row { gap: 6px; margin-bottom: 6px; }
.step2 .players-row .pchip { padding: 8px 2px 6px; gap: 3px; border-radius: 14px; font-size: 13px; }
.step2 .players-row .pchip .pct { font-size: 13px; font-weight: 800; color: var(--text); }
.step2 .players-row[hidden] { display: none; }
.step2 .pick-hint:empty, .step1 .rebound-hint:empty, .step1 .inbound-hint:empty, .step1 .scheme-hint:empty, .step2 .foul-hint:empty, .step2 .boards-hint:empty { display: none; }
.step2 .pick-hint, .step1 .rebound-hint, .step1 .inbound-hint, .step1 .scheme-hint, .step2 .foul-hint { font-size: 13px; margin: 2px 0 6px; }
.step2 .play-row { margin: 0 0 6px; }
.step2 .timing-box .chips { margin-bottom: 4px; }
.step2 .toggle.boards { margin: 4px 0; }
.btn-go { display: grid; justify-items: center; gap: 1px; margin-top: 4px; }
.go-sub { font-size: 12px; font-weight: 600; opacity: 0.9; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.go-sub:empty { display: none; }
/* The win-chance panel in the sheet's peek area while a play runs. */
.sheet-top { flex: 0 0 auto; height: 124px; overflow: hidden; padding: 8px 14px 0; }
.sheet-top[hidden] { display: none; }
.sheet-top .wc-panel { margin: 0; }
/* Short phones: smaller cards before anything scrolls. */
@media (max-height: 720px) {
  .step2 .players-row .pchip { padding: 5px 2px 4px; }
  .step-head { margin-bottom: 4px; }
  .step-back { width: 30px; height: 30px; }
}

.sheet-top .wc-panel.compact { margin: 0; padding: 6px 10px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; }
.sheet-top .wc-top { grid-row: 1 / 3; align-self: center; display: grid; }
.sheet-top .wc-chart { width: 100%; height: 52px; }
.sheet-top .wc-log { margin: 2px 0 0; padding: 0; list-style: none; font-size: 11px; line-height: 1.3; max-height: 30px; overflow: hidden; }
.badge.provisional { background: #24324a; color: #b9d3ff; }

/* Intro: the hook (one sentence, when the scenario has one), then the setup (meta.blurb) collapsed. */
.hook { margin: 2px 0 6px; font-size: 15px; line-height: 1.4; }
/* Home shelf: CLASSICS and ARCHIVE side by side under the daily card. */
.home-shelf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 12px 0; }
.shelf-card { display: grid; gap: 4px; text-decoration: none; color: inherit; margin: 0; }
.shelf-card .label { margin: 0; }
.shelf-line { font-weight: 800; font-size: 16px; line-height: 1.25; }
.shelf-cta { color: var(--accent); font-weight: 800; font-size: 14px; }
/* Header links (every page) and the shelf pages. */
.app-nav { display: flex; gap: 12px; font-size: 13px; font-weight: 700; margin-left: auto; }
.app-nav a { color: var(--text); text-decoration: none; opacity: 0.85; }
.app-nav a:hover { opacity: 1; text-decoration: underline; }
.app-title + .app-nav { margin-left: 0; }
.shelf-title { font-size: 26px; margin: 8px 0 2px; }
.shelf-sub { margin: 0 0 14px; }
.classic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.classic-card { display: grid; gap: 6px; align-content: start; margin: 0; }
.classic-year { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--muted); }
.classic-title { font-size: 19px; font-weight: 900; line-height: 1.2; }
.classic-hook { margin: 2px 0 6px; font-size: 14px; line-height: 1.4; }
.archive-list.full { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; max-height: none; overflow: visible; }
.archive-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--panel); border-radius: 12px; }
.archive-play { display: grid; gap: 2px; min-width: 0; text-decoration: none; color: inherit; }
.archive-date { font-size: 12px; font-weight: 800; color: var(--muted); }
.archive-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive-you { flex: none; font-size: 14px; }
/* Intro: who did not play, under the lineups. */
.out-note { margin: 8px 2px 0; font-size: 13px; line-height: 1.4; }
.badge.classic { background: var(--panel); color: var(--accent); border: 1px solid var(--accent); }
.blurb { margin: 2px 0 8px; font-size: 13px; color: var(--muted); }
.blurb summary { cursor: pointer; color: var(--accent); font-weight: 700; list-style: none; }
.blurb summary::-webkit-details-marker { display: none; }
.blurb summary::after { content: " \25BE"; }
.blurb[open] summary::after { content: " \25B4"; }
.blurb p { margin: 6px 0 0; line-height: 1.4; color: var(--text); }

/* End card top: score, sign-in prompt (signed out), result story, Share; fits a phone without scrolling. */
.end .scen-title { margin-top: 6px; font-size: 18px; }
.end-hero { display: grid; gap: 8px; margin: 6px 0 14px; }
.end-hero .story { margin: 0; }
.hero-score .score-line { font-size: 17px; }
.hero-score .score-num { font-size: 30px; font-weight: 900; margin-right: 4px; }
.hero-save:empty { display: none; }
.save-signin { justify-self: start; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.real-outcome { margin-top: 6px; font-size: 13px; line-height: 1.35; color: var(--text); }
.ot-card .final-line { color: var(--text); font-size: 20px; letter-spacing: 0.04em; }

/* Home: header streak and pill, mode rail tabs, today's card, classics and archive tabs. */
.hdr-streak { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 15px; color: var(--accent); }
.hdr-streak b { color: var(--text); font-weight: 900; }
.hdr-streak + .app-account { margin-left: 4px; }
.home-page { padding-top: 10px; gap: 10px; }
.home-page .home-tagline { margin: 0; font-size: 14px; }
.mode-rail { position: sticky; top: 57px; z-index: 15; display: flex; padding: 4px; gap: 4px; border-radius: 999px; background: #0B0D11; border: 1px solid #262A33; }
.mode-rail a { flex: 1; text-align: center; padding: 7px 0; border-radius: 999px; font-size: 14px; font-weight: 800; color: var(--muted); text-decoration: none; }
.mode-rail a.on { background: var(--accent); color: #fff; }
.home-page .today-card { gap: 6px; }
.home-page .today-card .hook { margin: 0; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-page .today-card .blurb { margin: 0; }
.today-done { font-size: 13px; }
.score-chip { display: inline-block; min-width: 30px; padding: 2px 7px; border-radius: 8px; text-align: center; font-weight: 900; color: #111; }
.score-chip.green { background: var(--green); } .score-chip.yellow { background: var(--yellow); }
.score-chip.orange { background: var(--orange); } .score-chip.red { background: var(--red); color: #fff; }
.tab-panel { display: grid; gap: 10px; }
.tab-panel[hidden] { display: none; }
.tab-panel > .label { margin: 2px 0 0; }
/* Header pill: the name (your stats) or "Sign in". */
.acct-pill { display: inline-block; max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
  background: var(--accent); color: #fff !important; border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 800; line-height: 1.2; text-decoration: none; cursor: pointer; }
/* Featured players: overlapping headshots. */
.hs-pair { display: inline-flex; flex: none; }
.hs-pair .hs { box-shadow: 0 0 0 2px var(--panel); }
.hs-pair .hs + .hs { margin-left: -8px; }
.featuring { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; }
.featuring b { color: var(--text); font-weight: 800; }
.home-page .today-card .blurb p { margin: 4px 0 0; font-size: 13px; line-height: 1.4; }
/* Today's top three under Play. */
.mini-board { display: grid; gap: 4px; }
.mb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mb-row { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 8px; font-size: 14px; font-variant-numeric: tabular-nums; }
.mb-row.mine { box-shadow: 0 0 0 2px var(--accent) inset; }
.mb-row .rank { width: 18px; text-align: right; color: var(--muted); font-weight: 800; }
.mb-row .who { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-row .you { font-size: 10px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.mb-row .pts { font-weight: 900; min-width: 28px; text-align: right; }
.mb-gap { text-align: center; color: var(--muted); font-size: 11px; line-height: 0.8; }
.mb-empty { font-size: 13px; padding: 2px 8px; }
.mb-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; padding: 0 2px; }
/* Classics tab: full-width cards. */
.classic-list { display: grid; gap: 10px; }
.classic-card { gap: 8px; }
.cc-top { display: flex; align-items: center; gap: 10px; }
.cc-meta { font-size: 12px; font-weight: 700; }
.cc-title { font-size: 18px; font-weight: 900; line-height: 1.2; }
.cc-hook { margin: 0; font-size: 14px; line-height: 1.4; }
/* Archive tab: the same card, shorter (one headshot, matchup, hook, your score). */
.arch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.arch-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: inherit; }
.arch-main { display: grid; gap: 3px; min-width: 0; flex: 1; }
.arch-head { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arch-date { font-weight: 600; font-size: 12px; }
.arch-hook { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arch-card .row-cta, .arch-card .score-chip { flex: none; }
.row-cta { color: var(--accent); font-weight: 800; font-size: 13px; }
.home-links { justify-content: center; flex-wrap: wrap; }
/* Short phones (375 x 667): a flatter court so Play stays on the first screen. */
@media (max-height: 700px) { .home-page .today-card .attract { aspect-ratio: 16 / 8.5; } .home-page .today-card .hook { -webkit-line-clamp: 1; } }
/* End card: the board-name prompt and the link out to the real footage. */
.hero-name:empty { display: none; }
.name-pick { margin-top: 0; }
.name-pick label { font-weight: 800; }
.name-pick .btn-go { width: auto; display: block; margin: 0; font-size: 16px; padding: 10px 18px; }
.end-actions .watch-real { text-align: center; text-decoration: none; }
/* Step 2, compact so the whole step fits the 60% sheet (375 x 667 included): small player
   cards, one-line pace and rebounding rows, three-chip handler and screener rows. */
.step2 .players-row .pchip { padding: 5px 2px 4px; gap: 1px; font-size: 11px; }
.step2 .players-row .pchip .hs { --hs: 28px !important; }
.step2 .players-row .pchip .num { display: none; }
.step2 .players-row .pchip .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.step2 .players-row .pchip .pct { font-size: 13px; }
.step2 .step-head { margin: 0 0 6px; }
.step2 .step-back { width: 30px; height: 30px; font-size: 22px; }
.step2 .step-title { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pace-box { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; column-gap: 6px; }
.pace-box .mini-label, .boards-row .mini-label, .pnr-row .mini-label { margin: 0; }
.pace-box .pace-note { grid-column: 1 / -1; }
.pace-box .chip { padding: 6px 4px; font-size: 14px; }
.pnr-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 4px 6px; padding: 0 !important; background: none !important; }
.pnr-row .chips { flex-wrap: nowrap !important; overflow: hidden; gap: 5px; }
.pnr-row .chip { padding: 6px 10px; font-size: 14px; white-space: nowrap; }
.boards-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 6px; }
.boards-row .mini-label { width: 52px; }
.boards-row .toggle button { padding: 6px 10px; font-size: 13px; }
.boards-row .boards-hint { font-size: 12px; margin: 0; }
.step2 .chips.fouls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 4px; }
.step2 .chips.fouls .chip { padding: 7px 6px; font-size: 13px; text-align: center; line-height: 1.2; }
.step2 .foul-hint { font-size: 12px; margin: 0 0 6px; }
.step2 .pick-hint[hidden] { display: none; }
.step2 .go-bar .btn-go { padding: 9px 12px; font-size: 17px; }
@media (max-height: 700px) {
  .step2 .players-row .pchip .hs { --hs: 24px !important; }
  .step2 .go-bar .btn-go { padding: 7px 12px; }
}
.step2 .chips.fouls .chip { white-space: normal; }
.step2 .chips.fouls .chip .cost { display: block; font-size: 11px; margin-top: 1px; }
.step2 .chips.fouls .chip { padding: 5px 6px; font-size: 12.5px; }
.step2 .def-nudge { font-size: 12px; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step2 .def-nudge:empty { display: none; }
/* Boards: gray coach markers (never ranked) and late plays. */
.board-row.marker, .mb-row.marker { background: transparent; border: 1px dashed #3a3f4a; color: var(--muted); }
.board-row.marker .who, .mb-row.marker .who { font-weight: 600; color: var(--muted); }
.board-row.marker .pts, .mb-row.marker .pts { color: var(--muted); }
.board-row .late, .mb-row .late { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; }
/* Archive cards: the card plays the game; your score chip opens that day's board. */
.arch-card .arch-play { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.arch-card .arch-play .row-cta { flex: none; }
a.score-chip { text-decoration: none; }
/* Daily tab: the first two classics and the last three past dailies under today's game. */
.daily-more { display: grid; gap: 8px; margin-top: 6px; }
