/* The engine overlay owns every game interface and its safe-area layout. */
html, body, #game { width: 100%; height: 100%; margin: 0; overflow: hidden; }
html { background: #0b111c; color: #f1e6cf; overscroll-behavior: none; }
#game { position: relative; isolation: isolate; touch-action: none; }
#stage { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
#game:fullscreen { width: 100vw; height: 100vh; }
#error { position: absolute; inset: 1rem; z-index: 100; padding: 1rem; background: #111a25; color: #f1e6cf; font: 16px/1.5 system-ui, sans-serif; white-space: pre-wrap; }
#error[hidden] { display: none; }