/* Base: tokens, reset, layers. Load order: base, hud, menu, touch.

   DESIGN TOKENS. Every screen draws from these, so the menus and the HUD read
   as one game. Add a token here before inventing a one-off colour.

   Type: Barlow Condensed for display (titles, big numbers, buttons), Inter for
   reading text, JetBrains Mono for codes, timers and tabular figures. All three
   are bundled in vendor/fonts (OFL), so nothing depends on a font CDN. */
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("../../vendor/fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../../vendor/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../../vendor/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url("../../vendor/fonts/barlow-condensed-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap; src: url("../../vendor/fonts/inter-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("../../vendor/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-display: swap; src: url("../../vendor/fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); }

:root {
  /* type */
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* surfaces: near-black graphite with a cool cast, layered glass for panels */
  --bg-0: #07090c;
  --bg-1: #0d1117;
  --bg-2: #141a22;
  --bg-3: #1c2430;
  --glass: rgba(12, 16, 22, .72);
  --glass-strong: rgba(10, 13, 18, .9);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);

  /* text */
  --text: #eef3f6;
  --text-dim: rgba(238, 243, 246, .66);
  --text-faint: rgba(238, 243, 246, .4);

  /* signal colours: one accent, used sparingly; status colours mean status */
  --accent: #ff6b2c;            /* uprising orange: primary actions, focus */
  --accent-hi: #ff8a52;
  --accent-ink: #1a0a02;        /* text on an accent fill */
  --accent-soft: rgba(255, 107, 44, .16);
  --gold: #ffcf4d;              /* coins, credits, rewards */
  --ok: #5fe08c;                /* health, ready, success */
  --info: #5cc8ff;              /* co-op, allies, links */
  --warn: #ffb020;
  --danger: #ff4d4d;            /* damage, death, destructive */

  /* shape and depth */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-panel: 0 24px 60px rgba(0, 0, 0, .55), 0 2px 0 rgba(255, 255, 255, .03) inset;
  --blur: blur(14px) saturate(140%);

  /* spacing scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;

  /* motion: quick and decisive; honour reduced motion */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 120ms;
  --t-med: 220ms;

  /* legacy names still used across the stylesheets */
  --hud: var(--text);
  --shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 10px rgba(0,0,0,.55);
}
@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-med: 0ms; }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg-0); }
body {
  font-family: var(--font-ui);
  color: var(--hud);
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}
canvas { display: block; width: 100%; height: 100%; }
/* The renderer is created before its model downloads finish. Keep its
   entire output out of the compositor until main.js has loaded and warmed
   the final assets, so no procedural gun can leak around the loading UI. */
body:not(.assets-ready) canvas { visibility: hidden; }

/* ---------- layers ---------- */
#hud, #overlay { position: fixed; inset: 0; pointer-events: none; }
#overlay { pointer-events: auto; }
.hidden { display: none !important; }

