/* Tokens, document shell, and global overlays. */
@font-face {
  font-family: "Funnel Display";
  src: url("../../assets/fonts/funnel-display-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #070b0f;
  --panel: rgba(12, 21, 27, 0.88);
  --line: #253842;
  --mint: #57f2a4;
  --cyan: #59d9ff;
  --violet: #ad70ff;
  --danger: #ff654f;
  --text: #e8f5f0;
  --muted: #91a8a1;
  font-family: "Funnel Display", sans-serif;
}

* { box-sizing: border-box; }

html { width: 100%; height: 100%; overflow: hidden; }

body {
  display: grid;
  place-items: center;
  margin: 0;
  min-width: 320px;
  height: 100svh;
  overflow: hidden;
  color: var(--text);
  background: var(--ink);
  background: var(--ink);
}

button { font: inherit; }
button:focus-visible { outline: 2px solid white; outline-offset: 4px; }
[data-page-title]:focus { outline: none; }

.audio-controls { position: absolute; top: 14px; right: 14px; z-index: 50; display: flex; gap: 6px; }
.audio-controls button { min-height: clamp(22px, 2.08vw, 42px); padding: 0 clamp(7px, .59vw, 12px); cursor: pointer; color: var(--mint); border: 1px solid #335e50; background: rgba(3, 10, 13, 0.88); font: 700 clamp(8px, .65vw, 13px) monospace; }
.audio-controls button[aria-pressed="false"] { color: var(--muted); border-color: var(--line); }
.voice-subtitle { position: absolute; right: 4%; bottom: 4%; left: 4%; z-index: 60; display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 16px; min-height: 92px; padding: 12px 18px 12px 10px; color: var(--text); border: 1px solid var(--line); background: #071216; }
.voice-subtitle[hidden] { display: none; }
.voice-subtitle img { align-self: end; width: 90px; height: 128px; object-fit: contain; object-position: bottom; }
.voice-subtitle b { color: var(--mint); font: 700 10px monospace; letter-spacing: .12em; }
.voice-subtitle p { margin: 6px 0 0; color: #d5e2de; font-size: clamp(12px, 1.15vw, 17px); line-height: 1.45; }
.voice-subtitle button { align-self: start; padding: 6px 10px; cursor: pointer; color: var(--muted); border: 1px solid var(--line); background: transparent; font: 10px monospace; }
.voice-subtitle button:hover { color: var(--text); border-color: var(--mint); }
.game-toast { position: absolute; top: 24px; left: 50%; z-index: 90; width: min(440px, calc(100% - 32px)); padding: 13px 18px; color: #ffd2cb; border: 1px solid var(--danger); background: #210b0b; font-size: 14px; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%,-12px); transition: opacity 180ms ease, transform 180ms ease; }
.game-toast.is-visible { opacity: 1; transform: translate(-50%,0); }
.fullscreen-prompt { position: absolute; right: 24px; bottom: 24px; z-index: 70; display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: 12px; width: min(660px, calc(100% - 48px)); padding: 14px 16px; color: var(--text); border: 1px solid #3b7164; background: rgba(3,12,15,.97); box-shadow: 0 18px 48px rgba(0,0,0,.58), inset 3px 0 0 var(--mint); animation: slide-up 280ms ease both; }
.fullscreen-prompt b { color: var(--mint); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.fullscreen-prompt p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.fullscreen-prompt button { min-height: 36px; padding: 0 12px; cursor: pointer; color: var(--muted); border: 1px solid var(--line); background: #081216; font-size: 11px; }
.fullscreen-prompt button[data-enter-fullscreen] { color: #04120d; border-color: var(--mint); background: var(--mint); font-weight: 800; text-transform: uppercase; }
.fullscreen-prompt.is-leaving { opacity: 0; transform: translateY(12px); transition: opacity 200ms ease, transform 200ms ease; }

#game-frame {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
}
#app { width: 100%; height: 100%; overflow: hidden; }

.orientation-lock { display: none; }
