
/* The document is the page's scroller (so mobile browsers can hide their toolbar); `Navigation/framer.tsx`
   keeps the top bars stuck over it. No native pull-to-refresh or bounce: `Navigation/PullRefresh.tsx` is ours */
html,
body {
  position: relative;
  margin: 0;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  overflow-x: clip;
  font-size: large;
}

/* Where the page shows from under the stuck top bars: sticky things in the page sit at or around it */
:root {
  --page-top: calc(env(safe-area-inset-top) + var(--top-menu-height) + var(--sub-menu-height));
}

/* `scrollIntoView` and `#hash` jumps land under the top bars, not behind them. No scroll anchoring: it fought
   Virtuoso's own compensation (see `#main`'s `overflowAnchor` in `Navigation/framer.tsx`) */
html {
  scroll-padding-top: var(--page-top);
  overflow-anchor: none;
}

/* Desktop frame before the session streams in (`Session/flags.tsx`): signed in (`data-in`) on a mouse device,
   so the menu is already beside the page on first paint instead of popping in. `Navigation/framer.tsx` sets
   `data-flags` once it has laid the real frame out, and these let go. */
@media (hover: hover) and (pointer: fine) {
  html[data-in]:not([data-flags]) #left-menu {
    transform: translateX(0) !important;
  }
  html[data-in]:not([data-flags]) #main {
    width: calc(100% - 200px) !important;
  }
  html[data-in][data-menu-closed]:not([data-flags]) #left-menu {
    transform: translateX(-190px) !important;
  }
  html[data-in][data-menu-closed]:not([data-flags]) #main {
    width: calc(100% - 10px) !important;
  }
}

