/* Landscape twin-stick cockpit. The canvas remains full size behind both thumbs. */
:root{--safe-top:max(env(safe-area-inset-top,0px),var(--game-safe-top,0px));--safe-bottom:max(env(safe-area-inset-bottom,0px),var(--game-safe-bottom,0px));--safe-left:max(env(safe-area-inset-left,0px),var(--game-safe-left,0px));--safe-right:max(env(safe-area-inset-right,0px),var(--game-safe-right,0px))}
.touchDeck,.rotatePrompt,.touchReticle,.battleFocus,.touchBattleStatus{display:none}.touchDeck[hidden],.rotatePrompt[hidden],.touchReticle[hidden]{display:none!important}
.touchLayout.arena,.touchLayout.battleViewport{height:clamp(340px,56.25vw,640px);min-height:0}
.touchLayout #world,.touchLayout #battleWorld{position:absolute;inset:0;width:100%;height:100%;touch-action:none}
.touchLayout .touchDeck{display:block;position:absolute;inset:0;z-index:8;pointer-events:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.touchMove,.touchAim{position:absolute;bottom:max(12px,var(--safe-bottom));display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:auto;touch-action:none}
.touchMove{left:max(18px,var(--safe-left))}.touchAim{right:max(18px,var(--safe-right))}
.touchStick{position:relative;width:124px;height:124px;border-radius:50%;border:1px solid #a9f3d47d;background:radial-gradient(circle,#0d292f3b 0%,#17373f47 54%,#88dcc944 55%,#0b1c2570 58%);box-shadow:inset 0 0 20px #68dfca10,0 5px 20px #0004;touch-action:none}
.aimStick{border-color:#cbb9ff99;background:radial-gradient(circle,#30233a33 0%,#43355340 54%,#ba9ef65e 55%,#161a2a70 58%)}
.stickCross{position:absolute;inset:0;display:grid;place-items:center;color:#a9edd45c;font:44px/1 sans-serif;pointer-events:none}.aimStick .stickCross{color:#ddc7ff80}
.stickThumb{position:absolute;width:48px;height:48px;left:calc(50% - 24px);top:calc(50% - 24px);border-radius:50%;border:1px solid #b7ffe0c4;background:radial-gradient(circle at 35% 25%,#9bd2c9a6,#356f71c4 70%);box-shadow:0 5px 16px #0007;pointer-events:none}.aimStick .stickThumb{border-color:#dcc6ff;background:radial-gradient(circle at 35% 25%,#d9c9f0b9,#6f558cd4 70%)}
.held .stickThumb{background:#b5ffe3;box-shadow:0 0 24px #82edcf55}.aimStick.held .stickThumb{background:#e2c7ff;box-shadow:0 0 24px #c29bff66}.stickLabel{font:9px 'Space Grotesk',sans-serif;letter-spacing:2px;color:#c3e4dc;text-shadow:0 1px 5px #000}.touchAim .stickLabel{color:#e4d0ff}
.touchActions{position:absolute;bottom:max(16px,var(--safe-bottom));left:50%;transform:translateX(-50%);display:grid;grid-template-columns:repeat(4,58px);gap:8px;pointer-events:auto}
.touchActions button{min-width:0;height:58px;margin:0;padding:4px;border:1px solid #6a8294aa;border-radius:12px;background:linear-gradient(155deg,#26404ed9,#142a37e6);color:#e4f7f2;touch-action:none;font:9px 'Space Grotesk',sans-serif;letter-spacing:.4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.touchActions button b{font:20px/20px 'Space Grotesk',sans-serif;color:#b4ffe4}.touchActions button small{font:7px/10px 'Space Grotesk',sans-serif;color:#c3d8df;white-space:nowrap}.touchActions button:disabled{opacity:.4}.touchActions button:active{border-color:#b9ffdf;background:#336859;transform:scale(.97)}.touchActions .touch-dash{border-color:#83cdb7;background:linear-gradient(150deg,#295e59db,#123437e6)}.touchActions .touch-emp{border-color:#a598cf;background:linear-gradient(150deg,#443758db,#242b47e6)}.controlsIdle .touchStick{opacity:.45}
.touchLayout .abilities,.touchLayout .weaponSwitch,.touchLayout .battleControls,.touchLayout .battleCanvasHint,.touchLayout .sector,.touchLayout #flightRewards,.touchLayout #runBuildBadge,.touchLayout #radio,.touchLayout #combo{display:none}
.touchLayout .hud{top:calc(12px + var(--safe-top));left:max(16px,var(--safe-left));right:auto;margin:0;pointer-events:none}.touchLayout .hud strong{font-size:25px;line-height:1.1}.touchLayout .hud small{font-size:8px}.touchLayout .hud .right{display:none}
.touchLayout .missionhud{top:calc(18px + var(--safe-top));left:170px;right:170px;font-size:10px;margin:0}.touchLayout .missionhud>div{gap:12px}.touchLayout .missionrail{margin-top:8px}
.touchLayout .vitals{left:170px;right:170px;bottom:calc(100px + var(--safe-bottom));font-size:10px;gap:10px;margin:0;pointer-events:none}.touchLayout .combatHUD{left:170px;right:170px;bottom:calc(80px + var(--safe-bottom));font-size:8px;flex-direction:row;gap:12px;pointer-events:none}.touchLayout #bossStatus{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.touchLayout #flightCoach{top:calc(68px + var(--safe-top));left:170px;right:170px;padding:10px;pointer-events:none;margin:0}.touchLayout #flightCoach small{font-size:8px}.touchLayout #flightCoach b{font-size:12px;margin:5px 0}.touchLayout #flightCoach span{font-size:9px}
.touchLayout #arenaFocus,.touchLayout #pause,.touchLayout .battleFocus{position:absolute;top:calc(10px + var(--safe-top));z-index:9;min-height:44px;border:1px solid #54777c;border-radius:8px;background:#15323be6;color:#d9f3e9;font-size:9px;padding:8px;margin:0}
.touchLayout #arenaFocus{right:max(76px,calc(60px + var(--safe-right)));left:auto;transform:none;max-width:90px}.touchLayout #pause,.touchLayout .battleFocus{right:max(12px,var(--safe-right));min-width:58px}.touchLayout .battleFocus{display:block}.battleFocus[hidden]{display:none!important}
.touchLayout .bottomhud{position:static}.touchLayout .bottomhud #effects{display:none}.touchLayout #abortFlight{position:absolute;z-index:9;left:50%;transform:translateX(-50%);bottom:calc(140px + var(--safe-bottom));min-height:44px;padding:8px 14px;border:1px solid #6a8294aa;border-radius:8px;background:#152c36ed;font-size:9px}.touchLayout:not(.combatPaused) #abortFlight{display:none}
.touchLayout #overlay{inset:65px 170px 110px;padding:8px;z-index:9}.touchLayout #overlay .orb,.touchLayout #overlay>small{display:none}.touchLayout #overlay h2{font-size:24px}.touchLayout #overlay p{font-size:11px;line-height:1.5}.touchLayout #overlay .primary{min-height:44px;min-width:0}
.touchLayout .battleCanvasTop{top:calc(12px + var(--safe-top));left:max(16px,var(--safe-left));right:auto;max-width:220px;display:flex;flex-direction:column;gap:7px;font-size:10px;line-height:1.4;margin:0;padding:10px;background:#0b182ac4;border-radius:8px;pointer-events:none}
.touchLayout .touchBattleStatus{display:block;position:absolute;top:calc(14px + var(--safe-top));left:250px;right:140px;z-index:4;white-space:pre-line;text-align:center;color:#d3e7e8;font-size:10px;line-height:1.6;text-shadow:0 1px 4px #000;pointer-events:none}
.touchLayout.mobileCombat,.combatFocus .arena.touchLayout.mobileCombat{position:fixed;inset:0;width:auto;height:auto;min-width:0;min-height:0;max-width:100%;max-height:var(--game-viewport-height,100dvh);margin:0;border:0;border-radius:0;z-index:100;overflow:hidden;padding:0}body:has(.mobileCombat){overflow:hidden;overscroll-behavior:none}
.touchLayout .touchReticle{display:block;position:absolute;width:26px;height:26px;border:1px solid #dabdffa6;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;z-index:4;box-shadow:0 0 12px #bc8eff40}.touchReticle:before,.touchReticle:after{content:'';position:absolute;background:#e2c9ff;opacity:.8}.touchReticle:before{width:10px;height:1px;left:7px;top:12px}.touchReticle:after{height:10px;width:1px;top:7px;left:12px}.touchFiring .touchReticle{border-color:#eddaff;box-shadow:0 0 18px #cb9effa0}
.touchLayout .rotatePrompt:not([hidden]){display:flex;position:absolute;inset:0;z-index:30;background:radial-gradient(ellipse at 50% 30%,#293452,#081725 75%);padding:calc(24px + var(--safe-top)) max(24px,var(--safe-right)) calc(24px + var(--safe-bottom)) max(24px,var(--safe-left));flex-direction:column;align-items:center;justify-content:center;text-align:center}.rotatePhone{font:80px/1 sans-serif;color:#b7ffdf;margin-bottom:24px}.rotatePrompt>small{color:#b7ffdf;font-size:9px;letter-spacing:3px}.rotatePrompt h2{font:32px 'Space Grotesk';max-width:300px;letter-spacing:-1px;line-height:1.1;margin:20px 0 12px}.rotatePrompt p{color:#b5c7d6;font-size:13px;line-height:1.8;max-width:280px;margin:0 0 22px}.rotatePrompt button{min-height:48px;width:230px;border:1px solid #7baea0;border-radius:9px;background:#23483e;font-size:12px;margin:5px;color:#dbfff0}.rotatePrompt .rotateBack{background:transparent;border-color:#4c697a;color:#bdd1dc}.rotatePrompt .rotateNote{font-size:10px;color:#90abba;margin-top:16px;max-width:250px}
@media(max-width:760px){header{padding-left:max(12px,var(--safe-left));padding-right:max(12px,var(--safe-right));padding-top:max(12px,var(--safe-top))}.mainnav{overflow-x:auto;max-width:100%;scrollbar-width:none}.mainnav button{min-height:44px;flex-shrink:0}main{padding-left:16px;padding-right:16px}button,input,select{touch-action:manipulation}input,select,textarea{font-size:16px!important}.experienceDialog{width:calc(100% - 20px);max-width:calc(100% - 20px);padding:22px;max-height:calc(var(--game-viewport-height,100dvh) - 24px - var(--safe-top) - var(--safe-bottom))}.experienceDialog .close{width:44px;height:44px}.experienceDialog>label{min-height:44px}.experienceDialog .settingCheck{font-size:13px;line-height:1.5}.experienceDialog .settingCheck input{width:24px;height:24px;flex-shrink:0}.battleRoomActions button,.battlePings button{min-height:48px}.launchHeading button{min-height:48px}}
@media(orientation:portrait){.touchLayout:not(.mobileCombat) .touchDeck,.touchLayout:not(.mobileCombat) .touchReticle{display:none}.touchLayout:not(.mobileCombat) .missionhud,.touchLayout:not(.mobileCombat) .vitals,.touchLayout:not(.mobileCombat) .combatHUD{left:16px;right:16px}.touchLayout:not(.mobileCombat) #overlay{inset:90px 16px 60px}.touchLayout:not(.mobileCombat) .touchBattleStatus{left:16px;right:16px;top:90px}}
@media(orientation:landscape) and (max-width:700px){.touchStick{width:104px;height:104px}.touchMove{left:max(10px,var(--safe-left))}.touchAim{right:max(10px,var(--safe-right))}.touchActions{grid-template-columns:repeat(4,50px);gap:6px}.touchActions button{height:52px}.touchLayout .missionhud,.touchLayout .vitals,.touchLayout .combatHUD,.touchLayout #flightCoach{left:130px;right:130px}.touchLayout #flightCoach{padding:8px;top:calc(65px + var(--safe-top))}.touchLayout #flightCoach span{display:none}.touchLayout .hud strong{font-size:21px}.touchLayout .vitals{bottom:calc(88px + var(--safe-bottom));font-size:9px}.touchLayout .combatHUD{bottom:calc(69px + var(--safe-bottom));font-size:7px}.touchLayout .battleCanvasTop{max-width:175px;font-size:8px}.touchLayout .touchBattleStatus{left:200px;right:100px;font-size:8px}}

@media(orientation:landscape) and (max-width:700px){.touchLayout .missionhud{right:155px;font-size:8px}}

.mobileCombat #world,.mobileCombat #battleWorld{inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;border:0;border-radius:0}.mobileCombat .touchDeck{inset:0;background:transparent;border:0;padding:0}

/* Compact cockpit: quiet top row, one training hint, controls inside the host frame. */
.touchLayout{--cockpit-left:calc(14px + var(--safe-left));--cockpit-right:calc(14px + var(--safe-right));--stick-size:clamp(96px,28dvh,116px)}
.touchLayout .hud{top:calc(12px + var(--safe-top));left:var(--cockpit-left);width:78px}.touchLayout .hud small{font-size:7px;letter-spacing:1.2px}.touchLayout .hud strong{font-size:22px}
.touchLayout .missionhud{top:calc(14px + var(--safe-top));left:calc(108px + var(--safe-left));right:calc(122px + var(--safe-right));min-width:0}.touchLayout .missionhud>div:first-child{gap:8px;font-size:8px;letter-spacing:.8px}.touchLayout #objective{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.touchLayout .missionhud b{flex-shrink:0;font-size:11px}.touchLayout .missionrail{margin-top:7px;height:2px}
.touchLayout #flightCoach{top:calc(56px + var(--safe-top));left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:calc(100% - var(--cockpit-left) - var(--cockpit-right));min-height:30px;display:flex;align-items:center;gap:9px;padding:6px 11px;border:1px solid #71b9a075;border-radius:20px;background:#09252be0;box-shadow:0 3px 12px #0002}
.touchLayout #flightCoach small{flex-shrink:0;font-size:9px;letter-spacing:.4px;color:#b3ffe0;padding-right:9px;border-right:1px solid #609e8970}.touchLayout #flightCoach b{margin:0;font-size:11px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.touchLayout #flightCoach span{display:none}
.touchLayout #arenaFocus,.touchLayout #pause,.touchLayout .battleFocus{top:calc(8px + var(--safe-top));width:44px;min-width:44px;height:44px;min-height:44px;padding:0;font-size:0;border:1px solid #6c8f9855;border-radius:12px;background:#10232ab3;max-width:none}
.touchLayout #arenaFocus{right:calc(66px + var(--safe-right))}.touchLayout #pause,.touchLayout .battleFocus{right:var(--cockpit-right)}.touchLayout #arenaFocus:after,.touchLayout .battleFocus:after{content:'↙';font:21px/1 sans-serif}.touchLayout #pause:after{content:'Ⅱ';font:19px/1 sans-serif}.touchLayout.combatPaused #pause:after{content:'▶';font-size:16px}
.touchLayout .touchMove{left:var(--cockpit-left);bottom:calc(10px + var(--safe-bottom))}.touchLayout .touchAim{right:var(--cockpit-right);bottom:calc(10px + var(--safe-bottom))}.touchLayout .touchStick{width:var(--stick-size);height:var(--stick-size)}.touchLayout .stickThumb{width:44px;height:44px;left:calc(50% - 22px);top:calc(50% - 22px)}.touchLayout .stickLabel{font-size:8px;letter-spacing:1.5px}.touchLayout .touchMove,.touchLayout .touchAim{gap:5px}
.touchLayout .touchActions{bottom:calc(30px + var(--safe-bottom));grid-template-columns:repeat(4,54px);gap:6px}.touchLayout .touchActions button{height:54px;border-radius:11px}.touchLayout .touchActions button b{font-size:18px;line-height:18px}.touchLayout .touchActions button small{font-size:7px}
.touchLayout .vitals{left:50%;right:auto;transform:translateX(-50%);width:234px;bottom:calc(11px + var(--safe-bottom));font-size:8px;letter-spacing:.5px;gap:8px}.touchLayout .combatHUD{left:50%;right:auto;transform:translateX(-50%);width:234px;bottom:calc(91px + var(--safe-bottom));font-size:8px;flex-direction:column;align-items:center;gap:4px;letter-spacing:.4px}.touchLayout:not(.hasBoss) #bossStatus{display:none}.touchLayout .combatHUD #bossStatus{max-width:100%;font-size:9px;color:#e8c1ff}
.touchLayout .battleCanvasTop{top:calc(12px + var(--safe-top));left:var(--cockpit-left);padding:0;background:none;max-width:200px;font-size:9px;gap:5px}.touchLayout .touchBattleStatus{top:calc(12px + var(--safe-top));left:220px;right:calc(76px + var(--safe-right));font-size:9px;line-height:1.5}
@media(orientation:landscape) and (max-width:700px){.touchLayout{--cockpit-left:calc(10px + var(--safe-left));--cockpit-right:calc(10px + var(--safe-right))}.touchLayout .hud{width:68px}.touchLayout .hud strong{font-size:20px}.touchLayout .missionhud{left:calc(90px + var(--safe-left));right:calc(114px + var(--safe-right))}.touchLayout .missionhud>div:first-child{font-size:7px;letter-spacing:.4px}.touchLayout .missionhud b{font-size:10px}.touchLayout #flightCoach{top:calc(53px + var(--safe-top));min-height:28px;padding:5px 10px}.touchLayout #flightCoach b{font-size:10px}.touchLayout .touchActions{grid-template-columns:repeat(4,48px);gap:5px}.touchLayout .touchActions button{height:50px;font-size:8px}.touchLayout .touchActions button small{font-size:6px}.touchLayout .vitals,.touchLayout .combatHUD{width:207px;font-size:7px}.touchLayout .combatHUD{bottom:calc(86px + var(--safe-bottom))}.touchLayout .touchBattleStatus{left:190px;right:70px;font-size:8px}.touchLayout .battleCanvasTop{max-width:170px;font-size:8px}}
