:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #24201b; color: #fff; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; touch-action: none; }
body { position: fixed; inset: 0; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Installed apps draw under the status bar and home indicator (viewport-fit=cover).
   Inset the canvas by the top and side safe areas so nothing is hidden or untappable
   under the status bar; the body background fills the margins. The bottom is not
   inset: the home indicator is a thin corner glyph and iPadOS reports a large inset
   there that would leave a dead band under the game. Percent sizes of a fixed box track the real visible viewport. */
#game { display: block; position: fixed; top: env(safe-area-inset-top); left: env(safe-area-inset-left); width: calc(100% - env(safe-area-inset-left) - env(safe-area-inset-right)); height: calc(100% - env(safe-area-inset-top)); touch-action: none; outline: none; }
[hidden] { display: none !important; }
button { font: inherit; color: white; background: #332f29e6; border: 1px solid #ffffff80; border-radius: 6px; padding: 10px 14px; touch-action: none; cursor: pointer; }
button:active { background: #8b795b; }
#loading { position: absolute; inset: 0; display: grid; place-items: center; background: #24201b; }
#notice { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); max-width: 90%; background: #332f29ee; padding: 12px; z-index: 4; pointer-events: none; }
#enter-vr { position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5; }
#text-fields { position: fixed; inset: 0; pointer-events: none; }
.game-text { opacity: 0; position: absolute; pointer-events: auto; color: #e0e0e0; background: #000; border: 0; border-radius: 0; outline: none; font-family: monospace; -webkit-appearance: none; appearance: none; -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; touch-action: none; }
.game-text:focus { outline: 1px solid #fff; }
