/* The installed app (home-screen icon): looks like an app, not a website. Everything here is inside the
   display-mode: standalone query (or the .app-standalone class set by boononews-pwa.js for iPhone), so the normal
   website in a browser is unchanged. */
.app-tabbar { display: none; }
@media (display-mode: standalone) { .app-tabbar { display: flex; } }
html.app-standalone .app-tabbar { display: flex; }

@media (display-mode: standalone) {
  html { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); -webkit-user-select: none; user-select: none; }
  input, textarea, select, [contenteditable] { -webkit-user-select: text; user-select: text; }
  .site-footer, .news-demo-banner, .news-install, .nav-links > a:not(.nav-admin), .nav-links .nav-logout { display: none !important; }
  .site-nav { position: sticky; top: 0; border-bottom: 1px solid #e5e8db; backdrop-filter: blur(8px); }
  .nav-inner { min-height: 52px; padding-block: 6px; }
  .brand-name { font-size: 20px; }
  .nav-links { gap: 12px; }
  .nav-links .nav-admin { font-size: 12px; }
  .news-shell { padding-top: 14px; }
  .news-button, button, .news-text-link { min-height: 44px; }
  a, button { touch-action: manipulation; }
  .app-tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); background: rgb(255 253 247 / 96%); border-top: 1px solid #cfc8b8; backdrop-filter: blur(10px); }
  .app-tabbar a { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; color: #6b665a; text-decoration: none; font-size: 11px; font-weight: 650; line-height: 1.2; }
  .app-tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-tabbar a[aria-current="page"] { color: #183a30; background: #eef0e2; }
  .app-tabbar a:active { background: #e5e8db; }
}
@media (display-mode: standalone) and (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }
}

/* the same for iPhone Safari home-screen apps (class set by boononews-pwa.js) */
html.app-standalone { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
html.app-standalone body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); -webkit-user-select: none; user-select: none; }
html.app-standalone input, html.app-standalone textarea, html.app-standalone select, html.app-standalone [contenteditable] { -webkit-user-select: text; user-select: text; }
html.app-standalone .site-footer, html.app-standalone .news-demo-banner, html.app-standalone .news-install, html.app-standalone .nav-links > a:not(.nav-admin), html.app-standalone .nav-links .nav-logout { display: none !important; }
html.app-standalone .site-nav { position: sticky; top: 0; border-bottom: 1px solid #e5e8db; backdrop-filter: blur(8px); }
html.app-standalone .nav-inner { min-height: 52px; padding-block: 6px; }
html.app-standalone .brand-name { font-size: 20px; }
html.app-standalone .nav-links { gap: 12px; }
html.app-standalone .nav-links .nav-admin { font-size: 12px; }
html.app-standalone .news-shell { padding-top: 14px; }
html.app-standalone .news-button, html.app-standalone button, html.app-standalone .news-text-link { min-height: 44px; }
html.app-standalone a, html.app-standalone button { touch-action: manipulation; }
html.app-standalone .app-tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); background: rgb(255 253 247 / 96%); border-top: 1px solid #cfc8b8; backdrop-filter: blur(10px); }
html.app-standalone .app-tabbar a { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; color: #6b665a; text-decoration: none; font-size: 11px; font-weight: 650; line-height: 1.2; }
html.app-standalone .app-tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.app-standalone .app-tabbar a[aria-current="page"] { color: #183a30; background: #eef0e2; }
html.app-standalone .app-tabbar a:active { background: #e5e8db; }
