/* Viewport containment and readable size floors only. Components belong to
 * ui-consistency.css; the shared token source owns typography and visual roles.
 */
html:has(body.scc-app-shell){margin-top:0!important;height:100%!important;min-height:100%!important;overflow:hidden!important;font-size:16px}
body.scc-app-shell{margin:0!important;width:100%!important;height:100dvh!important;min-height:0!important;max-height:100dvh!important;overflow:hidden!important}
body.scc-app-shell .scc-app-main{width:100%!important;height:100dvh!important;min-height:0!important;max-height:100dvh!important;margin:0!important;overflow:hidden!important}
body.scc-app-shell .scc-app-main>.rx-game,body.scc-app-shell .scc-app-main>.wp-block-shortcode,body.scc-app-shell .scc-app-main>.wp-block-shortcode>.rx-game,body.scc-app-shell [data-resolute-game]{height:100dvh!important;min-height:0!important;max-height:100dvh!important;margin-block:0!important}
.rx-shell{min-height:0!important;max-height:100dvh;overflow:hidden}
.rx-shell .rx-topbar{padding-top:max(8px,env(safe-area-inset-top))!important;padding-left:max(8px,env(safe-area-inset-left))!important;padding-right:max(8px,env(safe-area-inset-right))!important}
.rx-shell .rx-bridge-panel{min-height:0!important;overflow:hidden!important}
.rx-shell .scc-deck-scroll{padding-bottom:max(12px,env(safe-area-inset-bottom));min-height:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}
.rx-shell :is(button,[role=button]){min-height:48px}
.rx-shell :is(.scc-info-button,.rx-icon-button,.rx-context-close,.rx-system-detail-head button){min-width:44px;min-height:44px}
/* Compact controls receive the remaining portrait height after the approved
 * 40dvh tactical floor, keeping actions and weapon ranges visible sooner. */
@media(orientation:portrait){
 .rx-shell .rx-layout{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(40dvh,2fr) minmax(0,3fr)!important;min-height:0!important}
 .rx-shell .rx-flight-panel{min-height:40dvh!important;overflow:hidden!important}
 .rx-shell .rx-space-wrap{min-height:40dvh!important;height:100%!important;min-width:0!important}
}
@media(max-width:620px){
 .rx-game{height:100dvh!important;min-height:0!important;max-height:100dvh!important}
 .rx-shell .rx-layout{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(40dvh,2fr) minmax(0,3fr)!important;min-height:0!important}
 .rx-shell .rx-flight-panel,.rx-shell .rx-space-wrap{min-height:40dvh!important}
 .rx-shell.is-orbit-survey .rx-planet-card.is-compact-survey{transform:none!important;translate:none!important}
 /* Temporary inline details may use more space; ordinary tactical play stays40%. */
 .rx-shell:has(.rx-bridge-panel.is-system-detail-open) .rx-layout{grid-template-rows:minmax(20dvh,1fr) minmax(0,3fr)!important}
 .rx-shell:has(.rx-bridge-panel.is-system-detail-open) :is(.rx-flight-panel,.rx-space-wrap){min-height:20dvh!important}
}

