*{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{touch-action:none;overscroll-behavior:none;-webkit-user-select:none;user-select: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:14px}#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:10px;display:flex;position:absolute;top:8px;left:50%;transform:translate(-50%)}#touch .sbtn{pointer-events:auto;color:#fff;background:#08142099;border:1px solid #fff6;border-radius:10px;width:40px;height:40px;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}}
