:root{color-scheme:dark;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#06275b;color:#f4f8ff}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 0,#146ddd,transparent 65%),#06275b}main{max-width:780px;margin:auto;padding:16px 20px max(24px,env(safe-area-inset-bottom))}header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}header>div{text-align:center}.eyebrow{font-size:9px;letter-spacing:1.5px;font-weight:800;color:#acd9ff}h1{font-size:36px;line-height:1;margin:7px 0 0;letter-spacing:-1.5px;color:#7de0ff;text-shadow:0 2px 0 #073378,0 4px 0 #031d48}h1 span{color:#ffd15a}.back{color:#c2e6ff;text-decoration:none;font-size:13px}button{font:inherit;color:inherit;border:2px solid #52beff;background:linear-gradient(#189eff,#0860ce);border-radius:14px;cursor:pointer;min-height:44px;padding:10px 16px;font-weight:800;touch-action:none;-webkit-user-select:none;user-select:none;box-shadow:0 4px 0 #03285d,inset 0 2px 0 #9ddfff66}button:disabled{opacity:.45}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #ffe583;outline-offset:4px}.scoreboard{display:flex;justify-content:space-between;gap:8px;background:linear-gradient(#07448e,#063474);border:2px solid #2585d9;border-radius:14px 14px 0 0;padding:10px 18px;font-size:9px;letter-spacing:1px;color:#bfe9ff}.scoreboard strong{display:block;font-size:22px;letter-spacing:1px;color:#fff;margin-top:3px;font-variant-numeric:tabular-nums}.scoreboard #best{color:#ffd566}.scoreboard #lives{color:#ff85af;font-size:20px}.cabinet{position:relative;overflow:hidden;border:2px solid #2585d9;border-top:0;background:#073d82;border-radius:0 0 16px 16px;box-shadow:0 12px 35px #00163866}#canvas{display:block;width:100%;height:auto;aspect-ratio:768/720;touch-action:none}.overlay{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:25px;background:linear-gradient(#06245acf,#063473ed);backdrop-filter:blur(3px)}[hidden]{display:none!important}.overlay h2{font-size:clamp(26px,5vw,44px);line-height:1.1;letter-spacing:-1px;margin:14px 0;color:#ffe58b}.overlay p{max-width:420px;color:#d4eaff;line-height:1.6;font-size:15px;margin:0 0 20px}.lesson{display:flex;align-items:center;gap:15px;margin:4px 0 24px;font-size:12px;font-weight:800;color:#97ff98}.lesson b{color:#80c7ff}.primary{background:linear-gradient(#87f15a,#29bc43);color:#08361c;box-shadow:0 5px 0 #07622f,inset 0 2px #e0ffc8;border-color:#b4ff87;padding:14px 28px;font-size:16px}.overlay small{font-size:11px;color:#add6f5;margin-top:22px}.touch{display:flex;justify-content:space-between;gap:20px;margin-top:16px;touch-action:none}.touch>div{display:flex;gap:12px}.touch button{width:82px;height:70px;font-size:28px;border-radius:22px;border-bottom:4px solid #074381}.touch .jump{width:132px;color:#fff;font-size:20px;border-color:#b5ff80;border-bottom-color:#10642f;background:linear-gradient(#75e84b,#20b442);box-shadow:0 4px 0 #064c29,inset 0 2px #d5ffaf}.touch button.held{transform:translateY(3px);filter:brightness(1.15);box-shadow:0 1px 0 #03285d}.tip{font-size:12px;text-align:center;line-height:1.5;color:#c3e4ff;margin:14px 0}details{color:#c7dff5;border-top:1px solid #3b7ab8;margin-top:20px;padding-top:16px;font-size:13px;line-height:1.6}summary{cursor:pointer;color:#e8f5ff;font-weight:700}.characters{margin-top:24px}.characters h2{font-size:16px;margin:0}.characters>p{font-size:12px;color:#b6d9fb;margin:6px 0 12px}.character-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.character-option{display:flex;flex-direction:column;align-items:center;padding:10px 5px;touch-action:manipulation}.character-option canvas{display:block;width:120px;max-width:100%;height:81px;touch-action:auto}.character-option strong{font-size:13px}.character-option span{font-size:10px;color:#bfddff;margin-top:4px}.character-option[aria-pressed=true]{border-color:#ffe483;background:linear-gradient(#167caa,#0a516f);box-shadow:0 0 0 1px #ffe483}
@media(max-width:600px){main{padding:12px 10px max(20px,env(safe-area-inset-bottom))}h1{font-size:28px}.eyebrow{font-size:8px;letter-spacing:1px}.back{font-size:11px}header button{padding:8px 10px;font-size:12px}.scoreboard{padding:8px 12px;font-size:8px}.scoreboard strong{font-size:18px}.scoreboard #lives{font-size:16px}.overlay{padding:18px}.overlay p{font-size:12px;line-height:1.5;margin-bottom:14px}.overlay h2{margin:10px 0}.lesson{font-size:10px;gap:10px;margin-bottom:16px}.overlay small{margin-top:16px;font-size:9px}.primary{padding:12px 24px;font-size:14px}.touch{margin-top:12px}.touch button{width:72px;height:66px}.tip{font-size:10px;margin:12px 0}}
@media(pointer:coarse){html.game-active{overflow:hidden;overscroll-behavior:none;touch-action:none}html.game-active body{position:fixed;inset:0;overflow:hidden;width:100%;overscroll-behavior:none;touch-action:none}html.game-active main{display:flex;flex-direction:column;height:100vh;height:100dvh;max-width:780px;padding:max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}html.game-active header{flex:none;margin-bottom:8px}html.game-active .scoreboard{flex:none;padding:7px 12px}html.game-active .cabinet{flex:0 1 auto;min-height:0;width:100%;aspect-ratio:768/720;margin:0;display:flex;align-items:center;justify-content:center}html.game-active #canvas{height:100%;width:100%;object-fit:contain;aspect-ratio:auto;background:#073d82}html.game-active .touch{flex:none;margin-top:10px}html.game-active .touch button{height:62px}html.game-active .tip{flex:none;font-size:10px;margin:8px 0 0}html.game-active .characters,html.game-active main>details,html.game-active .game-guide,html.game-active .share-panel{display:none}}
@media(orientation:landscape) and (max-height:600px){main{max-width:760px;padding:8px 95px}header{margin-bottom:6px}h1{font-size:22px}.eyebrow{display:none}.scoreboard{padding:5px 12px}.scoreboard strong{font-size:14px}.scoreboard #lives{font-size:14px}.cabinet{max-width:420px;margin:auto}#canvas{max-height:calc(100dvh - 105px);object-fit:contain}.touch{position:fixed;inset:auto 10px 18px;pointer-events:none}.touch button{pointer-events:auto;width:72px;height:54px}.touch>div{flex-direction:column;gap:8px}.touch .jump{width:84px;height:80px}.tip,details,.characters{display:none}.overlay h2{font-size:25px}.overlay p{font-size:11px}.lesson{display:none}.overlay small{margin-top:12px}}
@media(pointer:coarse) and (orientation:landscape) and (max-height:600px){html.game-active main{padding-left:max(95px,env(safe-area-inset-left));padding-right:max(95px,env(safe-area-inset-right))}html.game-active .cabinet{max-width:none;flex:1;aspect-ratio:auto}html.game-active #canvas{max-height:none}html.game-active .touch{position:fixed;inset:auto max(10px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));pointer-events:none}html.game-active .touch>div{flex-direction:column}html.game-active .touch .jump{width:80px;height:80px}}
@media(prefers-reduced-motion:reduce){.touch button.held{transform:none}}
