/* iOS-only shared shell refinements. Enabled by html.bgx-ios-ui and mobile width. */
@media (max-width: 700px) {
 html.bgx-ios-ui { -webkit-text-size-adjust:100%; overflow-x:clip; }
 html.bgx-ios-ui body, html.bgx-ios-ui #app { min-width:0; max-width:100%; }
 /* Header: reserve the physical safe area without modifying navigation handlers. */
 html.bgx-ios-ui :is(header,.topbar,.top-bar,.app-header,.shell-header,.main-header,.navbar):not(.modal-header):not(.card-header) { box-sizing:border-box; }
 html.bgx-ios-ui :is(.topbar,.top-bar,.app-header,.shell-header,.main-header) { padding-top:max(12px,env(safe-area-inset-top,0px)) !important; height:auto; min-height:calc(58px + env(safe-area-inset-top,0px)); }
 html.bgx-ios-ui :is(.topbar,.top-bar,.app-header,.shell-header,.main-header) :is(button,a) { flex-shrink:0; }
 html.bgx-ios-ui #content { min-width:0; max-width:100%; overflow-wrap:break-word; }
 html.bgx-ios-ui #content :is(.welcome,.metric,.panel,.preview-notice) { min-width:0; max-width:100%; }
 html.bgx-ios-ui #content .welcome { padding:14px 16px !important; }
 html.bgx-ios-ui #content .welcome h1 { font-size:20px !important; }
 html.bgx-ios-ui #content .metrics { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:10px !important; }
 html.bgx-ios-ui #content .metric { padding:12px !important; min-height:0 !important; }
 html.bgx-ios-ui #content .metric-icon { width:32px !important; height:32px !important; }
 html.bgx-ios-ui #content .dashboard-grid { grid-template-columns:minmax(0,1fr) !important; }
 html.bgx-ios-ui #content :is(.table-responsive,.v49-scroll,.dt-scroll-body) { overflow-x:auto; max-width:100%; }
}
