/* ATNV Universal App Compatibility Layer v9 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: rgba(37,99,235,.12); }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, .menu-toggle, .close-btn, .close-sidebar, a { touch-action: manipulation; }
input, select, textarea, button { font-size: 16px; }
img, video { max-width: 100%; }
@supports (height: 100dvh) { body { min-height: 100dvh; } }
/* iOS/WKWebView: keep controls clear of the notch/status area and home indicator. */
body.atnv-ios-webview { overscroll-behavior-y: contain; }
body.atnv-ios-webview .main-content { padding-bottom: max(24px, env(safe-area-inset-bottom, 0px)); }
body.atnv-ios-webview .menu-toggle { top: max(12px, env(safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); }
body.atnv-ios-webview .sidebar { padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
body.atnv-ios-webview .sidebar-overlay { height: 100dvh; }
body.atnv-ios-webview .container, body.atnv-ios-webview .container-narrow { max-width: 100%; }
/* Prevent horizontal overflow caused by wide tables/cards inside a WebView. */
body.atnv-ios-webview table { max-width: 100%; }
body.atnv-ios-webview .table-responsive, body.atnv-ios-webview .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Larger reliable touch targets on phones. */
@media (max-width: 991.98px) {
  body.atnv-ios-webview .menu-toggle { min-width: 44px; min-height: 44px; }
  body.atnv-ios-webview .sidebar-nav a { min-height: 44px; }
}
