/* ═══════════════════ RENDER FIX — WHY SEEK DEVICE + SEE IT IN ACTION ═══════════════════
   dx-sim-fix-final-render-fix.html only, loaded after seek-next-fp12.css. Rendering only:
   no size, position, colour, copy or timing of the approved design changes here.

   1. THE GLASS STRIPS TAKE THE SCREEN's OWN CORNERS.
      Chrome clips a backdrop-filter element to its OWN border box, not to an
      ancestor's rounded overflow clip. The action bar and the glass header are
      full-width strips at the screen's foot and head, so in Chrome their blurred
      backdrop filled the square corners the screen's radius should have removed —
      a grey square over the bezel at both bottom corners (your recording, light
      theme: the "cut" right edge) and at both top corners once the header is in.
      Each strip now carries the screen's radius on its outer corners. The strips
      are scaled by --ps x 411/390 and the screen's radius is 46 x --ps, so in the
      strip's own pixels the radius is 46 x 390/411 at every size. WebKit already
      clipped them; the radius is the same curve, so nothing changes there. */
.pscr--fp12 .fp-cta   { border-radius: 0 0 calc(46px * 390 / 411) calc(46px * 390 / 411); }
.pscr--fp12 .fp-bar-h { border-radius: calc(46px * 390 / 411) calc(46px * 390 / 411) 0 0; }

/* 1a. THE SCREEN CLIPS WITH A PATH, SO WEBKIT PAINTS WHAT IS COMING.
      With the screen's own overflow:hidden, WebKit treats the profile layer as
      visible only through the 574px window and paints just around it. The
      profile runs ~3.6x the page there, so on a fast exit it outran that band
      and the top of the screen went empty for up to 6 frames (measured, iOS 27).
      The same rounded rectangle as a clip-path clips identically — same radius,
      same edge — but is applied when the layers are composited, so WebKit sees
      the part of the profile about to scroll into the screen as on the page and
      keeps it painted. Measured: fast-exit gaps down to 1-3 frames; the screen
      canvas becomes its own 5MB layer. It also clips the glass strips in Chrome
      (section 1 keeps their radius regardless). */
.pscr--fp12 .pscr__screen { overflow: visible; clip-path: inset(0 round calc(46px * var(--ps))); }
/* THE SCREEN's CANVAS IS PAINTED BY THE DEVICE. A clip-path makes the screen a
   composited layer of its own, and anything it paints — its background glows
   and the chamfer hairline — would be a 5MB layer apart from the shell. The same
   canvas is drawn instead by the device itself, directly under the screen, at
   the screen's box and radius: the glows stay fixed to the glass exactly as
   before, the screen layer paints nothing (0MB), and the shell and the screen
   canvas are ONE layer, so they can only ever arrive together. */
.pscr--fp12 { position: relative; }
html[data-theme] .pscr--fp12::before {
  content: ""; position: absolute; left: var(--bez); top: var(--bez);
  width: calc(var(--pw) * var(--ps) * 1px); height: calc(var(--psh) * var(--ps) * 1px);
  border-radius: calc(46px * var(--ps));
  background: var(--fp-screen);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), inset 0 1px 0 rgba(255,255,255,.13);
}
html[data-theme] .pscr--fp12 .pscr__screen { background: none; box-shadow: none; }

/* 1b. THE HERO's TWO DISCS KEEP THEIR GLASS WITHOUT A LIVE BACKDROP.
      The back and report discs were the only backdrop-filter INSIDE the scrolling
      profile, and that made WebKit give the whole 5,100px profile its own tiled
      layer (.fp-scroll, "transform with composited descendants"), painted only
      near the part on screen. The profile moves ~3.6x the page's speed there, so
      during a fling it outran its tiles: the screen went empty around the action
      bar for 2-8 frames on the way out and on the way back (measured, iOS 27).
      Without those two live filters the profile paints into the scrub's own
      layer (.pscr__frame), which WebKit covers over the scrub's whole range:
      measured 14.5MB, constant at every position (the tiled layer was 22.1MB and
      partial), and three fewer layers. What each disc showed through its 12px
      blur never changes — the same corner of the same photograph, the scrim and
      the pager bars — so that exact backdrop is baked (assets/rf, 0.6KB) and
      drawn under the same tint and hairline. Same disc, same place. */
.pscr--fp12 .fp-disc {
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background: linear-gradient(rgba(14,11,20,.34), rgba(14,11,20,.34)), var(--fp-disc-bg) 0 0 / 100% 100% no-repeat;
  background-origin: border-box;
}
.pscr--fp12 .fp-disc--l { --fp-disc-bg: url("./assets/rf/fp12-disc-l.webp"); }
.pscr--fp12 .fp-disc--r { --fp-disc-bg: url("./assets/rf/fp12-disc-r.webp"); }

/* 2. THE HEADER's CLOCK. The source turns the status time from the photo's white
      to the ink as the glass header comes in. The header now runs on the same
      compositor timeline as the profile (seek-next-rf.js), and a colour cannot be
      animated there, so the change is carried by two labels: the ink one lives
      inside the glass bar and arrives with it, the white one fades out over the
      same stretch of scroll. Same place, same face, same two colours. */
.pscr--fp12 .fp-time-ink {
  position: absolute; top: 16px; left: 30px;
  font: 700 13.5px 'Nunito', system-ui, sans-serif; color: var(--fp-ink);
}
.pscr--fp12 .fp-top > .fp-time { transition: opacity .2s ease; }
/* where there is no compositor timeline the header still runs from the scroll
   ([data-fp-head], as before): the white label steps aside for the ink one */
.pscr--fp12 .pscr__screen[data-fp-head] .fp-top > .fp-time { color: #FFFCF8; opacity: 0; }

/* 3. FAST RE-ENTRY, THE WHOLE DEVICE AT ONCE (touch only). WebKit drops the
      backing store of every layer that leaves the screen — measured, all
      eleven of the device's layers read 0MB with the frame only 216px past the
      fold — and repaints them on its own schedule when they come back: the
      small shell and action-bar layers whole, the tall profile layer tile by
      tile, the photographs after an asynchronous decode. After a hard fling
      that showed as a shell with an empty screen, then a screen without its
      hero photograph. [data-rf-hold] keeps the approved away pose (the same
      opacity 0 and 12px) until the frame is on screen, its photographs are
      decoded and WebKit has painted it; the approved fade and settle then run
      from there, so the whole phone and the wall arrive together. A normal
      pace never sets it. */
@media (hover: none) and (pointer: coarse) {
  .ws__frame[data-rf-hold] { opacity: 0; translate: 0 12px; transition: none; }
}

/* 4. SEE IT IN ACTION: A TAP IS ALWAYS A TAP. On iPhone two taps on the stepper
      inside Safari's double-tap interval were read as a double-tap: the page
      zoomed into the card, the stage slid off screen mid-transition and the
      next taps landed elsewhere. manipulation keeps pan and pinch and removes
      only the double-tap zoom, on the controls alone. */
.orb__card .orb__step,
.orb__card .orb__btn { touch-action: manipulation; }
