@font-face{font-family:DIN;src:url('assets/din_pro_medium.otf')}@font-face{font-family:DIN;src:url('assets/din_pro_bold.otf');font-weight:700}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#030915;color:#eefaff;font-family:DIN,sans-serif}body{overflow-x:hidden}button,input{font:inherit}button{color:inherit;background:#0d1c2cc7;border:1px solid #829eaa;border-radius:10px;padding:10px 18px;font-weight:700;cursor:pointer;transition:background .15s,transform .15s}button:hover{background:#243e50}button:active{transform:scale(.96)}button:focus-visible{outline:3px solid #76ffc7;outline-offset:4px}button:disabled{opacity:.4;cursor:default}#space{position:fixed;inset:0;width:100%;height:100%;pointer-events:none}#app{position:relative;width:min(1080px,100%);margin:auto;padding:24px 32px 0}header{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:center}h1{font-size:26px;letter-spacing:2px;text-align:right;margin:0}#wallet{font-size:27px;font-weight:700}#lives{font-size:26px;letter-spacing:5px;white-space:nowrap}#lives .spent{opacity:.22}.tools{display:flex;justify-content:flex-end;gap:12px}#streak{height:34px;text-align:right;margin-top:8px}#content{min-height:63vh}.route{position:relative;max-width:840px;margin:0 auto;isolation:isolate}.planet-row{position:relative;height:260px;display:flex;align-items:center;justify-content:flex-start;padding:0 8%}.planet-row:nth-child(even){flex-direction:row-reverse}.planet-row .planet-label{margin:0 35px;min-width:165px}.planet-label h2{font-size:24px;letter-spacing:1px;margin:0 0 7px}.planet-label p{margin:0;font-size:14px;color:#bbd7e2}.planet-thumb{width:190px;height:190px;flex:none;border:0;padding:0;background:none!important;position:relative;border-radius:50%}.planet-thumb.current{width:230px;height:230px}.planet-thumb.current:before{content:'';position:absolute;inset:28px;border-radius:50%;background:#71ffe426;box-shadow:0 0 50px 15px #52d2ed38;animation:glow 2.6s ease-in-out infinite}.planet-thumb.perfect:before{background:#ffd84122;box-shadow:0 0 45px 15px #ffdb4d55}.planet-thumb.future{opacity:.30}.planet-thumb canvas{position:relative;width:100%;height:100%;z-index:1}.route-line{position:absolute;left:calc(50% - 210px);top:175px;width:420px;height:190px;z-index:-1;overflow:visible}.route-line path{fill:none;stroke:#668698;stroke-width:2;stroke-dasharray:5 11}.route-line.done path{stroke:#81ffbd;stroke-dasharray:none;filter:drop-shadow(0 0 5px #43fb99)}.route-bundle{position:absolute;bottom:-18px;left:calc(50% - 34px);font-size:22px;text-align:center}.route-bundle small{display:block;font-size:13px}.flag{position:absolute;z-index:2;left:46%;top:42%;color:#ff493e;font-size:38px;text-shadow:0 2px 3px #000}.current-ship{position:absolute;z-index:2;left:43%;top:35%;font-size:32px;animation:hover 3s ease-in-out infinite}nav{position:sticky;bottom:0;padding:10px 0;display:flex;gap:12px;background:linear-gradient(transparent,#030915 30%);z-index:3}nav button{flex:1;padding:15px;border-color:#455c70}nav button.selected{background:#16424b;border-color:#83eeeb}footer{display:flex;justify-content:space-between;color:#6f8b9e;font-size:12px;padding:10px 0 20px}.section-heading{display:flex;align-items:center;gap:18px;margin:6px 0 20px}.section-heading h2{margin:0}.mission-layout{display:grid;grid-template-columns:1fr 1fr;align-items:center;min-height:60vh}.mission-planet{height:330px}.mission-planet canvas{width:100%;height:100%}.mission-path{position:relative;height:450px}.mission-path svg{position:absolute;width:100%;height:100%}.mission-node{position:absolute;width:65px;height:65px;border-radius:50%;transform:translate(-50%,-50%);padding:0;background:#142d3e;font-size:22px}.mission-node:active{transform:translate(-50%,-50%) scale(.94)}.mission-node.active{background:#c9fff1;color:#071b22;box-shadow:0 0 24px #8bffcb8a}.mission-node.done{background:#1d674e}.online-card{position:relative;min-height:250px;border:2px solid #a4b6c7;border-radius:14px;margin:20px auto;background:#10273d66;overflow:hidden;padding:20px;max-width:800px}.online-card h2{font-size:26px;margin:0}.online-card p{position:absolute;bottom:10px;left:20px;margin:0}.online-card .spin-planet{width:210px;height:210px;margin:0 auto}.online-card canvas{width:100%;height:100%}.friends-card{min-height:220px;cursor:pointer}.subtle{color:#91aab9}#modal{position:fixed;inset:0;z-index:10;background:#000b;display:grid;place-items:center;padding:18px}#modal[hidden]{display:none}#modal>section{position:relative;border:1px solid white;border-radius:16px;background:#020609;padding:25px;width:min(580px,100%);max-height:92vh;overflow:auto;box-shadow:0 18px 90px #000a}.close{position:absolute;right:12px;top:8px;border:0;background:none;font-size:30px;padding:0 8px}.setting{display:flex;justify-content:space-between;align-items:center;padding:15px 0}.setting button.on{background:#1f7981}.store-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px 12px}.store-item{text-align:center}.store-item .icon{font-size:30px;height:45px}.store-item h3{font-size:15px;min-height:36px;margin:8px}.store-item button{width:100%;font-size:13px}.store-item small{display:block;color:#869eac;font-size:11px;margin-top:6px}.game #app{max-width:1260px;padding-top:12px}.game header,.game #streak,.game #tabs,.game footer{display:none}.game-shell{position:relative;height:calc(100dvh - 24px);min-height:600px}.game-hud{position:absolute;top:0;left:5%;right:5%;z-index:2;display:flex;align-items:center;gap:12px}.game-hud .balance{margin-left:auto;font-size:24px}.game-hud button{padding:9px 12px}.game-bar{position:absolute;top:62px;left:15%;width:70%;height:56px;border-radius:28px;border:3px solid #8ba9b5;box-shadow:inset 0 6px 8px #ffffff2a,inset 0 -10px 10px #0008,0 0 0 3px #213844;overflow:hidden;background:#263843;z-index:2}.liquid{height:100%;width:0;background:linear-gradient(#d7ff8e,#72f615 22%,#347a0b 80%,#81ff39);box-shadow:0 0 28px #7cff44;transition:width .45s;position:absolute}.game-bar span{position:absolute;inset:0;display:grid;place-items:center;font-size:29px;font-weight:700;text-shadow:0 2px 3px #000}.game-moves{position:absolute;top:135px;left:0;right:0;text-align:center;font-size:28px;font-weight:700;z-index:2}.board-canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:pinch-zoom}.bonus{position:absolute;top:52%;left:0;right:0;text-align:center;pointer-events:none;font-size:30px;font-weight:700;color:#bdfcff;text-shadow:0 0 15px #4fdbff;animation:pop .3s cubic-bezier(.2,1.7,.5,1)}.bonus small{display:block;font-size:23px;color:#fff}.tutorial-tip{position:absolute;top:185px;left:20%;right:20%;background:#061623eb;border:1px solid #7eb5c7;border-radius:12px;padding:13px;text-align:center;z-index:4;cursor:pointer}.paging{position:absolute;bottom:8px;left:0;right:0;text-align:center;color:#b3cddd;pointer-events:none;font-size:13px}#toast{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);z-index:20;background:#0e263b;border:1px solid #a1bccd;border-radius:10px;padding:12px 20px;opacity:0;pointer-events:none;transition:opacity .2s;max-width:90%;text-align:center}#toast.show{opacity:1}@keyframes hover{50%{transform:translateY(-8px)}}@keyframes glow{50%{opacity:.6}}@keyframes pop{from{transform:scale(.45);opacity:0}to{transform:scale(1);opacity:1}}@media(max-width:650px){#app{padding:14px 16px 0}h1{font-size:20px}#lives{font-size:20px;letter-spacing:1px}.planet-row{height:235px;padding:0}.planet-thumb{width:140px;height:140px}.planet-thumb.current{width:175px;height:175px}.planet-row .planet-label{margin:0 14px;min-width:100px}.planet-label h2{font-size:19px}.route-line{left:calc(50% - 100px);width:200px;top:150px;height:150px}.mission-layout{grid-template-columns:1fr}.mission-planet{height:210px}.mission-path{height:380px}.game-hud{left:3%;right:3%;gap:7px}.game-hud .balance{font-size:20px}.game-hud button{font-size:14px;padding:8px}.game-bar{left:8%;width:84%;height:50px}.game-moves{font-size:25px;top:125px}.tutorial-tip{left:10%;right:10%;top:170px}footer{font-size:10px}.bonus{font-size:24px}}
.profile-form{display:flex;flex-direction:column;gap:18px;max-width:440px;margin:auto;text-align:left}.profile-form h2{text-align:center}.profile-form label{display:flex;flex-direction:column;gap:8px}.profile-form input{font:inherit;font-size:21px;color:white;background:#13232f;border:1px solid #8baebb;border-radius:10px;min-height:48px;padding:10px 14px;width:100%;box-sizing:border-box}.profile-form small{color:#aac5cf}.profile-form #profile-status{min-height:24px;color:#bdefff;margin:0}.profile-form button:disabled{opacity:.5}
.game-bar{height:76px;border:0;border-radius:0;box-shadow:none;background:none;overflow:visible}.game-bar canvas{position:absolute;inset:0;width:100%;height:100%}.game-moves{top:145px;font-size:31px}.game-bar span{pointer-events:none}@media(max-width:650px){.game-bar{height:66px}.game-moves{top:138px;font-size:29px}}

.game-shell .bonus{top:58%}
/* Planet itinerary uses the same five-node wave and 1.8s traced journey as Android. */
.mission-layout{display:block;position:relative;min-height:520px;height:65vh;max-height:760px}.mission-planet{position:absolute;top:0;left:30%;width:40%;height:52%;text-align:center}.mission-planet canvas{position:relative}.mission-path{position:absolute;inset:0;height:100%;pointer-events:none}.mission-path button{pointer-events:auto}.mission-path svg{overflow:visible}.mission-leg{fill:none;stroke:#527590;stroke-width:2.5;stroke-dasharray:1 8;stroke-linecap:round;vector-effect:non-scaling-stroke}.mission-leg.finished{stroke:#91ffe4;stroke-width:3;stroke-dasharray:none;filter:drop-shadow(0 0 5px #4cffe0)}.itinerary-ship{position:absolute;width:74px;height:86px;transform:translate(-50%,-100%);pointer-events:none}.mission-node{width:50px;height:50px;font-size:19px}.mission-flag{position:absolute;right:-13px;top:-15px;color:#ff3535;font-size:30px}.start-mission{display:block;margin:-45px auto 32px;position:relative;width:min(500px,85%);height:56px;background:#164453;border-color:#78e7e0}.planet-complete-flag{position:absolute;left:48%;top:45%;font-size:50px;color:#ff3535;animation:flag-plant 1.5s .5s both}.planet-complete{margin:0;color:#91ffe4}.mission-planet.perfect:before{content:'';position:absolute;inset:20%;border-radius:50%;box-shadow:0 0 60px 20px #ffd45344}.landing header,.landing nav,.landing footer,.landing #streak{display:none}.landing-stage{position:fixed;inset:0;z-index:5}.landing-stage canvas{width:100%;height:100%;display:block}.landing-fade{position:absolute;inset:0;background:black;pointer-events:none}.landing-stage button{position:absolute;left:24px;top:24px;font-size:30px}.travel-stage{position:relative;height:70vh;min-height:500px;max-width:950px;margin:auto}.travel-stage svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.travel-base,.travel-drawn{fill:none;stroke:#527590;stroke-width:2.5;stroke-dasharray:2 10;vector-effect:non-scaling-stroke}.travel-drawn{stroke:#91ffe4;stroke-width:3;filter:drop-shadow(0 0 5px #4cffe0)}.travel-planet{position:absolute;width:32%;height:42%;transform:translate(-50%,-50%);text-align:center}.travel-planet.from{left:25%;top:25%}.travel-planet.to{left:75%;top:75%}.travel-planet canvas{width:100%;height:100%}.travel-planet h2{margin:-25px 0 0;font-size:20px}.travel-flag{position:absolute;left:48%;top:45%;color:#ff3535;font-size:45px}.travel-ship{position:absolute;width:85px;height:100px;transform:translate(-50%,-75%);pointer-events:none}.travel-gems{position:absolute;left:50%;top:50%;font-size:29px;transform:translate(-50%,-50%)}.travel-gems small{display:block;text-align:center;font-size:19px}.journey #tabs{pointer-events:none;opacity:.5}@keyframes flag-plant{from{opacity:0;transform:translateY(-35px)}to{opacity:1;transform:translateY(0)}}@media(max-width:650px){.mission-planet{left:20%;width:60%;height:47%}.mission-node{width:42px;height:42px}.itinerary-ship{width:60px;height:74px}.mission-layout{height:68vh;min-height:430px}.travel-planet{width:43%}.travel-ship{width:68px;height:85px}}
@media(max-width:650px){.mission-layout{height:calc(100dvh - 330px);min-height:340px}.start-mission{margin:-25px auto 22px;height:50px}.mission-planet{height:52%}}

/* Android home controls: exact source icons, selector colours, typography and rocket. */
h1{color:#ecfaff;letter-spacing:.06em;text-shadow:0 0 14px #54dfff88}#wallet{display:flex;align-items:center;gap:6px;font-size:21px}#wallet img{width:30px;height:30px;object-fit:contain}#lives{display:flex;align-items:center;gap:5px;height:32px;max-width:160px}#lives canvas{width:25px;height:32px;min-width:0}#lives .spent{opacity:.176}.tools{gap:8px}.tools button{height:44px;padding:10px 12px;border-radius:12px;border:1px solid #86cdd8;background:linear-gradient(#132339,#233d55);color:#d9f8ff;display:flex;align-items:center;justify-content:center;gap:6px;font-size:17px}.tools button:active{background:#355e79;border-color:#d8faff}.tools #settings{width:44px;padding:10px}.tools #store{width:112px}.tools img{width:22px;height:22px}.tools #settings img{width:24px;height:24px}.planet-thumb canvas.current-ship{position:absolute;z-index:2;width:56px;height:70px;left:50%;top:50%;margin-left:-28px;margin-top:-58px;animation:hover 3s ease-in-out infinite}.diamond-bundle{display:block;position:relative;width:62px;height:42px;margin:auto}.diamond-bundle img{position:absolute;width:33px;height:33px;left:15px;top:8px}.diamond-bundle img:nth-child(2){left:0;top:0;width:25px;height:25px}.diamond-bundle img:nth-child(3){left:35px;top:0;width:25px;height:25px}.diamond-bundle img:nth-child(4){left:7px;top:18px;width:24px;height:24px}.diamond-bundle img:nth-child(5){left:30px;top:20px;width:24px;height:24px}nav button{border-color:transparent;background:transparent;color:#7890a8;font-size:17px;border-radius:12px}nav button.selected{background:#28aaca33;color:#a7f5ff;border-color:#76d9ed}.mission-node.active{background:#255e7a;color:white;box-shadow:none;border-color:#82dfff}.mission-node.done{background:#36bfa7;border-color:#8fffe4}.mission-node:disabled{opacity:1;color:#708097}.mission-node.done:disabled{color:white}

.route{padding-top:27px}.planet-row,.planet-row:nth-child(even){display:block;padding:0}.planet-thumb{position:absolute;transform:translate(-50%,-50%)}.planet-thumb:active{transform:translate(-50%,-50%) scale(.96)}.planet-row .planet-label{position:absolute;margin:0;min-width:0;width:44%}.planet-label h2{font-size:15px;letter-spacing:0;line-height:19px;margin:0;color:#b6c9df}.planet-thumb.current+.planet-label h2{color:#edffff}.planet-label p{font-size:11px;line-height:16px;position:absolute;top:32px;color:#90a6c1;width:100%}.route-line{left:0;top:0;width:100%;z-index:-1}.route-line path{stroke:#527590;stroke-width:2;stroke-linecap:round;stroke-dasharray:1 8}.route-bundle{bottom:auto;transform:translate(-50%,-50%)}.planet-thumb.future{opacity:.235}.planet-thumb.current:before{inset:10%;background:#58efd733;box-shadow:0 0 40px 20px #58efd733}

/* Eight compact store choices remain visible on phone-sized screens. */
.store-grid{gap:8px 10px}.store-item .icon{height:30px;font-size:24px}.store-item h3{font-size:13px;min-height:30px;margin:4px}.store-item button{min-height:32px;padding:6px;font-size:11px}.store-item small{min-height:12px;margin-top:3px}
/* Full viewport hatch: two opaque leaves, including safe areas and the tab strip. */
.mission-hatch{position:fixed;inset:0;z-index:100000;overflow:hidden;pointer-events:auto;touch-action:pinch-zoom;isolation:isolate}
.mission-hatch img{position:absolute;left:0;width:100%;height:calc(50% + 1px);object-fit:cover;object-position:center bottom;background:#304650;display:block;will-change:transform;filter:drop-shadow(0 5px 10px #0009)}
.mission-hatch .hatch-top{top:0}.mission-hatch .hatch-bottom{bottom:0}

#lives .infinite-lives{font-size:40px;line-height:1;color:#b8fbff;text-shadow:0 0 12px #38d6ff80}#lives .life-expiry{font-size:17px;font-variant-numeric:tabular-nums;white-space:nowrap}
/* Daily wheel: eight prizes, matching native reference's 500ms hold / 5.5s spin. */
.daily-wheel-page{position:fixed;inset:0;z-index:110;background:radial-gradient(ellipse at 50% 45%,#143c58 0,#0b142b 45%,#020611 85%);display:flex;align-items:center;flex-direction:column;padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom));overflow:auto;color:white}.wheel-header{width:min(100%,620px);display:grid;grid-template-columns:44px 1fr;align-items:center;gap:8px}.wheel-header h2{font-size:26px;margin:0}.wheel-back{font-size:32px;padding:0}.wheel-wallet{grid-column:1/-1;display:flex;justify-content:space-between;font-size:26px;padding:12px 8px}.wheel-diamonds{color:#8fe5ff}.wheel-lives{color:#fff}.wheel-stage{width:min(100%,480px,44vh);position:relative;margin:18px 0 68px;filter:drop-shadow(0 18px 20px #0008)}.wheel-disc{width:100%;will-change:transform}.wheel-disc svg{display:block;width:100%;overflow:visible}.wheel-disc text{text-anchor:middle;fill:white;font-family:inherit;font-weight:bold}.wheel-symbol{font-size:33px;fill:#9eeeff!important}.wheel-amount{font-size:23px}.wheel-hub{font-size:38px}.wheel-pointer{position:absolute;top:-4px;left:calc(50% - 15px);z-index:2;width:30px;height:34px;background:linear-gradient(#fff,#7ae9ff);clip-path:polygon(0 0,100% 0,50% 100%);filter:drop-shadow(0 2px 5px black)}.wheel-prize{position:absolute;top:103%;left:-10%;width:120%;text-align:center;font-size:26px;font-weight:bold;min-height:32px}.wheel-pickup{position:absolute;left:48%;top:55%;font-size:40px;color:#8feaff;pointer-events:none;opacity:0}.wheel-controls{width:min(100%,440px);display:grid;gap:12px;text-align:center}.wheel-spin{padding:15px;background:linear-gradient(#365980,#15283f);box-shadow:inset 0 1px #d4f7ff,0 0 22px #49caff22;font-size:23px;border:2px solid #c5eeff}.wheel-ad{padding:10px}.wheel-quota,.wheel-status{margin:0;color:#bdd1e2;font-size:15px;min-height:20px}.daily-wheel-page button:disabled{opacity:.45}.daily-tools{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}.daily-tools button{font-size:14px;padding:8px 12px}.game .daily-tools{display:none}

/* Keep spherical art round and prevent late map sizing from shifting its focus. */
.route{overflow-anchor:none}.mission-planet canvas{object-fit:contain}
.mission-layout{height:calc(100dvh - 420px);min-height:260px;max-height:620px}
.daily-mission-page{position:fixed;inset:0;z-index:110;background:#030b191a;color:#effaff;display:flex;flex-direction:column;align-items:center;padding:max(12px,env(safe-area-inset-top)) 16px max(12px,env(safe-area-inset-bottom));overflow:auto}.daily-header{width:min(100%,900px);display:grid;grid-template-columns:44px 1fr;gap:8px}.daily-header h2{font-size:24px;margin:0}.daily-back{font-size:28px;padding:0}.daily-wallet{grid-column:1/-1;display:flex;justify-content:space-between;font-size:24px}.daily-diamonds{color:#90eaff}.daily-body{width:min(100%,1000px);flex:1;position:relative;min-height:0}.daily-summary{max-width:480px;margin:7vh auto;text-align:center}.daily-steps{display:flex;justify-content:center;gap:22px;margin:25px 0}.daily-steps span{width:60px;height:60px;border-radius:50%;border:2px solid #89bdcc;display:grid;place-items:center;font-size:28px;background:#142d43}.daily-steps .done{background:#297746;box-shadow:0 0 18px #77ffac66}.daily-actions{display:grid;gap:14px;font-size:21px;margin-top:30px}.daily-actions small,.daily-reset{font-size:14px;color:#a9c3d5}.daily-status{text-align:center;min-height:22px;margin:8px 0;font-size:14px}.daily-game{position:absolute;inset:0}.daily-game .game-bar{top:8px;height:55px}.daily-game .game-moves{top:68px;font-size:24px}.daily-result{position:absolute;top:50%;left:0;right:0;text-align:center;z-index:5;font-size:26px;font-weight:bold;text-shadow:0 2px 8px #000}.daily-result:empty{display:none}.daily-result h3{background:#051321e8;padding:14px}.daily-result button{font-size:18px}.daily-playing .daily-body{min-height:440px}.daily-game .board-canvas{height:100%;width:100%}

/* Same two-tab, eight-row catalogue on all clients. */
.store-tabs{display:flex;gap:8px;margin:8px 0 12px}.store-tabs button{flex:1;font-size:14px;padding:10px 5px;min-height:42px;background:#111b2b;color:white}.store-tabs .selected{background:linear-gradient(110deg,#432064,#090910);border-color:#d8f6ff}.cosmetics-shop{display:flex;flex-direction:column;max-height:66vh;gap:8px}.cosmetic-balance{text-align:right;font-size:23px}.cosmetic-status{margin:0;text-align:center;font-size:13px;min-height:17px;color:#d9edff}.cosmetic-rows{overflow-y:auto;overscroll-behavior:contain;min-height:0}.cosmetic-category{padding:6px 0 14px!important;background:none!important;border:none!important}.cosmetic-row-title{display:flex;justify-content:space-between;align-items:center;margin:0 2px 5px}.cosmetic-row-title h3{font-size:15px;margin:0}.cosmetic-row-title button{font-size:11px;padding:5px 8px}.cosmetic-strip{display:flex;overflow-x:auto;gap:8px;padding:3px 2px 8px;scroll-snap-type:x proximity}.cosmetic-item{position:relative;flex:0 0 115px;display:flex;flex-direction:column;align-items:center;padding:4px 5px 8px;background:linear-gradient(#122136,#050a14);border:1px solid #3b526b;border-radius:10px;scroll-snap-align:start}.cosmetic-item img{width:103px;height:103px;object-fit:contain;filter:drop-shadow(0 4px 5px #0008)}.cosmetic-item strong{font-size:12px;min-height:30px;display:flex;align-items:center;justify-content:center}.cosmetic-item span{font-size:12px;color:#c5efff;margin-top:4px}.cosmetic-item.equipped{border-color:#98f8d3;box-shadow:inset 0 0 14px #53e7af22;opacity:1}.cosmetic-unlock-all{flex-shrink:0;background:linear-gradient(110deg,#432064,#090910);font-size:14px;min-height:45px;width:100%}

.custom-flag .flag,.custom-flag .planet-complete-flag,.custom-flag .travel-flag,.custom-flag .mission-flag{color:transparent!important;background-image:var(--owned-flag);background-size:contain;background-repeat:no-repeat;background-position:center;width:56px;height:60px}.custom-flag .mission-flag{width:28px;height:32px}

.hidden-boost{position:fixed;inset:0;pointer-events:none;z-index:45}.hidden-boost img{position:absolute;top:0;left:0;width:32px;height:32px;filter:drop-shadow(0 0 9px #6cefff)}.hidden-boost strong{position:absolute;top:29%;left:5%;width:90%;text-align:center;font-family:inherit;font-size:clamp(18px,4.5vw,27px);color:#d2fcff;text-shadow:0 0 12px #39c9ff,0 2px 3px #000;opacity:0}.hidden-boost small{display:block;font-size:1.1em}

.mission-failed{position:fixed;inset:0;z-index:1500;display:grid;place-items:center;background:#000b;padding:22px}.mission-failed section{width:min(420px,100%);box-sizing:border-box;border:1.5px solid #d2e9f4;border-radius:22px;padding:26px 22px;background:linear-gradient(#122332,#03070c);box-shadow:0 20px 70px #000b;text-align:center}.mission-failed h2{margin:0;color:#fff;font-size:30px;letter-spacing:.8px}.mission-failed canvas{width:256px;height:220px;max-width:100%;display:block;margin:6px auto 0;filter:drop-shadow(0 14px 10px #0009)}.failure-actions{display:flex;gap:12px}.failure-actions button{flex:1;min-height:52px;padding:10px;font-size:19px;background:#132936;color:white;border:1px solid #e3f3ff;border-radius:11px}.failure-actions button:active{background:white;color:#112432}.mission-failed .save-streak{width:100%;margin-top:14px;display:flex;align-items:center;justify-content:center;gap:10px;min-height:50px}.save-streak svg{width:28px;fill:none;stroke:currentColor;stroke-width:1.5}.save-streak svg path{fill:currentColor;stroke:none}

.daily-planets{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:24px 0}.daily-planet{position:relative;flex:1;min-width:0;background:none;border:0;padding:0 0 12px;box-shadow:none}.daily-planet canvas{display:block;width:100%;aspect-ratio:1}.daily-planet span{display:block;font-size:clamp(12px,3vw,17px);word-break:break-word}.daily-planet.future{opacity:.4}.daily-planet.current canvas{filter:drop-shadow(0 0 12px #4fe8ff55)}.daily-planet.done{opacity:1!important}.daily-planet b{position:absolute;top:32%;left:45%;font-size:26px;color:white;text-shadow:0 0 8px #000}.wheel-stage{margin-bottom:24px}.wheel-prize{top:40%;background:#03101bd9;pointer-events:none}.wheel-prize:empty{display:none}

.daily-tools #daily-activities{position:relative;width:112px;height:88px;padding:8px;border-radius:12px;border:1px solid #86cdd8;background:linear-gradient(#132339,#233d55);color:#d9f8ff;font-size:17px;line-height:1.3}.daily-badge{position:absolute;right:-7px;top:-7px;min-width:25px;height:25px;padding:0 6px;border-radius:50%;background:#e62e40;color:white;display:grid;place-items:center;font-size:16px;border:2px solid #071323}.daily-badge[hidden]{display:none}.daily-hub-options{display:grid;gap:16px}.daily-hub-options button{min-height:60px}

.daily-hub-reward{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:6px}.daily-hub-reward img{width:27px;height:27px;object-fit:contain}.daily-hub-options [hidden]{display:none!important}

button,input,select,textarea{font-family:inherit}.currency-diamond{width:1.25em;height:1.25em;object-fit:contain;vertical-align:middle}.store-item .icon .currency-diamond{width:28px;height:32px;margin:0 -3px}.wheel-diamonds{display:flex;align-items:center;gap:6px}.wheel-pickup img{width:40px;height:40px;object-fit:contain}

.daily-diamonds{display:flex;align-items:center;gap:6px}.cosmetic-item .currency-diamond{width:18px;height:18px;object-fit:contain;display:inline;vertical-align:middle}
/* Full-page store: the wallet and eight choices remain visible without clipping. */
#modal.store-screen{padding:0;background:#030915;z-index:12}
#modal.store-screen>section{width:100%;height:100dvh;max-height:none;border:0;border-radius:0;padding:max(18px,env(safe-area-inset-top)) 24px 16px;box-shadow:none;overflow:hidden}
.store-screen #modal-content{max-width:900px;height:100%;margin:auto;display:flex;flex-direction:column;min-height:0}
.store-heading{display:flex;align-items:center;gap:24px;min-height:52px;padding-right:32px}.store-heading h2{margin:0}.store-heading span{font-size:25px;font-weight:700}
.store-screen .store-tabs{flex-shrink:0;gap:0;border-bottom:2px solid #b8ecff}.store-screen .store-tabs button{border-radius:0;min-height:48px}.store-screen .store-tabs .selected{background:#23566e;border-color:#d6f6ff}
.store-screen #store-body{flex:1;min-height:0}.store-screen .store-grid{height:100%;grid-template-rows:repeat(4,minmax(0,1fr));gap:8px 18px}.store-screen .store-item{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:0}.store-screen .store-item .icon{height:clamp(32px,6vh,70px);display:flex;align-items:center;justify-content:center;font-size:36px}.store-screen .store-item .icon img{height:100%;width:auto;max-width:45px}.store-screen .store-item h3{font-size:clamp(13px,2vh,19px);min-height:2.2em;margin:3px;display:flex;align-items:center;justify-content:center}.store-screen .store-item button{max-width:310px;min-height:32px;font-size:clamp(11px,1.7vh,15px)}.store-screen .cosmetics-shop{max-height:none}
.daily-calendar{width:21px;height:21px;display:block;margin:0 auto 3px;fill:none;stroke:currentColor;stroke-width:2}.daily-badge{transform:none!important;right:3px!important;top:3px!important}
.game-shell .bonus{top:auto;bottom:clamp(22px,10vh,90px);line-height:1.12;padding:0 14px}.bonus small{display:inline;margin-left:8px}
#local-name{display:block;width:100%;padding:12px;margin:12px 0;background:#0e2132;color:white;border:1px solid #91bdcf;border-radius:8px}
.wheel-controls button{position:relative;padding-left:58px;padding-right:58px}.wheel-controls button:before{content:'';position:absolute;left:20px;top:50%;width:25px;height:25px;transform:translateY(-50%);background:center/contain no-repeat}.wheel-controls .wheel-spin:before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23c7f4ff' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 3v18M3 12h18M5.6 5.6l12.8 12.8M5.6 18.4L18.4 5.6'/%3E%3C/g%3E%3Cpath fill='white' d='M9 0h6l-3 5z'/%3E%3C/svg%3E")}.wheel-controls .wheel-ad:before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23c7f4ff' stroke-width='1.6'%3E%3Cpath d='M7 2l5 4 5-4'/%3E%3Crect x='2' y='6' width='20' height='15' rx='2'/%3E%3C/g%3E%3Cpath fill='white' d='M9 10l7 3.5-7 3.5z'/%3E%3C/svg%3E")}

/* Store products use the same roomy, scrolling catalogue as customizations. */
.store-screen #store-body{overflow-y:auto;overscroll-behavior:contain;padding-top:10px}
.store-screen .store-grid{height:auto;grid-template-rows:none;grid-auto-rows:220px;padding-bottom:12px}
.store-screen .store-item{padding:12px;background:linear-gradient(#122135,#050a14);border:1px solid #3b526b;border-radius:10px}
.store-screen .store-item .icon{height:76px}.store-screen .store-item .icon img{max-width:60px}
.store-screen .store-item h3{font-size:17px;margin:8px 0}.store-screen .store-item button{font-size:14px;min-height:36px}

/* Two instrument rows centred in the shared cockpit panel. */
header{position:relative;isolation:isolate;display:flex;flex-direction:column;gap:0;padding:0 4px 18px}
header::before{content:'';position:absolute;inset:-8px -32px auto;height:144px;z-index:-1;pointer-events:none;background:url('assets/ui/cockpit-header.svg') center/100% 100% no-repeat}
.panel-status,.panel-actions{display:flex;width:100%;align-items:center;gap:8px}
.panel-status{height:58px;justify-content:space-between}.panel-status h1{min-width:0;font-size:clamp(14px,4.8vw,23px);white-space:nowrap}
.panel-actions{height:56px;gap:6px}header #wallet{font-size:19px;min-width:68px;gap:4px}header #wallet img{width:24px;height:24px}
header .tools{flex:0 1 320px;min-width:0;gap:6px;margin:0 0 0 auto}
header .tools button,header .daily-tools #daily-activities{height:44px;min-width:0;padding:5px 6px;border-radius:4px;border:1px solid #345d6b;background:linear-gradient(#06111b,#172d39);box-shadow:inset 0 2px 2px #000b,0 1px #5a7280;font-size:14px;position:relative}
header .tools button::after{content:'';position:absolute;bottom:3px;left:10px;right:10px;height:1px;background:#4ba3b4;pointer-events:none}
header .tools button:active{background:#173847;border-color:#a6edf1;transform:translateY(1px)}
header .tools #store{width:auto;flex:1}header .tools #settings{width:44px;flex:none;padding:10px}
header .daily-tools #daily-activities{width:auto;flex:1.25;display:flex;justify-content:center;gap:4px;align-items:center;font-size:12px;line-height:1.05}
header .daily-calendar{width:18px;height:18px;flex:none;margin:0}header .daily-badge{min-width:18px;width:18px;height:18px;padding:0;font-size:12px;right:1px!important;top:1px!important;border-width:1px}
header .tools img{width:20px;height:20px}header #lives{min-width:120px}
@media(max-width:650px){header::before{left:-16px;right:-16px}header{padding-left:4px;padding-right:4px}header #wallet span{max-width:48px;overflow:hidden;text-overflow:ellipsis}header #lives{max-width:140px}}

/* MAIN follows CUSTOMIZE's category strips, retaining each product action. */
.store-categories{display:flex;flex-direction:column;gap:12px;padding-bottom:12px}
.store-category>h3{font-size:15px;height:30px;display:flex;align-items:center;margin:0 0 6px}
.store-strip{display:flex;overflow-x:auto;gap:8px;padding:1px 1px 5px;scroll-snap-type:x proximity;overscroll-behavior-x:contain}
.store-screen .store-strip .store-item{flex:0 0 140px;height:218px;padding:8px;scroll-snap-align:start;background:linear-gradient(#122136,#050a14);border:1px solid #3b526b;border-radius:10px}
.store-screen .store-strip .icon{width:120px;height:76px;flex:none}.store-screen .store-strip .icon img{min-width:0;max-width:28px;flex:0 1 auto;object-fit:contain}
.store-screen .store-strip h3{font-size:14px;min-height:40px;margin:4px 0;line-height:1.15}
.store-screen .store-strip button{min-height:36px;font-size:11px;line-height:1.15;padding:5px;white-space:normal}.store-screen .store-strip small{font-size:10px;min-height:18px}

.store-screen .store-tabs{margin:4px 0 2px}.store-screen #store-body{padding-top:2px}.cosmetic-status:empty{display:none}

.planet-label p.planet-streak{top:56px;font-size:14px;font-weight:700;color:#ffdf79}

/* Keep the product geometry and available text space equal to the native cards. */
.store-screen .store-strip .store-item{display:flex;flex-direction:column;align-items:center;padding:6px}
.store-screen .store-strip .icon{display:grid;place-items:center;width:126px;height:108px;min-height:108px;position:relative}
.store-bundle-art{width:108px;height:100%;overflow:visible}
.store-ad-art{width:126px;height:108px}
.store-life-art{display:block;position:relative;width:72px;height:76px}
.store-life-art canvas{width:100%;height:100%}
.store-infinity{position:absolute;right:-10px;bottom:16px;font-size:29px;font-weight:700;color:#aefbff}
.store-screen .store-strip h3{height:42px;min-height:42px;font-size:16px;margin:0;display:flex;align-items:center;justify-content:center;line-height:1.1}
.store-screen .store-strip button{height:36px;min-height:36px;flex:none;padding:3px;font-size:12px;border-radius:8px;background:linear-gradient(90deg,#331652,#08070c);border-color:#dad4e5}
.store-screen .store-strip small{height:18px;min-height:18px;line-height:18px;margin:0;font-size:10px}

.store-screen .store-strip h3.compact{font-size:14px;display:block;align-content:center}

/* Daily wheel follows the native screen: wallet above, wheel centered, actions below. */
.daily-wheel-page{background:linear-gradient(#040710,#10253b,#040710);padding:max(18px,env(safe-area-inset-top)) 22px max(20px,env(safe-area-inset-bottom))}
.wheel-header{gap:0;grid-template-rows:58px 52px;flex-shrink:0}
.wheel-header h2{font-size:27px}.wheel-wallet{padding:0;align-items:center;height:52px}
.wheel-area{width:min(100%,620px);flex:1;min-height:240px;display:grid;place-items:center;position:relative}
.wheel-stage{width:min(100%,480px,calc(100dvh - 268px));min-width:200px;margin:0;filter:none}
.wheel-controls{width:min(100%,620px);flex-shrink:0}
.wheel-controls button{height:54px;min-height:54px;padding-top:0;padding-bottom:0;font-size:22px;background:linear-gradient(#2c607d,#0e293a);border:2px solid #b5eaff;border-radius:12px}

/* One continuous galaxy behind the entire site, including fullscreen menus. */
html{background:#030915}
body{background:#030915;isolation:isolate}
#space{z-index:-1}
#modal.store-screen{background:linear-gradient(180deg,#03091550,#03091580)}
#modal.store-screen>section{background:transparent}
#modal:not(.store-screen)>section{background:linear-gradient(135deg,#081a2aee,#050b19ed);border-color:#8bd7ea70}
.daily-wheel-page{background:linear-gradient(180deg,#03091535,#03091575)}
.daily-mission-page{background:linear-gradient(180deg,#03091520,#03091550)}
/* Fullscreen destinations retain the sky, without the home controls behind them. */
body:has(#modal.store-screen:not([hidden])) #app,
body:has(.daily-wheel-page) #app,
body:has(.daily-mission-page) #app{visibility:hidden;opacity:0;pointer-events:none}

/* Explicit tray paging below the two rows; shared by campaign and daily play. */
.tray-navigation{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);z-index:3;display:flex;align-items:center;justify-content:center;gap:12px;color:#d4f4ff;white-space:nowrap;pointer-events:none}.tray-navigation[hidden]{display:none}.tray-navigation button{pointer-events:auto;min-width:44px;height:44px;padding:0 10px;border:1px solid #86c5da88;border-radius:10px;background:#0c2635d9;font:700 30px DIN,sans-serif;line-height:1}.tray-navigation button:disabled{opacity:.25}.tray-navigation span{font:700 13px DIN,sans-serif;letter-spacing:.6px;text-shadow:0 1px 4px #000}

/* Daily completion uses the same clear lower caption area as campaign rewards. */
.daily-result{top:auto;bottom:clamp(22px,10vh,90px);padding:0 14px;line-height:1.12;pointer-events:none}

/* Planet itinerary fills the space below the persistent cockpit. */
.planet-selection #tabs,.planet-selection footer,.planet-selection #streak{display:none}
.planet-selection #app{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.planet-selection #content{position:relative;height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));min-height:420px}
.planet-selection .section-heading{position:absolute;inset:6.5% 0 auto;margin:0;height:48px;transform:translateY(-50%);display:flex;justify-content:center;z-index:2;pointer-events:none}
.planet-selection .section-heading h2{max-width:calc(100% - 136px);font-size:25px;line-height:1.1;text-align:center;overflow-wrap:anywhere}
.planet-selection #map-back{position:absolute;left:12px;top:0;width:48px;height:48px;padding:0;background:none;border:0;font-size:27px;pointer-events:auto}
.planet-selection .mission-layout{position:absolute;inset:0;min-height:0;max-height:none;height:100%;pointer-events:none}
.planet-selection .mission-planet{top:32%;left:50%;width:min(67.5%,42.5dvh);height:auto;aspect-ratio:1;transform:translate(-50%,-50%)}
.planet-selection .mission-planet canvas{display:block;position:absolute;inset:0}
.planet-selection .mission-planet:before{content:'';position:absolute;inset:8%;border-radius:50%;background:#3d86aa22;box-shadow:0 0 45px 18px #3d86aa18;filter:blur(20px)}
.planet-selection .mission-planet.perfect:before{background:#ffd45322;box-shadow:0 0 60px 20px #ffd45344}
.planet-selection .mission-node{width:40px;height:40px;font-size:17px;border-width:1.5px;background:#172638;border-color:#38516b}
.planet-selection .mission-node:after{content:'';position:absolute;inset:-4px;border-radius:50%}
.planet-selection .mission-node.active{background:#255e7a;border-color:#82dfff}
.planet-selection .mission-node.done{background:#36bfa7;border-color:#8fffe4}
.mission-complete-label{position:absolute;top:calc(100% + 10px);left:50%;transform:translateX(-50%);font-size:9px;white-space:nowrap;line-height:1;color:white;pointer-events:none}
.planet-selection .itinerary-ship{width:45px;height:56.25px;transform:translate(-50%,-50%)}
.planet-selection .start-mission{position:absolute;top:82%;left:13%;width:74%;height:56px;margin:0;font-size:15px;border-radius:15px}
.planet-selection .planet-complete{position:absolute;top:100%;left:0;right:0;font-size:16px;white-space:nowrap}

/* Keep route planets spherical: percentage heights stretched the square renderer. */
.travel-planet{height:auto;aspect-ratio:1}
.travel-planet.from{width:min(32%,125px)}
.travel-planet.to{width:min(42%,163px)}
.travel-planet canvas{position:absolute;inset:0;display:block;width:100%;height:100%}
.travel-planet h2{position:absolute;top:50%;left:calc(100% + 8px);width:min(150px,34vw);margin:0;line-height:1.15;overflow-wrap:anywhere;text-align:left;transform:translateY(-50%)}
.travel-planet.to h2{left:auto;right:calc(100% + 8px);text-align:right}

/* Keep cockpit controls available while scrolling home and planet menus. */
#app>header{position:sticky;top:env(safe-area-inset-top);z-index:8;background:#07111d}
.planet-selection #app{padding:14px 16px 0}
.planet-selection #content{height:calc(100dvh - var(--cockpit-height,132px) - 14px - env(safe-area-inset-bottom));min-height:420px}
.planet-selection .mission-planet{width:min(60%,calc((100dvh - var(--cockpit-height,132px) - 14px) * .38));min-width:130px}
@media(min-width:651px){.planet-selection #app{padding:24px 32px 0}.planet-selection #content{height:calc(100dvh - var(--cockpit-height,132px) - 24px - env(safe-area-inset-bottom))}}
/* Tab bars stay anchored; only their content scrolls or changes. */
#tabs{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:calc(100% - 32px);max-width:1016px;z-index:9;padding-bottom:max(10px,env(safe-area-inset-bottom))}
body:not(.game):not(.landing):not(.planet-selection) #app{padding-bottom:90px}
#tabs button,.store-screen .store-tabs button{flex:1 1 0;min-width:0}
#tabs button:active,.store-screen .store-tabs button:active{transform:none}
.store-screen .store-heading{flex:0 0 52px}
.store-screen .store-tabs{flex:0 0 50px;height:50px}
@media(min-width:651px){#tabs{width:calc(100% - 64px)}}

/* A dedicated name row keeps the cockpit identity clear of the controls. */
#app>header::before{height:calc(100% + 12px)}
.panel-player{display:flex;align-items:center;justify-content:center;min-height:40px;padding:5px 12px 2px;font:700 18px/1.25 DIN,sans-serif;color:inherit;text-align:center;overflow-wrap:anywhere;max-width:100%;}
@media(max-width:360px){.panel-player{font-size:16px}}

.cosmetic-item.premium{border:2px solid #e1bd66;background:linear-gradient(145deg,#302542,#0a1526);position:relative}.premium-badge{position:absolute;top:5px;left:0;right:0;color:#ffe6a3;font:700 10px DIN,sans-serif;letter-spacing:1.2px}

/* Keep campaign/practice lives visible without crowding the touch controls. */
.game-lives{position:absolute;top:46px;left:0;right:0;height:28px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:17px;font-weight:700;font-variant-numeric:tabular-nums;z-index:2;pointer-events:none;color:#eefaff}
.game-lives>span:first-child{font-size:23px;line-height:1}
.game-shell>.game-bar{top:84px}
.game-shell>.game-moves{top:166px}
.game-shell>.tutorial-tip{top:212px}
.game-shell:has(.tutorial-tip)>.game-moves{font-size:clamp(16px,4.6vw,24px);line-height:1.25;white-space:nowrap}

/* Daily HUD owns its layout; it must not inherit the home cockpit artwork. */
.daily-mission-page>.daily-header{padding:0;flex:none}
.daily-mission-page>.daily-header::before{content:none}
.daily-playing .daily-body{min-height:0}
.daily-status:empty{display:none}
.ai-battle{position:fixed;inset:0;z-index:120;background:#030915e8;color:#eefaff;padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom))}
.ai-game{position:relative;height:100%;width:min(100%,1000px);margin:auto}
.ai-toolbar{inset:0 0 auto;height:40px;justify-content:space-between;font-size:12px}
.ai-toolbar button{min-width:44px;height:40px;font-size:26px;padding:0}
.ai-game>.game-bar{left:100px;width:calc(100% - 110px);height:58px;top:48px}
.ai-game>.ai-player{top:110px}
.ai-game>.game-bar label{position:absolute;right:calc(100% + 10px);top:14px;width:88px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}
.ai-game>.game-bar span{font-size:22px}
.ai-intro{position:absolute;inset:0;display:grid;grid-template-rows:1fr 1fr;background:#030915;overflow:hidden}
.ai-landing{position:relative;overflow:hidden;border-bottom:1px solid #6dcbd9}
.ai-planet{position:absolute;width:min(80vw,500px);height:min(80vw,500px);left:50%;top:28%;transform:translateX(-50%)}
.ai-ship{position:absolute;width:100px;height:116px;left:calc(50% - 50px);top:26%}
.ai-landing strong,.ai-landing small{position:absolute;left:10%;right:10%;text-align:center;top:12%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:24px}
.ai-landing small{top:auto;bottom:10%;font-size:17px}
.ai-vs,.ai-countdown{position:absolute;left:0;right:0;top:calc(50% - 48px);text-align:center;font-size:72px;font-style:italic;color:#ffe17a;text-shadow:3px 3px #e73b30;pointer-events:none}
.ai-countdown{color:#b6ffff;font-style:normal;text-shadow:0 0 18px #5ef7ff}
.ai-result{position:absolute;inset:0;z-index:4;background:#030915de;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px;padding:24px;text-align:center}
.ai-result[hidden]{display:none}.ai-result h2{font-size:30px;margin:0}.ai-result p{font-size:22px;margin:0}.ai-result small{max-width:360px;color:#b5ccd7;line-height:1.5}.ai-result-waiting{background:transparent;justify-content:flex-start;padding-top:180px;pointer-events:none}.ai-result-waiting p,.ai-result-waiting small,.ai-result-waiting button{visibility:hidden}

.ai-intro{z-index:3}.ai-toolbar{z-index:5}.ai-landing strong{top:15%}.ai-landing small{top:23%;bottom:auto}.ai-ship{top:35%}
.ai-landing strong{top:max(48px,12%);line-height:1.2}.ai-landing small{top:calc(max(48px,12%) + 36px);line-height:1.2}.ai-ship{top:42%}

/* Compact online cards retain their headings below the persistent cockpit. */
.online-card{height:196px;min-height:0;margin:16px auto;padding:14px;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:4px;cursor:pointer}
.online-card h2{font-size:24px;line-height:1.15}
.online-card p{position:static;font-size:15px;line-height:1.2;overflow-wrap:anywhere}
.online-card .spin-planet{width:110px;height:110px;max-height:100%;align-self:center;justify-self:center;margin:0}
.online-card.friends-card{height:154px;grid-template-rows:auto 1fr}
.online-card.friends-card p{align-self:end}

/* Shared-planet battle arrival and result, with reserved text lanes. */
.ai-landing>canvas{position:absolute;inset:0;width:100%;height:100%}
.ai-intro-name{position:absolute;left:54%;right:5%;top:42%;opacity:0;display:flex;flex-direction:column;gap:10px}
.ai-intro-name strong,.ai-intro-name small{position:static!important;text-align:left;white-space:normal;overflow-wrap:anywhere;line-height:1.2}
.ai-intro-name strong{font-size:clamp(18px,4vw,28px);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ai-intro-name small{font-size:clamp(12px,2.8vw,17px);color:#ffdca0}
.ai-vs{font-weight:900;font-style:italic;letter-spacing:-5px;-webkit-text-stroke:1px #ffc965;text-shadow:3px 4px #a92021,0 0 20px #ff754b;top:calc(50% - 48px)}
.ai-countdown{left:calc(50% - 46px);right:auto;width:92px;height:106px;top:calc(50% - 53px);border:2px solid #8fffe8;border-radius:14px;background:#061a29f5;font-variant-numeric:tabular-nums;line-height:102px;font-size:82px;box-shadow:0 0 28px #3ec3c544}
.ai-countdown[hidden],.ai-finish[hidden]{display:none}
.ai-finish{position:absolute;inset:172px 0 0;pointer-events:none;overflow:hidden;z-index:3}
.ai-winner{position:absolute;top:6px;left:8px;right:8px;text-align:center;margin:0;font-size:clamp(22px,5vw,32px);line-height:1.15;overflow-wrap:anywhere;max-height:76px;overflow:hidden;color:#c6fff0;text-shadow:0 0 16px #5de9b6}
.ai-arena{position:absolute;top:84px;bottom:135px;left:0;right:0;min-height:140px}
.ai-arena canvas,.ai-sad canvas{width:100%;height:100%;position:absolute;inset:0}
.ai-ship-label{position:absolute;transform:translateX(-50%);width:100px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;background:#061624de;padding:3px 6px;border-radius:8px}
.ai-score{position:absolute;bottom:38px;left:12px;right:12px;text-align:center;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px}
.ai-score[hidden]{display:none}.ai-score img{width:36px;height:36px}.ai-score b{font-size:42px;color:#9af2ff}.ai-score small{width:100%;font-size:14px;line-height:1.35}
.ai-sad{position:absolute;inset:180px 0 0;z-index:4}.ai-sad h2{position:absolute;top:12px;left:12px;right:12px;text-align:center;font-size:24px;z-index:1}
@media(max-height:620px){.ai-finish{top:165px}.ai-winner{font-size:22px}.ai-arena{top:58px;bottom:120px;min-height:100px}.ai-score{bottom:22px}.ai-score b{font-size:34px}.ai-ship-label{font-size:12px;width:82px}}

.ai-winner{top:0;font-size:20px;line-height:24px;max-height:24px;white-space:nowrap;text-overflow:ellipsis}

/* Compact battle HUD gives the board the space previously used by its caption. */
.ai-game>.game-bar{top:28px;height:48px}
.ai-game>.ai-player{top:80px}
.ai-game>.game-bar label{top:14px}
.ai-finish{top:132px}

.ai-landing:nth-child(2) .ai-intro-name{left:5%;right:54%}
.ai-landing:nth-child(2) .ai-intro-name strong,.ai-landing:nth-child(2) .ai-intro-name small{text-align:right}

/* Badges retain their own space beside names and above/below cinematic labels. */
.ai-game>.game-bar{left:clamp(112px,32vw,180px);width:calc(100% - clamp(112px,32vw,180px) - 10px)}
.ai-game>.game-bar label{display:flex;align-items:center;gap:5px;top:10px;width:calc(clamp(112px,32vw,180px) - 18px);overflow:visible}
.ai-game>.game-bar label b{font-size:14px;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.player-badge{width:25px;height:30px;object-fit:contain;flex:none}
.ai-intro-name{top:30%;gap:6px;align-items:center}
.ai-intro-name strong,.ai-intro-name small,.ai-landing:nth-child(2) .ai-intro-name strong,.ai-landing:nth-child(2) .ai-intro-name small{text-align:center;width:100%}
.intro-player-badge{width:clamp(38px,10vw,64px);height:clamp(46px,12vw,76px);object-fit:contain}
.ai-ship-label{overflow:visible;white-space:normal;display:flex;flex-direction:column;align-items:center;gap:4px}
.ai-ship-label[hidden]{display:none}.ai-ship-label b{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400}
.ai-ship-label img{width:32px;height:38px;object-fit:contain}
.result-player-badge{width:64px;height:76px;object-fit:contain}

.ai-score.bonus{display:block;top:auto;bottom:18px;left:12px;right:12px;font-size:24px;line-height:1.1;animation:none}
.ai-score.bonus small,.result-rewards small{font-size:22px;color:#fff;width:auto;line-height:1.1}
.ai-score.bonus br,.result-rewards br{line-height:.65}
.ai-result .result-rewards{position:static;animation:none;font-size:24px;line-height:1.15}
.ai-result .result-rewards small{max-width:none;line-height:1.2}
.ai-score.bonus small,.ai-result .result-rewards small{display:block;margin-top:3px}
.ai-score.bonus[hidden]{display:none}
.ai-result{background:#030915}

/* No battle back control: use its vertical space for the puzzle. */
.ai-game>.game-bar{top:4px}
.ai-game>.ai-player{top:56px}
.ai-finish{top:108px}

.ai-forfeit{position:fixed;right:4px;bottom:0;z-index:3;font-size:11px;font-weight:400;padding:5px 9px;min-height:28px;border-radius:7px;color:#b7cbd5;border-color:#536975;background:#071421dc}
.ai-forfeit[hidden]{display:none}
.ai-battle:has(.ai-intro) .ai-forfeit{visibility:hidden}

/* Keep the desktop game a compact, centred column rather than a stretched dashboard. */
:root{--space-app-width:760px;--space-content-width:696px}
#app,.game #app{width:min(var(--space-app-width),100%);max-width:var(--space-app-width)}
#tabs{max-width:var(--space-content-width)}
#modal.store-screen>section{width:min(100%,var(--space-app-width))}
.store-screen #modal-content{max-width:var(--space-content-width)}
.daily-header,.daily-body,.ai-game{width:min(100%,var(--space-content-width))}
.ai-intro,.ai-result,.ai-sad{left:50%;right:auto;width:min(100%,var(--space-app-width));transform:translateX(-50%)}
.ai-forfeit{right:max(4px,calc((100vw - var(--space-content-width))/2))}
@media(min-width:651px){
 #app>header::before{background-image:url('assets/ui/cockpit-header-web.svg')}
 #app>header .panel-status{border-bottom:1px solid #34505d;box-shadow:0 2px #020913;padding-bottom:5px}
 #app>header .panel-actions{display:grid;grid-template-columns:100px minmax(0,1fr);gap:12px;height:62px}
 #app>header .tools{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) 44px;gap:8px;width:100%;margin:0}
 #app>header .tools button,#app>header .daily-tools #daily-activities{width:100%;height:44px;display:flex;align-items:center;justify-content:center;gap:7px}
 #app>header #wallet{height:44px;align-items:center;font-variant-numeric:tabular-nums}
 #app>header .panel-player{padding-top:3px}
}

/* Guided learning uses the normal moves-remaining position and game artwork. */
.guided-open{overflow:hidden}.guided-open #app{opacity:0;pointer-events:none}
.guided-intro{position:fixed;inset:0;z-index:300;width:min(760px,100%);margin:auto;transition:opacity .45s;}
.guided-intro .guided-shell{height:100dvh;min-height:0;width:min(696px,100%);margin:auto;}
.guided-intro .game-bar{transition:opacity .35s;pointer-events:none}
.guided-intro .guided-copy{padding:0 18px;min-height:96px;font-size:clamp(21px,4.7vw,29px);line-height:1.22;pointer-events:none;color:#eefaff;font-weight:700;white-space:normal;text-shadow:0 2px 6px #000}
.guided-hand{position:absolute;z-index:4;font-size:34px;pointer-events:none;opacity:0;transform:translate(-20%,-10%);filter:drop-shadow(0 2px 4px #000)}

/* Refill countdown sits immediately to the right of the lives. */
.life-refill{display:inline-block;margin-left:7px;font-size:13px;line-height:16px;font-weight:400;font-variant-numeric:tabular-nums;white-space:nowrap;color:#d9f8ff;vertical-align:middle}
.life-refill[hidden]{display:none}
header #lives.has-refill{max-width:210px;min-width:0;flex:1;gap:3px}
#lives.has-refill canvas{flex:0 1 25px}
#lives>.life-refill{flex:none;margin-left:3px;font-size:12px}
@media(max-width:359px){.game-lives{font-size:15px}}

/* Completed-planet markers remain centred and readable over the globe. */
.planet-thumb:disabled:not(.future){opacity:1}
.flag,.planet-complete-flag,.travel-flag,.custom-flag .flag,.custom-flag .planet-complete-flag,.custom-flag .travel-flag{left:50%;top:50%;transform:translate(-50%,-50%);width:57.6px;height:62.4px;display:grid;place-items:center;line-height:1;font-size:0;text-shadow:none;z-index:2;color:transparent!important;background:var(--planet-flag,url('assets/customization/flags_0.png')) center/contain no-repeat;filter:drop-shadow(0 2px 2px #000) drop-shadow(0 0 8px #fff8);animation:none;pointer-events:none}

#toast{display:flex;align-items:center;gap:12px}#toast>img{width:52px;height:52px;flex:none;object-fit:contain}#toast>span{min-width:0}

/* One ship and count fit in the top HUD, reclaiming the former lives row. */
#lives{gap:5px!important;letter-spacing:0;flex:none!important}
#lives .life-ship{width:27px!important;height:38px!important;flex:none!important}
#lives .life-count{font-size:23px;line-height:1}
.game-hud .game-lives{position:static;inset:auto;height:36px;gap:3px;justify-content:flex-start;margin-left:auto;font-size:17px;flex:none}
.game-lives>img,.life-ship-icon{width:24px;height:30px;object-fit:contain;vertical-align:middle}
.game-hud .game-lives .life-refill{margin-left:2px;font-size:10px}
.game-hud .balance{margin-left:0;font-size:20px;white-space:nowrap}
.game-shell>.game-bar{top:52px}
.game-shell>.game-moves{top:134px}
.game-shell>.tutorial-tip{top:180px}
@media(max-width:359px){.game-hud{gap:5px}.game-hud .balance{font-size:17px}.game-hud .game-lives{font-size:15px}.game-hud .game-lives>img{width:20px}.game-hud :is(#hint,.hint-button){padding:8px 5px;font-size:12px}}

/* Name occupies the centre of its inset; compact totals use the lower strip. */
#app>header{padding-bottom:8px}
#app>header .panel-player{width:100%;height:46px;min-height:46px;padding:0 12px 6px;line-height:1;flex:none}
.panel-progress{display:flex;align-items:center;align-self:stretch;justify-content:flex-start;gap:5px;height:18px;padding:0 12px;color:#bdd7e2;font:400 10px/1 DIN,sans-serif;white-space:nowrap}
.panel-progress svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.5;flex:none}
.panel-progress #planet-total{margin-left:12px}

.game-shell{min-height:0}
.game #app{overflow-anchor:none}

/* Boss finales: arcade title precedes the existing hatch/ship delivery. */
@font-face{font-family:SpaceBoss;src:url('assets/fonts/Debug-Regular.woff2') format('woff2');font-display:swap}
.boss-intro{position:fixed;inset:0;z-index:100001;display:grid;place-items:center;overflow:hidden;background:radial-gradient(ellipse at 25% 45%,#69244588,transparent 62%),radial-gradient(ellipse at 80% 60%,#43214c77,transparent 65%),#050a16;touch-action:pinch-zoom}
.boss-title-block{width:92%;text-align:center;will-change:transform,opacity}
.boss-title-block strong{display:block;font-family:SpaceBoss,DIN,sans-serif;font-size:clamp(64px,18vw,150px);font-weight:400;line-height:1.15;letter-spacing:2px;color:#ffd367;-webkit-text-stroke:2px #64203d;text-shadow:3px 4px 0 #f35736,6px 8px 0 #4e1730,0 0 32px #fc704677}
.boss-title-block small{display:block;font-family:DIN,sans-serif;font-size:clamp(17px,4vw,26px);letter-spacing:5px;color:#ffdbb5;margin-top:16px;text-shadow:0 2px 8px #000}
body.boss-level #space{filter:sepia(.16) hue-rotate(35deg) saturate(1.14)}
body.boss-level .game-shell{background:radial-gradient(ellipse at 80% 30%,#8b254317,transparent 72%)}
body.boss-level .game-moves{color:#ffdab5;text-shadow:0 0 14px #d7606977}
body.boss-level #hint{white-space:nowrap;font-size:clamp(11px,2.8vw,15px)}

.mission-flag{width:28px;height:32px;font-size:0;color:transparent!important;background:var(--planet-flag,url('assets/customization/flags_0.png')) center/contain no-repeat;filter:drop-shadow(0 1px 2px #000)}

.ambient-visitors{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:0;filter:saturate(.7);opacity:.85}

/* Keep the two balances together, with breathing room before the title. */
#app>header .panel-status{gap:12px}
.panel-resources{display:flex;align-items:center;gap:14px;flex:none;min-width:0}
#app>header .panel-resources #wallet{height:auto;font-size:23px;gap:5px;white-space:nowrap;line-height:1}
#app>header .panel-resources #wallet img{width:25px;height:25px;object-fit:contain}
#app>header .panel-status h1{min-width:0;flex:1;text-align:right;font-size:clamp(16px,4.6vw,24px);line-height:1.1;white-space:normal;letter-spacing:1px}
#app>header .panel-actions{display:block;grid-template-columns:none;height:62px}
#app>header .panel-actions .tools{width:100%;margin:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) 44px;gap:8px}
#app>header .panel-actions .tools button{width:100%;margin:0}
.game-hud .balance{margin-left:7px}
.daily-wallet,.wheel-wallet{justify-content:flex-start;gap:20px}
@media(max-width:359px){.panel-resources{gap:10px}#app>header .panel-status{gap:8px}#app>header .panel-resources #wallet{font-size:20px}#app>header .panel-resources #wallet img{width:22px;height:22px}.game-hud .balance{margin-left:5px}}
#app>header .panel-resources #lives{min-width:0;max-width:none;width:auto}
#app>header .panel-resources #wallet span{max-width:none;overflow:visible}
.planet-thumb .current-ship{scale:.9375}

.panel-progress{justify-content:center}
#app>header .panel-player{height:24px;min-height:24px;padding-bottom:2px}
.panel-progress{height:40px;gap:8px;padding-bottom:4px;font-size:28px}
.panel-progress svg{width:28px;height:28px}
.panel-progress{position:relative;z-index:1;width:calc(100% - 24px);margin:0 auto;border:1px solid #3d5e6c;border-radius:4px;background:linear-gradient(#0b1b27,#102532);box-shadow:inset 0 1px #5a788455,0 2px 3px #0008}

/* Compact solo HUD gives the enlarged puzzle shapes more vertical room. */
.game-shell:not(.ai-game)>.game-bar{top:44px;left:18.5%;width:63%;height:68.4px}
.game-shell:not(.ai-game)>.game-moves{top:116px;font-size:23.25px}
.daily-game .game-bar{top:0;height:49.5px;left:18.5%;width:63%}
.daily-game .game-moves{top:52px;font-size:18px}
@media(max-width:650px){.game-shell:not(.ai-game)>.game-bar{left:12.2%;width:75.6%;height:59.4px}.game-shell:not(.ai-game)>.game-moves{top:108px;font-size:21.75px}.daily-game .game-bar{left:12.2%;width:75.6%}}

.double-diamond-intro{background:radial-gradient(ellipse,#154751dd,#030915f5 70%)}.double-diamond-intro .boss-title-block strong{font-size:clamp(32px,9vw,70px);color:#a8f9ff;text-shadow:3px 4px #135b80,-1px -1px #fff}.double-diamond-intro .boss-title-block small{font-size:clamp(12px,3.2vw,18px);color:#eefaff}

/* Username centred above the smaller mission and planet counters. */
#app>header .panel-player{padding:0 12px;justify-content:center;align-items:center}
.panel-progress{font-size:13.5px;padding-bottom:0}
.panel-progress svg{width:13.5px;height:13.5px}
@media(max-width:360px){.panel-progress{font-size:12px}.panel-progress svg{width:12px;height:12px}}
/* Seal lights replace only the yellow hazard stripe, retaining the metal art. */
.mission-hatch .hatch-panel{position:absolute;left:0;width:100%;height:calc(50% + 1px);will-change:transform;filter:drop-shadow(0 5px 10px #0009)}
.mission-hatch .hatch-panel img,.mission-hatch .hatch-panel svg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center bottom;filter:none}

/* Compact solo HUD: one status row frees vertical room for the board. */
.game-shell:not(.ai-game):not(.guided-shell):not(:has(.tutorial-tip))>.game-bar{top:46px;left:3%;width:55%;height:42px}
.game-shell:not(.ai-game):not(.guided-shell):not(:has(.tutorial-tip))>.game-moves{top:46px;left:61%;right:3%;height:42px;display:flex;align-items:center;justify-content:center;font-size:clamp(15px,3.8vw,21px);white-space:nowrap}
.game-shell:not(.ai-game):not(.guided-shell)>.game-bar span{font-size:22px}
.daily-game .game-bar{top:0;left:3%;width:55%;height:42px}
.daily-game .game-moves{top:0;left:61%;right:3%;height:42px;display:flex;align-items:center;justify-content:center;font-size:clamp(15px,3.8vw,21px);white-space:nowrap}
.daily-game .game-bar span{font-size:22px}
/* Give the name the whole gap between the action buttons and totals panel. */
#app>header .panel-actions{height:44px;flex:none}
#app>header .panel-player{height:42px;min-height:42px;display:flex;align-items:center;justify-content:center;padding:0 12px;line-height:1;text-align:center}

.friends-screen{position:fixed;inset:0;z-index:115;background:#030915f5;overflow-y:auto;color:#eefaff;padding:18px 12px max(18px,env(safe-area-inset-bottom));font-family:inherit}.friends-screen[hidden]{display:none}.friends-panel{max-width:696px;margin:auto}.friends-panel>header{display:flex;align-items:center;justify-content:space-between;position:sticky;top:-18px;background:#030915;z-index:1;padding:8px 0}.friends-panel h2{margin:0}.friends-close{font-size:25px;min-width:44px}.friends-panel label{display:block;margin:12px 0}.friend-search{display:block;width:100%;box-sizing:border-box;font:inherit;font-size:20px;padding:12px;color:#eefaff;background:#102b3b;border:1px solid #70a5b9;border-radius:9px;margin-top:8px}.friends-status{min-height:22px;color:#a6eeed}.friend-row{padding:14px 0;border-bottom:1px solid #3a5969;display:flex;align-items:center;gap:12px;justify-content:space-between}.friend-row strong{display:block;font-size:21px;overflow-wrap:anywhere}.friend-row small{display:block;color:#b5ccd7;margin-top:5px}.friend-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.friend-actions button,.friend-invites button{font-size:13px;min-height:40px;padding:8px 12px}.friend-row>div:first-child{min-width:0;flex:1}.friends-panel h3{font-size:17px;color:#a6eeed;margin:22px 0 10px}.live-status{position:absolute;top:112px;left:12px;right:12px;text-align:center;color:#b9e8f2;z-index:2;font-size:15px}.live-status:empty{display:none}.live-status button{font-size:12px;margin-left:8px}.live-battle .ai-forfeit{z-index:5}.friend-invites{background:#143346;border-radius:10px;padding:0 10px}.friend-invites:empty{display:none}@media(max-width:420px){.friend-row{flex-wrap:wrap}.friend-actions{flex-basis:100%;justify-content:flex-start}.friend-row strong{font-size:19px}}

/* Larger solo status controls, retaining the left/right layout. */
.game-shell:not(.ai-game):not(.guided-shell):not(:has(.tutorial-tip))>.game-bar,.daily-game .game-bar{height:72.45px}
.game-shell:not(.ai-game):not(.guided-shell):not(:has(.tutorial-tip))>.game-moves,.daily-game .game-moves{height:72.45px;font-size:clamp(21.5625px,5.4625vw,30.1875px)}
.game-shell:not(.ai-game):not(.guided-shell)>.game-bar span,.daily-game .game-bar span{font-size:31.625px}
.game-hud #leave-game{width:40px;min-width:40px;height:40px;padding:0;font-size:30px;line-height:1;display:grid;place-items:center}

/* Friends uses a simple title row, without the menu cockpit artwork. */
.friends-panel>header{flex-direction:row}
.friends-panel>header::before{content:none}

/* Unlimited missions use the whole status row; a faded win label keeps its space. */
.game-shell:not(.ai-game):not(.guided-shell):not(:has(.tutorial-tip)):has(>.game-moves:empty)>.game-bar,.daily-game:has(.game-moves:empty) .game-bar{left:3%;width:94%}

@media(max-width:520px){.game-shell:not(.ai-game):not(.guided-shell):not(:has(.tutorial-tip)):has(>.game-moves:not(:empty))>.game-bar,.daily-game .game-bar{width:40%}.game-shell:not(.ai-game):not(.guided-shell):not(:has(.tutorial-tip))>.game-moves,.daily-game .game-moves{left:45%;letter-spacing:-.02em}}

.space-loading{height:76px;position:relative;margin:12px auto;width:110px;pointer-events:none}.space-loading[hidden]{display:none}.loading-planet{position:absolute;width:28px;height:28px;border-radius:50%;left:41px;top:24px;background:radial-gradient(circle at 30% 25%,#b7fbff,#2983ae 60%,#16304c);box-shadow:0 0 16px #51d1ee55}.loading-orbit{position:absolute;inset:8px 25px;border:1px solid #67c4e85c;border-radius:50%;animation:space-loading-orbit 2s linear infinite}.loading-orbit i{position:absolute;left:3px;top:3px;width:8px;height:8px;border-radius:50%;background:#dbffff;box-shadow:0 0 8px #8ff5ff}.loading-stars{position:absolute;inset:0;color:#9cbfd0;letter-spacing:13px;font-size:15px}@keyframes space-loading-orbit{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.loading-orbit{animation:none}}
.friend-identity{display:flex;align-items:center;gap:9px;min-width:0}.friend-flag{font-size:27px;flex:none}.friend-badge{width:34px;height:34px;object-fit:contain;flex:none}.friend-identity strong{min-width:0}

/* One prominent, server-timed start for friend battles. */
.ai-countdown{left:calc(50% - 75px);top:calc(50% - 90px);width:150px;height:180px;line-height:176px;font-size:142px;z-index:8;animation:battle-count-flash 1s ease-out infinite}
.live-countdown{position:absolute}.live-countdown[hidden]{display:none}
@keyframes battle-count-flash{0%{opacity:.55;filter:brightness(1.8)}25%,85%{opacity:1;filter:brightness(1)}100%{opacity:.7}}
.ai-ship-label b{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.15}
@media(prefers-reduced-motion:reduce){.ai-countdown{animation:none}}

.battle-invitation-popup{position:fixed;inset:0;z-index:220;background:#010912c9;display:grid;place-items:center;padding:20px}.battle-invitation-popup>div{width:min(100%,400px);box-sizing:border-box;padding:22px;background:radial-gradient(ellipse at top,#16445b,#071321 70%);border:1px solid #93e7ed;border-radius:20px;text-align:center;box-shadow:0 0 45px #58eaff33}.battle-invitation-popup button{display:block;width:100%;margin-top:12px;min-height:46px}.battle-invitation-popup h2{font-size:27px}.invite-status{color:#b2e8eb}

/* Battle and the future co-op mode share one equal-width row. */
.online-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0 12px}.online-modes .mode-card{margin:0;width:100%;min-height:260px;padding:14px 12px;text-align:left;border-radius:14px;display:grid;grid-template-rows:auto minmax(0,1fr) auto;align-items:center}.mode-title{display:flex;align-items:center;justify-content:center;gap:7px;font-size:24px;white-space:nowrap;width:100%}.mode-icon{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}.online-modes .spin-planet{width:min(170px,100%);height:100%;max-height:150px;min-height:0}.online-modes .mode-card p{position:static;margin:0;text-align:center;font-size:16px;line-height:1.3;font-weight:400;min-height:62px;align-self:end;display:flex;flex-direction:column;justify-content:flex-end}.duo-art{flex:1;display:flex;align-items:center;justify-content:center;font-size:35px;white-space:nowrap}.duo-card small{display:block;font-size:11px;letter-spacing:1px;margin-top:8px}.online-modes .duo-card:disabled{opacity:.5;cursor:default;background:#10273d66}.online-card.friends-card{margin-top:12px;min-height:120px}.online-card.friends-card h2{text-align:center}.online-card.friends-card p{left:0;right:0;text-align:center;bottom:20px}@media(max-width:359px){.online-modes{gap:8px}.online-modes .mode-card{padding:12px 8px;min-height:240px}.mode-title{font-size:20px;gap:4px}.mode-icon{width:23px;height:23px}.online-modes .mode-card p{font-size:14px}}

.friends-card-open,.friends-card-all{display:block;width:100%;background:none;border:0}.friends-card-open{padding:0 0 8px}.friends-card-all{font-size:13px;letter-spacing:1px;padding:9px}.online-card.friends-card{padding:14px 12px 4px;min-height:190px}.online-card.friends-card p{position:static;margin:18px 0;font-size:15px;color:#bdd1dc}.online-friends-list{height:160px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.online-friend-row{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;margin:4px 0;padding:8px 10px}.online-friend-row .friend-identity strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.friend-online-dot{color:#70f595;margin-left:8px}.friend-profile{position:absolute;inset:0;z-index:5;background:#030915f7;overflow:auto;padding:22px 16px}.friend-profile-card{max-width:440px;margin:0 auto}.friend-profile-back{border:0;background:none;padding-left:0;margin-bottom:20px}.friend-profile-identity .friend-identity{justify-content:center;font-size:26px;gap:12px}.friend-profile-identity .friend-badge{width:44px;height:48px}.friend-profile-identity .friend-flag{font-size:32px}.friend-records{display:grid;gap:12px;margin:24px 0 12px}.friend-records>div{padding:16px;text-align:center;border:1px solid #567683;border-radius:10px;background:#102a3b77}.friend-records span,.friend-records strong{display:block}.friend-records span{font-size:13px;color:#a9c6d5;letter-spacing:1px}.friend-records strong{font-size:27px;margin-top:6px}.friend-profile-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.friend-profile-actions button{min-height:70px;padding:10px;font-size:17px}.friend-profile-gift span{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:7px}.friend-profile-gift img{width:24px;height:24px;object-fit:contain}.friend-profile-more{margin-top:12px;display:grid;gap:10px}.friend-profile-more[hidden]{display:none}.friend-profile-status{min-height:24px;text-align:center;font-size:15px;color:#b8d2e2}.friend-row [role=button]{cursor:pointer}.friend-row [role=button]:focus-visible{outline:2px solid #76ffc7;outline-offset:4px}

.friend-recent{max-height:260px;overflow:auto;overscroll-behavior:contain}

.friend-profile-space{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:0}.friend-profile-card{position:relative;z-index:1}.friend-hero{display:grid;grid-template-columns:minmax(110px,.9fr) minmax(0,1.3fr);gap:18px;align-items:stretch;margin:24px 0 16px}.friend-profile-ship{width:100%;height:240px;object-fit:contain;align-self:center}.friend-hero .friend-records{margin:0;grid-template-rows:1fr 1fr;gap:16px}.friend-hero .friend-records>div{display:flex;flex-direction:column;justify-content:center;padding:12px 8px;background:#071421bd}.friend-hero .friend-records span{font-size:12px;line-height:1.4;overflow-wrap:anywhere}.friend-hero .friend-records strong{font-size:24px}.friend-profile-actions{gap:16px}.friend-profile-actions button{background:#102339e6}.friend-profile-actions .mode-icon{vertical-align:middle}.friend-profile-identity strong{overflow-wrap:anywhere;min-width:0}.friend-profile-identity{margin-bottom:4px}@media(max-width:359px){.friend-hero{gap:12px;grid-template-columns:minmax(90px,.8fr) minmax(0,1.3fr)}.friend-profile-actions{gap:12px}.friend-profile-identity .friend-identity{font-size:23px}}

.battle-search{position:fixed;inset:0;z-index:45;display:grid;place-items:center;background:#030914e8;padding:20px}.battle-search>div{width:min(390px,100%);padding:28px 20px;border:1px solid #65899b;border-radius:18px;background:#071522;text-align:center}.battle-search h2{font-size:27px}.battle-search p{font-size:20px;min-height:55px}.battle-search small{display:block;color:#a7c4d4;line-height:1.5;margin:16px 0 24px}.battle-search button{width:100%}

.friend-row.friend-compact{flex-wrap:nowrap;gap:10px;padding:9px 0;min-height:58px}.friend-compact .friend-actions{flex:none;flex-basis:auto}.friend-compact .friend-actions button{padding:8px 10px;min-height:40px}.friend-compact .friend-identity strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow-wrap:normal}.friend-compact .friend-badge{width:29px;height:29px}.friend-compact .friend-flag{font-size:24px}.friend-compact .friend-identity{gap:7px}.friends-card-open{display:flex;align-items:center;justify-content:center;gap:12px;font-size:26px;min-height:52px;touch-action:manipulation}.friends-icon{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.6}.friends-card-all{min-height:44px;touch-action:manipulation}.friends-opening{position:fixed;inset:0;z-index:116;display:grid;place-items:center;background:#030915e8;padding:20px}.friends-opening>div{width:min(390px,100%);border:1px solid #65899b;border-radius:18px;padding:24px;background:#071522;text-align:center}

.friend-gift-popup{position:fixed;inset:0;z-index:125;background:#020819cc;display:grid;place-items:center;padding:20px}.friend-gift-popup>div{position:relative;width:min(390px,100%);padding:34px 22px 26px;background:radial-gradient(ellipse at 50% 20%,#123550,#061424 65%);border:1px solid #87c2da;border-radius:20px;text-align:center;box-shadow:0 0 45px #33b9ff25}.gift-close{position:absolute;right:10px;top:5px;border:0;background:none;font-size:30px;min-width:44px;min-height:44px;padding:0}.gift-diamond-burst{height:120px;position:relative;display:grid;place-items:center}.gift-diamond-burst img{width:85px;height:85px;object-fit:contain;filter:drop-shadow(0 0 18px #51c9ff);animation:gift-arrive 1.6s ease-out both}.gift-diamond-burst i{position:absolute;left:50%;top:50%;font-style:normal;font-size:27px;color:#aff6ff;animation:gift-spark 1.8s ease-out both;--x:-90px;--y:-40px}.gift-diamond-burst i:nth-child(2){--x:85px;--y:-30px;animation-delay:.1s}.gift-diamond-burst i:nth-child(4){--x:-65px;--y:55px;animation-delay:.2s}.gift-diamond-burst i:nth-child(5){--x:75px;--y:60px;animation-delay:.15s}.friend-gift-popup h2{font-size:30px;margin:12px 0}.gift-sender{font-size:20px;overflow-wrap:anywhere}.gift-status{color:#b6dbe8;min-height:20px}.gift-send-back{width:100%;font-size:18px;min-height:52px}.gift-send-back img{width:24px;height:24px;vertical-align:middle}.gift-send-back[hidden]{display:none}@keyframes gift-arrive{0%{transform:scale(.15) translateY(40px);opacity:0}55%{transform:scale(1.15)}100%{transform:scale(1);opacity:1}}@keyframes gift-spark{0%{transform:translate(0,0) scale(.2);opacity:0}25%{opacity:1}100%{transform:translate(var(--x),var(--y)) scale(.8);opacity:0}}@media(prefers-reduced-motion:reduce){.gift-diamond-burst img,.gift-diamond-burst i{animation:none}.gift-diamond-burst i{display:none}}

/* One real layout row: tube LEFT, label RIGHT. No :has(:empty) size switch. */
.solo-status{position:absolute;top:46px;left:3%;right:3%;height:72.45px;display:grid;grid-template-columns:minmax(0,1fr) max-content;column-gap:10px;align-items:center;z-index:2}
.daily-game .solo-status{top:0}
.solo-status>.game-moves{position:static;inset:auto;width:100%;height:72.45px;min-width:0;display:flex;align-items:center;justify-content:center;font-size:clamp(21.5625px,5.4625vw,30.1875px);font-weight:700;line-height:1;letter-spacing:-.02em;white-space:nowrap;grid-column:2;grid-row:1}
.solo-status>.game-bar{position:relative;inset:auto;width:100%;height:72.45px;min-width:0;grid-column:1;grid-row:1}
.solo-status>.game-bar span{font-size:31.625px}
.solo-status.unlimited{grid-template-columns:minmax(0,1fr)}
.solo-status.unlimited>.game-moves{display:none}
.solo-status.unlimited>.game-bar{grid-column:1}

/* The short MOVES label uses intrinsic width at every breakpoint. */

.duo-game{position:fixed;inset:0;margin:auto;width:min(100%,696px);height:100dvh;background:radial-gradient(ellipse at top,#133048,#020912 70%);display:flex;flex-direction:column;z-index:160;padding:8px 12px;box-sizing:border-box}.duo-board-area{position:relative;flex:1;min-height:220px;transition:opacity .65s}.duo-board-area>.board-canvas{width:100%;height:100%;display:block;touch-action:none}.duo-status-row{position:absolute;z-index:3;top:0;left:1%;right:1%;height:72.45px;display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:10px;align-items:center}.duo-status-row>.game-bar{position:relative;inset:auto;width:100%;height:72.45px;margin:0}.duo-status-row>.game-moves{position:static;inset:auto;width:100%;font-size:clamp(19px,5vw,27px);height:72.45px;display:flex;align-items:center;justify-content:center;white-space:nowrap}.duo-status-row .game-bar span{font-size:29px}.duo-players{display:grid;gap:5px;transition:opacity .65s}.duo-player{min-height:38px;display:flex;align-items:center;gap:8px;padding:5px 9px;border:1px solid #496174;border-radius:9px;opacity:.58;text-align:left}.duo-player.active{opacity:1;border:2px solid #62ffc2;background:#154636;box-shadow:0 0 12px #40ffb429}.duo-player img{width:29px;height:29px;object-fit:contain;flex:none}.duo-player strong{font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duo-player time{margin-left:auto;color:#a4ffcf;font-size:24px;font-variant-numeric:tabular-nums}.duo-player small{margin-left:auto;font-size:10px;white-space:nowrap}.duo-player time:not([hidden])+small{margin-left:0}.duo-message{font-size:13px;text-align:center;min-height:18px;padding:5px}.duo-message button{padding:4px 12px;margin-left:8px}.duo-leave{align-self:flex-end;font-size:11px;padding:5px 10px;min-height:28px}.duo-cinematic{position:absolute;inset:0;background:radial-gradient(ellipse,#13374e,#030912 70%);z-index:9;overflow:hidden}.duo-cinematic canvas{width:100%;height:100%}.duo-cinematic[hidden],.duo-result[hidden]{display:none}.duo-ship-label{position:absolute;transform:translateX(-50%);width:112px;text-align:center;font-size:16px;line-height:1.2;overflow-wrap:anywhere}.duo-ship-label img{display:block;width:36px;height:36px;object-fit:contain;margin:0 auto 5px}.duo-result{position:absolute;inset:0;z-index:12;background:#030b18ed;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px;text-align:center;overflow:auto}.duo-result h2{font-family:Debug,DIN,sans-serif;font-size:clamp(32px,7vw,55px);line-height:1.2}.duo-result p{margin:8px 0;font-size:18px}.duo-result button{margin-top:14px;min-height:44px}.duo-invite-wait{position:fixed;inset:0;z-index:165;background:#020a16ed;display:grid;place-items:center;padding:22px}.duo-invite-wait>div{width:min(100%,380px);padding:28px;border:1px solid #83b7c9;border-radius:18px;text-align:center;background:#0b2234}.duo-invite-wait button{display:block;width:100%;margin-top:12px}.duo-countdown{z-index:8}.duo-player time[hidden]{display:none}
.duo-game [hidden],.duo-invite-wait [hidden]{display:none!important}

.friend-rematch{display:grid;gap:12px;width:min(100%,340px);margin:18px auto 0}.friend-rematch button{width:100%;min-height:46px;margin:0}.friend-rematch p{font-size:16px;margin:0}.friend-rematch [hidden]{display:none}.friend-rematch .rematch-play{border-color:#70e9bb;background:#163e3b}

/* Own allowance stays beside the player gauge without reducing the puzzle canvas. */
.battle-moves{position:absolute;top:112px;right:18px;z-index:4;font:700 14px DIN,sans-serif;color:#edfaff;pointer-events:none;text-shadow:0 1px 3px #000}
.battle-moves[hidden]{display:none}
@media(max-width:360px){.battle-moves{top:108px;right:12px;font-size:12px}}

.game-hud #leave-game,.daily-back{display:grid;place-items:center;padding:0}
.game-hud #leave-game svg,.daily-back svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;display:block}
/* Keep the bottom control completely outside every online tray touch target. */
.ai-game>.board-canvas{bottom:calc(34px + env(safe-area-inset-bottom));height:calc(100% - 34px - env(safe-area-inset-bottom))}
.ai-forfeit{bottom:env(safe-area-inset-bottom)}
.ai-game>.game-bar,.live-status{pointer-events:none}.live-status button{pointer-events:auto}

.friend-rematch h3{margin:0;font-size:22px}.rematch-countdown{font-size:32px;line-height:1.2;color:#baf7ff}

/* Settings actions have independent touch targets and consistent icon alignment. */
.settings-actions{display:grid;gap:14px;margin-top:24px}.settings-actions>button{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:54px;margin:0;padding:12px 16px}.settings-actions>button[hidden]{display:none}.settings-actions svg{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.panel-progress{font-size:16.2px}.panel-progress svg{width:16.2px;height:16.2px}@media(max-width:360px){.panel-progress{font-size:14.4px}.panel-progress svg{width:14.4px;height:14.4px}}
.cosmetic-category[data-category="badges"] .cosmetic-strip{display:flex;overflow-x:auto;overflow-y:hidden;gap:8px;overscroll-behavior-x:contain}.cosmetic-category[data-category="badges"] .cosmetic-item{flex:0 0 115px;width:115px;min-width:115px}

#modal.profile-required .close{display:none}#modal .close-profile[hidden]{display:none}

/* Special missions are previewed even on locked planets and mission nodes. */
.special-marker{display:inline-flex;align-items:center;justify-content:center;gap:1px;height:25px;flex:none;filter:drop-shadow(0 2px 3px #000);color:#fff;pointer-events:none}
.special-marker img{display:block;width:18px;height:22px;object-fit:contain}
.planet-specials{position:absolute;z-index:4;left:50%;bottom:8%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:7px;padding:4px 7px;border:1px solid #7198b7;border-radius:12px;background:#071523e8;pointer-events:none}
.planet-thumb.future{opacity:1}.planet-thumb.future canvas{opacity:.30}
.mission-planet>.planet-specials{bottom:2%}
.mission-node>.special-marker{position:absolute;bottom:calc(100% + 5px);left:50%;transform:translateX(-50%);height:22px;padding:1px 3px;border-radius:6px;background:#071523eb}
.mission-node>.special-marker img{width:15px;height:20px}
.special-wager{position:relative;width:34px;color:#ffe38a}
.special-wager svg{position:absolute;inset:0;width:100%;height:100%;fill:#1b273d;stroke:#ffe38a;stroke-width:1.5}
.special-wager b{position:relative;font:700 12px DIN,sans-serif;background:#1b273d;padding:0 1px;line-height:13px}

.life-refill.life-refill-highlight{color:#fff4a9;outline:2px solid #ffe173;outline-offset:4px;border-radius:3px;animation:life-refill-cue .8s ease-in-out 5}
@keyframes life-refill-cue{0%,100%{box-shadow:0 0 3px 4px #ffe17333}50%{box-shadow:0 0 13px 7px #ffe17388}}
@media(prefers-reduced-motion:reduce){.life-refill.life-refill-highlight{animation:none;box-shadow:0 0 5px 4px #ffe17355}}

.special-intro{position:fixed;inset:0;z-index:30;background:#020609;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:60px max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom));text-align:center;overflow:auto}
.special-intro h2{font-family:SpaceBoss,DIN,sans-serif;font-size:clamp(32px,8vw,64px);line-height:1.1;margin:0;max-width:650px}
.special-description{font-size:clamp(18px,4.5vw,25px);max-width:620px;min-height:4.5em;line-height:1.35;margin:0}
.special-intro .special-intro-back{position:absolute;left:16px;top:max(16px,env(safe-area-inset-top));font-size:30px;border:0;background:none}
.special-intro label{display:flex;align-items:center;gap:12px;font-size:20px}
.special-intro input{width:100px;padding:12px;background:#112638;color:white;border:1px solid #8fdef2;border-radius:8px;text-align:center}
.special-intro label img{width:28px;height:28px;object-fit:contain}
.special-intro small{max-width:450px;color:#a9c3d6;line-height:1.4}
.special-continue{min-height:48px;max-width:100%}.special-error{color:#ffbfab;min-height:1.2em;margin:0}

/* Invitation wait uses the existing space loading artwork. */
.outgoing-invite-wait{position:fixed;inset:0;z-index:18000;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 40%,#102b40 0%,#02070f 70%);padding:24px;box-sizing:border-box;overflow:auto;color:#fff}
.outgoing-invite-wait>div{width:min(100%,460px);text-align:center;margin:auto}
.outgoing-invite-wait h2{font-size:clamp(22px,5vw,34px);line-height:1.25;overflow-wrap:anywhere;margin:0 0 24px}
.outgoing-invite-wait .space-loading{margin:20px auto 28px;transform:scale(1.2)}
.outgoing-invite-wait button{display:block;min-height:48px;width:min(100%,300px);margin:16px auto}
.outgoing-invite-wait button[hidden]{display:none}
.outgoing-invite-wait .invite-wait-time{font-variant-numeric:tabular-nums}

/* Leave enough scrolling room for the camera to follow the destination ship. */
.journey #content{padding-bottom:50vh;padding-bottom:50svh}

/* Keep the Store geometry stable while a purchase is being saved. */
.cosmetics-shop .cosmetic-status:empty{display:block}
.cosmetics-shop .cosmetic-status{height:34px;min-height:34px;flex-shrink:0;overflow:auto}
.door-preview{position:relative;width:103px;height:103px;overflow:hidden;border-radius:8px;background:#050d18}
.door-preview .hatch-panel{position:absolute;left:0;width:100%;height:50%;overflow:hidden;transform:none}
.door-preview .hatch-top{top:0}.door-preview .hatch-bottom{bottom:0;transform:rotate(180deg)}
.door-preview .hatch-panel>img,.door-preview .hatch-panel>svg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center bottom;filter:none}
.hatch-panel>.hatch-finish{mix-blend-mode:screen;opacity:.78}
.friend-ship-loading{position:absolute;inset:0;display:grid;place-content:center;text-align:center;font-size:13px}.friend-ship-loading[hidden]{display:none}
.friend-hero{position:relative}
.friend-ship-loading{position:relative;inset:auto;grid-area:1/1;align-self:stretch;z-index:1}.friend-profile-ship{grid-area:1/1}.friend-hero .friend-records{grid-area:1/2}
.cosmetic-item>span{height:20px;min-height:20px;line-height:20px;display:flex;align-items:center;justify-content:center;gap:2px}

/* Emphasise only the current mission planet; keep its tap target stationary. */
@keyframes current-planet-throb{0%,100%{transform:scale(1)}50%{transform:scale(1.055)}}
@keyframes current-planet-halo{0%,100%{opacity:.65;transform:scale(.96)}50%{opacity:1;transform:scale(1.10)}}
.route .planet-thumb.current>canvas:not(.current-ship){animation:current-planet-throb 2.4s ease-in-out infinite;transform-origin:center}
.route .planet-thumb.current:before{inset:12%;background:#66ffdc3d;box-shadow:0 0 22px 12px #6affd75c,0 0 45px 22px #49dbff42;animation:current-planet-halo 2.4s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){.route .planet-thumb.current>canvas:not(.current-ship),.route .planet-thumb.current:before{animation:none}}

/* Both illustrations share the same centred lane; square planet pixels never stretch. */
.online-modes .mode-art{display:grid;place-items:center;align-self:stretch;justify-self:stretch;width:100%;height:100%;min-width:0;min-height:0}
.online-modes .mode-art .spin-planet{width:100%;height:100%;max-width:170px;max-height:150px;min-height:0;margin:0;justify-self:center;align-self:center}
.online-modes .spin-planet canvas{display:block;width:100%;height:100%;object-fit:contain}
.online-modes .duo-ships{display:block;line-height:1;text-align:center}

/* The same guided lesson serves first launch and HOW TO PLAY replay. */
.guided-intro{background:radial-gradient(ellipse at top,#10283eaa,#030915aa 75%);isolation:isolate}
.guided-intro .guided-hud{top:max(12px,env(safe-area-inset-top));left:5%;right:5%;height:38px;justify-content:space-between;opacity:0;pointer-events:none;transition:opacity .35s;font-size:21px}
.guided-lives{color:#ff6c7b;white-space:nowrap}.guided-diamonds{display:flex;align-items:center;gap:5px}.guided-diamonds img{width:25px;height:25px;object-fit:contain}.guided-intro .guided-hint{min-height:34px;white-space:nowrap}.guided-hint.demonstrated{background:#245947}
.guided-intro .guided-shell>.guided-progress{top:calc(62px + env(safe-area-inset-top));left:5%;width:62%;height:38px;opacity:0}.guided-intro .guided-shell>.guided-progress span{font-size:22px}.guided-budget{position:absolute;top:calc(62px + env(safe-area-inset-top));left:70%;right:4%;height:38px;display:grid;place-items:center;z-index:2;font-size:18px;font-weight:700;opacity:0}
.guided-intro .guided-shell>.guided-copy{top:calc(116px + env(safe-area-inset-top));left:4%;right:4%;padding:0;min-height:150px;display:grid;grid-template-columns:minmax(0,1fr) 65px;column-gap:12px;align-items:center;text-align:left;font-size:clamp(17px,4.5vw,24px);line-height:1.32;z-index:6;pointer-events:none;white-space:pre-line}
.guided-words{align-self:center}.guided-intro .guided-next{padding:9px 6px;font-size:14px;min-height:44px;pointer-events:auto;align-self:center;background:#123447;border-color:#b3e5ed}.guided-intro .guided-next:disabled{opacity:.35}.guided-retry{grid-column:1;justify-self:start;pointer-events:auto;margin-top:10px;font-size:14px;padding:7px 12px}.guided-retry[hidden]{display:none}
.guided-shadow{position:absolute;inset:0;width:100%;height:100%;z-index:4;pointer-events:none;opacity:0;transition:opacity .4s}.guided-hand{z-index:5}.guided-beginner .guided-hud,.guided-beginner .guided-progress,.guided-beginner .guided-budget{opacity:1}
.guided-intro[data-stage="welcome"] .guided-copy,.guided-intro[data-stage="basics"] .guided-copy,.guided-intro[data-stage="complete"] .guided-copy{top:28%;min-height:180px}
@media(max-width:360px){.guided-intro .guided-shell>.guided-copy{font-size:17px;grid-template-columns:minmax(0,1fr) 58px;column-gap:9px;min-height:166px}.guided-budget{font-size:15px}}
@media(max-height:600px){.guided-intro .guided-shell>.guided-copy{top:100px;min-height:146px;font-size:15px;line-height:1.22}.guided-intro .guided-shell>.guided-progress,.guided-budget{top:54px;height:34px}.guided-intro .guided-hud{top:8px;height:32px}.guided-intro .guided-shell>.guided-copy .guided-next{font-size:13px}}
@media(prefers-reduced-motion:reduce){.guided-intro,.guided-shadow,.guided-intro .guided-hud,.guided-intro .game-bar{transition:none}}
.guided-intro.guided-beginner .guided-shell>.guided-progress{opacity:1}

/* User-reviewed tutorial refinements: centred copy, calm focus and taller status. */
.guided-intro .guided-shell>.guided-progress{height:60px;top:62px}
.guided-intro .guided-budget{height:60px;top:62px;font-size:20px}
.guided-intro .guided-shell>.guided-copy{top:140px;height:174px;min-height:0;display:block;padding:0 8px;text-align:center;font-size:clamp(18px,4.6vw,24px);line-height:1.36;letter-spacing:.01em;font-weight:400}
.guided-intro .guided-words{height:126px;display:flex;flex-wrap:wrap;align-content:center;justify-content:center;white-space:pre-line}
/* Inline word flow keeps full-sentence wrapping stable while glyphs fade in. */
.guided-intro .guided-words{display:block;align-content:center}
.guided-intro .guided-next{position:absolute;right:0;bottom:0;width:66px;min-height:38px;font-size:14px;padding:8px}
.guided-intro .guided-next[hidden]{display:none}
.guided-intro .guided-retry{position:absolute;left:0;bottom:0;margin:0}
.guided-intro[data-stage="welcome"] .guided-shell>.guided-copy,.guided-intro[data-stage="basics"] .guided-shell>.guided-copy,.guided-intro[data-stage="complete"] .guided-shell>.guided-copy{top:50%;height:auto;min-height:0;transform:translateY(-50%)}
.guided-intro[data-stage="welcome"] .guided-words,.guided-intro[data-stage="basics"] .guided-words,.guided-intro[data-stage="complete"] .guided-words{height:auto}
.guided-intro[data-stage="welcome"] .guided-next,.guided-intro[data-stage="basics"] .guided-next{top:calc(100% + 22px);bottom:auto}
.guided-focus{animation:guided-focus-breathe 2.4s ease-in-out infinite;transform-origin:center;filter:drop-shadow(0 0 6px #b6f5ff40)}
@keyframes guided-focus-breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.035)}}
@media(max-width:360px){.guided-intro .guided-shell>.guided-copy{font-size:17px}}
@media(max-height:600px){.guided-intro .guided-shell>.guided-progress,.guided-intro .guided-budget{top:52px;height:56px}.guided-intro .guided-shell>.guided-copy{top:124px;height:132px;font-size:15px;line-height:1.28}.guided-intro .guided-words{height:90px}.guided-intro .guided-next{min-height:34px;font-size:13px}}
@media(prefers-reduced-motion:reduce){.guided-focus{animation:none}}
.guided-intro .guided-hint.guided-pressed{animation:none;transform:scale(.92);background:#4a8c72}

/* The active HUD control grows by 25%, then returns smoothly after its lesson. */
.guided-hud>.guided-lives,.guided-hud>.guided-diamonds,.guided-hud>.guided-hint{scale:1;transition:scale .35s ease;transform-origin:center}
.guided-hud>.guided-focus{scale:1.25}
.guided-hud>.guided-lives{transform-origin:left center}
.guided-hud>.guided-hint{transform-origin:right center}
@media(prefers-reduced-motion:reduce){.guided-hud>.guided-lives,.guided-hud>.guided-diamonds,.guided-hud>.guided-hint{transition:none}}

.friend-progress{display:grid;grid-template-columns:1fr 1fr;gap:16px;text-align:center;margin:12px 0 18px}
.friend-progress>div{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0}
.friend-progress strong{font-size:25px;color:#e5faff;line-height:1.2}
.friend-progress span{font-size:11px;letter-spacing:.7px;color:#aac9da;max-width:110px;text-align:left;line-height:1.35}
.friend-profile-status:empty{display:none}
.ai-battle[data-intro-pending] .board-canvas,.ai-battle[data-intro-pending] .game-bar,.ai-battle[data-intro-pending] .battle-moves,.ai-battle[data-intro-pending] .duo-status-row{visibility:hidden;pointer-events:none}

/* Centre artwork in the actual gap between title and footer text. */
.online-modes .mode-card p{min-height:0}
.duo-ships{display:inline-block;animation:duoHover 3.6s ease-in-out infinite}
@keyframes duoHover{0%,100%{transform:translateY(3px) rotate(-1deg)}50%{transform:translateY(-3px) rotate(1deg)}}
@media(prefers-reduced-motion:reduce){.duo-ships{animation:none}}

#app>header .panel-player[hidden]{display:none;height:0;min-height:0;padding:0}
.other-sign-in{margin:10px 0;font-size:13px;color:#aac9da}
.other-sign-in summary{cursor:pointer;text-align:center}
.other-sign-in button{margin-top:12px;width:100%}

#modal [data-profile-screen]{gap:14px}
#modal [data-profile-screen] h2{margin:4px 20px 8px;text-align:center}
#modal [data-profile-screen] p{margin:0;text-align:center}
#modal [data-profile-screen] [role=status]:empty{display:none}
#modal [data-profile-screen] .other-sign-in{margin:0}

.online-account-entry{display:flex;align-items:end;gap:12px;margin:0 0 18px}.online-account-entry label{display:grid;gap:5px;flex:1;min-width:0;font-size:14px}.online-account-entry input{width:100%;min-width:0;box-sizing:border-box;padding:10px 12px;border:1px solid #83a4b1;border-radius:10px;background:#081725;color:#eafbff;font:inherit;font-size:18px}.online-account-entry button{min-height:44px;padding:10px 16px}.online-account-entry input[readonly]{opacity:1}

/* Transient confirmations remain visible above the Friends screen. */
#toast{z-index:300}

/* The landing's raised surface route remains the planet mission menu. */
.planet-landing-ready{overflow:hidden}
.planet-landing-ready #app{padding-bottom:0!important}
.planet-landing-ready #app>header{position:relative;z-index:7;animation:planet-panel-in .6s cubic-bezier(.2,.8,.2,1) both}
.planet-landing-ready #tabs,.planet-landing-ready footer,.planet-landing-ready #streak{display:none}
.planet-landing-ready .landing-stage{z-index:4}
.planet-landing-ready #cancel-landing{top:calc(var(--cockpit-height,132px) + 20px);z-index:2}
.landing-stage .landing-start{position:absolute;top:auto;left:50%;bottom:max(24px,env(safe-area-inset-bottom));width:min(500px,88%);height:56px;padding:8px 16px;font-size:20px;background:#164453;border-color:#78e7e0;transform:translateX(-50%);animation:planet-start-in .45s .35s cubic-bezier(.2,1.3,.4,1) both}
.planet-menu-immediate #app>header,.planet-menu-immediate .landing-start{animation:none}
@keyframes planet-panel-in{from{transform:translateY(-130%);opacity:0}to{transform:translateY(0);opacity:1}}
@keyframes planet-start-in{from{transform:translateX(-50%) scale(.6);opacity:0}to{transform:translateX(-50%) scale(1);opacity:1}}
@media(prefers-reduced-motion:reduce){.planet-landing-ready #app>header,.landing-stage .landing-start{animation-duration:.01ms;animation-delay:0ms}}
/* Opening order: persistent tabs, current planet, surrounding route, cockpit. */
.home-opening #app>header{opacity:0;transform:translateY(-130%)}
.home-opening .route>*{opacity:0}
.home-opening-ready .route>.planet-row:has(.planet-thumb.current){animation:home-current-in .7s cubic-bezier(.2,1.2,.3,1) both}
.home-opening-ready .route>.planet-row:not(:has(.planet-thumb.current)){animation:home-route-in .7s .65s ease-out both}
.home-opening-ready .planet-row:has(.planet-thumb.current) .route-line,.home-opening-ready .planet-row:has(.planet-thumb.current) .route-bundle{animation:home-route-in .7s .65s ease-out both}
.home-opening-ready #app>header{animation:planet-panel-in .8s .12s cubic-bezier(.2,.8,.2,1) both}
@keyframes home-current-in{from{opacity:0;scale:.6}to{opacity:1;scale:1}}
@keyframes home-route-in{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.home-opening-ready .route>*,.home-opening-ready .route-line,.home-opening-ready .route-bundle,.home-opening-ready #app>header{animation-duration:.01ms;animation-delay:0ms}}
.landing-planet-name{position:absolute;top:calc(var(--cockpit-height,132px) + 28px);left:80px;right:80px;margin:0;text-align:center;font-size:20px;letter-spacing:2px;pointer-events:none}

/* Navigation stays at the viewport floor, independent of document height. */
#tabs{position:fixed;inset:auto 0 0;margin-inline:auto;transform:none;flex-shrink:0;transition:none}

/* Menu navigation remains visible through planet entry and travel. */
body:is(.landing,.planet-selection,.planet-landing-ready) #tabs{display:flex}
#tabs{bottom:var(--tabs-viewport-bottom,0px);animation:none}
.landing-stage .landing-start{bottom:calc(var(--tabs-height,76px) + var(--tabs-viewport-bottom,0px) + 12px)}

/* Triple and Double use the same display type and title treatment. */
.triple-diamond-intro h2{font-family:SpaceBoss,DIN,sans-serif;font-weight:400;font-size:clamp(32px,9vw,70px);line-height:1.15;letter-spacing:2px;color:#a8f9ff;-webkit-text-stroke:2px #64203d;text-shadow:3px 4px #135b80,-1px -1px #fff}

/* Keep totals in view while the returning ship completes its mission or planet. */
body.planet-return #app>header{display:flex;position:relative;z-index:7;opacity:1;transform:none;animation:none}
body.planet-return #cancel-landing{top:calc(var(--cockpit-height,132px) + 20px)}
#mission-total,#planet-total{display:inline-block}
/* Campaign UFO encounter: the saved board stays behind its announcement. */
.ufo-duel .ufo-message{position:absolute;inset:0;z-index:5;background:#05101cf5;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px;text-align:center;gap:18px}
.ufo-duel .ufo-message[hidden]{display:none}.ufo-duel .ufo-message h2{font-family:SpaceBoss,DIN,sans-serif;font-size:clamp(36px,10vw,70px);font-weight:400;color:#a4ffdd;margin:0}.ufo-duel .ufo-message p{font-family:DIN,sans-serif;font-size:clamp(18px,5vw,25px);line-height:1.5;max-width:620px;white-space:pre-wrap;margin:0}.ufo-icon{font-size:76px;line-height:1.2}.ufo-duel .ai-forfeit{z-index:8}.ufo-reward{font:20px/1.7 DIN,sans-serif}.ufo-reward strong{font-size:32px}.ufo-reward img{width:32px;height:32px;object-fit:contain;vertical-align:middle}

/* Navigation belongs only to the two home tabs, never a nested page or dialog. */
body #tabs{display:none!important}
body.homepage:not(.journey):not(.game):not(:has(#app[inert])):not(:has(#modal:not([hidden]))) #tabs{display:flex!important}
.landing-stage .landing-start{bottom:max(20px,env(safe-area-inset-bottom))}
.planet-gpu-fallback[hidden]{display:none!important}

.planet-thumb{-webkit-tap-highlight-color:transparent}
.planet-thumb:focus:not(:focus-visible){outline:none}
.ai-intro-name[hidden],.ai-ship-label[hidden]{display:none!important}

.referral-card{width:100%;display:flex;align-items:center;justify-content:center;gap:9px;margin:0 0 12px;padding:14px 10px;font:inherit;font-size:17px;line-height:1.3;border:1px solid #a4deec;border-radius:13px;background:#12303f;color:#e5faff}.referral-card img{width:28px;height:25px;object-fit:contain}.online-modes .mode-card{min-height:220px}.online-modes .mode-art{height:90px;min-height:90px}.online-card.friends-card{height:auto;min-height:132px;padding:14px}.referral-label{display:grid;gap:6px;text-align:left;margin:15px 0 10px;font-size:14px}.referral-label input{width:100%;box-sizing:border-box;font:inherit;font-size:15px;padding:10px;background:#06121c;color:#e5faff;border:1px solid #8fcada;border-radius:8px}.referral-terms{font-size:12px!important;line-height:1.4;opacity:.8}

.online-card.friends-card .online-friends-list{height:72px}.online-card.friends-card .online-friends-list p{position:static;margin:8px 0;font-size:14px}.online-card.friends-card .friends-card-open{padding-bottom:4px}

/* Compact feedback control shares the identity row below Settings. */
.panel-identity{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center}
#app>header .panel-identity .panel-player{grid-column:2;width:auto;max-width:130px;padding:0 2px}
.panel-identity .home-utility{grid-column:3;justify-self:end;align-items:center;min-height:42px}
.home-utility{display:none;width:100%;justify-content:flex-end}
body.home-missions .home-utility{display:flex}
#submit-feedback{display:inline-flex;align-items:center;width:76px;min-height:30px;padding:4px 5px;justify-content:center;line-height:1.1;color:#eefaff;background:#0d1c2ce6;border:1px solid #829eaa;border-radius:6px;font-size:9px;font-weight:700;text-decoration:none;letter-spacing:.15px}
#submit-feedback:focus-visible{outline:3px solid #76ffc7;outline-offset:3px}

.feedback-form{text-align:left;padding-top:24px}.feedback-form h2{text-align:center}.feedback-form fieldset{border:0;padding:0;margin:22px 0}.feedback-form legend{font-size:17px;line-height:1.4;margin-bottom:12px}.feedback-options{display:flex;flex-wrap:wrap;gap:8px}.feedback-options label{position:relative;flex:1 1 100px;cursor:pointer}.feedback-options input{position:absolute;opacity:0;width:100%;height:100%;margin:0}.feedback-options span{display:flex;align-items:center;justify-content:center;text-align:center;min-height:44px;height:100%;padding:9px;border:1px solid #829eaa;border-radius:8px;background:#0d1c2c}.feedback-options input:checked+span{background:#185361;border-color:#91ffe4}.feedback-options input:focus-visible+span{outline:3px solid #76ffc7;outline-offset:2px}.feedback-scale label{flex:1 1 0;min-width:0}.feedback-message{display:block}.feedback-message textarea{display:block;width:100%;margin:8px 0 16px;padding:12px;resize:vertical;font:inherit;color:#eefaff;background:#061323;border:1px solid #829eaa;border-radius:8px}.feedback-form>button{width:100%}.feedback-status{font-size:14px;line-height:1.4}

.demo-notice{position:fixed;left:50%;bottom:calc(26px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:10000;max-width:calc(100vw - 32px);width:max-content;padding:14px 22px;background:#07131ff5;color:#fff;border:1px solid #9adce5;border-radius:12px;box-shadow:0 5px 24px #0008;font:600 18px DIN,sans-serif;pointer-events:none}.demo-notice[hidden]{display:none}

#modal-content:has(#referral-status),#modal-content:has(#referral-code){text-align:center}
#modal-content .referral-label,#modal-content .referral-label input{text-align:center}

/* Keep the complete feedback survey visible on mobile with the keyboard closed. */
#modal:has(.feedback-form){padding:10px}
#modal>section:has(.feedback-form){padding:18px;max-height:calc(100dvh - 20px)}
.feedback-form{padding-top:16px;font-size:14px;line-height:1.3}
.feedback-form h2{font-size:21px;line-height:1.2;margin:0 22px 14px}
.feedback-form fieldset{min-width:0;margin:0 0 13px}
.feedback-form legend{font-size:15px;line-height:1.3;margin-bottom:7px}
.feedback-options{flex-wrap:nowrap;gap:6px}
.feedback-options label{flex:1 1 0;min-width:0}
.feedback-options span{font-size:13px;line-height:1.2;padding:5px;min-height:44px}
.feedback-scale span{font-size:16px}
.feedback-scale-ends{display:flex;justify-content:space-between;margin-top:3px;font-size:12px;line-height:1.2}
.feedback-scale-ends span{width:calc((100% - 24px)/5);text-align:center}
.feedback-message{font-size:13px;line-height:1.3}
.feedback-message textarea{height:64px;min-height:48px;margin:6px 0 10px;padding:8px;font-size:16px;line-height:1.25}
.feedback-form>button{min-height:44px;padding:8px;font-size:16px}
.feedback-status{margin:8px 0 0;font-size:13px}
.feedback-status:empty{display:none}
@media(max-height:650px){
 #modal>section:has(.feedback-form){padding:12px}
 .feedback-form{padding-top:14px}
 .feedback-form h2{font-size:19px;margin-bottom:10px}
 .feedback-form fieldset{margin-bottom:10px}
 .feedback-form legend{font-size:14px;margin-bottom:5px}
 .feedback-message textarea{height:52px;margin-bottom:8px}
}

/* Keep the mobile cockpit within the screen and prevent sideways panning. */
html{overflow-x:hidden;overscroll-behavior-x:none;touch-action:pan-y;-webkit-text-size-adjust:100%;text-size-adjust:100%}
@supports(overflow:clip){html{overflow-x:clip}}
body{max-width:100%;overscroll-behavior-x:none;touch-action:pan-y}
#app{max-width:100%;min-width:0}
#app>header{min-width:0;max-width:100%}
#app>header::before{left:-6px;right:-6px}
.panel-identity{min-width:0}.panel-identity>*{min-width:0}
.travel-stage{height:70svh}
body.journey,body.journey #app,body.journey #content{overflow-anchor:none;scroll-behavior:auto}
body.journey{overscroll-behavior:none}
/* Launch logo uses the equipped ship, real planet artwork and the game DIN font. */
.startup-splash{position:fixed;inset:0;z-index:100;display:grid;place-items:center;overflow:hidden;background:radial-gradient(ellipse at center,#07132344,#02071399);pointer-events:auto}
.startup-splash-active #app,.startup-splash-active #tabs,.startup-splash-active #modal,.startup-splash-active #toast{visibility:hidden!important}
.startup-splash-active{overflow:hidden}
.splash-composition{width:min(90vw,540px);display:flex;flex-direction:column;align-items:center;gap:16px;isolation:isolate}
.splash-title{font-family:DIN,sans-serif;font-weight:700;font-size:clamp(48px,13vw,86px);line-height:1;letter-spacing:.045em;text-align:center;color:#ecfdff;text-shadow:0 3px 0 #467987,0 0 24px #73e7ff75;opacity:0;will-change:transform,opacity}
.splash-connect{font-size:clamp(43px,11.8vw,78px);letter-spacing:.015em}
.splash-system{position:relative;width:min(78vw,350px,50svh);aspect-ratio:1}
.splash-ship{position:absolute;left:50%;top:50%;width:32%;height:40%;opacity:0;filter:drop-shadow(0 0 16px #7ae6ff55);will-change:transform,opacity}
.splash-planet{position:absolute;left:50%;top:50%;width:12%;aspect-ratio:1;will-change:transform,opacity;opacity:0}
.splash-planet canvas{width:100%;height:100%;display:block}
.splash-planet-0,.splash-planet-3{width:10%}.splash-planet-4{width:17%}.splash-planet-5{width:19%}.splash-planet-6,.splash-planet-7{width:13%}
.splash-orbit{position:absolute;inset:10%;border:1px solid #a2eeff70;border-radius:50%;box-shadow:0 0 16px #7adeff20;opacity:0}
@media(max-height:550px){.splash-composition{gap:8px}.splash-title{font-size:42px}.splash-connect{font-size:38px}.splash-system{width:min(62vw,43svh)}}

.splash-title{font-family:SpaceBoss,DIN,sans-serif;font-weight:400;font-size:clamp(78px,24vw,140px);color:#a8f9ff;-webkit-text-stroke:1px #64203d;text-shadow:3px 4px #135b80,-1px -1px #fff}
.splash-connect{font-size:clamp(67px,21vw,120px)}
@media(max-height:550px){.splash-title{font-size:58px}.splash-connect{font-size:50px}}

.ufo-duel .battle-moves{display:none!important}

/* Isolate full-screen Daily rendering when Safari releases the old puzzle canvas. */
.daily-mission-page{isolation:isolate;contain:layout paint}
/* Keep the cockpit geometry and planet aspect ratio stable across travel/home. */
.panel-identity{min-height:42px}
.travel-planet{height:auto;aspect-ratio:1}

.store-screen .store-tabs{gap:8px;height:56px;flex-basis:56px;padding:5px 5px 0;border:1px solid #628797;border-bottom:2px solid #9fe9ed;border-radius:12px 12px 0 0;background:#030c16;margin:6px 0 0}
.store-screen .store-tabs button{display:flex;align-items:center;justify-content:center;gap:8px;position:relative;border:1px solid #4b687b;border-bottom:0;border-radius:8px 8px 0 0;min-height:48px;background:#10202f;color:#a7bdc9;font-size:14px}
.store-screen .store-tabs button.selected{background:linear-gradient(#2d6c7c,#173e50);color:#fff;border-color:#a5f1f4;box-shadow:inset 0 3px #b6ffff}
.store-screen .store-tabs button.selected::after{content:'';position:absolute;left:16%;right:16%;bottom:5px;height:3px;border-radius:2px;background:#a7ffff}
.store-tabs img,.store-tabs svg{width:21px;height:21px;flex:none}.store-tabs svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body:has(.travel-settling) .route .planet-thumb.current>canvas:not(.current-ship),body:has(.travel-settling) .route .planet-thumb.current:before{animation:none}
/* Desktop rows share the cockpit's inner frame, just as the mobile panel does. */
@media(min-width:651px){
 #app>header .panel-status,#app>header .panel-actions,#app>header .panel-identity,#app>header .panel-progress{width:calc(100% - 48px);margin-inline:24px}
 #app>header .panel-status{padding-bottom:0;border:0;box-shadow:none}
 #app>header .panel-resources{height:38px;align-items:center}
 #app>header .panel-resources #lives,#app>header .panel-resources #wallet{height:38px;align-items:center;line-height:1}
 #app>header .panel-status h1{max-width:100%;min-width:0;line-height:1.1}
}
/* Clipping sideways content must not create a new vertical scroll container:
   sticky cockpit positioning follows the viewport on later-planet home routes. */
body{overflow-x:visible}
@supports(overflow:clip){html,body{overflow-x:clip}}
#app>header #lives{height:38px;align-items:center}
#lives .life-ship{display:block;width:30.4px!important;height:38px!important;object-fit:contain;align-self:center;transform:none;animation:none}
#lives .life-count{display:flex;height:38px;align-items:center;line-height:1}

.daily-lives,.wheel-lives{display:inline-flex;align-items:center;gap:5px}.menu-life-value{display:inline-flex;align-items:center;min-height:30px;line-height:1}.life-ship-icon{display:block;flex:none;object-fit:contain;object-position:center}
/* Preserve the decorative top rim when the cockpit is pinned after scrolling. */
#app>header{top:calc(env(safe-area-inset-top,0px) + 8px)}

/* An accepted live Battle replaces Home visually and owns its input until exit. */
.live-battle{background:#030915;overscroll-behavior:contain;isolation:isolate}
body:has(>.live-battle) #tabs{display:none!important}

/* Keep home navigation visible while either Missions or Online scrolls. */
body.homepage #app{padding-bottom:calc(var(--tabs-height,76px) + var(--tabs-viewport-bottom,0px) + 16px)}
#tabs{isolation:isolate;backface-visibility:hidden;background:linear-gradient(#030915e8,#030915)}
#cancel-landing{display:grid;place-items:center;width:48px;height:48px;padding:10px;line-height:1}
#cancel-landing svg{width:26px;height:26px;overflow:visible;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
body:is(.planet-landing-ready,.planet-return) #cancel-landing{top:calc(var(--cockpit-bottom, var(--cockpit-height,132px)) + 12px)}
body:is(.planet-landing-ready,.planet-return) .landing-planet-name{top:calc(var(--cockpit-bottom, var(--cockpit-height,132px)) + 20px)}

/* Shared inner margins for every cockpit row, including narrow phones. */
#app>header{--panel-inner-inset:clamp(14px,4vw,24px)}
#app>header .panel-status,#app>header .panel-actions,#app>header .panel-identity,#app>header .panel-progress{width:calc(100% - 2*var(--panel-inner-inset));margin-inline:var(--panel-inner-inset)}
#app>header .panel-status{min-width:0;gap:8px}
#app>header .panel-status h1{min-width:0;white-space:nowrap;font-size:clamp(16px,4.1vw,34px);letter-spacing:1px}
@media(max-width:360px){#app>header .panel-status h1{font-size:15px;letter-spacing:.5px}#app>header .panel-resources{gap:8px}#app>header .panel-resources #lives,#app>header .panel-resources #wallet{font-size:19px}}

@media(max-width:650px){#app>header .panel-status h1{white-space:normal;line-height:1.05;overflow-wrap:normal}}

/* Sudden Death uses the same mission introduction, with its own gold heading. */
.special-sudden-death{color:#ffd966;text-shadow:0 0 8px #c78630;font-size:25px}
.sudden-death-intro h2{color:#ffd966;text-shadow:0 0 18px #ba7c34;order:0}
.sudden-death-intro .special-description{order:1;color:#ffd966}
.sudden-death-intro .special-continue{order:2}
.sudden-death-intro .special-error{order:3}
.sudden-death-intro.repeat-intro .special-description{display:none}

@font-face{font-family:SpaceHalloween;src:url('assets/fonts/Creepster-Regular.ttf') format('truetype');font-display:swap}
.sudden-death-intro h2{font-family:SpaceHalloween,DIN,sans-serif;font-weight:400;font-size:clamp(46px,11vw,84px);letter-spacing:2px}
.sudden-death-emblem{width:140px;height:120px;flex-shrink:0;color:#ffd966}
.sudden-death-intro .sudden-death-emblem{order:1;filter:drop-shadow(0 0 12px #d4983260);animation:sudden-skull-float 2.4s ease-in-out infinite}
.sudden-death-intro .special-description{order:2}
.sudden-death-intro .special-continue{order:3}
.sudden-death-intro .special-error{order:4}
.special-sudden-death .sudden-death-emblem{width:34px;height:29px}
@keyframes sudden-skull-float{0%,100%{transform:translateY(3px) rotate(-4deg)}50%{transform:translateY(-6px) rotate(4deg)}}
@media(prefers-reduced-motion:reduce){.sudden-death-intro .sudden-death-emblem{animation:none}}
