/* ═══════════════ THE SHEET'S BACKDROP REACHES SAFARI'S CHROME (5 Oct 2026) ═══════════
   MEASURED on the owner's iPhone and in the iOS 27 Simulator (magenta tests, sheet
   open, light + dark, Hero / mid-page / footer):
   - the status-bar strip is a copy of the IN-FLOW page just above the layout
     viewport (plus a faint haze of body's colour at its very top); at scroll 0,
     where there is no page above, it is body's colour alone;
   - the band under the toolbar is the IN-FLOW page below the layout viewport;
     past the document's end, body's colour alone;
   - every position:fixed layer - the sheet's scrim and dialog included - is cut at
     the layout viewport, so the dim and blur stopped exactly at both seams.

   So on touch devices the dim and the blur move into ONE in-flow layer, .wlv
   (seek-next-wlv.js): position ABSOLUTE in the document, from 120px above the
   screen to 300px below it, clamped to the document. Safari's bar rule
   (LocalFrameView::fixedContainerEdges) only ever considers fixed and sticky
   boxes, so this layer can never become a "source of bar colour" - the snap fix
   in seek-next-fmot.css is untouched. Its tint, blur and timing are the scrim's,
   driven by the dialog's own attributes, and while it exists the fixed scrim
   stops painting (it still catches the backdrop tap and still ends the exit).
   Where Safari shows body's colour instead of page (the top of the page, past the
   end), body's colour fades to the same dim on the same curve: a gradual body
   change is followed frame by frame, a step is what snaps. Desktop never loads
   any of this (the script returns before building anything). */
.wlv {
  position: absolute; left: 0; right: 0;          /* top + height: seek-next-wlv.js */
  z-index: 2147482000;                             /* above every page layer; the top layer is above it */
  pointer-events: none;
  background: rgba(12, 9, 20, .20);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  opacity: 0;
}
/* the foot below it: the same tint and the same clock, no blur (the keyboard blurs) */
.wlv--foot { -webkit-backdrop-filter: none; backdrop-filter: none; }
.wlv[data-open]    { opacity: 1; transition: opacity .4s var(--ease-sheet); }
.wlv[data-closing] { transition: opacity .4s var(--ease-sheet) .5s; }

/* the fixed scrim keeps its box, its opacity clock and its tap; only its paint moves */
html.wlm-veil .wlm__scrim { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* body's colour where Safari shows it, on the scrim's curve (in: .4s; out: .4s after .5s) */
html.wlv-dim body   { background-color: var(--wlv-body) !important; transition: background-color .4s var(--ease-sheet) !important; }
html.wlv-undim body { transition: background-color .4s var(--ease-sheet) .5s !important; }

@media (prefers-reduced-motion: reduce) {
  .wlv[data-open], .wlv[data-closing] { transition: none; }
  html.wlv-dim body, html.wlv-undim body { transition: none !important; }
}
