/* Design tokens, redesign of 23 Nov 2026 (Claude Design board "Mr Baize redesign").
   Two themes: light (default, r29 redesign: ground #F6F8F5, white cards, ink, baize green as the only accent) and dark (same tokens in dark values). No gold, no dark plates, no condensed caps. The theme is set on
   <html data-theme="light|dark"> by /src/shell/theme-boot.js before first paint (Light, Dark or System in Me).
   The old token names (--ink-*, --ivory, --muted, --faint, --gold...) stay as aliases so every module follows the theme. */
@import url('/fonts/fonts.css'); /* self-hosted Plus Jakarta Sans (OFL) */
:root {
  /* ---- light (default) ---- */
  --bg: #F6F8F5;
  --surface: #FFFFFF;
  --surface-2: #EEF2EE;
  --surface-3: #E6F1EA;
  --input: #FFFFFF;
  --text: #14201A;
  --text-2: #4A5750;
  --text-3: #4A5750;
  --line: #DDE3DD;
  --line-2: #CFE4D8;
  --line-3: #A9B6AE;
  --brand: #0E6B43;          /* baize: main buttons, active nav, links */
  --brand-hi: #0A5535;
  --brand-soft: #E6F1EA;     /* active tab pill, selected rows */
  --brand-text: #0E6B43;
  --on-brand: #FFFFFF;
  --baize-deep: #E6F1EA;     /* soft green band (was the dark hero band) */
  --on-baize: #14201A;
  --gold-fill: #0E6B43;      /* r29: no gold. Old gold slots are baize green now */
  --gold-ink: #FFFFFF;
  --gold-text: #0E6B43;
  --brass: #CFE4D8;
  --plate: #FFFFFF;
  --on-plate: #14201A;
  --danger: #B0301C;
  --danger-soft: rgba(176, 48, 28, 0.08);
  --ok: #17784A;
  --shadow: 0 1px 2px rgba(20, 32, 26, 0.06), 0 6px 18px rgba(20, 32, 26, 0.06);
  --shadow-lg: 0 20px 50px rgba(18, 23, 20, 0.16);
  --scrim: rgba(12, 16, 14, 0.5);
  --nav-bg: #FFFFFF;
  --top-bg: rgba(246, 248, 245, 0.94);
  color-scheme: light;

  /* ---- shared ---- */
  --font-num: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --tap: 48px;
  /* ONE BUTTON SCALE (build 7). Small / default / large: heights, side padding, radius, type size; one stroke. The site's .btn, .linkbtn
     and chips read these, and the game's own :root (prototype/index.html) carries the same numbers. A control is never under 44px. */
  --btn-h-s: 44px; --btn-h: 48px; --btn-h-l: 56px;
  --btn-px-s: 16px; --btn-px: 20px; --btn-px-l: 26px;
  --btn-r-s: 12px; --btn-r: 14px; --btn-r-l: 16px;
  --btn-fs-s: 15px; --btn-fs: 17px; --btn-fs-l: 18px;
  --btn-stroke: 1.5px; --btn-gap: 8px;
  --r-s: 12px; --r-m: 14px; --r-l: 16px; --r-xl: 20px; --r-pill: 999px;
  /* game sizing tokens (the game reads these from its own file; kept for shared components) */
  --s: 1; --sm: 1; --aw: 844px; --ah: 390px; --u: calc(1px * var(--s)); --um: calc(1px * var(--sm));

  /* ---- old names, now theme aware ---- */
  --ink-0: var(--bg); --ink-1: var(--input); --ink-2: var(--surface); --ink-3: var(--surface); --ink-4: var(--surface-2);
  --ivory: var(--text); --muted: var(--text-2); --faint: var(--text-3);
  --wash: color-mix(in srgb, var(--text) 5%, transparent);
  --hud: var(--surface); --hud-hi: var(--surface);
  --line-gold: var(--line-2);
  --gold: var(--gold-text); --gold-hi: var(--gold-text); --gold-lo: var(--brand);
  --gold-grad: var(--gold-fill); --gold-rim: var(--brass);
  --baize: var(--brand);
  --foul: var(--danger); --foul-hi: var(--danger); --foul-text: var(--danger);
}
:root[data-theme="dark"] {
  --bg: #0E1511;
  --surface: #151E19;
  --surface-2: #1B2B22;
  --surface-3: #1B2B22;
  --input: #151E19;
  --text: #EEF3EF;
  --text-2: #A9B6AE;
  --text-3: #A9B6AE;
  --line: #2A3830;
  --line-2: #264033;
  --line-3: #3A4F44;
  --brand: #3FB57F;
  --brand-hi: #58C595;
  --brand-soft: #1B2B22;
  --brand-text: #58C595;
  --on-brand: #08140E;
  --on-baize: #EEF3EF;
  --baize-deep: #1B2B22;
  --gold-fill: #3FB57F;
  --gold-ink: #08140E;
  --gold-text: #58C595;
  --brass: #264033;
  --plate: #151E19;
  --on-plate: #EEF3EF;
  --danger: #EF7A62;
  --danger-soft: rgba(239, 122, 98, 0.1);
  --ok: #6FD19C;
  --shadow: 0 0 0 1px var(--line);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --scrim: rgba(0, 0, 0, 0.62);
  --nav-bg: #151E19;
  --top-bg: rgba(14, 21, 17, 0.94);
  color-scheme: dark;
}
html { background: var(--bg); color: var(--text); }
body { margin: 0; font-family: var(--font-ui); font-size: 17px; line-height: 1.5; font-variant-numeric: tabular-nums; background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
a { color: var(--brand-text); }
:focus-visible { outline: 3px solid var(--brand-text); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rankBall { display: inline-block; width: 0.8em; height: 0.8em; border-radius: 50%; vertical-align: -0.08em;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,0.6), rgba(255,255,255,0) 46%), var(--c, #c8102e); box-shadow: inset 0 -0.12em 0.18em rgba(0,0,0,0.35); }
.rankBall.k { box-shadow: inset 0 -0.12em 0.18em rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.35); }
