/* v1.0.80 compact Mobile view. The native saved hotbar stays on screen;
 * coordinates come from the same visual-viewport geometry as the touch pads.
 * The only Desktop rule hides the new mobile-only page button. */
#mobile-hotbar-page {display:none;}

html.view-mobile {
 --mobile-panel-height:max(0px,calc(var(--mobile-usable-height) - var(--touch-controls-space) - 8px));
 --mobile-status-width:min(152px,calc(var(--touch-vv-width) - var(--touch-safe-left) - var(--touch-safe-right) - var(--touch-nav-width,92px) - 8px));
 --mobile-status-left:var(--touch-safe-left);
 --mobile-comms-left:var(--mobile-status-left);
 --mobile-comms-top:calc(var(--touch-safe-top) + 54px);
 --mobile-comms-width:min(112px,var(--mobile-status-width));
 --mobile-automation-space:0px;
 --mobile-automation-rail-space:0px;
 --mobile-automation-width:min(160px,calc(var(--touch-vv-width) - var(--touch-safe-left) - var(--touch-safe-right) - var(--mobile-comms-width) - 8px));
 --mobile-automation-left:calc(var(--touch-vv-width) - var(--touch-safe-right) - var(--mobile-automation-width));
 --mobile-target-space:0px;
 --mobile-notice-space:0px;
 --mobile-target-left:var(--mobile-status-left);
 --mobile-target-top:calc(var(--touch-safe-top) + 102px + var(--mobile-automation-space));
 --mobile-target-width:var(--mobile-status-width);
 --mobile-notice-left:var(--mobile-status-left);
 --mobile-notice-top:calc(var(--mobile-target-top) + var(--mobile-target-space));
 --mobile-notice-width:var(--mobile-status-width);
 --mobile-radar-width:72px;
 --mobile-rail-width:min(112px,calc(var(--touch-vv-width) - var(--touch-safe-left) - var(--touch-safe-right) - var(--mobile-status-width) - 8px));
 --mobile-rail-left:calc(var(--touch-vv-width) - var(--touch-safe-right) - var(--mobile-rail-width));
 --mobile-rail-top:calc(var(--touch-safe-top) + 50px + var(--mobile-automation-rail-space));
 --mobile-rail-end:calc(var(--touch-vv-height) - var(--touch-safe-bottom) - var(--touch-controls-space) - 8px);
}
html.view-mobile.touch-left-handed {
 --mobile-status-left:calc(var(--touch-vv-width) - var(--touch-safe-right) - var(--mobile-status-width));
 --mobile-comms-left:calc(var(--touch-vv-width) - var(--touch-safe-right) - var(--mobile-comms-width));
 --mobile-rail-left:var(--touch-safe-left);
 --mobile-automation-left:var(--touch-safe-left);
}
html.view-mobile:has(#background-action-hud:not([hidden])) {--mobile-automation-space:6px;--mobile-automation-rail-space:58px;}
html.view-mobile:has(#target:not([hidden])) {--mobile-target-space:48px;}
html.view-mobile:has(#hud-notice-stack>:not([hidden])) {--mobile-notice-space:48px;}

/* One 48px strip contains 44px slots and a fixed page button. Only the slots
 * scroll, so another saved page remains reachable at either end of the strip.
 * Runtime visibility also covers Mobile view with touch controls switched off. */
html.view-mobile #hud .hotbar {
 display:none!important;position:fixed!important;
 left:calc(var(--touch-vv-left) + var(--touch-hotbar-left,var(--touch-safe-left)))!important;right:auto!important;top:auto!important;
 bottom:calc(var(--touch-vv-bottom) + var(--touch-hotbar-bottom,var(--touch-safe-bottom)))!important;transform:none!important;
 width:var(--touch-hotbar-width,calc(var(--touch-vv-width) - var(--touch-safe-left) - var(--touch-safe-right)))!important;max-width:none!important;min-width:0!important;
 height:var(--touch-hotbar-height,48px)!important;min-height:var(--touch-hotbar-height,48px)!important;max-height:var(--touch-hotbar-height,48px)!important;
 box-sizing:border-box;align-items:center;gap:4px;padding:1px!important;border:1px solid #698c7d;border-radius:6px;
 overflow:hidden!important;background:#142920ed;box-shadow:0 2px 8px #0006;z-index:45;pointer-events:auto;
}
html:root.view-mobile.touch-hotbar-visible:not(.touch-keyboard-open) #hud .hotbar {display:flex!important;visibility:visible!important;pointer-events:auto!important;}
html:root.view-mobile:not(.touch-hotbar-visible) #hud .hotbar,
html:root.view-mobile.touch-keyboard-open #hud .hotbar {display:none!important;}
html.view-mobile #hud #hotbar-slots {
 display:flex!important;flex:1 1 0!important;flex-wrap:nowrap;align-items:center;justify-content:flex-start!important;gap:4px!important;
 width:0!important;min-width:0;max-width:none!important;height:44px;padding:0;margin:0;
 overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior:contain;touch-action:pan-x;scrollbar-width:none;
 scroll-snap-type:x proximity;scroll-padding:0;
}
html.view-mobile #hud #hotbar-slots::-webkit-scrollbar {display:none;}
html.view-mobile #hud #hotbar-slots>* {
 flex:0 0 44px!important;width:44px!important;min-width:44px!important;max-width:44px!important;
 height:44px!important;min-height:44px!important;max-height:44px!important;padding:1px;box-sizing:border-box;scroll-snap-align:start;touch-action:pan-x;
}
/* Condition/icon refresh may replace children during a held tap. Keep native
 * implicit pointer capture on the stable slot button, never a replaced child. */
