/* Reset, tokens and the fixed game stage. */
/* Chakra Petch (SIL OFL) is bundled so the game reads the same offline and on
   GitHub Pages. Latin subset only: ~10 KB per weight. */
@font-face {
  font-family: "Chakra Petch";
  src: url("../../assets/fonts/chakra-petch-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("../../assets/fonts/chakra-petch-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("../../assets/fonts/chakra-petch-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #05060a;
  --fg: #e8f1ff;
  --accent: #4dff9b;
  --accent-soft: #bfffd8;
  --amber: #ffd76a;
  --danger: #f45;
  --panel: rgba(8, 12, 24, .78);
  --display: "Chakra Petch", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }
[hidden], .hidden { display: none !important; }
button { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--display);
  overflow: hidden;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body {
  position: fixed; inset: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  background:
    radial-gradient(900px 600px at 18% 12%, rgba(31, 138, 76, .16), transparent 62%),
    radial-gradient(800px 700px at 82% 78%, rgba(40, 120, 190, .13), transparent 60%),
    radial-gradient(700px 500px at 60% 30%, rgba(160, 60, 200, .08), transparent 65%),
    var(--bg);
}

.app { position: fixed; inset: 0; contain: strict; isolation: isolate; }
.stage { position: absolute; inset: 0; contain: strict; overflow: hidden; touch-action: none; }
.layer { position: absolute; inset: 0; display: block; }
.main { width: 100%; height: 100%; cursor: none; touch-action: none; }
.main:focus { outline: none; }
