.panorama-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 360ms ease-in-out;
}
/* The remaining scroll distance belongs to the opening of the gallery.
   At the lower limit the entire sticky stage still fills the viewport. */
[data-tour-only] .journey .hero-stage {
  height: calc(100svh - var(--mast));
  max-height: none;
}
.journey-js:not(.motion-off) [data-tour-only] .journey::after {
  height: calc(.5 * var(--journey-travel));
}
.journey-js.motion-off [data-tour-only] .journey::after { display: none; }
.panorama-stage.stations-active > .panorama-viewport[data-station-view="media"] { opacity: 1; }
.journey .panorama-viewport .station-player {
  inset: auto;
  left: var(--pano-x, 50%);
  top: var(--pano-y, 50%);
  width: var(--pano-width, max(100cqw, 88.889cqh));
  height: auto;
  max-width: none;
  aspect-ratio: var(--pano-aspect, 8 / 9);
  transform: translate(-50%, -50%);
  object-fit: contain;
  border: 0;
}
.journey .panorama-viewport .station-player[data-station-layer="resting"] { opacity: 1; }
.panorama-viewport::after {
  position: absolute;
  content: "";
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(90deg, #281c16e8 0%, #312119ab 16%, #39271d4d 25%, transparent 40%),
    linear-gradient(0deg, #2b1c1775, transparent 17%);
}
.journey-js .panorama-stage .atelier-picture .journey-static-poster { display: block; }
.panorama-stage .atelier-picture { transition: opacity 360ms ease-in-out; }
.panorama-stage.stations-active:has(.panorama-viewport[data-station-view="media"]) .atelier-picture { opacity: 0; }
.panorama-stage.stations-active .hero-screen { transition: margin-left 640ms ease-in-out, width 640ms ease-in-out; }
.panorama-stage[data-window-side="right"] { --window-offset: calc(-1 * min(4.9cqw, 82px)); }
.panorama-stage[data-window-side="left"] { --window-offset: min(4.9cqw, 82px); }
.panorama-stage .hero-screen { margin-left: var(--window-offset, 0px); }
.journey .panorama-caption {
  position: absolute;
  z-index: 7;
  top: var(--pano-caption-y, 64%);
  left: var(--pano-caption-x, 50%);
  transform: translate(-50%, -100%);
  width: max-content;
  max-width: min(66cqw, 44rem);
  padding: .22em .55em;
  border-radius: .2em;
  color: #fff7e9;
  background: #23170ee8;
  font: 550 clamp(.78rem, 1.16cqw, 1.25rem) / 1.36 var(--sans);
  text-align: center;
  white-space: pre-line;
  pointer-events: none;
}
@media (max-width: 640px) {
  .panorama-viewport::after {
    background:
      linear-gradient(180deg, #211710e0, #2e2016c4 22%, #35241973 37%, transparent 49%),
      linear-gradient(0deg, #291a1466, transparent 25%);
  }
  .panorama-stage[data-window-side] > .hero-exhibit { --play-w: 82cqw; }
  .panorama-stage.stations-active .journey-actions {
    position: relative;
    left: calc(-1 * var(--window-offset, 0px));
    width: 59cqw;
    margin-inline: auto;
  }
  .journey .panorama-caption { max-width: 80cqw; }
}
@media (prefers-reduced-motion: reduce) {
  .panorama-viewport, .panorama-stage .atelier-picture, .panorama-stage.stations-active .hero-screen {
    transition: none;
  }
}

.panorama-stage .hero-copy[data-station] { opacity: 1; }
.panorama-stage .hero-copy[data-station] .hero-cta { display: none; }
.panorama-stage .hero-copy[data-station] h1 {
  font-size: clamp(1.55rem,2.38cqw,2.85rem);
  hyphens: auto;
  text-wrap: balance;
  line-height: 1.05;
}
.panorama-stage .hero-copy[data-station] .intro {
  color: #fff2df;
  text-wrap: pretty;
  white-space: pre-line;
}
.journey .hero-copy .station-note {
  max-width: 100%;
  margin: .65em 0 0;
  color: #f3d9b8;
  font: 550 .84rem/1.35 var(--sans);
}
@media (max-width:640px) {
  .panorama-stage .hero-copy[data-station] h1 { font-size: clamp(1.65rem,6.6cqw,2.3rem); }
}
