html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; background: #181624; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
[hidden] { display: none !important; }
#player { position: fixed; inset: 0; height: 100%; height: 100dvh; background: #181624; }
#game { position: absolute; top: 50%; transform: translateY(-50%); display: block; width: 100%; height: 100%; touch-action: none; outline: none; visibility: hidden; }
body.running #game { visibility: visible; }
@media (pointer: coarse) { #game { max-height: 56.25vw; image-rendering: pixelated; } }
.panel { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: max(16px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); text-align: center; background: #181624; overflow: auto; }
.panel h1, .panel h2, .panel p { margin: 0; }
.panel h1, .panel h2 { font-size: clamp(28px, 4vw, 36px); }
.preview-logo { width: min(230px, 30vw); height: auto; max-height: 20dvh; object-fit: contain; image-rendering: pixelated; }
.instructions { font-size: clamp(12px, 1.7vw, 16px); line-height: 1.5; color: #c5c0d1; }
.panel .note { font-size: 12px; max-width: 42em; }
.back { display: block; min-height: 30px; padding: 4px 8px; }
.panel .button { cursor: pointer; min-height: 48px; }
progress { width: min(360px, 75vw); height: 18px; accent-color: #f2c46b; }
.rotate-icon { font-size: 64px; color: #f2c46b; }
#rotate { z-index: 5; }
#touch-stick { position: absolute; z-index: 2; right: max(18px, env(safe-area-inset-right)); bottom: calc(var(--game-bottom, 0px) + max(18px, env(safe-area-inset-bottom)) + 18px); width: 112px; height: 112px; touch-action: none; }
.stick-base { width: 100%; height: 100%; pointer-events: none; }
.stick-rim { fill: #665d7ebf; }
.stick-inner { fill: #241f33b8; }
#stick-nub { position: absolute; left: 35.7142857%; top: 35.7142857%; width: 28.5714286%; height: 28.5714286%; overflow: visible; pointer-events: none; }
#touch-stick.active .stick-rim { fill: #f07e24cc; }
body:not(.running) #touch-stick { display: none; }
#preview-controls { position: absolute; bottom: max(5px, env(safe-area-inset-bottom)); left: max(6px, env(safe-area-inset-left)); z-index: 3; display: flex; align-items: center; gap: 6px; }
#toolbar { display: flex; gap: 6px; }
#preview-controls a, #preview-controls button { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 12px; line-height: 1; color: #fff; background: #181624dd; border: 1px solid #665d7e; border-radius: 4px; padding: 10px 12px; min-height: 40px; text-decoration: none; cursor: pointer; }
#preview-controls #sound { width: 40px; height: 40px; padding: 8px; }
#diagnostics { position: absolute; z-index: 9; bottom: 0; right: 0; max-width: 100%; max-height: 50%; overflow: auto; background: #111e; font-size: 11px; padding: 8px; user-select: text; }
#install-help { max-width: min(500px, 90vw); max-height: 90dvh; overflow: auto; padding: 24px; background: #181624; color: #fff; border: 1px solid #665d7e; }
#install-help h2 { font-size: 28px; }
#install-help::backdrop { background: #000b; }
#log { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-height: 430px) and (orientation: landscape) { .panel { gap: 7px; } .preview-logo { max-height: 18dvh; } .panel h1 { font-size: 28px; } .panel .note { font-size: 11px; } .back { min-height: 24px; padding: 0 8px; } }
