/* 0.5.3: explicit viewport lanes override legacy station and mobile rules. */
#hud.flight-modern .fh-cross{position:fixed!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important}
#hud.flight-modern .holo-radar{position:fixed!important;left:50%!important;right:auto!important;top:auto!important;bottom:54px!important;transform:translateX(-50%)!important;width:180px!important;padding:0!important;background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important}
#hud.flight-modern .holo-radar canvas{width:100%;height:110px;object-fit:contain}
#hud.flight-modern .holo-radar header{font-size:0;justify-content:center}
#hud.flight-modern .holo-radar header select{font-size:9px;min-height:22px;background:#06131a88;border:0}
#hud.flight-modern .holo-radar>select{font-size:9px;min-height:22px;background:#06131a88;border:0}
#hud.flight-modern .holo-radar small{display:none}
#hud.flight-modern .fh-top{position:fixed;top:env(safe-area-inset-top,0px);height:38px;z-index:10;flex-wrap:nowrap}
#hud.flight-modern .fh-right{top:82px!important;max-height:24vh}
#hud.flight-modern .fh-left{top:82px!important;max-height:24vh}
#hud.flight-modern .fh-targets{top:42px!important;max-height:34px;right:6px!important;left:6px!important;z-index:9}
#hud.flight-modern .fh-target button{min-height:28px;max-height:32px;overflow:hidden}
#hud.flight-modern .tutor{position:fixed!important;top:240px!important;bottom:auto!important;left:8px!important;right:auto!important;width:170px!important;max-height:100px;overflow:auto;z-index:8}
#hud.flight-modern .hud-notice{top:40px!important;max-width:40vw;max-height:34px;overflow:hidden}
#hud.flight-modern .fh-bottom{bottom:max(5px,env(safe-area-inset-bottom));z-index:10}
#station-deck.sdeck{inset:4px!important;display:flex!important;flex-direction:column!important;padding:0!important;z-index:1500!important;background:#07121b!important}
#station-deck.sdeck.hidden{display:none!important}
#station-deck .sd-head{position:static!important;inset:auto!important;width:100%!important;max-width:none!important;min-height:0!important;display:flex!important;flex-wrap:nowrap!important;align-items:center;justify-content:space-between;padding:8px!important;margin:0!important;box-sizing:border-box;flex:0 0 auto}
#station-deck .sd-head>div:first-child{min-width:0;flex:1}
#station-deck .sd-head h2{font-size:13px!important;overflow-wrap:anywhere}
#station-deck .sd-headr{display:flex!important;flex-wrap:wrap!important;gap:4px!important;max-width:42%;margin:0!important}
#station-deck .sd-headr button{min-height:28px!important;padding:4px 6px!important;font-size:10px!important}
#station-deck .sd-grid{display:flex!important;flex:1 1 0!important;min-height:0!important;width:100%;overflow:hidden}
#station-deck .sd-main{display:grid!important;grid-template-columns:136px minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;flex:1!important;min-height:0!important;width:100%;padding:0!important;overflow:hidden}
#station-deck .sd-tabs{position:static!important;inset:auto!important;display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;align-content:start!important;width:auto!important;max-height:none!important;margin:0!important;padding:4px!important;overflow:auto!important;grid-column:1;grid-row:1}
#station-deck .sd-tabs button{flex:0 0 auto!important;width:100%!important;min-height:30px!important;padding:6px!important;font-size:10px!important;white-space:nowrap!important}
#station-deck .sd-body{position:relative!important;inset:auto!important;grid-column:2;grid-row:1;width:auto!important;min-height:0!important;overflow:auto!important;pointer-events:auto!important;padding:8px!important;background:#07121b!important}
#station-deck[data-view=market] .sd-body{padding:0!important;overflow:hidden!important}
#station-deck .sd-service-select,#station-deck .sd-service-bar{display:none!important}
#station-deck .dock-ship-card{position:static!important;inset:auto!important;max-width:100%!important;margin:8px!important}
body:has(#station-deck:not(.hidden)) #hud.flight-modern{visibility:hidden}
@media(max-width:650px){
 #hud.flight-modern .fh-top>b{max-width:88px;font-size:7px}#hud.flight-modern .fh-clock{font-size:7px}
 #hud.flight-modern .fh-right{width:130px!important;right:6px!important;left:auto!important}
 #hud.flight-modern .fh-left{width:145px!important;left:6px!important;right:auto!important}
 #hud.flight-modern .fh-actions{bottom:190px!important;right:6px!important;grid-template-columns:repeat(3,36px)!important;gap:3px!important}
 #hud.flight-modern .fh-actions>button{width:36px!important;height:32px!important;min-height:32px!important;font-size:8px!important}
 #hud.flight-modern .fh-thrust{bottom:190px!important;left:6px!important;width:100px!important;padding:5px!important}
 #hud.flight-modern .fh-thrust input{height:24px!important}
 #hud.flight-modern .fh-presets button{min-height:26px!important}
 #hud.flight-modern .fh-thrust>button{min-height:28px!important;font-size:9px}
 #hud.flight-modern .holo-radar{width:170px!important;bottom:52px!important}
 #hud.flight-modern .holo-radar canvas{height:95px!important}
 #hud.flight-modern .tutor{top:220px!important;width:145px!important;max-height:85px;font-size:9px!important}
 #hud.flight-modern .fh-bottom button{min-height:32px;font-size:9px;padding:3px 5px}
 #station-deck .sd-main{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:36px minmax(0,1fr)!important}
 #station-deck .sd-tabs{grid-column:1!important;grid-row:1!important;flex-direction:row!important;overflow-x:auto!important;overflow-y:hidden!important;border-right:0!important;align-items:center!important}
 #station-deck .sd-tabs button{width:auto!important;min-width:0!important}
 #station-deck .sd-body{grid-column:1!important;grid-row:2!important}
 #station-deck .sd-subtl{font-size:9px!important;line-height:1.2}
}
@media(max-height:600px){
 #hud.flight-modern .fh-right{max-height:25vh!important}
 #hud.flight-modern .fh-right #gauges h2,#hud.flight-modern .fh-right .fh-shipname{display:none}
 #hud.flight-modern .tutor{top:82px!important;left:8px!important;max-height:70px!important}
 #hud.flight-modern .fh-left{top:160px!important;max-height:60px!important}
 #hud.flight-modern .fh-actions,#hud.flight-modern .fh-thrust{bottom:48px!important}
 #hud.flight-modern .holo-radar{width:130px!important;bottom:48px!important}
 #hud.flight-modern .holo-radar canvas{height:70px!important}
 #hud.flight-modern .fh-speed{display:none}
}
#station-deck .sd-switcher{display:none!important}
#hud.flight-modern .fh-targets{top:82px!important;left:6px!important;right:auto!important;width:160px;max-width:42vw}
#hud.flight-modern .fh-left{top:125px!important;max-height:85px}
#hud.flight-modern .hud-notice{top:40px!important;max-width:70vw}

#startup-screen[hidden]{display:none!important}#startup-enter{padding:12px 24px;background:#10303e;color:#b6f1ff;border:1px solid #63c8df;font:inherit;cursor:pointer}
/* Creation choices stay inside the scrollable card, including on Android. */
.creation-dropdown{border:1px solid #375463;background:#091b27;margin:8px 0;border-radius:4px}
.creation-dropdown summary{padding:10px;cursor:pointer;color:#b8e7f1;overflow-wrap:anywhere;font-size:12px}
.creation-options{display:grid;max-height:210px;overflow:auto;border-top:1px solid #375463}
.creation-options button{display:block;text-align:left;white-space:normal;padding:10px;border:0;border-bottom:1px solid #243d49;background:#0a1721;color:#c4dee7;font:12px system-ui;min-height:36px}
.creation-options button[aria-pressed=true]{background:#173c4c;color:#91e9f5}
.creation-options button:focus-visible{outline:2px solid #8ae4f6;outline-offset:-2px}
/* Market density: reduce chrome and cell padding, retain readable touch targets. */
#station-deck[data-view=market] .sd-head{padding:5px 8px!important}
#station-deck[data-view=market] .sd-head h2{font-size:11px!important}
#station-deck[data-view=market] .sd-subtl{display:none}
.gtn-market.eve-hud .title-bar{padding:4px 8px}
.gtn-market.eve-hud .title{font-size:11px}
.gtn-market.eve-hud .region-bar{padding:5px}
.gtn-market.eve-hud .region-bar .value{font-size:11px}
.gtn-market.eve-hud .item-header{position:relative;padding:6px;gap:5px}
.gtn-market.eve-hud .item-name{font-size:13px}
.gtn-market.eve-hud .item-icon{width:26px;height:26px;font-size:15px}
.gtn-market.eve-hud .gtn-star{position:absolute;right:4px;top:4px;margin:0;font-size:14px;padding:0 4px}
.gtn-market.eve-hud .item-meta{padding-right:22px}
.gtn-market.eve-hud .item-stats{gap:7px;font-size:10px}
.gtn-market.eve-hud .history-strip{display:none}
.gtn-market.eve-hud .main-tabs .gtn-btn{min-height:26px;padding:4px;font-size:9px}
.gtn-market.eve-hud .tree{font-size:10px}
.gtn-market.eve-hud .tree summary{padding:5px;line-height:1.25}
.gtn-market.eve-hud .tree-item{min-height:26px;padding:4px 5px 4px 13px}
.gtn-market.eve-hud .orders-header{padding:4px 6px;font-size:10px}
.gtn-market.eve-hud table.orders th,.gtn-market.eve-hud table.orders td{font-size:9px;padding:4px 3px;line-height:1.3}
.gtn-market.eve-hud .orders-area>.gtn-muted{font-size:9px;max-height:28px;overflow:auto;padding:3px 6px;margin:0;flex:none}
.gtn-market.eve-hud .footer-bar{padding:4px;gap:4px}
.gtn-market.eve-hud .trade-location{font-size:8px}
.gtn-market.eve-hud .action-btns .gtn-btn{font-size:9px;min-height:28px;padding:4px 6px}
.gtn-market.eve-hud .search-box{padding:5px}
.gtn-market.eve-hud .search-box input{font-size:11px;padding:6px}
.gtn-market.eve-hud .range-filter{padding:4px;gap:2px}
.gtn-market.eve-hud .range-filter button{font-size:9px;padding:4px}
@media(max-width:600px){.gtn-market.eve-hud .sidebar{width:28%;min-width:90px}.gtn-market.eve-hud .item-path{font-size:9px}.gtn-market.eve-hud .main-tabs{flex-wrap:nowrap}.gtn-market.eve-hud .main-tabs .gtn-btn{flex:1;white-space:normal;font-size:8px}.gtn-market.eve-hud .stat label{font-size:7px}}

.landing-dock-view{position:relative;width:100%;height:100%;min-height:300px;overflow:hidden;background:#07121c}
.landing-dock-view canvas{display:block;width:100%;height:calc(100% - 35px)}
.landing-dock-view p{position:absolute;bottom:0;left:0;right:0;margin:0;padding:8px;background:#081923dd;color:#a9e6ef;font:11px system-ui}
#station-deck[data-view=hangar] .sd-body{padding:0!important;overflow:hidden!important}
.creation-options>strong{padding:6px 10px;color:#8de1ed;font:10px system-ui}
.gtn-market.eve-hud .tree .tree details{padding-left:6px}
/* 0.5.6 flight layout: fixed instrument lanes, free central view. */
#hud.flight-modern .fh-right{display:contents!important}
#hud.flight-modern #gauges{display:none!important}
#hud.flight-modern .fh-health{position:fixed;top:76px;left:8px;width:150px;padding:6px;background:#06141ac9;border-left:2px solid var(--holo);pointer-events:auto;font:10px monospace;z-index:12}
#hud.flight-modern .fh-health>div{display:grid;grid-template-columns:42px minmax(0,1fr) 28px;gap:4px;align-items:center;height:18px}
#hud.flight-modern .fh-health meter{width:100%;height:8px;accent-color:#7ae6ee}
#hud.flight-modern .fh-health b{text-align:right;font-weight:400}
#hud.flight-modern .fh-overview{position:fixed;top:76px;right:8px;width:190px;height:146px;padding:5px;background:#06141ac9;border-right:2px solid var(--holo);pointer-events:auto;z-index:12;box-sizing:border-box}
#hud.flight-modern .fh-overview h2{font:9px monospace;color:var(--holo);margin:0;padding:2px 3px 5px}
#hud.flight-modern .fh-overview-list{height:116px;overflow:auto;font-size:10px}
#hud.flight-modern .fh-overview-list button{display:block;min-height:29px;width:100%;border:0;border-bottom:1px solid #3b657540;background:transparent;text-align:left;color:#bfdee7;font:10px/1.3 system-ui;padding:5px;overflow-wrap:anywhere}
#hud.flight-modern .fh-switches{position:fixed;right:8px;top:228px;width:190px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;pointer-events:auto;z-index:12}
#hud.flight-modern .fh-switches button{display:flex;align-items:center;justify-content:space-between;min-height:32px;font-size:10px;padding:4px 6px}
#hud.flight-modern .fh-switches button::after{content:'';width:23px;height:12px;flex:none;border-radius:9px;background:radial-gradient(circle at 6px 6px,#80909b 4px,transparent 5px),#23313b;border:1px solid #57727a}
#hud.flight-modern .fh-switches button[aria-checked=true]::after{background:radial-gradient(circle at 17px 6px,#bdf8f0 4px,transparent 5px),#267367}
#hud.flight-modern .fh-actions{position:fixed!important;right:8px!important;bottom:210px!important;display:grid!important;grid-template-columns:repeat(2,44px)!important;gap:4px!important;max-width:none!important}
#hud.flight-modern .fh-actions>button{width:44px!important;height:38px!important;min-height:38px!important;grid-column:auto!important;grid-row:auto!important;font-size:9px!important}
#hud.flight-modern .fh-actions .sw[data-sys=shields],#hud.flight-modern .fh-actions .sw[data-sys=engines],#hud.flight-modern .fh-actions .sw[data-sys=turretsArmed],#hud.flight-modern #btn-brake{display:none!important}
#hud.flight-modern .fh-actions>button[hidden]{display:none!important}
#hud.flight-modern .fh-navigation{position:fixed;left:calc(50% + 132px);bottom:60px;display:grid;grid-template-columns:1fr;gap:5px;width:76px;pointer-events:auto;z-index:10}
#hud.flight-modern .fh-navigation button{position:relative!important;inset:auto!important;display:flex!important;align-items:center;justify-content:center;flex-direction:column;width:100%!important;min-height:40px!important;padding:3px!important;font:12px monospace!important;letter-spacing:0;overflow:hidden;border:1px solid #5599a9;background:#0a202bd9;color:#c7f3f5}
#hud.flight-modern .fh-navigation #btn-plock{font-size:28px!important}
#hud.flight-modern .fh-navigation .nm{font-size:11px!important}
#hud.flight-modern .fh-navigation .st,#hud.flight-modern .fh-navigation .warp-state{font-size:9px!important;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#hud.flight-modern .holo-radar{width:260px!important;bottom:54px!important;pointer-events:auto}
#hud.flight-modern .holo-radar canvas{width:100%!important;height:182px!important}
#hud.flight-modern .fh-thrust{position:fixed!important;left:8px!important;bottom:60px!important;width:72px!important;height:224px!important;padding:5px!important;display:flex!important;flex-direction:column!important;align-items:center;gap:4px!important;box-sizing:border-box}
#hud.flight-modern .fh-thrust input{writing-mode:vertical-lr;direction:rtl;appearance:auto;width:30px!important;height:150px!important;min-height:0;flex:1;touch-action:none}
#hud.flight-modern .fh-thrust label{font-size:9px}
#hud.flight-modern .fh-thrust button{font-size:9px;padding:4px;min-height:34px;width:100%}
#hud.flight-modern .fh-presets{display:none!important}
#hud.flight-modern .fh-cargo-icon{position:fixed;top:calc(50% - 48px);left:calc(50% + 24px);width:60px;height:34px;pointer-events:auto;z-index:15;border:1px solid #a4e9ee;border-radius:17px;font:bold 12px monospace;background:linear-gradient(to top,#387d8d var(--fill,0%),#07161dd9 0);color:white;padding:2px}
#hud.flight-modern .fh-cargo{position:fixed;left:50%;top:calc(50% + 36px);transform:translateX(-50%);width:min(330px,90vw);z-index:25;pointer-events:auto;max-height:30vh;overflow:auto}
#hud.flight-modern .fh-targets{position:fixed!important;left:8px!important;right:auto!important;top:160px!important;width:190px!important;max-width:45vw!important;max-height:108px!important;display:flex!important;overflow-x:auto!important;gap:5px}
#hud.flight-modern .fh-target{position:relative;min-width:56px;max-width:60px;display:block}
#hud.flight-modern .fh-target>button:first-child{display:block;width:60px;max-height:none!important;max-width:none!important;padding:3px;font-size:8px;overflow:hidden;background:#081c28bb}
#hud.flight-modern .fh-target svg{display:block;width:100%;height:28px}
#hud.flight-modern .fh-target small{display:block;font-size:7px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#hud.flight-modern .fh-target-bars>div{display:flex;justify-content:space-between;font:7px monospace;margin-top:2px;background:#12303d;border-bottom:1px solid #4d7d8c}
#hud.flight-modern .fh-target .fh-unlock{position:absolute;top:0;left:0;color:#ff5353;background:#1b0e15;border:0;width:18px;height:18px;min-height:18px;padding:0;font:bold 17px monospace;z-index:2}
#hud.flight-modern #respline{position:fixed!important;top:auto!important;bottom:310px!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(240px,62vw)!important;max-height:38px;overflow:auto;white-space:normal;font-size:9px!important;z-index:8}
#hud.flight-modern #alarms{position:fixed!important;top:auto!important;bottom:286px!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:180px;max-height:24px;overflow:auto;font:9px monospace;color:#ff9a90;z-index:8}
#hud.flight-modern .fh-qrf{display:none!important}
#hud.flight-modern .tutor{position:fixed!important;top:auto!important;bottom:300px!important;left:8px!important;width:140px!important;max-height:90px!important;overflow:auto;font-size:9px!important;z-index:7}
#hud.flight-modern .fh-left{top:280px!important;left:8px!important;right:auto!important;width:145px!important;max-height:90px!important}
#hud.flight-modern .fh-cross{top:50%!important;left:50%!important}
@media(max-width:650px){
 #hud.flight-modern .fh-health{left:6px;width:120px;top:76px;font-size:9px}
 #hud.flight-modern .fh-health>div{grid-template-columns:34px minmax(0,1fr) 24px;height:16px}
 #hud.flight-modern .fh-overview{right:6px;top:76px;width:146px;height:126px}
 #hud.flight-modern .fh-overview-list{height:96px}
 #hud.flight-modern .fh-switches{right:6px;top:208px;width:146px;gap:3px}
 #hud.flight-modern .fh-switches button{font-size:9px;min-height:30px;padding:3px}
 #hud.flight-modern .fh-targets{top:150px!important;width:150px!important;max-height:108px!important}
 #hud.flight-modern .fh-target{min-width:45px;max-width:47px}#hud.flight-modern .fh-target>button:first-child{width:47px}
 #hud.flight-modern .holo-radar{width:50vw!important;bottom:54px!important}
 #hud.flight-modern .holo-radar canvas{height:140px!important}
 #hud.flight-modern .fh-navigation{left:auto;right:6px;width:64px;bottom:60px}
 #hud.flight-modern .fh-actions{right:6px!important;bottom:206px!important;grid-template-columns:repeat(2,38px)!important;gap:3px!important}
 #hud.flight-modern .fh-actions>button{width:38px!important;height:34px!important;min-height:34px!important;font-size:8px!important}
 #hud.flight-modern .fh-thrust{left:6px!important;width:62px!important;height:214px!important;bottom:60px!important}
 #hud.flight-modern .tutor{bottom:286px!important;width:122px!important;max-height:76px!important}
 #hud.flight-modern #respline{bottom:206px!important;width:45vw!important;max-height:34px}
 #hud.flight-modern #alarms{bottom:182px!important;width:45vw!important}
}
@media(max-height:540px) and (orientation:landscape){
 #hud.flight-modern .fh-health{top:42px;width:140px}
 #hud.flight-modern .fh-targets{top:124px!important}
 #hud.flight-modern .fh-overview{top:42px;height:96px;width:180px}
 #hud.flight-modern .fh-overview-list{height:68px}
 #hud.flight-modern .fh-switches{top:144px;width:180px}
 #hud.flight-modern .fh-actions{bottom:54px!important;right:8px!important}
 #hud.flight-modern .fh-thrust{height:160px!important;bottom:54px!important}
 #hud.flight-modern .fh-thrust input{height:90px!important}
 #hud.flight-modern .holo-radar{width:200px!important;bottom:48px!important}
 #hud.flight-modern .holo-radar canvas{height:120px!important}
 #hud.flight-modern .fh-navigation{left:calc(50% + 110px);bottom:54px;width:64px}
 #hud.flight-modern .tutor{left:84px!important;bottom:54px!important;width:130px!important;max-height:70px!important}
 #hud.flight-modern #respline{bottom:180px!important}#hud.flight-modern #alarms{bottom:157px!important}
}
@media(max-height:540px) and (orientation:landscape){
 #hud.flight-modern .fh-overview{height:82px}#hud.flight-modern .fh-overview-list{height:54px}
 #hud.flight-modern .fh-switches{top:130px}#hud.flight-modern .fh-switches button{min-height:26px}
 #hud.flight-modern .fh-actions{bottom:44px!important;max-height:calc(100dvh - 238px)!important;overflow-y:auto;pointer-events:auto}
 #hud.flight-modern .fh-actions>button{height:28px!important;min-height:28px!important}
}

/* 0.5.7: independent navigation controls and overlay rail */
#hud.flight-modern .fh-navigation{grid-template-columns:minmax(0,1fr)!important; width:82px!important;right:6px!important;left:auto!important;bottom:66px!important}
#hud.flight-modern .fh-navigation>button{grid-column:1!important;grid-row:auto!important;min-width:0!important;width:100%!important;min-height:46px!important;flex-shrink:0;box-sizing:border-box}
#hud.flight-modern .fh-navigation .warp-lab{font-size:13px!important;position:relative}
#hud.flight-modern .fh-navigation .warp-state{font-size:10px!important;position:relative}
#hud.flight-modern .fh-flight-status{position:fixed;left:50%;top:calc(50% + 58px);transform:translateX(-50%);width:min(300px,76vw);padding:9px 12px;box-sizing:border-box;text-align:center;white-space:normal;overflow-wrap:anywhere;background:#091923e8;border:1px solid #5b9aab;color:#c6edf4;font:12px/1.4 monospace;pointer-events:none;z-index:14}
#hud.flight-modern.fh-warping .fh-flight-status{top:50%;transform:translate(-50%,-50%);font-size:15px}
#hud.flight-modern.fh-warping .fh-cross{visibility:hidden}
#hud.flight-modern #notice-card{display:none!important}
#hud.flight-modern .fh-bottom.fh-neocom{position:fixed!important;left:0!important;top:50%!important;bottom:auto!important;right:auto!important;transform:translateY(-50%)!important;display:flex!important;flex-direction:column!important;width:96px!important;gap:4px;padding:8px 6px;background:#07131ef5;border:1px solid #5b9aab;z-index:60;max-height:80dvh;overflow-y:auto;pointer-events:auto}
#hud.flight-modern .fh-neocom[hidden]{display:none!important}
#hud.flight-modern .fh-neocom button{width:100%;min-height:38px;font-size:12px}
#hud.flight-modern .fh-rail-toggle{position:fixed;left:0;top:50%;transform:translateY(-50%);width:26px;height:52px;font-size:28px;pointer-events:auto;z-index:61;padding:0;background:#102936e8}
#hud.flight-modern .fh-rail-toggle[aria-expanded="true"]{left:110px}
#hud.flight-modern .fh-flight-status[hidden]{display:none}

/* 0.5.8: right control column and gate-route strip */
#hud.flight-modern .fh-control-stack{position:fixed;right:6px;top:228px;width:190px;display:flex;flex-direction:column;align-items:flex-end;gap:6px;max-height:calc(100dvh - 432px);overflow-y:auto;pointer-events:auto;z-index:12}
#hud.flight-modern .fh-control-stack .fh-switches{position:static!important;width:100%!important;display:grid;grid-template-columns:1fr 1fr}
#hud.flight-modern .fh-switches button:last-child{grid-column:2}
#hud.flight-modern .fh-control-stack .fh-actions{position:static!important;display:flex!important;flex-direction:column!important;width:82px!important;max-height:none!important;overflow:visible!important;gap:4px}
#hud.flight-modern .fh-actions .sw[data-sys="assist"],#hud.flight-modern #op-dock{display:none!important}
#hud.flight-modern .fh-actions>button{grid-area:auto!important;width:82px!important;min-height:36px!important;flex-shrink:0}
#hud.flight-modern .fh-control-stack .fh-cargo-icon{position:static!important;transform:none!important;width:82px!important;min-height:36px!important;flex-shrink:0}
#hud.flight-modern .fh-overview-row{display:grid!important;grid-template-columns:20px minmax(0,1fr) minmax(0,1.2fr) 42px;gap:3px;text-align:left;align-items:center;font:10px/1.3 sans-serif!important;width:100%;box-sizing:border-box}
#hud.flight-modern .fh-overview-row span{min-width:0;overflow-wrap:anywhere}
#hud.flight-modern .fh-overview-head{color:#9dbbc8;padding:3px 4px;font-size:9px!important}
#hud.flight-modern .fh-overview-list{height:calc(100% - 48px)!important}
#hud.flight-modern .fh-route-panel{position:fixed;left:6px;top:76px;width:150px;padding:6px;text-align:left;font:10px/1.4 monospace;color:#bdeaf0;background:#091923e8;border:1px solid #467d8c;pointer-events:auto;z-index:12}
#hud.flight-modern .fh-route-strip{border-top:1px solid #365b66;margin-top:4px;padding-top:3px;display:flex;align-items:center;gap:2px;flex-wrap:wrap}
#hud.flight-modern .fh-health{top:152px!important}
#hud.flight-modern .fh-targets{top:242px!important}
@media(max-width:600px){#hud.flight-modern .fh-control-stack{top:208px;width:146px}#hud.flight-modern .fh-route-panel{width:120px}#hud.flight-modern .fh-overview-row{grid-template-columns:14px minmax(0,1fr) minmax(0,1fr) 33px;font-size:9px!important}}
@media(max-height:540px) and (orientation:landscape){#hud.flight-modern .fh-route-panel{top:42px}#hud.flight-modern .fh-health{top:112px!important}#hud.flight-modern .fh-targets{top:202px!important}#hud.flight-modern .fh-control-stack{top:130px;max-height:calc(100dvh - 182px);right:94px;width:190px}}

/* 0.5.11 display-only radar and compact overview */
#hud.flight-modern .fh-route-panel{background:transparent!important;box-shadow:none!important;border-color:transparent!important}
#hud.flight-modern .holo-radar,#hud.flight-modern .holo-radar *{pointer-events:none!important}
#hud.flight-modern .fh-overview{background:#080f18e8;border:1px solid #37515d}
#hud.flight-modern .fh-overview-row{grid-template-columns:18px minmax(0,1fr) 43px!important;min-height:23px!important;padding:3px 4px!important;gap:4px!important;font:10px/1.2 sans-serif!important;border-bottom:1px solid #23333f;border-radius:0!important}
#hud.flight-modern .fh-overview-row span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
#hud.flight-modern .fh-overview-row span:last-child{text-align:right;font-variant-numeric:tabular-nums}
#hud.flight-modern .fh-overview-row:hover{background:#294754}
#hud.flight-modern .fh-agency{width:82px;min-height:36px;font-size:23px;flex-shrink:0}
.agency-events article{padding:9px 0;border-bottom:1px solid #29414b;font:12px/1.5 monospace}.agency-events h3{font-size:13px;color:#8ddde7}.agency-events p{margin:4px 0}

/* 0.5.12 station workspace */
#station-deck.sdeck{inset:4px!important;padding:0!important;display:flex;flex-direction:column;overflow:hidden}
#station-deck.hidden{display:none!important}
#station-deck .sd-head{position:relative!important;inset:auto!important;width:100%;box-sizing:border-box;padding:10px!important;display:flex!important;align-items:center;justify-content:space-between;gap:10px;flex:0 0 auto;background:#0b1925f2}
#station-deck .sd-head>div:first-child{min-width:0;flex:1}
#station-deck #sd-title{font-size:14px!important;line-height:1.3;overflow-wrap:anywhere;margin:0}
#station-deck .sd-headr{display:flex!important;flex-wrap:wrap;justify-content:flex-end;gap:4px;max-width:48%}
#station-deck .sd-headr .sd-btn,#station-deck .sd-chip{font-size:11px!important;padding:7px!important;min-height:32px}
#station-deck .sd-grid{display:flex!important;flex:1;min-height:0;padding:0!important}
#station-deck .sd-main{display:grid!important;grid-template-columns:78px minmax(0,1fr);grid-template-rows:minmax(0,1fr);width:100%;min-height:0;overflow:hidden}
#station-deck .sd-tabs{display:flex!important;flex-direction:column!important;grid-column:1;grid-row:1;width:78px!important;overflow-y:auto!important;overflow-x:hidden!important;border-right:1px solid #35505f;background:#07121be8;padding:3px!important;box-sizing:border-box}
#station-deck .sd-tabs button{flex:0 0 auto;width:100%;min-height:40px;font-size:10px!important;padding:6px 3px!important;white-space:normal;box-sizing:border-box}
#station-deck .sd-body{grid-column:2;grid-row:1;min-width:0;min-height:0;padding:10px!important;overflow:auto}
#station-deck .sd-switcher{display:none!important}
#station-deck[data-view="hangar"] .sd-body{padding:0!important;overflow:hidden}
#station-deck .landing-dock-view{width:100%;height:100%;min-height:0!important;position:relative;overflow:hidden}
#station-deck .landing-dock-view canvas{display:block;max-width:100%;max-height:calc(100% - 35px);width:100%;object-fit:contain}
#station-deck .landing-dock-view p{position:absolute;bottom:0;left:0;right:0;height:30px;margin:0;padding:4px;font-size:11px;box-sizing:border-box;background:#07121bd9}
.corp-emblem{width:40px;height:40px;object-fit:contain;vertical-align:middle;flex-shrink:0}
#sd-sub{display:flex;align-items:center;gap:7px;font-size:11px}#sd-sub .corp-emblem{width:28px;height:28px}
.emblem-editor{display:flex;flex-wrap:wrap;gap:8px;padding:10px;border:1px solid #35505f}.emblem-editor .corp-emblem{width:96px;height:96px}.emblem-editor label{display:flex;flex-direction:column;font-size:12px}.emblem-editor select{max-width:130px;background:#0a1924;color:#d4edf2}

/* 0.5.13 station services remain visible in both orientations. */
#station-deck .sd-head{padding:6px 8px!important;gap:8px!important;min-height:0!important}
#station-deck #sd-title{font-size:12px!important;letter-spacing:.06em!important;line-height:1.15!important}
#station-deck #sd-sub{font-size:10px!important;line-height:1.15;gap:5px!important}
#station-deck #sd-sub .corp-emblem{width:23px!important;height:23px!important}
#station-deck .sd-headr{max-width:52%!important;gap:3px!important;align-items:center}
#station-deck .sd-pilot-info{flex-basis:100%;font:10px/1.2 monospace;color:#a6ccd6;text-align:right;overflow-wrap:anywhere}
#station-deck .sd-headr .sd-btn,#station-deck .sd-chip{font-size:10px!important;min-height:26px!important;padding:5px 7px!important}
#station-deck .sec-badge-deck{display:none!important}
#station-deck .sd-service-panel{flex:0 0 auto;width:100%;box-sizing:border-box;display:flex;justify-content:flex-end;padding:4px 6px;background:transparent!important;max-height:24dvh;overflow-y:auto}
#station-deck .sd-service-panel #sd-tabs{position:static!important;display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;justify-content:flex-end!important;align-items:stretch!important;width:100%!important;max-width:760px!important;max-height:none!important;overflow:visible!important;background:transparent!important;border:0!important;padding:0!important;gap:3px!important}
#station-deck .sd-service-panel #sd-tabs button{display:block;flex:0 0 auto!important;width:auto!important;min-width:56px!important;min-height:28px!important;margin:0!important;padding:5px 7px!important;font-size:10px!important;white-space:nowrap!important;box-sizing:border-box}
#station-deck .sd-service-panel #sd-tabs button[hidden]{display:none!important}
#station-deck .sd-main{display:block!important;grid-template-columns:none!important;grid-template-rows:none!important;min-height:0!important;flex:1!important}
#station-deck #sd-body{width:100%!important;height:100%!important;box-sizing:border-box;grid-column:auto!important;grid-row:auto!important;min-width:0!important;min-height:0!important}

/* 0.5.15: all four arcs share the reticle center; readouts sit beside the quadrant. */
#hud.flight-modern .fh-health{position:fixed!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%);width:120px!important;height:120px!important;background:transparent!important;border:0!important;padding:0!important;pointer-events:none;z-index:8}
#hud.flight-modern .fh-health>div{position:absolute;inset:0!important;height:120px!important;display:block!important;color:#60d9ff}
#hud.flight-modern .fh-health>div:nth-child(2){color:#d6b88b}
#hud.flight-modern .fh-health>div:nth-child(3){color:#fa746d}
#hud.flight-modern .fh-health>div:nth-child(4){color:#f5db58}
#hud.flight-modern .fh-health svg{position:absolute;inset:0;width:120px;height:120px;overflow:visible}
#hud.flight-modern .fh-health path{fill:none;stroke-width:3}
#hud.flight-modern .fh-health .status-track{stroke:#213942}
#hud.flight-modern .fh-health .status-fill{stroke:currentColor;stroke-linecap:round}
#hud.flight-modern .fh-health meter{display:none}
#hud.flight-modern .fh-health span,#hud.flight-modern .fh-health b{position:absolute;font:10px/12px monospace!important;left:116px;top:62px;color:inherit;text-shadow:0 1px 3px #000,0 0 3px #000;white-space:nowrap}
#hud.flight-modern .fh-health b{left:137px;text-align:left}
#hud.flight-modern .fh-health>div:nth-child(2) :is(span,b){top:74px}
#hud.flight-modern .fh-health>div:nth-child(3) :is(span,b){top:86px}
#hud.flight-modern .fh-health>div:nth-child(4) :is(span,b){top:98px}
#hud.flight-modern .fh-flight-status{top:calc(50% + 150px)}
#hud.flight-modern.fh-warping .fh-health{visibility:hidden}

/* 0.6.1: reversed reticle stack; colors follow the system, not DOM order. */
#hud.flight-modern .fh-health>div[data-status=energy]{color:#f5db58}
#hud.flight-modern .fh-health>div[data-status=hull]{color:#fa746d}
#hud.flight-modern .fh-health>div[data-status=armor]{color:#d6b88b}
#hud.flight-modern .fh-health>div[data-status=shield]{color:#60d9ff}
#hud.flight-modern .fh-control-stack .fh-actions>button[hidden]{display:none!important}
#hud.flight-modern .fh-actions>button.on{border-color:#6de5b0;background:#17453f;color:#bbffe4}

#hud.flight-modern .fh-route-panel{left:max(6px,env(safe-area-inset-left));max-width:42vw;min-height:40px;background:#091923dc!important;border-color:#365462!important;border-radius:4px}
#hud.flight-modern .fh-route-panel :is(div,small){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#hud.flight-modern .fh-route-panel[hidden]{display:none}
dialog.universe-map{box-sizing:border-box;width:min(46rem,96vw);max-height:92dvh;overflow:auto;overscroll-behavior:contain}
.universe-map header{position:sticky;top:0;z-index:1;background:#101e2a;display:flex;align-items:center;justify-content:space-between}
.universe-map input[type=search]{box-sizing:border-box;width:100%;padding:.6rem}
.universe-map .gate-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:.3rem}
.universe-map .gate-row :is(b,small){grid-column:1/-1}
.universe-map .galaxy-pager{display:flex;justify-content:space-between;align-items:center;gap:.5rem}
.universe-map :is(button,summary){min-height:36px}
@media(orientation:landscape) and (max-height:540px){dialog.universe-map{max-height:94dvh}.universe-map .gate-list{display:grid;grid-template-columns:1fr 1fr;gap:0 1rem}}

/* Keep station names and module details readable on narrow portrait displays. */
#station-deck #sd-title,#station-deck #sd-sub,#station-deck .sd-pilot-info {
  white-space:normal;
  overflow:visible;
  overflow-wrap:anywhere;
  line-height:1.25;
}
#station-deck #sd-sub .corp-emblem {flex:none}
#station-deck .service-content :is(h2,h3,h4,.sd-lab small,.tnote) {white-space:normal;overflow-wrap:anywhere}
#station-deck .fitted-module .v {flex:0 0 auto;max-width:45%}
@media(max-width:430px) {
  #station-deck .sd-headr {min-width:0}
  #station-deck .fitted-module {align-items:center}
  #station-deck .fitted-module .k {padding-right:33px}
}

#lg-flight-controls .dial .flight-instruments{box-sizing:border-box;width:100%;min-width:80px;background:#0a1723df;border:1px solid #64788b;border-radius:6px;padding:3px 5px;color:#d9ebef;font:10px monospace}
.flight-instruments strong{display:block;text-align:center}.flight-instruments label{display:flex;align-items:center;gap:4px;height:13px}.flight-instruments label svg,.flight-instruments label span{position:static!important;width:12px!important;height:12px!important;transform:none!important;fill:none;stroke:currentColor;stroke-width:1.7}.flight-instruments meter{width:100%;height:9px}.flight-instruments meter::-webkit-meter-optimum-value{background:#66bbef}.flight-instruments label:nth-of-type(2) meter::-webkit-meter-optimum-value{background:#e6b766}.flight-instruments label:nth-of-type(3) meter::-webkit-meter-optimum-value{background:#e78177}.flight-instruments label:last-of-type meter::-webkit-meter-optimum-value{background:repeating-linear-gradient(90deg,#a3deb2 0 12%,#18332c 12% 16%)}.flight-instruments>small{white-space:nowrap;font-size:8px}
#flight-academy{position:fixed;z-index:9900;left:8px;top:48px;width:min(245px,54vw);max-height:25dvh;overflow:auto;padding:7px 10px;border-left:2px solid #65cdbf;background:#0b1824ed;color:#e0eef4;font:12px/1.3 system-ui}#flight-academy p{margin:4px 0}#flight-academy small{display:block;color:#a4c1cf}#flight-academy button,#flight-academy select{max-width:100%;color:inherit;background:#193443;border:1px solid #4a7782;padding:4px}
#lg-flight #lg-flight-controls .dial {width:82px!important;height:auto!important}
#lg-flight #lg-flight-controls .flight-instruments label {position:static;white-space:normal}

.flight-instruments .low-fuel{color:#ffc477}

#lg-flight #lg-flight-chat header .collapse{order:-1;flex:0 0 27px;min-height:25px}
#lg-flight #lg-flight-chat.chat-expanded{z-index:120}
body.berth-running #lg-flight,body.berth-running #startup-screen{display:none!important}
#berth-presentation[data-direction=arrival]{background:transparent;border:0;color:#ffda58;text-shadow:0 0 8px #e97118;box-shadow:none;pointer-events:none}
#berth-presentation[data-direction=arrival]::before,#berth-presentation[data-direction=arrival]::after{display:none}
#berth-presentation[data-direction=arrival] span{animation:berth-caution 1.3s ease-in-out infinite}
@keyframes berth-caution{50%{opacity:.55}}
@media(prefers-reduced-motion:reduce){#berth-presentation[data-direction=arrival] span{animation:none}}
#flight-academy{z-index:99950}
#lg-flight .module[data-module=laser]{position:relative}
#lg-flight .module[data-module=laser][data-cutting]::after{content:'';position:absolute;left:2px;bottom:2px;height:3px;width:calc((100% - 4px)*var(--cut-cycle));background:#ffc462;pointer-events:none}

.canopy.exterior :is(.reticle,.heat-wash){display:none}
