/* Design tokens. Components use these, never raw colors. Values: visual spec section 3. */
:root {
  --font-head: 'Fraunces', Georgia, serif;
  --font-ui: 'IBM Plex Sans', system-ui, sans-serif;
  --font-hand: 'Caveat', cursive;

  --wood: #4a3122;
  --wood-dark: #2c1c12;
  --wood-frame: #7a5434;
  --paper: #f3ead4;
  --paper-rule: #c9b48c;
  --paper-track: #e2d4b4;
  --ink: #2e2216;
  --ink-muted: #6a5338;
  --cream: #f6ead2;
  --cream-muted: #d9c7a4;
  --brass: #f3d998;
  --brass-2: #e8c77a;
  --brass-edge: #b08a2e;
  --moss: #4f6b3a;
  --moss-text: #fff7ea;
  --brick: #a8432f;
  --attention: #d6b24a;
  --attention-bg: #f4e7b8;
  --reel: #e8c25a;
  --chalk-bg: #2c3a33;
  --tackle: #2f5a4a;
  --xp: #b9d27a;
  --water-deep: #173a44;
  --ring: #f6d77a;
  --focus: #f6d77a;
  --ink-hand: #4a3a26;
  --tab-edge: #7a5a3a;
  --moss-sub: #e2ecd2;
  --icon-brass: #8a6a1e;
  --icon-bait: #a0603a;
  --icon-gray: #6a6a6a;
  --icon-dark: #4a4a4a;
  --wall: #3a2618;
  --plaque: #6a4a30;
  --plaque-dark: #4a3020;
  --plaque-light: #8a6440;
  --brass-shadow: #5a4010;
  --wall-muted: #a8977a;
  --wall-text: #cbb998;
  --wall-mark: #8a6a4a;
  --full-ink: #6a4f12;
  --tackle-edge: #1f3d32;
  --broken-bg: #8a8478;
  --broken-ink: #5a1f14;
  --spine-light: #b9a77f;
  --spine-dark: #8a7650;
  --tackle-text: #d8e6dc;
  --chalk-ink: #ece8da;
  --chalk-muted: #c7c3b4;
  --chalk-line: rgba(236, 232, 218, 0.35);
  --chalk-up: #b9d27a;
  --chalk-down: #e8a08a;
  --cork: #b98a56;
  --cork-dot: rgba(90, 55, 25, 0.35);
  --cork-fleck: rgba(255, 230, 190, 0.25);
  --note: #f6efdc;
  --note-ink: #5a4a36;
  --glass: rgba(223, 233, 230, 0.45);
  --glass-edge: #f3f7f5;
  --cork-pencil: rgba(60, 35, 15, 0.45);
  --pill-run-bg: #dfe9cf;
  --pill-run-ink: #3d5a24;
  --pill-stop-bg: #f2d6cd;
  --pill-stop-ink: #8a2e1f;
  --pencil-edge: #b6a27c;
  --parch-1: #f4ead0;
  --parch-2: #e8d8b0;
  --parch-3: #cdb27e;
  --map-ink: #2b2418;
  --map-water: #9cc4c8;
  --map-river: #5f97a0;
  --map-pencil: #7a7466;
  --map-pencil-text: #5e584c;
  --map-tree: #6f7d50;
  --map-hill: #8a7650;
  --map-sub: #5a4a36;
  --node-done: #3d5a3a;
  --node-done-sub: #d8e6cc;
  --node-open: #fbf3dc;
  --legend-text: #e9dcc2;
  --switch-off: #c9b48c;
  --switch-knob: #fff7ea;

  --rarity-common: #6b7480;
  --rarity-uncommon: #5f7d3a;
  --rarity-rare: #2f6f9f;
  --rarity-epic: #6b4f9a;
  --rarity-legendary: #b08a2e;
  --rarity-mythic: #8a6fc0;
  --rarity-common-ink: #565e69;
  --rarity-uncommon-ink: #4a6330;
  --rarity-rare-ink: #285f88;
  --rarity-epic-ink: #6b4f9a;
  --rarity-legendary-ink: #75591a;
  --rarity-mythic-ink: #5f4b94;
  --rarity-mythic-sheen: linear-gradient(110deg, #6fd3c8, #9a7fd6, #e6a8d0, #f3d36b);

  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 12px;
  --shadow-ledge: 0 2px 0 var(--wood-dark);
  --tap: 48px;
}

/* Lamplight: a darker chrome for night play. Follows the system unless the player picks a theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --wood: #3a261a; --paper: #e8dcbf; --paper-track: #d6c6a2; }
}
:root[data-theme="dark"] { --wood: #3a261a; --paper: #e8dcbf; --paper-track: #d6c6a2; }
