/* Safari browser mode uses a shorter visual viewport than the physical screen.
   Keep the app dock above Safari's toolbar; standalone PWA geometry is unchanged. */
@media (max-width:759px) and (display-mode:browser){
  html,body{
    height:100dvh!important;min-height:100dvh!important;max-height:100dvh!important;
    overflow:hidden!important;
  }
  #app{
    position:fixed!important;inset:0!important;
    height:100dvh!important;min-height:100dvh!important;max-height:100dvh!important;
  }
  #app>#main.main{
    padding-bottom:84px!important;scroll-padding-bottom:84px!important;
  }
  html body #app>.bottom-nav,
  html body.dock-js-fixed #app>.bottom-nav{
    position:fixed!important;top:auto!important;
    bottom:max(8px,env(safe-area-inset-bottom,0px))!important;
    display:grid!important;opacity:1!important;visibility:visible!important;
    pointer-events:auto!important;
  }
  html:not(.ios-keyboard-open) body:not(.keyboard-open) #app>.bottom-nav{
    display:grid!important;
  }
}
