/* TokeHunt 3D UI themes (docs/THEME.md).
   <html data-ui="arcade|classic"> is set before first paint by theme-boot.js
   and live by src/client/services/theme.mjs.

   - Both themes define the same --ui-* and --map-* tokens (checked by
     tools/client.test.mjs against THEME_TOKENS in services/theme.mjs).
   - Classic: the original sheets (peach-orchard/style.css, world.css,
     field-guide.css, hud.css, client.css, story.css, battle.css) apply as
     they always did; its token block records their values.
   - Arcade (default): this file also remaps the original sheets' own
     variables, and arcade.css restyles every component under
     [data-ui="arcade"]. Nothing in arcade.css matches in Classic. */

/* ------------------------------------------------------------ fonts (OFL) */
/* Declared for everyone, fetched only when Arcade text uses them. */
@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/press-start-2p-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/press-start-2p-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/vt323-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/vt323-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------- Classic tokens */
/* The values of the original pastel look (hud.css, story.css, map-canvas). */
:root,
:root[data-ui="classic"] {
  --ui-chrome: #5f8a5a;
  --ui-bg: #9fd0e6;
  --ui-panel: #fffdf6;
  --ui-panel-2: #f3f7ee;
  --ui-input: #fffdf4;
  --ui-ink: #1f2d24;
  --ui-muted: #5f6f62;
  --ui-line: rgba(31, 45, 36, 0.1);
  --ui-link: #3c9a4e;
  --ui-primary: #3c9a4e;
  --ui-primary-ink: #ffffff;
  --ui-success: #3c9a4e;
  --ui-danger: #d9534f;
  --ui-warning: #f2a900;
  --ui-live: #d9534f;
  --ui-mythic: #8e4cc6;
  --ui-gold: #d9960f;
  --ui-radius: 18px;
  --ui-font-head: "Baloo 2", "Nunito", system-ui, sans-serif;
  --ui-font-body: "Nunito", system-ui, sans-serif;
  --map-sea: #23547a;
  --map-pin-open: #3c9a4e;
  --map-pin-closed: #39434a;
  --map-pin-unknown: #5b6670cc;
  --map-pin-waypoint: #ffca6e;
  --map-pin-ring: #ffffff;
  --map-pin-ink: #ffffff;
  --map-selected: #ffd24d;
  --map-route: #ffedbd;
  --map-ferry: #c2ecffb0;
  --map-you: #e8465b;
  --map-nav: #ffc94d;
  --map-nav-ink: #3b2a00;
  --map-font: bold 12px Nunito, sans-serif;
}

/* -------------------------------------------------------- Arcade tokens */
:root[data-ui="arcade"] {
  --ui-chrome: #020617;
  --ui-bg: #020617;
  --ui-panel: #0c1e3e;
  --ui-panel-2: #172554;
  --ui-input: #172554;
  --ui-ink: #f8fafc;
  --ui-muted: #94a3b8;
  --ui-line: #1e3a8a;
  --ui-link: #38bdf8;
  --ui-primary: #38bdf8;
  --ui-primary-ink: #020617;
  --ui-success: #a3e635;
  --ui-danger: #ef4444;
  --ui-warning: #facc15;
  --ui-live: #ff2a2a;
  --ui-mythic: #a44dff;
  --ui-gold: #fbbf24;
  --ui-radius: 0.75rem;
  --ui-font-head: "Press Start 2P", "Silkscreen", ui-monospace, monospace;
  --ui-font-body: "VT323", "Silkscreen", ui-monospace, monospace;
  --map-sea: #0b2447;
  --map-pin-open: #38bdf8;
  --map-pin-closed: #334155;
  --map-pin-unknown: #1e293bcc;
  --map-pin-waypoint: #facc15;
  --map-pin-ring: #f8fafc;
  --map-pin-ink: #020617;
  --map-selected: #a3e635;
  --map-route: #bae6fd;
  --map-ferry: #38bdf8b0;
  --map-you: #ff2a2a;
  --map-nav: #facc15;
  --map-nav-ink: #020617;
  --map-font: 16px VT323, ui-monospace, monospace;

  /* Arcade-only helpers used by arcade.css */
  --ui-edge-primary: #0369a1;
  --ui-edge-success: #4d7c0f;
  --ui-edge-warning: #a16207;
  --ui-edge-danger: #991b1b;
  --ui-edge-navy: #030b1f;
  --ui-scan: repeating-linear-gradient(180deg, rgba(148, 163, 184, 0.045) 0 1px, transparent 1px 3px);
  --ui-glow-top: inset 0 1px 0 rgba(56, 189, 248, 0.35), inset 0 0 0 1px rgba(56, 189, 248, 0.06);
  --ui-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --ui-panel-bg: var(--ui-scan), linear-gradient(180deg, rgba(56, 189, 248, 0.08), rgba(56, 189, 248, 0) 90px), var(--ui-panel);
  --ui-card-bg: var(--ui-scan), linear-gradient(180deg, rgba(56, 189, 248, 0.07), rgba(56, 189, 248, 0) 48px), rgba(12, 30, 62, 0.94);

  /* The original sheets' own variables, remapped: everything that already
     reads them picks up the arcade palette and type. */
  --th-green: #a3e635;
  --th-green-dark: #4d7c0f;
  --th-green-soft: rgba(56, 189, 248, 0.14);
  --th-ink: #f8fafc;
  --th-muted: #94a3b8;
  --th-card: rgba(12, 30, 62, 0.94);
  --th-line: #1e3a8a;
  --th-star: #facc15;
  --th-star-soft: rgba(250, 204, 21, 0.14);
  --th-danger: #ef4444;
  --r-common: #94a3b8;
  --r-uncommon: #a3e635;
  --r-rare: #38bdf8;
  --r-epic: #a44dff;
  --r-legendary: #fbbf24;
  --th-head: "Press Start 2P", "Silkscreen", ui-monospace, monospace;
  --th-body: "VT323", "Silkscreen", ui-monospace, monospace;
  --gold: #fbbf24;
  --blush: #f472b6;

  color-scheme: dark;
  background: #020617;
  font-synthesis: none;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
}