html.view-mobile #hud .hot-slot>* {pointer-events:none;}
html.view-mobile #hud .hot-slot img {width:36px;height:32px;max-width:100%;object-fit:contain;}
html.view-mobile #hud .hot-slot :is(.slot-key,small) {top:1px;left:2px;font-size:8px;line-height:10px;}
html.view-mobile #hud .hot-slot .hot-action-title {font-size:8px!important;line-height:10px!important;}
html.view-mobile #hud .hot-slot .condition {left:4px;right:4px;bottom:3px;}
html.view-mobile #hud #mobile-hotbar-page {
 display:flex;flex:0 0 44px;flex-direction:column;align-items:center;justify-content:center;gap:1px;
 width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:1px;box-sizing:border-box;
 border:1px solid #7d9272;border-radius:4px;background:#293d2b;color:#eee7cb;font:600 12px/15px system-ui,sans-serif;touch-action:manipulation;
}
html.view-mobile #hud #mobile-hotbar-page::before {content:"BAR";font-size:8px;line-height:10px;letter-spacing:.6px;color:#bad1bc;}
html.view-mobile #hud .hotbar-help {display:none!important;}
html.view-mobile #hud .hotbar :focus-visible {outline:2px solid #efd394;outline-offset:-3px;}
html.view-mobile:not(.touch-ui):not(.touch-keyboard-open) #hud .hud-dock {bottom:calc(var(--touch-vv-bottom) + var(--touch-hotbar-bottom,var(--touch-safe-bottom)) + 54px);gap:4px;}

/* Keep names, health and location in a small edge column. The selected native
 * slot and Use label replace the separate, permanently repeated tool card. */
