/* tokens.css — torpak lite's DESIGN TOKENS: every colour, size, edge and shadow the client may use, by name.
   The look is TABLETOP (the owner's pick, 2026-09-30, from four renders: docs/project/research/web/style/):
   a printed board on warm paper — inked hex edges, holdings hatched in the seat's colour, stamped marks, card-stock
   panels — in TWO PALETTES over one structure: PAPER (light) and SLATE (dark, "slate COLORS not the slate style").
   The dark palette follows the OS (prefers-color-scheme) unless the player set a toggle; either way it is
   `data-theme="paper|slate"` on <html>, set before the first paint. Nothing in the kit names a raw colour; a new colour is a new token here, in both palettes. */

:root {
  /* ---- the six seats: the Steam game's (assets/manifest.lua, owner_colours), so "the red one" means the same seat
     on every platform; never re-hued per palette, the palette adjusts what sits under them */
  --seat-1: #e0453a; --seat-2: #3b7de0; --seat-3: #ff4fa3; --seat-4: #2ee6c5; --seat-5: #b04fd6; --seat-6: #f08a3a;
  /* ---- the five card kinds (the manifest's kind_colours) */
  --kind-opening: #5f9a6a; --kind-reaction: #5f7fb8; --kind-tactic: #4f9b98; --kind-trap: #b0864a; --kind-structure: #8a8f96;

  /* ---- spacing: a 4px grid; the layout composes these and nothing else */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --rail-w: 300px; --top-h: 60px; --hand-h: 178px;
  --handle-w: 28px;          /* the world rail's DRAWER HANDLE, its gutter at the window's left edge under 1280 (w30) */
  --col-w: 420px;            /* a screen's column: the title's, the room's table (M11's screens, w8) */
  --over-w: 600px;           /* the game over's standings */
  --chat-h: 196px;           /* the room's chat, under its board */
  --chooser-w: 330px; --chooser-h: 270px;   /* the table's chat, over the board's corner (w12) */
  /* IN PLAY's row (w24) by its own rules — its label's height and a short face's — and THE BOARD'S BANNERS' place (w51,
     `lite.md` B20): under that row where they would meet (its top at --sp-2, the label, the column's gap, a face, a gap
     under it), the board's upper third on a tall board. A % here resolves where it is used: the banner's own board */
  --inplay-label-h: 20px; --short-h: 56px;
  --banner-top: max(16%, calc(var(--sp-2) + var(--inplay-label-h) + var(--sp-1) + var(--short-h) + var(--sp-3)));
  /* ---- edges: the print's corners are tight; a panel is a card of stock, a pill is a stamp */
  --radius-1: 4px; --radius-2: 6px; --radius-3: 10px; --radius-pill: 999px;
  --ink-w: 1.5px;            /* the printed rule: a panel's border, a button's edge */
  --hex-ink-w: 1.4;          /* the board's inked hex edge, in SVG units at a 30-unit hex */
  --frontier-w: 3.2;         /* a seat's frontier, in SVG units */
  --hatch-step: 6;           /* a holding's hatch, in SVG units: one stripe every 6, 2.2 wide */
  --hatch-stripe: 2.2;
  --hex-inset: 0;            /* the hexes touch; the ink is the gap */

  /* ---- the paper palette (light) */
  --bg: #ece3cf; --panel: #f6efdf; --panel-border: #cdbf9e; --line: #d9cdb0; --lit: #eadfc2;
  --ink: #2b2418; --muted: #7a6d54;
  --accent: #b8862a; --accent-ink: #8a5f14; --on-accent: #fff8e6; --danger: #b8402a; --good: #4f7f3a;
  --plate: #2b2418; --plate-ink: #f6efdf; --plate-muted: #b7a98a; --plate-border: #1a1610; --pip: #d6c7a3;
  --plate-danger: #f2765f;   /* a why in danger ON THE PLATE (w28: the cell's box, the refusal line): --danger is too dark there */
  --disc: #2b2418; --disc-ink: #f6efdf;   /* a PLAYED CHIP's dark disc and its glyph (w44): the plate's dark on paper */
  --btn: #efe6d0; --hard: #2b2418;
  --shadow: 0 1px 0 #fff8 inset, 0 2px 6px rgba(60,40,10,.12);
  --field: #fffaf0; --field-inset: inset 0 1px 2px rgba(60,40,10,.12);
  --shadow-stage: 0 20px 60px rgba(40,25,5,.35);
  --dim: rgba(60,45,20,.55);
  --dim-deep: rgba(30,22,10,.8);   /* THE ROLL-OFF's dim (w61, the owner's pick e): words straight on --dim were lost on paper */
  --pool: rgba(30,22,10,.72);   /* THE ROUND DARK POOL's core (w54): the Steam game's black at .72, warmed to paper's ink */
  --grain-opacity: .07;
  --stock: linear-gradient(#fff6 0, transparent 40%);   /* the card stock's top light */
  --terrain-plain: #d9d09a; --terrain-farm: #e6c96a; --terrain-hills: #c9b384; --terrain-river: #9ec4d2;
  --terrain-mountain: #b3ab98; --terrain-ruins: #d3b3a0; --terrain-shrine: #e8d27a; --terrain-gate: #c2b08c;
  --river-line: #5f8fa8; --hex-ink: #4a3b26; --mark: #5a4a30;
  --struct: #f4ead2; --struct-ink: #4a3b26; --plan: #e0641e;
  --bldg: var(--struct-ink); --bldg-edge: var(--struct);   /* a building: ink with a cream edge on paper (w14) */
  --card: #fbf6ea; --card-border: #b9a985; --card-muted: #5e5240; --card-art: #efe5cc;
  --card-shadow: 0 1px 2px rgba(60,40,10,.25); --card-shadow-raised: 0 10px 22px rgba(60,40,10,.3);
  --coin: #e2b64a; --coin-ink: #3a2a08; --coin-edge: #a67c1e; --rare: #b8862a;
  --die: #fbf6ea; --die-ink: #2b2418;
  --playable: #3f9a58; --playable-glow: rgba(63,154,88,.42); --chosen-glow: rgba(184,134,42,.5);   /* a card you can play now: the Steam game's mint, deepened for paper (w14) */
  --lock: #2b2418;   /* a cut-off cell's padlock: its edge (its body is the seat's colour) */
  color-scheme: light;
}

/* ---- the slate palette (dark): colour tokens alone; every edge, hatch, shadow and face stays Tabletop's.
   One block: an inline script in <head> sets data-theme from the stored toggle, else from prefers-color-scheme,
   before the first paint (web/CLAUDE.md, *Dark mode*), so the CSS never carries the palette twice. */
:root[data-theme="slate"] {
  --bg: #171a20; --panel: #1f232b; --panel-border: #2b303a; --line: #2b303a; --lit: #272c36;
  --ink: #ece7dc; --muted: #8e94a0;
  --accent: #e2b04a; --accent-ink: #e2b04a; --on-accent: #1b1509; --danger: #ff6b57; --good: #7fc46a;
  --plate: #0f1115; --plate-ink: #ece7dc; --plate-muted: #8e94a0; --plate-border: #2b303a; --pip: #343a46;
  --plate-danger: #ff6b57;
  --disc: #2c313c; --disc-ink: #ece7dc;   /* the chip's disc a step LIGHTER than slate's ground (the plate's dark would vanish into it) */
  --btn: #262b35; --hard: #0a0c10;
  --shadow: 0 1px 0 #ffffff08 inset, 0 4px 14px rgba(0,0,0,.35);
  --field: #13161c; --field-inset: inset 0 1px 3px rgba(0,0,0,.45);
  --shadow-stage: 0 30px 80px rgba(0,0,0,.6);
  --dim: rgba(10,12,16,.7);
  --dim-deep: rgba(4,5,8,.84);
  --pool: rgba(0,0,0,.72);
  --grain-opacity: .05;
  --stock: linear-gradient(#ffffff0a 0, transparent 40%);
  --terrain-plain: #3f4a3e; --terrain-farm: #6b5f2f; --terrain-hills: #55503f; --terrain-river: #2c4a5e;
  --terrain-mountain: #4a4d57; --terrain-ruins: #5a4646; --terrain-shrine: #6c5a2a; --terrain-gate: #4d493d;
  --river-line: #6fa3c4; --hex-ink: #0f1115; --mark: #b9b3a4;
  --struct: #ece7dc; --struct-ink: #10131a; --plan: #ff8c1a;
  --bldg: var(--struct); --bldg-edge: var(--struct-ink);   /* the opposite on slate: cream with a black edge (the owner's, w14) */
  --card: #262b35; --card-border: #363c48; --card-muted: #b6bcc7; --card-art: #1c2028;
  --card-shadow: 0 2px 6px rgba(0,0,0,.4); --card-shadow-raised: 0 16px 34px rgba(0,0,0,.55), 0 0 0 1px #ffffff14;
  --coin: #e2b04a; --coin-ink: #1b1509; --coin-edge: #f3cd7a; --rare: #e2b04a;
  --die: #2a2f3a; --die-ink: #f5efe2;
  --playable: #a8f0b8; --playable-glow: rgba(168,240,184,.38); --chosen-glow: rgba(226,176,74,.5);
  --lock: #0f1115;
  color-scheme: dark;
}
