/* The frame carries the reflection. Calendar buttons and graph coordinates
   stay on the original, stationary hit plane. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  :root:not(.is-lite) .page-home {
    --window-rim: rgb(225 224 229 / .65);
    --window-wash: rgb(231 225 233 / .085);
    --window-shadow: rgb(0 0 0 / .24);
  }
  :root[data-theme="light"]:not(.is-lite) .page-home {
    --window-rim: rgb(71 89 111 / .48);
    --window-wash: rgb(81 103 129 / .075);
    --window-shadow: rgb(39 54 74 / .15);
  }
  :where([data-window-frame]) { position: relative; }
  :root:not(.is-lite) [data-window-frame]::after,
  :root:not(.is-lite) #examples [data-pf-window]::part(window-light) {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border: 1px solid transparent;
    border-radius: inherit;
    background:
      radial-gradient(ellipse 53% 92% at var(--window-light-x, 50%) var(--window-light-y, 50%),
        var(--window-wash), transparent 82%) padding-box;
    box-shadow: inset var(--window-edge-x, 0px) var(--window-edge-y, 0px) 1px var(--window-rim),
      var(--window-shadow-x, 0px) 7px 16px -9px var(--window-shadow);
    opacity: 0;
    transition: opacity .22s ease-out;
  }
  :root:not(.is-lite) :is([data-window-follow], .analytics-window[data-window-host], .analytics-report-window[data-window-host]) {
    --window-light-x: calc(50% + 50% * var(--window-x, 0));
    --window-light-y: calc(50% + 50% * var(--window-y, 0));
    --window-edge-x: calc(-1.6px * var(--window-x, 0));
    --window-edge-y: calc(-1.6px * var(--window-y, 0));
    --window-shadow-x: calc(-8px * var(--window-x, 0));
  }
  :root:not(.is-lite) :is([data-window-follow][data-window-frame], [data-window-follow] [data-window-frame])::after,
  :root:not(.is-lite) #examples [data-pf-window][data-window-follow]::part(window-light) { opacity: 1; }
  /* Keep the history card's existing reflection and add only its moving rim. */
  :root:not(.is-lite) .history-item[data-window-frame]::after { background: none; }

  :root:not(.is-lite) :is([data-window-host] .timer-picker-heading, [data-window-host] .timer-when,
      [data-window-host] .hi-bottom, [data-window-host] .example-ad-campaign,
      [data-window-host] .example-browser, [data-window-host] .example-phone,
      [data-window-host] .search-example-head > strong, .example-folder[data-window-host] > ol) {
    transition: transform .24s cubic-bezier(.22,.76,.22,1);
  }
  :root:not(.is-lite) :is([data-window-follow] .timer-picker-heading, [data-window-follow] .timer-when,
      [data-window-follow] .hi-bottom, [data-window-follow] .search-example-head > strong,
      .example-folder[data-window-follow] > ol) {
    transform: perspective(600px) translate3d(calc(var(--window-x) * 2px), calc(var(--window-y) * 1.5px), 0)
      rotateX(calc(var(--window-y) * -2deg)) rotateY(calc(var(--window-x) * 2deg));
  }
  :root:not(.is-lite) [data-window-follow] .example-ad-campaign {
    transform: perspective(650px) translateY(-3px) rotateX(calc(var(--window-y) * -4deg)) rotateY(calc(var(--window-x) * 5deg));
  }
  :root:not(.is-lite) [data-window-follow] .example-browser {
    transform: perspective(700px) translate3d(calc(var(--window-x) * -3px), calc(var(--window-y) * -2px), 0)
      rotateX(calc(var(--window-y) * -3deg)) rotateY(calc(var(--window-x) * 4deg));
  }
  :root:not(.is-lite) [data-window-follow] .example-phone {
    transform: perspective(600px) translate3d(calc(var(--window-x) * -9px), calc(-3px + var(--window-y) * -5px), 0)
      rotateX(calc(var(--window-y) * -6deg)) rotateY(calc(var(--window-x) * 7deg));
  }
  :root:not(.is-lite) #cart-launch [data-window-host] > .cart-example-window:has(> .cart-example-form:not([hidden])) {
    transform: perspective(64rem) rotateX(calc(-4deg * var(--window-y, 0))) rotateY(calc(5deg * var(--window-x, 0)));
    transition: transform .24s ease-out;
  }
  :root:not(.is-lite) .example-devices[data-window-host] .example-phone {
    cursor: grab;
    user-select: none;
    translate: var(--phone-drag-x, 0px) var(--phone-drag-y, 0px);
    transition: translate .34s cubic-bezier(.2,.78,.25,1), transform .24s ease-out;
  }
  :root:not(.is-lite) .example-devices[data-device-held] .example-phone {
    cursor: grabbing;
    transition: none;
  }
}
