html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #000; }
body { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#canvas { display: block; width: 100vw; height: 100vh; height: 100dvh; outline: none; }
#gander-status { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #ddd; font: 600 15px system-ui, sans-serif; text-align: center; padding: 16px; box-sizing: border-box; }
#gander-status.art { background: #000 center / cover no-repeat; align-items: flex-end; padding-bottom: 9vh; }
#gander-status.art .bar { background: rgba(0, 0, 0, 0.55); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
#gander-status .bar { width: min(320px, 60vw); height: 4px; background: #222; border-radius: 2px; overflow: hidden; }
#gander-status .fill { width: 0; height: 100%; background: #e8e8e8; transition: width .15s; }
#gander-safe-probe { position: fixed; left: 0; top: 0; width: 0; height: 0; visibility: hidden; pointer-events: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
#gander-rotate { position: fixed; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; background: rgba(8, 10, 14, 0.94); color: #e9edf3; font: 600 17px system-ui, sans-serif; z-index: 10; }
#gander-rotate.show { display: flex; }
#gander-rotate .phone { width: 46px; height: 80px; border: 3px solid #e9edf3; border-radius: 10px; box-sizing: border-box;
  animation: gander-rot 1.8s ease-in-out infinite; }
#gander-rotate.portrait .phone { animation-name: gander-rot-back; }
@keyframes gander-rot { 0%, 25% { transform: rotate(0deg); } 60%, 100% { transform: rotate(-90deg); } }
@keyframes gander-rot-back { 0%, 25% { transform: rotate(-90deg); } 60%, 100% { transform: rotate(0deg); } }
.gander-input { position: fixed; display: none; box-sizing: border-box; margin: 0; padding: 0 12px; border: 0; outline: none;
  background: transparent; font-family: system-ui, sans-serif; font-weight: 600; caret-color: #6aa2ff; z-index: 5; }
/* loading montage (gander-boot.js, assets/splash/montage.json) */
#gander-montage { position: fixed; inset: 0; z-index: 1; overflow: hidden; background: #0d0d0e; transition: opacity .8s ease; }
#gander-montage.out { opacity: 0; pointer-events: none; }
#gander-montage.ready { cursor: pointer; }
#gander-montage .f { position: absolute; inset: -2%; background: center / cover no-repeat; opacity: 0; transition: opacity 1.4s ease; will-change: opacity, transform; }
#gander-montage .f.contain { background-size: auto 60%; background-position: 50% 26%; }
#gander-montage .f.on { opacity: 1; }
#gander-montage .f.on, #gander-montage .f.off { animation: var(--gm-t) linear both; }
#gander-montage .f.kb0 { animation-name: gm-kb0; } #gander-montage .f.kb1 { animation-name: gm-kb1; }
#gander-montage .f.kb2 { animation-name: gm-kb2; } #gander-montage .f.kb3 { animation-name: gm-kb3; }
@keyframes gm-kb0 { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.11) translate(-2%, -1%); } }
@keyframes gm-kb1 { from { transform: scale(1.12) translate(2%, 1%); } to { transform: scale(1.03) translate(0, 0); } }
@keyframes gm-kb2 { from { transform: scale(1.03) translate(1.5%, -1%); } to { transform: scale(1.12) translate(-1%, 1%); } }
@keyframes gm-kb3 { from { transform: scale(1.1) translate(-2%, 0); } to { transform: scale(1.02) translate(1.5%, -1%); } }
#gander-montage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.62)); }
#gander-montage .txt { position: absolute; left: max(6vw, 20px); right: max(6vw, 20px); bottom: calc(9vh + 22px); z-index: 2;
  color: #fff; font-family: system-ui, sans-serif; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35); }
#gander-montage .cap { font: 600 13px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase;
  opacity: 0; transform: translateY(6px); transition: opacity .6s ease, transform .6s ease; margin-bottom: 10px; min-height: 16px; }
#gander-montage .cap.on { opacity: .9; transform: none; }
#gander-montage .ttl { font: 700 clamp(26px, 4.4vw, 46px)/1.05 system-ui, sans-serif; letter-spacing: -0.02em; }
#gander-montage .sub { font: 500 clamp(14px, 1.8vw, 18px)/1.4 system-ui, sans-serif; opacity: .85; margin-top: 6px; }
#gander-montage .warm, #gander-start .warm { display: none; margin-top: 16px; font: 600 14px system-ui, sans-serif; opacity: .85; }
#gander-montage.warming .warm, #gander-start.warming .warm { display: block; animation: gm-blink 1.4s ease-in-out infinite; }
@keyframes gm-blink { 50% { opacity: .4; } }
#gander-status.failed { color: #ddd; background: #000; z-index: 3; }
#gander-status.over-montage { z-index: 2; background: none; justify-content: flex-start; align-items: flex-end;
  padding: 0 max(6vw, 20px) 9vh; pointer-events: none; }
#gander-status.over-montage .bar { background: rgba(255, 255, 255, 0.22); }
#gander-status.over-montage .fill { background: #fff; }
@media (prefers-reduced-motion: reduce) { #gander-montage .f.on, #gander-montage .f.off { animation: none; } }
/* the Start screen of games without a montage (gander-boot.js startGate) */
#gander-start { position: fixed; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 0 20px 12vh; background: #0d0d0e center / cover no-repeat; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .4);
  transition: opacity .6s ease; cursor: default; }
#gander-start.out { opacity: 0; pointer-events: none; }
/* "Tap to enable sound" (gander-boot.js sound hint) */
#gander-sound { position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top)); transform: translateX(-50%); z-index: 4;
  padding: 9px 16px; border-radius: 999px; background: rgba(12, 12, 14, 0.78); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3);
  font: 600 14px system-ui, sans-serif; pointer-events: none; transition: opacity .4s ease; white-space: nowrap; }
#gander-sound.out { opacity: 0; }
/* gander::keyboard's hidden field: focused for the on-screen keyboard, never seen (16px: no iOS zoom on focus) */
.gander-kb { position: fixed; display: none; left: 0; top: 0; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; outline: none; opacity: 0; font-size: 16px; color: transparent; background: transparent; caret-color: transparent; pointer-events: none; }
