/**
 * Model A PWA — html.IsPwaStandalone only. Spec: SharedDocuments/UI/Safe-Phones-Area.md §VI
 * Tab / desktop height stays in mobile-safe-area.css (100%). Capacitor is not this file.
 * PoC: 100dvh (fallback 100lvh, 100svh, 100vh). Do not re-declare in src CSS.
 * Load after mobile-safe-area.css, before app-specific CSS.
 * Requires: viewport-fit=cover; IsPwaStandalone set in index.html + MobileSafeAreaSetup.
 */

html.IsPwaStandalone {
  --AppViewportHeight: 100vh;
  --AppViewportHeight: 100svh;
  --AppViewportHeight: 100lvh;
  --AppViewportHeight: 100dvh;
  --AppViewportHeightStable: 100vh;
  --AppViewportHeightStable: 100svh;
  --AppViewportHeightStable: 100lvh;
  --AppViewportHeightStable: 100dvh;
  --SafeAreaInsetBottom: min(16px, env(safe-area-inset-bottom, 16px));
}

html.IsPwaStandalone,
html.IsPwaStandalone body,
html.IsPwaStandalone #root,
html.IsPwaStandalone .App,
html.IsPwaStandalone #App {
  height: 100vh;
  height: 100svh;
  height: 100lvh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100svh;
  max-height: 100lvh;
  max-height: 100dvh;
  overflow: hidden;
}

html.IsPwaStandalone #root {
  padding-bottom: 0;
}

/*
 * Overlay editors (#modal-dialogs). Spec: AllAppsBottomButtonsBar.md D10.
 * Tab overlay stays height:100% in mobile-safe-area.css (bottom is ignored when height is set).
 * PWA must match the shell so AppFixedBottom sits with in-flow bars.
 */
html.IsPwaStandalone .AppShellOverlay {
  height: 100vh;
  height: 100svh;
  height: 100lvh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100svh;
  max-height: 100lvh;
  max-height: 100dvh;
}
