:root{--sky: #7ec8ff;--sun: #ffe08a;--orange: #ff7a18;--blue: #1ea7fd;--navy: #12355b;--panel: rgba(255, 255, 255, .92);--ink: #16324f;--shadow: 0 12px 0 rgba(18, 53, 91, .18)}*{box-sizing:border-box}html,body{margin:0;height:100%;height:100dvh;overflow:hidden}body{font-family:Nunito,Trebuchet MS,sans-serif;color:var(--ink);background:#12355b}#game{position:fixed;inset:0;width:100%;height:100%;display:block;touch-action:none}#ui{position:fixed;inset:0;pointer-events:none;z-index:2}#ui .screen,#ui button,#ui select,#ui input,#ui a,#ui .touch-stick,#ui .touch-actions{pointer-events:auto}#ui .hud{pointer-events:none}.screen{position:absolute;inset:0;display:none;align-items:flex-start;justify-content:center;padding:64px 20px 32px;overflow-y:auto;background:radial-gradient(circle at 18% 18%,#ffe08a 0 120px,transparent 121px),radial-gradient(circle at 88% 8%,#7ec8ff 0 140px,transparent 141px),linear-gradient(160deg,#4cc9f0,#b8f2e6 50%,#ffe08a)}.screen.active{display:flex}.screen.overlay{background:#0c1c307a;backdrop-filter:blur(6px)}.panel{width:min(880px,100%);background:var(--panel);border:6px solid #fff;border-radius:28px;box-shadow:var(--shadow),0 0 0 6px #1ea7fd40;padding:28px;margin-bottom:24px}.logo{text-align:center}.logo h1{font-family:Fredoka,Nunito,sans-serif;font-size:clamp(2.1rem,5vw,3.8rem);margin:0;color:#fff;text-shadow:0 4px 0 #1ea7fd,0 8px 0 #12355b}.logo p{margin:6px 0 18px;font-weight:800;color:var(--navy)}.menu-grid,.mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.big-btn,.plane-card,.key-row{font:inherit;font-weight:800;border:0;border-radius:18px;padding:14px 16px;cursor:pointer;box-shadow:0 6px #12355b2e}.big-btn{background:#ffd54a;color:var(--navy)}.big-btn[hidden]{display:none!important}.big-btn:disabled{opacity:.45;cursor:default}.b-play{background:#3ddc97}.b-ghost{background:#e8eef5}.b-set{background:#1ea7fd;color:#fff}.b-cred{background:#ff9bb3}.plane-card{display:flex;flex-direction:column;gap:4px;text-align:left;background:#fff;border:3px solid #d7e6f5}.plane-card.on{border-color:#1ea7fd;background:#e8f6ff}.spawn-label{margin:0 0 8px;font-weight:800}.spawn-grid{margin-bottom:14px}.spawn-btn.on{background:#3ddc97;box-shadow:0 6px #12355b2e,0 0 0 3px #12355b}.plane-card small{color:#5c6b73}.row{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}.opt{display:flex;flex-direction:column;gap:4px;font-weight:800}.opt-toggle{flex-direction:row;align-items:center;gap:8px;background:#fff;border:3px solid #d7e6f5;border-radius:14px;padding:10px 14px}.opt-toggle input{width:18px;height:18px;accent-color:#1ea7fd}.opt select{font:inherit;font-weight:800;border:3px solid #d7e6f5;border-radius:12px;padding:8px 10px;background:#fff;color:var(--navy)}.swatch{width:28px;height:28px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 2px #12355b33;cursor:pointer}.swatches{display:flex;gap:8px;margin:6px 0 12px}.back-site{position:absolute;top:14px;left:16px;z-index:40;color:var(--navy);font-weight:800;text-decoration:none;background:#fffc;padding:6px 12px;border-radius:999px;pointer-events:auto;cursor:pointer}.hud{display:none;position:absolute;inset:0;pointer-events:none}.hud.active{display:block}.hud-top{position:absolute;top:14px;left:50%;transform:translate(-50%);display:flex;gap:10px;align-items:center}.chip{background:#12355bb8;color:#fff;padding:6px 12px;border-radius:999px;font-weight:800;font-size:.92rem}.hud-left,.hud-right{position:absolute;top:64px;display:flex;flex-direction:column;gap:8px}.hud-left{left:16px}.hud-right{right:16px;align-items:flex-end}.dial{width:120px;background:#12355bb3;color:#fff;border-radius:16px;padding:10px 12px}.dial b{display:block;font-size:1.6rem;line-height:1}.dial span{font-size:.75rem;opacity:.8}.engine{height:8px;background:#fff3;border-radius:8px;overflow:hidden;margin-top:6px}.engine i{display:block;height:100%;background:#3ddc97;width:0}.attitude{width:88px;height:88px;border-radius:50%;overflow:hidden;border:4px solid #fff;position:relative}.attitude i{position:absolute;inset:-30%;background:linear-gradient(#7ec8ff 50%,#c4a574 50%)}#minimap{width:180px;height:180px;border-radius:50%}#compass{width:118px;height:118px;border-radius:50%}.nav-dial{min-width:160px}#hud-nav{display:flex;flex-direction:column;gap:3px;margin-top:4px;font-size:.78rem}#hud-nav div{display:flex;justify-content:space-between;gap:8px}#hud-nav span{opacity:.85;font-weight:700}.help{position:absolute;bottom:12px;left:50%;transform:translate(-50%);background:#12355b8c;color:#fff;padding:6px 12px;border-radius:999px;font-size:.78rem;font-weight:700}#hud-crash{display:none;position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);background:#e63946;color:#fff;padding:16px 22px;border-radius:18px;font-weight:900}#hud-crash.show{display:block}.crash-touch{display:none}#hud-hint{bottom:44px}.touch-pad{display:none;position:absolute;inset:0;pointer-events:none;z-index:6}.touch-stick{pointer-events:auto;position:absolute;left:max(10px,env(safe-area-inset-left));bottom:max(14px,env(safe-area-inset-bottom));width:138px;height:138px;display:flex;flex-direction:column;align-items:center;gap:4px;touch-action:none;user-select:none;-webkit-user-select:none}.touch-stick-base{width:118px;height:118px;border-radius:50%;background:#12355b6b;border:3px solid rgba(255,255,255,.55);position:relative;box-shadow:0 8px #12355b2e}.touch-stick-base i{position:absolute;left:50%;top:50%;width:48px;height:48px;margin:-24px 0 0 -24px;border-radius:50%;background:#ffd54a;border:3px solid #fff;box-shadow:0 4px #12355b40}.touch-stick span{color:#fff;font-size:.72rem;font-weight:800;text-shadow:0 1px 0 #12355b}.touch-actions{pointer-events:auto;position:absolute;right:max(10px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:8px;align-items:stretch;width:148px}.touch-row{display:flex;gap:8px}.touch-btn{flex:1;min-height:48px;border:0;border-radius:14px;background:#ffffffeb;color:var(--navy);font:inherit;font-weight:800;font-size:.92rem;box-shadow:0 5px #12355b33;touch-action:manipulation;user-select:none;-webkit-user-select:none}.touch-btn:active,.touch-stick-base:active{transform:translateY(2px);box-shadow:0 3px #12355b2e}.touch-gas{background:#3ddc97;min-height:52px}.touch-reset{background:#ffd54a}.touch-wide{width:100%}.hud-audio{pointer-events:auto;position:absolute;top:14px;right:16px;display:flex;gap:8px;z-index:4}.pause-btn,.audio-btn{background:#fff;border:0;border-radius:12px;font-weight:800;padding:8px 12px;cursor:pointer;font:inherit;color:var(--navy)}.audio-btn.off{opacity:.45;text-decoration:line-through}.key-row{display:flex;justify-content:space-between;background:#fff}.key-row code{background:#12355b;color:#fff;padding:2px 8px;border-radius:8px}#ui #screen-editor{pointer-events:none;background:transparent;padding:56px 16px 16px;overflow:hidden;justify-content:flex-start}.editor-dock{pointer-events:auto;width:min(340px,100%);max-height:calc(100vh - 80px);overflow-y:auto;background:var(--panel);border:6px solid #fff;border-radius:24px;box-shadow:var(--shadow);padding:16px 16px 12px}.editor-dock h2{margin:0 0 6px}.editor-hint{margin:0 0 10px;font-size:.82rem;font-weight:700;color:#5c6b73}.editor-list{display:flex;flex-direction:column;gap:4px;max-height:180px;overflow-y:auto;margin-bottom:10px}.editor-list button{text-align:left;border:0;border-radius:12px;padding:7px 10px;background:#e8eef5;font:inherit;font-weight:800;cursor:pointer}.editor-list button.on{background:#3ddc97}.editor-marquee{display:none;position:fixed;border:2px dashed #1ea7fd;background:#1ea7fd29;pointer-events:none;z-index:50}.editor-dock input[type=text],.editor-dock select{font:inherit;font-weight:800;border:3px solid #d7e6f5;border-radius:12px;padding:8px 10px;width:100%}@media(max-width:700px){.menu-grid,.mode-grid{grid-template-columns:1fr}.desk-help{display:none}.screen{padding:52px 12px 24px}.panel{padding:18px 14px;border-radius:22px}.big-btn{min-height:48px}}html.touch-play .hud.active .touch-pad{display:block}html.touch-play .hud-right .dial,html.touch-play #minimap,html.touch-play .attitude,html.touch-play .desk-help,html.touch-play .crash-desk{display:none}html.touch-play .crash-touch{display:inline}html.touch-play .hud-left{top:58px;left:8px;gap:6px}html.touch-play .hud-left .dial{width:92px;padding:7px 9px}html.touch-play .hud-left .dial b{font-size:1.2rem}html.touch-play .hud-right{top:58px;right:8px}html.touch-play #compass{width:96px;height:96px}html.touch-play #hud-hint{inset:52px auto auto 50%;transform:translate(-50%);max-width:min(70vw,280px);text-align:center;font-size:.72rem;padding:5px 10px;display:block}html.touch-play .hud-audio{top:8px;right:8px;gap:6px}html.touch-play .audio-btn,html.touch-play .pause-btn{padding:7px 9px;font-size:.78rem}html.touch-play .hud-top{top:8px;left:8px;transform:none;max-width:46vw;flex-wrap:wrap;gap:4px}html.touch-play .chip{font-size:.72rem;padding:4px 8px}html.touch-play .back-site{display:none}@media(orientation:landscape)and (max-height:500px){html.touch-play .hud-left .dial:nth-child(3){display:none}html.touch-play #compass{width:72px;height:72px}html.touch-play .touch-stick{width:112px;height:112px}html.touch-play .touch-stick-base{width:96px;height:96px}html.touch-play .touch-actions{width:128px}html.touch-play .touch-btn{min-height:40px;font-size:.8rem}html.touch-play #hud-hint{top:8px}}
