/* The classic layout is untouched. The bridge owns a bounded viewport and a real control board. */
.bridge-layout-toggle{position:fixed;right:12px;bottom:92px;z-index:60;min-height:36px;padding:6px 12px;font-size:11px;background:#0a111eef!important;border:1px solid #9b8490!important;color:#e9d4c9;border-radius:20px}
.bridge-dock[hidden],.bridge-flight-status[hidden]{display:none!important}
.bridge-dock,.bridge-window-frame,.bridge-operations-button,.bridge-operations-head{display:none}
.bridge-operations{display:contents}
body[data-bridge="off"] .bridge-sector-search{display:contents}
body[data-bridge="off"] .bridge-sector-search>summary{display:none}
body[data-bridge="on"]{--bridge-header:calc(54px + env(safe-area-inset-top));--bridge-top:calc(124px + env(safe-area-inset-top));--board-height:calc(108px + env(safe-area-inset-bottom));--event-height:32px;height:100vh;height:100dvh;overflow:hidden;overscroll-behavior:none;background:#030711}
body[data-bridge="on"] .shell{display:block;height:100%;min-height:0;overflow:hidden}
body[data-bridge="on"] .sidebar{display:none!important}
body[data-bridge="on"] .main{margin:0!important;width:100%!important;height:100%;min-height:0;padding:0!important;overflow:hidden}
body[data-bridge="on"] .main>header{position:fixed;inset:0 0 auto;height:var(--bridge-header)!important;min-height:0!important;padding:calc(6px + env(safe-area-inset-top)) 16px 6px!important;display:flex;gap:12px;z-index:50;background:linear-gradient(#27313f,#080e18);border-bottom:1px solid #87a4b84d}
body[data-bridge="on"] .header-title,body[data-bridge="on"] .development-notice,body[data-bridge="on"] .header-actions>.account-signout,body[data-bridge="on"] #account-label{display:none!important}
body[data-bridge="on"] .header-actions{display:flex;flex-wrap:nowrap;align-items:center;gap:8px!important;margin:0!important;min-width:0}
body[data-bridge="on"] #commander-open{min-height:36px!important;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px!important;padding:6px 10px!important}
body[data-bridge="on"] .save-status{font-size:10px!important;max-width:180px}
body[data-bridge="on"] .starfall-header-brand{display:block!important;position:static!important;width:154px!important;max-width:28vw;margin:0!important;flex-shrink:0}
body[data-bridge="on"] .starfall-header-brand img{width:100%!important;height:auto!important;max-height:40px;object-fit:contain}
body[data-bridge="on"] .bridge-flight-status{min-height:34px;font-size:11px;padding:5px 9px;white-space:nowrap;border-color:#6b9fb666;background:#101d2b!important}
body[data-bridge="on"] #resources{position:fixed!important;inset:var(--bridge-header) 0 auto;z-index:49;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));height:70px;gap:6px;padding:5px 16px!important;background:#0a1320!important;border-bottom:1px solid #8bb9cb44}
body[data-bridge="on"] #resources .resource{display:flex;align-items:center;min-height:0!important;height:60px;padding:4px 10px!important;gap:8px;border:1px solid #8dadbc33!important;border-radius:8px;background:#111b2a!important;box-shadow:none!important;overflow:hidden}
body[data-bridge="on"] #resources .resource-image{width:34px!important;height:34px!important;object-fit:contain}
body[data-bridge="on"] #resources .resource small{font-size:10px!important}
body[data-bridge="on"] #resources .resource strong{font-size:20px!important;line-height:1.1;white-space:nowrap}
body[data-bridge="on"] #resources .resource em{font-size:9px!important}
body[data-bridge="on"] #content{max-width:none!important;margin:0!important;padding:0!important}
body[data-bridge="on"] #page{position:fixed;inset:var(--bridge-top) 0 calc(var(--board-height) + var(--event-height));overflow:hidden;isolation:isolate;background:#020711;z-index:1}
body[data-bridge="on"] #page>:not(.sector-browser):not(.bridge-world):not(.bridge-sheet):not(.bridge-operations):not(.start-shield-note):not(.bridge-window-frame):not(.bridge-holo-projection){display:none!important}
body[data-bridge="on"] .bridge-world,body[data-bridge="on"] .sector-browser{position:absolute;inset:0;height:100%;width:100%;min-height:0;overflow:hidden;margin:0!important;padding:0!important}
body[data-bridge="on"] .sector-browser>.planet-map{position:absolute;inset:17% 14% 5%;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;max-width:none!important;aspect-ratio:auto!important;border:0!important;border-radius:0!important;margin:0!important;background-color:#020711;background-image:radial-gradient(circle,#cadbe766 .6px,transparent 1px),radial-gradient(circle,#728caf66 .6px,transparent 1px);background-size:109px 83px,157px 131px;background-position:13px 7px,64px 51px;box-shadow:none}
/* Show the WHOLE source scene. Cover previously cut off stations and planets. */
body[data-bridge="on"] .planet-map>.space-background,body[data-bridge="on"] .planet-map>.space-loop-film{position:absolute;inset:6%!important;width:88%!important;height:88%!important;object-fit:contain!important;object-position:center!important;transform:none!important;animation:none!important;filter:none!important;background:transparent}
body[data-bridge="on"] .sector-browser>.position-overview,body[data-bridge="on"] .sector-browser>.sector-note,body[data-bridge="on"] .sector-browser>#boss-panel{display:none!important}
body[data-bridge="on"] .system-position:not(:has(small)){display:none!important}
body[data-bridge="on"] .planet-map .system-position{width:76px!important;min-height:42px!important}
body[data-bridge="on"] .planet-map .system-position>img{width:30px!important;height:30px!important}
body[data-bridge="on"] .planet-map .system-position>b{display:none!important}
body[data-bridge="on"] .planet-map .system-position .system-world-name{font-size:9px!important;max-width:90px!important;min-width:0;padding:2px 4px}
body[data-bridge="on"] .planet-map .system-position>small{font-size:9px!important}
body[data-bridge="on"] .planet-map .map-commander-card{max-width:100px;font-size:9px}
body[data-bridge="on"] .planet-map .home-anchor{width:80px!important;height:80px!important;min-height:80px!important}
body[data-bridge="on"] .planet-map .home-anchor .destination-caption{transform:translate(-50%,26px)!important}
body[data-bridge="on"] .bridge-window-frame{display:block;position:absolute;inset:0;z-index:16;pointer-events:none;overflow:hidden;background:none;box-shadow:inset 0 -2px #92c3d355}
/* Reframe the existing architecture above the floor, without modifying its image. */
.flagship-interior{display:block;position:absolute;left:0;top:-12%;width:100%;height:210%;pointer-events:none}
.flagship-interior img{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none}
.flagship-identity{display:none}
body[data-bridge="on"] .bridge-sector-search{position:absolute;right:20px;top:12px;z-index:23;max-width:min(440px,calc(100% - 40px));background:#080f1ef5;border:1px solid #8fb9cf66;border-radius:10px;box-shadow:0 4px 14px #0008}
body[data-bridge="on"] .bridge-sector-search>summary{min-height:40px;padding:10px 12px;cursor:pointer;font-size:11px;color:#c9e4ef}
body[data-bridge="on"] .bridge-sector-search .sector-toolbar{position:static!important;display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:8px;padding:10px!important;margin:0!important}
body[data-bridge="on"] .bridge-sector-search label{min-width:0}
body[data-bridge="on"] .bridge-sector-search input,body[data-bridge="on"] .bridge-sector-search select{max-width:100%;min-width:0}
body[data-bridge="on"] .bridge-world .bridge-sector-search{display:none}
body[data-bridge="on"] .bridge-operations-button{display:block;position:fixed;top:calc(var(--bridge-top) + 12px);left:20px;z-index:45;min-height:40px;padding:7px 12px;font-size:11px;color:#c9f0fa;background:linear-gradient(#243f51,#0c1928)!important;border:1px solid #7abacc99!important}
body[data-bridge="on"] .bridge-layout-toggle{top:calc(var(--bridge-top) + 60px);right:20px;bottom:auto;z-index:45;font-size:10px}
/* Physical board stays at the viewport bottom, independent of the artwork. */
body[data-bridge="on"]>#bridge-computer-board{display:grid!important;position:fixed!important;inset:auto 0 0!important;width:100%!important;height:var(--board-height)!important;z-index:80!important;visibility:visible!important;opacity:1!important;transform:none!important;grid-template-columns:repeat(6,minmax(0,140px));grid-template-rows:1fr;justify-content:center!important;align-items:stretch;gap:8px!important;margin:0!important;padding:25px 18px calc(9px + env(safe-area-inset-bottom))!important;overflow:visible!important;border:0!important;border-top:3px solid #709bb0!important;border-radius:0!important;background:linear-gradient(180deg,#3a4b5e,#182536 9%,#060e1b 30%,#030811)!important;box-shadow:0 -7px 18px #0009,inset 0 1px #d6efff55}
body[data-bridge="on"]>#bridge-computer-board::before{content:'BORDCOMPUTER / STARFALL FRONTIER';position:absolute;inset:5px 0 auto;text-align:center;font:9px/1.4 ui-monospace,monospace;letter-spacing:.2em;color:#9fd4e5;pointer-events:none}
body[data-bridge="on"]>#bridge-computer-board button{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:100%!important;min-width:0;min-height:48px!important;height:100%;padding:4px!important;color:#d1edf5;background:linear-gradient(#17384d,#081725)!important;border:1px solid #76b6cc77!important;border-radius:6px;box-shadow:inset 0 1px #d6f5ff22,0 3px 8px #0008;text-align:center}
body[data-bridge="on"]>#bridge-computer-board button>span{display:block!important;font-size:20px;line-height:1.1;color:#80e7f9;width:auto}
body[data-bridge="on"]>#bridge-computer-board button>b{display:block!important;margin:0!important;font:600 12px/1.2 system-ui!important;color:inherit;white-space:nowrap}
body[data-bridge="on"]>#bridge-computer-board button.active{background:linear-gradient(#315e70,#0d2d40)!important;border-color:#c4f6ff!important;color:#fff;box-shadow:inset 0 0 15px #4dd7ee22,0 0 10px #50d7f022}
body[data-bridge="on"] #boss-announcement{display:flex;position:fixed;left:0;right:0;bottom:var(--board-height);height:var(--event-height);min-height:0;z-index:70;margin:0;padding:2px 16px!important;align-items:center;justify-content:space-between;gap:8px;overflow:hidden;background:#08121ef5!important;border:0;border-top:1px solid #628da266}
body[data-bridge="on"] #boss-announcement button{min-height:26px!important;font-size:11px!important;padding:2px!important}
body[data-bridge="on"] #boss-announcement small{font-size:10px;white-space:nowrap}
body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations{position:fixed;inset:calc(var(--bridge-top) + 100px) 10% calc(var(--board-height) + var(--event-height) + 12px);width:auto;height:auto;max-height:none;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:18px;z-index:30;border:1px solid #9fe5ee;border-left:5px solid #2d4d5d;border-right:5px solid #2d4d5d;border-radius:12px;background:linear-gradient(135deg,#153044fa,#07101dfc 45%);box-shadow:0 0 0 3px #030a11,0 0 0 4px #718e9f88,0 20px 70px #000c}
body[data-bridge="on"] .bridge-operations{display:none}
body[data-bridge="on"][data-bridge-operations="open"] .bridge-operations{display:block}
body[data-bridge="on"] .bridge-sheet::before{content:'BORDCOMPUTER / SYSTEMZUGRIFF';display:block;font:10px/1.6 ui-monospace,monospace;letter-spacing:.16em;color:#88d6e6;padding:0 45px 10px 0;border-bottom:1px solid #63aec54d;margin-bottom:14px}
body[data-bridge="on"][data-bridge-view="overview"] .bridge-sheet::before{content:'BORDCOMPUTER / KOLONIE'}
body[data-bridge="on"][data-bridge-view="shipyard"] .bridge-sheet::before{content:'BORDCOMPUTER / WERFT'}
body[data-bridge="on"][data-bridge-view="research"] .bridge-sheet::before{content:'BORDCOMPUTER / FORSCHUNG'}
body[data-bridge="on"][data-bridge-view="defense"] .bridge-sheet::before{content:'BORDCOMPUTER / ABWEHR'}
body[data-bridge="on"] .bridge-sheet>.page-heading{padding-right:45px}
body[data-bridge="on"] .bridge-sheet-close{position:sticky;top:0;float:right;z-index:35;width:44px;height:44px;min-height:44px;font-size:24px;padding:0;background:#183b4a!important;border:1px solid #8fe2ee!important;color:#c8f6ff}
body[data-bridge="on"] .bridge-sheet .subsystem-tablet{border:0;box-shadow:none;margin:0}
body[data-bridge="on"] .bridge-sheet .tablet-hardware{display:none}
body[data-bridge="on"] .bridge-sheet .tablet-screen,body[data-bridge="on"] .bridge-sheet .subsystem-content{background:transparent!important;border:0!important;box-shadow:none!important}
body[data-bridge="on"] .bridge-operations-head{display:flex;align-items:center;justify-content:space-between;position:sticky;top:-18px;z-index:20;margin:-18px -18px 14px;padding:8px 14px;background:#102334f5;border-bottom:1px solid #6cc2d36b}
body[data-bridge="on"] .bridge-operations-head button{width:44px;min-height:44px;font-size:24px;padding:0}
body[data-bridge="on"] .bridge-operations .sector-workspace{display:block;margin-top:16px}
body[data-bridge="on"] .bridge-operations .mission-layout{display:block;position:static}
body[data-bridge="on"] .bridge-operations .mission-layout>section{margin-top:14px}
body[data-bridge="on"] #page>.start-shield-note{position:absolute;inset:auto auto 8px 16%;z-index:22;max-width:min(280px,60vw);margin:0;padding:3px 7px;font-size:9px;background:#091524e8;border:1px solid #7fabbc55;border-radius:6px}
body[data-bridge="on"] #boss-world-boost:not([hidden]){display:flex;position:fixed;top:calc(var(--bridge-top) + 12px);left:50%;transform:translateX(-50%);z-index:44;max-width:38vw;min-height:0!important;padding:4px 8px!important;gap:6px;border-radius:8px;background:#111e2be8!important}
body[data-bridge="on"] #boss-world-boost img{width:25px!important;height:30px!important;object-fit:contain}
body[data-bridge="on"] #boss-world-boost strong{font-size:10px!important}
body[data-bridge="on"] #boss-world-boost span{font-size:9px!important}
body[data-bridge="on"] #boss-world-boost div>small{display:none}
body[data-bridge="on"] #boss-world-boost .boss-boost-clock b{font-size:10px!important;white-space:nowrap}
body[data-bridge="on"] #owner-tools{bottom:calc(var(--board-height) + var(--event-height) + 6px)!important;right:12px!important;z-index:46}
body[data-bridge="on"] .main>footer{display:none}
@media(max-width:700px){
 body[data-bridge="on"]{--bridge-header:calc(46px + env(safe-area-inset-top));--bridge-top:calc(106px + env(safe-area-inset-top));--board-height:calc(94px + env(safe-area-inset-bottom));--event-height:30px}
 body[data-bridge="on"] .main>header{padding:calc(4px + env(safe-area-inset-top)) 8px 4px!important;gap:5px}
 body[data-bridge="on"] .save-status,body[data-bridge="on"] .game-update{display:none!important}
 body[data-bridge="on"] .header-actions{gap:4px!important}
 body[data-bridge="on"] #commander-open{max-width:125px;font-size:11px!important;padding:5px 7px!important}
 body[data-bridge="on"] .bridge-flight-status{font-size:9px;padding:4px 6px}
 body[data-bridge="on"] .starfall-header-brand{width:116px!important;max-width:32vw}
 body[data-bridge="on"] #resources{height:60px;padding:4px 6px!important;gap:4px}
 body[data-bridge="on"] #resources .resource{height:52px;justify-content:center;padding:3px!important;gap:2px}
 body[data-bridge="on"] #resources .resource-image{display:none}
 body[data-bridge="on"] #resources .resource small{font-size:9px!important}
 body[data-bridge="on"] #resources .resource strong{font-size:clamp(13px,4vw,18px)!important}
 body[data-bridge="on"] .bridge-operations-button{left:10px;top:calc(var(--bridge-top) + 10px);font-size:10px;min-height:40px;padding:6px 8px}
 body[data-bridge="on"] .bridge-sector-search{top:10px;right:10px;max-width:calc(100% - 20px)}
 body[data-bridge="on"] .bridge-sector-search>summary{min-height:40px;padding:9px 8px;font-size:10px;max-width:175px}
 body[data-bridge="on"] .bridge-layout-toggle{top:calc(var(--bridge-top) + 58px);right:10px;font-size:9px;min-height:34px}
 body[data-bridge="on"]>#bridge-computer-board{grid-template-columns:repeat(6,minmax(0,1fr));gap:3px!important;padding:22px 5px calc(8px + env(safe-area-inset-bottom))!important}
 body[data-bridge="on"]>#bridge-computer-board button>b{font-size:clamp(8px,2.5vw,10px)!important}
 body[data-bridge="on"]>#bridge-computer-board button>span{font-size:19px}
 body[data-bridge="on"]>#bridge-computer-board::before{font-size:8px;letter-spacing:.15em}
 body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations{inset:calc(var(--bridge-top) + 100px) 8px calc(var(--board-height) + var(--event-height) + 8px);padding:12px;border-left-width:3px;border-right-width:3px;scrollbar-gutter:auto}
 body[data-bridge="on"] .bridge-operations-head{top:-12px;margin:-12px -12px 12px;padding:6px 10px}
 body[data-bridge="on"] #boss-announcement{padding:2px 7px!important}
 body[data-bridge="on"] #boss-announcement button,body[data-bridge="on"] #boss-announcement small{font-size:9px!important}
 body[data-bridge="on"] #boss-world-boost:not([hidden]){top:auto;bottom:calc(var(--board-height) + var(--event-height) + 10px);left:16%;transform:none;max-width:75vw;padding:3px 6px!important}
 body[data-bridge="on"] #page>.start-shield-note{left:16%;max-width:65vw;font-size:8px}
 body[data-bridge="on"] .planet-map .system-position{width:60px!important;min-height:34px!important}
 body[data-bridge="on"] .planet-map .system-position>img{width:24px!important;height:24px!important}
 body[data-bridge="on"] .planet-map .system-position .system-world-name{font-size:8px!important;max-width:65px!important}
 body[data-bridge="on"] .planet-map .map-commander-card{font-size:8px;max-width:72px}
 body[data-bridge="on"] .planet-map .map-commander-card>img{width:20px!important;height:20px!important}
 body[data-bridge="on"] .planet-map .home-anchor{width:66px!important;height:66px!important;min-height:66px!important}
}
@media(orientation:portrait){.flagship-interior{height:225%}body[data-bridge="on"] .sector-browser>.planet-map{inset:17% 14% 5%}}
@media(max-height:520px){
 body[data-bridge="on"]{--bridge-header:calc(38px + env(safe-area-inset-top));--bridge-top:calc(84px + env(safe-area-inset-top));--board-height:calc(66px + env(safe-area-inset-bottom));--event-height:26px}
 body[data-bridge="on"] #resources{height:46px;padding:2px 8px!important}body[data-bridge="on"] #resources .resource{height:42px}body[data-bridge="on"] #resources .resource em{display:none}
 body[data-bridge="on"]>#bridge-computer-board{padding-top:19px!important;padding-bottom:calc(5px + env(safe-area-inset-bottom))!important}
 body[data-bridge="on"]>#bridge-computer-board button{min-height:38px!important;flex-direction:row;gap:6px}
 body[data-bridge="on"]>#bridge-computer-board button>span{font-size:15px}body[data-bridge="on"]>#bridge-computer-board button>b{font-size:10px!important}
 body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations{top:calc(var(--bridge-top) + 54px)}
 body[data-bridge="on"] .bridge-layout-toggle{top:calc(var(--bridge-top) + 14px);right:220px}
}

/* Right-hand worlds put their portrait toward the center, inside the window. */
body[data-bridge="on"] .planet-map .system-position:is([data-position="2"],[data-position="3"],[data-position="4"],[data-position="5"],[data-position="6"],[data-position="7"],[data-position="8"]) .map-commander-card{left:auto!important;right:calc(100% + 3px)!important}
/* Captain's station: one coherent room, with real controls registered to its three glass displays. */
body[data-bridge="on"]{--bridge-top:var(--bridge-header);--helm-height:calc(100dvh - var(--bridge-top));--helm-console-top:calc(var(--bridge-top) + var(--helm-height)*.655);--helm-console-height:max(128px,calc(var(--helm-height)*.17));--board-height:calc(var(--helm-height)*.36);--event-height:0px}
body[data-bridge="on"] #page{inset:var(--bridge-top) 0 0;background:#030914}
body[data-bridge="on"] .bridge-window-frame{z-index:0;box-shadow:none}
body[data-bridge="on"] .flagship-interior{top:0;left:0;width:100%;height:100%}
body[data-bridge="on"] .flagship-interior img{object-fit:fill}
body[data-bridge="on"] .bridge-world{z-index:1}
body[data-bridge="on"] .sector-browser{z-index:2}
body[data-bridge="on"] .sector-browser>.planet-map{inset:6% 6% 42%;background:none!important;box-shadow:none!important;border:0!important;outline:0!important}
body[data-bridge="on"] .planet-map>.space-background,body[data-bridge="on"] .planet-map>.space-loop-film{display:none!important;visibility:hidden!important}
body[data-bridge="on"] .space-action-legend{display:none!important}
body[data-bridge="on"] .planet-map .home-anchor{width:70px!important;height:70px!important;min-height:70px!important}
body[data-bridge="on"] #resources{inset:var(--helm-console-top) auto auto 3.5%;width:19.5%;height:var(--helm-console-height);grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:5px;padding:0!important;background:none!important;border:0!important;box-shadow:none}
body[data-bridge="on"] #resources .resource{height:100%;padding:5px!important;gap:4px;background:#08263c55!important;border:1px solid #71d6ed38!important;border-radius:5px;justify-content:flex-start;overflow:hidden}
body[data-bridge="on"] #resources .resource-image{width:24px!important;height:24px!important}
body[data-bridge="on"] #resources .resource strong{font-size:clamp(14px,1.25vw,23px)!important;line-height:1.2}
body[data-bridge="on"] #resources .resource small{font-size:10px!important;color:#b8e2ec}
body[data-bridge="on"] #resources .resource em{font-size:10px!important;color:#85d8ec}
body[data-bridge="on"]>#bridge-computer-board{inset:var(--helm-console-top) 29% auto!important;width:auto!important;height:var(--helm-console-height)!important;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:6px!important;padding:19px 5px 2px!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;transform:none!important}
body[data-bridge="on"]>#bridge-computer-board::before{content:'KOMMANDO / SYSTEME';inset:0 0 auto;font-size:10px;letter-spacing:.18em;color:#b5edf7;text-shadow:0 1px 3px #001423}
body[data-bridge="on"]>#bridge-computer-board button{min-height:44px!important;flex-direction:row;gap:10px;height:100%;padding:5px 8px!important;background:linear-gradient(135deg,#163f5366,#061c2d66)!important;border:1px solid #74d3e96b!important;border-radius:5px;box-shadow:inset 0 1px #b9f6ff14;color:#d7f3fa;transition:background .15s,border-color .15s}
body[data-bridge="on"]>#bridge-computer-board button>span{font-size:24px;color:#84ebff}
body[data-bridge="on"]>#bridge-computer-board button>b{font-size:clamp(11px,1vw,16px)!important;letter-spacing:.03em}
body[data-bridge="on"]>#bridge-computer-board button:hover,body[data-bridge="on"]>#bridge-computer-board button:focus-visible{background:#21587099!important;border-color:#b0f6ff!important}
body[data-bridge="on"]>#bridge-computer-board button.active{background:linear-gradient(135deg,#387287aa,#12425c88)!important;border-color:#b0f6ff!important;box-shadow:inset 0 0 12px #7ce8ff26;color:#fff}
body[data-bridge="on"] .bridge-flight-status{position:fixed;top:var(--helm-console-top);left:77%;right:3.5%;height:58px;display:grid;grid-template-columns:1fr 40px;grid-template-rows:1fr 1fr;align-items:center;gap:0 5px;padding:5px 8px;z-index:45;background:#08263c66!important;border:1px solid #71d6ed44!important;border-radius:5px;color:#c7eff8;text-align:left}
body[data-bridge="on"] .bridge-flight-status small{grid-column:1;grid-row:1;font:10px/1.2 ui-monospace,monospace;letter-spacing:.13em;color:#9bd6e7}
body[data-bridge="on"] .bridge-flight-status strong{grid-column:2;grid-row:1/3;align-self:center;font:500 30px/1 system-ui;text-align:center;color:#d9f9ff}
body[data-bridge="on"] .bridge-flight-status span{grid-column:1;grid-row:2;font-size:11px;line-height:1.2}
body[data-bridge="on"] #boss-announcement{inset:calc(var(--helm-console-top) + 62px) 3.5% auto 77%;height:calc(var(--helm-console-height) - 107px);min-height:24px;display:block;padding:2px 4px!important;border:0;background:transparent!important;overflow:auto;z-index:55;box-shadow:none}
body[data-bridge="on"] #boss-announcement button{display:block;min-height:0!important;width:100%;padding:0!important;font-size:10px!important;line-height:1.35;white-space:normal;text-align:left;color:#c2e8f2}
body[data-bridge="on"] #boss-announcement small{display:block;margin-top:2px;font-size:10px;line-height:1.2;color:#89d7ee}
body[data-bridge="on"] .bridge-operations-button{inset:calc(var(--helm-console-top) + var(--helm-console-height) - 40px) 3.5% auto 77%;height:40px;min-height:40px;max-height:40px;padding:5px 8px;z-index:56;font-size:12px;text-align:center;background:linear-gradient(#17435699,#08223699)!important;border:1px solid #70d3e980!important;border-radius:4px}
body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations{inset:calc(var(--bridge-top) + 64px) 15% calc(var(--board-height) + 16px);background:linear-gradient(130deg,#183b4bf7,#061925fc);border-color:#a1e9f2;border-left-width:3px;border-right-width:3px;box-shadow:0 0 0 4px #030b12bb,0 18px 60px #000c}
body[data-bridge="on"] .bridge-sheet-close{background:#153c4a!important}
body[data-bridge="on"] .bridge-layout-toggle{top:calc(var(--bridge-top) + 10px);right:16px;font-size:9px;min-height:32px}
body[data-bridge="on"] .bridge-sector-search{right:16px;top:50px;background:#061723cc}
body[data-bridge="on"] #boss-world-boost:not([hidden]){top:calc(var(--bridge-top) + 10px);left:50%;transform:translateX(-50%);max-width:40vw}
body[data-bridge="on"] #owner-tools{bottom:10px!important;right:10px!important}
@media(max-width:1100px) and (min-width:701px){body[data-bridge="on"] #resources .resource-image{display:none}body[data-bridge="on"] #resources .resource{justify-content:center}body[data-bridge="on"]>#bridge-computer-board button{gap:5px}body[data-bridge="on"]>#bridge-computer-board button>b{font-size:11px!important}}
@media(orientation:portrait){
 body[data-bridge="on"]{--bridge-top:calc(var(--bridge-header) + 60px);--helm-console-top:calc(var(--bridge-top) + var(--helm-height)*.755);--helm-console-height:max(116px,calc(var(--helm-height)*.18));--board-height:calc(var(--helm-height)*.35)}
 body[data-bridge="on"] .sector-browser>.planet-map{inset:7% 7% 36%}
 body[data-bridge="on"] #resources{inset:var(--bridge-header) 0 auto;width:100%;height:60px;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:1fr;padding:4px 6px!important;gap:4px;background:#091a29!important;border-bottom:1px solid #75bed244!important}
 body[data-bridge="on"] #resources .resource{justify-content:center;padding:3px!important;border:1px solid #81bdd333!important;background:#15324788!important}
 body[data-bridge="on"] #resources .resource strong{font-size:clamp(13px,4vw,18px)!important}
 body[data-bridge="on"] #resources .resource-image{display:none}
 body[data-bridge="on"] #resources .resource small,body[data-bridge="on"] #resources .resource em{font-size:9px!important}
 body[data-bridge="on"]>#bridge-computer-board{inset:var(--helm-console-top) 10% auto!important;padding:16px 3px 2px!important;gap:5px!important;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
 body[data-bridge="on"]>#bridge-computer-board::before{font-size:8px}
 body[data-bridge="on"]>#bridge-computer-board button{gap:4px;min-height:44px!important;padding:4px!important;flex-direction:column}
 body[data-bridge="on"]>#bridge-computer-board button>span{font-size:18px}
 body[data-bridge="on"]>#bridge-computer-board button>b{font-size:10px!important;letter-spacing:0}
 body[data-bridge="on"] .bridge-flight-status{position:static;inset:auto;display:flex;min-height:32px;height:32px;gap:3px;padding:4px 7px;grid-template-columns:none;grid-template-rows:none}
 body[data-bridge="on"] .bridge-flight-status strong{font-size:12px;line-height:1}
 body[data-bridge="on"] .bridge-flight-status strong::before{content:'↗ ';font-size:13px}
 body[data-bridge="on"] .bridge-flight-status small,body[data-bridge="on"] .bridge-flight-status span{display:none}
 body[data-bridge="on"] .bridge-operations-button{display:none}
 body[data-bridge="on"] #boss-announcement{inset:calc(var(--bridge-top) + var(--helm-height)*.665) 10% auto;height:42px;display:flex;align-items:center;gap:6px;padding:4px 7px!important;background:#0a253455!important;border:1px solid #73cce955!important;border-radius:5px}
 body[data-bridge="on"] #boss-announcement button{font-size:9px!important;line-height:1.2}
 body[data-bridge="on"] #boss-announcement small{font-size:9px;margin:0;white-space:nowrap}
 body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations{inset:calc(var(--bridge-top) + 54px) 8px calc(var(--helm-height)*.36);padding:12px}
 body[data-bridge="on"] .bridge-sector-search{top:48px;right:10px}
 body[data-bridge="on"] .bridge-layout-toggle{right:10px;font-size:8px;min-height:30px}
 body[data-bridge="on"] #boss-world-boost:not([hidden]){max-width:65vw;top:calc(var(--bridge-top) + 10px);left:12px;transform:none}
}
@media(max-height:650px) and (min-width:701px){
 body[data-bridge="on"]{--bridge-top:var(--bridge-header);--helm-console-height:max(60px,calc(var(--helm-height)*.18))}
 body[data-bridge="on"]>#bridge-computer-board{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:1fr;padding-top:13px!important;gap:3px!important;left:25%!important;right:25%!important}
 body[data-bridge="on"]>#bridge-computer-board button{min-height:32px!important;padding:2px!important;flex-direction:column;gap:2px}
 body[data-bridge="on"]>#bridge-computer-board button>span{font-size:15px}
 body[data-bridge="on"]>#bridge-computer-board button>b{font-size:9px!important}
 body[data-bridge="on"]>#bridge-computer-board::before{font-size:7px}
 body[data-bridge="on"] #resources{gap:2px}
 body[data-bridge="on"] #resources .resource small,body[data-bridge="on"] #resources .resource em{display:none}
 body[data-bridge="on"] #resources .resource strong{font-size:13px!important}
 body[data-bridge="on"] .bridge-flight-status{height:32px;min-height:32px;padding:2px 5px;grid-template-columns:1fr 24px;grid-template-rows:1fr}
 body[data-bridge="on"] .bridge-flight-status small{font-size:7px;grid-row:1}
 body[data-bridge="on"] .bridge-flight-status strong{font-size:20px;grid-row:1}
 body[data-bridge="on"] .bridge-flight-status span{display:none}
 body[data-bridge="on"] .bridge-operations-button{top:calc(var(--helm-console-top) + 34px);height:22px;min-height:22px;max-height:22px;font-size:8px;padding:2px}
 body[data-bridge="on"] #boss-announcement{inset:calc(var(--bridge-top) + 7px) 24% auto;height:26px;display:flex;gap:5px;background:#061723aa!important;border-radius:5px}
 body[data-bridge="on"] #boss-announcement button,body[data-bridge="on"] #boss-announcement small{font-size:8px!important;white-space:nowrap}
 body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations{top:calc(var(--bridge-top) + 45px)}
}

/* Register the portrait controls to the actual blue glass in the portrait artwork. */
@media(min-width:701px){body[data-bridge="on"] #resources{left:7%;width:16.5%}body[data-bridge="on"] .bridge-flight-status,body[data-bridge="on"] #boss-announcement,body[data-bridge="on"] .bridge-operations-button{right:6%}}
@media(orientation:portrait){body[data-bridge="on"]{--helm-console-top:calc(var(--bridge-top) + var(--helm-height)*.675);--helm-console-height:max(111px,calc(var(--helm-height)*.15))}body[data-bridge="on"]>#bridge-computer-board{left:12%!important;right:12%!important}body[data-bridge="on"] #boss-announcement{top:calc(var(--bridge-top) + var(--helm-height)*.605);height:34px}}
@media(orientation:portrait) and (max-height:780px){body[data-bridge="on"]{--helm-console-top:calc(var(--bridge-top) + var(--helm-height)*.69);--helm-console-height:calc(var(--helm-height)*.12)}body[data-bridge="on"]>#bridge-computer-board{display:flex!important;justify-content:flex-start!important;overflow-x:auto!important;overflow-y:hidden!important;padding:17px 3px 2px!important;gap:6px!important;scrollbar-width:thin;scrollbar-color:#70c6dc55 transparent;scroll-snap-type:x proximity}body[data-bridge="on"]>#bridge-computer-board::before{content:'BORDSYSTEME · ↔ WISCHEN';font-size:7px}body[data-bridge="on"]>#bridge-computer-board button{flex:0 0 84px;min-width:84px;min-height:40px!important;scroll-snap-align:start;gap:3px;flex-direction:row}body[data-bridge="on"]>#bridge-computer-board button>span{font-size:15px}body[data-bridge="on"]>#bridge-computer-board button>b{font-size:10px!important}}
/* The large illustrated home planet is itself the colony touch target. */
body[data-bridge="on"] .planet-map .home-anchor{width:18vw!important;height:calc(var(--helm-height)*.28)!important;min-height:70px!important;max-width:none!important;background:transparent!important;border:0!important;box-shadow:none!important}
body[data-bridge="on"] .planet-map .home-anchor .home-planet-outline{visibility:hidden}
body[data-bridge="on"] .planet-map .home-anchor .destination-caption{top:100%!important;transform:translate(-50%,2px)!important}
@media(orientation:portrait){body[data-bridge="on"] .planet-map .home-anchor{width:36vw!important;height:calc(var(--helm-height)*.23)!important}}
body[data-bridge="on"] .planet-map::before{display:none!important}
/* Holographic overlays retain contrast while letting the real bridge show through. */
body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations{background:linear-gradient(135deg,#5adaff12,#00172480)!important;border:1px solid #8cecff88!important;box-shadow:inset 0 0 35px #3be3ff0a,0 0 0 1px #01131d55,0 0 28px #28ceff12!important;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
body[data-bridge="on"] .bridge-sheet :is(.panel,.data-panel,.quiet-status,.bridge-tablet,.tablet-screen,.tablet-hardware,.subsystem-content,.cinema-operation,.journey-cinema){background:transparent!important;background-image:none!important;border-color:#6ae5ff44!important;border-bottom:1px solid #6ae5ff44!important;box-shadow:none!important}
body[data-bridge="on"] .bridge-sheet .journey-cinema::before{background:none!important}
body[data-bridge="on"] .bridge-sheet .journey-cinema{isolation:isolate;border:1px solid #72e4ff55!important;border-radius:8px}
body[data-bridge="on"] .bridge-sheet :is(h1,h2,h3,.flight-caption,.journey-route,.cinema-operation){color:#e1faff;text-shadow:0 1px 4px #00131f,0 0 8px #62dcff22}
body[data-bridge="on"] .bridge-sheet .quiet-status{font-size:11px;color:#a7deea;padding:6px 0}
body[data-bridge="on"] .bridge-flight-status,body[data-bridge="on"] .bridge-operations-button{background:transparent!important;box-shadow:none!important;border-color:#85eaff33!important;text-shadow:0 0 7px #69d9f455}
body[data-bridge="on"] #resources .resource{background:transparent!important;box-shadow:none!important;border-color:#85eaff2e!important}
body[data-bridge="on"]>#bridge-computer-board button{background:transparent!important;border-color:#83dff544!important;box-shadow:none!important}
body[data-bridge="on"]>#bridge-computer-board button.active{background:#8bdcff12!important;border-color:#a0eeff99!important;box-shadow:inset 0 0 15px #6ad5ff12!important}
body[data-bridge="on"] .planet-map :is(.map-commander-card,.system-world-name,.destination-caption,.space-action-object strong,.space-action-object small){background:#04283a44!important;border-color:#7cdcf766!important;box-shadow:none!important;color:#e6fbff!important;text-shadow:0 1px 4px #00121d}
body[data-bridge="on"] .planet-map .home-anchor .destination-caption{width:max-content!important;min-width:0!important;max-width:170px!important;padding:4px 9px!important;border:1px solid #6bd9f655;border-radius:5px;font-size:10px}
body[data-bridge="on"] .planet-map .map-commander-card{max-width:104px;gap:4px;padding:3px;border-radius:5px}
/* Crop only the unused pedestal below the glass displays. All live panels follow the same scale. */
body[data-bridge="on"]{--helm-art-scale:1.1627907;--helm-console-top:calc(var(--bridge-top) + var(--helm-height)*.655*var(--helm-art-scale));--helm-console-height:max(128px,calc(var(--helm-height)*.17*var(--helm-art-scale)));--board-height:calc(var(--helm-height)*.25)}
body[data-bridge="on"] .flagship-interior{height:calc(100%*var(--helm-art-scale))}
body[data-bridge="on"] .sector-browser>.planet-map{inset:6% 6% 34%}
body[data-bridge="on"] .planet-map .home-anchor{height:calc(var(--helm-height)*.28*var(--helm-art-scale))!important}
@media(orientation:portrait){
 body[data-bridge="on"]{--helm-console-top:calc(var(--bridge-top) + var(--helm-height)*.675*var(--helm-art-scale));--helm-console-height:max(111px,calc(var(--helm-height)*.15*var(--helm-art-scale)));--board-height:calc(var(--helm-height)*.25)}
 body[data-bridge="on"] .sector-browser>.planet-map{inset:7% 7% 28%}
 body[data-bridge="on"] #boss-announcement{top:calc(var(--bridge-top) + var(--helm-height)*.605*var(--helm-art-scale))}
 body[data-bridge="on"] .planet-map .home-anchor{height:calc(var(--helm-height)*.23*var(--helm-art-scale))!important}
 body[data-bridge="on"] #resources .resource{background:#092f4155!important}
}
@media(orientation:portrait) and (max-height:780px){body[data-bridge="on"]{--helm-console-top:calc(var(--bridge-top) + var(--helm-height)*.69*var(--helm-art-scale));--helm-console-height:calc(var(--helm-height)*.12*var(--helm-art-scale))}}
@media(max-height:650px) and (min-width:701px){body[data-bridge="on"]{--helm-console-height:max(60px,calc(var(--helm-height)*.18*var(--helm-art-scale)))}body[data-bridge="on"] #boss-announcement{top:calc(var(--bridge-top) + 7px)}}
/* The film is limited to the window; the actual consoles remain perfectly stationary. */
.helm-window-film{position:absolute;left:5%;top:calc(7%*var(--helm-art-scale));width:90%;height:calc(45%*var(--helm-art-scale));object-fit:fill;pointer-events:none;opacity:0;clip-path:polygon(6% 0,94% 0,100% 50%,96% 100%,4% 100%,0 50%);mask-image:linear-gradient(90deg,transparent,#000 2%,#000 98%,transparent);-webkit-mask-image:linear-gradient(90deg,transparent,#000 2%,#000 98%,transparent)}
body[data-bridge="on"] .bridge-window-frame[data-window-film="playing"] .helm-window-film{opacity:1}
@media(orientation:portrait){.helm-window-film{display:none}}
@media(prefers-reduced-motion:reduce){.helm-window-film{display:none!important}}
body[data-motion="off"] .helm-window-film{display:none!important}

.helm-window-film{inset:0;left:0;top:0;width:100%;height:calc(100%*var(--helm-art-scale));object-fit:fill;clip-path:polygon(10% 7%,90% 7%,95% 28%,91% 52%,9% 52%,5% 28%);mask-image:none;-webkit-mask-image:none}
@media(orientation:portrait){.helm-window-film{display:block;clip-path:polygon(10% 8%,90% 8%,96% 30%,93% 56%,7% 56%,4% 30%)}}
/* Window-only movie files are registered to the same coordinates as the room art. */
.helm-window-film{left:4%;top:calc(3%*var(--helm-art-scale));width:92%;height:calc(52%*var(--helm-art-scale));clip-path:polygon(6.52% 7.69%,93.48% 7.69%,98.91% 48.08%,94.57% 94.23%,5.43% 94.23%,1.09% 48.08%)}
@media(orientation:portrait){.helm-window-film{left:4%;top:calc(3%*var(--helm-art-scale));width:92%;height:calc(56%*var(--helm-art-scale));clip-path:polygon(6.52% 8.93%,93.48% 8.93%,100% 48.21%,96.74% 94.64%,3.26% 94.64%,0 48.21%)}}
body[data-bridge="on"] #resources .resource.energy-warning{border-color:#ff9b82!important;color:#ffe0cc}
/* Four-corner projection: the controls are part of the sloping glass, not floating cards. */
body[data-bridge="on"] :is(#resources,#bridge-computer-board,.helm-right-display).helm-projected{position:fixed!important;inset:0 auto auto 0!important;transform-origin:0 0!important;box-sizing:border-box;max-width:none!important;max-height:none!important;min-height:0!important;margin:0!important;border:0!important;background:transparent!important;border-radius:0!important;overflow:hidden!important;will-change:auto;}
body[data-bridge="on"]>#bridge-computer-board.helm-projected{padding:18px 8px 5px!important;gap:0!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;}
body[data-bridge="on"]>#bridge-computer-board.helm-projected button{min-height:0!important;min-width:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:4px!important;flex-direction:row;gap:8px;text-shadow:0 0 7px #37cfff77;}
body[data-bridge="on"]>#bridge-computer-board.helm-projected button.active{background:linear-gradient(0deg,#58ddff1c,transparent)!important;box-shadow:inset 0 -2px #86efff!important;}
body[data-bridge="on"]>#bridge-computer-board.helm-projected button:is(:hover,:focus-visible){background:#62dcff20!important;outline:2px solid #a8efff;outline-offset:-3px;}
body[data-bridge="on"]>#bridge-computer-board.helm-projected button:nth-of-type(-n+4){border-bottom:1px solid #72dfff25!important;}
body[data-bridge="on"]>#bridge-computer-board.helm-projected button:not(:nth-of-type(4n)){border-right:1px solid #72dfff25!important;}
body[data-bridge="on"] #resources.helm-projected{padding:7px!important;gap:0!important;z-index:80;}
body[data-bridge="on"] #resources.helm-projected .resource{border:0!important;border-radius:0!important;justify-content:center!important;padding:4px!important;}
.helm-right-display{display:none;}
body[data-bridge="on"] .helm-right-display:not([hidden]){display:grid;grid-template-rows:36% 1fr 28%;gap:3px;padding:6px 9px;z-index:80;}
body[data-bridge="on"] .helm-right-display :is(.bridge-flight-status,#boss-announcement,.bridge-operations-button){position:relative!important;inset:auto!important;width:100%!important;height:auto!important;max-height:none!important;min-height:0!important;padding:3px!important;border:0!important;transform:none!important;border-radius:0!important;background:transparent!important;overflow:hidden!important;}
body[data-bridge="on"] .helm-right-display .bridge-operations-button{border-top:1px solid #72dfff33!important;}
body[data-bridge="on"] .helm-right-display #boss-announcement{font-size:10px!important;}
/* This clipped viewport is the outside of the ship. No event sprite or route can cross its sill. */
body[data-bridge="on"] .sector-browser>.planet-map{inset:7% 7% 40%!important;overflow:hidden!important;isolation:isolate;clip-path:polygon(4% 0,96% 0,100% 50%,96% 100%,4% 100%,0 50%);contain:paint;}
body[data-bridge="on"] .planet-map .action-space-layer{inset:7% 6% 13%;overflow:hidden;}
body[data-bridge="on"] .planet-map .space-action-convoy{width:19%;height:17%;min-width:0;}
body[data-bridge="on"] .planet-map .space-action-object strong{font-size:10px;}
body[data-bridge="on"] .planet-map .space-action-object small{font-size:9px;}
body[data-bridge="on"] .planet-map .space-action-routes{overflow:hidden;}
@media(orientation:portrait){
 body[data-bridge="on"] .sector-browser>.planet-map{inset:9% 6% 34%!important;clip-path:polygon(6% 0,94% 0,100% 55%,96% 100%,4% 100%,0 55%);}
 body[data-bridge="on"]>#bridge-computer-board.helm-projected{padding:12px 4px 2px!important;overflow:hidden!important;}
 body[data-bridge="on"]>#bridge-computer-board.helm-projected::before{content:'KOMMANDO / SYSTEME';font-size:7px;}
 body[data-bridge="on"]>#bridge-computer-board.helm-projected button{flex-direction:column;gap:3px!important;}
 body[data-bridge="on"]>#bridge-computer-board.helm-projected button>span{font-size:16px;}
 body[data-bridge="on"]>#bridge-computer-board.helm-projected button>b{font-size:11px!important;}
 body[data-bridge="on"] .planet-map .space-action-convoy{width:24%;height:14%;}
 body[data-bridge="on"] .planet-map .space-action-object strong{font-size:8px;max-width:95px;}
}
@media(max-height:650px) and (min-width:701px){body[data-bridge="on"]>#bridge-computer-board.helm-projected{padding-top:10px!important;}body[data-bridge="on"]>#bridge-computer-board.helm-projected button{flex-direction:row!important;}body[data-bridge="on"]>#bridge-computer-board.helm-projected button>span{font-size:14px!important;}body[data-bridge="on"]>#bridge-computer-board.helm-projected button>b{font-size:10px!important;}}
/* Single continuous view: no blurred landscape rectangle or alternate movie. */
body[data-bridge="on"] #quick-orders{display:none!important}
body[data-bridge="on"] .header-actions>.music-entry{position:static!important;inset:auto!important;z-index:auto!important;flex:none!important;width:auto!important;max-width:82px!important;min-height:36px!important;height:36px!important;padding:5px 8px!important;font:600 11px/1.2 system-ui!important;border:1px solid #6abfd080!important;border-radius:7px!important;background:#09233499!important;box-shadow:none!important;color:#d7f7ff!important}
body[data-bridge="on"] #bridge-computer-board button>span,body[data-bridge="on"] #bridge-computer-board button>b{position:static!important;inset:auto!important;transform:none!important;float:none!important;order:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;font-style:normal!important;text-decoration:none!important;color:#cef5ff!important;white-space:nowrap!important}
body[data-bridge="on"] #bridge-computer-board button>span{font-weight:400!important}
@media(orientation:portrait){
 body[data-bridge="on"] .starfall-header-brand{width:105px!important;max-width:25vw!important}
 body[data-bridge="on"] #commander-open{max-width:125px!important;font-size:10px!important;padding:5px 7px!important}
 body[data-bridge="on"] .header-actions{gap:5px!important}
 body[data-bridge="on"] .save-status,body[data-bridge="on"] .game-update{display:none!important}
 body[data-bridge="on"] .main>header{gap:7px!important;padding-left:8px!important;padding-right:8px!important;justify-content:space-between!important}
 body[data-bridge="on"] .header-actions>.music-entry{max-width:60px!important;padding:4px 6px!important;font-size:10px!important;min-height:34px!important;height:34px!important}
 body[data-bridge="on"] .planet-map .ark-world-node{left:19%;top:35%;width:86px!important;min-height:0!important}
 body[data-bridge="on"] .planet-map .ark-world-node .ark-art{height:57px!important}
 body[data-bridge="on"] .planet-map .ark-world-node>b{font-size:9px!important;padding:2px 3px!important;line-height:1.15!important;background:#041c2c99!important}
 body[data-bridge="on"] .planet-map .ark-world-node>small{font-size:7px!important;line-height:1.2!important;padding:2px!important;background:#041c2c99!important;white-space:nowrap!important}
 body[data-bridge="on"] .planet-map .rare-wreck-marker{left:82%;top:78%;width:76px!important;min-height:0!important}
 body[data-bridge="on"] .planet-map .rare-wreck-marker img{width:53px!important;height:36px!important}
 body[data-bridge="on"] .planet-map .rare-wreck-marker>b{font-size:8px!important;line-height:1.2!important;padding:3px!important;background:#071a2bb0!important}
 body[data-bridge="on"] .planet-map .rare-wreck-marker>small{display:none!important}
 body[data-bridge="on"] .planet-map .rare-wreck-marker i{left:42px;top:15px;width:4px;height:4px}
 body[data-bridge="on"] .planet-map .map-commander-card{max-width:74px!important;gap:2px!important;padding:2px!important;font:8px/1.15 system-ui!important;background:#03172688!important}
 body[data-bridge="on"] .planet-map .map-commander-card>img{width:21px!important;height:21px!important;min-width:21px!important}
 body[data-bridge="on"] .planet-map .map-commander-card b{font-size:8px!important;line-height:1.15!important;max-width:49px!important;overflow:hidden;text-overflow:ellipsis;display:block!important;white-space:nowrap!important}
 body[data-bridge="on"] .planet-map .map-commander-card small{display:none!important}
 body[data-bridge="on"] .planet-map .system-position .system-world-name{font-size:7px!important;line-height:1.1!important;max-width:61px!important}
 body[data-bridge="on"] .planet-map .home-anchor .destination-caption{font-size:8px!important;padding:3px 5px!important;max-width:94px!important}
 body[data-bridge="on"] .planet-map .home-anchor .destination-caption code{display:none!important}
 body[data-bridge="on"]>#bridge-computer-board.helm-projected button{flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:4px!important}
 body[data-bridge="on"]>#bridge-computer-board.helm-projected button>span{order:0!important;font-size:19px!important;line-height:1!important}
 body[data-bridge="on"]>#bridge-computer-board.helm-projected button>b{order:1!important;font-size:11px!important;line-height:1.2!important}
}
/* Distant decorative traffic: no second decoder, no player counts or simulated commands. */
.helm-ambient-sky{position:absolute;left:4%;top:calc(3%*var(--helm-art-scale));width:92%;height:calc(52%*var(--helm-art-scale));z-index:2;pointer-events:none;overflow:hidden;clip-path:polygon(6.52% 7.69%,93.48% 7.69%,98.91% 48.08%,94.57% 94.23%,5.43% 94.23%,1.09% 48.08%);contain:paint}
.helm-star-glints{position:absolute;inset:0;background:radial-gradient(circle at 16% 18%,#e3f9ffdd 0 1px,#6cb8ff44 2px,transparent 6px),radial-gradient(circle at 37% 68%,#effbffdd 0 1px,#a2caff44 2px,transparent 5px),radial-gradient(circle at 68% 24%,#f3fdffdd 0 1px,#9ae8ff44 2px,transparent 6px),radial-gradient(circle at 84% 72%,#e5f5ffdd 0 1px,#a4ccff33 2px,transparent 5px),radial-gradient(circle at 29% 43%,#eef9ffcc 0 1px,transparent 4px);animation:helm-starlight 11s ease-in-out infinite;opacity:.45}
.helm-patrol{position:absolute!important;width:clamp(17px,2.6vw,42px)!important;height:clamp(10px,1.8vw,26px)!important;object-fit:contain!important;filter:drop-shadow(-5px 0 3px #6ce5ff88);pointer-events:none;opacity:.8;will-change:transform;}
.helm-patrol-one{top:29%;left:-7%;animation:helm-patrol-cross 48s linear infinite}
.helm-patrol-two{top:63%;left:-7%;animation:helm-patrol-cross 65s linear infinite reverse;animation-delay:-23s;scale:-1 1}
.helm-patrol-three{top:44%;left:-7%;animation:helm-patrol-cross 78s linear infinite;animation-delay:-41s;width:clamp(22px,3.4vw,56px)!important}
@keyframes helm-patrol-cross{0%{transform:translateX(0) translateY(0);opacity:0}8%{opacity:.8}50%{transform:translateX(47vw) translateY(-9px)}92%{opacity:.8}100%{transform:translateX(105vw) translateY(0);opacity:0}}
@keyframes helm-starlight{0%,100%{opacity:.3;transform:translate(0,0)}50%{opacity:.9;transform:translate(3px,-2px)}}
body[data-motion="off"] .helm-ambient-sky,body.ambient-hidden .helm-ambient-sky{display:none!important}
@media(prefers-reduced-motion:reduce){.helm-ambient-sky{display:none!important}}
@media(orientation:portrait){.helm-ambient-sky{height:calc(56%*var(--helm-art-scale));clip-path:polygon(6.52% 8.93%,93.48% 8.93%,100% 48.21%,96.74% 94.64%,3.26% 94.64%,0 48.21%)}}
/* Compact labels in either orientation; retain every tap target and real flight profile. */
@media(pointer:coarse){
 body[data-bridge="on"] .save-status{font-size:9px!important;max-width:145px!important;white-space:nowrap}
 body[data-bridge="on"] .header-actions>[data-game-update]{display:none!important}
 body[data-bridge="on"] #owner-tools{width:36px!important;height:36px!important;bottom:8px!important;right:8px!important}
 body[data-bridge="on"] #owner-tools button{width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;font-size:21px!important;border-radius:50%!important;overflow:hidden!important;line-height:1!important}
 body[data-bridge="on"] .planet-map .map-commander-card>img{width:22px!important;min-width:22px!important;height:22px!important}
 body[data-bridge="on"] .planet-map .map-commander-card{max-width:85px!important;padding:2px!important;gap:3px!important}
 body[data-bridge="on"] .planet-map .map-commander-card b{font:600 9px/1.15 system-ui!important;max-width:58px!important;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important}
 body[data-bridge="on"] .planet-map .map-commander-card small{display:none!important}
 body[data-bridge="on"] .planet-map .system-position>img{width:22px!important;height:22px!important}
 body[data-bridge="on"] .planet-map .system-world-name{font-size:8px!important;min-width:0!important;max-width:72px!important;line-height:1.15!important}
 body[data-bridge="on"] .planet-map .ark-world-node{left:21%;top:26%;width:88px!important;min-height:0!important}
 body[data-bridge="on"] .planet-map .ark-world-node .ark-art{height:54px!important}
 body[data-bridge="on"] .planet-map .ark-world-node>b{font-size:9px!important;padding:2px!important}
 body[data-bridge="on"] .planet-map .ark-world-node>small{font-size:7px!important;white-space:nowrap!important;padding:2px!important}
 body[data-bridge="on"] .planet-map .rare-wreck-marker{left:81%;top:74%;width:81px!important;min-height:0!important}
 body[data-bridge="on"] .planet-map .rare-wreck-marker img{width:55px!important;height:33px!important}
 body[data-bridge="on"] .planet-map .rare-wreck-marker>b{font-size:8px!important;padding:3px!important}
 body[data-bridge="on"] .planet-map .rare-wreck-marker>small{display:none!important}
 body[data-bridge="on"] .planet-map .home-anchor .destination-caption{max-width:105px!important;padding:3px 5px!important}
 body[data-bridge="on"] .planet-map .home-anchor .destination-caption b{font-size:9px!important}
 body[data-bridge="on"] .planet-map .home-anchor .destination-caption small{font-size:8px!important}
 body[data-bridge="on"] .planet-map .home-anchor .destination-caption code{display:none!important}
}
/* Phone landscape uses the same projected desk and monitors as desktop. */
@media(max-height:600px) and (orientation:landscape) and (pointer:coarse){
 body[data-bridge="on"]{--bridge-header:calc(42px + env(safe-area-inset-top))}
 body[data-bridge="on"] .main>header{padding:3px max(10px,env(safe-area-inset-right)) 3px max(10px,env(safe-area-inset-left))!important;gap:8px!important}
 body[data-bridge="on"] .starfall-header-brand{width:125px!important;max-width:20vw!important}
 body[data-bridge="on"] #commander-open{font-size:11px!important;min-height:32px!important;padding:4px 8px!important}
}

.helm-patrol-two{animation-name:helm-patrol-return;animation-direction:normal;scale:1}
@keyframes helm-patrol-return{0%{transform:translateX(105vw) translateY(0) scaleX(-1);opacity:0}8%{opacity:.8}50%{transform:translateX(47vw) translateY(7px) scaleX(-1)}92%{opacity:.8}100%{transform:translateX(0) translateY(0) scaleX(-1);opacity:0}}
/* The real board projects the open system window; the light never intercepts input. */
.bridge-holo-projection{display:none;position:absolute;inset:0;z-index:25;pointer-events:none;overflow:hidden;--holo-source:calc(var(--helm-console-top) - var(--bridge-top) + var(--helm-console-height)*.16)}
body[data-bridge="on"][data-bridge-projection="on"] .bridge-holo-projection,body[data-bridge="on"]:has(dialog[open]) .bridge-holo-projection{display:block}
.bridge-holo-projection[hidden]{display:none!important}
.holo-fan,.holo-ray{position:absolute;display:block;top:54px;bottom:calc(100% - var(--holo-source));left:15%;right:15%;transform-origin:50% 100%;pointer-events:none;}
.holo-fan{clip-path:polygon(0 0,100% 0,65% 100%,35% 100%);background:linear-gradient(0deg,#64eaff55,#4cd8ff12 65%,#97efff08),repeating-linear-gradient(92deg,transparent 0 11%,#99f5ff08 11.3% 11.7%,transparent 12% 20%);opacity:.65}
.holo-ray{background:linear-gradient(0deg,#c1ffff88,#49d9ff22 70%,transparent);opacity:.6}
.holo-ray-left{clip-path:polygon(0 0,2% 0,49% 100%,46% 100%)}
.holo-ray-right{clip-path:polygon(98% 0,100% 0,54% 100%,51% 100%)}
.holo-emitter{display:block;position:absolute;left:42%;width:16%;top:var(--holo-source);height:3px;border-radius:50%;background:#d0ffff;box-shadow:0 0 7px 2px #9effff,0 -7px 20px 5px #4ae6ff66;opacity:.8;pointer-events:none}
body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"][data-bridge-operations="open"] .bridge-operations{background:linear-gradient(145deg,#1a657e99,#041c30de 65%)!important;border:1px solid #9beeffb0!important;border-top:2px solid #c1ffffbb!important;border-radius:7px!important;box-shadow:inset 0 0 28px #3ed9ff10,0 0 0 1px #021c2c99,0 0 30px #3de6ff24,0 12px 35px #0007!important;transform-origin:50% 100%;}
body[data-bridge="on"] .bridge-sheet::before{content:'HOLOGRAMM / SYSTEMZUGRIFF';color:#b1f7ff;letter-spacing:.15em;border-bottom-color:#8ef3ff66}
body[data-bridge="on"][data-bridge-view="overview"] .bridge-sheet::before{content:'HOLOGRAMM / KOLONIE'}
body[data-bridge="on"][data-bridge-view="shipyard"] .bridge-sheet::before{content:'HOLOGRAMM / WERFT'}
body[data-bridge="on"][data-bridge-view="research"] .bridge-sheet::before{content:'HOLOGRAMM / FORSCHUNG'}
body[data-bridge="on"][data-bridge-view="defense"] .bridge-sheet::before{content:'HOLOGRAMM / ABWEHR'}
body[data-bridge="on"] dialog[open]{border-color:#95f4ff99!important;box-shadow:inset 0 1px #adffff33,0 0 32px #34dcff33,0 20px 75px #0009!important;background:linear-gradient(145deg,#103b50f5,#071623f7)!important;animation:holo-dialog-open .3s ease-out both}
body[data-bridge="on"] dialog::backdrop{background:#000c18a6;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}
@keyframes holo-beam-rise{from{opacity:0;transform:scaleY(.04)}to{opacity:.65;transform:scaleY(1)}}
@keyframes holo-window-open{from{opacity:0;transform:perspective(900px) translateY(clamp(26px,7vh,65px)) rotateX(5deg) scale(.985)}to{opacity:1;transform:perspective(900px) translateY(0) rotateX(0) scale(1)}}
/* Portrait-only microcomputer. Use the same live resource buttons, never copied values. */
@media(orientation:portrait){
 body[data-bridge="on"]{--bridge-top:var(--bridge-header)}
 body[data-bridge="on"] #resources{position:fixed!important;inset:calc(var(--helm-console-top) - 116px) auto auto 12px!important;width:156px!important;height:84px!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:1px!important;padding:17px 4px 4px!important;transform:none!important;overflow:hidden!important;background:linear-gradient(145deg,#16455be8,#041524ed)!important;border:1px solid #7ed7eb99!important;border-top:3px solid #83d6e5bb!important;border-radius:8px 8px 5px 5px!important;box-shadow:inset 0 0 12px #5bdcff13,0 0 0 2px #071524bb,0 4px 13px #0007!important;z-index:49!important}
 body[data-bridge="on"] #resources::before{content:'▣ ROHSTOFFE';position:absolute;top:4px;left:7px;right:7px;color:#a9e9f8;font:7px/1 ui-monospace,monospace;letter-spacing:.13em;border-bottom:1px solid #74d3e733;padding-bottom:4px;pointer-events:none}
 body[data-bridge="on"] #resources .resource{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:3px!important;height:100%!important;min-height:0!important;min-width:0!important;padding:2px!important;border:0!important;border-radius:2px!important;background:#0a2b3b55!important;box-shadow:none!important;overflow:hidden!important}
 body[data-bridge="on"] #resources .resource .resource-image{display:block!important;width:13px!important;min-width:13px!important;height:15px!important;object-fit:contain!important}
 body[data-bridge="on"] #resources .resource>span{display:grid;gap:1px;min-width:0;overflow:hidden}
 body[data-bridge="on"] #resources .resource small{font:6px/1 system-ui!important;color:#a5cbd6!important;white-space:nowrap!important}
 body[data-bridge="on"] #resources .resource strong{font:700 11px/1.1 system-ui!important;color:#effcff!important;white-space:nowrap!important;letter-spacing:0!important}
 body[data-bridge="on"] #resources .resource em{display:none!important}
 body[data-bridge="on"] #resources .resource.energy-warning{outline:1px solid #f6907299!important;outline-offset:-1px}
 body[data-bridge="on"] #resources .boss-resource-boost-tag{display:none!important}
 body[data-bridge="on"] .bridge-layout-toggle{top:calc(var(--bridge-top) + 10px)!important;right:10px!important;font-size:8px!important;padding:4px 8px!important;min-height:29px!important}
 body[data-bridge="on"] .bridge-sector-search{top:48px!important;right:10px!important;max-width:150px!important}
 body[data-bridge="on"] .bridge-sector-search>summary{font-size:9px!important;padding:7px!important;min-height:33px!important}
 body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations{top:calc(var(--bridge-top) + 45px)!important;left:8px!important;right:8px!important;padding:12px!important}
 body[data-bridge="on"] .holo-fan,body[data-bridge="on"] .holo-ray{top:105px;left:8px;right:8px}
 body[data-bridge="on"] .holo-emitter{width:24%;left:38%}
}
@media(max-height:600px) and (orientation:landscape){body[data-bridge="on"] .holo-fan,body[data-bridge="on"] .holo-ray{top:45px}body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations{top:calc(var(--bridge-top) + 45px)!important}}
body[data-motion="off"] .holo-fan,body[data-motion="off"] .holo-ray,body[data-motion="off"] .bridge-sheet,body[data-motion="off"] .bridge-operations,body[data-motion="off"] dialog{animation:none!important}
@media(prefers-reduced-motion:reduce){.holo-fan,.holo-ray,body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations,body[data-bridge="on"] dialog{animation:none!important}}

body[data-bridge="on"][data-holo-entering="on"] .holo-fan,body[data-bridge="on"][data-holo-entering="on"] .holo-ray{animation:holo-beam-rise .38s ease-out both}
body[data-bridge="on"][data-holo-entering="on"] .bridge-sheet,body[data-bridge="on"][data-holo-entering="on"][data-bridge-operations="open"] .bridge-operations{animation:holo-window-open .38s cubic-bezier(.2,.7,.2,1) both}
@keyframes holo-dialog-open{from{opacity:0}to{opacity:1}}
body[data-motion="off"] .bridge-holo-projection *{animation:none!important}
@media(prefers-reduced-motion:reduce){body[data-bridge="on"] .bridge-holo-projection *,body[data-bridge="on"][data-holo-entering="on"] .bridge-sheet,body[data-bridge="on"][data-holo-entering="on"] .bridge-operations{animation:none!important}}
@media(orientation:portrait){body[data-bridge="on"] #boss-world-boost:not([hidden]){inset:calc(var(--bridge-top) + 88px) 10px auto auto!important;left:auto!important;width:135px!important;max-width:135px!important;transform:none!important}body[data-bridge="on"][data-bridge-projection="on"] #boss-world-boost{visibility:hidden}}

/* The portrait inventory sits beside the captain's desk, below the outside scene. */
@media(orientation:portrait){
 body[data-bridge="on"] #resources .resource>span{display:flex!important;flex-direction:column!important;align-items:flex-start!important;position:static!important;width:auto!important;height:auto!important;opacity:1!important;visibility:visible!important}
 body[data-bridge="on"] #resources .resource strong{display:block!important;position:static!important;opacity:1!important;visibility:visible!important;max-height:none!important;min-height:13px!important;transform:none!important}
 body[data-bridge="on"] #resources .resource small{display:block!important}
 body[data-bridge="on"][data-bridge-projection="on"] #resources{z-index:90!important}
}

/* Keep a visible column of projected light between glass and the floating window. */
body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations{bottom:calc(100dvh - var(--helm-console-top) + 42px)!important}
body[data-bridge="on"] .holo-fan{opacity:.9;background:linear-gradient(0deg,#70edff99,#39cfff30 55%,#97efff12),repeating-linear-gradient(92deg,transparent 0 11%,#99f5ff18 11.3% 11.7%,transparent 12% 20%)}
body[data-bridge="on"] .holo-emitter{height:5px;box-shadow:0 0 10px 3px #9effff,0 -12px 36px 12px #4ae6ff88}
@media(orientation:portrait){
 body[data-bridge="on"] #resources .resource .resource-image{display:none!important}
 body[data-bridge="on"] #resources .resource{display:block!important;text-align:left!important;padding:3px 6px!important}
 body[data-bridge="on"] #resources .resource>span{display:flex!important;justify-content:center!important;gap:3px!important;overflow:visible!important}
 body[data-bridge="on"] #resources .resource strong{font:700 13px/1.15 system-ui!important;min-height:15px!important}
 body[data-bridge="on"] #resources .resource small{font:7px/1 system-ui!important}
}
@media(max-height:600px) and (orientation:landscape){body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations{bottom:calc(100dvh - var(--helm-console-top) + 18px)!important}}

/* v321: physical side monitors, located on the desks above the command glass. */
body[data-bridge="on"]{--helm-monitor-top:calc(var(--bridge-top) + var(--helm-height)*.49*var(--helm-art-scale))}
body[data-bridge="on"] :is(#resources,.helm-right-display).helm-projected{overflow:visible!important;border:5px solid #172532!important;border-top-color:#52616a!important;border-bottom-color:#060c13!important;border-radius:3px!important;background:linear-gradient(125deg,#082536f5,#020b14fa)!important;box-shadow:0 2px 0 2px #02060b,0 7px 8px #0008,inset 0 0 0 1px #64cfe766!important;padding:9px 5px 3px!important}
body[data-bridge="on"] :is(#resources,.helm-right-display).helm-projected::before{content:'SYSTEME / LIVE';position:absolute;top:2px;left:6px;right:6px;border-bottom:1px solid #4ecbe333;color:#7fcfe1;font:5px/1.2 ui-monospace,monospace;letter-spacing:.12em;padding:0 0 2px}
body[data-bridge="on"] #resources.helm-projected::before{content:'ROHSTOFFE / LIVE'}
body[data-bridge="on"] :is(#resources,.helm-right-display).helm-projected::after{content:'';position:absolute;top:100%;left:43%;width:14%;height:14px;background:linear-gradient(90deg,#04090e,#53616b 45%,#101923 70%);box-shadow:0 5px 0 3px #111b24;pointer-events:none;z-index:-1}
body[data-bridge="on"] #resources.helm-projected .resource{display:flex!important;justify-content:flex-start!important;min-height:0!important;height:auto!important;padding:2px 4px!important;background:transparent!important;overflow:visible!important}
body[data-bridge="on"] #resources.helm-projected .resource .resource-image{display:none!important}
body[data-bridge="on"] #resources.helm-projected .resource>span{display:flex!important;flex-direction:column!important;gap:1px!important;overflow:visible!important}
body[data-bridge="on"] #resources.helm-projected .resource small{display:block!important;font:6px/1.1 system-ui!important;color:#91becd!important}
body[data-bridge="on"] #resources.helm-projected .resource strong{display:block!important;min-height:0!important;font:700 clamp(11px,1.1vw,18px)/1.15 system-ui!important;color:#dcf9ff!important;font-variant-numeric:tabular-nums!important;text-shadow:0 0 5px #62dfff44}
body[data-bridge="on"] #resources.helm-projected .resource em{display:none!important}
body[data-bridge="on"] .helm-right-display.helm-projected{grid-template-rows:48% 22% 30%;gap:0!important}
body[data-bridge="on"] .helm-right-display.helm-projected .bridge-flight-status{font-size:9px!important;grid-template-columns:1fr 25px!important}
body[data-bridge="on"] .helm-right-display.helm-projected #boss-announcement{display:block!important;font-size:6px!important;line-height:1.1!important;overflow:auto!important}
body[data-bridge="on"] .helm-right-display.helm-projected .bridge-operations-button{font-size:7px!important}
body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations{bottom:calc(100dvh - var(--helm-monitor-top) + 12px)!important;background:linear-gradient(130deg,#082d3ccc,#071923e8)!important;border:1px solid #8de4ed66!important;border-top:1px solid #b5f6ff99!important;border-radius:3px!important;box-shadow:inset 0 0 18px #42d6f20b,0 0 16px #51dfff12,0 10px 28px #0008!important}
/* Diffuse light in the air: no hard triangles or painted white rays. */
body[data-bridge="on"] .holo-fan{top:auto!important;bottom:calc(100% - var(--holo-source));height:35%;left:22%!important;right:22%!important;clip-path:none!important;background:radial-gradient(ellipse at 50% 100%,#77edff38,transparent 68%)!important;mask-image:radial-gradient(ellipse at 50% 100%,#000 0,transparent 72%);-webkit-mask-image:radial-gradient(ellipse at 50% 100%,#000 0,transparent 72%);opacity:.7!important}
body[data-bridge="on"] .holo-ray{display:none!important}
body[data-bridge="on"] .holo-emitter{height:2px;left:46%;width:8%;background:#a5edff99;box-shadow:0 0 7px 1px #83e9ff66,0 -10px 24px 6px #48dfff2b;opacity:.75}
@media(orientation:portrait){
 body[data-bridge="on"]{--helm-monitor-top:calc(var(--bridge-top) + var(--helm-height)*.552*var(--helm-art-scale))}
 body[data-bridge="on"] #resources.helm-projected{width:auto;height:auto;gap:0!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;z-index:49!important}
 body[data-bridge="on"] #resources.helm-projected .resource strong{font-size:12px!important}
 body[data-bridge="on"] #resources.helm-projected .resource small{font-size:6px!important}
 body[data-bridge="on"] .helm-right-display.helm-projected .bridge-flight-status{font-size:8px!important}
 body[data-bridge="on"] .helm-right-display.helm-projected .bridge-flight-status strong{font-size:17px!important}
 body[data-bridge="on"] .holo-fan{left:25%!important;right:25%!important}
}
@media(max-height:600px) and (orientation:landscape){body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations{bottom:calc(100dvh - var(--helm-console-top) + 18px)!important}}

/* Preserve spherical worlds; never stretch the cinema across the glass. */
.helm-window-film{object-fit:cover!important}

/* v322: edge-lit transparent glass instruments, no freestanding desktop-monitor case. */
body[data-bridge="on"] :is(#resources,.helm-right-display).helm-projected{border:1px solid #92efff88!important;border-top:1px solid #bbf9ffb0!important;border-bottom:1px solid #51c6e888!important;border-radius:0!important;background:linear-gradient(125deg,#0c3c4b42,#04162375)!important;box-shadow:inset 0 0 0 1px #51d2ed16,inset 0 0 16px #57dfff0c,0 0 7px #4ddfff18!important;backdrop-filter:blur(1px);-webkit-backdrop-filter:blur(1px);padding:10px 5px 3px!important;isolation:isolate}
body[data-bridge="on"] :is(#resources,.helm-right-display).helm-projected::after{top:0!important;left:0!important;right:0!important;bottom:0!important;width:auto!important;height:auto!important;z-index:-1!important;background:repeating-linear-gradient(0deg,transparent 0 10px,#72ddf90b 10px 11px),radial-gradient(circle at 82% 50%,transparent 0 13%,#7ee9ff23 13.3% 13.8%,transparent 14% 20%,#7ee9ff1b 20.3% 20.8%,transparent 21%)!important;box-shadow:none!important;pointer-events:none}
body[data-bridge="on"] :is(#resources,.helm-right-display).helm-projected::before{color:#9de6f1;font-size:5px;letter-spacing:.18em;border-bottom:1px solid #84e5f344}
body[data-bridge="on"] #resources.helm-projected .resource strong{font-weight:500!important;letter-spacing:.04em!important;color:#b8f1ff!important;text-shadow:0 0 5px #5de4ff66}
body[data-bridge="on"] .helm-right-display.helm-projected .bridge-flight-status{color:#b8f1ff!important;text-shadow:0 0 5px #5de4ff44}
/* Real screen bounds define the projection, so its source stays on the selected key. */
.holo-volume{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
body[data-bridge="on"] .holo-fan,body[data-bridge="on"] .holo-ray,body[data-bridge="on"] .holo-emitter{display:none!important}
body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations{background:linear-gradient(125deg,#0b35465c,#0313228c)!important;border:1px solid #85eaff88!important;border-top:1px solid #c2faffaa!important;border-bottom:1px solid #a2f5ffcc!important;box-shadow:inset 0 0 24px #40d9ff0c,0 0 16px #3cdfff18!important;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);text-shadow:0 0 4px #85f1ff18}
body[data-bridge="on"] .bridge-sheet :is(#action-inline,.panel,.data-panel,.quiet-status,.subsystem-content,.tablet-screen,.action-inline-head){background:transparent!important;background-image:none!important;border-color:#72dfed3b!important;box-shadow:none!important}
body[data-bridge="on"] .bridge-sheet::before{content:'KOLONIE / SYSTEMZUGRIFF';font-weight:400;color:#9befff;text-shadow:0 0 7px #54ddff77}
body[data-bridge="on"][data-bridge-view="shipyard"] .bridge-sheet::before{content:'WERFT / SYSTEMZUGRIFF'}
body[data-bridge="on"][data-bridge-view="research"] .bridge-sheet::before{content:'FORSCHUNG / SYSTEMZUGRIFF'}
body[data-bridge="on"][data-bridge-view="defense"] .bridge-sheet::before{content:'ABWEHR / SYSTEMZUGRIFF'}

body[data-bridge="on"] :is(#resources,.helm-right-display).helm-projected::after{background:url('assets/helm-glass-instruments-v322.svg') center/100% 100% no-repeat!important;opacity:.32}
body[data-bridge="on"] .bridge-sheet .living-village{opacity:.92;filter:drop-shadow(0 0 6px #55dfff33)}
body[data-bridge="on"][data-holo-entering="on"] .holo-volume{animation:holo-dialog-open .32s ease-out both}
@media(prefers-reduced-motion:reduce){body[data-bridge="on"] .holo-volume{animation:none!important}}
body[data-motion="off"] .holo-volume{animation:none!important}

/* Detail and player dialogs use the same projector as the main system panes. */
body[data-bridge="on"] dialog[open]{top:calc(var(--bridge-top) + 45px)!important;bottom:auto!important;max-height:max(160px,calc(var(--helm-monitor-top) - var(--bridge-top) - 65px))!important;margin:0 auto!important;background:linear-gradient(125deg,#0b3546a6,#031322cc)!important;border:1px solid #85eaff99!important;border-bottom:1px solid #b1f7ffcc!important;box-shadow:inset 0 0 24px #40d9ff0c,0 0 20px #3cdfff28!important;overflow:auto!important}
body[data-bridge="on"] dialog::backdrop{background:#00132226;backdrop-filter:none;-webkit-backdrop-filter:none}

/* Canvas projection is in viewport coordinates, outside the clipped world layer.
   No SVG fragment/filter references: these resolve differently under a base URL on WebKit. */
body[data-bridge="on"]>.bridge-holo-projection{position:fixed;inset:0;z-index:79;overflow:visible;pointer-events:none}
body[data-bridge="on"] .holo-volume{display:block!important;position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:1}
body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations,body[data-bridge="on"] dialog{--holo-rise-distance:120px;--holo-shift-x:0px;transform-origin:50% 100%}
body[data-bridge="on"][data-holo-entering="on"] .bridge-sheet,body[data-bridge="on"][data-holo-entering="on"][data-bridge-operations="open"] .bridge-operations,body[data-bridge="on"][data-holo-entering="on"] dialog[open]{animation:holo-materialize .6s cubic-bezier(.2,.65,.2,1) both!important}
body[data-bridge="on"] .holo-folding{animation:holo-dematerialize .3s ease-in both!important;pointer-events:none}
@keyframes holo-materialize{0%{opacity:0;transform:translate(var(--holo-shift-x),var(--holo-rise-distance)) scale(.06,.01);filter:brightness(1.8)}25%{opacity:.55;transform:translate(calc(var(--holo-shift-x)*.45),calc(var(--holo-rise-distance)*.45)) scale(.75,.12);filter:brightness(1.35)}65%{opacity:.9;filter:brightness(1.08)}100%{opacity:1;transform:translate(0,0) scale(1);filter:brightness(1)}}
@keyframes holo-dematerialize{0%{opacity:1;transform:translate(0,0) scale(1)}70%{opacity:.6;transform:translate(calc(var(--holo-shift-x)*.4),calc(var(--holo-rise-distance)*.45)) scale(.7,.12)}100%{opacity:0;transform:translate(var(--holo-shift-x),var(--holo-rise-distance)) scale(.06,.01)}}
@media(prefers-reduced-motion:reduce){body[data-bridge="on"] .bridge-sheet,body[data-bridge="on"] .bridge-operations,body[data-bridge="on"] dialog{animation:none!important}}
body[data-bridge="on"][data-motion="off"] .bridge-sheet,body[data-bridge="on"][data-motion="off"] .bridge-operations,body[data-bridge="on"][data-motion="off"] dialog{animation:none!important}

/* v326: keep all fifteen destinations available, without opaque map tiles. */
body[data-bridge="on"] .planet-map .system-position,
body[data-bridge="on"] .planet-map .system-position:not(:has(small)){
 display:flex!important;background:transparent!important;border-color:transparent!important;box-shadow:none!important;backdrop-filter:none!important;
}
body[data-bridge="on"] .planet-map .system-position .system-world-name{background:transparent!important;text-shadow:0 1px 3px #000,0 0 5px #000}
body[data-bridge="on"] .planet-map .ark-world-node{left:30%!important;top:10%!important;width:90px!important;z-index:3!important}
@media(orientation:portrait){
 body[data-bridge="on"] .planet-map .ark-world-node{left:25%!important;top:8%!important;width:72px!important}
 body[data-bridge="on"] .planet-map .ark-world-node .ark-art{height:38px!important}
 body[data-bridge="on"] .planet-map .system-position{width:44px!important;min-height:30px!important}
 body[data-bridge="on"] .planet-map .system-position>img{width:23px!important;height:23px!important}
}

/* v327: transparent projection and readable destinations in both orientations. */
body[data-bridge="on"] :is(.bridge-sheet,.bridge-operations),
body[data-bridge="on"] dialog[open]{background:linear-gradient(125deg,#0b354638,#03132259)!important;backdrop-filter:blur(1px)!important;-webkit-backdrop-filter:blur(1px)!important}
body[data-bridge="on"] .planet-map .system-coordinate{display:block!important;font:7px/1.15 system-ui!important;color:#bce8f6;text-shadow:0 1px 3px #000;background:transparent!important;white-space:nowrap}
body[data-bridge="on"] .planet-map .system-world-name{display:block!important;white-space:normal!important;max-width:88px!important;line-height:1.15!important}
body[data-bridge="on"] .planet-map .system-position{overflow:visible!important;gap:1px!important}
body[data-bridge="on"] .planet-map .system-position .map-commander-card{top:0!important;left:calc(100% + 5px)!important;right:auto!important}
body[data-bridge="on"] .planet-map .system-position:is([data-position="2"],[data-position="3"],[data-position="4"],[data-position="5"],[data-position="6"],[data-position="7"],[data-position="8"]) .map-commander-card{left:auto!important;right:calc(100% + 5px)!important}
body[data-bridge="on"] .planet-map .home-anchor .destination-caption{overflow:visible!important}
@media(orientation:landscape){
 body[data-bridge="on"] .planet-map .ark-world-node{left:29%!important;top:30%!important;width:78px!important}
 body[data-bridge="on"] .planet-map .ark-world-node .ark-art{height:40px!important}
 body[data-bridge="on"] .planet-map .ark-world-node>b{font-size:9px!important}
 body[data-bridge="on"] .planet-map .home-anchor .map-commander-card{left:115%!important;top:-16px!important}
}
@media(orientation:portrait){
 body[data-bridge="on"] .planet-map .ark-world-node{left:20%!important;top:3%!important}
 body[data-bridge="on"] .planet-map .system-position{width:52px!important}
 body[data-bridge="on"] .planet-map .system-world-name{font-size:7px!important;max-width:68px!important}
 body[data-bridge="on"] .planet-map .system-coordinate{font-size:6px!important}
}

/* v328: quiet mailbox, complete reports expand only when requested. */
body[data-bridge="on"] .mailbox-welcome{background:transparent!important;padding:10px 0!important;border:0!important;margin:0 0 12px!important}
.mailbox-welcome>img{display:none}
.mail-report-fold>summary{cursor:pointer;font-size:14px;font-weight:600;line-height:1.45;padding:7px 0;color:#dbf7ff;overflow-wrap:anywhere}
.mail-report-fold[open]>summary{padding-bottom:14px;border-bottom:1px solid #9eeaff33;margin-bottom:12px}
.inbox-list .report{background:#03152260!important;padding:10px!important}
.inbox-list .report-content time{margin:2px 0!important}
.inbox-filters{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px!important}
.inbox-filters button{justify-content:center;min-width:0!important;padding:8px 4px!important;font-size:11px!important}
.inbox-filter-picture{display:none!important}
.mail-report-fold .recon-hero{min-height:0!important;padding:8px!important}
.mail-report-fold .recon-hero>img{width:48px!important;height:48px!important}
.mail-report-fold .recon-hero h3{font-size:16px!important}
@media(max-width:700px){.inbox-list .report{grid-template-columns:18px minmax(0,1fr) 30px!important}.inbox-list .report-symbol{display:none!important}.mailbox-actions{gap:5px!important}.mailbox-actions button{font-size:10px!important}}

/* v329: reserve the open center for live traffic and battle scenes. */
body[data-bridge="on"] .planet-map .home-anchor .destination-caption{display:none!important}
body[data-bridge="on"] .planet-map .ark-world-node{display:block;height:auto!important;max-height:none!important;overflow:visible!important;left:23%!important;top:24%!important;width:86px!important;min-height:0!important}
body[data-bridge="on"] .planet-map .ark-world-node .ark-art{display:block;position:relative!important;width:100%!important;height:48px!important;overflow:visible!important}
body[data-bridge="on"] .planet-map .ark-world-node .ark-art>img{display:block!important;position:static!important;width:100%!important;height:100%!important;max-height:none!important;max-width:none!important;object-fit:contain!important;object-position:center!important;transform:none!important;clip-path:none!important}
body[data-bridge="on"] .planet-map .system-position .map-commander-card{position:static!important;inset:auto!important;transform:none!important;width:max-content!important;max-width:78px!important;margin:3px auto 0!important;background:#03172655!important;border:0!important;padding:2px!important;justify-content:center}
body[data-bridge="on"] .planet-map .system-position .map-commander-card>img{width:16px!important;min-width:16px!important;height:16px!important}
body[data-bridge="on"] .planet-map .system-position .map-commander-card b{font-size:8px!important;max-width:54px!important}
body[data-bridge="on"] .planet-map .orbital-map-station{left:76%!important;top:59%!important;transform:translate(-50%,-50%)!important;width:76px!important;min-height:0!important;background:transparent!important;border:0!important;z-index:4!important}
body[data-bridge="on"] .planet-map .orbital-map-station img{width:68px!important;height:44px!important;object-fit:contain!important}
body[data-bridge="on"] .planet-map .orbital-map-station span{display:block;font-size:9px!important;background:#041b2d66!important;border:1px solid #89e7ff55;border-radius:4px;padding:3px!important}
body[data-bridge="on"] .planet-map .home-anchor .map-commander-card{left:calc(100% + 30px)!important;top:8px!important;transform:none!important}
@media(orientation:portrait){
 body[data-bridge="on"] .planet-map .ark-world-node{left:20%!important;top:17%!important;width:80px!important}
 body[data-bridge="on"] .planet-map .system-position .map-commander-card{max-width:62px!important;gap:2px!important}
 body[data-bridge="on"] .planet-map .system-position .map-commander-card b{font-size:7px!important;max-width:43px!important}
 body[data-bridge="on"] .planet-map .home-anchor .map-commander-card{left:calc(100% + 15px)!important;top:12px!important;max-width:82px!important}
 body[data-bridge="on"] .planet-map .orbital-map-station{left:75%!important;top:59%!important;width:67px!important}
 body[data-bridge="on"] .planet-map .orbital-map-station img{width:60px!important;height:40px!important}
}
body[data-bridge="on"] .planet-map:has(.space-action-sector) .ark-world-node{display:none!important}

/* v330: resource symbols float in the reserved gap, above the command desk. */
.bridge-resource-tray{display:none}
body[data-bridge="on"]>.bridge-resource-tray{position:fixed;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));left:38%;width:24%;top:calc(var(--helm-monitor-top) + var(--helm-height)*.025);gap:4px;z-index:50;padding:5px 2px;background:radial-gradient(ellipse at 50% 100%,#53dcff18,transparent 72%);border-bottom:1px solid #98ecff44;pointer-events:auto}
body[data-bridge="on"]>.bridge-resource-tray[hidden]{display:none}
.bridge-resource-tray button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0!important;min-height:40px;padding:3px 1px!important;background:transparent!important;border:0!important;box-shadow:none!important;border-radius:4px;color:#c3e6ec}
.bridge-resource-tray button:focus-visible{outline:1px solid #a0efff;outline-offset:2px}
.bridge-resource-tray button img{display:block;width:24px;height:24px;object-fit:contain;filter:drop-shadow(0 1px 3px #0008)}
.bridge-resource-tray button span{font:8px/1.1 system-ui;letter-spacing:.02em;white-space:nowrap;text-shadow:0 1px 3px #000}
@media(orientation:portrait){body[data-bridge="on"]>.bridge-resource-tray{grid-template-columns:repeat(2,minmax(0,1fr));top:calc(var(--helm-monitor-top) + var(--helm-height)*.008);gap:1px;padding:2px 0}.bridge-resource-tray button{min-height:30px;gap:2px}.bridge-resource-tray button img{width:17px;height:17px}.bridge-resource-tray button span{font-size:6px}}
body[data-bridge="on"].helm-flat-landscape>.bridge-resource-tray{display:none}

/* v331: close exterior flybys; the sky and cockpit camera remain fixed. */
body[data-bridge="on"] .planet-map .space-action-convoy{width:calc(27% * var(--convoy-depth,1))!important;height:calc(15% * var(--convoy-depth,1))!important;min-width:0!important;z-index:6!important;filter:drop-shadow(0 5px 5px #0007)!important;transition:left 1.1s linear,top 1.1s linear,width 1.1s linear,height 1.1s linear;overflow:visible!important}
body[data-bridge="on"] .planet-map .space-action-convoy>img{display:block;object-fit:contain;transform:rotate(var(--convoy-yaw,0deg));transition:transform 1.1s linear;filter:contrast(1.05) drop-shadow(0 0 4px #7db9dc22)}
body[data-bridge="on"] .planet-map .space-action-convoy>strong{top:83%!important;font-size:9px!important;max-width:140px!important;padding:3px 6px!important}
body[data-bridge="on"] .planet-map .space-action-convoy>small{top:calc(83% + 22px)!important;font-size:8px!important;padding:3px 6px!important}
@media(orientation:portrait){body[data-bridge="on"] .planet-map .space-action-convoy{width:calc(29% * var(--convoy-depth,1))!important;height:calc(12% * var(--convoy-depth,1))!important}}
body[data-motion="off"][data-bridge="on"] .planet-map .space-action-convoy,body[data-motion="off"][data-bridge="on"] .planet-map .space-action-convoy>img{transition:none!important}
@media(prefers-reduced-motion:reduce){body[data-bridge="on"] .planet-map .space-action-convoy,body[data-bridge="on"] .planet-map .space-action-convoy>img{transition:none!important}}

body[data-bridge="on"] .planet-map .space-action-convoy{pointer-events:none!important}
body[data-bridge="on"] .planet-map .space-action-convoy>:is(img,strong,small){pointer-events:auto}
body[data-bridge="on"] .planet-map:has(.space-action-sector) .space-action-convoy{width:24%!important;height:14%!important;z-index:2!important}

/* v332: feedback floats above the work desk, not over its controls. */
.bridge-layout-toggle,.bridge-resource-tray{display:none!important}
body[data-bridge="on"] #toast{position:fixed!important;left:50%!important;right:auto!important;top:auto!important;bottom:calc(100dvh - var(--helm-console-top) + 22px)!important;transform:translateX(-50%)!important;max-width:min(350px,80vw)!important;width:max-content!important;z-index:120!important;padding:9px 15px!important;background:#082532ed!important;border:1px solid #94e8f288!important;border-radius:8px!important;box-shadow:0 0 16px #4ddfff22!important;color:#e4faff!important;text-align:center;pointer-events:none}
.convoy-history{margin:12px 0;padding:12px;border:1px solid #87ddeb44;border-radius:8px;background:#05243244}
.convoy-history>summary{cursor:pointer;font-size:14px;color:#cdf5ff}
.convoy-history details{margin-top:10px;padding-top:9px;border-top:1px solid #87ddeb33}
.convoy-history pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.6 system-ui;color:#e2f0f6;padding:10px 0}

/* v333: actual destinations stay within the outside window, with legible worlds. */
body[data-bridge="on"] .planet-map .system-position{transform:translate(-50%,-18px)!important;height:auto!important;min-height:0!important;padding:0!important;width:78px!important;max-height:none!important;display:flex!important;flex-direction:column!important;align-items:center!important}
body[data-bridge="on"] .planet-map .system-position>img{width:36px!important;height:36px!important;min-width:36px!important;object-fit:contain!important}
body[data-bridge="on"] .planet-map .system-position.inhabited-world>img{width:42px!important;height:42px!important}
body[data-bridge="on"] .planet-map .system-world-name{font-size:9px!important;max-width:78px!important}
body[data-bridge="on"] .planet-map .system-coordinate{font-size:8px!important}
body[data-bridge="on"] .planet-map .ark-world-node{left:23%!important;top:10%!important;width:82px!important}
body[data-bridge="on"] .planet-map .debris-map-layer{display:block!important;visibility:visible!important;z-index:12!important;pointer-events:none}
body[data-bridge="on"] .planet-map .debris-map-mark{width:58px!important;height:52px!important;max-height:none!important;overflow:visible!important;transform:translate(-50%,32px)!important;pointer-events:auto}
body[data-bridge="on"] .planet-map .debris-map-mark img{width:48px!important;height:32px!important;max-width:none!important;margin:auto}
body[data-bridge="on"] .planet-map .debris-map-mark small{display:block!important;font:7px/1.2 system-ui!important;color:#ffe4b7;background:#061422a6;padding:2px;border-radius:3px}
.bridge-recycling-access{display:none}
body[data-bridge="on"] .bridge-recycling-access{display:block;position:absolute;left:8%;top:6%;z-index:24;min-height:32px!important;padding:5px 8px!important;font-size:10px!important;color:#c9eaf2;background:#062335b8!important;border:1px solid #8bd9ed55;border-radius:7px}
@media(orientation:landscape){
 body[data-bridge="on"] .sector-browser>.planet-map{inset:13% 7% 40%!important}
 body[data-bridge="on"] .planet-map .ark-world-node{left:25%!important;top:9%!important;width:78px!important}
 body[data-bridge="on"] .planet-map .ark-world-node .ark-art{height:42px!important}
 body[data-bridge="on"] .bridge-recycling-access{top:4%;left:9%}
}
@media(orientation:portrait){
 body[data-bridge="on"] .sector-browser>.planet-map{inset:10% 6% 34%!important}
 body[data-bridge="on"] .planet-map .system-position{width:65px!important;transform:translate(-50%,-17px)!important}
 body[data-bridge="on"] .planet-map .system-position>img{width:34px!important;height:34px!important;min-width:34px!important}
 body[data-bridge="on"] .planet-map .system-position.inhabited-world>img{width:39px!important;height:39px!important}
 body[data-bridge="on"] .planet-map .system-world-name{font-size:8px!important;max-width:65px!important}
 body[data-bridge="on"] .planet-map .system-coordinate{font-size:7px!important}
 body[data-bridge="on"] .planet-map .ark-world-node{left:21%!important;top:9%!important;width:80px!important}
 body[data-bridge="on"] .bridge-recycling-access{top:6%;left:7%;font-size:8px!important;max-width:42%;min-height:30px!important}
}

/* The ARK occupies a separate berth inside the orbit, away from mining labels. */
body[data-bridge="on"] .planet-map .ark-world-node{left:32%!important;top:43%!important}
@media(orientation:portrait){body[data-bridge="on"] .planet-map .ark-world-node{left:34%!important;top:39%!important}}

/* v334: scattered small worlds, with an open central event stage. */
body[data-bridge="on"] .planet-map .system-position{width:64px!important;transform:translate(-50%,-14px)!important}
body[data-bridge="on"] .planet-map .system-position>img{width:28px!important;height:28px!important;min-width:28px!important}
body[data-bridge="on"] .planet-map .system-position.inhabited-world>img{width:31px!important;height:31px!important}
body[data-bridge="on"] .planet-map .system-world-name{font-size:8px!important;max-width:64px!important;line-height:1.1!important}
body[data-bridge="on"] .planet-map .system-coordinate{font-size:7px!important}
body[data-bridge="on"] .planet-map .system-position .map-commander-card{margin:2px auto 0!important;max-width:64px!important}
body[data-bridge="on"] .planet-map .system-position>small:not(.system-coordinate):not(.system-world-name){font-size:7px!important;padding:1px 3px!important;background:transparent!important;border:0!important}
body[data-bridge="on"] .planet-map .ark-world-node{left:20%!important;top:50%!important;width:64px!important}
body[data-bridge="on"] .planet-map .ark-world-node .ark-art{height:34px!important}
body[data-bridge="on"] .planet-map .ark-world-node>b{font-size:8px!important;padding:1px!important;background:transparent!important}
body[data-bridge="on"] .planet-map .ark-world-node>small{font-size:6px!important;padding:1px!important;background:transparent!important}
body[data-bridge="on"] .planet-map .orbital-map-station{left:73%!important;top:24%!important;width:56px!important}
body[data-bridge="on"] .planet-map .orbital-map-station img{width:48px!important;height:32px!important}
body[data-bridge="on"] .planet-map .orbital-map-station span{font-size:7px!important;padding:1px 3px!important;background:#041b2d44!important}
@media(orientation:portrait){
 body[data-bridge="on"] .planet-map .system-position{width:58px!important;transform:translate(-50%,-13px)!important}
 body[data-bridge="on"] .planet-map .system-position>img{width:26px!important;height:26px!important;min-width:26px!important}
 body[data-bridge="on"] .planet-map .system-position.inhabited-world>img{width:29px!important;height:29px!important}
 body[data-bridge="on"] .planet-map .system-world-name{font-size:7px!important;max-width:58px!important}
 body[data-bridge="on"] .planet-map .system-coordinate{font-size:6px!important}
 body[data-bridge="on"] .planet-map .ark-world-node{left:25%!important;top:43%!important}
 body[data-bridge="on"] .planet-map .orbital-map-station{left:70%!important;top:61%!important;width:54px!important}
 body[data-bridge="on"] .planet-map .orbital-map-station img{width:46px!important;height:30px!important}
}

/* v335: portrait windows use portrait artwork regardless of device width. */
body[data-bridge="on"] #resources.helm-projected .resource{display:flex!important;flex-direction:row!important;gap:5px!important;align-items:center!important;text-align:left!important}
body[data-bridge="on"] #resources.helm-projected .resource-image{display:block!important;width:clamp(16px,1.8vw,27px)!important;height:clamp(16px,1.8vw,27px)!important;min-width:16px!important;object-fit:contain!important;aspect-ratio:1}
body[data-bridge="on"] #resources.helm-projected .resource strong{font-size:clamp(12px,1.25vw,22px)!important;line-height:1.15!important}
body[data-bridge="on"] #resources.helm-projected .resource small{font-size:clamp(7px,.7vw,11px)!important}
body[data-bridge="on"] .helm-right-display.helm-projected .bridge-flight-status strong{font-size:clamp(18px,2vw,30px)!important}
body[data-bridge="on"] :is(#resources,.helm-right-display).helm-projected{box-shadow:inset 0 0 12px #5edcff16,0 2px 0 #a0e5f333,0 7px 15px #0005!important}
.helm-side-desk{display:none}
body[data-bridge="on"]>.helm-side-desk:not([hidden]){display:grid;position:fixed;left:0;top:0;transform-origin:0 0;z-index:80;grid-template-rows:20% 1fr 1fr;padding:8px;gap:5px;background:transparent;border:0;color:#c7f1fa}
.helm-side-desk>small{font:9px ui-monospace,monospace;letter-spacing:.15em;text-align:center}
.helm-side-desk>button{min-height:0!important;padding:4px!important;background:#062f4244!important;border:1px solid #7adff344!important;border-radius:4px;font-size:clamp(10px,.9vw,15px);text-shadow:0 0 5px #65e6ff44}
@media(orientation:portrait){
 body[data-bridge="on"]>.helm-side-desk{display:none!important}
 body[data-bridge="on"] #resources.helm-projected .resource strong{font-size:clamp(12px,2vw,22px)!important}
 body[data-bridge="on"] #resources.helm-projected .resource small{font-size:clamp(7px,1vw,11px)!important}
 body[data-bridge="on"] #resources.helm-projected .resource-image{width:clamp(14px,2.6vw,24px)!important;height:clamp(14px,2.6vw,24px)!important;min-width:14px!important}
 body[data-bridge="on"]>#bridge-computer-board button>b{font-size:clamp(11px,1.8vw,20px)!important}
 body[data-bridge="on"]>#bridge-computer-board button>span{font-size:clamp(16px,2.5vw,28px)!important}
}

/* v336: local fleet-card scenery and controls registered inside their glass panes. */
body[data-bridge="on"] #page :is(.bridge-sheet,.bridge-operations) .journey-cinema{background:#031e3580!important;background-image:none!important;isolation:isolate;box-shadow:inset 0 0 24px #4dbeff12!important}
body[data-bridge="on"] #page :is(.bridge-sheet,.bridge-operations) .journey-cinema::before{content:'';display:block!important;position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#021829aa,#093c6150 50%,#021829aa),url('assets/space-v013.webp') center/cover no-repeat!important;opacity:.78;pointer-events:none}
body[data-bridge="on"] #page .journey-cinema .journey-route,body[data-bridge="on"] #page .journey-cinema .flight-caption{text-shadow:0 1px 4px #000,0 0 9px #0008}
body[data-bridge="on"] #resources.helm-projected .resource .resource-image{display:block!important;width:clamp(18px,1.7vw,28px)!important;height:clamp(18px,1.7vw,28px)!important;min-width:18px!important;max-width:28px!important;object-fit:contain!important;aspect-ratio:1!important;flex-shrink:0}
body[data-bridge="on"] :is(#resources,.helm-right-display).helm-projected{padding:20px 10px 6px!important;overflow:hidden!important}
body[data-bridge="on"] :is(#resources,.helm-right-display).helm-projected::before{top:5px!important;left:9px!important;right:9px!important;font-size:clamp(7px,.65vw,10px)!important;letter-spacing:.12em!important;padding-bottom:3px!important}
body[data-bridge="on"] #resources.helm-projected .resource{padding:3px 5px!important;gap:6px!important;justify-content:center!important}
body[data-bridge="on"] #resources.helm-projected .resource>span{min-width:0;overflow:hidden!important}
body[data-bridge="on"] #resources.helm-projected .resource strong{font-size:clamp(13px,1.3vw,23px)!important;letter-spacing:.015em!important}
body[data-bridge="on"] #resources.helm-projected .resource small{font-size:clamp(8px,.7vw,11px)!important}
body[data-bridge="on"]>.helm-side-desk:not([hidden]){padding:14px 16px 9px;grid-template-rows:16% 1fr 1fr;gap:6px;overflow:hidden;box-sizing:border-box}
.helm-side-desk>small{font-size:clamp(8px,.7vw,11px)!important;align-self:center;text-align:center}
.helm-side-desk>button{display:flex;align-items:center;justify-content:center;gap:9px!important;width:100%;min-width:0!important;font-size:clamp(12px,1.05vw,18px)!important;line-height:1.2!important;text-align:center!important;overflow:hidden!important;padding:5px 9px!important;box-sizing:border-box}
.helm-side-desk>button>span{font-size:1.25em;flex-shrink:0;color:#a7efff}
.helm-side-desk>button>b{font-weight:600;white-space:normal;overflow-wrap:normal}
@media(orientation:portrait){body[data-bridge="on"] :is(#resources,.helm-right-display).helm-projected{padding:15px 5px 3px!important}body[data-bridge="on"] #resources.helm-projected .resource .resource-image{width:15px!important;height:15px!important;min-width:15px!important}body[data-bridge="on"] #resources.helm-projected .resource{gap:3px!important;padding:2px!important}body[data-bridge="on"] #resources.helm-projected .resource strong{font-size:clamp(12px,2vw,20px)!important}body[data-bridge="on"] #resources.helm-projected .resource small{font-size:clamp(7px,1vw,10px)!important}}

body[data-bridge="on"]>.helm-side-desk-left.has-production-status{grid-template-rows:16% 1fr!important}
.production-mini-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:5px;min-height:0}
.production-mini-grid>button{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:center;align-items:center;min-width:0;min-height:0!important;gap:2px 5px;padding:4px 7px!important;background:#05283c55!important;border:1px solid #71dbf333!important;border-radius:3px;overflow:hidden;text-align:left}
.production-mini-grid>button>span{font-size:clamp(8px,.75vw,12px);color:#a6dce9}
.production-mini-grid>button>strong{font-size:clamp(12px,1.15vw,20px);font-weight:600;color:#d9faff;font-variant-numeric:tabular-nums}
.production-mini-grid>button>small{grid-column:1/-1;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(7px,.65vw,10px);color:#93bbc8}
.production-mini-grid>button>i{position:absolute;bottom:0;left:0;right:0;height:2px;background:#93efff;transform:scaleX(var(--production-progress));transform-origin:left;box-shadow:0 0 4px #68dfff88;pointer-events:none}

/* v337: use the full side glass rather than two narrow lower strips. */
body[data-bridge="on"]>.helm-side-desk-right:not([hidden]){grid-template-rows:10% minmax(0,1fr) minmax(0,1fr)!important;padding:8px 10px 7px!important;gap:7px!important}
body[data-bridge="on"]>.helm-side-desk-right>button{display:flex!important;align-items:center!important;justify-content:center!important;gap:12px!important;align-self:stretch!important;justify-self:stretch!important;width:100%!important;height:100%!important;padding:8px!important;font-size:clamp(14px,1.25vw,22px)!important;text-align:center!important}
body[data-bridge="on"]>.helm-side-desk-right>button>span,body[data-bridge="on"]>.helm-side-desk-right>button>b{margin:0!important;position:static!important;inset:auto!important;transform:none!important;flex:0 1 auto!important;text-align:center!important}
body[data-bridge="on"] .planet-map .ark-world-node{left:85%!important;top:18%!important;width:128px!important}
body[data-bridge="on"] .planet-map .ark-world-node .ark-art{height:62px!important}
body[data-bridge="on"] .planet-map .ark-world-node>b{font-size:11px!important}
body[data-bridge="on"] .planet-map .ark-world-node>small{font-size:8px!important}
@media(orientation:portrait){body[data-bridge="on"] .planet-map .ark-world-node{left:83%!important;top:7%!important;width:88px!important}body[data-bridge="on"] .planet-map .ark-world-node .ark-art{height:44px!important}body[data-bridge="on"] .planet-map .ark-world-node>b{font-size:9px!important}body[data-bridge="on"] .planet-map .ark-world-node>small{font-size:7px!important}}
body[data-bridge="on"] #page .bridge-sheet #action-inline{margin-top:24px!important;border-top:1px solid #8cdae844!important;padding:12px!important}
body[data-bridge="on"] .helm-right-display.helm-projected.has-sector-state{grid-template-rows:27% 30% 23% 20%!important}
.helm-sector-state{grid-row:2;min-height:0;display:grid;grid-template-rows:1fr 1fr;gap:2px}
.helm-sector-state button{display:block;min-width:0;min-height:0!important;padding:1px 3px!important;background:transparent!important;border:0!important;border-radius:2px;font:clamp(7px,.7vw,11px)/1.15 system-ui;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#bce6ef}
.helm-sector-state button.sector-danger{color:#ffcf9e;background:#6b252b44!important}
body[data-bridge="on"] .helm-right-display.has-sector-state #boss-announcement{grid-row:3}
body[data-bridge="on"] .helm-right-display.has-sector-state .bridge-operations-button{grid-row:4}

/* v338: a local readable starfield for ranking, matching the fleet cards. */
.rank-stage{position:relative;isolation:isolate;padding:14px;border:1px solid #77d8ed55;border-radius:9px;background:#031c3180;overflow:hidden}
.rank-stage::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(90deg,#021829aa,#093c6166 50%,#021829aa),url('assets/space-v013.webp') center top/100% auto repeat-y;opacity:.78}
body[data-bridge="on"] #page .rank-stage .rank-table-panel{background:#031a2a77!important;border:1px solid #89d9ee33!important;padding:10px!important;border-radius:7px}
.rank-stage .rank-table{width:100%;border-collapse:collapse}
.rank-stage .rank-table th{background:#061321db!important;color:#bde9f4;text-align:left;padding:10px 8px}
.rank-stage .rank-table td{padding:10px 8px;border-bottom:1px solid #a4e4f21f;text-shadow:0 1px 3px #000}
.rank-stage .rank-table tbody tr:nth-child(even){background:#05182b44}
.rank-stage .rank-table tbody .rank-you{background:#15496088!important;outline:1px solid #8fe6ff55;outline-offset:-1px}
.rank-stage .rank-categories{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}
.rank-stage .rank-categories button{min-height:35px;padding:6px 12px;background:#06233799;border-color:#88d6e544}
.rank-stage .rank-categories button[aria-pressed="true"]{background:#21516bbb;border-color:#9beeff;color:#e4faff}
.rank-stage>.muted{font-size:12px;margin-top:6px;color:#c2d9e5}
@media(orientation:portrait){.rank-stage{padding:9px}.rank-stage .rank-table td{padding:8px 5px}.rank-stage .rank-categories button{font-size:11px;padding:5px 9px}}
/* The ARK image already has real alpha; show the hull without a surrounding card. */
body[data-bridge="on"] #page .planet-map button.ark-world-node{left:83%!important;top:19%!important;width:clamp(160px,14vw,250px)!important;background:transparent!important;background-image:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border-radius:0!important;outline:0!important;padding:0!important;overflow:visible!important}
body[data-bridge="on"] #page .planet-map button.ark-world-node::before,body[data-bridge="on"] #page .planet-map button.ark-world-node::after{display:none!important}
body[data-bridge="on"] #page .planet-map .ark-world-node .ark-art{height:clamp(95px,8.6vw,150px)!important;background:transparent!important;border:0!important;box-shadow:none!important}
body[data-bridge="on"] #page .planet-map .ark-world-node .ark-art>img{background:transparent!important;filter:drop-shadow(0 3px 4px #0008)!important}
body[data-bridge="on"] #page .planet-map .ark-world-node>b,body[data-bridge="on"] #page .planet-map .ark-world-node>small{background:transparent!important;border:0!important;box-shadow:none!important;text-shadow:0 1px 3px #000,0 0 6px #000;font-size:11px!important}
body[data-bridge="on"] #page .planet-map .ark-world-node .ark-modules,body[data-bridge="on"] #page .planet-map .ark-world-node .ark-repair-light{display:none!important}
@media(orientation:portrait){body[data-bridge="on"] #page .planet-map button.ark-world-node{left:80%!important;top:7%!important;width:clamp(104px,22vw,170px)!important}body[data-bridge="on"] #page .planet-map .ark-world-node .ark-art{height:clamp(68px,14vw,110px)!important}body[data-bridge="on"] #page .planet-map .ark-world-node>b,body[data-bridge="on"] #page .planet-map .ark-world-node>small{font-size:8px!important}}
@media(max-height:600px) and (orientation:landscape){body[data-bridge="on"] #page .planet-map button.ark-world-node{width:115px!important;top:20%!important}body[data-bridge="on"] #page .planet-map .ark-world-node .ark-art{height:68px!important}}

/* v339: identical wide-layout geometry on phones; scale typography to the glass height. */
@media(max-height:600px) and (orientation:landscape){
 body[data-bridge="on"] #page .planet-map button.ark-world-node{width:clamp(120px,14vw,200px)!important;top:19%!important}
 body[data-bridge="on"] #page .planet-map .ark-world-node .ark-art{height:clamp(65px,8.6vw,120px)!important}
 body[data-bridge="on"] #page .planet-map .ark-world-node>b,body[data-bridge="on"] #page .planet-map .ark-world-node>small{font-size:clamp(7px,.8vw,11px)!important}
 body[data-bridge="on"] :is(#resources,.helm-right-display).helm-projected{padding:12px 4px 2px!important}
 body[data-bridge="on"] :is(#resources,.helm-right-display).helm-projected::before{top:3px!important;left:4px!important;right:4px!important;font-size:6px!important;padding-bottom:1px!important}
 body[data-bridge="on"] #resources.helm-projected .resource{padding:1px!important;gap:3px!important}
 body[data-bridge="on"] #resources.helm-projected .resource .resource-image{width:12px!important;height:12px!important;min-width:12px!important}
 body[data-bridge="on"] #resources.helm-projected .resource strong{font-size:clamp(10px,1.3vw,15px)!important}
 body[data-bridge="on"] #resources.helm-projected .resource small{font-size:6px!important}
 body[data-bridge="on"]>.helm-side-desk:not([hidden]){padding:3px 5px!important;gap:2px!important}
 body[data-bridge="on"]>.helm-side-desk-right>button{padding:2px!important;font-size:clamp(8px,1vw,12px)!important;gap:4px!important}
 .helm-side-desk>small{font-size:6px!important}
 body[data-bridge="on"] .helm-right-display.helm-projected .bridge-flight-status strong{font-size:16px!important}
 body[data-bridge="on"] .helm-right-display.helm-projected :is(.bridge-flight-status,.bridge-operations-button){font-size:7px!important;min-height:0!important;padding:1px!important}
 .helm-sector-state button{font-size:6px!important}
}

/* v340: production fills the physical left pane, matching the mission pane. */
body[data-bridge="on"]>.helm-side-desk-left.has-production-status{grid-template-rows:10% minmax(0,1fr)!important;padding:8px 10px 7px!important;gap:7px!important;align-content:stretch!important}
body[data-bridge="on"]>.helm-side-desk-left.has-production-status>small{position:static!important;inset:auto!important;transform:none!important;margin:0!important;padding:0!important;align-self:center!important;justify-self:stretch!important;font-size:clamp(9px,.8vw,13px)!important}
.production-mini-grid{width:100%;height:100%;align-self:stretch;justify-self:stretch;gap:7px;overflow:hidden}
.production-mini-grid>button{width:100%;height:100%;box-sizing:border-box;padding:7px 10px!important;gap:4px 8px;align-content:center}
.production-mini-grid>button>span{font-size:clamp(10px,.9vw,15px)}
.production-mini-grid>button>strong{font-size:clamp(16px,1.5vw,26px)}
.production-mini-grid>button>small{font-size:clamp(9px,.75vw,12px)}
@media(max-height:600px) and (orientation:landscape){
 body[data-bridge="on"]>.helm-side-desk-left.has-production-status{padding:3px 5px!important;gap:2px!important}
 body[data-bridge="on"]>.helm-side-desk-left.has-production-status>small{font-size:6px!important}
 .production-mini-grid{gap:2px}.production-mini-grid>button{padding:2px 3px!important;gap:1px 2px}
 .production-mini-grid>button>span,.production-mini-grid>button>small{font-size:6px}.production-mini-grid>button>strong{font-size:10px}
}

/* v341: mission controls occupy the full right glass, mirrored to production. */
body[data-bridge="on"]>.helm-side-desk-right:not([hidden]){grid-template-rows:10% minmax(0,1fr) minmax(0,1fr)!important;align-content:stretch!important}
body[data-bridge="on"]>.helm-side-desk-right>small{position:static!important;inset:auto!important;transform:none!important;margin:0!important;padding:0!important;align-self:center!important;justify-self:stretch!important;font-size:clamp(9px,.8vw,13px)!important}
body[data-bridge="on"]>.helm-side-desk-right>button{font-size:clamp(16px,1.5vw,26px)!important}
@media(max-height:600px) and (orientation:landscape){
 body[data-bridge="on"]>.helm-side-desk-right>small{font-size:6px!important}
 body[data-bridge="on"]>.helm-side-desk-right>button{font-size:clamp(8px,1vw,12px)!important}
}

/* v343: give every value its own measured column; scale long balances to fit. */
body[data-bridge="on"] #resources.helm-projected{grid-template-columns:repeat(2,minmax(0,1fr))!important}
body[data-bridge="on"] #resources.helm-projected .resource{min-width:0!important;justify-content:flex-start!important;padding:2px!important;gap:4px!important}
body[data-bridge="on"] #resources.helm-projected .resource>span{flex:1 1 0!important;min-width:0!important;width:0;container-type:inline-size;overflow:visible!important}
body[data-bridge="on"] #resources.helm-projected .resource strong{white-space:nowrap!important;letter-spacing:0!important;font-size:min(clamp(10px,1.3vw,23px),calc(150cqw / var(--resource-digits,6)))!important}

/* v344: physical desk panes must not inherit the sidebar navigation's margin or columns. */
body[data-bridge="on"]>.helm-side-desk:not([hidden]){display:grid!important;grid-template-columns:minmax(0,1fr)!important;position:fixed!important;inset:0 auto auto 0!important;margin:0!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;box-sizing:border-box!important;align-items:stretch!important;overflow:hidden!important}
body[data-bridge="on"]>.helm-side-desk .production-mini-grid{min-height:0!important;min-width:0!important;overflow:hidden!important}
body[data-bridge="on"]>.helm-side-desk button{min-height:0!important;min-width:0!important;margin:0!important;box-sizing:border-box!important}
body[data-bridge="on"] .helm-right-display.helm-projected.has-sector-state{grid-template-rows:minmax(0,1fr) minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr)!important;gap:2px!important}
body[data-bridge="on"] .helm-right-display.helm-projected>*{min-height:0!important;min-width:0!important;margin:0!important;box-sizing:border-box!important;overflow:hidden!important}
body[data-bridge="on"] .helm-right-display.helm-projected .bridge-flight-status{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:minmax(0,1fr)!important;align-items:center!important;gap:3px!important}
body[data-bridge="on"] .helm-right-display.helm-projected .bridge-flight-status>small{display:none!important}
body[data-bridge="on"] .helm-right-display.helm-projected .bridge-flight-status>span{grid-column:1;grid-row:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-bridge="on"] .helm-right-display.helm-projected .bridge-flight-status>strong{grid-column:2;grid-row:1;line-height:1!important}
body[data-bridge="on"] .helm-right-display.helm-projected #boss-announcement{display:flex!important;align-items:center!important;overflow:hidden!important}
body[data-bridge="on"] .helm-right-display.helm-projected #boss-announcement button{min-width:0!important;width:100%!important;min-height:0!important;height:100%!important;margin:0!important;padding:0!important;font:inherit!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-align:left!important}
body[data-bridge="on"] .helm-right-display.helm-projected #boss-announcement>small{display:none!important}
@media(max-height:650px) and (orientation:landscape){
 body[data-bridge="on"] .helm-right-display.helm-projected{padding:11px 5px 3px!important}
 body[data-bridge="on"] .helm-right-display.helm-projected :is(.bridge-flight-status,.bridge-operations-button,#boss-announcement){font-size:7px!important;line-height:1.1!important;padding:0!important}
 body[data-bridge="on"] .helm-right-display.helm-projected .helm-sector-state{gap:0!important}
 body[data-bridge="on"] .helm-right-display.helm-projected .helm-sector-state button{font-size:6px!important;line-height:1.1!important;padding:0!important;height:100%!important}
 body[data-bridge="on"] .helm-right-display.helm-projected .bridge-operations-button{white-space:nowrap!important;text-overflow:ellipsis!important}
}

/* Five shortcuts share the existing mission display. */
body[data-bridge="on"]>.helm-side-desk-right:not([hidden]){grid-template-rows:10% repeat(5,minmax(0,1fr))!important;gap:1px!important;padding:3px 5px!important}
body[data-bridge="on"]>.helm-side-desk-right>button{font-size:clamp(10px,1.15vw,18px)!important;padding:0 4px!important;line-height:1.1!important}
.sector-search-dialog{width:min(620px,92vw);max-height:85dvh;overflow:auto}
.sector-search-dialog .sector-toolbar{display:flex!important;flex-wrap:wrap;gap:12px;padding:12px 0}
.sector-search-dialog label{display:grid;gap:5px;flex:1;min-width:90px}
@media(max-height:600px){body[data-bridge="on"]>.helm-side-desk-right>button{font-size:clamp(7px,1vw,12px)!important}}

/* v346: four mission shortcuts, in a balanced 2 by 2 panel. */
body[data-bridge="on"]>.helm-side-desk-right:not([hidden]){grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:10% repeat(2,minmax(0,1fr))!important;gap:6px!important;padding:8px 10px 7px!important}
body[data-bridge="on"]>.helm-side-desk-right>small{grid-column:1/-1!important}
body[data-bridge="on"]>.helm-side-desk-right>button{flex-direction:column!important;gap:4px!important;font-size:clamp(10px,.9vw,16px)!important;padding:4px!important;line-height:1.15!important}
body[data-bridge="on"]>.helm-side-desk-right>button>span{width:auto!important;font-size:1.25em!important;line-height:1!important}
body[data-bridge="on"]>.helm-side-desk-right>button>b{display:block!important;white-space:normal!important;min-width:0!important;font-size:inherit!important;line-height:inherit!important}
@media(max-height:600px) and (orientation:landscape){
 body[data-bridge="on"]>.helm-side-desk-right:not([hidden]){gap:2px!important;padding:3px 5px!important}
 body[data-bridge="on"]>.helm-side-desk-right>button{font-size:clamp(7px,.85vw,11px)!important;padding:1px!important;gap:1px!important}
}

/* v347: More only complements the main console; one visible entry per destination. */
body[data-bridge="on"] .more-menu-grid :is([data-go="fleet"],[data-go="overview"],[data-go="shipyard"],[data-go="research"],[data-go="defense"]){display:none!important}
@media(orientation:landscape){body[data-bridge="on"] .more-menu-grid :is([data-go="traffic"],[data-go="reports"],[data-action-open],.more-flight-orders){display:none!important}}
/* The search title is a normal first row, never an overlay over its form. */
body[data-bridge="on"] #sector-search-dialog{display:block;box-sizing:border-box;width:min(620px,92vw)!important;max-height:calc(100dvh - 32px)!important;padding:16px!important;overflow:auto!important}
body[data-bridge="on"] #sector-search-dialog:not([open]){display:none!important}
body[data-bridge="on"] #sector-search-dialog>.dialog-head{position:static!important;inset:auto!important;transform:none!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;width:auto!important;height:auto!important;min-height:44px!important;margin:0 0 14px!important;padding:0 0 10px!important;border-bottom:1px solid #8cdde544;background:transparent!important}
body[data-bridge="on"] #sector-search-dialog>.dialog-head h2{position:static!important;margin:0!important;font:600 20px/1.2 system-ui!important}
body[data-bridge="on"] #sector-search-dialog>.dialog-head button{position:static!important;inset:auto!important;transform:none!important;flex:0 0 40px!important;min-width:40px!important;min-height:40px!important;width:40px!important;height:40px!important;margin:0!important;padding:0!important}
body[data-bridge="on"] #sector-search-dialog>.sector-toolbar{position:static!important;inset:auto!important;transform:none!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;width:auto!important;margin:0!important;padding:0!important}
body[data-bridge="on"] #sector-search-dialog .sector-toolbar label{min-width:0!important;width:auto!important;margin:0!important;display:grid!important;gap:6px!important;font:12px/1.2 system-ui!important}
body[data-bridge="on"] #sector-search-dialog :is(select,input:not([type="hidden"])){width:100%!important;min-width:0!important;box-sizing:border-box!important;min-height:42px!important;font-size:16px!important}
body[data-bridge="on"] #sector-search-dialog #find-coordinate{grid-column:1/-1;min-height:42px!important;margin:0!important}

/* v348: one quiet status display; actions stay on the lower mission console. */
body[data-bridge="on"] .helm-right-display.helm-projected.has-sector-state{display:grid!important;grid-template-rows:minmax(0,1fr)!important;padding:20px 10px 6px!important}
body[data-bridge="on"] .helm-right-display.has-sector-state>:is(.bridge-flight-status,#boss-announcement,.bridge-operations-button){display:none!important}
body[data-bridge="on"] .helm-right-display.helm-projected .helm-sector-state{grid-row:1!important;display:grid!important;grid-template-rows:minmax(0,1fr)!important;align-items:center!important}
body[data-bridge="on"] .helm-right-display.helm-projected .helm-sector-state :is(button,p){font:500 clamp(10px,1vw,17px)/1.3 system-ui!important;margin:0!important;padding:6px!important;white-space:normal!important;text-align:center!important;color:#c2edf4}
body[data-bridge="on"] .helm-right-display.helm-projected .helm-sector-state .sector-danger{color:#ffd2ad!important}
.production-mini-grid>button:disabled{opacity:.6;cursor:default}
body[data-bridge="on"] .more-menu-grid :is([data-game-update],.more-flight-orders,a[href="/starfall-frontier/start"]){display:none!important}
.world-mission-choice{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px;margin:16px 0}
.world-choice-hint{font-size:12px;color:#a8c9d6}
#pvp-flight-plan[hidden],#mine-flight-plan[hidden]{display:none!important}
#pvp-flight-plan:not([hidden]),#mine-flight-plan:not([hidden]){display:block;border-top:1px solid #8fdde544;margin-top:14px;padding-top:14px}
@media(max-height:650px) and (orientation:landscape){body[data-bridge="on"] .helm-right-display.helm-projected.has-sector-state{padding:12px 5px 3px!important}body[data-bridge="on"] .helm-right-display.helm-projected .helm-sector-state :is(button,p){font-size:9px!important;padding:2px!important}}
/* v349: informative summaries, actionable shortages, and a quiet world focus. */
.battle-preview{display:grid;gap:4px;margin-top:7px;font:12px/1.35 system-ui;color:#cce9f1;white-space:normal}
.battle-preview>b{font-size:13px;color:#e1f7fa}.battle-preview>small{font-size:11px;color:#c6ccd7}
.mail-report-fold>summary{white-space:normal!important}
.prerequisite-resource>[data-resource-source]{width:100%;min-height:38px;padding:7px 9px;text-align:left;white-space:normal;background:#0c354b66;border:1px solid #76cfe655;border-radius:5px;color:#c9eff8}
#toast:has([data-resource-source]){pointer-events:auto!important;display:grid;gap:5px;max-width:min(460px,90vw)!important}
#toast [data-resource-source]{font:12px/1.3 system-ui;min-height:40px;padding:8px 10px;color:#e3f8ff;background:#0c334a;border:1px solid #72cde8;border-radius:6px}
.production-mini-grid>button>.production-remaining{grid-column:1/-1;font:clamp(7px,.65vw,10px)/1.1 system-ui;color:#b4e6ee;white-space:nowrap}
.production-mini-grid>button{gap:2px 6px!important}
.planet-map.has-world-selection .system-position:not(.world-focus) :is(.system-world-name,.system-coordinate,.map-commander-card,small){opacity:.25!important;transition:opacity .18s ease}
.planet-map.has-world-selection .system-position.world-focus>img{filter:drop-shadow(0 0 5px #9ceeff) drop-shadow(0 0 10px #37bded)!important}
.planet-map.has-world-selection .system-position.world-focus :is(small,.map-commander-card){opacity:1!important}
@media(max-height:600px) and (orientation:landscape){.production-mini-grid>button>.production-remaining{font-size:6px!important}.production-mini-grid>button{gap:1px 2px!important}}
@media(prefers-reduced-motion:reduce){.planet-map.has-world-selection .system-position :is(small,.map-commander-card){transition:none!important}}
/* v351: the captain is composited in front of the window and behind the desk controls. */
.captain-visit{position:absolute;z-index:1;pointer-events:none!important;display:block;contain:strict;background:transparent!important;transform:none!important}
.captain-visit[hidden]{display:none!important}.captain-visit-source{position:fixed;left:-10px;top:-10px;width:1px;height:1px;opacity:0;pointer-events:none}
body:not([data-bridge="on"]) .captain-visit,body[data-motion="off"] .captain-visit{display:none!important}
@media(prefers-reduced-motion:reduce){.captain-visit{display:none!important}}

/* v353: two clearly separated sides; hulls are primary, identity is a small badge. */
body[data-bridge="on"] #page .planet-map .space-action-enemy{width:29%!important;height:29%!important;min-height:0!important;min-width:0!important}
body[data-bridge="on"] #page .planet-map .space-action-sector{width:20%!important;height:18%!important;min-height:0!important;min-width:0!important}
body[data-bridge="on"] #page .planet-map .space-action-escort{width:9%!important;height:12%!important;min-height:0!important;min-width:0!important}
body[data-bridge="on"] #page .planet-map .space-action-fleet{width:60px!important;height:40px!important;min-height:0!important;min-width:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:0!important}
body[data-bridge="on"] #page .planet-map .space-action-fleet[hidden]{display:none!important}
body[data-bridge="on"] #page .planet-map .space-action-fleet>.space-action-ship{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important;border:0!important;border-radius:0!important;transform:none!important}
body[data-bridge="on"] #page .planet-map .space-action-fleet>.space-action-avatar{position:absolute!important;inset:auto -4px -3px auto!important;width:18px!important;height:18px!important;min-width:0!important;max-width:18px!important;object-fit:cover!important;border:1px solid #8deaff!important;border-radius:50%!important;transform:none!important}
body[data-bridge="on"] #page .planet-map .space-action-fleet>strong{display:none!important;top:calc(100% + 21px)!important;font-size:8px!important;max-width:105px!important}
body[data-bridge="on"] #page .planet-map .space-action-fleet:is(:hover,:focus-visible)>strong{display:block!important;z-index:20}
body[data-bridge="on"] #page .planet-map .space-action-fleet>small{top:100%!important;bottom:auto!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;font-size:8px!important;padding:2px 4px!important;max-width:110px!important}
.space-action-extra{position:absolute;transform:translate(-50%,-50%);pointer-events:auto;z-index:9;padding:5px 8px!important;min-height:30px!important;font-size:9px!important;background:#082439e8!important;border:1px solid #65c6db!important;border-radius:6px!important;color:#d8faff!important}
@media(orientation:portrait){
 body[data-bridge="on"] #page .planet-map .space-action-enemy{width:47%!important;height:20%!important}
 body[data-bridge="on"] #page .planet-map .space-action-sector{width:30%!important;height:13%!important}
 body[data-bridge="on"] #page .planet-map .space-action-escort{width:17%!important;height:9%!important}
 body[data-bridge="on"] #page .planet-map .space-action-fleet{width:42px!important;height:29px!important}
 body[data-bridge="on"] #page .planet-map .space-action-fleet>.space-action-avatar{width:14px!important;height:14px!important;max-width:14px!important}
 body[data-bridge="on"] #page .planet-map .space-action-fleet>small{font-size:7px!important;max-width:83px!important}
}
/* Keep the useful action above the illustration on short mobile holograms. */
body[data-bridge="on"] dialog.action-dashboard{padding:14px!important}
body[data-bridge="on"] .action-dashboard .action-dialog-head{margin:0 0 8px!important}
body[data-bridge="on"] .action-dashboard .action-dialog-head h2{font-size:22px!important;margin:0!important}
body[data-bridge="on"] .action-dashboard .action-dialog-head small{display:none!important}
.action-dashboard .action-live-hint{font-size:11px!important;color:#a5d6dc!important;margin:0 0 10px!important}
.action-dashboard .action-status:empty{display:none}
.action-dashboard .action-card{padding:12px!important}
.action-dashboard .action-card>h3{font-size:18px!important;line-height:1.25!important;margin:7px 0!important}
.action-dashboard .action-card-head{font-size:9px!important;letter-spacing:0!important}
.action-dashboard .action-primary-actions{margin:10px 0!important;align-items:center}
.action-dashboard .action-primary-actions .primary{background:linear-gradient(#367a8a,#153d52)!important;border-color:#83d9e8!important;font-weight:bold!important;min-width:135px}
.action-dashboard .action-map-link{background:transparent!important;border-color:#506979!important;font-size:11px!important;padding:7px 9px!important}
.action-dashboard .action-countdown{font-size:13px!important;margin:6px 0!important}
.action-dashboard .action-card-art{height:140px!important;gap:12px;overflow:hidden}
.action-dashboard .action-card-art>img{width:55%!important;min-width:0!important;height:100%!important;object-fit:contain!important}
.action-dashboard .action-card-art>.action-card-enemy{width:42%!important}
.action-dashboard .action-short-state,.action-dashboard .action-own-status{font-size:12px!important;line-height:1.4!important;margin:7px 0!important}
.action-dashboard .action-card>.fleet-help{margin:8px 0!important}
@media(orientation:landscape) and (max-height:600px){.action-dashboard .action-card-art{height:95px!important}}

/* Compact reward in the mission panel; keep the map unobstructed. */
body[data-bridge="on"] #boss-world-boost:not([hidden]),#boss-world-boost:not([hidden]){position:static!important;inset:auto!important;transform:none!important;width:auto!important;max-width:100%!important;visibility:visible!important;margin:8px 0!important;padding:8px 12px!important;display:block!important;font-size:13px!important}
.boost-compact summary{cursor:pointer;min-height:32px;line-height:32px;color:#ffe095;font-size:13px}.boost-compact summary b{margin-left:10px;font-size:12px;color:#9ff4ff}.boost-description{display:flex;gap:10px;padding-top:8px}.boost-description>img{width:32px!important;height:40px!important}.boost-description .boss-boost-clock{display:none}
#page .planet-map{container-type:size}body[data-bridge="on"] #page .planet-map .boss-core{width:62%!important;max-width:none!important;height:64%!important;max-height:100%!important;left:50%!important;top:43%!important}body[data-bridge="on"] #page .planet-map .boss-core .boss-shield{width:100%!important;height:calc(100% - 52px)!important;display:block}body[data-bridge="on"] #page .planet-map .boss-core .boss-shield>img{width:100%!important;height:100%!important;object-fit:contain!important}
body[data-bridge="on"] #page .planet-map .space-action-enemy{width:60%!important;height:55%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}

/* Reward lives in the Starfall header, never on the space map. */
header .header-actions #boss-world-boost:not([hidden]),body[data-bridge="on"] header .header-actions #boss-world-boost:not([hidden]){position:relative!important;flex:0 1 auto!important;min-width:0!important;margin:0!important;padding:0 7px!important;border:1px solid #ad8c45!important;border-radius:7px!important;background:#111c28!important;overflow:visible!important}
header #boss-world-boost .boost-compact summary{font-size:11px!important;line-height:30px!important;min-height:30px!important;white-space:nowrap}
header #boss-world-boost .boost-compact summary b{font-size:10px!important;margin-left:4px!important}
header #boss-world-boost .boost-description{position:absolute;top:calc(100% + 8px);right:0;width:min(300px,calc(100vw - 24px));box-sizing:border-box;padding:12px;background:#101e2bf5;border:1px solid #ad8c45;border-radius:10px;z-index:120;box-shadow:0 8px 24px #0008}
@media(max-width:600px){header #boss-world-boost .boost-compact summary{font-size:10px!important}header #boss-world-boost .boost-compact summary b{display:block;margin:0!important;line-height:14px}header #boss-world-boost .boost-compact summary{line-height:16px!important;padding:3px 0}}

.more-menu-grid>.more-mission-shortcuts{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0;padding-bottom:12px;border-bottom:1px solid #66b8dc44}.more-mission-shortcuts h3{grid-column:1/-1;margin:0;font-size:13px;color:#b2eaff}.more-mission-shortcuts button{min-width:0;min-height:52px;white-space:normal;overflow-wrap:anywhere;text-align:left;padding:10px;border:1px solid #4786a5;border-radius:9px;background:#102333;color:#e7f6ff;font-size:12px}@media(max-width:340px){.more-menu-grid>.more-mission-shortcuts{grid-template-columns:1fr}}

/* An explicit in-game animation choice takes precedence over the OS default. */
@media(prefers-reduced-motion:reduce){body[data-motion-chosen="on"][data-motion="on"] .helm-window-film,body[data-motion-chosen="on"][data-motion="on"] .helm-ambient-sky,body[data-motion-chosen="on"][data-motion="on"] .captain-visit{display:block!important}}

/* Eight controls share the same fitted cockpit glass. */
body[data-bridge="on"]>#bridge-computer-board.helm-projected{grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important}
body[data-bridge="on"]>#bridge-computer-board button{min-width:0;gap:3px;padding:4px 2px!important}
body[data-bridge="on"]>#bridge-computer-board button b{font-size:clamp(9px,1.5vw,15px);white-space:nowrap}
body[data-bridge="on"]>#bridge-computer-board button>span:not(.mail-unread-dot){font-size:clamp(13px,2.2vw,23px)}

/* Follow the curved glass perimeter, rather than leaving a smaller six-sided film inside it.
   Only decorative media changes; the map and every target retain their coordinates. */
body[data-bridge="on"] .helm-window-film{
 left:4%;top:calc(3%*var(--helm-art-scale));width:92%;height:calc(52%*var(--helm-art-scale));
 clip-path:polygon(7% 1%,14% 4%,28% 6%,50% 7%,72% 6%,86% 4%,93% 1%,95% 2%,100% 51%,95% 99%,5% 99%,0 51%,5% 2%);
 object-fit:cover!important;object-position:center;mask-image:none;-webkit-mask-image:none;
}
@media(orientation:portrait){body[data-bridge="on"] .helm-window-film{
 left:.7%;width:98.6%;top:calc(3%*var(--helm-art-scale));height:calc(56%*var(--helm-art-scale));
 clip-path:polygon(7.4% 1.8%,20% 4.5%,50% 6%,80% 4.5%,92.6% 1.8%,96.7% 19.6%,100% 60.7%,97.7% 88.8%,93.6% 98.4%,6.4% 98.4%,2.3% 88.8%,0 60.7%,3.3% 19.6%);
}}

/* The room is a foreground frame: moving sky fills the entire glass behind it.
   One scaled mask follows the artwork, so no second sky can remain at its edges. */
body[data-bridge="on"] .helm-window-film{
 z-index:1;left:0;top:0;width:100%;height:calc(55%*var(--helm-art-scale));
 clip-path:none;object-fit:cover!important;
}
body[data-bridge="on"] .bridge-window-frame[data-window-film="playing"] .flagship-interior{
 z-index:2;mask-image:url('assets/helm-frame-wide-mask-v403.svg');
 -webkit-mask-image:url('assets/helm-frame-wide-mask-v403.svg');
 mask-size:100% 100%;-webkit-mask-size:100% 100%;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;
}
@media(orientation:portrait){
 body[data-bridge="on"] .helm-window-film{
  left:-4%;top:calc(-1%*var(--helm-art-scale));width:108%;height:calc(64%*var(--helm-art-scale));clip-path:none;
 }
 body[data-bridge="on"] .bridge-window-frame[data-window-film="playing"] .flagship-interior{
  mask-image:url('assets/helm-frame-tall-mask-v403.svg');-webkit-mask-image:url('assets/helm-frame-tall-mask-v403.svg');
 }
}
