*{box-sizing:border-box}html,body{color:#e8f1f7;background:#0b3a5c;height:100%;margin:0;font-family:system-ui,sans-serif;overflow:hidden}canvas{outline:none;display:block}#menu{background:radial-gradient(#0b3a5c8c,#040e18e6);justify-content:center;align-items:center;display:flex;position:fixed;inset:0}#menu[hidden]{display:none}.card{background:#081420eb;border-radius:16px;width:min(380px,92vw);padding:28px;box-shadow:0 20px 60px #00000080}h1{letter-spacing:.2em;margin:0;font-size:34px}.sub{color:#9fb7c9;margin:4px 0 20px}label{color:#9fb7c9;margin:14px 0 6px;font-size:13px;font-weight:600;display:block}input{color:#fff;background:#0f2638;border:1px solid #2c4a63;border-radius:8px;width:100%;padding:10px 12px;font-size:16px}input:focus,button:focus-visible{outline-offset:2px;outline:2px solid #4fc3f7}#colors{flex-wrap:wrap;gap:8px;display:flex}.swatch{cursor:pointer;border:3px solid #0000;border-radius:50%;width:34px;height:34px}.swatch.selected{border-color:#fff}#start{color:#04202f;cursor:pointer;background:#4fc3f7;border:0;border-radius:10px;width:100%;margin-top:22px;padding:12px;font-size:18px;font-weight:700}#start:hover{background:#81d4fa}.keys{border-collapse:collapse;width:100%;margin-top:18px;font-size:13px}.keys td{color:#cfe0ec;padding:4px 0}.keys td:first-child{width:45%;font-family:ui-monospace,monospace}.hint{color:#9fb7c9;margin-top:12px;font-size:12px}html,body{overscroll-behavior:none;-webkit-user-select:none;user-select:none}#menu,#tutorial{touch-action:pan-x pan-y pinch-zoom}canvas,body.playing{touch-action:none}#menu{padding:12px 0;overflow-y:auto}#touch{pointer-events:none;display:none;position:fixed;inset:0}#touch .stick-zone{pointer-events:auto;touch-action:none;width:45%;height:65%;position:absolute;bottom:0;left:0}#touch .stick-base{background:#ffffff14;border:2px solid #ffffff4d;border-radius:50%;width:130px;height:130px;position:absolute;top:calc(100% - 110px);left:110px;transform:translate(-50%,-50%)}#touch .stick-base.active{background:#ffffff24}#touch .stick-knob{background:#4fc3f7bf;border:2px solid #fffc;border-radius:50%;width:58px;height:58px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#touch .btns{pointer-events:none;width:220px;height:200px;position:absolute;bottom:14px;right:74px}#touch .throttle{pointer-events:auto;touch-action:none;-webkit-tap-highlight-color:transparent;background:#08142073;border:2px solid #fff9;border-radius:14px;width:54px;height:min(250px,100vh - 54px - clamp(100px,30vh,150px));position:absolute;bottom:14px;right:8px;overflow:hidden}#touch .throttle.down{background:#08142099;border-color:#fff}#touch .thr-fill{background:linear-gradient(#4fc3f7b3,#4fc3f759);height:50%;position:absolute;bottom:0;left:0;right:0}#touch .thr-handle{height:14px;left:4px;right:4px;bottom:calc(10px + var(--thr,.5) * (100% - 20px) - 7px);z-index:2;background:#fff;border-radius:6px;position:absolute;box-shadow:0 0 6px #0009}#touch .thr-ab{z-index:1;border-bottom:2px dashed #ffab40e6;height:16%;position:absolute;top:0;left:0;right:0}#touch .thr-ab-left{height:100%;width:calc(var(--ab,1) * 100%);background:#ff91008c;position:absolute;bottom:0;left:0}#touch .thr-ab b{text-align:center;color:#fff;text-shadow:0 0 3px #000;font:900 11px system-ui,sans-serif;position:absolute;bottom:2px;left:0;right:0}#touch .throttle.ab-locked .thr-ab-left{background:#8c8c8c99}#touch .throttle.ab-on .thr-ab-left{background:#ff5200d9}#touch .throttle.ab-on .thr-handle{background:#ffab40}#touch .throttle span{text-align:center;color:#fff;text-shadow:0 0 3px #000;pointer-events:none;white-space:nowrap;font:800 9px system-ui,sans-serif;position:absolute;bottom:3px;left:0;right:0;overflow:hidden}body.swap #touch .stick-zone{left:auto;right:0}body.swap #touch .stick-base{left:calc(100% - 110px)}body.swap #touch .throttle{left:8px;right:auto}body.swap #touch .btns{left:74px;right:auto;transform:scaleX(-1)}body.swap #touch .btns .tbtn>*{transform:scaleX(-1)}#touch .tbtn{pointer-events:auto;touch-action:none;color:#fff;letter-spacing:.04em;-webkit-tap-highlight-color:transparent;border:2px solid #ffffffb3;border-radius:50%;font:800 13px system-ui,sans-serif;position:absolute}#touch .tbtn.down{filter:brightness(1.4);transform:scale(.92)}#touch .gun{background:#ff52528c;width:110px;height:110px;font-size:16px;bottom:0;right:0}#touch .missile{background:#ff70438c;width:82px;height:82px;bottom:6px;right:118px}#touch .flare{color:#222;background:#ffd74080;width:72px;height:72px;bottom:120px;right:22px}#touch .topbtns{gap:8px;display:flex;position:absolute;top:8px;right:calc(32px + clamp(100px,30vh,150px))}#touch .sbtn{pointer-events:auto;color:#fff;background:#08142099;border:1px solid #fff6;border-radius:10px;width:36px;height:36px;font-size:18px}#rotate{z-index:10;text-align:center;color:#fff;background:#040e18f2;justify-content:center;align-items:center;padding:30px;font:700 20px system-ui,sans-serif;display:none;position:fixed;inset:0}@media (orientation:portrait) and (pointer:coarse){body.playing #rotate{display:flex}}.touch-only{display:none}body.is-touch .touch-only{display:block}body.is-touch .keys-only{display:none}#menu{align-items:flex-start}#menu .card{margin:auto}@media (height<=500px){.card{padding:16px 22px}h1{font-size:24px}.sub{margin-bottom:8px}label{margin:8px 0 4px}.swatch{width:28px;height:28px}#start{margin-top:12px;padding:10px}}.mp-only{display:none!important}#touch .bomb{background:#78909c99;width:66px;height:66px;font-size:12px;bottom:98px;right:120px}#touch .btns{height:210px}#langs{flex-wrap:wrap;justify-content:center;gap:6px;margin-bottom:14px;display:flex}#langs button{cursor:pointer;background:#ffffff0f;border:2px solid #0000;border-radius:6px;width:38px;height:28px;padding:2px;line-height:0}#langs button svg{border-radius:3px;width:100%;height:100%}#langs button[aria-checked=true]{background:#4fc3f733;border-color:#4fc3f7}#langs button:focus-visible{outline-offset:2px;outline:2px solid #4fc3f7}#lang-name{text-align:center;color:#9fb7c9;margin:-8px 0 8px;font-size:12px}.keys td{text-align:start;padding:4px 6px}.keys td:first-child{white-space:nowrap}.hint,.sub{text-align:start}#touch .tbtn{flex-direction:column;justify-content:center;align-items:center;gap:1px;padding:0;display:flex}#touch .tbtn svg{pointer-events:none;width:52%;height:auto}#touch .tbtn span{letter-spacing:0;pointer-events:none;white-space:nowrap;text-overflow:ellipsis;max-width:90%;font:700 10px/1 system-ui,sans-serif;overflow:hidden}#touch .gun span{font-size:12px}#touch .flare svg path,#touch .flare svg circle{fill:#3a2f00}#touch .flare svg circle[fill=\#ffe082]{fill:#fff3c4}#diff{gap:6px;display:flex}#diff button{color:#cfe0ec;cursor:pointer;background:#0f2638;border:1px solid #2c4a63;border-radius:8px;flex:1;padding:8px 4px;font:600 14px system-ui,sans-serif}#diff button[aria-checked=true]{color:#04202f;background:#4fc3f7;border-color:#4fc3f7}#help{margin-top:14px}#help summary{cursor:pointer;color:#4fc3f7;font-size:14px;font-weight:700}@media (height<=500px){#help .keys{font-size:12px}}.check{color:#cfe0ec;cursor:pointer;align-items:center;gap:8px;margin-top:14px;font-size:14px;display:flex}.check input{accent-color:#4fc3f7;width:20px;height:20px;margin:0}.link-btn{color:#4fc3f7;cursor:pointer;background:0 0;border:1px solid #4fc3f7;border-radius:8px;margin:10px 0 0;padding:8px 14px;font:700 14px system-ui,sans-serif;display:block}#ios-hint{color:#ffd740}#tutorial{z-index:20;background:#040e18e0;justify-content:center;align-items:center;padding:12px;display:flex;position:fixed;inset:0}#tutorial[hidden]{display:none}#tutorial .tcard{color:#e8f1f7;text-align:center;background:#0b2030;border:1px solid #2c4a63;border-radius:16px;width:min(560px,100%);max-height:100%;padding:16px 18px;overflow-y:auto}#tut-pic svg{width:100%;height:auto;max-height:46vh;margin:0 auto;display:block}#tut-text{margin:12px 0 8px;font:700 20px/1.35 system-ui,sans-serif}#tut-dots{justify-content:center;gap:8px;margin-bottom:12px;display:flex}#tut-dots span{background:#2c4a63;border-radius:50%;width:10px;height:10px}#tut-dots span.on{background:#4fc3f7}#tutorial .tbtns{gap:10px;display:flex}#tutorial .tbtns button{cursor:pointer;border:1px solid #4fc3f7;border-radius:10px;flex:1;padding:12px;font:700 18px system-ui,sans-serif}#tut-skip{color:#4fc3f7;background:0 0}#tut-next{color:#04202f;background:#4fc3f7}@media (height<=500px){#tut-text{margin:6px 0;font-size:16px}#tut-pic svg{max-height:40vh}#tutorial .tbtns button{padding:8px;font-size:16px}}body.cb{--enemy:#ff9800;--crate:#eceff1;--crate-icon:#263238}body{--enemy:#ff5252;--crate:#2e7d32;--crate-icon:#fff}#menu .card{width:min(700px,94vw)}.mrow{grid-template-columns:1fr 1.25fr;gap:0 22px;display:grid}@media (width<=620px){.mrow{grid-template-columns:1fr}}#levelmap{background:#0b1c2a;border:1px solid #2c4a63;border-radius:10px;max-height:250px;padding:6px;overflow-y:auto}#levelmap .era{grid-template-columns:1fr repeat(4,44px);align-items:center;gap:4px;margin:3px 0;display:grid}#levelmap .era span{color:#9fb7c9;font-size:11px;line-height:1.1}#levelmap button{color:#e8f1f7;cursor:pointer;background:#12324a;border:1px solid #2c4a63;border-radius:6px;height:30px;padding:0;font:700 12px system-ui,sans-serif}#levelmap button.done{background:#1d5a3a;border-color:#2e7d4f}#levelmap button.cur{color:#04202f;background:#4fc3f7;border-color:#4fc3f7}#levelmap button:disabled{color:#4b6475;cursor:default;background:#0f1f2c}#levelmap .era.soon span{color:#4b6475}#menu #start{margin-top:12px}.overlay{z-index:15;background:#040e1899;justify-content:center;align-items:center;padding:12px;display:flex;position:fixed;inset:0}.overlay[hidden]{display:none}#pausemenu{background:0 0;align-items:flex-start;padding-top:8vh}.ocard{text-align:center;background:#0b2030;border:1px solid #2c4a63;border-radius:16px;width:min(520px,100%);max-height:100%;padding:16px 18px;overflow-y:auto;box-shadow:0 20px 60px #00000080}.ocard h2{margin:0 0 4px;font-size:24px}.ocard .sub{text-align:center;margin:0 0 12px}#ps-choices{grid-template-columns:1fr 1fr;gap:12px;display:grid}#ps-choices button{color:#e8f1f7;cursor:pointer;font:inherit;background:#0f2638;border:2px solid #2c4a63;border-radius:12px;padding:10px}#ps-choices button:hover,#ps-choices button:focus-visible{border-color:#4fc3f7}#ps-choices canvas{width:120px;height:90px;margin:0 auto;display:block}#ps-choices b{margin:6px 0 4px;font-size:17px;display:block}#ps-choices ul{color:#9fb7c9;margin:0;padding:0;font-size:13px;list-style:none}.bigbtn{color:#04202f;cursor:pointer;background:#4fc3f7;border:0;border-radius:10px;width:100%;margin-top:12px;padding:12px;font:700 18px system-ui,sans-serif;display:block}.ocard .link-btn{margin:12px auto 0}@media (height<=500px){#langs button{width:30px;height:22px}#lang-name,#menu .sub{display:none}#menu h1{margin-bottom:4px;font-size:20px}#menu label{margin:6px 0 4px}#menu input{padding:6px 10px}#diff button{padding:6px 4px}.check{margin-top:8px}#levelmap{max-height:150px}#menu #start{margin-top:8px;padding:8px;font-size:16px}#ps-choices canvas{width:90px;height:60px}.ocard{padding:10px 14px}.ocard h2{font-size:19px}}#hc-year{color:#4fc3f7;letter-spacing:2px;font:900 46px/1 system-ui,sans-serif}#hc-fact{margin:10px 0 4px;font-size:17px;line-height:1.4}#levelmap button{flex-direction:column;justify-content:center;align-items:center;line-height:1;display:flex}#levelmap button b{font-size:12px}#levelmap button i{color:#ffd740;letter-spacing:1px;margin-top:2px;font-size:9px;font-style:normal}#levelmap button.cur i{color:#04202f}@media (height<=500px){#hc-year{font-size:32px}#hc-fact{margin:6px 0 2px;font-size:15px}}.best{color:#ffd740;margin:22px 0 0;font:700 16px system-ui,sans-serif}#menu .mcol #start{margin-top:14px}#newgame{margin:10px 0 0}#newgame[hidden],#bestline[hidden]{display:none}#lp-list{grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:8px;margin:8px 0 4px;display:grid}#lp-list button{color:#fff;cursor:pointer;background:#12324a;border:1px solid #2c4a63;border-radius:10px;flex-direction:column;align-items:center;gap:2px;padding:8px 4px;font:800 18px system-ui,sans-serif;display:flex}#lp-list button small{color:#ffd740;font:600 11px system-ui,sans-serif}#lp-list button.top{background:#164466;border-color:#4fc3f7}#lp-list button:focus-visible{outline-offset:2px;outline:2px solid #4fc3f7}@keyframes flare-alert{0%,to{background:#ffd740d9;border-color:#fff;box-shadow:0 0 #ff5252e6}50%{background:#ff5252d9;border-color:#ff5252;box-shadow:0 0 0 14px #ff525200}}#touch .flare.alert{animation:.5s ease-in-out infinite flare-alert}@media (prefers-reduced-motion:reduce){#touch .flare.alert{background:#ff5252e6;border-width:4px;border-color:#fff;animation:none}}
