/* Tablet PWA navigation: independent of the 760px phone breakpoint.
   Scope to authenticated app shell only; do not show navigation on login. */
@media (min-width: 761px) and (max-width: 1800px) and (pointer: coarse) {
  body.installed-app:has(#dashboard:not(.hidden)) #appNav.app-nav {
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    position:fixed!important;
    inset:auto max(18px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))!important;
    top:auto!important;
    width:auto!important;
    max-width:980px!important;
    margin:0 auto!important;
    padding:9px 12px!important;
    justify-content:space-around!important;
    align-items:center!important;
    z-index:1200!important;
    border-radius:22px!important;
    background:#11100ef2!important;
    box-shadow:0 18px 55px #000b!important;
  }
  body.installed-app:has(#dashboard:not(.hidden)) #appNav .app-nav-item {
    flex:1 1 0!important;
    min-width:0!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    gap:4px!important;
    padding:9px 8px!important;
    text-align:center!important;
  }
  body.installed-app:has(#dashboard:not(.hidden)) #appNav .app-nav-item b {
    font-size:clamp(11px,1.3vw,14px)!important;
  }
  body.installed-app:has(#dashboard:not(.hidden)) {
    padding-bottom:calc(112px + env(safe-area-inset-bottom))!important;
  }
  body.installed-app .chat-fab {bottom:calc(112px + env(safe-area-inset-bottom))!important}
}
/* Wider touchscreen tablets in standalone mode must retain the navigation. */
@media (min-width: 1801px) and (pointer: coarse) and (display-mode: standalone) {
  body.installed-app:has(#dashboard:not(.hidden)) #appNav.app-nav {
    display:flex!important;visibility:visible!important;position:fixed!important;
    bottom:max(12px,env(safe-area-inset-bottom))!important;
    left:50%!important;right:auto!important;top:auto!important;
    transform:translateX(-50%)!important;z-index:1200!important;
  }
}