:root{color-scheme:dark;--ink:#dce7e2;--muted:#9db5b9;--gold:#edbe8c;--teal:#a9ded5;--panel:#101f2a}*{box-sizing:border-box}body{margin:0;background:#08121d;color:var(--ink);font:15px/1.5 system-ui,-apple-system,sans-serif;overflow:hidden;overscroll-behavior:none}button,input,select{font:inherit}button{min-height:44px;min-width:44px;border:1px solid #486069;background:#132631;color:var(--ink);padding:10px 15px;border-radius:4px;cursor:pointer;touch-action:manipulation;transition:background .15s,border-color .15s}button:hover{background:#29434c;border-color:var(--teal)}button:active{transform:translateY(1px)}button[aria-pressed=true]{border-color:var(--teal);background:#31535a;box-shadow:inset 3px 0 var(--teal)}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--gold);outline-offset:3px}button small{font:10px monospace;color:var(--muted);margin-left:5px}button.primary{background:var(--ink);color:#11272e;border-color:var(--ink);font-weight:650}button.primary:hover{background:var(--teal)}[hidden]{display:none!important}canvas#game{position:fixed;inset:0;width:100%;height:100%;touch-action:none}header{position:fixed;z-index:5;top:max(12px,env(safe-area-inset-top));left:max(76px,calc(env(safe-area-inset-left) + 76px));right:max(16px,env(safe-area-inset-right));display:flex;justify-content:space-between;gap:8px;pointer-events:none}header button{pointer-events:auto}#wordmark{background:none;border:0;padding:0;font-size:17px;letter-spacing:3px;font-weight:750;text-align:left}#wordmark small{font:9px monospace;letter-spacing:1px}.top-actions{display:flex;gap:6px}.top-actions button{font:11px monospace;background:#0b1826d9}.home{position:fixed;inset:0;padding:100px 7vw 70px;display:flex;align-items:center;background:linear-gradient(90deg,#08121ef5 0%,#09131dd0 37%,#09131d00 75%);overflow:auto}.intro{max-width:570px}.eyebrow{color:var(--gold);font:10px/1.6 monospace;letter-spacing:2px}h1{font-size:clamp(62px,7.8vw,108px);line-height:.99;letter-spacing:-5px;font-weight:500;margin:26px 0}h1 em{font-family:Georgia,serif;font-weight:400;color:var(--gold)}.lede{font-size:18px;color:#c5d5d5;line-height:1.6}.subtle{font-size:12px;color:var(--muted)}.difficulty{display:flex;gap:6px;margin-top:24px}.difficulty button{font:10px monospace;padding:9px}.intro>.primary{width:260px;margin-top:12px;display:flex;justify-content:space-between}.intro>#continue,.intro>#loadSlots{width:260px;display:block;margin-top:8px}.home-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.home-links button{font:11px monospace;background:transparent;border:0;border-bottom:1px solid #5c747b;padding:8px}.home-caption{position:fixed;right:5vw;bottom:10vh;font:10px/2 monospace;letter-spacing:2px;color:#d6c4ab;text-align:right}.home-caption span{color:#7e9b9e;font-size:9px}.telemetry{position:fixed;left:max(20px,env(safe-area-inset-left));top:78px;width:225px;display:flex;gap:18px;flex-wrap:wrap;font:10px monospace;background:#091521bc;padding:10px;border-radius:6px}.telemetry>div{width:90px;display:flex;justify-content:space-between;flex-wrap:wrap}.telemetry span{color:var(--muted)}.telemetry b{font-weight:500}.telemetry meter{width:100%;height:7px;margin-top:6px;accent-color:var(--teal)}.telemetry small{font-size:9px;color:var(--teal)}.objective{position:fixed;left:22px;top:174px;max-width:60%;font:10px/1.6 monospace;letter-spacing:.5px}.objective b,.objective span{display:block}.objective b{color:var(--gold);font-size:12px}.objective span{color:var(--muted);margin-top:5px}#comms{position:fixed;left:22px;top:235px;width:min(320px,38vw);background:#091722dd;border-left:2px solid var(--gold);padding:10px 14px;font-size:12px;pointer-events:none}#comms span{font:9px monospace;color:var(--gold);text-transform:uppercase}#comms p{margin:5px 0;line-height:1.5}#zoom{position:fixed;right:18px;top:78px;display:flex;align-items:center;background:#091722dd;border-radius:4px}#zoom button{background:none;border:0;font-size:21px;padding:5px}#zoom output{font:10px monospace;width:38px;text-align:center}.battle-actions{position:fixed;bottom:max(62px,calc(env(safe-area-inset-bottom) + 62px));left:50%;transform:translateX(-50%);display:flex;gap:7px;white-space:nowrap}.battle-actions button{font:11px monospace;min-width:94px;background:#10212dee}#targetReadout{position:fixed;right:20px;top:205px;width:180px;font:10px/1.8 monospace;text-align:right;color:var(--gold);pointer-events:none}.touchControls{display:none}.touchControls #stick{position:fixed;left:20px;bottom:146px;width:105px;height:105px;border-radius:50%;background:#213c4866;border:1px solid #8bb4b788;touch-action:none}.touchControls #knob{position:absolute;width:36px;height:36px;left:34px;top:34px;border:1px solid #afdbd4;background:#82c2b644;border-radius:50%;pointer-events:none}#fire{position:fixed;right:20px;bottom:146px;width:78px;height:78px;border-radius:50%;background:#81533566;border-color:var(--gold);font:11px monospace;touch-action:none}#boost{position:fixed;right:25px;bottom:238px;font:10px monospace;touch-action:none}#brake{position:fixed;right:25px;bottom:288px;font:10px monospace;touch-action:none;z-index:3}#boost{z-index:3}#overlay{position:fixed;inset:0;z-index:10;background:#040b14b8;backdrop-filter:blur(8px);display:flex;justify-content:center;align-items:center;padding:76px 16px 60px;overflow:auto}.panel{width:min(660px,100%);max-height:100%;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;background:linear-gradient(145deg,#152732,#0d1b27);border:1px solid #48636b;border-radius:8px;padding:28px;box-shadow:0 24px 100px #0008}.panel-top{display:flex;justify-content:space-between;align-items:center;gap:8px}.panel-top button{background:none;border:0;padding:5px}h2{font-size:32px;font-weight:500;line-height:1.15;letter-spacing:-1px;margin:10px 0 22px}.panel p{color:#b7cbcd;line-height:1.7}.panel .rules{padding:12px;border-left:2px solid var(--gold);background:#152f3a;font-size:12px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.card{display:block;width:100%;text-align:left;margin:8px 0;padding:14px}.card b{display:block;color:var(--gold);font-size:13px;font-weight:500}.card span{display:block;font-size:12px;color:var(--muted);margin-top:7px;white-space:normal}.card small{display:block;margin:5px 0 0}.choice{border-color:var(--gold)}#dialogActions{display:flex;flex-wrap:wrap;gap:8px;margin-top:24px}#dialogActions button{flex:1}.portrait{float:right;width:88px;height:88px;border:1px solid #4b646c;border-radius:50%;object-fit:cover;margin:0 0 12px 18px}.portrait.code{display:grid;place-items:center;color:var(--gold);font:26px Georgia;background:radial-gradient(circle at 35% 30%,#406374,#15232f)}.crew-name{font:11px monospace;color:var(--gold)!important}.field{display:block;margin:14px 0}.field input[type=range]{display:block;width:100%;height:44px;accent-color:var(--teal)}.field select{width:100%;min-height:44px;padding:8px;background:#102632;color:var(--ink);border:1px solid #486069}.log{border-bottom:1px solid #334c58;padding:12px 0}.log small{color:var(--gold)}#notice{position:fixed;z-index:20;left:50%;bottom:115px;transform:translateX(-50%);max-width:90vw;background:#183844;padding:12px 18px;border:1px solid #80a9ad;font-size:12px;pointer-events:none}.refit-preview{width:100%;height:145px;background:#081724;border:1px solid #334c58;border-radius:4px}.version{font:10px monospace;color:var(--muted)}body.touch .touchControls{display:block}@media(pointer:coarse){.touchControls{display:block}}@media(max-width:600px){header{left:72px;right:10px;top:max(10px,env(safe-area-inset-top))}#wordmark{font-size:12px;letter-spacing:2px}#wordmark small{display:none}.top-actions button{padding:7px;font-size:10px}.home{padding:85px 24px 65px;background:linear-gradient(90deg,#08121ef5,#08121e90);align-items:flex-start}.intro{width:100%}h1{font-size:64px;margin:20px 0;letter-spacing:-3px}.lede{font-size:15px}.home-caption{display:none}.intro .subtle{font-size:11px}.difficulty{margin-top:16px;gap:4px}.difficulty button{flex:1;padding:8px 4px;font-size:9px}.home-links{gap:4px}.home-links button{font-size:10px;padding:7px}.telemetry{top:69px;left:14px;width:192px;padding:8px;gap:9px}.telemetry>div{width:80px}#zoom{top:70px;right:10px}#zoom output{display:none}.objective{left:15px;top:156px;max-width:80%}.objective b{font-size:11px}.objective span{font-size:9px}#comms{left:15px;top:205px;width:calc(100% - 110px);font-size:11px;padding:8px 10px}#comms span{font-size:8px}#targetReadout{display:none}.battle-actions{left:10px;right:10px;transform:none;gap:4px}.battle-actions button{min-width:0;flex:1;padding:10px 4px;font-size:9px}.battle-actions small{display:none}.panel{padding:18px}.grid{grid-template-columns:1fr}h2{font-size:27px}.panel p{font-size:13px}.eyebrow{font-size:9px;letter-spacing:1px}.portrait{width:64px;height:64px}.refit-preview{height:110px}}
@media(max-height:600px){.home{padding-top:76px;align-items:flex-start}h1{font-size:48px;margin:12px 0}.lede{font-size:13px;margin:10px 0}.difficulty{margin-top:10px}.home-caption{display:none}.panel{padding:16px}.telemetry{top:65px}.objective{top:145px}#comms{top:195px}.touchControls #stick{width:82px;height:82px;bottom:122px}.touchControls #knob{left:23px;top:23px}#fire{width:65px;height:65px;bottom:122px}#boost{bottom:194px}#brake{bottom:244px}}
@media(max-height:450px) and (orientation:landscape){.home .intro{max-width:600px}.home .lede{display:none}.home-links{position:absolute;left:420px;top:110px;width:220px}.intro>.primary,.intro>#continue,.intro>#loadSlots{width:250px}.home .subtle{margin:4px 0}.telemetry{width:210px;top:65px}.objective{top:143px}.objective span{max-width:230px}#comms{display:none!important}.touchControls #stick{left:20px;bottom:70px}#fire{bottom:70px}#boost{bottom:145px}#brake{bottom:195px}.battle-actions{bottom:62px;left:145px;right:120px;transform:none}.battle-actions button{min-width:0;padding:8px;flex:1}.battle-actions small{display:none}#targetReadout{display:none}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}button:active{transform:none}}

.dialogue{border-left:2px solid #568681;padding-left:12px}.dialogue b{display:block;color:#b9dfd9;font:10px/1.8 monospace;letter-spacing:.05em}.home{background:linear-gradient(90deg,#08121ef5 0%,#09131dc0 36%,#09131d00 68%)}@media(max-width:600px){.home{background:linear-gradient(90deg,#08121ee8,#08121e50)}}
/* 3.0 readable life support and dedicated combat lanes. */
.top-actions button,button small,.eyebrow,.crew-name{font-size:12px}#game:focus:not(:focus-visible),button:focus:not(:focus-visible){outline:none}
.telemetry{width:210px;gap:10px;padding:12px;font-size:12px}.telemetry>div{width:184px}.telemetry meter{width:100%;min-width:160px;height:10px}.telemetry .reactor-row{font-size:14px;color:#edf7ec}.telemetry small{font-size:12px;width:100%}.telemetry meter.critical{accent-color:#ff825f}.telemetry .power-routes{display:flex;flex-wrap:nowrap;gap:4px;width:100%}.power-routes button{font:12px monospace;min-width:0;flex:1;padding:5px 2px;min-height:44px}
.objective{left:250px;right:240px;top:80px;max-width:none;font:12px/1.5 monospace}.objective b{font-size:14px}.objective #missionTimer{font-size:12px;color:var(--gold);margin-top:2px}
#targetReadout{top:224px;right:20px;width:210px;text-align:left;font:12px/1.5 monospace;background:#091722e8;padding:12px;border:1px solid #597879;border-radius:6px}#targetReadout span,#targetReadout b{display:block;margin-bottom:5px}#targetReadout b{font-size:14px}#targetRole{color:var(--ink)}#targetSystems{color:var(--muted)}#targetMeter{width:184px;height:10px}
#comms{display:flex;gap:10px;align-items:flex-start;top:auto;bottom:128px;left:20px;width:350px;max-width:calc(100vw - 40px);font-size:13px;border:1px solid #658781;border-radius:8px;padding:10px;box-shadow:0 0 calc(var(--voice,0)*24px) #a9ded588;z-index:2}#comms[data-kind=bark]{top:342px;bottom:auto;width:300px;font-size:12px}#comms span{font-size:12px}#comms p{margin:3px 0}#commPortrait{flex:none}#commPortrait .portrait{float:none;width:54px;height:62px;margin:0;border-radius:7px}#comms[data-kind=bark] .portrait{width:42px;height:48px}#comms[data-kind=story]{max-height:180px;overflow:hidden}
#controlHint{position:fixed;left:50%;bottom:114px;transform:translateX(-50%);background:#091722e8;border-radius:4px;padding:5px 10px;font:12px/1.5 monospace;white-space:nowrap}#onboarding{position:fixed;left:50%;top:160px;transform:translateX(-50%);width:min(450px,90vw);padding:12px 16px;background:#1e3b45f2;border:1px solid var(--gold);border-radius:6px;text-align:center;font-size:14px;z-index:3}@media(min-width:601px) and (max-width:930px){#onboarding{left:240px;transform:none;width:min(400px,calc(100vw - 300px))}}#skipTutorial{margin-left:10px}#more{display:none}.battle-actions button{font-size:12px}
.panel{display:flex;flex-direction:column;overflow:hidden}.panel-top,h2,#dialogActions{flex:none}#dialogBody{overflow:auto;min-height:0;overscroll-behavior:contain;padding:0 3px 4px}#dialogBody:after{content:'';display:block;clear:both}#dialogBody .rules{clear:both}#dialogActions{position:sticky;bottom:0;background:#10212c;padding-top:12px;margin-top:8px}#scrollCue{display:none;color:var(--gold);font:12px monospace;text-align:center;padding:6px;border-top:1px solid #405d66}.controls-strip{font:12px/1.8 monospace;background:#0c1b26;border:1px solid #35525b;border-radius:4px;padding:10px}.refit-preview{height:270px;flex:none}.part-art{float:right;width:64px;height:54px;border:1px solid #658781;background:radial-gradient(ellipse,#416a73,#122a37);color:#b9f1e7!important;font:36px/1.3 monospace!important;text-align:center;margin:0 0 8px 8px!important;border-radius:4px}.medal{float:left;width:86px;min-height:96px;display:grid;place-items:center;margin:0 16px 12px 0;color:#dfa57d;text-align:center}.medal span{display:grid;place-items:center;width:64px;height:64px;font-size:38px;background:#6b482d;border:5px double currentColor;border-radius:50%}.medal b{font:12px monospace;margin-top:5px}.medal.silver{color:#daedee}.medal.silver span{background:#50666f;clip-path:polygon(50% 0,94% 25%,94% 75%,50% 100%,6% 75%,6% 25%);border-radius:0}.medal.gold{color:#f5d38a}.medal.gold span{background:#8a6337;clip-path:polygon(50% 0,62% 12%,80% 6%,86% 24%,100% 35%,90% 51%,98% 70%,80% 78%,72% 97%,51% 91%,32% 100%,23% 82%,4% 75%,11% 54%,0 37%,18% 26%,22% 8%,41% 13%)}
@media(max-width:600px){.telemetry{left:12px;top:68px;width:205px;padding:8px;gap:6px}.telemetry>div{width:91px}.telemetry .reactor-row{width:100%;font-size:13px}.telemetry meter{min-width:0;margin-top:3px;height:8px}.telemetry small{font-size:10px}.telemetry .power-routes{gap:3px}.power-routes button{font-size:11px;min-height:44px}.objective{left:12px;right:12px;top:246px;max-width:none;font-size:12px}.objective b{font-size:12px}.objective span{font-size:12px;margin-top:2px}.objective #missionTimer{position:absolute;right:0;top:0;font-size:11px}.objective b{padding-right:64px}#targetReadout{display:none}#comms,#comms[data-kind=bark]{left:12px;width:calc(100% - 24px);font-size:12px}#comms[data-kind=bark]{top:336px;bottom:auto}#comms[data-kind=story]{top:auto;bottom:270px;max-height:140px}#commPortrait .portrait{width:42px;height:50px}#comms span{font-size:11px}#zoom{top:70px;right:10px;flex-direction:column}#controlHint{display:none}#onboarding{top:inherit;bottom:355px;padding:8px 10px;font-size:12px}.battle-actions{left:122px;right:12px;bottom:68px;gap:4px}.battle-actions button{font-size:11px;min-width:44px;padding:8px 4px}#auto,#orders,#power{display:none}#more{display:block;font-size:24px}.touchControls #stick{left:16px;bottom:126px;width:90px;height:90px}.touchControls #knob{left:26px;top:26px}#fire{right:18px;bottom:132px;width:70px;height:70px}#boost{left:20px;right:auto;bottom:68px;width:82px;font-size:11px}#brake{left:20px;right:auto;bottom:calc(14px + env(safe-area-inset-bottom,0px));width:82px;font-size:11px}#scrollCue{display:block}.panel{padding:14px}#overlay{padding:66px 10px 56px}h2{font-size:25px;margin-bottom:12px}.refit-preview{height:200px}#dialogActions button{font-size:12px;flex:1 1 30%}}
@media(max-height:450px) and (orientation:landscape){.telemetry{left:12px;top:64px;width:210px;gap:5px;padding:8px}.telemetry>div{width:94px}.telemetry .reactor-row{width:100%;font-size:13px}.telemetry meter{min-width:0;height:8px;margin-top:3px}.telemetry small{font-size:10px}.power-routes button{font-size:11px}.objective{left:240px;right:175px;top:66px;font-size:12px;max-width:none}.objective b{font-size:12px}.objective span{max-width:none;font-size:12px;margin-top:1px}.objective #missionTimer{display:none}#comms,#comms[data-kind=bark],#comms[data-kind=story]{display:flex!important;left:240px;right:140px;top:142px;bottom:auto;width:auto;max-height:87px;font-size:12px;padding:6px}#comms[hidden]{display:none!important}#comms .portrait{width:36px;height:42px}#comms span{font-size:11px}#comms p{line-height:1.3}#targetReadout,#controlHint{display:none}#onboarding{left:240px;right:178px;transform:none;top:auto;bottom:128px;width:auto;font-size:12px;padding:6px}.touchControls #stick{bottom:70px;left:20px;width:82px;height:82px}.touchControls #knob{left:23px;top:23px}#fire{bottom:70px;right:20px;width:65px;height:65px}#boost{bottom:70px;right:95px;left:auto;font-size:11px}#brake{bottom:118px;right:95px;left:auto;font-size:11px}.battle-actions{left:240px;right:175px;bottom:62px;gap:4px}.battle-actions button{min-width:44px;font-size:11px;padding:6px}#auto,#orders,#power{display:none}#more{display:block;font-size:24px}#overlay{padding:60px 12px 54px}.panel{padding:10px 18px;max-height:100%;width:min(700px,100%)}h2{font-size:22px;margin:3px 0 8px}.panel-top{height:38px}.panel-top .eyebrow{font-size:11px}#dialogActions{margin-top:0;padding-top:6px}#dialogActions button{min-height:44px;padding:7px}#scrollCue{display:block;padding:3px;font-size:11px}.refit-preview{height:220px}}
/* Tutorial occupies its own lane; spoken captions retain their complete text. */
#flight.tutorial-active #comms[data-kind=story]{bottom:180px}
@media(max-width:600px){#fire{left:116px;right:auto}#onboarding{top:325px;bottom:auto}#flight.tutorial-active #comms[data-kind=bark]{top:402px}#flight.tutorial-active #comms[data-kind=story]{bottom:250px;max-height:150px}#comms[data-kind=story]{max-height:150px}}
@media(max-height:450px) and (orientation:landscape){#flight.tutorial-active #comms[data-kind=story],#flight.tutorial-active #comms[data-kind=bark]{top:128px;bottom:auto;max-height:84px}#onboarding{top:auto;bottom:124px;max-height:54px;overflow:auto}#fire{left:auto;right:20px}}
/* Keep spoken story captions above the touch steering lane on tablet/desktop. */
@media(min-width:601px) and (min-height:451px){body.touch #comms[data-kind=story],body.touch #flight.tutorial-active #comms[data-kind=story]{bottom:260px}}
/* Short portrait keeps every control and gives long radio captions a scroll lane. */
@media(max-width:600px) and (max-height:600px) and (orientation:portrait){
 .telemetry{top:68px;gap:5px;padding:8px}.telemetry .power-routes{display:none}
 .objective{top:178px;left:12px;right:100px;max-height:60px;overflow:auto;font:11px/1.35 monospace;touch-action:pan-y}
 .objective b{padding-right:0;font-size:11px}.objective span{font-size:11px}.objective #missionTimer{display:none}
 #onboarding{top:245px;bottom:auto;max-height:44px;overflow:auto;padding:5px 8px;font-size:12px;touch-action:pan-y}
 #comms,#comms[data-kind=story],#comms[data-kind=bark],#flight.tutorial-active #comms[data-kind=story],#flight.tutorial-active #comms[data-kind=bark]{top:298px;bottom:auto;left:12px;right:12px;width:auto;max-height:50px;overflow:auto;pointer-events:auto;touch-action:pan-y;padding:4px 6px;gap:6px;font-size:11px;scrollbar-width:thin;scrollbar-color:var(--gold) #10212c}
 #comms #commPortrait .portrait{width:28px;height:32px}#comms span{font-size:10px}#comms p{font-size:11px;line-height:1.35;margin:2px 0}
}

/* Supply Run scenes use existing painted art, with a slow move and a readable portrait frame. */
#storyScene{position:fixed;inset:0;z-index:15;overflow:hidden;background:#08121d;isolation:isolate}.scene-art{position:absolute;inset:-7%;background:center/cover url('assets/art/cinder.webp');transform:translate(calc(-2% + var(--scene-progress,0)*4%),calc(1% - var(--scene-progress,0)*2%)) scale(1.05)}#storyScene[data-panel="1"] .scene-art{background-position:30% 65%;transform:translate(calc(2% - var(--scene-progress,0)*4%),1%) scale(1.13)}#storyScene[data-panel="2"] .scene-art{background-position:70% 30%;transform:translate(0,calc(2% - var(--scene-progress,0)*3%)) scale(1.2)}.scene-vignette{position:absolute;inset:0;background:linear-gradient(#06101bb3,transparent 35%,#06101be6 78%)}.scene-heading{position:absolute;top:max(76px,env(safe-area-inset-top));left:7vw;right:7vw}.scene-heading h2{font:clamp(24px,4vw,52px)/1.15 Georgia,serif;color:var(--gold);max-width:850px}.scene-caption{position:absolute;bottom:130px;left:7vw;right:7vw;display:flex;align-items:center;gap:24px;max-width:1000px;padding:20px;background:#081724e6;border:1px solid #a48263;border-radius:8px;box-shadow:0 16px 60px #0008}.scene-caption .portrait{float:none;width:94px;height:110px;object-fit:cover;margin:0;border-radius:7px}.scene-caption p{font-size:clamp(15px,2vw,23px);margin:8px 0;line-height:1.55}#sceneSpeaker{font:13px monospace;color:var(--gold);text-transform:uppercase}#sceneTagline{position:absolute;top:44%;left:7vw;font:clamp(20px,4vw,46px) Georgia,serif;letter-spacing:4px;color:var(--gold)}.scene-footer{position:absolute;bottom:max(65px,calc(env(safe-area-inset-bottom) + 65px));left:7vw;right:7vw;display:flex;align-items:center;justify-content:space-between;font:13px monospace}#sceneShip{position:absolute;top:21%;left:8%;width:84%;height:40%;background:#071421cc;border:1px solid #657078;border-radius:8px}#view{position:fixed;right:150px;top:78px;min-width:76px;min-height:44px;font:12px monospace;background:#10212dee}#viewName{position:fixed;left:50%;top:120px;transform:translateX(-50%);background:#10212dee;padding:10px 18px;pointer-events:none;font:14px monospace;z-index:4}.touchControls #aimStick{position:fixed;right:120px;bottom:146px;width:90px;height:90px;border-radius:50%;background:#213c4866;border:1px solid #8bb4b788;touch-action:none}.touchControls #aimKnob{position:absolute;width:36px;height:36px;left:26px;top:26px;border:1px solid #afdbd4;background:#82c2b644;border-radius:50%;pointer-events:none}#aimStick small{position:absolute;bottom:2px;left:0;width:100%;text-align:center;font:9px monospace;pointer-events:none}.refit-preview.loading{background:repeating-conic-gradient(from 0deg,#142f3b 0deg 40deg,#31505a 40deg 80deg);opacity:.5}.refit-preview.loading:after{content:'Loading hull…'}#regen.repairing{color:#6eff8a;text-shadow:0 0 9px #45f570}.ship-card{font:13px monospace;color:var(--gold)!important}#controlHint{white-space:normal;max-width:70vw;text-align:center}
@media(max-width:600px){#view{top:70px;right:62px;min-width:74px;font-size:11px;padding:6px}.touchControls #aimStick{right:12px;bottom:126px;width:84px;height:84px}.touchControls #aimKnob{left:23px;top:23px}.scene-heading{top:70px;left:6vw}.scene-heading h2{font-size:27px}.scene-caption{left:5vw;right:5vw;bottom:128px;padding:12px;gap:12px;max-height:45vh;overflow:auto}.scene-caption .portrait{width:56px;height:72px}.scene-caption p{font-size:15px}.scene-footer{left:5vw;right:5vw}#sceneTagline{font-size:24px;top:36%;right:5vw}#sceneShip{top:22%;height:28%}}
@media(max-height:450px) and (orientation:landscape){#view{right:190px;top:12px;min-width:80px;font-size:11px}.touchControls #aimStick{right:104px;bottom:70px;width:64px;height:64px}.touchControls #aimKnob{left:14px;top:14px}.scene-heading{top:16px;left:6vw}.scene-heading h2{font-size:24px;margin:6px 0}.scene-caption{bottom:112px;left:6vw;right:6vw;padding:8px 12px;gap:12px;max-height:38vh;overflow:auto}.scene-caption .portrait{width:46px;height:54px}.scene-caption p{font-size:13px;margin:3px 0}.scene-footer{bottom:60px}#sceneTagline{top:24%;font-size:21px}#sceneShip{top:18%;height:24%}}
@media(prefers-reduced-motion:reduce){.scene-art,#storyScene[data-panel] .scene-art{transform:none!important}}

@media(max-height:450px) and (orientation:landscape){#boost{right:20px;left:auto;bottom:145px}#brake{right:92px;left:auto;bottom:146px;width:52px;padding:0;font-size:10px}}
.hull-loading{font:12px monospace;color:var(--muted);display:flex;align-items:center;justify-content:center;gap:12px}.loading-ring{display:inline-block;width:24px;height:24px;border:3px solid #35505c;border-top-color:var(--gold);border-radius:50%;animation:hull-load 1s linear infinite}@keyframes hull-load{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.loading-ring{animation:none}}

.intro>#resumePrologue{display:block;width:260px;margin-top:8px}

/* Only the active, fine-pointer battlefield replaces the OS cursor. */
#game.reticle-active{cursor:none}
#reticlePreview{display:block;width:100%;height:160px;border:1px solid #a6b9ba;border-radius:8px;margin:12px 0 20px}
.reticle-options{border:0;padding:0;margin:14px 0}.reticle-options legend{font:13px monospace;color:var(--gold);margin-bottom:8px}
.reticle-styles,.reticle-colors,.reticle-toggles{display:flex;gap:8px;flex-wrap:wrap}
.reticle-styles button{width:56px;height:56px;min-width:56px;min-height:56px;padding:3px;position:relative}.reticle-styles canvas{display:block;width:48px;height:48px;pointer-events:none}
.reticle-colors button{width:44px;height:44px;min-width:44px;min-height:44px;padding:6px;position:relative}.reticle-colors span{display:block;width:100%;height:100%;border-radius:50%;background:var(--swatch);border:2px solid #061018;pointer-events:none}
.reticle-styles button[aria-pressed=true],.reticle-colors button[aria-pressed=true]{outline:2px solid var(--gold);outline-offset:2px;background:#294650}
.reticle-colors button[aria-pressed=true]:after{content:'✓';position:absolute;inset:8px;color:#061018;text-shadow:0 0 2px #fff,0 0 3px #fff;font-size:22px;font-weight:bold;line-height:26px}
.reticle-range{display:flex;flex-direction:column;align-items:stretch;gap:0;margin:14px 0 0}.reticle-range span{display:flex;justify-content:space-between}.reticle-range input[type=range]{width:100%;min-height:44px;margin:0;accent-color:var(--gold)}
.reticle-size-labels{display:flex;justify-content:space-between;flex-wrap:wrap;gap:5px;font:11px monospace;color:var(--muted)}.reticle-toggles{margin-top:18px}.reticle-toggles button{min-height:44px;flex:1 1 140px}
#overlay[data-kind=reticle] button:focus-visible,#overlay[data-kind=reticle] input:focus-visible{outline:3px solid #fff;outline-offset:3px}

/* 3.2: the reserve stays directly under the hull it repairs. */
.operation-heading{display:flex;align-items:baseline;gap:10px}.objective .operation-heading #shipLevel{flex:none;color:#a6b7ff;white-space:nowrap;padding:0}#xpMeter{display:block;width:100%;height:5px;margin:4px 0;accent-color:#a6b7ff;direction:ltr}#lootTally{display:block;color:#c5e7df;margin-top:4px;font-size:11px}#massMeter{accent-color:#76dfb8}#massMeter[data-state=low]{accent-color:#f1b566}#massMeter[data-state=empty]{accent-color:#35434b;outline:1px solid #bdd0cf;border-radius:3px}#massMeter::-webkit-meter-optimum-value{background:#76dfb8}#massMeter[data-state=low]::-webkit-meter-optimum-value{background:#f1b566}#massMeter::-moz-meter-bar{background:#76dfb8}#massMeter[data-state=low]::-moz-meter-bar{background:#f1b566}#regen.mass-empty{color:#f1b566}.level-card{clear:both;border:1px solid #a6b7ff;background:#252c44;padding:16px;margin:16px 0;border-radius:6px}.level-card small,.level-info b{color:#b9c7ff}.level-card h3{margin:4px 0}.level-card p{margin:4px 0}#controlHint{max-width:calc(100vw - 40px);white-space:normal;text-align:center}
@media(max-width:600px),(max-height:450px) and (orientation:landscape){.telemetry{display:grid;grid-template-columns:1fr 1fr;grid-template-areas:'hull reactor' 'mass shield' 'regen regen' 'power power';column-gap:8px}.telemetry>div,.telemetry .reactor-row{width:auto;font-size:11px}.telemetry .hull-row{grid-area:hull}.telemetry .mass-row{grid-area:mass}.telemetry .reactor-row{grid-area:reactor}.telemetry .shield-row{grid-area:shield}.telemetry #regen{grid-area:regen}.telemetry .power-routes{grid-area:power}.telemetry b{font-size:10px}.telemetry meter{min-width:0}.objective .operation-heading{padding-right:64px}.objective .operation-heading #opName{padding-right:0}.objective .operation-heading #shipLevel{font-size:11px}}
@media(max-height:450px) and (orientation:landscape){.objective .operation-heading{padding-right:0}#comms[data-kind=bark],#comms[data-kind=story]{top:160px}}

@media(max-width:600px),(max-height:450px) and (orientation:landscape){.telemetry .mass-row b{font-size:9px}.telemetry .mass-row span{font-size:10px}}

.wallet-row{font:12px/1.8 monospace;color:#d9e9e4!important;padding:10px;border:1px solid #4b686d;border-radius:4px}.resource-cost{color:#f1cf95!important}.purchase-reason{font-size:11px!important}#jump{border-color:#a9ded5;background:#26534c;font-weight:700}#flight.sector-clear #opName{color:#a9ded5}@media(max-width:600px),(max-height:450px) and (orientation:landscape){#flight.sector-clear #missile,#flight.sector-clear #pulse/* roles 1 */,#flight.sector-clear #guard,#flight.sector-clear #mark,#flight.sector-clear #pod/* end roles 1 */{display:none}}

/* Origin cards retain a readable portrait, hull and promise at every viewport. */
.origin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.origin-card{text-align:left;min-width:0;padding:16px}.origin-card .portrait{float:none;display:block;width:72px;height:86px;margin:0 0 12px}.origin-card span{display:block}.origin-hull{display:block;width:100%;height:auto;max-height:110px;object-fit:contain;margin:8px 0;border-radius:8px}.origin-card[data-origin=salvage]{border-color:#9ab9d5}.origin-card[data-origin=lantern]{border-color:#e8b76a}
#zoom button{touch-action:none}
@media(max-width:600px){.origin-grid{grid-template-columns:1fr}.origin-card .portrait{float:left;width:52px;height:64px;margin:0 12px 8px 0}}
@media(max-width:353px){#view{top:230px;right:10px;min-width:78px}#onboarding{left:16px;right:92px;width:auto;transform:none}}
@media(min-width:601px) and (max-width:930px) and (min-height:451px){.touchControls #aimStick{bottom:162px}}

/* 3.4 Builder: numbered tray controls remain separate 44px touch targets. */
#overlay[data-kind=builder] .panel{width:min(760px,100%)}
.builder-canvas{display:block;width:100%;height:260px;border:1px solid #48636b;border-radius:6px;background:#081724;touch-action:none}
.builder-help{font-size:12px;margin:0 0 6px}.builder-tray{display:flex;flex-wrap:wrap;gap:8px;padding:12px 3px;max-height:180px;overflow:auto;overscroll-behavior:contain;touch-action:pan-y}
.builder-slot{flex:1 0 125px;min-height:44px;min-width:44px;font:12px monospace;text-align:left;padding:10px}.builder-slot[data-module=empty]{border-style:dashed;color:var(--muted)}
.builder-slot.picked{transform:translateY(-2px);border-color:#bbfff1;background:#315d63;box-shadow:0 0 12px #8cf8e566;animation:builder-pulse 1s ease-in-out infinite alternate}.builder-status{font-size:12px;min-height:2em;margin:4px 0}.module-list{font:12px monospace;color:var(--teal)!important}
#shieldStatus{position:fixed;left:22px;top:208px;z-index:4;padding:5px 9px;background:#10212dee;border-left:2px solid #f4b17b;color:#ffd3a8;font:11px monospace;pointer-events:none}
@keyframes builder-pulse{to{box-shadow:0 0 18px #8cf8e5aa}}
@media(max-width:600px){.builder-canvas{height:200px}.builder-tray{flex-wrap:nowrap;max-height:none;overflow-x:auto;touch-action:pan-x;overflow-y:hidden;padding-bottom:14px}.builder-slot{flex:0 0 144px;min-height:48px}.builder-help{font-size:12px}#shieldStatus{left:12px;top:306px;font-size:10px;margin:0}}
@media(max-height:450px) and (orientation:landscape){#shieldStatus{left:12px;top:235px;font-size:10px;margin:0}}
@media(prefers-reduced-motion:reduce){.builder-slot.picked{animation:none}}

#overlay[data-kind=builder][data-motion=reduced] .builder-slot.picked{animation:none}

/* 3.5 HELM — original relief-command consoles. Shared tips/settings are not themed. */
:root{--helm-navy:#07111c;--helm-steel:#9db5b9;--helm-green:#55f28a;--helm-ember:#ff5a4a;--helm-head:"Avenir Next Condensed","Bahnschrift","Arial Narrow","Roboto Condensed",system-ui}
.home,:is(#overlay,.helm-exit),#storyScene{--helm-accent:var(--gold);--helm-dim:#35444c;--helm-rail:14px}
:is(#overlay,.helm-exit):is([data-kind=hangar-menu],[data-kind=refit],[data-kind=installed],[data-kind=builder]){--helm-accent:var(--teal)}
:is(#overlay,.helm-exit):is([data-kind=debrief],[data-kind=power]){--helm-accent:var(--helm-green)}
:is(#overlay,.helm-exit):is([data-kind=lost],[data-kind=replace]){--helm-accent:var(--helm-ember)}
:is(#overlay,.helm-exit):is([data-kind=manual],[data-kind=reticle],[data-kind=pause],[data-kind=admin-panel],[data-kind=admin-confirm],[data-kind=combat-more],[data-kind=orders],[data-kind=log]){--helm-accent:var(--helm-steel)}
.home h1,:is(#overlay,.helm-exit) h2,:is(#overlay,.helm-exit) h3,.scene-heading h2{font-family:var(--helm-head);font-stretch:condensed;font-weight:800;text-transform:uppercase;letter-spacing:.055em}
:is(#overlay,.helm-exit) h2{font-size:clamp(25px,3.5vw,38px);line-height:1.08;margin:16px 0 22px;max-width:100%;overflow-wrap:anywhere}
:is(#overlay,.helm-exit) h3{font-size:17px;line-height:1.3;margin:24px 0 12px;color:var(--helm-accent)}
:is(#overlay,.helm-exit) .eyebrow,.home .eyebrow{font-size:12px;letter-spacing:.12em;color:var(--helm-accent)}
:is(#overlay,.helm-exit){background:#030a13c7;padding:76px 24px 66px;backdrop-filter:blur(12px)}
:is(#overlay,.helm-exit) .panel,.home .intro{position:relative;isolation:isolate;background:var(--helm-navy);border:1px solid #546a73;border-radius:18px;box-shadow:inset 0 0 0 5px #07111c,inset 0 0 0 6px #263d48,0 24px 80px #0008;padding:24px 28px 24px 52px}
:is(#overlay,.helm-exit) .panel{width:min(740px,100%);min-height:0;max-height:100%}
:is(#overlay,.helm-exit) .panel:before,.home .intro:before{content:"";position:absolute;left:13px;top:18px;bottom:18px;width:var(--helm-rail);border-radius:8px;background:linear-gradient(to bottom,var(--helm-accent) 0 24%,transparent 24% 25.5%,#4f777c 25.5% 49%,transparent 49% 50.5%,var(--helm-accent) 50.5% 82%,transparent 82% 83.5%,#334a58 83.5% 100%);pointer-events:none}
:is(#overlay,.helm-exit) .panel-top{min-height:44px;gap:16px;align-items:center;border-bottom:1px solid #2d4652;padding-bottom:10px}
:is(#overlay,.helm-exit) .panel-top .eyebrow{flex:1;line-height:1.6;text-align:right;overflow-wrap:anywhere}
:is(#overlay,.helm-exit) :is(#close,.helm-copy-close){order:-1;flex:none;width:44px;height:44px;padding:0;border:1px solid #536b76;background:#152733;color:var(--helm-accent);border-radius:16px 4px 4px 16px}
:is(#overlay,.helm-exit) :is(#dialogBody,.helm-copy-dialogBody){padding:0 5px 5px 0;scrollbar-width:thin;scrollbar-color:var(--helm-accent) #152733;scroll-padding:8px}
:is(#overlay,.helm-exit) :is(#dialogActions,.helm-copy-dialogActions){background:var(--helm-navy);border-top:1px solid #2d4652;padding:14px 0 0;margin-top:12px;gap:8px}
:is(#overlay,.helm-exit) :is(#dialogActions,.helm-copy-dialogActions) button:not(.aeSetLink){flex:1 1 150px}
:is(#overlay,.helm-exit) :is(#scrollCue,.helm-copy-scrollCue){font-size:12px;color:var(--helm-accent);border-color:#2d4652;padding:6px 0}
:is(#overlay,.helm-exit) p{color:#c2d2d5;line-height:1.65}
:is(#overlay,.helm-exit) .subtle,.home .subtle{color:#a7bec4;font-size:12px}
:is(#overlay,.helm-exit) button:not(.aeSetLink),.home button:not(.aeSetLink),header>.top-actions button:not(.aeSetLink){border-radius:18px 4px 4px 18px;border:1px solid #526b77;background:linear-gradient(90deg,#203744,#12232f);color:#e0ece8;min-height:44px;font-size:13px;transition:background-color 140ms,border-color 140ms,box-shadow 140ms,transform 140ms}
:is(#overlay,.helm-exit) button:not(.aeSetLink),.home button:not(.aeSetLink){border-left:4px solid var(--helm-accent)}
:is(#overlay,.helm-exit) button:not(.aeSetLink):not(:disabled):hover,.home button:not(.aeSetLink):not(:disabled):hover,header>.top-actions button:not(.aeSetLink):not(:disabled):hover{transform:translateY(-1px);border-color:var(--helm-accent,var(--teal));box-shadow:0 0 14px #a9ded526;background:#29434f}
:is(#overlay,.helm-exit) button:not(.aeSetLink):not(:disabled):active,.home button:not(.aeSetLink):not(:disabled):active{transform:translateY(0);background:var(--helm-accent);color:#07111c}
:is(#overlay,.helm-exit) button:not(.aeSetLink)[aria-pressed=true],.home button:not(.aeSetLink)[aria-pressed=true]{background:var(--helm-accent);border-color:var(--helm-accent);color:#07111c;box-shadow:none;font-weight:750}
:is(#overlay,.helm-exit) button:not(.aeSetLink)[aria-pressed=true] :is(b,span,small){color:#10232c}
:is(#overlay,.helm-exit) button:not(.aeSetLink).primary,.home button:not(.aeSetLink).primary{background:var(--helm-accent);border-color:var(--helm-accent);color:#07111c;font-weight:800}
:is(#overlay,.helm-exit) button:not(.aeSetLink).primary:not(:disabled):hover,.home button:not(.aeSetLink).primary:not(:disabled):hover{background:#edf5ef;color:#07111c}
:is(#overlay,.helm-exit) button:not(.aeSetLink):disabled{opacity:1;color:#91a5ad;background:#0d1b26;border-color:#344b57;border-left-color:#52656b;box-shadow:none}
:is(#overlay,.helm-exit) button:not(.aeSetLink):disabled b{color:#aec2c6}:is(#overlay,.helm-exit) button:not(.aeSetLink):disabled span{color:#91a5ad}
:is(#overlay,.helm-exit) :is(button:not(.aeSetLink),input,select):focus-visible,.home button:not(.aeSetLink):focus-visible,header button:not(.aeSetLink):focus-visible{outline:3px solid #eefbf4;outline-offset:3px;box-shadow:0 0 0 5px #07111c}
:is(#overlay,.helm-exit) .card{border-radius:18px 5px 5px 18px;padding:16px 18px;margin:9px 0;min-width:0;overflow-wrap:anywhere}
:is(#overlay,.helm-exit) .card b{color:var(--helm-accent);font-family:var(--helm-head);font-stretch:condensed;font-size:17px;font-weight:800;letter-spacing:.055em;text-transform:uppercase;line-height:1.3}
:is(#overlay,.helm-exit) .card :is(span,small){font-size:12px;line-height:1.6;color:#b0c5ca}
:is(#overlay,.helm-exit) .card span{margin-top:7px}
:is(#overlay,.helm-exit) .grid{gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
:is(#overlay,.helm-exit) .rules,:is(#overlay,.helm-exit) .controls-strip,:is(#overlay,.helm-exit) .wallet-row{background:#122630;border:1px solid #34505c;border-left:4px solid var(--helm-accent);border-radius:10px 3px 3px 10px;padding:14px;font-size:12px}
:is(#overlay,.helm-exit) .wallet-row{color:var(--helm-accent)!important;letter-spacing:.035em}
:is(#overlay,.helm-exit) .purchase-reason{font-size:12px!important}
:is(#overlay,.helm-exit) .resource-cost{color:#efd6ae!important}
:is(#overlay,.helm-exit) .refit-preview,:is(#overlay,.helm-exit) .builder-canvas,:is(#overlay,.helm-exit) #reticlePreview{border:1px solid #536e78;border-radius:12px;box-shadow:inset 0 0 0 4px #07111c;background-color:#071724}
:is(#overlay,.helm-exit) .refit-preview{height:250px}
:is(#overlay,.helm-exit) .part-art{border-radius:12px 3px 3px 12px;border-color:#587980}
:is(#overlay,.helm-exit) .dialogue{border-color:var(--helm-accent);padding:12px 16px;background:#0e202c;border-radius:0 8px 8px 0}
:is(#overlay,.helm-exit) .dialogue b,:is(#overlay,.helm-exit) .log small{font-size:12px;color:var(--helm-accent)}
:is(#overlay,.helm-exit) .level-card{background:#102b22;border-color:var(--helm-green);border-radius:12px}
:is(#overlay,.helm-exit) .level-card small,:is(#overlay,.helm-exit) .level-info b{color:var(--helm-green)}
:is(#overlay,.helm-exit) .field{padding:12px 14px;border:1px solid #2d4652;border-radius:10px;background:#0c1d29;font-size:13px}
:is(#overlay,.helm-exit) .field select{border-radius:14px 3px 3px 14px;border-color:#526b77;font:13px monospace;margin-top:8px;max-width:100%}
:is(#overlay,.helm-exit) .field input[type=range]{accent-color:var(--helm-accent)}
:is(#overlay,.helm-exit) .reticle-options legend{color:var(--helm-accent);font-size:12px;letter-spacing:.08em;text-transform:uppercase}
:is(#overlay,.helm-exit) :is(.reticle-styles,.reticle-colors,.reticle-toggles,#focus,#routes){gap:4px;padding:5px;background:#0b1b26;border:1px solid #334d59;border-radius:16px 5px 5px 16px}
:is(#overlay,.helm-exit) .reticle-styles button:not(.aeSetLink){border-left-width:1px;border-radius:3px;min-width:56px}
:is(#overlay,.helm-exit) .reticle-styles button:not(.aeSetLink):first-child,:is(#overlay,.helm-exit) .reticle-colors button:not(.aeSetLink):first-child{border-radius:12px 3px 3px 12px}
:is(#overlay,.helm-exit) .reticle-colors button:not(.aeSetLink){border-radius:3px;border-left-width:1px}
:is(#overlay,.helm-exit) .reticle-styles button:not(.aeSetLink)[aria-pressed=true],:is(#overlay,.helm-exit) .reticle-colors button:not(.aeSetLink)[aria-pressed=true]{outline-color:#e4f0ec;outline-offset:0}
:is(#overlay,.helm-exit) .reticle-size-labels{font-size:12px}
:is(#overlay,.helm-exit) #focus button:not(.aeSetLink),:is(#overlay,.helm-exit) #routes .card{margin:0;border-radius:3px}
:is(#overlay,.helm-exit) .builder-tray{gap:6px;border-block:1px solid #2d4652;margin-top:12px}
:is(#overlay,.helm-exit) .builder-slot{border-radius:15px 3px 3px 15px;font-size:12px}
:is(#overlay,.helm-exit) .builder-slot.picked{background:var(--teal);color:#07111c;border-color:var(--teal)}
:is(#overlay,.helm-exit) .origin-card{border-radius:14px 4px 4px 14px;font-size:13px;line-height:1.55}
:is(#overlay,.helm-exit) .origin-card .portrait{border-radius:12px 3px 3px 12px}
/* The title's own console stays translucent enough to reveal existing local art. */
.home{padding:88px 6vw 70px;background:linear-gradient(90deg,#07111cb8,transparent 85%);align-items:center}
.home .intro{width:min(590px,100%);max-width:590px;padding:25px 30px 24px 53px;background:#07111ced}
.home h1{font-size:clamp(54px,5.5vw,78px);line-height:.95;margin:20px 0;letter-spacing:.015em}
.home h1 em{font:inherit;font-style:normal;color:var(--gold)}
.home .lede{font-size:16px;line-height:1.55;margin:16px 0}
.home .difficulty{gap:3px;margin-top:20px;padding:4px;background:#1a2e3a;border-radius:16px 4px 4px 16px;border:1px solid #4a626d}
.home .difficulty button:not(.aeSetLink){flex:1;min-width:0;padding:9px 5px;font:12px monospace;border-left-width:1px;border-radius:3px;background:#0b1c28}
.home .difficulty button:not(.aeSetLink):first-child{border-radius:12px 3px 3px 12px}
.home .difficulty button:not(.aeSetLink)[aria-pressed=true]{background:var(--gold);color:#07111c;font-weight:800}
.home #difficultyNote{margin:10px 0 14px;line-height:1.5;min-height:36px}
.home .intro>:is(.primary,#continue,#loadSlots,#resumePrologue){width:100%;margin-top:8px;padding:12px 17px;font-size:14px}
.home .home-links{position:static;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;width:auto;margin-top:15px}
.home .home-links button:not(.aeSetLink){padding:10px 8px;font:12px/1.3 monospace;border-left-width:3px;white-space:normal}
.home #saveNote{margin:15px 0 0}
.home-caption{font-size:12px;color:#edbe8c;background:#07111ccf;border-right:4px solid var(--gold);border-radius:4px 16px 16px 4px;padding:12px 18px;max-width:36vw;letter-spacing:.1em}
.home-caption span{font-size:12px;color:#adc3c7}
#wordmark{min-height:44px;padding:6px 12px 6px 17px;border:1px solid #546a73;border-left:7px solid var(--gold);border-radius:16px 4px 4px 16px;background:#07111ce8;font-family:var(--helm-head);font-size:19px;font-stretch:condensed;font-weight:800;letter-spacing:.12em}
#wordmark small{font-size:12px;letter-spacing:.04em}
header>.top-actions button:not(.aeSetLink){font:12px monospace}
/* Flight gets only a bezel and rail stub: preserve the existing combat lanes. */
#flight .telemetry{border:1px solid #3c5662;border-left:4px solid var(--teal);border-radius:12px 4px 4px 12px;box-shadow:inset 0 0 0 3px #07111c66;background:#07111cd9}
#flight .telemetry b{margin-left:auto;text-align:right}
#flight meter{appearance:none;-webkit-appearance:none;background:#233b45;border:0;border-radius:2px;overflow:hidden}
#flight meter::-webkit-meter-bar{background:#233b45;border:0;border-radius:2px;box-shadow:none}
#flight meter::-webkit-meter-optimum-value{background:repeating-linear-gradient(90deg,var(--teal) 0 9px,#0b202a 9px 12px);border-radius:0}
#flight meter::-moz-meter-bar{background:repeating-linear-gradient(90deg,var(--teal) 0 9px,#0b202a 9px 12px);border-radius:0}
#flight #massMeter::-webkit-meter-optimum-value{background:repeating-linear-gradient(90deg,#76dfb8 0 9px,#0b202a 9px 12px)}
#flight #massMeter[data-state=low]::-webkit-meter-optimum-value,#flight meter.critical::-webkit-meter-optimum-value{background:repeating-linear-gradient(90deg,#ff5a4a 0 9px,#0b202a 9px 12px)}
#flight #massMeter::-moz-meter-bar{background:repeating-linear-gradient(90deg,#76dfb8 0 9px,#0b202a 9px 12px)}
#flight #massMeter[data-state=low]::-moz-meter-bar,#flight meter.critical::-moz-meter-bar{background:repeating-linear-gradient(90deg,#ff5a4a 0 9px,#0b202a 9px 12px)}
#flight .power-routes{border-top:1px solid #2d4652;padding-top:4px}
#flight .power-routes button:not(.aeSetLink){border-radius:9px 2px 2px 9px}
#flight #targetReadout{border-radius:12px 4px 4px 12px;border-left:3px solid var(--gold)}
#storyScene .scene-caption{border-radius:18px;border-left:12px solid var(--gold);background:#07111ce8;box-shadow:inset 0 0 0 4px #07111c,inset 0 0 0 5px #3e535d,0 16px 60px #0008}
#storyScene .scene-heading h2{font-size:clamp(24px,4vw,48px)}
#storyScene .scene-footer button:not(.aeSetLink){border-radius:18px 4px 4px 18px;border-left:4px solid var(--gold);font-size:12px}
/* One-pass scan is decorative and cannot intercept input. */
@keyframes helm-in{from{opacity:0;transform:translateX(-22px)}to{opacity:1;transform:translateX(0)}}
@keyframes helm-out{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-18px)}}
@keyframes helm-scan{from{transform:translateY(0);opacity:.65}to{transform:translateY(var(--helm-scan-height,700px));opacity:0}}
:is(#overlay,.helm-exit) .panel.helm-enter{animation:helm-in 180ms ease-out both}
:is(#overlay,.helm-exit) .panel.helm-enter:after{content:"";position:absolute;z-index:2;left:32px;right:12px;top:12px;height:1px;background:var(--helm-accent);pointer-events:none;animation:helm-scan 180ms ease-out both}
:is(#overlay,.helm-exit) .panel.helm-leave{animation:helm-out 120ms ease-in both;pointer-events:none}
:is(#overlay,.helm-exit)[data-motion=reduced] .panel,:is(#overlay,.helm-exit)[data-motion=reduced] .panel:after,:is(#overlay,.helm-exit)[data-motion=reduced] button:not(.aeSetLink){animation:none!important;transition:none!important;transform:none!important}
:is(#overlay,.helm-exit)[data-motion=reduced] .panel:after{display:none}
@media(max-width:930px){.home-caption{display:none}.home{padding-left:5vw;padding-right:5vw}.home .intro{max-width:590px}}
@media(max-width:600px){
 :is(#overlay,.helm-exit){padding:66px 10px 56px;--helm-rail:9px}
 :is(#overlay,.helm-exit) .panel{padding:14px 13px 14px 32px;border-radius:18px}
 :is(#overlay,.helm-exit) .panel:before{left:10px;top:14px;bottom:14px}
 :is(#overlay,.helm-exit) h2{font-size:27px;margin:12px 0 16px}
 :is(#overlay,.helm-exit) .panel-top{gap:8px;padding-bottom:7px}
 :is(#overlay,.helm-exit) .panel-top .eyebrow{font-size:12px;letter-spacing:.04em}
 :is(#overlay,.helm-exit) :is(#dialogActions,.helm-copy-dialogActions){padding-top:9px;gap:6px;margin-top:7px}
 :is(#overlay,.helm-exit) :is(#dialogActions,.helm-copy-dialogActions) button:not(.aeSetLink){flex:1 1 100px;padding:9px 8px;font-size:12px}
 :is(#overlay,.helm-exit) .grid{grid-template-columns:1fr}
 :is(#overlay,.helm-exit) .card{padding:13px 12px}
 :is(#overlay,.helm-exit) .card b{font-size:16px}
 :is(#overlay,.helm-exit) .refit-preview{height:200px}
 :is(#overlay,.helm-exit) .field{padding:10px}
 :is(#overlay,.helm-exit) :is(p,small,.crew-name,.module-list,.reticle-size-labels,.builder-status){font-size:12px}
 :is(#overlay,.helm-exit) .reticle-styles{gap:4px;padding:4px}
 :is(#overlay,.helm-exit) .reticle-styles button:not(.aeSetLink){width:56px;min-width:56px}
 .home{padding:77px 12px 68px;align-items:flex-start;background:linear-gradient(90deg,#07111cba,#07111c40)}
 .home .intro{padding:22px 17px 20px 34px;--helm-rail:9px}
 .home .intro:before{left:10px;top:16px;bottom:16px}
 .home h1{font-size:clamp(45px,12vw,64px);margin:20px 0}
 .home .lede{font-size:15px}
 .home .home-links{grid-template-columns:repeat(2,minmax(0,1fr))}
 .home .difficulty{margin-top:17px}
 .home .difficulty button:not(.aeSetLink){font-size:12px;padding:10px 2px}
 .home :is(.subtle,.eyebrow){font-size:12px}
 #wordmark{font-size:14px;letter-spacing:.08em;padding:6px 8px;border-left-width:5px}
 header{gap:4px;left:72px;right:8px}
 header>.top-actions{gap:4px}header>.top-actions button:not(.aeSetLink){padding:7px 6px;font-size:12px}
 #flight :is(.telemetry small,.telemetry b,.telemetry .mass-row b,.telemetry .mass-row span,.telemetry>div,.telemetry .reactor-row,.power-routes button:not(.aeSetLink),.objective,.objective b,.objective span,.objective #missionTimer,.objective .operation-heading #shipLevel,#comms span,#comms p,#comms,#shieldStatus,#view,#boost,#brake,.battle-actions button:not(.aeSetLink),#aimStick small,#lootTally){font-size:12px}
 #flight .telemetry{width:209px;column-gap:6px}
 #flight .telemetry .mass-row b{letter-spacing:-.04em}
 #flight .objective{top:253px}
 #flight #shieldStatus{top:312px}
}
@media(max-width:353px){
 header{left:68px}#wordmark{font-size:12px;padding-inline:6px;letter-spacing:.03em}header>.top-actions button:not(.aeSetLink){padding-inline:4px;font-size:12px}
 .home .intro{padding-right:12px}.home h1{font-size:45px}
 :is(#overlay,.helm-exit) .panel{padding-right:10px;padding-left:29px}:is(#overlay,.helm-exit) h2{font-size:25px}
 :is(#overlay,.helm-exit) .panel-top .eyebrow{font-size:12px;letter-spacing:0}
 :is(#overlay,.helm-exit) :is(#dialogActions,.helm-copy-dialogActions) button:not(.aeSetLink){flex-basis:100px}
 :is(#overlay,.helm-exit) .reticle-toggles button:not(.aeSetLink){flex-basis:100%}
}
@media(max-width:600px) and (max-height:600px) and (orientation:portrait){
 #flight .objective{top:181px;font-size:12px;max-height:62px}#flight .objective b,#flight .objective span{font-size:12px}
 #flight #shieldStatus{top:351px;font-size:12px;max-width:calc(100vw - 24px)}
}
@media(max-height:450px) and (orientation:landscape){
 :is(#overlay,.helm-exit){padding:60px 12px 54px;--helm-rail:9px}
 :is(#overlay,.helm-exit) .panel{padding:10px 20px 10px 38px;width:min(760px,100%)}
 :is(#overlay,.helm-exit) .panel:before{left:12px;top:14px;bottom:14px}
 :is(#overlay,.helm-exit) .panel-top{min-height:44px;height:auto;padding:0;border-bottom:0}
 :is(#overlay,.helm-exit) h2{font-size:25px;margin:6px 0 10px}
 :is(#overlay,.helm-exit) :is(#dialogActions,.helm-copy-dialogActions){margin-top:4px;padding-top:7px}
 :is(#overlay,.helm-exit) :is(#dialogActions,.helm-copy-dialogActions) button:not(.aeSetLink){flex-basis:130px;padding:8px}
 :is(#overlay,.helm-exit) :is(#scrollCue,.helm-copy-scrollCue),:is(#overlay,.helm-exit) .panel-top .eyebrow{font-size:12px}
 .home{padding:70px 24px 64px;align-items:flex-start}
 .home .intro{width:100%;max-width:900px;display:grid;grid-template-columns:minmax(230px,1fr) minmax(260px,1fr);column-gap:28px;padding:18px 22px 18px 46px}
 .home .intro>*{grid-column:1;min-width:0}.home .intro>.eyebrow{grid-row:1}
 .home h1{font-size:54px;margin:14px 0;grid-row:2 / span 2}
 .home .lede{display:none}.home .intro>.subtle:not(#difficultyNote):not(#saveNote){grid-row:4;margin:0}
 .home .difficulty{grid-column:2;grid-row:1;margin:0}.home #difficultyNote{grid-column:2;grid-row:2;margin:7px 0;min-height:0}
 .home .intro>.primary{grid-column:2;grid-row:3;margin:0;width:100%}
 .home .intro>#continue,.home .intro>#loadSlots,.home .intro>#resumePrologue{grid-column:2;width:100%}
 .home .home-links{grid-column:2;position:static;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:8px;width:auto}
 .home #saveNote{grid-column:1;grid-row:5;margin:10px 0 0}
 #flight :is(.telemetry small,.telemetry b,.telemetry .mass-row b,.telemetry .mass-row span,.power-routes button:not(.aeSetLink),#comms span,#shieldStatus,.battle-actions button:not(.aeSetLink),#boost,#brake,#view,#aimStick small){font-size:12px}
}
@media(prefers-reduced-motion:reduce){
 :is(#overlay,.helm-exit) .panel,:is(#overlay,.helm-exit) .panel:after,:is(#overlay,.helm-exit) button:not(.aeSetLink),.home button:not(.aeSetLink),header button:not(.aeSetLink){animation:none!important;transition:none!important;transform:none!important}
 :is(#overlay,.helm-exit) .panel:after{display:none}
}

/* Decorative exit copies have no live IDs, controls or hit targets. */
.helm-exit{position:fixed;inset:0;z-index:10;display:flex;justify-content:center;align-items:center;overflow:hidden;pointer-events:none}
.helm-exit .helm-copy-dialogBody{overflow:auto;min-height:0;overscroll-behavior:contain;padding:0 3px 4px}
.helm-exit .helm-copy-dialogBody:after{content:'';display:block;clear:both}
.helm-exit .helm-copy-dialogActions{display:flex;flex-wrap:wrap;gap:8px;flex:none;position:sticky;bottom:0}
.helm-exit .helm-copy-scrollCue{display:none;text-align:center;font:12px monospace}
body[data-helm-motion=reduced] :is(#overlay,.helm-exit,.home) *:not(.aeSetLink),body[data-helm-motion=reduced] :is(#overlay,.helm-exit) .panel:after{animation:none!important;transition:none!important;transform:none!important}
body[data-helm-motion=reduced] :is(#overlay,.helm-exit) .panel:after{display:none}
@media(max-width:600px),(max-height:450px) and (orientation:landscape){.helm-exit .helm-copy-scrollCue{display:block}}
/* Tall title consoles start inside their scroll lane, including saved-game keys. */
.home{align-items:flex-start}
@media(max-width:353px){.home .difficulty{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Filled keys keep every readout legible, including inherited cost labels. */
:is(#overlay,.helm-exit) button:not(.aeSetLink):not(:disabled):is(:active,[aria-pressed=true]) :is(b,span,small,.ship-card,.module-list),.home button:not(.aeSetLink):not(:disabled):active :is(b,span,small){color:#10232c!important}
body[data-helm-motion=reduced] header :is(#wordmark,.top-actions button:not(.aeSetLink)){animation:none!important;transition:none!important;transform:none!important}

/* Integration review: the emitter notice is a body sibling, not inside flight. */
#shieldStatus{font-size:12px}
@media(max-width:600px){#shieldStatus{top:312px;font-size:12px;max-width:calc(100vw - 24px)}}
@media(max-width:600px) and (max-height:600px) and (orientation:portrait){#shieldStatus{top:351px}}
@media(max-height:450px) and (orientation:landscape){#shieldStatus{top:235px;font-size:12px}}
/* Scroll containers must not trim the focus cue at the edge of full-width keys. */
:is(#overlay,.helm-exit) button:is(.card,.builder-slot):not(.aeSetLink):focus-visible{outline-offset:-4px;box-shadow:inset 0 0 0 6px #07111c}
/* Keep selected toggles filled and readable while the pointer rests on them. */
:is(#overlay,.helm-exit) button[aria-pressed=true]:not(:disabled):not(.aeSetLink):hover{background:var(--helm-accent);color:#07111c;border-color:var(--helm-accent)}

/* Keep the decorative exit preview the same size after live IDs are stripped. */
.helm-exit .helm-copy-reticlePreview{display:block;width:100%;height:160px;border:1px solid #536e78;border-radius:12px;margin:12px 0 20px;box-shadow:inset 0 0 0 4px #07111c;background-color:#071724}
.helm-exit :is(.helm-copy-focus,.helm-copy-routes){gap:4px;padding:5px;background:#0b1b26;border:1px solid #334d59;border-radius:16px 5px 5px 16px}
.helm-exit .helm-copy-focus button,.helm-exit .helm-copy-routes .card{margin:0;border-radius:3px}

/* 3.7 physical turn pads and a separate, scrollable learning rail. */
#turnLeft,#turnRight{position:fixed;left:22px;bottom:260px;width:48px;font-size:24px;touch-action:none}#turnRight{left:78px}.telemetry .power-routes{flex-wrap:nowrap}.power-routes button{flex:1 1 0;min-width:44px;padding-left:2px;padding-right:2px}
#controlsHints{position:fixed;right:20px;top:390px;bottom:165px;width:210px;max-height:310px;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;background:#091722eb;border-left:2px solid #819e9c;padding:9px;z-index:2;font:11px/1.4 monospace}#controlsHints>b{display:block;color:var(--gold);margin-bottom:8px}#controlsHints small{font-size:9px;color:var(--muted)}#hintRows label{display:flex;align-items:center;gap:6px;min-height:44px;border-top:1px solid #2f444b;cursor:pointer}#hintRows input{width:18px;height:18px;flex:none;accent-color:var(--teal)}#hintRows span span,#hintRows span b{display:block}#hintRows span span{color:var(--muted)}#bindingConflict{color:#ffb77e}
@media(max-width:600px){#turnLeft,#turnRight{bottom:225px;left:16px}#turnRight{left:72px}#controlsHints{right:10px;top:390px;bottom:300px;width:150px;min-height:70px;max-height:150px;font-size:10px}#controlsHints small{display:none}}
@media(max-height:600px){#controlsHints{top:230px;bottom:140px;max-height:135px;width:155px}#turnLeft,#turnRight{bottom:220px}}
@media(max-height:450px) and (orientation:landscape){#controlsHints{right:12px;top:114px;bottom:200px;width:130px;min-height:65px;font-size:10px}#turnLeft,#turnRight{left:22px;bottom:160px}#turnRight{left:78px}}

/* 3.7 shared narration controls keep their audio/visual clock together. */
.story-paused *, .story-paused *::before, .story-paused *::after{animation-play-state:paused!important}
#game.hero-reticle-active{cursor:none}
.comms-controls{display:flex;gap:6px;flex-wrap:wrap;pointer-events:auto;margin-top:6px}.comms-controls button,#storyScene .scene-footer button{min-height:44px;min-width:44px;font-size:12px;padding:8px 12px}
#dialogStoryControls{margin:8px 0 12px}.scene-footer{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.scene-footer #sceneProgress{margin-right:auto}
#comms{pointer-events:auto}#comms[data-kind=story],#comms[data-kind=bark]{max-height:180px;overflow:auto}
@media(max-width:600px){#comms[data-kind=story],#comms[data-kind=bark]{max-height:128px}.comms-controls{gap:4px}.comms-controls button{padding:6px 9px}.scene-footer #sceneProgress{flex-basis:100%}.scene-caption{bottom:165px}.scene-footer{bottom:22px;left:5vw;right:5vw}}
@media(max-height:450px) and (orientation:landscape){#comms[data-kind=story],#comms[data-kind=bark]{max-height:110px}.scene-footer{bottom:12px}.scene-caption{bottom:76px}}

/* Empty menu space reaches the hero canvas; its card and controls remain interactive. */
.home{pointer-events:none}.home .intro,.home button,.home a,.home input,.home select{pointer-events:auto}

#hintsEnabled{width:44px;height:44px;margin:0 8px 0 0;vertical-align:middle;accent-color:#e7b04a}
@media(max-height:450px) and (orientation:landscape){.origin-card .portrait,.origin-hull{display:none}.origin-card{padding:8px 10px;font-size:12px;line-height:1.35}}

/* 3.7.2 gate: hull cards with thumbnails, CURRENT chip, locked dim */
.card.hull-card{display:flex;gap:12px;align-items:center}.hull-thumb{flex:none;width:64px;height:64px;display:flex;align-items:center;justify-content:center;overflow:hidden}.hull-thumb img{width:auto;height:64px;transform:rotate(90deg);image-rendering:auto}.hull-text{display:block;min-width:0}.card.hull-card.current{opacity:1;border-color:var(--gold);box-shadow:inset 0 0 0 1px var(--gold)}.chip-current{display:inline-block;font-style:normal;font-size:10px;letter-spacing:.08em;color:#071019;background:var(--gold);border-radius:3px;padding:1px 6px;margin-left:6px;vertical-align:1px}.card.hull-card.locked{opacity:.5}.card.hull-card.locked .hull-thumb img{filter:grayscale(1) brightness(.7)}
/* 3.7.2 gate: touch layouts keep turn pads, narration controls, BOOST/FIRE and VIEW reachable. */
body.touch #turnLeft,body.touch #turnRight{left:140px;bottom:160px}body.touch #turnRight{left:196px}
body.touch #controlsHints{bottom:300px}
@media(max-width:600px){body.touch #turnLeft,body.touch #turnRight{left:16px;bottom:225px}body.touch #turnRight{left:72px}body.touch #comms,body.touch #comms[data-kind=story],body.touch #flight.tutorial-active #comms[data-kind=story]{right:12px;left:12px;width:auto;bottom:292px;max-height:none}#flight:has(#comms:not([hidden])) #controlsHints{display:none!important}}
@media(max-width:360px){body.touch #turnLeft,body.touch #turnRight{bottom:219px}#controlsHints{display:none!important}#comms .comms-controls,#comms #commPortrait{display:none}body.touch #comms,body.touch #comms[data-kind=story],body.touch #flight.tutorial-active #comms[data-kind=story]{top:290px;bottom:auto;left:128px;right:8px;width:auto;max-height:64px;overflow:hidden}}
@media(max-height:450px) and (orientation:landscape){#turnLeft,#turnRight,body.touch #turnLeft,body.touch #turnRight{left:120px;bottom:70px}#turnRight,body.touch #turnRight{left:176px}#controlsHints{top:128px}#comms,#comms[data-kind=bark],#comms[data-kind=story],body.touch #comms[data-kind=story],body.touch #flight.tutorial-active #comms[data-kind=story]{max-height:none;top:128px;bottom:auto;right:148px}#comms>div:last-child{display:grid;grid-template-columns:1fr auto;column-gap:8px;align-items:start}#comms>div:last-child>span{grid-column:1/-1}#comms #line{grid-column:1;margin:0}#comms .comms-controls{grid-column:2;grid-row:2;margin:0;flex-wrap:nowrap}}
@media(min-width:601px) and (max-width:930px) and (min-height:451px){#onboarding{top:204px}}
/* 3.7.4 save slots: five cards, delete on each card, 44 px targets, one column on phones. */
.slot-list{display:grid;gap:10px}
#overlay .slot-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:stretch}
#overlay .slot-card .slot-main{display:flex;gap:12px;align-items:center;margin:0;min-height:88px;width:100%;text-align:left}
#overlay .slot-card.current .slot-main{border-color:var(--gold);box-shadow:inset 0 0 0 1px var(--gold)}
#overlay .slot-card.empty .slot-main{opacity:.82;border-style:dashed}
.slot-plus{font-size:34px;color:var(--gold);line-height:1}
#overlay .slot-del{min-width:92px;min-height:44px;padding:8px 12px;margin:0;border:1px solid #b97b6d;border-radius:3px;background:#1d1a21;color:#f1c6bb;font-weight:700;letter-spacing:.04em;cursor:pointer}
#overlay .slot-del:hover,#overlay .slot-del:focus-visible{background:#3a2024;outline:2px solid #f1c6bb;outline-offset:2px}
#overlay .slot-where{color:var(--gold);font-weight:700}
@media(max-width:600px){#overlay .slot-card{grid-template-columns:minmax(0,1fr)}#overlay .slot-del{width:100%}#overlay .slot-card .slot-main{min-height:92px;padding:12px}}
/* 3.7.6i brake assist: desktop BRAKE ASSIST <level> <key> in the combat strip (touch keeps its own #brake pad); lit while the brake is held */
#brakeKey{border-color:#a9ded5}
/* the level in words on both brake buttons; FULL teal, LIGHT pale blue, MIN gray-blue, OFF gold (pure Newton) */
:is(#brakeKey,#brake)[data-mode=full]{color:var(--teal)}
:is(#brakeKey,#brake)[data-mode=light]{border-color:#8fb3c9;color:#d3e6f0}
:is(#brakeKey,#brake)[data-mode=min]{border-color:#7f93a6;color:#bccad6}
:is(#brakeKey,#brake)[data-mode=off]{border-color:var(--gold);color:var(--gold);background:#1f1b16ee}
#brake small{display:block;font-size:.85em;letter-spacing:.04em}
body.touch #brakeKey{display:none}
@media(pointer:coarse){#brakeKey{display:none}}
#brake.braking,#brakeKey.braking{background:#294650;border-color:var(--gold);color:var(--gold);box-shadow:0 0 10px #edbe8c88}
/* 3.7.5 mining toggle chip: centred just above the combat strip, shown only while a rock is in range; press the mine key or tap it */
#mineState{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(max(62px,env(safe-area-inset-bottom) + 62px) + 52px);z-index:4;display:block;font:11px/1.3 monospace;letter-spacing:.5px;padding:6px 10px;white-space:nowrap;border-color:#a9ded5;color:var(--teal);background:#10212dee}
#mineState[hidden]{display:none}
#mineState[data-state=on]{border-color:var(--gold);color:var(--gold);background:#294650;box-shadow:0 0 10px #edbe8c66}
@media(max-width:600px){body.touch #mineState{left:auto;right:12px;transform:none;bottom:222px}}
/* 3.7.5 next-step cue: when the sector is clear, a big pulsing JUMP prompt (the touch JUMP button glows too) */
#jumpCue{position:fixed;left:50%;top:104px;transform:translateX(-50%);z-index:4;pointer-events:none;font:700 22px/1.2 monospace;letter-spacing:2px;color:#07131f;background:var(--gold);border-radius:6px;padding:8px 18px;white-space:nowrap;box-shadow:0 0 0 2px #07131f,0 0 22px #edbe8caa;animation:jumpPulse 1.1s ease-in-out infinite}
#jumpCue[hidden]{display:none}
@keyframes jumpPulse{0%,100%{transform:translateX(-50%) scale(1);box-shadow:0 0 0 2px #07131f,0 0 10px #edbe8c66}50%{transform:translateX(-50%) scale(1.07);box-shadow:0 0 0 2px #07131f,0 0 30px #edbe8cff}}
#jump.glow{border-color:#ffd24a;color:#ffd24a;box-shadow:0 0 8px #ffd24a;animation:none}
@keyframes jumpGlow{0%,100%{box-shadow:0 0 6px #edbe8c66}50%{box-shadow:0 0 22px #edbe8cff}}
@media(max-width:600px){#jumpCue{left:auto;right:12px;top:118px;transform:none;font-size:14px;padding:5px 10px;letter-spacing:1px;animation:jumpPulseSm 1.1s ease-in-out infinite}@keyframes jumpPulseSm{0%,100%{box-shadow:0 0 0 2px #07131f,0 0 8px #edbe8c66}50%{box-shadow:0 0 0 2px #07131f,0 0 24px #edbe8cff}}}
@media(prefers-reduced-motion:reduce){#jumpCue,#jump.glow{animation:none}}
/* Controls panel: collapses to its title after the first minute of flight (tap the title to open it again) */
#controlsHints.collapsed{bottom:auto!important;height:auto!important;min-height:0!important;max-height:34px!important;overflow:hidden}
#controlsHints.collapsed #hintRows{display:none}
#controlsHints>b{cursor:pointer}

/* 3.7.5f MENU LIFE (Jesse 11-10 "the menus are little bit boring"). Glass-and-metal consoles lit from the top-left; the rim
   stays faint at rest and brightens where the pointer or finger is, like the shields. Decorative only; reduced motion = still. */
.menu-fx{position:fixed;inset:0;width:100%;height:100%;display:block;pointer-events:none}
#overlay>.menu-fx{z-index:0}
:is(#overlay,.helm-exit) .panel{z-index:1}
:is(#overlay,.helm-exit) .panel,.home .intro{border-color:#5f7984;background:radial-gradient(130% 70% at 0% 0%,#a9ded512,transparent 58%),linear-gradient(162deg,#0f202d 0%,#0a1722 46%,#060e17 100%);box-shadow:inset 1px 1px 0 #ffffff26,inset -1px -1px 0 #000a,inset 0 0 0 5px #07111c99,inset 0 0 0 6px #2a4350,inset 0 22px 30px -26px #d5f3ec3d,inset 0 -40px 44px -36px #000d,0 1px 0 #ffffff0d,0 3px 0 #02060b,0 34px 64px -22px #000e,0 70px 130px -50px #000b;transform-origin:50% 50%;transition:transform .45s cubic-bezier(.2,.7,.2,1)}
.home .intro{background:radial-gradient(130% 70% at 0% 0%,#a9ded512,transparent 58%),linear-gradient(162deg,#0f202deb 0%,#0a1722ed 46%,#060e17f0 100%)}
.glass-light{position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;background:radial-gradient(420px circle at var(--gx,8%) var(--gy,0%),#e9fff80d,transparent 62%);opacity:.85;transition:opacity .5s}
.glass-light:after{content:"";position:absolute;inset:0;border-radius:inherit;padding:1.5px;background:radial-gradient(300px circle at var(--gx,8%) var(--gy,0%),#fff6e6 0%,var(--helm-accent,var(--gold)) 24%,transparent 66%);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);opacity:.5;transition:opacity .55s ease-out}
.glass-light:before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1.5px;background:radial-gradient(70% 55% at 0% 0%,#f2fffb 0%,#c9efe6aa 18%,transparent 52%),radial-gradient(60% 40% at 100% 100%,#00000099,transparent 60%);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);opacity:.42}
.glass-light.near{opacity:1}
.glass-light.near:after{opacity:.85}
.glass-light.hit:after{opacity:1;transition:none}
.glass-light.hit{opacity:1;background:radial-gradient(260px circle at var(--gx,8%) var(--gy,0%),#fff2dc1f,transparent 64%);transition:none}
/* Keys: bevel at rest, light sweep + lift on hover, a real depress on press. */
:is(#overlay,.home) button:not(.aeSetLink){position:relative;isolation:isolate;box-shadow:inset 0 1px 0 #ffffff17,inset 0 -2px 0 #0000005c,0 2px 0 #02070c}
:is(#overlay,.home) button:not(.aeSetLink)::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;background:linear-gradient(100deg,transparent 32%,#ffffff2b 47%,#ffffff0d 55%,transparent 68%) no-repeat;background-size:280% 100%;background-position:120% 0;opacity:0;transition:background-position .6s cubic-bezier(.2,.7,.2,1),opacity .2s}
:is(#overlay,.home) button:not(.aeSetLink):not(:disabled):hover::before{opacity:1;background-position:-20% 0}
:is(#overlay,.home) button:not(.aeSetLink):not(:disabled):hover{transform:translateY(-2px);box-shadow:inset 0 1px 0 #ffffff24,inset 0 -2px 0 #0000005c,0 10px 18px -10px #000,0 0 18px -4px color-mix(in srgb,var(--helm-accent,var(--teal)) 45%,transparent)}
:is(#overlay,.home) button:not(.aeSetLink):not(:disabled):active{transform:translateY(1px);box-shadow:inset 0 3px 8px #0009,0 0 0 #000;transition-duration:40ms}
:is(#overlay,.home) button.primary:not(.aeSetLink){box-shadow:inset 0 1px 0 #ffffff80,inset 0 -3px 0 #0000003d,0 2px 0 #02070c,0 0 22px -6px color-mix(in srgb,var(--helm-accent,var(--gold)) 70%,transparent)}
/* Focus you can see from the couch: navy gap, white ring, accent band and a soft glow. */
:is(#overlay,.home,header) button:not(.aeSetLink):focus-visible,body.pad-nav :is(#overlay,.home,header) :is(button:not(.aeSetLink),input,select):focus{outline:3px solid #fff;outline-offset:3px;box-shadow:0 0 0 3px #07111c,0 0 0 9px var(--helm-accent,var(--gold)),0 0 30px 8px color-mix(in srgb,var(--helm-accent,var(--gold)) 45%,transparent);z-index:2}
:is(#overlay,.helm-exit) button:is(.card,.builder-slot):not(.aeSetLink):focus-visible,body.pad-nav #overlay button:is(.card,.builder-slot):not(.aeSetLink):focus{outline:3px solid #fff;outline-offset:-3px;box-shadow:inset 0 0 0 7px var(--helm-accent,var(--gold)),inset 0 0 26px color-mix(in srgb,var(--helm-accent,var(--gold)) 40%,transparent)}
/* Pixel press: square sparks fly from the press point in stepped frames, like the hull sand. */
.px-burst{position:absolute;inset:0;z-index:1;border-radius:inherit;overflow:hidden;pointer-events:none}
.px-burst i{position:absolute;width:5px;height:5px;margin:-2px 0 0 -2px;background:var(--helm-accent,var(--gold));box-shadow:0 0 6px var(--helm-accent,var(--gold));animation:px-fly .5s var(--d,0ms) steps(8,end) both}
.primary .px-burst i,button[aria-pressed=true] .px-burst i{background:#07111c;box-shadow:none}
@keyframes px-fly{0%{transform:translate(0,0) scale(1.5);opacity:1;filter:brightness(2)}100%{transform:translate(var(--dx),var(--dy)) scale(.5);opacity:0}}
/* Staged entrance: panel, then title, then each key 35 ms apart. Never blocks input (opacity/transform only). */
@keyframes life-rise{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}
#overlay.life-stagger #dialogTitle,#overlay.life-stagger #eyebrow,.home.life-stagger .intro>:is(.eyebrow,h1){animation:life-rise .28s .07s cubic-bezier(.2,.7,.2,1) both}
#overlay.life-stagger .life-in,.home.life-stagger .life-in{animation:life-rise .26s calc(.13s + var(--life-i,0)*35ms) cubic-bezier(.2,.7,.2,1) both}
.home.life-stagger .intro{animation:helm-in .3s ease-out both}
@keyframes helm-out{0%{opacity:1;transform:none}100%{opacity:0;transform:translateX(-14px) scale(.985)}}
body[data-helm-motion=reduced] .glass-light,body[data-helm-motion=reduced] .glass-light:after{transition:none}
body[data-helm-motion=reduced] .px-burst{display:none}
@media(prefers-reduced-motion:reduce){.px-burst{display:none}:is(#overlay,.home) .life-in{animation:none!important}}
/* Softer vignette instead of a flat dim: the living backdrop and the colour of the scene glow through around the console. */
:is(#overlay,.helm-exit){background:radial-gradient(ellipse 75% 70% at 50% 46%,#030a1352 0%,#030a13b8 70%,#030a13e0 100%);backdrop-filter:blur(11px) saturate(1.25)}
#overlay .slot-card .hull-thumb.slot-plus{font:300 34px/1 system-ui,sans-serif;color:var(--gold);border:1px dashed #edbe8c88;border-radius:14px 4px 4px 14px;background:#edbe8c0d}
.home .intro>.glass-light{grid-column:auto!important;grid-row:auto!important}
/* Phone landscape: the header sits under the overlay anyway, so give the console the full height (left gutter keeps the site corner mark clear). */
@media(max-height:450px) and (orientation:landscape){:is(#overlay,.helm-exit){padding:10px 12px 10px max(64px,calc(env(safe-area-inset-left) + 64px))}}

/* 3.7.6c main-objective gold: used for the objective line, callout and world waypoint only */
:root{--objective:#ffd24a}
.objective span#objective{color:var(--objective);font-weight:bold;font-size:11px;text-shadow:0 0 6px #1a120499,0 1px 0 #1a1204}
.objective small#fieldHint{display:block;color:var(--muted);margin-top:3px}
.objective small#fieldHint:empty{display:none}
#objCallout{position:fixed;left:50%;top:228px;transform:translateX(-50%);z-index:30;pointer-events:none;max-width:min(86vw,640px);padding:7px 16px;border:1px solid #ffd24a99;border-radius:4px;background:#120d04d9;color:var(--objective);font:bold 13px/1.3 monospace;letter-spacing:.8px;text-align:center;box-shadow:0 0 18px #ffd24a33}
#objCallout.show{animation:objIn 1.5s ease-out both}
#objCallout.still{animation:none}
@keyframes objIn{0%{opacity:0;transform:translate(-50%,-6px)}12%{opacity:1;transform:translate(-50%,0)}80%{opacity:1}100%{opacity:0}}
@media (prefers-reduced-motion:reduce){#objCallout.show{animation:none}}

/* 3.7.6e cinematic openings: a painting per beat (cross-fade + slow push-in) and a narrator beat shown as a film subtitle. */
.scene-paint{position:absolute;inset:-4%;background:62% 38%/cover no-repeat;opacity:0;transition:opacity 1.4s ease;filter:brightness(1.16) saturate(1.08);will-change:opacity,transform}
.scene-paint.on{opacity:1;animation:scenePush 18s ease-out both}
@keyframes scenePush{from{transform:scale(1.02)}to{transform:scale(1.1) translate(-1.2%,-.8%)}}
#storyScene.painted .scene-vignette{background:linear-gradient(#06101bb8,#06101b00 26%,#06101b00 52%,#06101bde 86%)}
#storyScene[data-voice="narrator"] #scenePortrait,#storyScene[data-voice="narrator"] #sceneSpeaker{display:none}
#storyScene[data-voice="narrator"] .scene-caption{background:none;border:0;box-shadow:none;padding:0 0 8px;justify-content:center;text-align:center;max-width:920px;margin:0 auto}
#storyScene[data-voice="narrator"] #sceneLine{font:italic clamp(18px,2.5vw,30px)/1.45 Georgia,serif;color:#f3e6c8;text-shadow:0 2px 14px #000,0 0 3px #000;letter-spacing:.01em;margin:0}
@media(prefers-reduced-motion:reduce){.scene-paint{transition:none}.scene-paint.on{animation:none}}

/* 3.7.6g jump cue: a charged-drive badge with marching chevrons, a keycap and a light sweep (was a flat gold sticker) */
#jumpCue{position:fixed;left:50%;top:104px;transform:translateX(-50%);z-index:4;pointer-events:none;display:flex;align-items:center;gap:16px;padding:10px 20px;white-space:nowrap;font:inherit;letter-spacing:0;color:#f3e6c8;background:linear-gradient(100deg,#07131ff2,#0f3137f2 55%,#07131ff2);border:1px solid var(--gold);border-radius:16px 6px 16px 6px;box-shadow:0 0 0 3px #07131f,0 0 26px #5fd9c955,inset 0 0 18px #5fd9c922;overflow:hidden;animation:jcGlow 1.6s ease-in-out infinite}
#jumpCue[hidden],#flight.jumping #jumpCue{display:none}
/* 3.7.7b freeze note: P froze the picture; small, top centre, out of the way of a screenshot */
#freezeNote{position:fixed;left:50%;top:max(14px,env(safe-area-inset-top));transform:translateX(-50%);z-index:30;display:flex;align-items:center;gap:14px;padding:8px 16px;white-space:nowrap;cursor:pointer;color:#f3e6c8;background:#07131fee;border:1px solid var(--gold);border-radius:14px 5px 14px 5px;box-shadow:0 0 0 3px #07131f,0 0 22px #5fd9c955;font-size:14px}
#freezeNote[hidden]{display:none}#freezeNote b{color:var(--gold);letter-spacing:3px}#freezeNote span{display:inline-flex;align-items:center;gap:6px;color:#cfe9e4}
#freezeNote kbd{display:inline-grid;place-items:center;min-width:26px;height:26px;padding:0 7px;border-radius:6px;border:1px solid #7fd8cb;border-bottom-width:3px;background:#0f3137;color:#eafffb;font:700 13px/1 monospace}

#jumpCue::after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 35%,#ffffff30 50%,transparent 65%);transform:translateX(-120%);animation:jcSweep 2.4s ease-in-out infinite}
#jumpCue .jc-text{display:flex;flex-direction:column;gap:3px;line-height:1.1;text-align:center}
#jumpCue small{font:700 11px/1 monospace;letter-spacing:3px;color:#7fe6d6}
#jumpCue b{display:flex;align-items:center;justify-content:center;gap:10px;font:800 24px/1.1 var(--helm-head,"Arial Narrow",sans-serif);font-stretch:condensed;letter-spacing:.08em;text-transform:uppercase;color:#f6d9ae}
#jumpCue kbd{display:inline-grid;place-items:center;min-width:34px;height:34px;padding:0 8px;border-radius:8px;background:var(--gold);color:#07131f;font:800 20px/1 monospace;box-shadow:0 3px 0 #9b7447,0 0 14px #edbe8caa;animation:jcKey 1.1s ease-in-out infinite}
#jumpCue .jc-chev{display:flex;gap:3px}
#jumpCue .jc-chev i{width:10px;height:18px;background:#7fe6d6;clip-path:polygon(0 0,45% 0,100% 50%,45% 100%,0 100%,55% 50%);opacity:.18;animation:jcChev 1.1s linear infinite}
#jumpCue .jc-chev i:nth-child(2){animation-delay:.16s}#jumpCue .jc-chev i:nth-child(3){animation-delay:.32s}
@keyframes jcChev{0%,100%{opacity:.18}30%{opacity:1}60%{opacity:.18}}
@keyframes jcKey{0%,100%{transform:translateY(0)}50%{transform:translateY(2px);box-shadow:0 1px 0 #9b7447,0 0 22px #edbe8cff}}
@keyframes jcSweep{0%,55%{transform:translateX(-120%)}100%{transform:translateX(120%)}}
@keyframes jcGlow{0%,100%{box-shadow:0 0 0 3px #07131f,0 0 14px #5fd9c944,inset 0 0 18px #5fd9c922}50%{box-shadow:0 0 0 3px #07131f,0 0 36px #5fd9c9aa,inset 0 0 26px #5fd9c944}}
@media(max-width:600px){#jumpCue{left:auto;right:12px;top:118px;transform:none;gap:8px;padding:6px 10px;animation:jcGlow 1.6s ease-in-out infinite}#jumpCue small{display:none}#jumpCue b{font-size:14px;gap:6px}#jumpCue kbd{min-width:24px;height:24px;font-size:13px;padding:0 6px}#jumpCue .jc-chev i{width:6px;height:12px}}
@media(prefers-reduced-motion:reduce){#jumpCue,#jumpCue::after,#jumpCue kbd,#jumpCue .jc-chev i{animation:none}#jumpCue .jc-chev i{opacity:.8}}
/* jump-out flash: in fast over the last quarter second of the animation, out slowly over the debrief */
#jumpFlash{position:fixed;inset:0;z-index:40;pointer-events:none;opacity:0;background:radial-gradient(circle at 50% 50%,#f6fffd 0,#c5f6ee 30%,#6fdccd 62%,#0c2a30 100%);transition:opacity .9s ease-out}
#jumpFlash.on{opacity:1;transition:opacity .26s ease-in}

/* 3.7.6i: over a painting the refit/rebuild ship preview sits in the picture's empty berth, with no panel behind it */
#storyScene.painted #sceneShip{background:none;border-color:transparent}
/* 3.7.6l Builder: slot kind by shape + word, legal targets bright, refused slot shakes, status tones. */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.builder-legend{font:11px/1.4 monospace;color:var(--muted);margin:6px 0 0}.builder-legend span{white-space:nowrap}
:is(#overlay,.helm-exit) .builder-slot[data-legal=yes]{border-color:#9dffc8;background:#143a33;box-shadow:inset 0 0 0 1px #9dffc866,0 0 10px #7dffbf33}
:is(#overlay,.helm-exit) .builder-slot[data-legal=no]{opacity:.45;border-style:dashed}
:is(#overlay,.helm-exit) .builder-slot.refused{opacity:1;border-color:#ffb36b;animation:builder-shake .42s ease-in-out}
@keyframes builder-shake{20%{transform:translateX(-5px)}40%{transform:translateX(5px)}60%{transform:translateX(-3px)}80%{transform:translateX(2px)}}
#overlay[data-motion=reduced] .builder-slot.refused{animation:none}
:is(#overlay,.helm-exit) .builder-status{min-height:2.6em;margin:6px 0 2px;padding:4px 10px;border-left:3px solid #3b5763;border-radius:2px;font-size:13px}
:is(#overlay,.helm-exit) .builder-status[data-tone=warn]{color:#ffd29a;border-left-color:#ffb36b;background:#2a1d0f}
:is(#overlay,.helm-exit) .builder-status[data-tone=ok]{color:#bff5df;border-left-color:#7dffbf}
:is(#overlay,.helm-exit) .builder-help{margin:0 0 8px;font-size:13px}
:is(#overlay,.helm-exit) .builder-note{margin:4px 0 0}
/* 3.7.6l: compact slot tray on wide screens (six per row), so the picture, the slots and the status fit one screen. Touch keeps 44 px targets. */
@media(min-width:601px){#overlay[data-kind=builder]{padding-top:34px;padding-bottom:30px}:is(#overlay,.helm-exit) .builder-tray{padding:6px 3px;margin-top:8px;max-height:280px}:is(#overlay,.helm-exit) .builder-slot{flex:1 0 100px;padding:6px 10px}}
@media(min-width:601px) and (hover:hover) and (pointer:fine){:is(#overlay,.helm-exit) .builder-slot{min-height:40px}}

/* 3.8a Hearth Dock */
.yard-parts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:8px 0}.yard-parts button{min-width:0;min-height:44px;padding:8px 4px;white-space:normal;font-size:12px}.yard-parts button[aria-pressed=true]{border-color:#bfffe6;background:#24534c}.yard-readout{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.yard-readout>div{min-width:0;padding:8px;background:#10242c;border:1px solid #48636b}.yard-readout b,.yard-readout span,.yard-readout small{display:block;font:11px/1.5 monospace;overflow-wrap:anywhere}.yard-readout b{color:var(--teal)}
#overlay #yardWallet{padding:6px 10px;margin:6px 0}#overlay .yard-readout>div{padding:5px 8px}#overlay #yardDetail{margin:6px 0 4px}
.yard-readout strong{color:#f2fff9;font-size:13px}.yard-readout>div[data-tone=good]{border-color:#5fcf9a}.yard-readout>div[data-tone=good] small{color:#8dffc4}.yard-readout>div[data-tone=cost]{border-color:#9a7a4a}.yard-readout>div[data-tone=cost] small{color:#ffc07a}.yard-readout[hidden],#yardDetail[hidden]{display:none}#yardWallet{overflow-wrap:anywhere;font-size:12px}#yardDetail{font-size:12px}.builder-tray[hidden]{display:none}
@media(max-width:600px){.yard-parts,.yard-readout{grid-template-columns:repeat(2,minmax(0,1fr))}#overlay[data-kind=builder] .builder-tray{flex-wrap:wrap;overflow-x:hidden;max-width:100%}#overlay[data-kind=builder] .builder-slot{flex:1 1 110px;min-width:0}.builder-legend span{white-space:normal}}
/* 3.8.0 gate: on phones the Shipyard picture is a little shorter in plate modes and each readout tile is two lines, so all four numbers sit on screen with the picture */
@media(max-width:600px){.builder-canvas.yard{height:160px}#overlay .yard-readout>div{display:grid;grid-template-columns:auto 1fr;column-gap:6px;padding:4px 7px}.yard-readout>div small{text-align:right}.yard-readout>div span{grid-column:1/-1}}
#overlay #yardLoose button{border-color:#ffc07a;color:#ffe2bd;background:#3a2a16}#overlay #yardLoose button[aria-pressed=true]{background:#6b4a1f;color:#fff3e0}
/* 3.8.1: the NEW gun chip sits on the picture's lower-left corner, so the picture keeps its full height */
#overlay #yardLoose{position:relative;z-index:1;display:flex;flex-wrap:wrap;gap:6px;width:fit-content;max-width:calc(100% - 16px);margin:-52px 0 8px 8px}#overlay #yardLoose button{min-height:44px;padding:6px 14px;box-shadow:0 0 0 3px #081724}
#overlay #yardLoose:empty{display:none}
/* 3.8.1: small 'new' tag on the SHIPYARD button, and the debrief's yard line */
#overlay button.yard-new{position:relative}#overlay .yard-new-tag{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:8px;background:#ffc07a;color:#1d1408;font:700 10px/1.4 monospace;letter-spacing:.06em;text-transform:uppercase;vertical-align:middle;animation:yardNew 1.8s ease-in-out infinite}@keyframes yardNew{50%{opacity:.45}}#overlay[data-motion=reduced] .yard-new-tag,.reduced-motion .yard-new-tag{animation:none}@media (prefers-reduced-motion:reduce){#overlay .yard-new-tag{animation:none}}
#overlay .yard-gain{margin:8px 0;padding:8px 10px;border-left:4px solid #ffc07a;background:#2a2114;color:#ffe2bd;font:12px/1.5 monospace}

/* 3.8b thrusters */
.yard-readout{grid-template-columns:repeat(3,minmax(0,1fr));}
.yard-readout>div,.yard-parts>button{min-width:0;overflow-wrap:anywhere;}
@media(max-width:600px){.yard-readout{grid-template-columns:repeat(2,minmax(0,1fr));}}
/* 3.8.3 Shipyard room for the picture: six part buttons in one row and two-line readout tiles on wider screens */
@media(min-width:601px){#overlay .yard-parts{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}#overlay .yard-parts>button{padding:6px 4px;font-size:12px;line-height:1.3}
#overlay .yard-readout>div{display:grid;grid-template-columns:auto 1fr;column-gap:8px;padding:4px 8px}#overlay .yard-readout>div small{text-align:right;grid-row:1;grid-column:2}#overlay .yard-readout>div span{grid-column:1/-1;grid-row:2}}
/* 3.8f dock: reserve the first two actions for the no-flight routes. */
#dockNow{border-color:#74d9bd;background:#26534c;font-weight:700}
#dockNow[hidden]{display:none}
#flight.at-dock #jumpCue{max-width:calc(100vw - 24px);white-space:normal;font:12px/1.4 monospace;animation:none}
#flight.at-dock #jumpCue::after{display:none}
@media(max-width:600px){#flight.at-dock .battle-actions{left:12px;right:12px;transform:none;flex-wrap:wrap}#flight.at-dock .battle-actions #dockNow,#flight.at-dock .battle-actions #jump{display:block;flex:1;min-width:88px}#flight.at-dock :is(#missile,#pulse/* roles 1 */,#guard,#mark,#pod/* end roles 1 */,#orders,#auto,#power){display:none}}
/* 3.8.2 dock arrival: the station shows on its own for a beat after the jump flash, then the debrief fades in over it. */
#overlay.dock-reveal{animation:dockReveal 2.2s ease-out both}
#overlay.dock-reveal.still{animation:dockRevealStill 1.4s step-end both}
@keyframes dockReveal{0%,72%{opacity:0;visibility:hidden}73%{opacity:0;visibility:visible}100%{opacity:1;visibility:visible}}
@keyframes dockRevealStill{0%{visibility:hidden}100%{visibility:visible}}
/* 3.8.2 dock: no weapons or fleet orders in dock space, at any width. */
#flight.at-dock .battle-actions :is(#missile,#pulse/* roles 1 */,#guard,#mark,#pod/* end roles 1 */,#orders,#auto,#power){display:none}
/* 3.8.2 dock: boost and fire do nothing in dock space, so they leave; on a phone the cue sits in the clear band under the HUD and the story comms (the debrief's own beat) step aside so the station stays visible. */
#flight.at-dock :is(#fire,#boost){display:none}
@media(max-width:600px){#flight.at-dock #jumpCue{top:284px;left:12px;right:auto;transform:none;padding:4px 10px;font-size:11px;border-radius:10px 4px 10px 4px;background:#07131fc8;box-shadow:none}#flight.at-dock #comms{display:none!important}}
/* 3.8.7a: the objective line is always one line; the lowest-hull ship is named first, the rest ellipsis */#objective{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#objective .under-attack{display:inline;padding:0;margin:0;color:#ff5a3c;font-size:inherit;font-weight:700}
/* 3.8.8 sweep: one sheet, fixed preview, only card lists scroll. */
#overlay[data-kind=builder]{padding:20px}
#overlay[data-kind=builder] .panel{width:min(1100px,100%);height:min(720px,100%);max-height:min(720px,100%);padding:14px;display:flex;flex-direction:column;gap:6px}
#overlay[data-kind=builder] #scrollCue{display:none}
#overlay[data-kind=builder] #dialogTitle{font-size:22px;margin:0;line-height:1.2}
#overlay[data-kind=builder] #eyebrow{font-size:14px;margin:0}
#overlay[data-kind=builder] #dialogBody{font-size:14px;flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:4px;padding:0}
#overlay[data-kind=builder] :is(p,small,button,.builder-slot,.yard-readout b,.yard-readout span,.yard-readout small,.yard-readout strong){font-size:14px;line-height:1.2}
.yard-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.yard-tabs button, .yard-parts button { min-height:44px; white-space:nowrap; }
#overlay[data-kind=builder] .yard-tabs button[aria-pressed=true]{background:#24534c;border-color:#bfffe6}
#overlay[data-kind=builder] #yardParts{grid-column:1/-1;grid-template-columns:repeat(5,minmax(0,1fr));margin:0;gap:4px}
#yardPartsBody{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:6px;min-height:0}
#yardPartsBody[hidden],#yardCards[hidden],#overlay[data-kind=builder] [hidden]{display:none!important}
.yard-preview{position:relative;grid-column:1;grid-row:2/9;min-width:0;align-self:start}
#overlay[data-kind=builder] .builder-canvas{width:100%;height:360px;min-height:50%;image-rendering:pixelated}
#yardPartsBody>:not(.yard-preview):not(#yardParts){grid-column:2;margin:0}
#yardPartsBody>#yardKeys{grid-column:1;grid-row:9}
#overlay[data-kind=builder] .yard-readout{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
#overlay[data-kind=builder] .yard-readout>div{display:block;padding:4px}
#overlay[data-kind=builder] .yard-readout small{text-align:left}
#overlay[data-kind=builder] #yardWallet{margin:0;padding:2px 0}
#overlay[data-kind=builder] #yardDetail{margin:0;line-height:1.3}
#overlay[data-kind=builder] .builder-status{margin:0;padding:0 4px;min-height:0}
#overlay[data-kind=builder] .builder-status[data-tone=ok],#overlay[data-kind=builder] .builder-status[data-tone=neutral]{display:none}
#overlay[data-kind=builder] .builder-tray{max-height:96px;margin:0;padding:0;overflow:auto;gap:4px}
#overlay[data-kind=builder] .builder-slot{min-height:44px;flex-basis:110px;padding:4px}
#overlay[data-kind=builder] #dialogActions{padding-top:0;margin:0;gap:4px;flex-shrink:0;flex-wrap:wrap}
#overlay[data-kind=builder] #dialogActions .primary{margin-left:auto;order:10}
#yardCards{overflow:auto;overscroll-behavior:contain;min-height:0;flex:1}
#yardCursorCost{position:absolute;pointer-events:none;max-width:220px;padding:3px 6px;background:#071724ed;border:1px solid #abc8cf;font-size:14px;line-height:1.2;z-index:1}
.yard-zoom{position:absolute;bottom:5px;right:5px;display:flex;align-items:center;gap:5px;background:#071724dd}
.yard-zoom button{min-width:44px;min-height:44px;padding:4px}
.ico{display:inline-block;position:relative;color:transparent;width:1em;height:1em;vertical-align:middle}
.ico-metal::before{content:'';position:absolute;width:.9em;height:.4em;left:.05em;top:.3em;background:#b8cbd5;border:1px solid #e1f2f6;transform:skewX(-15deg)}
.ico-mass::before{content:'';position:absolute;width:.8em;height:.8em;left:.1em;top:.1em;border:2px solid #8fe9d0;border-radius:50%;box-sizing:border-box}
#holdLine{font:14px/1.2 monospace;margin:2px 0;color:#b8cbd5}
@media(max-width:600px){
 #overlay[data-kind=builder]{padding:0}
 #overlay[data-kind=builder] .panel{width:100%;height:100%;max-height:100%;border-radius:0;padding:8px;gap:3px}
 #overlay[data-kind=builder] #dialogTitle{font-size:18px}
 #overlay[data-kind=builder] #eyebrow{display:none}
 #overlay[data-kind=builder] #dialogBody{gap:3px}
 #yardPartsBody{display:flex;flex-direction:column;gap:3px}
 #overlay[data-kind=builder] .builder-canvas{min-height:40%;height:40vh}
 #overlay[data-kind=builder] #yardParts button{padding:4px 1px;letter-spacing:0}
 #overlay[data-kind=builder] .yard-readout{grid-template-columns:repeat(2,minmax(0,1fr));gap:2px}
 #overlay[data-kind=builder] .yard-readout>div{display:grid;grid-template-columns:auto 1fr;padding:2px 4px;column-gap:3px}
 #overlay[data-kind=builder] .yard-readout>div span{grid-column:1/-1}
 #overlay[data-kind=builder] .yard-readout>div small{grid-column:2;grid-row:1;text-align:right}
 #overlay[data-kind=builder] #yardDetail{line-height:1.15}
 #overlay[data-kind=builder] .builder-tray{flex-wrap:nowrap;max-height:48px;overflow:auto}
 #overlay[data-kind=builder] .builder-legend{display:none}
 #overlay[data-kind=builder] #yardWallet{font-size:14px;line-height:1.15}
 #overlay[data-kind=builder] #yardKeys{line-height:1.1}
 #overlay[data-kind=builder] #dialogActions button{padding:6px;min-height:44px}
}
/* end 3.8.8 sweep */
/* Compact the title into the exit row; keep all required PARTS copy visible. */
#overlay[data-kind=builder] .panel{position:relative}
#overlay[data-kind=builder] .panel-top{height:44px;min-height:44px;padding:0;border:0}
#overlay[data-kind=builder] #dialogTitle{position:absolute;top:24px;left:72px;right:190px;pointer-events:none}
#overlay[data-kind=builder] .builder-status[data-message=true]{display:block}
@media(max-width:600px){
 #overlay[data-kind=builder] #dialogTitle{top:19px;left:62px;right:8px}
 #overlay[data-kind=builder] #yardPartsBody{position:relative}
 #overlay[data-kind=builder] #builderHelp{position:absolute;top:calc(44px + 40vh - 24px);left:8px;right:120px;padding:2px 4px;background:#071724ed;pointer-events:none}
 #overlay[data-kind=builder] #builderStatus{position:absolute;top:49px;left:5px;right:5px;padding:3px;background:#071724ed;pointer-events:none;z-index:2}
 #overlay[data-kind=builder] #yardLoose:empty{display:none}
}
/* 3.8.8 gate: the helm rail sat on top of the yard copy (phone "xtra hull"); the yard has its own frame. Phone actions keep 14 px text; the wallet stays one line. */
#overlay[data-kind=builder] .panel:before{display:none}
#overlay[data-kind=builder] #yardWallet{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:600px){
 #overlay[data-kind=builder] #dialogActions button{font-size:14px}
 #overlay[data-kind=builder] #yardWallet{letter-spacing:0;font-size:14px}
}
/* end 3.8.8 gate */
/* 3.8.8 gate: MOVE puts the module tray and legend under the ship (the right column clipped them); the phone tray is one swipe row of full labels. */
#overlay[data-kind=builder] #yardPartsBody>#builderTray{grid-column:1;grid-row:9;flex-wrap:nowrap;max-height:none;overflow:hidden;border-block:0;padding:0}
#overlay[data-kind=builder] #yardPartsBody>#builderLegend{grid-column:1;grid-row:10;white-space:nowrap;overflow:hidden;font-size:14px}
#overlay[data-kind=builder] #builderTray .builder-slot{flex:1 1 0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:600px){
 #overlay[data-kind=builder] .yard-preview{align-self:stretch}
 #overlay[data-kind=builder] #yardPartsBody>#builderTray{overflow-x:auto;overflow-y:hidden;touch-action:pan-x;max-height:none}
 #overlay[data-kind=builder] #builderTray .builder-slot{flex:0 0 auto;text-overflow:clip;overflow:visible}
}
/* end 3.8.8 gate */
/* 3.8.8 gate: tray chips size to their words in the body face, so "Shield emitter" and "Collector" fit without cutting. */
#overlay[data-kind=builder] #builderTray .builder-slot{flex:1 1 auto;font-family:inherit;letter-spacing:0;padding:4px 8px;text-overflow:clip}
@media(max-width:600px){#overlay[data-kind=builder] .yard-readout span{letter-spacing:0}}
/* end 3.8.8 gate */
/* 3.8.8 gate: phone tray chips keep their full words (swipe for more); TURN puts "half turn" on its own line instead of orphaning "s". */
#overlay[data-kind=builder] .yard-pre{font-style:normal}
@media(max-width:600px){
 #overlay[data-kind=builder] #builderTray .builder-slot{flex:0 0 auto}
 #overlay[data-kind=builder] .yard-pre{display:block}
}
/* end 3.8.8 gate */
/* 3.8.8 gate: wallet strip = first block under the title on every tab; three chips with icon, WORD and a big number. */
#overlay[data-kind=builder] #yardWallet{display:flex;gap:6px;margin:0;padding:0;white-space:normal;overflow:visible;background:none;border:0;font:14px/1.2 monospace;letter-spacing:0;flex:none}
#overlay[data-kind=builder] .yard-sep{display:none}
#overlay[data-kind=builder] .yard-chip{flex:1 1 0;min-width:0;display:flex;align-items:baseline;gap:8px;padding:5px 10px;border:1px solid #34505c;border-left:4px solid #34505c;border-radius:10px 3px 3px 10px;background:#0d1e27;color:#b9cdd2}
#overlay[data-kind=builder] .yard-chip b{font-size:14px;font-weight:700;letter-spacing:.06em}
#overlay[data-kind=builder] .yard-chip strong{font-size:20px;line-height:1.1;color:#f2fff9}
#overlay[data-kind=builder] .yard-chip em{font:700 14px/1.2 monospace;font-style:normal;color:#ffc77d}
#overlay[data-kind=builder] .yard-chip[data-lit=true]{border-color:#a7ffd0;background:#16333a;color:#e2fff1}
#overlay[data-kind=builder] .yard-chip[data-short=true]{border-color:#ffb057}
#overlay[data-kind=builder] .yard-chip.tick strong{animation:yard-tick .6s ease-out}
@keyframes yard-tick{0%{color:#a7ffd0;text-shadow:0 0 10px #a7ffd0}100%{color:#f2fff9;text-shadow:none}}
@media(prefers-reduced-motion:reduce){#overlay[data-kind=builder] .yard-chip.tick strong{animation:none}}
#overlay[data-motion=reduced][data-kind=builder] .yard-chip.tick strong{animation:none}
@media(max-width:600px){
 #overlay[data-kind=builder] #yardWallet{gap:4px}
 #overlay[data-kind=builder] .yard-chip{flex-direction:column;gap:0;padding:3px 6px}
 #overlay[data-kind=builder] .yard-chip b{letter-spacing:0}
 #overlay[data-kind=builder] .yard-chip strong{font-size:18px}
 #overlay[data-kind=builder] .yard-chip-value{white-space:nowrap}
}
/* end 3.8.8 gate */
/* 3.8.8 gate: chips are read-outs, not buttons: flat, square-ish, no bevel. */
#overlay[data-kind=builder] .yard-chip{border-radius:6px;border-left-width:1px;box-shadow:none}
/* end 3.8.8 gate */
/* 3.8.8 gate: phone chips show "need N more" on its own line; the strip keeps that line's room so nothing jumps. TURN words on their own line everywhere. */
#overlay[data-kind=builder] .yard-pre{display:block}
@media(max-width:600px){
 #overlay[data-kind=builder] .yard-chip{min-height:62px;justify-content:flex-start}
 #overlay[data-kind=builder] .yard-chip em{display:block}
 #overlay[data-kind=builder] .yard-chip-value{white-space:normal}
}
/* end 3.8.8 gate */
/* 3.8.9 form up */
#formUp{position:fixed;right:25px;bottom:338px;min-height:44px;font:11px monospace;touch-action:none;z-index:3;color:var(--gold);border-color:var(--gold)}
#formUp[hidden],#formUpLine[hidden]{display:none!important}
.objective #formUpLine{color:var(--gold);font-size:11px;line-height:1.4}
.boost-bar{display:block;height:3px;background:#233944;margin-top:4px;overflow:hidden}
.boost-bar>i{display:block;height:100%;background:#a9ded5}
#boost small,#boostKey small{display:block;font-size:.8em}
#boostKey{min-height:44px;touch-action:none}
body.touch #boostKey,#flight.at-dock #boostKey{display:none}
@media(pointer:coarse){#boostKey{display:none}}
@media(max-height:600px){#formUp{bottom:294px}}
@media(max-width:600px){#formUp{left:112px;right:auto;bottom:calc(14px + env(safe-area-inset-bottom,0px));width:90px;font-size:11px}}
@media(max-height:450px) and (orientation:landscape){#formUp{left:auto;right:92px;bottom:196px;width:70px;padding:4px;font-size:10px}}
/* end 3.8.9 form up */

/* clear hud */
#zoomValue{display:none}
#formUp{color:#f4f6f2;border-color:#f4f6f2}
.objective #formUpLine{color:#f4f6f2}
#mineState,#mineState[data-state=on]{color:#74d9bd;border-color:#74d9bd}
#mineState[data-state=on]{box-shadow:0 0 10px #74d9bd66}
.mass-ico{display:inline-block;vertical-align:-1px;flex:none}
#flight .telemetry,#flight .telemetry :is(small,b,.mass-row b,.mass-row span),#flight .objective small#fieldHint,#flight #controlsHints,#flight #controlsHints small,#flight #boost,#flight #brake,#flight #formUp,#flight :is(#boost,#boostKey,#brake,#brakeKey) small,#flight #aimStick small,#flight button small{font-size:11px}
@media(max-width:600px),(max-height:450px) and (orientation:landscape){#flight .telemetry :is(small,b,.mass-row b,.mass-row span),#flight #boost,#flight #brake,#flight #aimStick small{font-size:12px}}
#flight :is(.objective,.objective span,#comms span,#targetReadout,.battle-actions button){font-size:12px}
body:has(#flight:not([hidden])) header #wordmark small{font-size:11px}
#controlsHints>b{white-space:nowrap}
#hintRows label{font-size:11px;flex-shrink:0}
#controlsHints:not(.collapsed){overflow-y:auto}
#controlsHints.collapsed{max-height:none!important}
body.formup-shown #controlsHints{display:none!important}
@media(max-width:600px){
 .objective .operation-heading{flex-wrap:nowrap;padding-right:98px}/* gate: SECTOR 0:00 is 85 px wide at 12 px; 84 let LV touch it (F4) */
 .objective .operation-heading #opName{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .objective .operation-heading #shipLevel{flex:none}
 .objective #missionTimer{position:absolute;right:0;top:0;white-space:nowrap}
 #view{max-width:99px;white-space:nowrap;overflow:hidden}
}
@media(max-height:450px) and (orientation:landscape){
 #controlsHints{display:none!important}
 #boost{width:104px}
 #brake{right:132px}
 #formUp{bottom:212px}/* gate: clear of BOOST (top 188) */
}
/* gate: touch tablets: the Controls panel sat on BRAKE (F17); touch hides it as phones already do (the tutorial teaches touch) */
@media(min-width:601px) and (min-height:451px){body.touch #controlsHints{display:none!important}}
/* gate: the objective block (XP bar, long lines) ran under the VIEW chip on desktop/iPad; stop 8 px left of it (VIEW sits at W-334) */
@media(min-width:601px) and (min-height:451px){.objective{right:342px}}
@media(min-width:931px) and (min-height:451px){#onboarding{top:180px}}/* tutorial card clear of SECTOR (ends 172); iPad keeps its 204 */
.objective .operation-heading{flex-wrap:nowrap}.objective .operation-heading #opName{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.objective .operation-heading #shipLevel{flex:none}/* op heading is one line at every width */
@media(max-width:600px){#flight .objective{top:277px}#onboarding{top:353px}}/* gate: the 12 px telemetry ends at 269; heading sat in its power buttons */
@media(max-height:450px) and (orientation:landscape){#onboarding{right:190px}}/* tutorial card clear of BRAKE */
/* gate: mine chip clear of the action bar (was 4 px over it) */
#mineState{bottom:calc(max(62px,env(safe-area-inset-bottom) + 62px) + 60px)}
@media(max-width:600px){body.touch #mineState{bottom:222px}}
/* end clear hud */
/* plates fix */
.yard-hold-note{margin:6px 0 2px;padding:6px 10px;border:1px solid #8e6c35;border-radius:6px;background:#241b0e;color:#ffd9a0;font-size:14px;line-height:1.35}
@media(max-width:600px){#overlay[data-kind=builder] #builderHelp{transform:translateY(calc(-100% + 24px))}}/* a 2-3 line reason grows up over the picture, not down over the HULL readout */
/* end plates fix */
/* 3.8.12 polish */
#yardUpgradeCards .card{display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:12px;align-content:start}
#yardUpgradeCards .upgrade-icon{grid-column:1;grid-row:1/3;align-self:center}
#yardUpgradeCards .card>b,#yardUpgradeCards .card>span{grid-column:2}
#yardUpgradeCards .rank-pips{display:flex;gap:5px;margin:5px 0 8px}
#yardUpgradeCards .rank-pip{display:inline-block;width:12px;height:12px;border:2px solid var(--teal);background:transparent}
#yardUpgradeCards .rank-pip.filled{background:var(--teal)}
[data-refit-hull] .chip-current{font-size:14px}
[data-refit-hull] .hull-thumb{position:relative;width:160px;height:92px;flex-shrink:0}
[data-refit-hull] .hull-thumb img{position:absolute;left:50%;top:50%;height:160px;width:auto;transform:translate(-50%,-50%) rotate(90deg)}
@media(max-width:600px){
 [data-refit-hull] .hull-thumb{width:120px;height:70px}
 [data-refit-hull] .hull-thumb img{height:120px}
}
@media(max-width:600px){
 #overlay[data-kind=builder] .yard-compact .yard-readout{grid-template-columns:minmax(0,1fr)}
 #overlay[data-kind=builder] .yard-compact .yard-readout>div{grid-template-columns:64px minmax(0,1fr) auto;padding:1px 4px;align-items:baseline}
 #overlay[data-kind=builder] .yard-compact .yard-readout>div b{grid-column:1;grid-row:1}
 #overlay[data-kind=builder] .yard-compact .yard-readout>div span{grid-column:2;grid-row:1}
 #overlay[data-kind=builder] .yard-compact .yard-readout>div small{grid-column:3;grid-row:1}
 #overlay[data-kind=builder] .yard-compact .yard-pre{display:inline}
}
#overlay[data-kind=builder] #builderHelp.yard-help-up{transform:translateY(-100%)}
/* end 3.8.12 polish */
/* 3.8.11a continue first */
.home .intro>#continue.primary{display:flex;justify-content:space-between;align-items:center}
.home .intro>#continue.primary::after{content:'\2197'}
.home .intro>#start.home-second{grid-column:2;display:block;width:100%;margin-top:8px;padding:12px 17px;font-size:14px;text-align:center}
.home .intro>#start.home-second span{display:none}
/* end 3.8.11a */
/* gold diamonds */
.treasure-ico{display:inline-block;vertical-align:-.16em;flex-shrink:0;margin-right:2px}
.treasure-sale{color:#fff1b8;margin:.45em 0;font-weight:700}
.treasure-tally{color:#dff4ff;white-space:normal}
/* end gold diamonds */

/* scrap run */
.scrap-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.scrap-field{min-height:160px;text-align:left;display:flex;flex-direction:column;gap:10px;padding:16px;white-space:normal}
.scrap-field.picked{outline:2px solid var(--teal);outline-offset:2px}
.scrap-field:disabled,.scrap-field.locked{opacity:.7}
.scrap-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 14px;margin:6px 0 0 8px;white-space:normal}
.scrap-rich,.yard-sold{padding:12px;border:1px solid var(--teal)}
@media(max-width:600px){.scrap-fields{grid-template-columns:1fr}.scrap-field{min-height:44px;gap:6px;padding:12px}}
/* gate: phones and short landscape screens: the card's words run in a wrapping row so all three fields show what they pay on the first screen */
@media(max-width:600px),(max-height:500px){.scrap-field{min-height:44px;flex-direction:row;flex-wrap:wrap;align-content:flex-start;gap:4px 12px;padding:10px 12px;margin:0}.scrap-field b{flex-basis:100%}.scrap-fields{gap:8px}}
@media(max-height:500px){.scrap-field{font-size:13px}}
/* end scrap run */
/* open field */
/* §7 and §8 are the only universal changes. */
#flight #jumpCue{top:var(--of-objective-bottom,180px);bottom:auto;left:50%;right:auto;width:max-content;max-width:calc(100vw - 24px);height:auto;transform:translateX(-50%);padding:5px 10px;gap:8px;background:#07131f;border:1px solid #ffd24a;border-radius:4px;box-shadow:none;animation:none;color:#ffd24a;font:11px/1.4 monospace;letter-spacing:0}
#flight #jumpCue::after{content:none;animation:none;background:none}
#flight #jumpCue .jc-text{display:flex;flex-direction:row;align-items:center;gap:8px}
#flight #jumpCue :is(small,b,kbd){display:inline;font:11px/1.4 monospace;letter-spacing:0;color:#ffd24a;padding:0;min-width:0;height:auto;background:none;box-shadow:none;animation:none}
#flight #jumpCue .jc-chev{display:none}
@media(min-width:1024px){.wallet-row{letter-spacing:0;word-spacing:-.2em;font-size:11px}}
body.of-phone:has(#flight:not([hidden])) header,
body.of-land:has(#flight:not([hidden])) header{top:10px!important;left:64px!important;right:12px!important;height:44px!important}
body.of-phone:has(#flight:not([hidden])) #wordmark,
body.of-land:has(#flight:not([hidden])) #wordmark{position:fixed!important;left:64px!important;top:10px!important;width:44px!important;height:44px!important;min-width:44px!important;padding:0;font-size:0;letter-spacing:0;text-align:center}
body.of-phone:has(#flight:not([hidden])) #wordmark::before,
body.of-land:has(#flight:not([hidden])) #wordmark::before{content:'IW';font:bold 16px monospace}
body.of-phone:has(#flight:not([hidden])) #wordmark small,
body.of-phone:has(#flight:not([hidden])) #sound,
body.of-land:has(#flight:not([hidden])) #wordmark small,
body.of-land:has(#flight:not([hidden])) #sound{display:none!important}
body.of-phone:has(#flight:not([hidden])) #pause,
body.of-land:has(#flight:not([hidden])) #pause{position:fixed!important;top:10px!important;right:12px!important;width:44px!important;height:44px!important;padding:2px;font:11px system-ui}
body.of-phone:has(#flight:not([hidden])) #pause[data-word=Menu],
body.of-land:has(#flight:not([hidden])) #pause[data-word=Menu]{font-size:0}
body.of-phone:has(#flight:not([hidden])) #pause[data-word=Menu]::before,
body.of-land:has(#flight:not([hidden])) #pause[data-word=Menu]::before{content:'☰';font:20px/1 monospace}
body.of-phone #view,
body.of-land #view{position:fixed!important;top:10px!important;right:60px!important;left:auto!important;bottom:auto!important;width:99px!important;max-width:99px!important;height:44px!important;min-height:44px!important;padding:4px;font-size:11px;white-space:nowrap}
body.of-phone #zoom,
body.of-phone #viewName,
body.of-phone #shieldStatus,
body.of-phone #targetReadout,
body.of-phone #controlsHints,
body.of-land #zoom,
body.of-land #viewName,
body.of-land #shieldStatus,
body.of-land #targetReadout,
body.of-land #controlsHints{display:none!important}
body.of-phone #flight .telemetry,
body.of-land #flight .telemetry{display:none!important}
body.of-phone #flight .telemetry.of-open,
body.of-land #flight .telemetry.of-open{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;position:fixed!important;left:12px!important;right:auto!important;top:144px!important;bottom:auto!important;width:min(360px,calc(100vw - 24px))!important;max-height:calc(100vh - 220px)!important;overflow:auto;z-index:12;background:#07131f;padding:12px;gap:10px}
body.of-phone #flight .telemetry.of-open .power-routes,
body.of-land #flight .telemetry.of-open .power-routes{width:100%!important;display:flex!important}
body.of-phone #flight .telemetry.of-open .power-routes button,
body.of-land #flight .telemetry.of-open .power-routes button{flex:1;min-height:44px!important;min-width:44px!important;font-size:11px}
body.of-phone #ofStrip,
body.of-land #ofStrip{position:fixed!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;top:96px!important;left:12px!important;right:64px!important;width:auto!important;height:44px!important;min-height:44px!important;padding:2px 4px;background:#07131f;border-color:#486069;z-index:5;overflow:hidden;letter-spacing:0;font:11px/1.25 monospace}
body.of-phone #ofStrip .of-cell,
body.of-land #ofStrip .of-cell{display:flex!important;flex-direction:column;justify-content:flex-start;min-width:0!important;height:38px!important;overflow:hidden;color:inherit;text-align:left}
body.of-phone #ofStrip .of-cell :is(span,b),
body.of-land #ofStrip .of-cell :is(span,b){display:block!important;font:11px/11px monospace;white-space:nowrap}
body.of-phone #ofStrip i,
body.of-land #ofStrip i{display:block!important;position:relative!important;width:100%!important;height:3px!important;margin-top:auto;background:#263e47}
body.of-phone #ofStrip i::after,
body.of-land #ofStrip i::after{content:'';position:absolute!important;inset:0 auto 0 0!important;width:var(--of-fill)!important;height:3px!important;background:currentColor}
body.of-phone #ofRoute,
body.of-land #ofRoute{position:fixed!important;top:10px!important;left:112px!important;right:auto!important;bottom:auto!important;width:44px!important;height:44px!important;padding:2px;font:11px monospace;z-index:6;background:#07131f}
body.of-phone #ofRoute.of-callout,
body.of-land #ofRoute.of-callout{outline:2px solid #ffd24a;outline-offset:2px}
body.of-phone #ofRoutePop,
body.of-land #ofRoutePop{position:fixed!important;top:58px!important;left:112px!important;width:192px!important;display:flex!important;gap:4px;padding:2px;background:#07131f;border:1px solid #ffd24a;z-index:14}
body.of-phone #ofRoutePop button,
body.of-land #ofRoutePop button{width:44px!important;height:44px!important;min-width:44px!important;padding:1px;font:11px monospace}
body.of-phone #flight .objective,
body.of-land #flight .objective{position:fixed!important;left:12px!important;right:12px!important;top:58px!important;bottom:auto!important;max-width:none!important;height:34px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:16px 16px;gap:2px 6px;padding:0;font:11px/16px monospace;overflow:hidden}
body.of-phone #flight .objective #objective,
body.of-land #flight .objective #objective{grid-column:1/-1;grid-row:1;display:block!important;min-width:0!important;max-width:none!important;margin:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:11px/16px monospace}
body.of-phone #flight .objective .operation-heading,
body.of-land #flight .objective .operation-heading{grid-column:1;grid-row:2;display:block!important;min-width:0!important;padding:0;margin:0}
body.of-phone #flight .objective #opName,
body.of-land #flight .objective #opName{display:block!important;min-width:0!important;padding:0;color:#9db5b9;font:11px/16px monospace}
body.of-phone #flight .objective #missionTimer,
body.of-land #flight .objective #missionTimer{position:static!important;display:block!important;grid-column:2;grid-row:2;margin:0;padding:0;color:#9db5b9;font:11px/16px monospace}
body.of-phone #flight .objective :is(#xpMeter,#shipLevel,#fieldHint,#lootTally,#formUpLine),
body.of-land #flight .objective :is(#xpMeter,#shipLevel,#fieldHint,#lootTally,#formUpLine){display:none!important}
body.of-phone #flight #comms,
body.of-land #flight #comms{position:fixed!important;left:12px!important;right:12px!important;top:144px!important;bottom:auto!important;width:auto!important;max-width:none!important;height:48px!important;min-height:48px!important;max-height:48px!important;display:flex!important;gap:6px;align-items:center;padding:1px 50px 1px 4px!important;transform:none;overflow:hidden!important;background:#07131f;z-index:7;border:1px solid #658781;border-radius:4px;box-shadow:none}
body.of-phone #flight #commPortrait,
body.of-land #flight #commPortrait{display:block!important;width:32px!important;height:32px!important;flex:0 0 32px}
body.of-phone #flight #commPortrait .portrait,
body.of-land #flight #commPortrait .portrait{display:block!important;width:32px!important;height:32px!important;margin:0}
body.of-phone #flight #comms>div:last-of-type,
body.of-land #flight #comms>div:last-of-type{display:block!important;min-width:0!important;width:auto!important;flex:1 1 0}
body.of-phone #flight #comms #speaker,
body.of-land #flight #comms #speaker{display:inline!important;font:bold 11px/14px monospace;letter-spacing:0;text-transform:none;margin-right:4px}
body.of-phone #flight #comms #ofPage,
body.of-land #flight #comms #ofPage{display:inline!important;font:11px/14px monospace;letter-spacing:0;color:#dce7e2;text-transform:none}
body.of-phone #flight #comms #line,
body.of-land #flight #comms #line{display:none!important}
body.of-phone #flight #comms .comms-controls,
body.of-land #flight #comms .comms-controls{position:absolute!important;right:1px!important;top:1px!important;display:flex!important;width:44px!important;height:44px!important;margin:0;gap:0}
body.of-phone #flight #comms .comms-controls button,
body.of-land #flight #comms .comms-controls button{display:none!important;width:44px!important;height:44px!important;min-height:44px!important;padding:1px;font:11px monospace}
body.of-phone #flight #comms .comms-controls [data-story-action=skip],
body.of-land #flight #comms .comms-controls [data-story-action=skip]{display:block!important}
body.of-phone:has(#flight:not([hidden])) #notice,
body.of-phone:has(#flight:not([hidden])) #flight #objCallout,
body.of-phone:has(#flight:not([hidden])) #flight #onboarding,
body.of-phone:has(#flight:not([hidden])) #flight #jumpCue,
body.of-land:has(#flight:not([hidden])) #notice,
body.of-land:has(#flight:not([hidden])) #flight #objCallout,
body.of-land:has(#flight:not([hidden])) #flight #onboarding,
body.of-land:has(#flight:not([hidden])) #flight #jumpCue{position:fixed!important;left:12px!important;right:12px!important;top:var(--of-item-top,144px)!important;bottom:auto!important;width:auto!important;max-width:none!important;height:48px!important;min-height:0!important;max-height:48px!important;display:flex!important;align-items:center;gap:6px;margin:0;padding:4px 6px;transform:none;overflow:hidden;background:#07131f;border:1px solid #486069;border-radius:4px;box-shadow:none;animation:none;font:11px/15px monospace;letter-spacing:0;text-align:left;white-space:normal;z-index:6}
body.of-phone #onboardingText,
body.of-land #onboardingText{display:block!important;max-height:30px!important;overflow:auto;font:11px/15px monospace}
body.of-phone #skipTutorial,
body.of-land #skipTutorial{height:44px!important;min-width:44px!important;flex:none;padding:2px;margin:0;font:11px monospace}
body.of-phone:has(#flight:not([hidden])) #flight #jumpCue,
body.of-land:has(#flight:not([hidden])) #flight #jumpCue{font-size:0}
body.of-phone #flight #jumpCue :is(.jc-text,.jc-chev),
body.of-land #flight #jumpCue :is(.jc-text,.jc-chev){display:none!important}
body.of-phone #flight #jumpCue .of-cue,
body.of-land #flight #jumpCue .of-cue{display:block!important;font:11px/15px monospace;color:#ffd24a}
body.of-phone #flight #comms.of-open,
body.of-land #flight #comms.of-open{top:144px!important;left:12px!important;right:12px!important;height:auto!important;max-height:max(160px,calc(46vh - 192px))!important;display:flex!important;padding:10px!important;overflow:auto!important;align-items:flex-start;z-index:13}
body.of-phone #flight #comms.of-open #line,
body.of-land #flight #comms.of-open #line{display:block!important;font:12px/1.5 monospace;white-space:normal}
body.of-phone #flight #comms.of-open #ofPage,
body.of-land #flight #comms.of-open #ofPage{display:none!important}
body.of-phone #flight #comms.of-open .comms-controls,
body.of-land #flight #comms.of-open .comms-controls{position:static!important;display:flex!important;width:auto!important;height:auto!important;margin-top:6px;gap:6px}
body.of-phone #flight #comms.of-open .comms-controls button,
body.of-land #flight #comms.of-open .comms-controls button{display:block!important;width:auto!important;min-width:44px!important}
body.of-phone #flight .battle-actions{position:fixed!important;left:12px!important;right:12px!important;top:auto!important;bottom:164px!important;width:auto!important;height:44px!important;display:flex!important;flex-wrap:nowrap;gap:6px;transform:none}
body.of-phone #flight .battle-actions button,
body.of-land #flight .battle-actions button{height:44px!important;min-width:44px!important;flex:1;padding:2px;font:11px monospace}
body.of-phone #flight .battle-actions :is(#auto,#orders,#power,#brakeKey,#boostKey),
body.of-land #flight .battle-actions :is(#auto,#orders,#power,#brakeKey,#boostKey){display:none!important}
body.of-phone #flight .battle-actions #more,
body.of-land #flight .battle-actions #more{display:block!important;font-size:20px}
body.of-phone #flight :is(#stick,#aimStick){position:fixed!important;top:auto!important;bottom:72px!important;width:72px!important;height:80px!important;margin:0}
body.of-phone #flight #stick{left:12px!important;right:auto!important}
body.of-phone #flight #aimStick{right:12px!important;left:auto!important;width:clamp(48px,calc(100vw - 256px),72px)!important}
body.of-phone #flight :is(#knob,#aimKnob),
body.of-land #flight :is(#knob,#aimKnob){left:calc(50% - 19px)!important;top:calc(50% - 19px)!important;width:38px!important;height:38px!important}
body.of-phone #flight #fire,
body.of-phone #flight #turnLeft,
body.of-phone #flight #turnRight{position:fixed!important;top:auto!important;bottom:90px!important;width:44px!important;height:44px!important;min-height:44px!important;padding:2px;font:11px monospace}
body.of-phone #flight #fire{bottom:88px!important;width:48px!important;height:48px!important;min-height:48px!important}
body.of-phone #flight #fire{left:92px!important;right:auto!important}
body.of-phone #flight #turnLeft{left:144px!important;right:auto!important}
body.of-phone #flight #turnRight{left:192px!important;right:auto!important}
body.of-phone #flight :is(#boost,#brake,#mineState,#formUp){position:fixed!important;top:auto!important;bottom:12px!important;height:44px!important;min-height:44px!important;transform:none;padding:2px;margin:0;font:11px/14px monospace;white-space:normal}
body.of-phone #flight #boost{left:12px!important;right:auto!important;width:64px!important}
body.of-phone #flight #brake{left:84px!important;right:auto!important;width:72px!important}
body.of-phone #flight #mineState{left:164px!important;right:auto!important;width:calc((100vw - 184px)/2)!important}
body.of-phone #flight #formUp{left:auto!important;right:12px!important;width:calc((100vw - 184px)/2)!important}
body.of-land #ofStrip{left:112px!important;right:auto!important;top:10px!important;width:clamp(144px,calc(100vw - 636px),208px)!important}
body.of-land #ofRoute{left:calc(116px + clamp(144px,calc(100vw - 636px),208px))!important}
body.of-land #ofRoutePop{left:calc(116px + clamp(144px,calc(100vw - 636px),208px))!important}
body.of-land #flight .objective{left:12px!important;right:auto!important;width:184px!important}
body.of-land:has(#flight:not([hidden])) #flight #comms,
body.of-land:has(#flight:not([hidden])) #notice,
body.of-land:has(#flight:not([hidden])) #flight #objCallout,
body.of-land:has(#flight:not([hidden])) #flight #onboarding,
body.of-land:has(#flight:not([hidden])) #flight #jumpCue{left:calc(164px + clamp(144px,calc(100vw - 636px),208px))!important;right:163px!important;top:10px!important;height:44px!important;max-height:44px!important;min-height:0!important}
body.of-land #flight #commPortrait{display:none!important}
body.of-land:has(#flight:not([hidden])) #flight #comms.of-open{left:204px!important;right:212px!important;top:60px!important;height:auto!important;min-height:0!important;max-height:calc(100vh - 72px)!important}
body.of-land #flight .telemetry.of-open{top:60px!important;max-height:calc(100vh - 72px)!important}
body.of-land #flight .battle-actions{position:fixed!important;left:auto!important;right:140px!important;top:100px!important;bottom:auto!important;width:64px!important;height:auto!important;display:flex!important;flex-direction:column;flex-wrap:nowrap;gap:4px;transform:none}
body.of-land #flight :is(#stick,#aimStick){position:fixed!important;top:auto!important;bottom:12px!important;width:72px!important;height:72px!important}
body.of-land #flight #stick{left:12px!important;right:auto!important}
body.of-land #flight #aimStick{right:12px!important;left:auto!important}
body.of-land #flight :is(#turnLeft,#turnRight){position:fixed!important;top:auto!important;bottom:12px!important;width:48px!important;height:48px!important;padding:2px}
body.of-land #flight #turnLeft{left:92px!important;right:auto!important}
body.of-land #flight #turnRight{left:148px!important;right:auto!important}
body.of-land #flight #fire{position:fixed!important;top:auto!important;bottom:12px!important;left:auto!important;right:92px!important;width:48px!important;height:48px!important;padding:2px;font:11px monospace}
body.of-land #flight :is(#boost,#brake,#mineState,#formUp){position:fixed!important;left:auto!important;top:auto!important;width:80px!important;height:44px!important;min-height:44px!important;padding:2px;margin:0;transform:none;font:11px/14px monospace;white-space:normal}
body.of-land #flight #boost{right:12px!important;bottom:92px!important}
body.of-land #flight #brake{right:12px!important;bottom:144px!important}
body.of-land #flight #mineState{right:104px!important;bottom:68px!important}
body.of-land #flight #formUp{right:104px!important;bottom:16px!important}
body.of-phone #flight .telemetry.of-open>:is(.reactor-row,.hull-row,.mass-row,.shield-row),
body.of-land #flight .telemetry.of-open>:is(.reactor-row,.hull-row,.mass-row,.shield-row){display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:baseline;gap:2px 6px;width:auto!important;min-width:0!important;margin:0!important;padding:0!important}
body.of-phone #flight .telemetry.of-open>div>span,
body.of-land #flight .telemetry.of-open>div>span{font:11px/16px monospace;letter-spacing:0}
body.of-phone #flight .telemetry.of-open>div>b,
body.of-land #flight .telemetry.of-open>div>b{text-align:right;font:12px/16px monospace;letter-spacing:0;white-space:nowrap}
body.of-phone #flight .telemetry.of-open>div>:is(meter,p),
body.of-land #flight .telemetry.of-open>div>:is(meter,p){grid-column:1/-1;width:100%!important;margin:0!important}
body.of-phone #flight .telemetry.of-open>:is(#regen,.power-routes),
body.of-land #flight .telemetry.of-open>:is(#regen,.power-routes){grid-column:1/-1}
body.of-pad #flight #comms{left:20px!important;right:auto!important;top:var(--of-panel-bottom,278px)!important;bottom:auto!important;width:var(--of-pad-comms-w,min(360px,calc(100vw - 40px)))!important;max-width:360px!important;max-height:var(--of-pad-comms-max,180px)!important;overflow:hidden!important}
body.of-pad #flight #comms>div:last-of-type{display:flex!important;flex-direction:column;min-width:0!important;min-height:0!important;max-height:calc(var(--of-pad-comms-max,180px) - 22px)!important}
body.of-pad #flight #comms #line{flex:0 1 auto;min-height:0!important;overflow-y:auto!important;scrollbar-width:none}
body.of-pad #flight #comms .comms-controls{flex:none}
body.of-pad #viewName{display:none!important}
body.of-pad #flight #aimStick{bottom:146px!important}
body.of-pad:has(#flight:not([hidden])) #notice{top:var(--of-pad-notice-top,var(--of-objective-bottom,180px))!important;bottom:auto!important;left:var(--of-pad-notice-left,50%)!important;right:auto!important;width:var(--of-pad-notice-w,min(360px,calc(100vw - 48px)))!important;max-width:360px!important;transform:none!important}
body.of-pad #zoom button{min-width:44px!important;min-height:44px!important}
body.of-phone #flight [hidden],
body.of-phone #notice[hidden],
body.of-phone #flight .of-wait,
body.of-phone #notice.of-wait,
body.of-phone #flight #comms.of-yield,
body.of-land #flight [hidden],
body.of-land #notice[hidden],
body.of-land #flight .of-wait,
body.of-land #notice.of-wait,
body.of-land #flight #comms.of-yield{display:none!important}
body.of-phone #flight #jump.glow,
body.of-land #flight #jump.glow{animation:none}
body.of-phone #ofStrip .of-cell small,body.of-land #ofStrip .of-cell small{display:block!important;font:11px/11px monospace;margin:0;color:inherit}
body.of-land #flight #fire{top:100px!important;bottom:auto!important;right:90px!important}
body.of-land #flight #boost{right:116px!important;bottom:92px!important}
body.of-land #flight #brake{right:116px!important;bottom:40px!important}
body.of-land #flight #mineState{right:12px!important;bottom:148px!important}
body.of-land #flight #formUp{right:12px!important;bottom:100px!important}
body.of-land #flight :is(#mineState,#formUp){width:100px!important}
body.of-phone #flight :is(#mineState,#formUp),body.of-land #flight :is(#mineState,#formUp){line-height:13px!important;overflow:hidden}
body.of-phone #flight #comms:not(.of-open)>div:last-of-type,body.of-land #flight #comms:not(.of-open)>div:last-of-type{display:grid!important;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:4px}
body.of-phone #flight #comms:not(.of-open) #speaker,body.of-land #flight #comms:not(.of-open) #speaker{grid-column:1;max-width:70px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}
body.of-phone #flight #comms:not(.of-open) #ofPage,body.of-land #flight #comms:not(.of-open) #ofPage{grid-column:2;display:block!important;min-width:0!important;font:11px/14px system-ui}
body.of-phone:has(#flight:not([hidden])) #flight :is(#comms,#jumpCue,#objCallout,#onboarding,#ofStrip,#ofRoute,#ofRoutePop)[hidden],
body.of-phone:has(#flight:not([hidden])) #flight :is(#jumpCue,#objCallout,#onboarding).of-wait,
body.of-phone:has(#flight:not([hidden])) #flight #comms.of-yield,
body.of-phone:has(#flight:not([hidden])) #notice:is([hidden],.of-wait),
body.of-land:has(#flight:not([hidden])) #flight :is(#comms,#jumpCue,#objCallout,#onboarding,#ofStrip,#ofRoute,#ofRoutePop)[hidden],
body.of-land:has(#flight:not([hidden])) #flight :is(#jumpCue,#objCallout,#onboarding).of-wait,
body.of-land:has(#flight:not([hidden])) #flight #comms.of-yield,
body.of-land:has(#flight:not([hidden])) #notice:is([hidden],.of-wait){display:none!important}
body.of-phone:has(#flight:not([hidden])) #overlay:not([hidden])~#notice,
body.of-land:has(#flight:not([hidden])) #overlay:not([hidden])~#notice,
body.of-pad:has(#flight:not([hidden])) #overlay:not([hidden])~#notice{top:14px!important;bottom:auto!important}
/* end open field */
/* roles 1 */
.hull-trait{display:block;font-size:11px;line-height:1.5}.yard-group{font-weight:700;letter-spacing:2px;margin:20px 0 10px}#yardAbilityCards .card{min-height:44px}#guard,#mark,#pod{min-width:44px;min-height:44px}#guard[hidden],#mark[hidden],#pod[hidden],#repairChip[hidden]{display:none!important}
#repairChip{position:fixed;left:calc(50% + 105px);bottom:calc(max(62px,env(safe-area-inset-bottom) + 62px) + 60px);z-index:4;display:block;min-height:44px;font:11px/1.3 monospace;letter-spacing:.5px;padding:6px 10px;white-space:nowrap;border-color:#78ecdc;color:#78ecdc;background:#10212dee}
body.touch #repairChip{min-width:44px}body.of-phone #flight #repairChip{left:164px;right:12px;bottom:60px;max-width:calc(100vw - 176px);white-space:normal}body.of-land #flight #repairChip{left:auto;right:116px;bottom:148px;width:100px;white-space:normal}
/* gate: the rank pips are styled only inside #yardUpgradeCards, so an ability card showed no rank at all */
#yardAbilityCards .rank-pips{display:flex;gap:5px;margin:5px 0 8px}#yardAbilityCards .rank-pip{display:inline-block;width:12px;height:12px;border:2px solid var(--teal);background:transparent}#yardAbilityCards .rank-pip.filled{background:var(--teal)}
/* gate: three ability buttons widened the desktop band from 1,001 to 1,340 px (BOOST and Power were cut on a 1280 screen). While one shows, keys sit under the name up to 1,500 px (as 3.9.3 does under 1,190), and under 1,180 px the band packs tighter: 1,040 px at 1280, 795 px at 1024 */
@media(min-width:601px) and (max-width:1500px) and (min-height:451px){.battle-actions:has(:is(#guard,#mark,#pod):not([hidden])) button small{display:block;margin:2px 0 0}}
@media(min-width:601px) and (max-width:1180px) and (min-height:451px){.battle-actions:has(:is(#guard,#mark,#pod):not([hidden])){gap:4px}.battle-actions:has(:is(#guard,#mark,#pod):not([hidden])) button{min-width:0;padding-left:7px;padding-right:7px}}
/* gate (seat ruling 2): on a phone the repair words are two short lines (REPAIRING 76 % / tap to stop, no ship name); Guard ON 10s / Marked 12s / Pods out 2/4 wrap to two */
body.of-phone #flight #mineState[data-job=repair],body.of-land #flight #mineState[data-job=repair]{white-space:pre-line!important;font-size:10px!important;letter-spacing:0!important}
body.of-phone #flight :is(#guard,#mark,#pod),body.of-land #flight :is(#guard,#mark,#pod){white-space:normal;overflow:hidden;line-height:1.15;padding-left:2px;padding-right:2px}
/* end roles 1 */
/* small fixes: one mining pointer with JUMP's weight and glow.
   Gate (real browser): inside the band it pushed both ends of the band off a 1280 px screen and JUMP slid sideways when it stepped down,
   so on desktop it stands on the band's left end, straight above JUMP. Phone: it shares the JUMP row. Landscape phone: left of JUMP. */
#flight #mineOpportunity{position:absolute;left:0;bottom:calc(100% + 7px);display:flex;align-items:center;justify-content:center;min-height:44px;padding:4px 14px;border:1px solid #a9ded5;border-radius:4px;background:#26534c;color:#ffd24a;font:700 13px/1.2 monospace;white-space:nowrap;pointer-events:none}
#flight #mineOpportunity.glow{border-color:#ffd24a;color:#ffd24a;box-shadow:0 0 8px #ffd24a;animation:none}
#flight #mineOpportunity[hidden]{display:none!important}
body.of-phone #flight #mineOpportunity{position:static;flex:2 1 0;min-width:0;padding:2px 4px;font-size:11px;line-height:13px;white-space:normal;text-align:center;overflow:hidden}
body.of-land #flight #mineOpportunity{left:auto;bottom:auto;right:70px;top:0;width:190px;height:44px;padding:2px 4px;font-size:11px}
/* touch tablets: sticks and turn buttons stand above the band's left end, so the pointer goes inside the band, beside JUMP. A narrow
   tablet makes room the way phones do: Missile and Pulse leave the band while the sector is clear. */
body.of-pad #flight #mineOpportunity{position:static;min-height:0}
@media(max-width:900px){body.of-pad #flight.sector-clear :is(#missile,#pulse){display:none}}
@media(max-width:700px){body.of-pad #flight #mineOpportunity{width:150px;white-space:normal;text-align:center;font-size:12px}}
/* small fixes (gate): two keys per button made the desktop band 1,166 px wide (it was 920) and cut JUMP off below that width.
   Under 1,190 px the keys sit under the name (as BOOST already does), so the band fits a 1,024 px screen again and no key is hidden. */
@media(min-width:601px) and (max-width:1190px) and (min-height:451px){.battle-actions button small{display:block;margin:2px 0 0}}
/* small fixes: the two dock choices say what each one does. The helper line is drawn from data-help under the label. */
:is(#overlay,.helm-exit) :is(#dialogActions,.helm-copy-dialogActions)>button[data-help]::after{content:attr(data-help);display:block;margin-top:3px;font:400 11px/1.25 system-ui,-apple-system,sans-serif;letter-spacing:0;white-space:normal;opacity:.85}
/* small fixes: the Shipyard wallet says what each number is. The words come from data-cap (app.js reads the one real cap, YARD.cap) and
   give way to "need N". On phones they sit on the line each chip already keeps for "need N", so nothing moves. */
#overlay[data-kind=builder] .yard-chip::after{content:attr(data-cap-long);margin-left:auto;font:400 11px/1.2 monospace;letter-spacing:0;color:#9db5b9;white-space:nowrap}
#overlay[data-kind=builder] .yard-chip[data-short=true]::after{content:none}
@media(max-width:1023px){#overlay[data-kind=builder] .yard-chip::after{content:attr(data-cap)}}
@media(max-width:600px){#overlay[data-kind=builder] .yard-chip::after{margin-left:0}}
/* a 320 px phone wrapped the coin above SALVAGE and used up the spare line: keep each name on one line there so the words fit without moving anything */
@media(max-width:359px){#overlay[data-kind=builder] .yard-chip-name{white-space:nowrap}#overlay[data-kind=builder] .yard-chip b{font-size:13px}}

/* economy a */
.wallet-group{display:inline-block;white-space:nowrap;margin-right:12px;margin-bottom:6px}
.wallet-group small{display:block;font-size:10px;letter-spacing:1px}
.wallet-group em{font-style:normal;font-size:11px}
#holdLine .hold-full{font:11px/1.3 system-ui,-apple-system,sans-serif;letter-spacing:.2px}
/* end economy a */
