/**
 * PWA MOBILE — scroll-safe global mobile behavior. v2 rewrite (2026-07-05).
 *
 * WHY THE REWRITE: the previous version hard-locked the document
 * (position: fixed + overflow: hidden on html/body) in ALL mobile contexts.
 * A fixed <body> is the single most common cause of dead scroll gestures
 * inside nested overflow containers on iOS Safari — it broke scrolling on
 * every page and widget. The app shell (.pwa-shell in Layout.jsx) already
 * bounds itself with height: 100dvh + overflow: hidden, so the document
 * NEVER needs locking. Rubber-banding and pull-to-refresh are suppressed
 * with overscroll-behavior, which does not interfere with inner scrolling.
 *
 * Public pages opt into free document scrolling via .landing-page
 * (see src/styles/utilities.css) — that override still wins here because
 * nothing below sets position/overflow on html/body anymore.
 */

/* Suppress pull-to-refresh + edge rubber-banding without locking the document.
   Inner scroll containers manage their own overscroll (overscroll-contain). */
html, body {
  overscroll-behavior-y: none;
}

/* Installed PWA (standalone) — native-app polish, still no document lock. */
@media all and (display-mode: standalone) {
  html, body {
    overscroll-behavior: none;
  }

  /* Long-press must not trigger selection/callout on app chrome;
     real text inputs keep normal selection. */
  button, [role="button"], nav, a {
    -webkit-touch-callout: none;
  }
}
