/* Grey is the default; colour comes from rarities and the item art. */
:root {
  color-scheme: dark;
  --panel-shadow: rgb(0 0 0 / .4);
  --bg: #17171a; --header: #111113; --surface: #1f1f23; --surface-2: #29292e; --line: #2e2e34; --line-strong: #44444c;
  --text: #fafafa; --text-2: #d0d0d0; --text-3: #bcbcbc;
  --link: #ffc87c; --link-hover: #ffdfb0;
  --accent: #ffc87c; --accent-hover: #ffd89e; --accent-ink: #1a1206;      /* Glow premium gold (#ffc87c): brand, active indicator, primary actions */
  --accent-soft: rgb(255 200 124 / .12); --accent-line: rgb(255 200 124 / .35);
  --signal: #f85149;                             /* LIVE, LEAVES TODAY */
  --ok: #3fb950; --warn: #d29922; --down: #f85149;
  --new: #f7df3a; --new-ink: #14110a;          /* game-style NEW tag */
  /* Rarities: tile background tint and rarity badges */
  --r-common: #9aa0a6; --r-uncommon: #5fa83a; --r-rare: #3a8fd6; --r-epic: #9b51c9; --r-legendary: #d9822b;
  --r-mythic: #d8b13a; --r-exotic: #49c6d6; --r-marvel: #c53030; --r-dc: #2b5fd9; --r-icon: #2fb8b0;
  --r-gaming: #5a3fc0; --r-starwars: #1f3a68; --r-dark: #b03a8e; --r-frozen: #8fc6e8; --r-lava: #d65a2a;
  --r-shadow: #3b3b45; --r-slurp: #2fc9b8; --r-golden: #e5b83b; --r-crew: #8c52ff;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --s9: 96px;
  --section-gap: clamp(56px, 7vw, 88px);         /* air between page sections: the only "divider" we need */
  --radius-sm: 4px; --radius: 6px; --radius-md: 8px; --radius-2: 12px; --radius-lg: 16px; --radius-xl: 20px; --radius-pill: 999px;
  /* Type scale: 12 / 13 / 15 / 17 / 20 / 26 / 34 / 48 */
  --fs-xs: 12px; --fs-sm: 13px; --fs-base: 15px; --fs-md: 17px; --fs-lg: 20px; --fs-xl: 26px; --fs-2xl: 34px; --fs-3xl: clamp(36px, 4.6vw, 52px);
  --font-script: system-ui;
  --font-ui: "Sofia Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, var(--font-script), sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: "Glow Display", var(--font-ui);  /* Anton 400 only: never bold it */
  --maxw: 1280px;
  --row: 36px;
  --tile-unit: 176px;
  --ease: 120ms ease-out;
}

:root[data-theme="dark"] {
  --panel-shadow: rgb(0 0 0 / .5);
  --bg: #000; --header: #000; --surface: #111113; --surface-2: #1d1d21; --line: #222226; --line-strong: #36363d;
  --text: #f5f5f7; --text-2: #a1a1aa; --text-3: #85858f;
}
:root[data-theme="light"] {
  --panel-shadow: rgb(30 40 55 / .14);
  color-scheme: light;
  --bg: #f8f9fb; --header: #fff; --surface: #fff; --surface-2: #e9edf2; --line: #dce1e8; --line-strong: #aab3bf;
  --text: #191d24; --text-2: #4c5665; --text-3: #626d7d;
  --link: #8a4f00; --link-hover: #5e3600; --accent: #b86e00; --accent-hover: #975900; --accent-ink: #fff;
  --accent-soft: rgb(184 110 0 / .1); --accent-line: rgb(184 110 0 / .35);
  --signal: #b42318; --ok: #167038; --warn: #865a00; --down: #b42318;
}

/* Per-script fallback fonts (§2.4); the Noto files themselves are loaded in F2.1. */
:root:lang(ar) { --font-script: "Noto Sans Arabic"; }
:root:lang(ja) { --font-script: "Noto Sans JP"; }
:root:lang(ko) { --font-script: "Noto Sans KR"; }
:root:lang(th) { --font-script: "Noto Sans Thai"; }
:root:lang(zh-Hans) { --font-script: "Noto Sans SC"; }
:root:lang(zh-Hant) { --font-script: "Noto Sans TC"; }
:root:lang(vi) { --font-script: "Noto Sans"; }
