*{box-sizing:border-box}body{margin:0;background:#080e18;color:#dbe6f3;font:14px/1.5 system-ui,sans-serif}header{padding:16px 28px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #233144}small,.eyebrow,.map-heading,.build{font-size:10px;letter-spacing:1.6px;color:#819bb5}h1{font-size:23px;letter-spacing:-.7px;margin:3px 0}h2{font-size:22px;font-weight:500;margin:8px 0}button{font:inherit;color:#daebf6;background:#16283a;border:1px solid #33516c;border-radius:5px;padding:9px 13px;cursor:pointer}button:hover:enabled{background:#24415a;border-color:#70cbbb}button:focus-visible{outline:2px solid #83e3d0;outline-offset:3px}button:disabled{opacity:.42;cursor:default}[hidden]{display:none!important}.bridge{padding:14px 28px;border-bottom:1px solid #233144;background:#0b1421}.crew-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;max-width:1500px;margin:auto}.crew{display:flex;text-align:left;align-items:center;gap:12px;padding:10px 14px;background:#101e2d}.crew[aria-expanded=true]{border-color:#70cbbb;background:#152d37}.crew strong,.crew small{display:block}.crew small{letter-spacing:.5px;margin-top:2px}.portrait{background:#234750;color:#a5e7d4;padding:10px;border-radius:50%;font-size:12px}.nav{background:#343650;color:#c5c6ff}.eng{background:#51412c;color:#ffdb9d}.arrow{margin-left:auto}.orders{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;max-width:1500px;margin:12px auto 0;padding:12px 0 2px}.orders>div{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start}.orders p{font-size:12px;color:#92a8bc;margin:0 0 8px}.orders button{background:#234c4b;font-size:12px}main{display:grid;grid-template-columns:minmax(0,1fr) 330px;max-width:1556px;margin:auto}.map-panel{padding:20px 22px;min-width:0}.map-heading{display:flex;justify-content:space-between;margin-bottom:12px}#game{aspect-ratio:900/620;width:100%;overflow:hidden;border:1px solid #203245;border-radius:8px;background:#080f1d}#game canvas{display:block}#guidance{font-size:12px;color:#a7c3d6;margin:12px 0}.task{padding:13px 15px;border:1px solid #24384b;border-radius:6px;background:#0d1927}.task p{font-size:12px;color:#92a8bc;margin:6px 0 0}progress{display:block;width:100%;height:6px;accent-color:#80ddc9;margin:9px 0}aside{border-left:1px solid #233144;background:#0b1420}.target,.cargo-panel{padding:20px}.target{border-bottom:1px solid #263548;min-height:180px}.target p{font-size:13px;color:#a1b5c8}.facts{font-size:12px;margin:14px 0 0;padding:0;list-style:none}.facts li{padding:6px 0;border-top:1px solid #1e3041;color:#99bdcf}.panel-heading,.weight-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}.panel-heading>span:last-child,.weight-heading span{font-size:11px;color:#819bb5}.weight-heading{margin-top:12px}.weight-heading strong{color:#a5e6d3;font-size:18px}.muted,.log-note{font-size:11px;color:#819bb5}#cargo{list-style:none;padding:0;margin:14px 0 0}#cargo li{background:#101e2d;border:1px solid #2b4656;border-radius:6px;padding:12px;margin-top:10px}#cargo .item-heading{display:flex;justify-content:space-between;gap:8px}#cargo strong{font-size:13px}#cargo .item-weight{white-space:nowrap;color:#a8dacd;font-size:12px}#cargo p{font-size:12px;color:#92a8bc;margin:6px 0 0}.tag{display:inline-block;margin-top:8px;font-size:10px;color:#d9ca9e;letter-spacing:.5px}footer{border-top:1px solid #233144;padding:18px 28px;position:relative}#reports{padding:0;list-style:none;font-size:12px;color:#a6bbce;max-height:230px;overflow:auto;margin-bottom:0}#reports li{display:grid;grid-template-columns:145px 1fr;gap:12px;padding:8px 0;border-bottom:1px solid #18283a}.log-label{font-size:10px;letter-spacing:.6px;color:#708fa9}#reports [data-category=cargo]{color:#a3e8ce}#reports [data-category=discovery],#reports [data-category=research]{color:#e7c998}.build{position:absolute;right:28px;top:18px;color:#536e87}@media(min-width:1250px){#game{max-height:540px;aspect-ratio:auto;height:540px}}@media(max-width:800px){main{grid-template-columns:1fr}aside{border-left:0;border-top:1px solid #233144;display:grid;grid-template-columns:1fr 1fr}.target{border-bottom:0;border-right:1px solid #263548}.crew{padding:8px;gap:7px}.portrait{display:none}.orders{gap:10px}.bridge{padding:12px 16px}.map-panel{padding:16px}header{padding:14px 16px}h1{font-size:19px}.build{display:none}}@media(max-width:520px){.crew-row{gap:6px}.crew strong{font-size:12px}.crew small{font-size:9px;letter-spacing:0}.arrow{display:none}.orders{grid-template-columns:1fr}.orders>div{flex-direction:row;align-items:center;gap:10px}.orders p{max-width:50%;margin:0}.orders button{max-width:50%}aside{display:block}.target{border-right:0;border-bottom:1px solid #263548}header button{font-size:11px;padding:7px}#reports li{grid-template-columns:1fr;gap:3px}}
.map-objects{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.map-objects button{font-size:11px;padding:5px 10px}#destinations{display:flex;gap:8px}#destinations button[aria-pressed=true]{border-color:#83e3d0;color:#83e3d0}
#defense-panel{border:1px solid #96594e;background:#281b22;padding:12px 15px;border-radius:6px;margin-bottom:12px}#defense-panel strong{font-size:12px;letter-spacing:1px;color:#ffd0ad}#defense-panel p{font-size:12px;color:#e6bfb3;margin:7px 0}.defense-actions{display:flex;gap:8px}.defense-actions button{font-size:12px}#reports [data-category=combat]{color:#edb0a0}#hull-label{color:#9fe0cc}
.crew-row{grid-template-columns:repeat(4,minmax(0,1fr))}.tac{background:#512f3a;color:#f0b6bc}#tactical-orders button[aria-pressed=true]{border-color:#8ddfc9;color:#8ddfc9}@media(max-width:800px){.crew-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
.commander{position:sticky;top:0;z-index:5;padding:12px 28px;background:#10222e;border-bottom:1px solid #426556;box-shadow:0 3px 12px #0005}.command-heading{display:flex;gap:16px;align-items:center;margin-bottom:9px}.command-heading strong{font-size:13px;color:#b5e6d7}#command-actions{display:flex;gap:8px;flex-wrap:wrap}#command-actions button{display:flex;flex-direction:column;align-items:flex-start;min-width:110px;padding:8px 12px}#command-actions strong{font-size:12px}#command-actions small{font-size:10px;letter-spacing:.5px;margin-top:2px}#command-actions .recommended{border-color:#86dfc6;background:#254c48}#command-hint{font-size:12px;color:#adc3d0;margin:8px 0 0}.crew{position:relative;padding-bottom:26px}.crew-duty{position:absolute;bottom:5px;left:14px;font-size:10px;color:#8cbfae;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:520px){.commander{position:static;padding:12px 16px}#command-actions button{min-width:95px;flex:1}.crew-duty{left:8px}}
.crew-station{min-width:0}.crew-station>.crew{width:100%;height:80px}.crew-bubble-space{min-height:116px;padding-top:10px}.crew-bubble{position:relative;border:1px solid #598e91;border-radius:12px;padding:9px 12px;background:#19313e;color:#e3f3f4;font-size:12px;line-height:1.45;overflow-wrap:anywhere}.crew-bubble:before{content:"";position:absolute;top:-6px;left:24px;width:10px;height:10px;background:#19313e;border-top:1px solid #598e91;border-left:1px solid #598e91;transform:rotate(45deg)}.bubble-label{display:block;font-size:9px;letter-spacing:.7px;text-transform:uppercase;color:#9bd8cb;margin-bottom:4px}.bubble-words{display:block}.crew-bubble.thought{border-style:dashed;border-color:#4a647d;border-radius:20px;background:#101e2d;color:#a7bbce;font-style:italic}.crew-bubble.thought:before{border:1px solid #4a647d;border-radius:50%;background:#101e2d;width:7px;height:7px;top:-9px;transform:none}.crew-bubble.thought .bubble-label{color:#819bb5;font-style:normal}@media(max-width:520px){.crew-bubble-space{min-height:142px}.crew-bubble{font-size:11px;padding:8px}.crew-station>.crew{height:76px}}
#cargo li{padding:0;overflow:hidden}#cargo .cargo-item{display:block;width:100%;text-align:left;border:1px solid transparent;background:transparent;border-radius:6px;padding:12px}#cargo .cargo-item[aria-pressed=true]{border-color:#86dfc6;background:#203d43}#cargo .cargo-item:hover:enabled{background:#1a3342}#cargo .cargo-item:focus-visible{outline-offset:-3px}#destinations{flex-wrap:wrap}
/* Keep captain's commands beside the sector, giving the map the top of the workspace. */
main{grid-template-columns:190px minmax(0,1fr) 300px;align-items:start}
.commander{position:sticky;top:12px;z-index:2;padding:18px 14px;border-bottom:0;border-right:1px solid #426556;box-shadow:none;min-width:0;max-height:calc(100dvh - 24px);overflow-y:auto}
.command-heading{flex-direction:column;align-items:flex-start;gap:8px;margin-bottom:14px}
.command-heading .eyebrow{font-size:9px;letter-spacing:1px}
.command-heading strong{overflow-wrap:anywhere}
#command-actions{flex-direction:column;flex-wrap:nowrap}
#command-actions button{width:100%;min-width:0}
#command-hint{margin-top:14px;line-height:1.6}
#game{height:auto;max-height:none;aspect-ratio:900/620}
.map-heading{gap:8px;flex-wrap:wrap}
@media(max-width:1100px) and (min-width:901px){main{grid-template-columns:165px minmax(0,1fr) 260px}.map-panel{padding:16px 12px}.target,.cargo-panel{padding:16px}}
@media(max-width:900px){main{grid-template-columns:165px minmax(0,1fr)}main>aside{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;border-left:0;border-top:1px solid #233144}.target{border-right:1px solid #263548;border-bottom:0}}
@media(max-width:600px){main{grid-template-columns:minmax(0,1fr)}.commander{position:static;max-height:none;border-right:0;border-bottom:1px solid #426556;padding:12px 16px}.command-heading{flex-direction:row;flex-wrap:wrap;align-items:center;margin-bottom:9px}#command-actions{flex-direction:row;flex-wrap:wrap}#command-actions button{width:auto;flex:1 1 120px}#command-hint{margin-top:8px}main>aside{display:block}.target{border-right:0;border-bottom:1px solid #263548}}
#credits{margin-left:auto;margin-right:20px;color:#e7cd8d;white-space:nowrap}#trade-window{width:min(880px,94vw);max-height:88dvh;overflow:auto;border:1px solid #659e99;border-radius:12px;background:#0e1d2b;color:#dbe6f3;padding:24px;box-shadow:0 20px 80px #000a}#trade-window::backdrop{background:#030913c9}.trade-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.trade-heading h2{margin:3px 0}#trade-balance{color:#b8edd6;font-weight:600}#trade-route{font-size:12px;color:#b0c7d8}#trade-feedback{min-height:42px;border-left:3px solid #8edbc3;padding:8px 12px;background:#18313b;font-size:12px}.trade-row{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:18px;border-top:1px solid #2d4256;padding:14px 0}.trade-row p{font-size:12px;color:#9db3c5;margin:5px 0}.trade-controls{display:grid;grid-template-columns:80px 1fr;align-items:end;gap:8px}.trade-controls label{font-size:10px;color:#a9bed0}.trade-controls input{display:block;width:100%;margin-top:4px;padding:8px;color:#e3eff7;background:#0a1520;border:1px solid #446379;border-radius:4px;font:inherit;font-size:13px}.trade-controls button{font-size:12px;min-height:37px}.trade-reason{grid-column:1/-1;color:#deb894;letter-spacing:0;font-size:10px}#reports [data-category=trade]{color:#e7cd8d}@media(max-width:600px){#trade-window{padding:16px}.trade-row{grid-template-columns:1fr;gap:8px}.trade-controls{grid-template-columns:90px 1fr}#credits{font-size:11px;margin-right:8px}}
#save-status{font-size:11px;color:#9ebdad;margin-left:16px;max-width:230px}.contract-panel{padding:12px;border:1px solid #536d77;border-radius:6px;margin:16px 0;background:#152b36}.contract-panel h3{margin:0}.contract-panel p{font-size:12px}#new-expedition{max-width:min(440px,92vw);background:#112333;color:#dbe6f3;border:1px solid #659e99;border-radius:10px;padding:24px}#new-expedition::backdrop{background:#030913c9}@media(max-width:700px){header{flex-wrap:wrap;gap:8px}#save-status{order:3;margin:0;max-width:none;width:100%}}
.map-controls{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:8px}.map-controls button{font-size:11px;padding:5px 9px}#zoom-level{font-size:11px;min-width:40px;text-align:center}#game{touch-action:none}
#sector-chart{width:min(540px,92vw);background:#112333;color:#dbe6f3;border:1px solid #659e99;border-radius:10px;padding:24px}#sector-chart::backdrop{background:#030913c9}#sector-chart-list{padding-left:20px}#sector-chart-list li{padding:10px 0;border-bottom:1px solid #365063}#sector-chart p{font-size:12px;color:#a6bfce}

/* Compact bridge: menus overlay the map, and silent crew reserve no bubble space. */
header{padding:7px 20px}h1{font-size:19px;margin:0}
.bridge{position:relative;padding:8px 20px;z-index:10}
.crew-row{gap:8px}.crew-station{position:relative}
.crew-station>.crew{height:58px;padding:6px 10px 19px;gap:8px}
.crew strong{font-size:12px}.crew small{font-size:9px}.portrait{padding:7px;font-size:10px}
.crew-duty{font-size:9px;bottom:3px;left:10px}
.crew-bubble-space{min-height:0;padding-top:4px}
.crew-bubble-space:has(.crew-bubble[hidden]){display:none}
.crew-bubble{font-size:11px;padding:6px 9px;line-height:1.35;max-height:74px;overflow:auto}
.bubble-label{margin-bottom:2px;font-size:8px}
.crew-orders{list-style:none;padding:0;margin:4px 0 0;height:65px;overflow:auto;font-size:11px;color:#b1c9d7}
.crew-orders li{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:3px 6px;border-bottom:1px solid #203245}
.crew-orders li.active-order{display:block;color:#9ee1cf;background:#162d37}
.crew-orders .queue-idle{color:#718ca2;border:0;font-size:10px}
.crew-orders button{padding:0 5px;font-size:12px;flex-shrink:0}
.crew-orders progress{margin:4px 0 1px;height:5px}
.bridge>.orders{position:absolute;top:100%;left:20px;right:20px;margin:0 auto;padding:12px;background:#102333;border:1px solid #598e91;border-radius:0 0 8px 8px;box-shadow:0 12px 24px #0009;max-height:260px;overflow:auto;gap:10px}
.orders p{font-size:11px;margin-bottom:5px}.orders button{padding:6px 9px}
body>.task{width:calc(100% - 40px);max-width:1516px;margin:5px auto;padding:7px 12px;display:grid;grid-template-columns:minmax(180px,1fr) minmax(220px,1fr);gap:3px 18px}
body>.task progress{display:none}body>.task p{margin:0;grid-column:1;font-size:11px}
#fuel-status{grid-column:2;grid-row:1/3;align-self:center;color:#b2e5d3;font-size:12px}
.map-panel{padding:10px 14px}.map-heading{margin-bottom:6px}.map-controls{margin-bottom:4px}
.map-panel>.muted{margin:3px 0 6px}.map-objects{margin-top:6px;gap:4px;max-height:52px;overflow:auto}
#guidance{margin:6px 0 0}.target,.cargo-panel{padding:12px}.target{min-height:0}h2{font-size:19px}
.commander{padding:12px 10px}footer{padding:8px 20px}.log-note{margin:3px 0}#reports{margin:4px 0 0;max-height:90px}#reports li{padding:4px 0}
#fuel-confirm{width:min(520px,92vw);background:#112333;color:#dbe6f3;border:1px solid #659e99;border-radius:10px;padding:24px}
#fuel-confirm::backdrop{background:#030913c9}#fuel-cost{color:#b2e5d3}#fuel-availability{font-size:13px;min-height:42px}
@media(min-width:901px) and (min-height:700px){
 body{height:100dvh;display:grid;grid-template-rows:auto auto auto minmax(240px,1fr) 122px;overflow:hidden}
 main{width:100%;min-height:0;height:100%;overflow:hidden}
 .map-panel{height:100%;min-height:0;display:flex;flex-direction:column}
 #game{flex:1;min-height:100px;height:auto;aspect-ratio:auto}
 main>aside{height:100%;overflow:auto}
 .commander{position:static;height:100%;max-height:100%;overflow:auto}
 footer{min-height:0}#reports{max-height:72px}
}
@media(max-width:900px){.crew-bubble-space{min-height:0}.crew-station>.crew{height:58px}.crew-orders{height:58px}}
@media(max-width:600px){body>.task{display:block}#fuel-status{margin-top:5px}.bridge>.orders{left:10px;right:10px}.bridge{padding:8px 10px}}
.crew-orders{height:auto;min-height:22px;max-height:82px}
#game{position:relative}#game canvas{position:absolute;left:0;top:0}
.map-panel>.muted{display:none}
#guidance{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px}
@media(min-width:901px) and (min-height:700px){body{grid-template-rows:auto auto auto minmax(240px,1fr) 98px}#reports{max-height:48px}}

/* Stable bridge footprint: floating dialogue and exactly three queue rows. */
.bridge{padding-top:24px}
.crew-orders{height:96px;min-height:96px;max-height:96px;overflow-y:auto;scrollbar-gutter:stable}
.crew-orders li{height:32px;min-height:32px;overflow:hidden;position:relative}
.crew-orders li>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.crew-orders li.active-order{white-space:nowrap;text-overflow:ellipsis;padding-bottom:10px}
.crew-orders progress{position:absolute;left:6px;right:6px;bottom:3px;width:calc(100% - 12px);margin:0}
.crew-bubble-space{position:absolute;min-height:0;height:0;padding:0;pointer-events:none}
.crew-bubble{position:fixed;z-index:50;max-height:calc(100dvh - 12px);overflow:hidden;box-shadow:0 5px 18px #0008;pointer-events:none}
.crew-bubble:before,.crew-bubble.thought:before{top:auto;bottom:-6px;transform:rotate(225deg)}
body>.task{height:56px;min-height:56px}
body>.task p,body>.task .eyebrow{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.map-objects{height:54px;min-height:54px}
.session-controls{display:flex;align-items:center;gap:16px;border-top:1px solid #233144;padding-top:6px;margin-top:6px;min-height:34px}
.session-controls h1{font-size:13px;letter-spacing:0}.session-controls small{display:none}
.session-controls #save-status{margin:0;width:auto;order:0;max-width:none;font-size:10px}
.session-controls #credits{margin-left:auto;margin-right:0;font-size:12px}
.session-controls #restart{font-size:11px;padding:4px 9px}
@media(min-width:901px) and (min-height:700px){body{grid-template-rows:auto auto minmax(240px,1fr) 134px}}
@media(max-width:600px){.session-controls{flex-wrap:wrap;gap:6px 12px}body>.task{height:80px;min-height:80px}}
#trade-window{height:min(680px,88dvh);max-height:88dvh;overflow:hidden}
#trade-window[open]{display:flex;flex-direction:column}
.trade-heading,.trade-tabs,#trade-balance,#trade-feedback{flex-shrink:0}
#trade-balance{font-size:12px;margin:10px 0}
.trade-tabs{display:flex;gap:8px;border-bottom:1px solid #365063;padding-bottom:8px}
.trade-tabs button{flex:1}
.trade-tabs [aria-selected=true]{background:#254c48;border-color:#86dfc6;color:#b5efde}
.trade-pages{min-height:0;overflow:auto;flex:1;scrollbar-gutter:stable}
#trade-feedback{font-size:12px;margin:8px 0;min-height:36px}
#contract-journal{width:min(720px,94vw);max-height:88dvh;overflow:auto;background:#112333;color:#dbe6f3;border:1px solid #659e99;border-radius:10px;padding:22px}
#contract-journal::backdrop{background:#030913c9}
.contract-panel>button,.contract-cancel button{margin:4px 8px 0 0;font-size:12px}
.contract-cancel{border-top:1px solid #8d7560;margin-top:12px;padding-top:4px}
#journal-feedback{color:#a5e6d3;font-size:12px}
#crew-manifest{width:min(820px,94vw);max-height:88dvh;overflow:auto;background:#112333;color:#dbe6f3;border:1px solid #659e99;border-radius:10px;padding:22px}
#crew-manifest::backdrop{background:#030913c9}
#manifest-people select{background:#16283a;color:#daebf6;padding:6px;border:1px solid #598e91;border-radius:4px}
#manifest-feedback{color:#a5e6d3}
.crew-orders{height:84px;min-height:84px;max-height:84px}
.crew-orders li{height:28px;min-height:28px}
.map-objects{height:32px;min-height:32px;align-items:flex-start}
#fuel-status{grid-row:1;font-size:11px}
#supply-status{grid-column:2;grid-row:2;font-size:11px;color:#b2e5d3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#supply-status.supply-warning{color:#ffca81}
@media(max-width:600px){body>.task{height:100px;min-height:100px}#supply-status{margin-top:4px}}
@media(min-width:901px) and (min-height:700px){
 html{height:100%;overflow:hidden}
 footer{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;overflow:hidden}
 footer #reports{min-height:0;max-height:none}
}
/* Small vertical meters keep both their labels and numeric readings. */
.stat-meter{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;color:#b2e5d3;min-width:0}
.stat-bar{display:inline-flex;position:relative;flex:0 0 9px;width:9px;height:20px;border:1px solid #537c82;border-radius:2px;background:#08131f;overflow:hidden}
.stat-bar i{position:absolute;bottom:0;left:0;right:0;background:#76d8bd;transition:height .2s linear}
.stat-warning{color:#ffca81}.stat-warning .stat-bar i{background:#edb361}
#fuel-status,#supply-status{display:flex;align-items:center;gap:12px;overflow:hidden;font-size:10px;line-height:1.1}
#fuel-status{grid-row:1;align-self:center}#supply-status{grid-row:2;align-self:center}
.crew-morale{position:absolute;right:26px;bottom:4px;font-size:9px;gap:4px}.crew-morale .stat-bar{height:13px;flex-basis:6px;width:6px}
@media(max-width:600px){#fuel-status,#supply-status{gap:8px}#supply-status{margin-top:5px}.stat-bar{height:17px}}
@media(prefers-reduced-motion:reduce){.stat-bar i{transition:none}}
.edge-pan-option{display:inline-flex;align-items:center;gap:4px;font-size:11px;white-space:nowrap;color:#adc3d0}.edge-pan-option input{accent-color:#76d8bd}
#trip-fuel-preview{padding:14px;border:1px solid #42616f;border-radius:7px;background:#0b1925;margin:16px 0}
.trip-fuel-heading{display:flex;justify-content:space-between;gap:12px;font-size:12px;margin-bottom:9px}
.trip-fuel-bar{height:28px;display:flex;background:#23313e;border:1px solid #637b87;border-radius:4px;overflow:hidden}
.trip-fuel-bar span{height:100%;flex-shrink:0}
#trip-fuel-remaining{background:#76d8bd}#trip-fuel-used{background:#edb361}#trip-fuel-short{background:repeating-linear-gradient(135deg,#dc7f85 0 4px,#6f3646 4px 8px)}
.trip-fuel-legend{display:flex;flex-wrap:wrap;gap:8px 18px;margin-top:10px;font-size:12px}.trip-fuel-legend span:before{content:'';display:inline-block;width:9px;height:9px;margin-right:5px;background:#76d8bd}.trip-fuel-legend .fuel-use-key:before{background:#edb361}.trip-fuel-legend .fuel-short-key:before{background:#dc7f85}
/* Ship instrumentation stays in one horizontal strip, with orders to its right. */
body>.task{display:grid;grid-template-columns:minmax(0,3fr) minmax(210px,1fr);height:64px;min-height:64px;gap:14px;padding:6px 10px}
.ship-stat-strip{display:flex;align-items:center;gap:8px;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.ship-stat-strip #fuel-status,.ship-stat-strip #supply-status{flex:none;overflow:visible;gap:7px;margin:0}
.ship-stat-strip .stat-meter{background:linear-gradient(145deg,#172c3c,#0b1824);border:1px solid #335361;border-radius:5px;padding:6px;gap:5px;box-shadow:inset 0 1px #ffffff08}
.ship-stat-strip .stat-bar{height:30px;width:10px;flex-basis:10px;background:repeating-linear-gradient(to top,#0a1824 0 5px,#263b48 5px 6px)}
.ship-stat-strip .stat-text{font-size:10px}.ship-order-status{min-width:0;border-left:1px solid #335361;padding-left:12px;align-self:center}.ship-order-status .eyebrow{font-size:9px;letter-spacing:1px}.ship-order-status #task-detail{font-size:10px;margin-top:4px}
.crew-bubble{font-size:14px}.crew-bubble .bubble-label{font-size:11px}
@media(max-width:520px){.crew-bubble{font-size:13px}}
@media(max-width:600px){body>.task{grid-template-columns:minmax(0,2fr) minmax(120px,1fr);height:70px;min-height:70px;gap:8px}.ship-order-status{padding-left:8px}}
#drone-results{width:min(560px,92vw);max-height:82dvh;overflow:auto;background:#112333;color:#dbe6f3;border:1px solid #659e99;border-radius:10px;padding:22px}
#drone-results::backdrop{background:#030913bb}#drone-results-items{padding:0;list-style:none}#drone-results-items li{margin:10px 0}
#drone-results-items button{display:grid;grid-template-columns:1fr auto;gap:6px 14px;width:100%;text-align:left;background:#193340;border-color:#548b87}
#drone-results-items small{grid-column:1/-1;letter-spacing:0;font-size:12px}#drone-results-items button>span{color:#a5e6d3}
#dev-panel{width:min(780px,94vw);max-height:88dvh;overflow:auto;background:#112333;color:#dbe6f3;border:1px solid #aa9964;border-radius:10px;padding:22px}#dev-panel::backdrop{background:#030913c9}
#dev-panel p{font-size:12px}#dev-grants{display:flex;flex-wrap:wrap;gap:8px}#dev-grants button{font-size:12px}#dev-settings{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}#dev-settings label{font-size:12px;display:flex;flex-direction:column;gap:5px}#dev-settings input{width:100%;background:#081824;border:1px solid #466474;border-radius:4px;color:#dbe6f3;padding:8px}#dev-feedback{color:#ffda93}
@media(max-width:520px){#dev-settings{grid-template-columns:1fr}}
#inspect-trip{border-color:#6cbcb1;background:#17353b;color:#b9f3e3}#inspect-trip[aria-pressed=true]{background:#2b5553;box-shadow:inset 0 0 0 1px #9cebd5}

#equipment-panel{width:min(820px,92vw);max-height:85vh;overflow:auto} .equipment-layout{display:grid;grid-template-columns:210px 1fr;gap:20px} #equipment-slots{display:flex;flex-direction:column;gap:7px} #equipment-slots button{text-align:left} #equipment-slots button[aria-pressed=true]{background:#28524f;border-color:#8be3cf} .equipment-candidate{padding:12px;margin-top:12px;border:1px solid #395c70;border-radius:6px} .equipment-stat{color:#a2eedc;font-weight:600} @media(max-width:600px){.equipment-layout{grid-template-columns:1fr} #equipment-slots{display:grid;grid-template-columns:1fr 1fr}}

#equipment-panel{background:#101e2c;color:#dce8f1;border:1px solid #426478;border-radius:10px;padding:20px} #equipment-panel::backdrop{background:#030811aa}

.component-picture{flex-shrink:0;object-fit:contain}.component-heading{display:flex;align-items:center;gap:12px}#equipment-slots button{display:flex;align-items:center;gap:8px}#equipment-slots .component-picture{width:30px;height:30px}.contract-tabs{margin:12px 0;flex-wrap:wrap}.contract-tabs button{min-width:90px}

#crafting-panel{width:min(760px,92vw);max-height:85vh;overflow:auto;background:#101e2c;color:#dce8f1;border:1px solid #426478;border-radius:10px;padding:20px}#crafting-panel::backdrop{background:#030811aa}

#distress-panel{width:min(540px,92vw);background:#101e2c;color:#dce8f1;border:1px solid #c2a35e;border-radius:10px;padding:22px}#distress-panel::backdrop{background:#03081199}#distress-actions{display:flex;gap:8px;flex-wrap:wrap}

#sector-chart{width:min(900px,94vw);max-height:90vh;overflow:auto}.chart-preview-map{position:relative;aspect-ratio:5400/3720;background:radial-gradient(ellipse at center,#152c3e,#080f1d);border:1px solid #476678;margin:15px 0;overflow:hidden}.chart-contact{position:absolute;transform:translate(-50%,-50%);font-size:10px;padding:4px 6px;max-width:110px}.chart-ship{position:absolute;color:#9cf3d7;font-size:11px;pointer-events:none}#sector-chart-list{display:flex;gap:8px;list-style:none;padding:0;flex-wrap:wrap}

.chart-preview-map{height:min(48vh,420px);aspect-ratio:auto}#sector-chart-close{position:sticky;bottom:0}
