/* Installed-app chrome; browser and desktop layouts keep their existing design. */
html.pwa-standalone{--pwa-safe-top:env(safe-area-inset-top,0px);--pwa-safe-bottom:env(safe-area-inset-bottom,0px);--pwa-dock-height:calc(64px + var(--pwa-safe-bottom));-webkit-text-size-adjust:100%}
@media(max-width:768px){
 html.pwa-standalone{overscroll-behavior-y:contain;scroll-padding-top:calc(64px + var(--pwa-safe-top));scroll-padding-bottom:var(--pwa-dock-height)}
 html.pwa-standalone body:not([data-page="loopz"]):not([data-page="create"]):not(.chat-shell-active):not(.audio-player-open) .mobile-top-header{
  position:sticky!important;top:0!important;z-index:1450;box-sizing:border-box;min-height:calc(56px + var(--pwa-safe-top));max-height:none!important;
  padding:calc(6px + var(--pwa-safe-top)) max(10px,env(safe-area-inset-right)) 6px max(10px,env(safe-area-inset-left))!important;
  margin:0 0 8px!important;background:var(--surface-raised)!important;border:0!important;border-bottom:1px solid var(--border-color)!important;border-radius:0!important;
  opacity:1!important;transform:none!important;pointer-events:auto!important;overflow:visible!important;box-shadow:none!important;transition:none!important;will-change:auto!important;
 }
 html.pwa-standalone body.is-authenticated:not([data-page="loopz"]):not([data-page="create"]) .mobile-top-header{grid-template-columns:44px minmax(0,1fr) auto!important;gap:6px!important}
 html.pwa-standalone .mobile-top-header :is(.mobile-menu-trigger,.topbar-search-link,.topbar-inbox-link,.avatar-link.account-menu-trigger){display:inline-grid!important;place-items:center;box-sizing:border-box;inline-size:44px!important;block-size:44px!important;min-inline-size:44px!important;min-block-size:44px!important;max-inline-size:44px!important;max-block-size:44px!important;flex:0 0 44px!important;touch-action:manipulation;transform:none!important;animation:none!important;transition:none!important}
 html.pwa-standalone .topbar-admin-link{display:none!important}
 html.pwa-standalone .mobile-bottom-nav>a.create-fab{color:var(--text-primary)!important}
 html.pwa-standalone .mobile-bottom-nav>a.create-fab>span{margin:0!important;border:0!important}
 html.pwa-standalone .mobile-bottom-nav>a>b{margin:0!important}
 html.pwa-standalone .mobile-brand{min-width:0;max-width:100%;font-size:19px!important;letter-spacing:-.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html.pwa-standalone .mobile-brand-logo{max-width:100%;max-height:34px;object-fit:contain}
 html.pwa-standalone body>.mobile-bottom-nav{
  left:0!important;right:0!important;bottom:0!important;height:var(--pwa-dock-height)!important;min-height:var(--pwa-dock-height)!important;box-sizing:border-box!important;
  padding:4px max(6px,env(safe-area-inset-right)) calc(4px + var(--pwa-safe-bottom)) max(6px,env(safe-area-inset-left))!important;
  grid-template-columns:repeat(5,minmax(0,1fr));gap:0!important;border:0!important;border-top:1px solid var(--border-color)!important;border-radius:0!important;
  background:var(--surface-raised)!important;box-shadow:0 -2px 12px #00000008!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  transform:none!important;opacity:1!important;pointer-events:auto!important;transition:none!important;will-change:auto!important;
 }
 html.pwa-standalone body>.mobile-bottom-nav>a{box-sizing:border-box;min-height:48px!important;height:52px!important;min-width:0!important;padding:3px 2px!important;margin:0!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px!important;border:0!important;border-radius:12px!important;background:transparent!important;box-shadow:none!important;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
 html.pwa-standalone .mobile-bottom-nav .mobile-nav-icon{width:26px!important;height:26px!important;display:grid;place-items:center}
 html.pwa-standalone .mobile-bottom-nav .mobile-nav-icon svg{width:24px!important;height:24px!important}
 html.pwa-standalone .mobile-bottom-nav>a>b{font-size:10px!important;line-height:1.2!important;letter-spacing:.1px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html.pwa-standalone .mobile-bottom-nav>a.active:not(.create-fab){background:color-mix(in srgb,var(--accent-cyan) 10%,transparent)!important}
 html.pwa-standalone .mobile-bottom-nav>a.create-fab>span{display:grid!important;place-items:center;width:42px!important;height:29px!important;border-radius:9px!important;background:var(--btn-bg-primary)!important;color:var(--text-on-accent)!important;font-size:24px!important;line-height:1!important;box-shadow:none!important}
 html.pwa-standalone body:not([data-page="loopz"]):not([data-page="create"]):not(.chat-shell-active):not(.audio-player-open) .content{padding-bottom:calc(var(--pwa-dock-height) + 16px)!important}
 html.pwa-standalone.pwa-keyboard-open body>.mobile-bottom-nav{display:none!important}
 html.pwa-standalone.pwa-keyboard-open .mobile-top-header{position:relative!important}
 html.pwa-standalone :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select){font-size:max(16px,1em)}
 html.pwa-standalone :is(.gif-crop-close,.comment-close,.mobile-menu-head button){min-width:44px;min-height:44px;touch-action:manipulation}
 html.pwa-standalone .mobile-menu-drawer{padding-top:max(12px,var(--pwa-safe-top));padding-bottom:max(16px,var(--pwa-safe-bottom));overscroll-behavior:contain}
 html.pwa-standalone .install-banner{display:none!important}
 html.pwa-standalone :is(button,a[role=button],.mobile-bottom-nav a){-webkit-user-select:none;user-select:none}
 html.pwa-standalone :is(button,a,input,textarea,select):focus-visible{outline:2px solid var(--accent-cyan);outline-offset:3px}
 html.pwa-standalone .spa-enter{animation-duration:140ms!important}
 html.pwa-standalone::view-transition-old(root),html.pwa-standalone::view-transition-new(root){animation-duration:140ms}
 #pwa-route-progress{position:fixed;top:var(--pwa-safe-top);left:0;right:0;height:3px;z-index:2500;pointer-events:none;overflow:hidden;opacity:0;transition:opacity 100ms}
 #pwa-route-progress.is-loading{opacity:1}
 #pwa-route-progress::after{content:"";display:block;width:36%;height:100%;background:var(--accent-cyan);border-radius:8px;animation:pwa-route-indeterminate 1s ease-in-out infinite}
 @keyframes pwa-route-indeterminate{from{transform:translateX(-100%)}to{transform:translateX(380%)}}
}
@media(prefers-reduced-motion:reduce){html.pwa-standalone .spa-enter,html.pwa-standalone .kinetic-target{animation:none!important;transition:none!important}html.pwa-standalone::view-transition-old(root),html.pwa-standalone::view-transition-new(root){animation:none!important}#pwa-route-progress::after{animation:none;width:100%;opacity:.65}}