html.view-mobile #tool-status {display:none!important;}
html.view-mobile #hud #world-brand {--mobile-node-left:calc(var(--mobile-status-left) + 6px);top:calc(var(--touch-vv-top) + var(--touch-safe-top));width:calc(var(--mobile-status-width) - 12px);height:12px;max-width:none;}
html.view-mobile #world-location {font-size:9px;line-height:12px;letter-spacing:.15px;}
html.view-mobile #hud .player-status {
 --mobile-node-left:var(--mobile-status-left);top:calc(var(--touch-vv-top) + var(--touch-safe-top) + 14px);bottom:auto;
 width:var(--mobile-status-width);max-width:var(--mobile-status-width)!important;height:36px;min-height:36px;max-height:36px;
 padding:3px 6px;overflow:visible;box-sizing:border-box;border-left-width:2px;border-radius:4px;box-shadow:0 2px 8px #0004;
}
html.view-mobile #hud .player-status .eyebrow {font-size:9px;line-height:10px;letter-spacing:.6px;}
html.view-mobile #hud .player-status .healthbar {height:4px;margin:2px 0;}
html.view-mobile #hud .player-status .status-body {display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:4px;align-items:center;}
html.view-mobile #hud .player-status :is(.eyebrow,.healthbar) {grid-column:1 / -1;}
html.view-mobile #hud .player-status #status-health {min-width:0;font-size:9px;line-height:11px;white-space:nowrap;}
html.view-mobile #hud .player-status #status-shots {display:block;grid-column:2;max-width:52px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;font-size:9px;line-height:11px;}
html.view-mobile #hud .player-status #status-profession {display:none;}
html.view-mobile #hud .target-panel {
 --mobile-node-left:var(--mobile-target-left);top:calc(var(--touch-vv-top) + var(--mobile-target-top));bottom:auto;transform:none;
 width:var(--mobile-target-width);max-width:none;min-height:0;max-height:44px;padding:4px 6px;font-size:10px;line-height:13px;border-radius:4px;
}
html.view-mobile #hud .target-panel strong {font-size:11px;line-height:13px;}
html.view-mobile #hud .target-panel small {font-size:9px;line-height:11px;}
html.view-mobile #hud .target-panel .healthbar {height:3px;margin:2px 0;}
/* Repeat the historical handed selector specificity so its old right anchor
 * cannot override the current shared coordinates. */
html.view-mobile #hud :is(#world-brand,.player-status,.target-panel),
html.view-mobile.touch-left-handed #hud :is(#world-brand,.player-status,.target-panel) {left:calc(var(--touch-vv-left) + var(--mobile-node-left))!important;right:auto!important;}
html.view-mobile #hud-notice-stack,
html.view-mobile.touch-left-handed #hud-notice-stack {
 left:calc(var(--touch-vv-left) + var(--mobile-notice-left))!important;right:auto!important;top:calc(var(--touch-vv-top) + var(--mobile-notice-top));bottom:auto;transform:none;
 width:var(--mobile-notice-width);max-width:none;gap:4px;
 max-height:max(0px,min(72px,calc(var(--touch-vv-height) - var(--touch-safe-bottom) - var(--touch-controls-space) - var(--mobile-notice-top) - 8px)));
}
html.view-mobile #hud #hud-notice-stack>* {padding:5px 6px;font-size:10px;line-height:13px;}
html.view-mobile #hud-right-rail,
html.view-mobile.touch-left-handed #hud-right-rail {
 left:calc(var(--touch-vv-left) + var(--mobile-rail-left))!important;right:auto!important;top:calc(var(--touch-vv-top) + var(--mobile-rail-top));bottom:auto;transform:none;
 width:var(--mobile-rail-width);min-height:0;max-height:max(0px,calc(var(--mobile-rail-end) - var(--mobile-rail-top)));gap:4px;padding:0;
}
html.view-mobile #hud #hud-right-rail .map-panel {width:var(--mobile-radar-width)!important;margin-left:auto;margin-right:0;padding:3px!important;border-radius:4px;}
html.view-mobile.touch-left-handed #hud #hud-right-rail .map-panel {margin-left:0;margin-right:auto;}
html.view-mobile #hud .map-panel .map-foot {font-size:8px;line-height:10px;gap:2px;}
html.view-mobile #hud-right-rail :is(#flight-hud,#finder-hud,#tracked-claim) {padding:4px;font-size:10px;line-height:1.3;}
html.view-mobile #hud-right-rail :is(h3,p) {font-size:10px;line-height:1.3;margin:3px 0;}
html.view-mobile #hud-right-rail button {min-height:40px;min-width:40px;margin:2px 0;padding:4px;font-size:10px;touch-action:manipulation;}
html.view-mobile #hud-right-rail .finder-body {padding:4px;}
/* Automatic work still exposes its real Stop button; compacting status must
 * not clip it or leave the old fixed y=140px panel over the controls. */
