.touch-launcher,.touch-nav-shade,.touch-portrait,.touch-nav-close,[data-status-open]{display:none}
.touch-status-dialog{width:min(680px,90vw);max-height:85vh;overflow:auto;background:#071b26;color:#e4f6fa;border:1px solid #6fb4bd;border-radius:12px;padding:20px}
.touch-status-dialog::backdrop{background:#020a12bf}
.touch-status-dialog button{min-height:44px}
.touch-status-dialog .resource-rail{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:16px 0}
.aurora-shell[data-touch-layout="true"]{--rail-width:100px;display:block!important;width:100%;max-width:none;margin:0;padding:0;min-height:100dvh}
.aurora-shell[data-touch-layout="true"] .classic-main{margin:0!important;padding:6px calc(var(--rail-width) + env(safe-area-inset-right) + 8px) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));width:100%;min-width:0;box-sizing:border-box}
.aurora-shell[data-touch-layout="true"] .aurora-layout{display:block;margin:0;padding:0}
.aurora-shell[data-touch-layout="true"] .aurora-main{margin:0;padding:0;min-width:0}
.aurora-shell[data-touch-layout="true"] #lyra-sidebar-container{display:none;position:fixed;inset:env(safe-area-inset-top) auto env(safe-area-inset-bottom) env(safe-area-inset-left);width:min(330px,85vw);z-index:10002;overflow-y:auto;overscroll-behavior:contain;background:#071923}
.aurora-shell[data-touch-layout="true"].nav-open #lyra-sidebar-container{display:block}
.aurora-shell[data-touch-layout="true"] .classic-sidebar{display:flex!important;flex-direction:column;position:static;width:100%;height:auto;min-height:100%;padding:12px;gap:12px;box-sizing:border-box}
.aurora-shell[data-touch-layout="true"] .sidebar-brand{display:flex;align-items:center;gap:8px}
.aurora-shell[data-touch-layout="true"] .touch-nav-close{display:block;margin-left:auto}
.aurora-shell[data-touch-layout="true"] .sidebar-planet{display:none}
.aurora-shell[data-touch-layout="true"] .sidebar-nav{display:grid!important;grid-template-columns:1fr!important;width:100%}
.aurora-shell[data-touch-layout="true"] .sidebar-nav button{display:flex;justify-content:space-between;align-items:center;min-height:44px;font-size:15px;text-align:left}
.aurora-shell[data-touch-layout="true"] .sidebar-nav button small{display:none}
.aurora-shell[data-touch-layout="true"] .touch-launcher{display:block;position:fixed;top:max(6px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));z-index:1000}
.aurora-shell[data-touch-layout="true"] .touch-launcher button{min-height:44px;padding:8px 12px;background:#092230f5;border:1px solid #72aeb8;font-size:14px}
.aurora-shell[data-touch-layout="true"].nav-open .touch-nav-shade{display:block;position:fixed;inset:0;width:100%;height:100%;z-index:10001;background:#000a;border:0;border-radius:0}
.aurora-shell[data-touch-layout="true"] #lyra-topbar-container{display:block;position:fixed;inset:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) auto;width:var(--rail-width);z-index:900;overflow-y:auto;background:#071923}
.aurora-shell[data-touch-layout="true"] .top-resource-hud{display:flex!important;flex-direction:column;justify-content:flex-start;width:100%;height:100%;min-height:0;max-height:none;padding:4px;gap:2px;border:0;border-left:1px solid #46727d;border-image:none;box-sizing:border-box;background:#071923}
.aurora-shell[data-touch-layout="true"] .top-resource-hud .resource-rail{display:grid;grid-template-columns:1fr;grid-template-rows:repeat(6,minmax(38px,1fr));flex:1;min-height:228px;gap:2px;width:100%;padding:0;overflow:visible}
.aurora-shell[data-touch-layout="true"] .top-resource-hud .hud-resource{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:0;padding:2px;min-width:0;min-height:0;border:0;background:#102b36;box-shadow:none}
.aurora-shell[data-touch-layout="true"] .top-resource-hud .resource-code{display:block;font-size:11px;line-height:1.2;white-space:normal;text-align:center;overflow-wrap:anywhere}
.aurora-shell[data-touch-layout="true"] .top-resource-hud .resource-value-row{display:block;width:100%;text-align:center}
.aurora-shell[data-touch-layout="true"] .top-resource-hud .hud-resource strong{display:block;font-size:13px;line-height:1.2;white-space:normal;overflow-wrap:anywhere;text-align:center}
.aurora-shell[data-touch-layout="true"] .top-resource-hud :is(.resource-topline,.resource-delta,.trend-pips,.meter,.hud-identity){display:none!important}
.aurora-shell[data-touch-layout="true"] .top-resource-hud .hud-resource::after{display:none}
.aurora-shell[data-touch-layout="true"] [data-status-open]{display:block;min-height:44px;width:100%;padding:4px;font-size:13px}
.aurora-shell[data-touch-layout="true"] :is([data-colony-camera="in"],[data-colony-camera="out"],[data-map="in"],[data-map="out"],.colony-orientation-hint){display:none!important}
.aurora-shell[data-touch-layout="true"] :is(.aurora-main button,.aurora-main input,.aurora-main select){min-height:44px}
.aurora-shell[data-touch-layout="true"] .colony-camera-controls{display:flex;justify-content:flex-end;margin:0 0 4px;min-height:44px}
.aurora-shell[data-touch-layout="true"] .colony-section{gap:4px;padding:0;border:0;border-radius:0;background:transparent}
.aurora-shell[data-touch-layout="true"] .colony-section>.command-section-header{box-sizing:border-box;min-height:44px;margin:0;padding:0 140px 0 92px;display:flex;align-items:center}
.aurora-shell[data-touch-layout="true"] .colony-section>.command-section-header :is(.kicker,.advisor-line){display:none}
.aurora-shell[data-touch-layout="true"] .colony-section>.command-section-header h2{font-size:15px;line-height:1.2;margin:0;overflow-wrap:anywhere}
.aurora-shell[data-touch-layout="true"] .colony-camera-controls{position:absolute;top:0;right:0}
.aurora-shell[data-touch-layout="true"] .colony-scene-wrapper{width:min(100%,calc((100dvh - 62px)*1.7768));height:auto!important;min-height:0;max-height:none;aspect-ratio:1672/941;border:0;border-image:none;border-radius:0;outline:0;box-shadow:none;margin:0 auto}
.aurora-shell[data-touch-layout="true"] .colony-scene-wrapper::after{display:none}
.aurora-shell[data-touch-layout="true"] .top-resource-hud .hud-resource.is-critical{background:#361921;color:#ffd8df;border-left:3px solid #e66c83}
.aurora-shell[data-touch-layout="true"] .top-resource-hud .hud-resource.is-warning{background:#352a17;color:#ffe5b1;border-left:3px solid #dcb266}
.aurora-shell[data-touch-layout="true"] .galaxy-panel{padding:0;border:0;border-radius:0;background:transparent}
.aurora-shell[data-touch-layout="true"] .galaxy-panel>header{padding-left:100px;min-height:44px}
.aurora-shell[data-touch-layout="true"] .galaxy-help{display:none}
.aurora-shell[data-touch-layout="true"] .galaxy-toolbar{gap:4px;margin:4px 0}
.aurora-shell[data-touch-layout="true"] .galaxy-toolbar form{margin:0;flex:1;min-width:150px}
.aurora-shell[data-touch-layout="true"] .galaxy-toolbar label{font-size:12px}
.aurora-shell[data-touch-layout="true"] .galaxy-viewport{height:calc(100dvh - 130px);min-height:190px;border-radius:4px;user-select:none;-webkit-user-select:none}
.aurora-shell[data-touch-layout="true"] .galaxy-dialog{position:fixed;inset:max(8px,env(safe-area-inset-top)) calc(var(--rail-width) + env(safe-area-inset-right) + 8px) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));width:auto;max-height:none;z-index:2000}
.aurora-shell[data-touch-layout="true"] :is(.operations-room,.research-laboratory){max-width:100%}
.aurora-shell[data-touch-layout="true"] .touch-portrait{display:none}
.aurora-shell[data-portrait="true"]>:not(.touch-portrait){display:none!important}
.aurora-shell[data-portrait="true"] .touch-portrait{display:flex;position:fixed;inset:0;z-index:2000000;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:24px;background:radial-gradient(ellipse at 50% 30%,#16394a,#040d17 75%);color:#d9f3f6}
.touch-portrait h1{font-size:clamp(24px,6vw,38px);margin:12px 0}.touch-portrait p{max-width:28ch;line-height:1.5}.touch-portrait small{color:#9cb8c1}.rotate-device{font-size:80px;color:#8ddce1}
@media(min-height:650px){.aurora-shell[data-touch-layout="true"]{--rail-width:116px}.aurora-shell[data-touch-layout="true"] .top-resource-hud .resource-code{font-size:13px}.aurora-shell[data-touch-layout="true"] .top-resource-hud .hud-resource strong{font-size:16px}}
@media(prefers-reduced-motion:reduce){.galaxy-plane{transition:none!important}}

/* Keep the menu in the right dock so it never covers a page heading. */
.aurora-shell[data-touch-layout="true"] .touch-launcher{left:auto;right:env(safe-area-inset-right);width:var(--rail-width);box-sizing:border-box;padding:0 4px}
.aurora-shell[data-touch-layout="true"] .touch-launcher button{width:100%;padding:4px}
.aurora-shell[data-touch-layout="true"] .top-resource-hud{padding-top:54px}
.aurora-shell[data-touch-layout="true"] .top-resource-hud .resource-rail{min-height:204px;grid-template-rows:repeat(6,minmax(34px,1fr))}
.aurora-shell[data-touch-layout="true"] .colony-section>.command-section-header{padding-left:0}
.aurora-shell[data-touch-layout="true"] #lyra-sidebar-container{width:min(540px,85vw)}
.aurora-shell[data-touch-layout="true"] .sidebar-nav{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px}
.aurora-shell[data-touch-layout="true"] .sidebar-commander{min-height:64px;padding:6px;border:1px solid #487985;border-image:none;border-radius:6px}
.aurora-shell[data-touch-layout="true"] .sidebar-avatar{width:48px;height:48px}
.aurora-shell[data-touch-layout="true"] .touch-nav-close{order:3}
.aurora-shell[data-touch-layout="true"] :is(.operations-room,.research-laboratory){height:calc(100dvh - 12px);min-height:285px;aspect-ratio:auto;background-size:cover;background-position:center top;border-radius:5px}
.aurora-shell[data-touch-layout="true"] :is(.operations-tablet,.research-tablet){top:52px;left:8px;width:calc(100% - 16px);height:calc(100% - 60px);box-sizing:border-box;border:1px solid #56787b;background:#071a22f5}
.aurora-shell[data-touch-layout="true"] :is(.operations-room,.research-laboratory).is-expanded :is(.operations-tablet,.research-tablet){inset:4px;width:calc(100% - 8px);height:calc(100% - 8px)}
.aurora-shell[data-touch-layout="true"] .defense-monitors{display:none}
.aurora-shell[data-touch-layout="true"] .research-tablet-header{padding:6px 10px}
.aurora-shell[data-touch-layout="true"] .research-tablet-header h2{font-size:16px}
.aurora-shell[data-touch-layout="true"] .research-tablet-nav{padding:0 10px 4px}
.aurora-shell[data-touch-layout="true"] .research-tablet-footer{display:none}
.aurora-shell[data-touch-layout="true"] .galaxy-panel>.command-section-header{margin:0;padding:0;min-height:28px}
.aurora-shell[data-touch-layout="true"] .galaxy-panel>.command-section-header :is(.kicker,p){display:none}
.aurora-shell[data-touch-layout="true"] .galaxy-panel>.command-section-header h2{margin:0;font-size:18px}
.aurora-shell[data-touch-layout="true"] .galaxy-viewport{height:calc(100dvh - 115px);min-height:175px}
.touch-status-dialog .hud-resource{display:flex!important;flex-direction:column;align-items:flex-start;gap:5px;padding:10px;min-height:95px}
.touch-status-dialog .hud-resource :is(.resource-code,.resource-delta,.resource-status){display:block!important;font-size:13px}
.touch-status-dialog .resource-value-row{display:flex!important;flex-wrap:wrap;gap:8px}
.touch-status-dialog .resource-topline{display:flex!important;gap:8px}
