@font-face{font-family:Lilita;src:url('../assets/fonts/LilitaOne.woff2') format('woff2');font-display:swap}
@font-face{font-family:Fredoka;src:url('../assets/fonts/Fredoka-SemiBold.woff2') format('woff2');font-weight:600;font-display:swap}
@font-face{font-family:Fredoka;src:url('../assets/fonts/Fredoka-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
:root{--teal:#19d3c5;--aqua:#2ff0e0;--coral:#ff6b57;--sun:#ffd23f;--mango:#ff9a1f;--deep:#0b3954;--ink:#07263a;--white:#fffdf6;--muted:#bfe9ec}
/* Everything is scoped to #stage: portal ad overlays (Skip ad button) must keep the browser default look. */
html,body{width:100%;height:100%;margin:0;overflow:hidden;background:#06283a;touch-action:none;overscroll-behavior:none}
:where(#stage),:where(#stage) *{box-sizing:border-box}
:where(#stage){font-family:Lilita,'Arial Rounded MT Bold',Arial,sans-serif;color:var(--white);user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;letter-spacing:.5px}
:where(#stage) button{font:inherit;color:inherit;cursor:pointer;background:none;border:0;padding:0}
.hidden{display:none!important}
#stage{position:absolute;left:50%;top:50%;width:1280px;height:720px;transform:translate(-50%,-50%);overflow:hidden;background:#0b3954;outline:none}
#gl{position:absolute;inset:0;width:1280px;height:720px;display:block}
#hud{position:absolute;inset:0;width:1280px;height:720px;pointer-events:none;z-index:4}
.screen{position:absolute;inset:0;z-index:10}

/* buttons: round, chunky, sunny */
.btn{position:relative;display:flex;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:10px 22px;border:3px solid #ffffff;border-radius:18px;background:linear-gradient(180deg,#2fd6c8 0%,#0f9fa6 100%);box-shadow:0 6px 0 #0a5e6a,0 10px 18px #0006;font-size:22px;color:#fff;text-shadow:0 2px 0 #0a5462;transition:transform .1s,filter .1s}
.btn:hover,.btn.kbsel{filter:brightness(1.12);transform:translateY(-2px)}
.btn:active{transform:translateY(4px);box-shadow:0 2px 0 #0a5e6a}
.btn.primary{background:linear-gradient(180deg,#ffe066 0%,#ffb21f 55%,#ff8a1f 100%);border-color:#fff7d6;box-shadow:0 6px 0 #b8560a,0 0 26px #ffcf3f55,0 10px 18px #0006;color:#5a2400;text-shadow:0 2px 0 #ffeaa0}
.btn.small{font-size:17px;min-height:42px;padding:7px 16px;border-radius:14px;box-shadow:0 4px 0 #0a5e6a}
.btn.small.primary{box-shadow:0 4px 0 #b8560a}
.btn.subtle{background:linear-gradient(180deg,#2c5f78,#1b4258);border-color:#9fd6e4;box-shadow:0 5px 0 #0c2a3a;font-size:18px}
.btn[disabled]{opacity:.45;cursor:default;transform:none;filter:grayscale(.5)}
.kbsel{outline:4px solid #ffd400!important;outline-offset:3px;box-shadow:0 0 24px #ffd400aa!important}
.play-icon{width:0;height:0;border-top:11px solid transparent;border-bottom:11px solid transparent;border-left:17px solid currentColor;display:inline-block}
.icon-btn{width:48px;height:44px;border:3px solid #fff;border-radius:14px;background:#0f8f98cc;font-size:16px;color:#fff;box-shadow:0 4px 0 #0a5462}
.icon-btn.off{opacity:.45;text-decoration:line-through}

/* logo (text, until the ASTRA logo arrives) */
.logo-text{display:flex;flex-direction:column;align-items:flex-start;line-height:.82;font-weight:400;transform:rotate(-4deg)}
.logo-text span{font-size:1em;color:#fff;-webkit-text-stroke:6px #0b3954;paint-order:stroke fill;text-shadow:0 8px 0 #0b3954,0 12px 20px #0007}
.logo-text b{font-weight:400;font-size:1.32em;margin-left:.4em;background:linear-gradient(180deg,#fff27a 0%,#ffc21f 45%,#ff6b2b 100%);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-stroke:6px #5a1a00;paint-order:stroke fill;filter:drop-shadow(0 8px 0 #5a1a00) drop-shadow(0 12px 18px #0008)}

/* splash */
.splash{background:#0b3954 url('../assets/img/splash_bg.jpg') center/cover no-repeat}
.splash::before{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#062a3ccc 0%,#062a3c44 18%,transparent 34%);pointer-events:none}
.splash-logo{position:absolute;left:50%;top:22px;width:640px;transform:translateX(-50%);filter:drop-shadow(0 10px 18px #0007);animation:logoIn 1.1s cubic-bezier(.2,1.6,.4,1) both,bob 3.2s ease-in-out 1.1s infinite;pointer-events:none}
@keyframes logoIn{from{transform:translateX(-50%) scale(.3) rotate(-12deg);opacity:0}to{transform:translateX(-50%) scale(1);opacity:1}}
@keyframes bob{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(-8px) rotate(-1deg)}}
.enter-button{position:absolute;left:50%;bottom:96px;transform:translateX(-50%);width:470px;height:74px;font-size:28px;animation:pulse 1.6s ease-in-out infinite}
.enter-button:hover,.enter-button.kbsel{transform:translateX(-50%) translateY(-2px)}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.7}}
.mapi-logo{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);width:130px;height:62px;object-fit:contain;filter:drop-shadow(0 3px 4px #000)}

/* menu */
.menu{pointer-events:none;background:#0b3954 url('../assets/img/menu_bg.jpg') center/cover no-repeat}.menu button{pointer-events:auto}
.menu-shade{position:absolute;inset:0;background:linear-gradient(90deg,#063a4caa 0%,#063a4c66 30%,transparent 50%)}
.game-title{position:absolute;left:34px;top:8px;margin:0;width:400px;line-height:0}.game-title img{width:100%;filter:drop-shadow(0 8px 14px #0007)}
.tagline{position:absolute;left:48px;top:186px;margin:0;font-family:Fredoka,Arial;font-weight:600;font-size:16px;letter-spacing:2px;color:#e6fffb;text-shadow:0 2px 4px #0008}
.main-nav{position:absolute;left:44px;top:218px;width:390px;display:flex;flex-direction:column;gap:11px}
.main-nav .btn{height:52px;font-size:21px}
.main-nav .btn.primary{height:64px;font-size:30px}
.main-nav .row{display:flex;gap:10px}.main-nav .row .btn{flex:1;padding:8px 10px;font-size:19px}
.main-nav .tile{font-size:14px!important;min-height:44px;height:44px}
.menu-tools{position:absolute;right:22px;top:20px;display:flex;gap:8px}
.wallet{position:absolute;right:22px;top:76px;padding:8px 16px;border:3px solid #fff;border-radius:16px;background:linear-gradient(180deg,#ffe066,#ffb21f);color:#5a2400;font-size:18px;box-shadow:0 4px 0 #b8560a}.wallet b{font-size:22px}
.drone-spec{position:absolute;right:34px;top:132px;text-align:right;text-shadow:0 3px 6px #000a}.drone-spec span{font-family:Fredoka,Arial;font-weight:600;font-size:14px;letter-spacing:2px}.drone-spec strong{display:block;font-size:46px;font-weight:400;color:#fff;-webkit-text-stroke:4px #0b3954;paint-order:stroke fill}.drone-spec em{font-style:normal;color:var(--sun);font-size:.6em}.drone-spec div{font-family:Fredoka,Arial;font-weight:600;font-size:15px}.drone-spec i{display:inline-block;width:10px;height:10px;border-radius:50%;background:#7dff6a;box-shadow:0 0 9px #7dff6a;margin-right:4px}
.menu-mapi{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);width:104px;height:50px;object-fit:contain}
.fs-btn{position:absolute;left:44px;bottom:20px;pointer-events:auto}
.fs-icon{display:inline-block;width:20px;height:20px;flex:none;background:linear-gradient(currentColor,currentColor) 0 0/8px 3px,linear-gradient(currentColor,currentColor) 0 0/3px 8px,linear-gradient(currentColor,currentColor) 100% 0/8px 3px,linear-gradient(currentColor,currentColor) 100% 0/3px 8px,linear-gradient(currentColor,currentColor) 0 100%/8px 3px,linear-gradient(currentColor,currentColor) 0 100%/3px 8px,linear-gradient(currentColor,currentColor) 100% 100%/8px 3px,linear-gradient(currentColor,currentColor) 100% 100%/3px 8px;background-repeat:no-repeat}
.icon-btn .fs-icon{width:16px;height:16px;vertical-align:middle}

/* panels */
.panel{background:#04324466}
.panel-shell{position:absolute;inset:26px 40px;display:flex;flex-direction:column;border:4px solid #fff;border-radius:26px;background:linear-gradient(180deg,#0e6e7ef2,#0a4a62f2);box-shadow:0 12px 0 #062c3c,0 20px 40px #0008}
.panel-shell header{display:flex;justify-content:space-between;align-items:center;padding:16px 24px 10px;border-bottom:3px dashed #ffffff55}
.panel-shell h2{margin:0;font-size:40px;font-weight:400;color:#fff;-webkit-text-stroke:4px #0b3954;paint-order:stroke fill}.panel-shell header p{margin:2px 0 0;font-family:Fredoka,Arial;font-weight:600;color:#cdf7f2;font-size:15px;letter-spacing:1px}
.panel-body{flex:1;overflow:auto;padding:18px 24px}
.mission-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}
.mission-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:4px;height:226px;padding:12px;border:3px solid #fff;border-radius:18px;background:linear-gradient(170deg,#1fb8b0,#0b6a82);text-align:left;box-shadow:0 5px 0 #063a4c;transition:transform .1s;overflow:hidden}
.mission-card:hover,.mission-card.kbsel{transform:translateY(-3px)}
.mission-card.locked{filter:grayscale(1);opacity:.5}
.mnum{font-size:40px;color:var(--sun);line-height:1;-webkit-text-stroke:3px #5a2400;paint-order:stroke fill}.mname{font-size:19px;margin-top:52px}.mtarget{font-family:Fredoka,Arial;font-weight:600;font-size:13px;color:#fff3c4;letter-spacing:.5px}
.track-card .tthumb{position:absolute;right:6px;top:8px;width:150px;height:82px;object-fit:contain}
.mstars{margin-top:auto;font-size:22px}.mstars small{font-family:Fredoka,Arial;font-weight:600;font-size:14px;color:#e6fffb;margin-left:8px;vertical-align:middle}
.md{font-size:26px;color:#0a3a4c}.md.g{color:#ffd23f;text-shadow:0 0 10px #ffd23f}.md.s{color:#eef3f6}.md.b{color:#e0904e}
.cup-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;height:100%}
.cup-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;border:4px solid #fff;border-radius:24px;background:linear-gradient(170deg,var(--cc),#0b4a62 85%);box-shadow:0 6px 0 #063a4c;text-align:center;transition:transform .1s}
.cup-card:hover,.cup-card.kbsel{transform:translateY(-4px)}.cup-card.locked{filter:grayscale(1);opacity:.5}
.cup-ico{width:170px;height:170px;object-fit:contain;filter:drop-shadow(0 8px 6px #0006)}.cup-card b{font-size:36px;font-weight:400;-webkit-text-stroke:4px #0b3954;paint-order:stroke fill}.cup-card small{font-family:Fredoka,Arial;font-weight:600;font-size:16px;color:#fff;line-height:1.3}.cup-card em{font-style:normal;font-family:Fredoka,Arial;font-weight:600;font-size:14px;color:#fff3c4}
.cup-medal{padding:6px 14px;border-radius:12px;background:#0006;font-size:17px}.cup-medal.m3{color:#ffd23f}.cup-medal.m2{color:#eef3f6}.cup-medal.m1{color:#e0904e}
.hangar-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr 1fr;gap:12px;align-items:end}
.upg-card{padding:16px;border:3px solid #fff;border-radius:18px;background:linear-gradient(170deg,#1fb8b0f0,#0b5a72f0);display:flex;flex-direction:column;gap:10px;min-height:200px;box-shadow:0 5px 0 #063a4c}
.upg-card h3{margin:0;font-size:21px;font-weight:400}.upg-card p{margin:0;font-family:Fredoka,Arial;font-weight:600;color:#e6fffb;font-size:15px;flex:1}
.pips{display:flex;gap:5px}.pips i{flex:1;height:12px;border-radius:6px;background:#0a3a4c}.pips i.on{background:var(--sun);box-shadow:0 0 8px #ffd23f88}
.dc-art{display:block;width:250px;height:150px;object-fit:contain;margin:-96px auto -6px;filter:drop-shadow(0 8px 8px #0008);pointer-events:none}
.drone-card{padding:14px 16px;border:3px solid #fff;border-radius:18px;background:linear-gradient(170deg,#ff8a5af0,#c43c6af0);display:flex;flex-direction:column;gap:8px;box-shadow:0 5px 0 #5a1a3a}
.dc-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.dc-head div{text-align:center;flex:1}.dc-head span{display:block;font-family:Fredoka,Arial;font-weight:600;font-size:13px;letter-spacing:2px}.dc-head strong{font-size:32px;font-weight:400;-webkit-text-stroke:4px #3a0a20;paint-order:stroke fill}
.dc-head .arrow{min-width:46px;padding:6px}
.stat{display:flex;align-items:center;gap:10px}.stat span{width:86px;font-family:Fredoka,Arial;font-weight:600;font-size:14px}.stat .pips{flex:1;gap:3px}.stat .pips i{height:9px}
.settings{display:flex;flex-direction:column;gap:7px;max-width:760px;margin:0 auto}
.set-row{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;border:3px solid #ffffff66;border-radius:14px;background:#0a4a62}.set-row span{font-size:19px}.set-row .btn{min-width:250px;min-height:38px;height:40px}
.controls-grid{display:grid;grid-template-columns:1fr 1fr;gap:30px;font-family:Fredoka,Arial;font-weight:600;font-size:16px}.controls-grid h3{font-family:Lilita,Arial;font-weight:400;color:var(--sun);margin:6px 0;font-size:22px}.controls-grid ul{margin:0 0 10px;padding-left:18px;line-height:1.5;color:#effffd}.controls-grid b{color:#fff3c4}
.trophy-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.trophy{display:flex;flex-direction:column;gap:5px;padding:14px;border:3px solid #ffffff55;border-radius:16px;background:#0a4a62;opacity:.6;min-height:122px}.trophy.on{opacity:1;border-color:#ffd23f;background:linear-gradient(170deg,#c88a1a,#0a4a62)}.trophy span{font-size:28px;height:40px;line-height:40px}.trophy span img{width:40px;height:40px;object-fit:contain}.trophy small{font-family:Fredoka,Arial;font-weight:600;color:#e6fffb;font-size:14px}
.panel.hangar-mode{background:transparent}.panel.hangar-mode .panel-shell{background:linear-gradient(180deg,#0e6e7e55 0%,#0a4a6210 40%,#0a4a62f0 62%)}.panel.hangar-mode .panel-body{display:flex;flex-direction:column;justify-content:flex-end}

/* briefing */
.briefing{background:#04324499}
.brief-shell{position:absolute;inset:26px 40px;display:flex;gap:28px;padding:24px;border:4px solid #fff;border-radius:26px;background:linear-gradient(170deg,#0e6e7ef4,#0a4a62f4);box-shadow:0 12px 0 #062c3c}
.brief-left{flex:1;display:flex;flex-direction:column}.brief-num{color:var(--sun);letter-spacing:2px;font-size:20px}
.brief-left h2{margin:2px 0 8px;font-size:54px;font-weight:400;-webkit-text-stroke:5px #0b3954;paint-order:stroke fill}.brief-left p{margin:0 0 12px;font-family:Fredoka,Arial;font-weight:600;font-size:18px;line-height:1.4;color:#effffd}
.brief-left h3{margin:4px 0 4px;font-weight:400;color:var(--sun);font-size:20px;letter-spacing:1px}
.brief-left ul{margin:0 0 12px;padding-left:20px;font-family:Fredoka,Arial;font-weight:600;font-size:17px;line-height:1.55}
.brief-meta{display:flex;flex-wrap:wrap;gap:8px}.brief-meta span{padding:6px 12px;border:2px solid #ffffff66;border-radius:12px;background:#0a3a4c;font-family:Fredoka,Arial;font-weight:600;font-size:14px}.brief-meta b{color:#fff3c4;font-weight:600}
.brief-class{display:flex;align-items:center;gap:10px;margin:12px 0 auto}.brief-class>span{font-size:18px;margin-right:6px}.brief-class .btn{min-width:120px}
.brief-actions{display:flex;gap:14px;margin-top:16px}.brief-actions .btn{min-width:200px}
.brief-right{display:flex;flex-direction:column;align-items:center;gap:8px}.brief-right canvas{width:440px;height:440px;border:4px solid #fff;border-radius:22px;background:#0b5a7a;box-shadow:0 6px 0 #062c3c}.brief-right span{font-family:Fredoka,Arial;font-weight:600;font-size:13px;color:#e6fffb}

/* hud layer */
.hud-layer{position:absolute;inset:0;z-index:5;pointer-events:none}
.hud-buttons{position:absolute;right:22px;top:300px;display:flex;gap:6px;pointer-events:auto}
.hud-buttons .icon-btn{width:54px;height:38px;font-size:14px}

/* touch */
.touch{position:absolute;inset:0;z-index:6;pointer-events:none}
.tbtn{position:absolute;pointer-events:auto;touch-action:none;width:86px;height:86px;border-radius:50%;background:center/contain no-repeat;opacity:.88;transition:transform .06s,filter .06s}
.tbtn.down{transform:scale(.9);filter:brightness(1.35) drop-shadow(0 0 14px #ffd23f);opacity:1}
.tbtn.steer{bottom:36px;width:136px;height:136px}.tbtn.steer.left{left:30px;background-image:url('../assets/img/touch_left.png')}.tbtn.steer.right{left:182px;background-image:url('../assets/img/touch_right.png')}
.tbtn.brake{right:186px;bottom:36px;width:122px;height:122px;background-image:url('../assets/img/touch_brake.png')}
.tbtn.turbo{right:30px;bottom:48px;width:146px;height:146px;background-image:url('../assets/img/touch_turbo.png')}
.tbtn.item{right:72px;bottom:210px;width:104px;height:104px;background-image:url('../assets/img/touch_item.png')}

/* modals */
.modal{z-index:14;display:flex;align-items:center;justify-content:center;background:#04324499}
.modal-card{display:flex;flex-direction:column;gap:11px;min-width:420px;padding:24px 32px;border:4px solid #fff;border-radius:26px;background:linear-gradient(170deg,#0e7e8e,#0a4a62);text-align:center;box-shadow:0 12px 0 #062c3c}
.modal-card h2{margin:0;font-size:46px;font-weight:400;-webkit-text-stroke:5px #0b3954;paint-order:stroke fill}.modal-card p{margin:0 0 4px;color:#e6fffb;font-family:Fredoka,Arial;font-weight:600;font-size:17px}
.result-card{min-width:700px;max-height:700px}#result.fail h2{color:#ffb4a8}
.res-stars{font-size:34px}.medal{font-size:36px;letter-spacing:3px;color:#9fc8d0}.medal.m3{color:#ffd23f;text-shadow:0 0 18px #ffd23f}.medal.m2{color:#f2f6f8}.medal.m1{color:#ef9a56}
.res-table{width:100%;border-collapse:collapse;font-family:Fredoka,Arial;font-weight:600;font-size:17px}.res-table th{font-family:Lilita,Arial;font-weight:400;font-size:14px;color:#fff3c4;text-align:left;padding:3px 10px}
.res-table td{padding:4px 10px;border-top:2px solid #ffffff2a;text-align:left}.res-table tr.me td{background:#ffd23f44;color:#fff}.res-table td i{display:inline-block;width:8px;height:16px;border-radius:4px;margin-right:9px;vertical-align:middle}
.res-credits{margin-top:8px;color:#ffd23f;font-size:21px}
.res-actions{display:flex;gap:12px;justify-content:center;margin-top:6px}.res-actions .btn{min-width:170px}
.rotate{position:absolute;inset:0;z-index:30;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#0b3954;font-size:30px}.rotate div{font-size:80px}
.webgl-error{position:absolute;inset:0;z-index:40;padding:120px;background:#0b3954;font-family:Fredoka,Arial}
.loading{position:absolute;inset:0;z-index:35;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:#0b3954e8;font-size:30px;letter-spacing:2px}
.ld-spin{width:70px;height:70px;border-radius:50%;border:8px solid #ffffff33;border-top-color:#ffd23f;border-right-color:#2ff0e0;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.gpu-reset{position:absolute;inset:0;z-index:40;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:#0b3954f0;text-align:center}.gpu-reset h2{margin:0;font-size:38px;font-weight:400}.gpu-reset p{margin:0;font-family:Fredoka,Arial;font-size:20px}
@media (pointer:coarse){.hud-buttons{right:296px;top:22px}}
