/* The only home for colors, type, spacing and timing.
   Game and hub code use these names, never raw values. */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;700&display=swap');

:root {
  /* Players: p1 pieces are solid, p2 pieces carry a ring. Same on every theme. */
  --p1: #f5b700;
  --p2: #e4473d;
  --p1-ink: #2e2200;
  --p2-ink: #ffffff;

  /* Boards */
  --board: #1f4e9c;

  /* Wood (Nesting Cups): maple is the first player, walnut the second */
  --maple: #f0dcba;
  --maple-core: #d6b588;
  --maple-rim: #a97c4b;
  --maple-ink: #3a2a14;
  --walnut: #4f301b;
  --walnut-core: #2e1a0d;
  --walnut-rim: #24130a;
  --walnut-ink: #f6eadb;
  --wood-board: #c99a68;
  --wood-board-shade: #a87a4b;
  --wood-frame: #5e3a20;

  /* Nest Egg cards: cream faces, one color per asset kind, metallic wilds */
  --nest-card: #fbf5e6;
  --nest-ink: #2b2620;
  --nest-back: #8a3b2c;
  --nest-1: #c97b2e;
  --nest-2: #7a5cc7;
  --nest-3: #6f9a2a;
  --nest-4: #d33f35;
  --nest-5: #7a5232;
  --nest-6: #1f9a92;
  --nest-7: #2f6fc8;
  --nest-8: #c8467f;
  --nest-9: #2f8a4a;
  --nest-silver: #8d99a6;
  --nest-gold: #c9961a;

  /* Dungeon Duo: the painted dungeon, always torch-lit dark whatever the table theme */
  --dd-void: #07060a;
  --dd-stone: #6e6459;
  --dd-stone-cool: #5d5a5e;
  --dd-grout: #2a241f;
  --dd-wall: #3a332e;
  --dd-wall-face: #554840;
  --dd-moss: #56703c;
  --dd-torch: #ffb347;
  --dd-ink: #1b1410;
  --dd-steel: #aab6c4;
  --dd-gold: #e8b931;
  --dd-wood: #8a5a33;
  --dd-leather: #6e4a2f;
  --dd-skin: #f0c6a0;
  --dd-blue: #3d5fa8;
  --dd-green: #3f7d4a;
  --dd-purple: #6b44a8;
  --dd-white: #ece6d6;
  --dd-red: #b8402f;
  --dd-bone: #e8e0cc;
  --dd-goblin: #79a843;
  --dd-orc: #5b7f3a;
  --dd-slime: #63d07a;
  --dd-magic: #6fd8ff;
  --dd-fire: #ff6a2b;
  --dd-heal: #9cf07a;
  /* The Lantern Below: each act's stone (the Bone Crypt uses the stone above) */
  --dd-forge-stone: #84503b;
  --dd-forge-stone-cool: #6e4136;
  --dd-forge-grout: #2a1712;
  --dd-forge-wall: #42261d;
  --dd-forge-wall-face: #6b3a29;
  --dd-forge-moss: #b5532a;
  --dd-wood-stone: #5b6646;
  --dd-wood-stone-cool: #4a5a42;
  --dd-wood-grout: #1e2216;
  --dd-wood-wall: #2f3324;
  --dd-wood-wall-face: #4c5236;
  --dd-wood-moss: #6f9a3c;
  --dd-vault-stone: #66718c;
  --dd-vault-stone-cool: #56607c;
  --dd-vault-grout: #1c1f2a;
  --dd-vault-wall: #2d3140;
  --dd-vault-wall-face: #4a5066;
  --dd-vault-moss: #c9a24a;
  --dd-deep-stone: #5f4f6e;
  --dd-deep-stone-cool: #4f4260;
  --dd-deep-grout: #16121c;
  --dd-deep-wall: #241f2b;
  --dd-deep-wall-face: #3b3247;
  --dd-deep-moss: #7b5aa6;
  --dd-gloam: #1a1626;
  --dd-spore: #c7a6e8;
  /* The Lantern Below's outdoor prologues, painted in code: grass and leaves, dirt, snow, cobbles, roofs, plaster, night sky */
  --dd-grass: #4f7a3a;
  --dd-leaf: #2f5a2e;
  --dd-dirt: #7a5c3e;
  --dd-snow: #dfe6ee;
  --dd-cobble: #7d7a76;
  --dd-roof: #8c3f2e;
  --dd-plaster: #c9b99a;
  --dd-night: #1d2740;

  /* Snake Squad arena: always dark, whatever the table theme. Snakes 1 and 2 are --p1 and --p2. */
  --arena: #0d1222;
  --arena-out: #1c0c14;
  --arena-dot: #26304d;
  --arena-edge: #ff4d5e;
  --arena-ink: #f2f0e6;
  --snake-3: #2ec4b6;
  --snake-4: #8b6cf0;
  --snake-5: #4c9aff;
  --snake-6: #a3d94a;
  --snake-7: #ff6fae;
  --snake-8: #e9e2cf;
  --snake-9: #9fe3ff;
  --snake-10: #c08a5a;

  /* Campaign Table map: tiles, ships, fog and the eight token colors. Always these colors, whatever the table theme. */
  --ct-void: #0b0d12;
  --ct-grass: #5b8a3c;
  --ct-dirt: #8a6a45;
  --ct-floor: #8d8a83;
  --ct-wood: #9b6a3f;
  --ct-rug: #8f2f35;
  --ct-stone-wall: #d9d2c3;
  --ct-wall: #3d3a38;
  --ct-door: #9a6b3a;
  --ct-tree: #2f5d2b;
  --ct-rock: #6b6158;
  --ct-sand: #d9c28c;
  --ct-shallow: #4fa3b8;
  --ct-deep: #1d4e7a;
  --ct-reef: #2f7f86;
  --ct-dock: #8b6239;
  --ct-deck: #a77b4e;
  --ct-rail: #5e3b22;
  --ct-hull: #4a2d18;
  --ct-sail: #f3ead8;
  --ct-grid: rgba(0, 0, 0, 0.22);
  --ct-wave: rgba(255, 255, 255, 0.28);
  --ct-plank: rgba(0, 0, 0, 0.2);
  --ct-fog: #1a1e28;
  --ct-fog-dm: rgba(8, 10, 18, 0.55);
  --ct-ink: #14110d;
  --ct-select: #ffffff;
  --ct-ghost: rgba(255, 255, 255, 0.4);
  --ct-label: rgba(10, 12, 20, 0.85);
  --ct-c1: #f5b700;
  --ct-c2: #e4473d;
  --ct-c3: #2ec4b6;
  --ct-c4: #8b6cf0;
  --ct-c5: #4c9aff;
  --ct-c6: #a3d94a;
  --ct-c7: #ff6fae;
  --ct-c8: #e9e2cf;
  /* Ship cards: a weapon's reach, and the eight hull paints (bare wood is --ct-wood). */
  --ct-reach: #e0533d;
  --ct-bronze: #b07a3a;
  --ct-bronze-dark: #7a4f22;
  --ct-bronze-light: #ecc183;
  --ct-paint-black: #2b2723;
  --ct-paint-white: #ece6d6;
  --ct-paint-red: #a3302a;
  --ct-paint-blue: #2f5f93;
  --ct-paint-green: #2e6e45;
  --ct-paint-yellow: #d8a62e;
  --ct-paint-teal: #2a8580;
  --ct-paint-purple: #643f86;

  /* Type */
  --font: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --weight-text: 500;
  --weight-bold: 700;
  --text-sm: 0.875rem;
  --text-body: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.5rem;
  --text-xl: 2.25rem;
  --text-code: 3.5rem;

  /* Space and shape */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --gutter: 16px;
  --tap: 48px;
  --radius-control: 14px;
  --radius-piece: 50%;

  /* Motion */
  --dur-move: 280ms;
  --dur-quick: 120ms;
}

/* Table themes. Only the table colors change. Any element with data-theme
   gets that theme's values, which is how the theme swatches show their color. */
:root,
[data-theme='felt'] {
  --felt: #0e3b36;
  --felt-deep: #082a26;
  --chalk: #f2f0e6;
  --chalk-dim: #a8bdb6;
}

[data-theme='walnut'] {
  --felt: #3a2417;
  --felt-deep: #24160d;
  --chalk: #f6eadb;
  --chalk-dim: #c9ad94;
}

[data-theme='midnight'] {
  --felt: #15203b;
  --felt-deep: #0b1226;
  --chalk: #eef1f8;
  --chalk-dim: #a3afc8;
}

[data-theme='slate'] {
  --felt: #2a2e35;
  --felt-deep: #1a1d22;
  --chalk: #f1f2f4;
  --chalk-dim: #aab1bb;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-move: 1ms;
    --dur-quick: 1ms;
  }
}
