:root { color-scheme: dark; font-family: Arial, Helvetica, sans-serif; background: #071827; }
* { box-sizing: border-box; }
html, body, #game-shell { min-height: 100%; margin: 0; }
body { background: #071827; color: #f3fff8; overflow: hidden; }
button { font: inherit; }
#game-shell { display: grid; place-items: center; min-height: 100vh; }
#stage { position: relative; width: 100vw; height: 56.25vw; max-height: 100vh; max-width: 177.7778vh; overflow: hidden; background: #071827; touch-action: none; }
#game-canvas { display: block; width: 100%; height: 100%; outline: none; }
#hud { position: absolute; inset: 14px 16px auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; pointer-events: none; }
#hud div { min-width: 0; border: 1px solid rgba(166, 233, 255, .34); border-radius: 8px; background: rgba(3, 17, 31, .72); padding: 7px 9px; box-shadow: 0 6px 18px rgba(0, 0, 0, .16); }
#hud span, .status-label { display: block; color: #93ccdf; font-size: 10px; font-weight: 800; letter-spacing: 1.3px; }
#hud strong { display: block; color: #f4fff9; font-size: 18px; line-height: 1.1; margin-top: 2px; }
#action-controls { position: absolute; display: flex; gap: 8px; right: 16px; top: 79px; }
#action-controls button, .result-actions button { min-width: 44px; min-height: 44px; border: 1px solid rgba(204, 245, 255, .52); border-radius: 8px; background: rgba(4, 30, 47, .88); color: #f4fff9; cursor: pointer; font-weight: 800; }
#action-controls button:focus-visible, .dock-button:focus-visible, .panel button:focus-visible { outline: 3px solid #ffd36b; outline-offset: 2px; }
.panel { position: absolute; left: 50%; top: 50%; width: min(430px, calc(100% - 32px)); transform: translate(-50%, -50%); border: 1px solid rgba(180, 236, 255, .52); border-radius: 10px; background: rgba(3, 20, 36, .93); padding: 26px; text-align: center; box-shadow: 0 20px 56px rgba(0, 0, 0, .42); }
.panel.compact { width: min(360px, calc(100% - 32px)); }
.panel h1, .panel h2 { margin: 8px 0 10px; color: #f8fffb; font-size: 30px; letter-spacing: .3px; }
.panel h2 { font-size: 25px; }
.panel p { color: #c4e3eb; font-size: 15px; line-height: 1.45; margin: 10px 0; }
.panel .controls-copy { color: #8dc5d9; font-size: 13px; }
.primary { border: 0; border-radius: 8px; min-height: 48px; padding: 0 18px; background: #61e6b2; color: #062018; cursor: pointer; font-weight: 900; }
.result-actions { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.result-actions button { padding: 0 14px; }
.result-actions button.primary { background: #61e6b2; color: #062018; border-color: transparent; }
.result-actions button[hidden] { display: none; }
.best-result { color: #ffd36b !important; font-weight: 800; }
#dock-controls { position: absolute; left: 50%; bottom: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: min(560px, calc(100% - 32px)); transform: translateX(-50%); }
.dock-button { min-height: 54px; border: 1px solid rgba(151, 214, 236, .44); border-radius: 8px; background: rgba(4, 29, 44, .9); color: #c6eaf4; cursor: pointer; font-weight: 900; letter-spacing: 1px; touch-action: manipulation; }
.dock-button[data-selected="true"] { border-color: #ffcf62; background: #704f1d; color: #fff3c5; box-shadow: 0 0 0 2px rgba(255, 207, 98, .18); }
.dock-button[data-flash="true"] { background: #e0f8f0; color: #08241d; }
#toast { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%); margin: 0; border-radius: 999px; background: rgba(1, 12, 22, .82); color: #f7fffc; padding: 7px 13px; font-size: 12px; font-weight: 800; letter-spacing: .5px; pointer-events: none; }
body[data-game-state="ready"] #hud, body[data-game-state="ready"] #action-controls { opacity: .42; }
body[data-game-state="ready"] #dock-controls, body[data-game-state="paused"] #dock-controls, body[data-game-state="crashed"] #dock-controls, body[data-game-state="complete"] #dock-controls { visibility: hidden; }
@media (orientation: landscape) { #stage { width: 177.7778vh; height: 100vh; } }
@media (max-width: 600px) { #hud { inset: 8px 8px auto; gap: 4px; } #hud div { border-radius: 6px; padding: 4px 5px; } #hud span { font-size: 7px; letter-spacing: .6px; } #hud strong { font-size: 13px; } #action-controls { right: 8px; top: 58px; gap: 5px; } #action-controls button { min-width: 44px; min-height: 44px; } #dock-controls { bottom: 7px; width: calc(100% - 16px); gap: 4px; } .dock-button { min-height: 44px; border-radius: 6px; font-size: 11px; } #toast { bottom: 60px; font-size: 9px; padding: 5px 9px; } .panel { padding: 16px; } .panel h1 { font-size: 23px; } .panel h2 { font-size: 20px; } .panel p { font-size: 12px; margin: 7px 0; } .panel .controls-copy { font-size: 10px; } .primary { min-height: 44px; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
