:root { color-scheme: dark; font: 15px/1.5 system-ui, sans-serif; color: #f1efe8; background: #0b0d10; --red: #ff4938; }
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
[hidden] { display: none !important; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
a { color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
.topbar { height: 72px; flex-shrink: 0; display: flex; align-items: center; gap: 26px; padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left)); border-bottom: 1px solid #25282d; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 23px; font-style: italic; letter-spacing: -.8px; }
.brand img { object-fit: contain; }
.tagline { color: #a4a6a9; font-size: 13px; }
.edition { margin-left: auto; color: #8d9197; font: 10px/1.2 ui-monospace, monospace; letter-spacing: 2px; }
.secondary { color: #f1efe8; background: transparent; border: 1px solid #373b42; border-radius: 6px; padding: 7px 13px; min-height: 44px; min-width: 44px; font-size: 12px; }
.secondary:hover:not(:disabled) { border-color: #858991; }
#stage { flex: 1; position: relative; min-height: 0; padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left); background: #080a0c; }
#game { width: 100%; height: 100%; display: block; outline: 0; touch-action: none; }
#game:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.orientation-hint { display: none; margin: 16px 24px 0; color: #a4a6a9; font-size: 13px; text-align: center; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 24px; background: radial-gradient(ellipse at 18% 80%, #6b201524, transparent 65%), #0b0d10; }
.start-panel { width: min(520px, 100%); border-left: 3px solid var(--red); padding: 8px 0 8px 38px; }
.eyebrow { color: var(--red); font: 11px/1.5 ui-monospace, monospace; letter-spacing: 3px; }
h1 { font-size: clamp(34px, 5vw, 66px); line-height: 1.05; letter-spacing: -3px; font-style: italic; margin: 18px 0; }
.start-panel > p { color: #aaaeb4; margin: 16px 0 28px; font-size: 18px; }
.primary { border: 0; background: var(--red); color: #100d0c; padding: 13px 22px; min-width: 195px; border-radius: 5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: space-between; gap: 32px; }
.primary:hover { background: #ff6b5d; }
.start-panel small { display: block; color: #848991; font-size: 11px; margin-top: 28px; }
progress { display: block; width: 100%; height: 5px; border: 0; background: #292d33; accent-color: var(--red); margin-top: 26px; }
progress::-webkit-progress-bar { background: #292d33; }
progress::-webkit-progress-value { background: var(--red); }
#load-status { color: #c7c8cb; font-size: 13px; font-variant-numeric: tabular-nums; }
.start-panel .error { color: #ffb5ac; font-size: 14px; }
footer { min-height: 48px; flex-shrink: 0; padding: 12px max(24px, env(safe-area-inset-right)); border-top: 1px solid #25282d; display: flex; align-items: center; gap: 24px; font-size: 11px; color: #9da1a8; }
.key-hint > span { margin: 0 9px; color: #50555c; }
kbd { color: #d1d2d4; font: inherit; }
details { margin-left: auto; }
summary { cursor: pointer; white-space: nowrap; min-height: 44px; display: flex; align-items: center; }
.help-panel { position: absolute; z-index: 2; bottom: 60px; right: 24px; max-width: min(450px, calc(100vw - 48px)); max-height: 70vh; overflow-y: auto; padding: 24px; background: #171a1f; border: 1px solid #373b42; border-radius: 8px; box-shadow: 0 12px 60px #0009; font-size: 13px; color: #c0c3c8; }
.help-panel strong { color: #f1efe8; font-size: 18px; }
.help-panel p { margin: 16px 0 0; }
.photo-export { position: absolute; z-index: 3; right: max(24px, env(safe-area-inset-right)); top: max(20px, env(safe-area-inset-top)); max-width: calc(100vw - 48px); padding: 13px 16px; background: #20242a; border: 1px solid #50565f; border-radius: 6px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; color: #f1efe8; font-size: 13px; }
.photo-export a { color: #ff8377; font-weight: 600; padding: 12px 0; }
#stage:fullscreen { background: #0b0d10; }
@media (max-width: 640px) { .topbar { height: 58px; gap: 14px; padding: 0 16px; } .tagline, .edition, .key-hint { display: none; } #fullscreen { margin-left: auto; } footer { min-height: 40px; padding: 8px 16px; } .start-panel { padding-left: 22px; } .start-panel > p { font-size: 16px; } }
@media (max-height: 500px) { .topbar { height: 46px; } footer { min-height: 34px; padding-top: 6px; padding-bottom: 6px; } .loading { place-items: start center; } h1 { font-size: 36px; margin: 10px 0; } .start-panel > p { font-size: 14px; margin: 10px 0 16px; } .start-panel small { margin-top: 14px; } }
@media (orientation: portrait) { #stage { display: flex; flex-direction: column; justify-content: center; } #game { height: auto; aspect-ratio: 16 / 9; flex-shrink: 0; } body[data-game-ready="true"] .orientation-hint { display: block; } }
@media (orientation: portrait) and (max-height: 420px) { .orientation-hint { display: none !important; } }
