/* Long Teng V9-RC1: desktop roof registration and verified-head anchor.
   Desktop canvas: 5193 x 2688, old canvas translated by (0, 380).
   Keep every portal/door/interior layer inside the common scene.
   Portrait coordinates, floor overlay, all animation keyframes and JS unchanged.
   This override is last in the cascade; do not activate unused legacy overlays. */
@media (orientation: landscape) {
  .opening-gate .gate {
    --ar: 1.931919642857;
    --fy: 0.727676607143;
    --py: 54.240980654762%;
    --ph: 37.053360119048%;
  }
  .js .opening-gate .gate:not(.gate-static) .gate-scene {
    /* For unusually wide/short windows, favor visible heads over a floor crop.
       y=448 is the measured highest visible figure pixel: 448 / 2688 = 1/6. */
    top: max(
      clamp(min(0px, calc(var(--vh) - var(--sh))),
        calc(var(--vh) * var(--focus-y) - var(--fy) * var(--sh)),
        max(0px, calc(var(--vh) - var(--sh)))),
      calc(var(--nav-height, 94px) + 18px - var(--sh) / 6)
    );
  }
  .opening-gate .gate:not(.gate-static) .gate-scrim {
    /* Darken the navigation, not the raised golden sculptures. */
    height: calc(var(--nav-height, 94px) + 32px);
  }
}
