/* The battlefield stays dominant: one shallow catalogue, persistent bottom tabs. */
@media (max-width:820px), (max-height:500px) {
 .operations-shell .command-rail,
 .operations-shell .command-rail.expanded,
 .operations-shell .command-rail[data-mobile-section] {
  --tray-height:176px;position:absolute!important;inset:auto 0 0!important;display:flex!important;flex-direction:column!important;width:100%!important;max-width:none!important;height:calc(var(--tray-height) + env(safe-area-inset-bottom))!important;min-height:0!important;max-height:none!important;padding:0 0 env(safe-area-inset-bottom)!important;border:0;border-top:1px solid #53604a;background:#111710f5;overflow:hidden!important;box-shadow:0 -5px 20px #0004;transform:none!important;
 }
 .operations-shell .command-rail.is-collapsed[data-mobile-section]{height:calc(48px + env(safe-area-inset-bottom))!important;min-height:0!important}
 .operations-shell .command-rail .rail-heading,
 .operations-shell .command-rail .production-overview,
 .operations-shell .command-rail .command-return,
 .operations-shell .command-rail>footer,
 .operations-shell .command-rail .rail-section>h2,
 .operations-shell .command-rail .menu-filters,
 .operations-shell .command-rail .command-guide,
 .operations-shell .command-rail .research-guide {display:none!important}
 .operations-shell .command-rail .rail-tabs{order:2;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));height:48px!important;min-height:48px!important;flex:0 0 48px!important;padding:0!important;border-top:1px solid #435039}
 .operations-shell .command-rail .rail-tabs button{height:48px!important;min-height:48px!important;padding:0 4px!important;background:#192016;display:flex;align-items:center;justify-content:center;gap:8px}
 .operations-shell .command-rail .rail-tabs button b{font-size:12px;letter-spacing:.06em}
 .operations-shell .command-rail .rail-tabs button small{display:none!important}
 .operations-shell .command-rail.is-collapsed .rail-tabs button{box-shadow:none!important;color:#d6dccb!important}
 .operations-shell .command-rail:not(.is-collapsed) .rail-tabs button[aria-pressed=true]::after{content:'⌄';font-size:16px;line-height:1}
 .operations-shell .command-rail .rail-section{order:1;flex:1 1 auto!important;min-height:0!important;height:calc(var(--tray-height) - 48px)!important;padding:6px 8px!important;overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior:contain;touch-action:pan-x;scroll-snap-type:x proximity;scrollbar-width:none}
 .operations-shell .command-rail .rail-section::-webkit-scrollbar{display:none}
 .operations-shell .command-rail.is-collapsed .rail-section{display:none!important}
 .operations-shell .command-rail .build-list{display:flex!important;flex-flow:row nowrap!important;align-items:stretch!important;gap:6px!important;height:100%!important;width:max-content!important;min-width:100%;padding:0!important;overflow:visible!important}
 .operations-shell .command-rail .command-entry{position:relative;flex:0 0 192px!important;width:192px!important;min-width:192px!important;height:100%!important;margin:0!important;overflow:hidden!important;scroll-snap-align:start;background:#20291c;border:0;border-right:1px solid #43503b;border-radius:0}
 .operations-shell .command-rail .command-entry[hidden]{display:none!important}
 .operations-shell .command-rail .command-entry>.build-command{display:grid!important;grid-template-columns:44px minmax(0,1fr)!important;grid-template-rows:22px 18px 20px minmax(0,1fr)!important;gap:1px 7px!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;padding:8px!important;overflow:hidden!important;align-content:start!important}
 .operations-shell .command-rail .command-entry>.build-command>img{grid-column:1!important;grid-row:1/4!important;width:44px!important;height:50px!important;margin:0!important;object-fit:cover;border:0}
 .operations-shell .command-rail .command-entry .command-purpose{grid-column:2!important;grid-row:1!important;font-size:12px!important;line-height:20px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis}
 .operations-shell .command-rail .command-entry .command-callsign{grid-column:2!important;grid-row:2!important;font-size:10px!important;line-height:16px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis}
 .operations-shell .command-rail .command-entry .build-command>small{grid-column:2!important;grid-row:3!important;align-self:end;font-size:10px!important;line-height:18px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis}
 .operations-shell .command-rail .command-entry .command-status{grid-column:1/-1!important;grid-row:4!important;font-size:10px!important;line-height:14px!important;padding:2px 0 0!important;max-height:30px!important;overflow:hidden!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-align:left}
 .operations-shell .command-rail .command-entry .build-command>em,
 .operations-shell .command-rail .command-entry .technology-stage,
 .operations-shell .command-rail .command-entry .technology-next-goal,
 .operations-shell .command-rail .command-entry .technology-consequence,
 .operations-shell .command-rail .command-entry .technology-route{display:none!important}
 .operations-shell .command-rail .command-entry>.command-requirement{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:44px!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;z-index:1}
 .operations-shell .command-rail .command-requirement>span{display:none!important}
}
@media(max-height:500px){
 .operations-shell .command-rail[data-mobile-section]{--tray-height:132px}
 .operations-shell .command-rail .rail-section{padding:4px 8px!important}
 .operations-shell .command-rail .command-entry{flex-basis:232px!important;width:232px!important;min-width:232px!important}
 .operations-shell .command-rail .command-entry>.build-command{grid-template-columns:40px minmax(0,1fr)!important;grid-template-rows:18px 15px 16px 16px!important;padding:4px 7px!important;column-gap:7px!important;row-gap:0!important}
 .operations-shell .command-rail .command-entry>.build-command>img{width:40px!important;height:40px!important}
 .operations-shell .command-rail .command-entry .command-purpose{line-height:18px!important}
 .operations-shell .command-rail .command-entry .command-callsign{line-height:15px!important}
 .operations-shell .command-rail .command-entry .build-command>small{line-height:16px!important}
 .operations-shell .command-rail .command-entry .command-status{padding:0!important;line-height:16px!important;-webkit-line-clamp:1;max-height:16px!important}
}

@media(max-width:820px),(max-height:500px){.operations-shell .command-rail .command-entry .build-command>small{font-size:0!important}.operations-shell .command-rail .command-entry .build-command>small::before{content:attr(data-tray-price);font-size:10px}}
@media(max-width:820px),(max-height:500px){
 .operations-shell .tactical-minimap,.operations-shell:has(.command-rail) .tactical-minimap,.operations-shell:has(.command-rail.is-collapsed) .tactical-minimap{right:8px!important;bottom:calc(56px + env(safe-area-inset-bottom))!important;width:100px!important;height:100px!important}
 .operations-shell:has(.command-rail:not(.is-collapsed)) .tactical-minimap{opacity:0;pointer-events:none}
}
@media(max-height:500px){.operations-shell .tactical-minimap,.operations-shell:has(.command-rail) .tactical-minimap,.operations-shell:has(.command-rail.is-collapsed) .tactical-minimap{width:72px!important;height:72px!important}}
@media(max-width:820px),(max-height:500px){
 .operations-shell .command-rail .command-entry .command-purpose,
 .operations-shell .command-rail .command-entry .command-callsign,
 .operations-shell .command-rail .command-entry .build-command>small{margin:0!important;min-height:0!important;align-self:start}
}
@media(max-width:820px),(max-height:500px){
 .operations-shell .command-rail .rail-tabs button,
 .operations-shell .command-rail .rail-tabs button>b,
 .operations-shell .command-rail .rail-tabs button>small{writing-mode:horizontal-tb!important;transform:none!important;rotate:none!important;translate:none!important;text-orientation:mixed}
}
.command-tray-info,.command-tray-detail{display:none}
@media(max-width:820px),(max-height:500px){
 .operations-shell:has(.command-rail) .field-strip,.operations-shell:has(.command-rail:not(.is-collapsed)) .field-strip{padding-right:10px!important;right:0!important;width:100%!important}
 .operations-shell .command-rail .rail-tabs [data-rail-target=armoury]:not([data-queue-label=""])::before{content:attr(data-queue-label);display:inline-grid;place-items:center;min-width:18px;height:18px;border-radius:9px;background:#bba160;color:#141b10;font:700 11px/1 system-ui}
 .operations-shell .command-rail .command-tray-info{display:block;position:absolute;right:0;bottom:0;width:44px;height:44px;padding:0;border:0;background:transparent;color:#e1c579;font:700 10px system-ui;z-index:3;cursor:pointer}
 .operations-shell .command-rail .research .command-status{padding-right:36px!important}
 .operations-shell .command-rail .command-tray-detail:not([hidden]){display:flex;position:absolute;inset:0 0 calc(48px + env(safe-area-inset-bottom));background:#182114;z-index:5;overflow:hidden}
 .command-tray-back{flex:0 0 48px;width:48px;border:0;border-right:1px solid #53604a;background:#25311e;color:#e1c579;font:700 11px system-ui;cursor:pointer}
 .command-tray-detail-row{display:flex;gap:0;flex:1;min-width:0;height:100%;overflow-x:auto;overflow-y:hidden;touch-action:pan-x;scrollbar-width:none;overscroll-behavior:contain}
 .command-tray-detail-row section{flex-shrink:0;padding:8px 12px;border-right:1px solid #435039}
 .command-tray-detail-row strong{display:block;font:700 11px/16px system-ui;color:#e5d296}
 .command-tray-detail-row p{margin:4px 0 0;font:500 11px/14px system-ui;color:#d3dcc9}
}
@media(max-height:500px){.command-tray-detail-row section{padding:5px 12px}.command-tray-detail-row p{margin-top:2px}}
