/* Browser controls own their space; only the visible document viewport is measured. */
:root { --mobile-viewport-height: 100vh; }
@supports (height: 100dvh) { :root { --mobile-viewport-height: 100dvh; } }
@media (max-width: 768px) {
  /* The shared body budget is sufficient below the favorites list. */
  body.favorites-page:has(#home-bottom-nav) .main-content { padding-bottom: 0; }
  /* The dialog already reserves the dock's space inside its viewport height. */
  body.assistant-page .assistant-shell { height: calc(var(--mobile-viewport-height) - 72px - env(safe-area-inset-bottom)); }
  body.assistant-page.assistant-typing .assistant-shell { height: var(--mobile-viewport-height); }
  .mobile-tab-host { top: var(--mobile-viewport-top, 0px); bottom: auto; height: var(--mobile-viewport-height); }
  body[data-mobile-tab-content] .mobile-header {
    top: var(--mobile-viewport-top, 0px);
    background: var(--surface-color, var(--bg-color));
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    will-change: auto;
  }
  body[data-mobile-tab-content] .mobile-header::before {
    content: ""; position: absolute; bottom: 100%; left: 0; right: 0;
    height: calc(var(--mobile-viewport-top, 0px) + env(safe-area-inset-top));
    background: inherit; pointer-events: none;
  }
}
