/* V5.6: installed-app viewport and launch safeguards. */
:root{--gsz-app-height:100dvh}
@supports not (height:100dvh){:root{--gsz-app-height:100vh}}
html{height:100%;background:#081b36}
body{height:var(--gsz-app-height)!important;min-height:0!important;max-height:var(--gsz-app-height)!important;overflow:hidden!important}
/* Modern standalone PWAs should not show redundant install/fullscreen prompts. */
@media (display-mode:standalone),(display-mode:fullscreen){
  #install-button,#fullscreen-toggle{display:none!important}
}
html.gsz-standalone .site-head{padding-top:max(2px,env(safe-area-inset-top))!important}
html.gsz-standalone .nav-shell.workspace{padding-bottom:max(4px,env(safe-area-inset-bottom))!important}
/* Splash must never trap a user on a permanent loading overlay. */
#boot-splash{pointer-events:none!important;animation:gsz-splash-fallback 3.5s both}
#boot-splash.dismissed{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
@keyframes gsz-splash-fallback{0%,65%{visibility:visible}99%{visibility:visible}100%{visibility:hidden}}
@media (prefers-reduced-motion:reduce){#boot-splash{animation-duration:1s}}

/* Offline setup is intentionally accessible from calculator settings, even on mobile. */
.offline-panel{border:1px solid #516586;background:#182739;border-radius:12px;padding:12px;margin:14px 0 8px;color:#e4edff}
.offline-panel h3{font-size:14px;margin:0 0 7px;color:#9cc7ff}
.offline-panel p{font-size:12px;line-height:1.5;margin:4px 0 10px;color:#e7f1ff}
.offline-panel p.offline-good{color:#80e4b0}
.offline-panel .dialog-action{display:inline-block;width:auto;min-width:120px;margin:3px 8px 8px 0;padding:10px 12px}
.offline-panel .offline-verify{background:#334762}
.offline-panel small{display:block;color:#a8b9d6;font-size:11px;line-height:1.5}
