:root { color-scheme: dark; --bg: #0b1416; --ink: #e9e2cf; --brass: #c9a35b; --teal: #2f8f86; --line: #6f7f80;
  --target: 48px; /* project comfortable minimum is 44 CSS px (docs/ui-design-system.md, AccessibilitySettings); 48 leaves margin */
  --safe-t: env(safe-area-inset-top, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); }
* { box-sizing: border-box; }
/* The shell stays pinch-zoomable (no user-scalable=no, no global touch-action: none). Only the game canvas takes raw
   gestures; overscroll is still contained so a swipe in the game never pulls the page or triggers pull-to-refresh. */
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none; touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
#stage { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  width: 100vw; height: 100vh; height: 100dvh; -webkit-user-select: none; user-select: none;
  padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l); }
#stage.blocked canvas { visibility: hidden; }
#unity-canvas { display: block; background: #000; outline: none; touch-action: none; -webkit-touch-callout: none; }
/* Keyboard users see which region has focus; in-game control focus is drawn by A11yFocusNavigator's ring. */
.keyboard-nav #unity-canvas:focus { outline: 3px solid var(--brass); outline-offset: -3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
#loading, #rotate, #failure { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; background: var(--bg); overflow-y: auto; touch-action: manipulation;
  padding: max(24px, var(--safe-t)) max(24px, var(--safe-r)) max(24px, var(--safe-b)) max(24px, var(--safe-l)); }
#loading { gap: 14px; z-index: 2; }
#loading[hidden], #rotate[hidden], #failure[hidden], #fullscreen[hidden], #failure-dismiss[hidden] { display: none; }
.title { margin: 0; font-size: clamp(1.375rem, 4vw, 2.5rem); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); }
.bar { width: min(60vw, 420px); height: 8px; border-radius: 4px; background: #1c2a2d; overflow: hidden; }
#progress { width: 0; height: 100%; background: linear-gradient(90deg, var(--teal), var(--brass)); transition: width .2s; }
#status { margin: 0; font-size: .9375rem; opacity: .9; max-width: 36rem; }
#rotate { z-index: 3; gap: 18px; font-size: 1.125rem; }
#rotate p, #failure p { margin: 0; max-width: 36rem; line-height: 1.45; }
#rotate:focus, #failure:focus { outline: none; }
.phone { width: 44px; height: 76px; flex: none; border: 3px solid var(--brass); border-radius: 9px; animation: turn 2.4s ease-in-out infinite; }
@keyframes turn { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(90deg); } }
/* Independent of the loading overlay, so a failure after startup is still visible. Above every other surface. */
#failure { z-index: 4; gap: 16px; font-size: 1.0625rem; }
#failure .title { letter-spacing: .06em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 4px; }
.actions button { min-width: var(--target); min-height: var(--target); padding: 10px 22px; border-radius: 10px; cursor: pointer;
  border: 2px solid var(--brass); background: transparent; font-size: 1rem; font-weight: 600; }
.actions button.primary { background: var(--brass); color: var(--bg); }
.actions button:hover { filter: brightness(1.1); }
.actions button:disabled { opacity: .55; cursor: default; }
.code { font-size: .8125rem; opacity: .8; letter-spacing: .04em; -webkit-user-select: text; user-select: text; }
#fullscreen { position: fixed; right: calc(8px + var(--safe-r)); bottom: calc(8px + var(--safe-b)); z-index: 1;
  width: var(--target); height: var(--target); min-width: 44px; min-height: 44px; padding: 0; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(11,20,22,.78); font-size: 1.375rem; line-height: 1; cursor: pointer;
  opacity: .85; touch-action: manipulation; }
#fullscreen:hover, #fullscreen:focus-visible { opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  clip-path: inset(50%); white-space: nowrap; border: 0; }
.noscript { padding: 24px; }
@media (prefers-reduced-motion: reduce) { .phone { animation: none; transform: rotate(90deg); } #progress { transition: none; } }
@media (forced-colors: active) { #progress { background: Highlight; } .actions button, #fullscreen { border-color: ButtonText; } }
