/* Design tokens — the light :root palette + the :root[data-theme="dark"] override.
   Linked FIRST in index.html (ahead of styles.css) so every stylesheet consumes
   these custom properties. Tokens only: no selectors beyond :root. See docs/theme.md. */
:root {
  color-scheme: light;
  --bg: #fbf6f3;
  --bg-top: #ffffff;
  --bg-bottom: #f5e9e4;
  --ink: #1d1a1a;
  --text: var(--ink);
  --muted: #6b6461;
  --line: #ece2dd;
  --border: var(--line);
  --panel: #ffffff;
  --surface: #ffffff;
  --surface-sunken: #f4efec;
  --accent: #d71920;
  --accent-strong: #a3141a;
  --warn: #b7791f;
  --active: #facc15;
  --active-soft: #fef3c7;
  --x: #1e63d6;
  --o: #c43d5d;
  --ring: rgba(31, 122, 95, 0.16);
  --scrim: rgba(23, 32, 51, 0.54);
  --shadow: rgba(23, 32, 51, 0.28);
  --secondary-bg: #f6efeb;
  --secondary-border: #e8dbd4;
  --danger-bg: #fff1f2;
  --danger-border: #fecdd3;
  --danger-ink: #9f1239;
  --notice-bg: #fff7d6;
  --notice-border: #f0d17a;
  --notice-ink: #4b3710;
  --notice-sub: #6b551c;
  --pill-bg: #172033;
  --on-pill: #ffffff;
  /* Shape + depth scale (2026-11 refresh): rounder cards, soft layered shadows. */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(60, 30, 20, 0.06), 0 1px 3px rgba(60, 30, 20, 0.05);
  --shadow-md: 0 8px 24px rgba(60, 30, 20, 0.10), 0 2px 6px rgba(60, 30, 20, 0.06);
  --font-ui: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Dark theme — re-points the themed tokens. The shell is token-driven, so this
   one block flips most of the chrome; the remaining translucent/gradient sites
   get small additive overrides below (search "data-theme"). See docs/theme.md. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14181f;
  --bg-top: #1b212c;
  --bg-bottom: #0e1117;
  --ink: #e8eaef;
  --muted: #9aa3b2;
  --line: #2c3340;
  --panel: #1b212b;
  --surface: #232b38;
  --surface-sunken: #161b24;
  --accent: #ef4d52;
  --accent-strong: #ff8d90;
  --warn: #e0a83a;
  --active-soft: #3a3320;
  --x: #5b9bff;
  --o: #e889a0;
  --ring: rgba(120, 200, 170, 0.22);
  --scrim: rgba(0, 0, 0, 0.62);
  --shadow: rgba(0, 0, 0, 0.5);
  --secondary-bg: #252c38;
  --secondary-border: #343d4d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.45);
  --danger-bg: #3a1d22;
  --danger-border: #6e2f37;
  --danger-ink: #ff8d9c;
  --notice-bg: #2c2613;
  --notice-border: #6a5a26;
  --notice-ink: #f1dca2;
  --notice-sub: #d4c089;
  --pill-bg: #2b3546;
  /* dark defaults for the JS-set turn tokens (light fallbacks would glow) */
  --turn-soft: #213039;
  --turn-soft-strong: #25404a;
  --turn-text: var(--accent-strong);
  --turn-glow: rgba(120, 200, 170, 0.30);
}
