/* v1.0.79. New settings are available in either view; every game-layout change
 * below requires the explicitly selected Mobile view. No input-device query
 * changes Desktop into Mobile. */
#touch-comfort-details {grid-column:1 / -1;min-width:0;margin:4px 0;border:1px solid #526b5e;border-radius:10px;background:#13271f;}
#touch-comfort-details>summary {min-height:48px;box-sizing:border-box;padding:14px 12px;color:#e8dfbc;cursor:pointer;font:600 14px/1.4 system-ui,sans-serif;}
#touch-comfort-details[open]>summary {border-bottom:1px solid #40594b;}
#systems-window .touch-comfort-settings,.touch-comfort-settings {display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0;max-width:100%;margin:0;padding:14px 12px;border:0;font:13px/1.45 system-ui,sans-serif;}
.touch-comfort-settings legend {max-width:100%;padding:10px 0 0;color:#d6e7d8;font-size:13px;white-space:normal;}
.touch-comfort-settings .touch-comfort-setting {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px 10px;min-width:0;margin:0;}
.touch-comfort-setting .touch-setting-name {min-width:0;color:#d8e5d9;}
.touch-comfort-setting output {color:#eddaa5;font-variant-numeric:tabular-nums;white-space:nowrap;}
#systems-window .touch-comfort-settings :is(select,input[type=range]) {grid-column:1 / -1;width:100%;max-width:100%;min-width:0;min-height:44px;height:44px;margin:0;font-size:16px;box-sizing:border-box;}
#systems-window .touch-comfort-settings select {padding:8px;border-radius:6px;background:#10221c;}
#systems-window .touch-comfort-settings input[type=range] {padding:0;accent-color:#b9d9b1;cursor:pointer;touch-action:pan-y;}
.touch-comfort-settings .touch-comfort-checkbox {display:flex;align-items:center;gap:10px;min-height:48px;line-height:1.45;margin:0;}
.touch-comfort-checkbox input[type=checkbox] {flex:0 0 22px;width:22px;height:22px;margin:0;accent-color:#b9d9b1;}
.touch-comfort-settings .touch-comfort-help {margin:0;color:#b6cbbb;font-size:12px;line-height:1.55;}
#systems-window #touch-comfort-reset {min-height:44px;padding:10px;font-size:13px;border-color:#758874;background:#243a2b;}
#touch-comfort-save-status {margin:0;min-height:18px;color:#c3dcc2;font-size:12px;line-height:1.5;overflow-wrap:anywhere;}
#touch-comfort-details :focus-visible {outline:2px solid #efd394;outline-offset:3px;}

html.view-mobile {
 --mobile-usable-height:max(0px,calc(var(--touch-vv-height) - var(--touch-safe-top) - var(--touch-safe-bottom)));
 --mobile-panel-height:max(0px,calc(var(--mobile-usable-height) - var(--touch-controls-space) - 10px));
 --mobile-radar-width:112px;
 --mobile-status-width:min(190px,calc(var(--touch-vv-width) - var(--touch-safe-left) - var(--touch-safe-right) - var(--mobile-radar-width) - 8px));
}
/* The window owns vertical scrolling. Its close button stays in a sticky
 * header, and category tabs use one horizontal row instead of a tall stack. */
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) {
 position:fixed!important;left:calc(var(--touch-vv-left) + var(--touch-safe-left))!important;top:calc(var(--touch-vv-top) + var(--touch-safe-top))!important;right:auto!important;bottom:auto!important;transform:none!important;
 width:calc(var(--touch-vv-width) - var(--touch-safe-left) - var(--touch-safe-right))!important;max-width:1100px;min-width:0!important;
 height:auto!important;min-height:0!important;max-height:var(--mobile-panel-height)!important;overflow:auto!important;overscroll-behavior:contain;touch-action:pan-y;scroll-padding:64px 10px 12px;box-sizing:border-box;border-radius:10px;pointer-events:auto;
}
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):not([hidden]) {display:block;}
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 {
 position:sticky;top:0;z-index:4;display:flex;align-items:center;gap:8px;min-height:56px;padding:6px 10px;box-sizing:border-box;background:#1d352bf7;cursor:default;flex-shrink:0;
}
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>div {min-width:0;flex:1;}
html.view-mobile :is(.menu-head h1,#expedition-title,#service-name,#systems-window h2,#player-storage h2) {font-size:18px;line-height:1.25;letter-spacing:0;margin:0;overflow-wrap:anywhere;}
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:44px!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) :is(button,[role=button]) {min-width:44px!important;touch-action:manipulation;}
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 {flex:0 0 44px;width:44px;height:44px;margin-left:auto;padding:0;font-size:23px;}
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(input,select,textarea) {min-width:0;max-width:100%;font-size:16px!important;box-sizing:border-box;}
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(input:not([type=checkbox]):not([type=radio]),select,textarea) {min-height:44px;}
html.view-mobile :is(#menu-content,#expedition-body,#planet-body,#service-body,#housing-body,#auction-body,.cooperative-body,.social-body,#systems-window [data-system-pane]) {min-height:0;max-height:none;height:auto;overflow:visible!important;flex:0 0 auto;}
html.view-mobile :is(.menu-head,#menu-shell[data-view=inventory] .menu-head) {display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:4px 8px;}
html.view-mobile #close-menu {grid-column:2;grid-row:1;}
html.view-mobile #menu-nav {grid-column:1 / -1;grid-row:2;}
html.view-mobile :is(#menu-nav,#expedition-tabs,#planet-tabs,#service-tabs,#auction-tabs,.coop-tabs,#housing-panel>nav,#systems-window>nav) {
 display:flex;flex-wrap:nowrap;gap:6px;min-width:0;max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;touch-action:pan-x;scroll-padding-inline:8px;padding:5px 8px;box-sizing:border-box;
}
html.view-mobile :is(#menu-nav,#expedition-tabs,#planet-tabs,#service-tabs,#auction-tabs,.coop-tabs,#housing-panel>nav,#systems-window>nav)>button {flex:0 0 auto;min-width:70px!important;white-space:nowrap;font-size:12px;line-height:1.25;}
html.view-mobile #menu-shell[data-view=inventory] #menu-nav {display:none;}
html.view-mobile #systems-window :is(.systems-nav,.dock-grid) {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
html.view-mobile #systems-window :is(.systems-nav,.dock-grid)>* {min-width:0;}
html.view-mobile #systems-window .dock-grid>a {display:flex;align-items:center;min-height:44px;font-size:12px;line-height:1.45;}
html.view-mobile #systems-window .audio-volume {font-size:12px;}
html.view-mobile #systems-window .audio-volume input {width:100%;height:44px;}
html.view-mobile :is(.menu-foot,#systems-window>footer,#expedition-window>footer,#service-window>footer,#planet-window>footer) {padding:8px 10px;gap:8px;flex-wrap:wrap;font-size:10px;}

/* Item names, quantities and the separate Actions button remain tappable.
 * Pages stay bounded by the existing inventory/service/storage controllers. */
html.view-mobile #menu-shell[data-view=inventory] :is(.inventory-shell,.inventory-layout,.inventory-grid-panel,.inventory-detail-scroll,.inventory-grid,.item-detail) {height:auto;min-height:0;max-height:none;overflow:visible;flex:0 0 auto;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-layout {display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,.8fr);}
html.view-mobile #menu-shell[data-view=inventory] .inventory-grid-panel {padding:10px;gap:8px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-toolbar {flex-wrap:wrap;gap:8px;padding:10px;}
html.view-mobile #menu-shell[data-view=inventory] :is(.inventory-search,.inventory-sort-label select,.inventory-category-label select) {height:44px;min-height:44px;font-size:16px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-sort-label {flex:0 1 156px;min-width:100px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-sort-label select {width:100%;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-view-toggle {gap:6px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-view-toggle button {width:44px;height:44px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-loadout-strip {gap:8px;min-height:48px;padding:4px 10px;font-size:12px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-loadout-strip button {font-size:12px;}
html.view-mobile #menu-shell[data-view=inventory] .grid-meta {font-size:11px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-grid {gap:8px;padding:0;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=list] .inventory-grid {grid-template-columns:minmax(0,1fr);grid-auto-rows:68px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=list] .inventory-tile {height:68px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=list] .inventory-cell {width:calc(100% - 50px);height:68px;min-height:68px;padding:7px 7px 7px 52px;gap:5px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=list] .inventory-item-more {position:absolute;top:0;right:0;width:44px;height:68px;padding:0;border-radius:6px;font-size:24px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=list] .inventory-item-name {font-size:13px;line-height:17px;max-height:34px;-webkit-line-clamp:2;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-cell .slot-bottom {font-size:11px;line-height:13px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-cell .equipped-dot {font-size:10px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=grid] .inventory-grid {grid-template-columns:repeat(auto-fill,minmax(96px,1fr));grid-auto-rows:146px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=grid] .inventory-tile {display:grid;grid-template-rows:96px 44px;gap:6px;height:146px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=grid] .inventory-cell {height:96px;min-height:96px;width:100%;padding:38px 6px 5px;gap:3px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=grid] .inventory-cell img {height:34px;top:2px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=grid] :is(.resource-glyph,.deed-glyph) {height:34px;line-height:34px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=grid] .inventory-item-name {font-size:12px;line-height:15px;height:30px;max-height:30px;-webkit-line-clamp:2;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-shell[data-layout=grid] .inventory-item-more {position:static;width:100%;height:44px;margin:0;border-radius:6px;font-size:23px;}
html.view-mobile #menu-shell[data-view=inventory] .item-detail :is(p,small,.stat-row) {font-size:12px;line-height:1.5;}
html.view-mobile #menu-shell[data-view=inventory] .item-detail h2 {font-size:18px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-quick-actions {display:flex;flex-wrap:wrap;gap:8px;padding:10px;}
html.view-mobile #menu-shell[data-view=inventory] .inventory-quick-actions button {flex:1 1 130px;min-height:48px!important;margin:0;font-size:13px;}
html.view-mobile :is(.item-browser-pages,.service-pages,#player-storage .ps-pages) {gap:8px;padding-block:8px;font-size:12px;line-height:1.35;}
html.view-mobile :is(.item-browser-pages,.service-pages,#player-storage .ps-pages) button {min-height:44px;font-size:12px;padding:8px;}
html.view-mobile :is(.service-list,.service-detail,.service-detail-scroll,#player-storage .ps-content,#player-storage .ps-inventory,#player-storage .ps-list,#player-storage .ps-detail,#player-storage .ps-detail-scroll) {height:auto;min-height:0;max-height:none;overflow:visible;flex:0 0 auto;}
html.view-mobile .service-rows {grid-template-columns:repeat(auto-fill,minmax(104px,1fr));grid-auto-rows:112px;max-height:none;overflow:visible;gap:8px;}
html.view-mobile .service-row {height:112px;padding:7px;gap:5px;}
html.view-mobile .service-row b {font-size:12px;line-height:15px;max-height:30px;}
html.view-mobile .service-row small {font-size:11px;line-height:14px;max-height:14px;}
html.view-mobile :is(.service-detail p,.service-detail small,#service-quote) {font-size:12px;line-height:1.5;}
html.view-mobile #player-storage .ps-content {display:grid;grid-template-columns:minmax(0,1.35fr) minmax(220px,1fr);}
html.view-mobile #player-storage .ps-list {grid-template-columns:repeat(auto-fill,minmax(104px,1fr));grid-auto-rows:112px;gap:8px;}
html.view-mobile #player-storage .ps-row {height:112px;padding:7px;gap:4px;}
html.view-mobile #player-storage .ps-row-name {font-size:12px;line-height:15px;max-height:30px;}
html.view-mobile #player-storage .ps-row-meta {font-size:11px;line-height:13px;max-height:26px;}
html.view-mobile #player-storage :is(.ps-item-icon,.ps-item-icon img) {height:34px;line-height:34px;}
html.view-mobile #player-storage .ps-toolbar {flex-wrap:wrap;gap:8px;}
html.view-mobile #player-storage .ps-sides {gap:6px;flex-wrap:wrap;}
html.view-mobile #player-storage .ps-filters {gap:8px;}
html.view-mobile #player-storage :is(.ps-filters input,.ps-filters select) {min-height:44px;font-size:16px;}
html.view-mobile #player-storage dl {font-size:12px;grid-template-columns:minmax(90px,.8fr) minmax(0,1fr);}
html.view-mobile :is(.item-context-menu,#player-context-menu) {
 left:calc(var(--touch-vv-left) + var(--touch-safe-left))!important;top:auto!important;right:auto!important;bottom:calc(var(--touch-vv-bottom) + var(--touch-safe-bottom));
 width:min(360px,calc(var(--touch-vv-width) - var(--touch-safe-left) - var(--touch-safe-right)));max-width:none;max-height:max(0px,calc(var(--mobile-usable-height) - 48px))!important;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;border-radius:10px;
}
html.view-mobile :is(.item-context-menu,#player-context-menu)>button {min-height:48px;font-size:14px;line-height:1.4;}

/* Actions switches between shortcuts and the saved native hotbar. Both use
 * the same small tray, so the native slots never cover its header or controls. */
/* Temporarily hide presentation only: incoming loot and cumulative totals
 * keep updating, and the receipt window returns unchanged when Actions closes. */
html.view-mobile.touch-tray-open #loot-window {visibility:hidden;pointer-events:none;}
html.view-mobile.touch-tray-open:not(.touch-hotbar-open) #hud .hotbar {display:none!important;}
html.view-mobile.touch-tray-open.touch-hotbar-open:not(.touch-keyboard-open) #hud .hotbar {
 display:flex!important;position:fixed;left:auto;right:calc(var(--touch-safe-right) + max(0px,100vw - var(--touch-vv-left) - var(--touch-vv-width)) + 8px);
 bottom:calc(var(--touch-vv-bottom) + var(--touch-safe-bottom) + var(--touch-controls-space) + 16px);top:auto;transform:none;
 width:min(324px,calc(var(--touch-vv-width) - var(--touch-safe-left) - var(--touch-safe-right) - 16px));max-width:none;min-width:0;
 height:60px;min-height:60px;max-height:60px;padding:4px;box-sizing:border-box;align-items:center;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;touch-action:pan-x;z-index:45;
}
html.view-mobile.touch-tray-open.touch-hotbar-open.touch-left-handed:not(.touch-keyboard-open) #hud .hotbar {left:calc(var(--touch-vv-left) + var(--touch-safe-left) + 8px);right:auto;}
html.view-mobile.touch-tray-open.touch-hotbar-open #hud #hotbar-slots>* {width:48px;min-width:48px;height:48px;min-height:48px;max-height:48px;flex:0 0 48px;}

/* Read the activity log without invoking the keyboard. Explicit typing uses
 * the whole visible viewport; no composer row relies on layout-viewport vh. */
html.view-mobile .comms-log.comms-expanded {height:min(420px,var(--mobile-panel-height))!important;max-height:var(--mobile-panel-height)!important;min-height:0;}
html.view-mobile .comms-log .comms-head {height:52px;min-height:52px;flex:0 0 52px;padding:4px 8px;}
html.view-mobile .comms-log .comms-grip {min-height:44px;touch-action:manipulation;cursor:pointer;}
html.view-mobile .comms-log .comms-grip b {font-size:12px;letter-spacing:1px;}
html.view-mobile .comms-log .comms-write {flex:0 0 64px;width:64px;min-height:44px;padding:4px;font-size:13px;border-radius:6px;}
html.view-mobile .comms-log .comms-tabs {flex:0 0 auto;min-height:48px;padding:2px 6px;gap:4px;}
html.view-mobile .comms-log .comms-tabs button {font-size:12px;min-width:0;min-height:44px;}
html.view-mobile .comms-log #log.comms-entries {min-height:0;padding:8px 10px;font-size:13px;line-height:1.5;touch-action:pan-y;}
html.view-mobile .comms-log .comms-entry {font-size:13px;line-height:1.5;padding:5px 0;}
html.view-mobile .comms-log .comms-entry time {font-size:10px;}
html.view-mobile .comms-log .comms-compose {display:grid;grid-template-columns:88px minmax(0,1fr) 58px;gap:6px;min-height:56px;flex:0 0 auto;padding:6px;}
html.view-mobile .comms-log :is(.comms-channel-label,.comms-text-label) {min-width:0;margin:0;}
html.view-mobile .comms-log :is(.comms-channel,.comms-text,.comms-send) {height:44px;min-height:44px;font-size:16px;}
html.view-mobile .comms-log .comms-send {font-size:13px;padding:6px;}
html.view-mobile .comms-log .comms-foot {min-height:20px;flex:0 0 auto;font-size:10px;padding:0 8px 5px;}
html.view-mobile .comms-log .comms-unread {bottom:80px;min-height:44px;max-width:calc(100% - 24px);padding:7px 12px;font-size:12px;}
html.view-mobile .comms-log:not(.comms-expanded) {height:46px!important;min-height:46px!important;width:min(126px,var(--mobile-status-width))!important;max-width:var(--mobile-status-width)!important;}
html.view-mobile .comms-log:not(.comms-expanded) .comms-head {height:44px;min-height:44px;padding:0 2px 0 8px;gap:2px;}

/* Place status, target and messages beside the game, with the tool label above
 * the actual movement reach zone. Mirror the peripheral column with the pad. */
html.view-mobile #hud #world-brand {left:calc(var(--touch-vv-left) + var(--touch-safe-left) + 8px);width:calc(var(--mobile-status-width) - 16px);}
html.view-mobile #hud .player-status {width:var(--mobile-status-width);min-height:54px;max-height:74px;padding:6px 8px;overflow:auto;}
html.view-mobile .comms-log:not(.comms-expanded) {top:calc(var(--touch-vv-top) + var(--touch-safe-top) + 100px)!important;}
html.view-mobile #hud-right-rail {width:var(--mobile-radar-width);max-height:calc(var(--mobile-usable-height) - var(--touch-action-height,268px) - 10px);}
html.view-mobile #hud .map-panel canvas {width:100%!important;}
html.view-mobile #hud .target-panel {left:calc(var(--touch-vv-left) + var(--touch-safe-left));right:auto;top:calc(var(--touch-vv-top) + var(--touch-safe-top) + 152px);transform:none;width:min(var(--mobile-status-width),var(--touch-stick-zone-width,var(--touch-stick-size)));max-width:none;max-height:88px;touch-action:pan-y;overscroll-behavior:contain;}
html.view-mobile #hud-notice-stack {left:calc(var(--touch-vv-left) + var(--touch-safe-left));right:auto;top:calc(var(--touch-vv-top) + var(--touch-safe-top) + 248px);transform:none;width:min(var(--mobile-status-width),var(--touch-stick-zone-width,var(--touch-stick-size)));max-width:none;max-height:max(0px,min(96px,calc(var(--mobile-usable-height) - var(--touch-stick-zone-height,var(--touch-stick-size)) - 312px)));touch-action:pan-y;overscroll-behavior:contain;}
html.view-mobile #tool-status {bottom:calc(var(--touch-vv-bottom) + var(--touch-safe-bottom) + var(--touch-stick-zone-height,var(--touch-stick-size)) + 8px);width:min(180px,var(--touch-stick-zone-width,var(--touch-stick-size)));height:46px;max-height:46px;padding:6px 8px;overflow:hidden;pointer-events:none;}
html.view-mobile #active-tool-type {display:block;font-size:9px;line-height:12px;letter-spacing:.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
html.view-mobile #active-tool-name {margin:3px 0 0;font-size:12px;line-height:16px;}
html.view-mobile.touch-left-handed #hud :is(#world-brand,.player-status,.target-panel),html.view-mobile.touch-left-handed #hud-notice-stack,html.view-mobile.touch-left-handed #tool-status,html.view-mobile.touch-left-handed .comms-log:not(.comms-expanded) {left:auto!important;right:calc(var(--touch-safe-right) + max(0px,100vw - var(--touch-vv-left) - var(--touch-vv-width)))!important;}
html.view-mobile.touch-left-handed #hud #world-brand {right:calc(var(--touch-safe-right) + max(0px,100vw - var(--touch-vv-left) - var(--touch-vv-width)) + 8px)!important;}
html.view-mobile.touch-left-handed #hud-right-rail {left:calc(var(--touch-vv-left) + var(--touch-safe-left));right:auto;}

@media (max-width:700px) {
 html.view-mobile #menu-shell[data-view=inventory] .inventory-layout,html.view-mobile #player-storage .ps-content {grid-template-columns:minmax(0,1fr)!important;}
 html.view-mobile #menu-shell[data-view=inventory] .item-detail {border-top:1px solid #4a5953;}
 html.view-mobile #menu-shell[data-view=inventory] .inventory-tabs {display:none;}
 html.view-mobile #menu-shell[data-view=inventory] .inventory-category-label {display:block;padding:0 10px 8px;}
 html.view-mobile :is(.service-filters,#player-storage .ps-filters) {grid-template-columns:repeat(2,minmax(0,1fr));}
 html.view-mobile :is(.service-filters>#service-search,.service-filters .service-search,#player-storage .ps-filters>label:first-child) {grid-column:1 / -1;}
 html.view-mobile .service-filters .service-ready {grid-column:1 / -1;}
 html.view-mobile #player-storage :is(.ps-inventory,.ps-detail) {padding:10px;}
 html.view-mobile #player-storage #ps-transfer-controls {padding:10px;}
 html.view-mobile #player-storage .ps-quantity {display:flex;width:100%;margin:0;}
 html.view-mobile #player-storage .ps-primary {width:100%;margin:8px 0 0;}
 html.view-mobile :is(.fleet-layout,.controls-layout,.map-layout,.cargo-columns,.field-columns) {grid-template-columns:minmax(0,1fr)!important;}
}
@media (max-width:540px) {
 html.view-mobile {--mobile-radar-width:96px;}
 html.view-mobile #menu-shell[data-view=inventory] .inventory-search-wrap {flex:1 0 100%;}
 html.view-mobile #menu-shell[data-view=inventory] .inventory-sort-label {flex:1;}
 html.view-mobile #menu-shell[data-view=inventory] .inventory-cell .equipped-dot {display:none;}
 html.view-mobile .comms-log .comms-compose {grid-template-columns:minmax(0,1fr) 76px;}
 html.view-mobile .comms-log .comms-text-label {grid-column:1 / -1;grid-row:1;}
 html.view-mobile .comms-log .comms-channel-label {grid-column:1;grid-row:2;max-width:140px;}
 html.view-mobile .comms-log .comms-send {grid-column:2;grid-row:2;}
 html.view-mobile .comms-log .comms-unread {bottom:130px;}
}
@media (max-height:420px) {
 html.view-mobile :is(.menu-head,#menu-shell[data-view=inventory] .menu-head) {display:flex;flex-wrap:nowrap;min-height:52px;padding:4px 8px;}
 html.view-mobile .menu-head>div {flex:0 1 130px;}
 html.view-mobile #menu-nav {flex:1;min-width:0;}
 html.view-mobile .menu-head .eyebrow {display:none;}
 html.view-mobile #hud #world-brand {width:122px;}
 html.view-mobile #hud .player-status {width:138px;max-width:138px!important;height:40px;max-height:40px;min-height:40px;padding:4px 8px;}
 html.view-mobile #hud .player-status :is(.eyebrow,small) {font-size:9px;line-height:10px;}
 html.view-mobile #hud .player-status .healthbar {height:4px;margin:3px 0;}
 html.view-mobile #hud .player-status :is(#status-profession,.status-shots) {display:none;}
 html.view-mobile .comms-log:not(.comms-expanded) {top:calc(var(--touch-vv-top) + var(--touch-safe-top) + 64px)!important;}
 html.view-mobile #hud .target-panel,html.view-mobile #hud-notice-stack,html.view-mobile #hud-right-rail {
  left:calc(var(--touch-vv-left) + var(--touch-safe-left) + max(148px,var(--touch-stick-zone-width,120px)) + 8px);right:auto;transform:none;
  width:max(0px,calc(var(--touch-vv-width) - var(--touch-safe-left) - var(--touch-safe-right) - max(148px,var(--touch-stick-zone-width,120px)) - var(--touch-right-width,150px) - 16px));max-width:none;min-height:0;
 }
 html.view-mobile #hud .target-panel {top:calc(var(--touch-vv-top) + var(--touch-safe-top));max-height:48px;}
 html.view-mobile #hud-notice-stack {top:calc(var(--touch-vv-top) + var(--touch-safe-top) + 64px);max-height:44px;}
 html.view-mobile #hud-right-rail {top:calc(var(--touch-vv-top) + var(--touch-safe-top) + 116px);max-height:max(0px,calc(var(--mobile-usable-height) - 128px));}
 html.view-mobile.touch-piloting.touch-flight-wide #hud-notice-stack {top:calc(var(--touch-vv-top) + var(--touch-vv-height) - var(--touch-safe-bottom) - var(--touch-right-width));}
 html.view-mobile.touch-piloting.touch-flight-wide #hud-right-rail {top:calc(var(--touch-vv-top) + var(--touch-vv-height) - var(--touch-safe-bottom) - var(--touch-right-width) + 52px);max-height:max(0px,calc(var(--touch-right-width) - 60px));}
 html.view-mobile.touch-left-handed #hud .target-panel,html.view-mobile.touch-left-handed #hud-notice-stack,html.view-mobile.touch-left-handed #hud-right-rail {left:calc(var(--touch-vv-left) + var(--touch-safe-left) + var(--touch-right-width,150px) + 8px)!important;right:auto!important;}
 html.view-mobile #tool-status {display:none;}
 html.view-mobile .comms-log .comms-tabs {min-height:44px;padding:0 6px;}
 html.view-mobile .comms-log .comms-head {height:44px;min-height:44px;flex-basis:44px;padding:0 6px;}
 html.view-mobile .comms-log.comms-expanded .comms-head {gap:6px;}
 html.view-mobile .comms-log.comms-expanded .comms-grip {display:none;}
 html.view-mobile .comms-log.comms-expanded .comms-write {margin-left:auto;}
 html.view-mobile .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 .comms-log.comms-expanded .comms-tabs button {flex:0 0 58px;}
 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:8px;}
}
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 :is(.comms-tabs,.comms-foot,.comms-unread,.comms-write) {display:none!important;}
html.view-mobile.touch-keyboard-open .comms-log .comms-head {height:44px;min-height:44px;flex-basis:44px;padding:0 6px;}
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;grid-template-columns:80px minmax(0,1fr) 56px;gap:4px;min-height:48px;padding:2px 4px;}
html.view-mobile.touch-keyboard-open .comms-log .comms-channel-label {grid-column:1;grid-row:1;max-width:none;}
html.view-mobile.touch-keyboard-open .comms-log .comms-text-label {grid-column:2;grid-row:1;}
html.view-mobile.touch-keyboard-open .comms-log .comms-send {grid-column:3;grid-row:1;}