html.view-mobile #background-action-hud {
 position:fixed;left:calc(var(--touch-vv-left) + var(--mobile-automation-left));right:auto;top:calc(var(--touch-vv-top) + var(--touch-safe-top) + 54px);bottom:auto;transform:none;
 display:flex;align-items:center;gap:4px;width:var(--mobile-automation-width);max-width:none;min-height:50px;margin:0;padding:2px;box-sizing:border-box;border-radius:4px;font-size:10px;line-height:13px;z-index:25;
}
html.view-mobile #background-action-hud>span {flex:1;min-width:0;max-height:42px;overflow:auto;overflow-wrap:anywhere;touch-action:pan-y;}
html.view-mobile #background-action-hud>button {flex:0 0 44px;min-width:44px;width:44px;min-height:44px;height:44px;margin:0;padding:2px;font-size:11px;touch-action:manipulation;}
html.view-mobile #background-action-hud[hidden] {display:none;}

/* Open windows spend their height on content. Their one outer scroll surface
 * and sticky close button remain native, independent of game gestures. */
html.view-mobile :is(.menu-window,#expedition-window,#planet-window,#cooperative-window,#auction-window,#housing-panel,#social-window,#service-window,#network-window,#systems-window,#cooking-workbench,#player-storage,#loot-window) {
 width:min(760px,calc(var(--touch-vv-width) - var(--touch-safe-left) - var(--touch-safe-right)))!important;max-width:760px;
 max-height:var(--mobile-panel-height)!important;scroll-padding:48px 6px 8px;border-radius:6px;
}
html.view-mobile :is(.menu-window,#expedition-window,#planet-window,#cooperative-window,#auction-window,#housing-panel,#social-window,#service-window,#network-window,#systems-window,#cooking-workbench,#player-storage,#loot-window)>header {min-height:44px;padding:0 6px;gap:4px;}
html.view-mobile :is(.menu-head h1,#expedition-title,#service-name,#systems-window h2,#player-storage h2) {font-size:16px;line-height:20px;}
html.view-mobile :is(.menu-window,#expedition-window,#planet-window,#cooperative-window,#auction-window,#housing-panel,#social-window,#service-window,#network-window,#systems-window,#cooking-workbench,#player-storage,#loot-window)>header .eyebrow {font-size:9px;line-height:11px;}
html.view-mobile :is(.menu-window,#expedition-window,#planet-window,#cooperative-window,#auction-window,#housing-panel,#social-window,#service-window,#network-window,#systems-window,#cooking-workbench,#player-storage,#loot-window) :is(button,[role=button],summary) {min-height:40px!important;}
html.view-mobile :is(.menu-window,#expedition-window,#planet-window,#cooperative-window,#auction-window,#housing-panel,#social-window,#service-window,#network-window,#systems-window,#cooking-workbench,#player-storage,#loot-window)>header>button {min-height:44px!important;height:44px;}
html.view-mobile :is(.menu-head,#menu-shell[data-view=inventory] .menu-head) {gap:2px 4px;}
html.view-mobile :is(#menu-nav,#expedition-tabs,#planet-tabs,#service-tabs,#auction-tabs,.coop-tabs,#housing-panel>nav,#systems-window>nav) {gap:4px;padding:2px 6px;scroll-padding-inline:6px;}
html.view-mobile :is(#menu-nav,#expedition-tabs,#planet-tabs,#service-tabs,#auction-tabs,.coop-tabs,#housing-panel>nav,#systems-window>nav)>button {min-width:56px!important;padding:5px 8px;font-size:11px;}
html.view-mobile #systems-window :is(.systems-nav,.dock-grid) {gap:4px;}
html.view-mobile #systems-window :is(.systems-nav,.dock-grid)>* {padding:6px;}
html.view-mobile #systems-window [data-system-pane] {padding:6px;}
html.view-mobile :is(.menu-foot,#systems-window>footer,#expedition-window>footer,#service-window>footer,#planet-window>footer) {padding:4px 6px;gap:4px;font-size:9px;line-height:12px;}
html.view-mobile #menu-shell[data-view=inventory] :is(.inventory-grid-panel,.inventory-toolbar,.inventory-quick-actions) {padding:6px;gap:4px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-loadout-strip {padding:2px 6px;gap:4px;min-height:40px;font-size:11px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-view-toggle {gap:4px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-category-label {padding:0 6px 4px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-grid {gap:4px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=list] .inventory-grid {grid-auto-rows:56px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=list] .inventory-tile {height:56px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=list] .inventory-cell {width:calc(100% - 48px);height:56px;min-height:56px;padding:4px 4px 4px 42px;gap:2px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=list] .inventory-cell img {width:34px;height:36px;top:7px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=list] .inventory-item-more {height:56px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=list] .inventory-item-name {font-size:12px;line-height:15px;max-height:30px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=grid] .inventory-grid {grid-template-columns:repeat(auto-fill,minmax(88px,1fr));grid-auto-rows:116px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=grid] .inventory-tile {grid-template-rows:68px 44px;gap:4px;height:116px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=grid] .inventory-cell {height:68px;min-height:68px;padding:27px 4px 3px;gap:2px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=grid] .inventory-cell img {height:24px;top:1px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=grid] :is(.resource-glyph,.deed-glyph) {height:24px;line-height:24px;font-size:22px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=grid] .inventory-item-name {font-size:11px;line-height:12px;height:24px;max-height:24px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-cell .slot-bottom {font-size:10px;line-height:11px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-item-more {min-height:44px!important;}
html.view-mobile #menu-shell[data-view=inventory] .item-detail {padding:8px;}
html.view-mobile #menu-shell[data-view=inventory] .item-detail .item-large {height:88px;}
html.view-mobile #menu-shell[data-view=inventory] .item-detail h2 {font-size:16px;}
html.view-mobile #menu-shell[data-view=inventory] .item-detail :is(p,small,.stat-row) {font-size:12px;line-height:1.4;}
html.view-mobile #menu-shell[data-view=inventory] .item-detail .stat-row {padding:4px 0;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-quick-actions button {min-height:44px!important;font-size:12px;}
html.view-mobile :is(.item-browser-pages,.service-pages,#player-storage .ps-pages) {gap:4px;padding-block:4px;font-size:11px;}
html.view-mobile :is(.service-rows,#player-storage .ps-list) {grid-template-columns:repeat(auto-fill,minmax(88px,1fr));grid-auto-rows:92px;gap:4px;}
html.view-mobile :is(.service-row,#player-storage .ps-row) {height:92px;padding:4px;gap:2px;}
html.view-mobile .service-row b {font-size:11px;line-height:13px;max-height:26px;}
html.view-mobile .service-row small {font-size:10px;line-height:12px;max-height:12px;}
html.view-mobile #player-storage :is(.ps-item-icon,.ps-item-icon img) {height:26px;line-height:26px;}
html.view-mobile #player-storage :is(.ps-inventory,.ps-detail,#ps-transfer-controls) {padding:6px;}
html.view-mobile #player-storage :is(.ps-toolbar,.ps-filters,.ps-sides) {gap:4px;}
html.view-mobile #player-storage .ps-row-name {font-size:11px;line-height:13px;max-height:26px;}
html.view-mobile #player-storage .ps-row-meta {font-size:10px;line-height:12px;max-height:24px;}
html.view-mobile #systems-window .touch-comfort-settings {padding:8px;gap:8px;}
html.view-mobile #touch-comfort-details>summary {min-height:44px;padding:10px 8px;}
html.view-mobile :is(.item-context-menu,#player-context-menu)>button {min-height:44px;padding:8px;font-size:13px;}

/* A closed log is one 44px tab. Reading uses all available space; Write is the
 * explicit route to the composer, so reading never reserves an unused form. */
html.view-mobile .comms-log:not(.comms-expanded),
html.view-mobile.touch-left-handed .comms-log:not(.comms-expanded) {
 left:calc(var(--touch-vv-left) + var(--mobile-comms-left))!important;right:auto!important;top:calc(var(--touch-vv-top) + var(--mobile-comms-top))!important;
 width:var(--mobile-comms-width)!important;max-width:var(--mobile-comms-width)!important;height:44px!important;min-height:44px!important;border:0;border-radius:4px;box-shadow:inset 0 0 0 1px #62818c89;
}
html.view-mobile .comms-log:not(.comms-expanded) .comms-head {height:44px;min-height:44px;padding:0 2px 0 5px;gap:0;}
html.view-mobile .comms-log:not(.comms-expanded) .comms-grip {min-height:44px;}
html.view-mobile .comms-log:not(.comms-expanded) .comms-grip b {font-size:10px;letter-spacing:.6px;}
html.view-mobile .comms-log.comms-expanded {height:min(360px,var(--mobile-panel-height))!important;max-height:var(--mobile-panel-height)!important;border-radius:6px;}
html.view-mobile .comms-log .comms-head {height:44px;min-height:44px;flex:0 0 44px;padding:0 6px;}
html.view-mobile .comms-log .comms-tabs {min-height:40px;padding:0 4px;gap:2px;}
html.view-mobile .comms-log .comms-tabs button {min-height:40px;padding:4px;font-size:11px;}
html.view-mobile .comms-log #log.comms-entries {padding:4px 7px;font-size:12px;line-height:1.4;}
html.view-mobile .comms-log .comms-entry {font-size:12px;line-height:1.4;padding:3px 0;}
html.view-mobile .comms-log .comms-foot {display:none;}
html.view-mobile .comms-log.comms-expanded:not(.comms-editing) .comms-compose {display:none;}
html.view-mobile .comms-log.comms-expanded:not(.comms-editing) .comms-unread {bottom:6px;min-height:40px;padding:6px 10px;font-size:11px;}

/* Landscape uses one narrow top row. The middle rail occupies only the gap
 * between the real movement and flight/action envelopes, above the hotbar. */
html.view-mobile.touch-landscape {
 --mobile-status-width:min(132px,calc(var(--touch-vv-width) - var(--touch-safe-left) - var(--touch-safe-right) - var(--touch-nav-width,92px) - 104px));
 --mobile-comms-width:92px;
 --mobile-comms-left:calc(var(--mobile-status-left) + var(--mobile-status-width) + 4px);
 --mobile-comms-top:var(--touch-safe-top);
 --mobile-automation-left:var(--mobile-status-left);
 --mobile-automation-width:var(--mobile-status-width);
 --mobile-rail-left:max(var(--touch-hud-middle-left,148px),calc(var(--touch-safe-left) + var(--mobile-status-width) + 8px));
 --mobile-rail-width:max(0px,calc(var(--touch-hud-middle-left,148px) + var(--touch-hud-middle-width,192px) - var(--mobile-rail-left)));
 --mobile-target-left:var(--mobile-rail-left);
 --mobile-target-width:var(--mobile-rail-width);
 --mobile-target-top:calc(var(--touch-safe-top) + 48px);
 --mobile-notice-left:var(--mobile-rail-left);
 --mobile-notice-top:calc(var(--mobile-target-top) + var(--mobile-target-space));
 --mobile-notice-width:var(--mobile-rail-width);
 --mobile-rail-top:calc(var(--mobile-notice-top) + var(--mobile-notice-space));
 --mobile-rail-end:calc(var(--touch-vv-height) - var(--touch-hotbar-bottom,var(--touch-safe-bottom)) - var(--touch-hotbar-height,48px) - 8px);
}
html.view-mobile.touch-landscape.touch-left-handed {
 --mobile-comms-left:calc(var(--mobile-status-left) - 96px);
 --mobile-rail-left:var(--touch-hud-middle-left,148px);
 --mobile-rail-width:max(0px,calc(min(calc(var(--touch-hud-middle-left,148px) + var(--touch-hud-middle-width,192px)),calc(var(--mobile-status-left) - 8px)) - var(--mobile-rail-left)));
}
html.view-mobile.touch-landscape #hud #world-brand {height:11px;}
html.view-mobile.touch-landscape #world-location {font-size:9px;line-height:11px;}
html.view-mobile.touch-landscape #hud .player-status {top:calc(var(--touch-vv-top) + var(--touch-safe-top) + 12px);height:32px;min-height:32px;max-height:32px;padding:2px 6px;}
html.view-mobile.touch-landscape #hud .player-status .eyebrow {font-size:9px;line-height:9px;}
html.view-mobile.touch-landscape #hud .player-status .healthbar {margin:1px 0;}
html.view-mobile.touch-landscape.touch-short-tray #hud .map-panel {display:none!important;}
html.view-mobile.touch-landscape #background-action-hud {top:calc(var(--touch-vv-top) + var(--touch-safe-top) + 48px);}
html.view-mobile.touch-landscape #hud-notice-stack,
html.view-mobile.touch-landscape.touch-piloting.touch-flight-wide #hud-notice-stack {top:calc(var(--touch-vv-top) + var(--mobile-notice-top));max-height:44px;}
html.view-mobile.touch-landscape #hud-right-rail,
html.view-mobile.touch-landscape.touch-piloting.touch-flight-wide #hud-right-rail {top:calc(var(--touch-vv-top) + var(--mobile-rail-top));max-height:max(0px,calc(var(--mobile-rail-end) - var(--mobile-rail-top)));}
html.view-mobile.touch-landscape :is(.menu-head,#menu-shell[data-view=inventory] .menu-head) {display:flex;flex-wrap:nowrap;min-height:44px;padding:0 6px;}
html.view-mobile.touch-landscape .menu-head>div {flex:0 1 116px;}
html.view-mobile.touch-landscape .menu-head .eyebrow {display:none;}
html.view-mobile.touch-landscape #menu-nav {flex:1;min-width:0;}
/* These two footers contain only keyboard/version reminders. Monetary and
 * action-result footers, including expedition credits, remain visible. */
html.view-mobile.touch-landscape.touch-short-tray :is(.menu-foot,#systems-window>footer) {display:none;}
html.view-mobile.touch-landscape .comms-log.comms-expanded .comms-grip {display:none;}
html.view-mobile.touch-landscape .comms-log.comms-expanded .comms-write {margin-left:auto;}
html.view-mobile.touch-landscape .comms-log.comms-expanded .comms-tabs {position:absolute;top:0;left:6px;right:128px;height:44px;min-height:44px;padding:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;touch-action:pan-x;gap:4px;}
html.view-mobile.touch-landscape .comms-log.comms-expanded .comms-tabs button {flex:0 0 58px;min-height:44px;}

/* Text editing uses the remaining visual viewport, not the layout viewport.
 * Browser keyboard changes do not shrink text or change saved touch choices. */
html.view-mobile.touch-keyboard-open {--mobile-panel-height:var(--mobile-usable-height);}
html.view-mobile.touch-keyboard-open .comms-log.comms-expanded {height:var(--mobile-usable-height)!important;max-height:var(--mobile-usable-height)!important;}
html.view-mobile.touch-keyboard-open .comms-log.comms-expanded .comms-grip {display:flex;}
html.view-mobile.touch-keyboard-open .comms-log .comms-compose {display:grid!important;}
