/* STS Leeuwin II: the film is the page; the interface is the ship's tally plates. */

@font-face {
  font-family: "Routed Gothic";
  src: url("../fonts/routed-gothic.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* the sea at night: the ground behind and around the film */
  --ground: #0b1a22;
  /* engraved laminate: ivory face, black letters; and its reverse */
  --plate: #f2efe6;
  --plate-lift: #faf8f1;
  --ink: #14181a;
  --ink-soft: #485055;
  --ink-dim: #5b6266;
  --rule: #d8d3c5;
  --dark: #111619;
  --dark-lift: #1c2428;
  --on-dark: #f2efe6;
  /* one job only: the chosen part */
  --orange: #ff5a1f;
  --film-text: #ffffff;

  --display: "Routed Gothic", "DIN Alternate", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --text: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  --shadow: 0 16px 36px -12px rgb(3 10 14 / 0.6), 0 3px 8px -2px rgb(3 10 14 / 0.4);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --pad-x: clamp(1.25rem, 4vw, 4rem);
  --pad-y: clamp(1.5rem, 6vh, 3.75rem);
  --edge: clamp(0.75rem, 1.6vw, 1.5rem);
  --rail-w: 1.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ground);
  color-scheme: dark;
  scrollbar-color: #3d5562 var(--ground);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--film-text);
  font: 400 1rem/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

::selection {
  background: var(--orange);
  color: var(--ink);
}

button {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Focus: a light line with a dark line outside it reads on sky, sail and sea alike. */
:focus-visible {
  outline: 2px solid var(--plate);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--dark);
}
.plate:not(.plate--dark) :focus-visible {
  outline-color: var(--ink);
  box-shadow: none;
}

/* ------------------------------------------------------------------ the track and the stage */

.tour {
  position: relative;
  height: var(--track, 100vh);
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  overflow: clip;
  background: var(--ground);
}

.film {
  position: absolute;
  left: var(--film-x, 0px);
  top: var(--film-y, 0px);
  width: var(--film-w, 100%);
  height: var(--film-h, 100%);
  opacity: 1;
  transition: opacity 0.3s ease-out;
}
.stage:not([data-film]) .film,
.stage[data-dip] .film {
  opacity: 0;
}
.stage[data-dip] .film {
  transition-duration: 0.16s;
}
.film canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.film__frame {
  touch-action: pan-y;
  outline: none;
}
.film__glow {
  pointer-events: none;
}
.stage[data-pointing] .film__frame {
  cursor: pointer;
}

/* Darkens only the corner where words sit, and only while words are there.
   It lies over the picture but under the highlight, so a chosen part stays bright. */
.scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--scrim-o, 1);
  transition: opacity 0.2s ease-out;
  background: radial-gradient(
    100% 74% at 0% 100%,
    rgb(6 16 22 / 0.92) 0%,
    rgb(6 16 22 / 0.82) 34%,
    rgb(6 16 22 / 0.52) 58%,
    rgb(6 16 22 / 0.16) 78%,
    rgb(6 16 22 / 0) 92%
  );
}

/* ------------------------------------------------------------------ plates */

.plate {
  background: var(--plate);
  color: var(--ink);
  border-radius: 3px;
  box-shadow: var(--shadow);
}
.plate--dark {
  background: var(--dark);
  color: var(--on-dark);
}

.plate--button,
.bar__name {
  border: 0;
  margin: 0;
  padding: 0.82rem 1rem 0.72rem;
  font: 400 0.8125rem/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.18s ease-out, transform 0.18s var(--ease);
}
.plate--button:hover {
  background: var(--plate-lift);
  transform: translateY(-1px);
}
.bar__name:hover {
  background: var(--dark-lift);
  transform: translateY(-1px);
}
.plate--button:active,
.bar__name:active {
  transform: translateY(1px);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.18s ease-out;
}
.icon-button:hover {
  background: rgb(20 24 26 / 0.08);
}

.link-button {
  border: 0;
  background: none;
  padding: 0.4rem 0;
  font: 400 0.8125rem/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.34em;
  text-decoration-color: rgb(20 24 26 / 0.45);
  transition: text-decoration-color 0.18s ease-out;
}
.link-button:hover {
  text-decoration-color: var(--ink);
}

/* ------------------------------------------------------------------ top bar */

.bar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(0.75rem, 2.2vh, 1.5rem) var(--edge);
  pointer-events: none;
}
.bar > * {
  pointer-events: auto;
}
.bar__name {
  animation: settle 0.26s var(--ease) both;
}

/* ------------------------------------------------------------------ words on the film */

.hero,
.caption,
.close {
  position: absolute;
  left: var(--pad-x);
  bottom: var(--pad-y);
  z-index: 3;
}
.hero,
.caption {
  pointer-events: none;
  text-shadow: 0 1px 2px rgb(3 10 14 / 0.55), 0 0 28px rgb(3 10 14 / 0.4);
}

.hero {
  max-width: min(46rem, calc(100% - 2 * var(--pad-x)));
  opacity: var(--hero-o, 1);
}
.hero__title {
  margin: 0 0 0.3em;
  font: 400 clamp(2.75rem, 7.2vw, 6rem) / 0.98 var(--display);
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-wrap: balance;
}
.hero__text {
  max-width: 31rem;
  margin: 0 0 1.75rem;
  font: 400 clamp(1.0625rem, 1.35vw, 1.3125rem) / 1.5 var(--text);
  text-wrap: pretty;
}
.cue {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 1.5rem;
  margin: 0;
  font: 400 0.8125rem/1 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.cue__arrow {
  flex: none;
  transition: opacity 0.3s ease-out, transform 0.5s var(--ease);
}
.stage:not([data-state="ready"]) .cue__arrow {
  opacity: 0;
  transform: translateY(-6px);
}

.caption {
  width: min(31rem, 46vw);
  opacity: var(--caption-o, 0);
  transform: translateY(calc((1 - var(--caption-o, 0)) * 10px));
}
.caption__title {
  margin: 0 0 0.5em;
  font: 400 clamp(1.5rem, 2.4vw, 2.25rem) / 1.05 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-wrap: balance;
}
.caption__text {
  margin: 0;
  font: 400 clamp(1.0625rem, 1.25vw, 1.25rem) / 1.55 var(--text);
  text-wrap: pretty;
}

/* the closing plate: the ship's particulars */
.close {
  z-index: 4;
  width: min(27rem, calc(100% - 2 * var(--pad-x)));
  opacity: var(--close-o, 0);
  transform: translateY(calc((1 - var(--close-o, 0)) * 10px));
}
.close__plate {
  padding: 1.6rem 1.7rem 1.2rem;
}
.close__title {
  margin: 0 0 1.1rem;
  font: 400 1.75rem/1 var(--display);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.particulars {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 1.4rem;
  margin: 0;
  font: 400 1rem/1.45 var(--text);
}
.particulars dt {
  font: 400 0.75rem/1.95 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.particulars dd {
  margin: 0;
  font-variant-numeric: lining-nums;
}
.close__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  margin-top: 1.25rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
}
.close__credit {
  margin: 1rem 0 0;
  font: 400 0.875rem/1.5 var(--text);
  color: rgb(255 255 255 / 0.9);
  text-shadow: 0 1px 2px rgb(3 10 14 / 0.6);
  text-wrap: pretty;
}

/* a label on the left takes the corner the words use */
.stage[data-label="left"] :is(.hero, .caption, .close) {
  visibility: hidden;
}
.stage[data-label="left"] .scrim {
  opacity: 0;
}

/* ------------------------------------------------------------------ the tour rail */

.rail {
  position: absolute;
  right: var(--edge);
  top: 50%;
  z-index: 4;
  width: var(--rail-w);
  height: min(58%, 34rem);
  transform: translateY(-50%);
  background: rgb(17 22 25 / 0.9);
  border-radius: 3px;
  box-shadow: var(--shadow);
  /* backwards, not both: once settled the rail's own opacity rules, so it can fade with the controls */
  animation: settle 0.3s var(--ease) backwards;
}
.rail__stops {
  position: absolute;
  inset: 0.9rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rail__stops li {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--at, 0) * 100%);
  transform: translateY(-50%);
}
.rail__stop {
  position: relative;
  display: block;
  width: 100%;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.rail__stop::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.5rem;
  height: 2px;
  background: rgb(242 239 230 / 0.62);
  transform: translate(-50%, -50%);
  transition: width 0.2s var(--ease), background-color 0.2s ease-out;
}
.rail__stop:hover::before,
.rail__stop:focus-visible::before,
.rail__stop[aria-current="step"]::before {
  width: 1.1rem;
  background: var(--plate);
}
.rail__name {
  position: absolute;
  right: calc(100% + 0.6rem);
  top: 50%;
  padding: 0.55rem 0.7rem 0.48rem;
  font: 400 0.75rem/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translate(4px, -50%);
  pointer-events: none;
  transition: opacity 0.16s ease-out, transform 0.2s var(--ease);
}
.rail__stop:hover .rail__name,
.rail__stop:focus-visible .rail__name {
  opacity: 1;
  transform: translate(0, -50%);
}
.rail__now {
  position: absolute;
  left: 3px;
  right: 3px;
  top: calc(0.9rem + (100% - 1.8rem) * var(--p, 0));
  height: 3px;
  border-radius: 1px;
  background: var(--plate);
  transform: translateY(-50%);
  pointer-events: none;
}

/* ------------------------------------------------------------------ corner controls */

/* Parts list and full screen sit in the bottom corner like a video player's buttons. */
.controls {
  position: absolute;
  right: var(--edge);
  bottom: var(--edge);
  z-index: 6;
  display: flex;
  gap: 0.3rem;
}
.control {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: rgb(17 22 25 / 0.42);
  color: var(--on-dark);
  cursor: pointer;
  transition: background-color 0.18s ease-out;
}
.control[hidden] {
  display: none;
}
.control:hover {
  background: rgb(17 22 25 / 0.72);
}
.control:focus-visible {
  outline: 2px solid var(--plate);
  outline-offset: 2px;
}
.control svg {
  filter: drop-shadow(0 1px 2px rgb(3 10 14 / 0.5));
}
.control__exit,
.control[data-on] .control__enter {
  display: none;
}
.control[data-on] .control__exit {
  display: block;
}
/* the button's name, shown above it on hover, as a video player does */
.control::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.5rem);
  padding: 0.55rem 0.7rem 0.48rem;
  border-radius: 3px;
  background: var(--dark);
  color: var(--on-dark);
  font: 400 0.75rem/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  translate: 0 4px;
  pointer-events: none;
  transition: opacity 0.16s ease-out, translate 0.2s var(--ease);
}
.control:hover::after,
.control:focus-visible::after {
  opacity: 1;
  translate: 0 0;
}

/* With a mouse, the name, the stops and the corner buttons fade two seconds after the
   mouse stops (main.js sets data-idle) and come back when it moves. Scrolling alone
   never brings them back, so a visitor scrolling through the tour sees only the ship. */
@media (hover: hover) and (pointer: fine) {
  .bar,
  .rail,
  .controls {
    transition: opacity 0.45s ease-out;
  }
  .stage[data-idle] .bar,
  .stage[data-idle] .rail,
  .stage[data-idle] .controls {
    opacity: 0;
  }
  .stage[data-idle] .bar > *,
  .stage[data-idle] .rail,
  .stage[data-idle] .controls {
    pointer-events: none;
  }
}

/* how much of the film has arrived */
.load {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 8;
  height: 2px;
  pointer-events: none;
  transition: opacity 0.6s ease-out 0.4s;
}
.load__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: rgb(242 239 230 / 0.9);
  transform: scaleX(var(--loaded, 0));
  transform-origin: left center;
  transition: transform 0.3s linear;
}
.stage[data-loaded] .load {
  opacity: 0;
}

/* ------------------------------------------------------------------ the pointer's name tag */

.tag {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  padding: 0.6rem 0.72rem 0.52rem;
  font: 400 0.8125rem/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  transform: translate3d(var(--x, 0px), var(--y, 0px), 0);
  box-shadow: 0 8px 18px -8px rgb(3 10 14 / 0.7);
}

/* ------------------------------------------------------------------ the part's label */

.label {
  position: absolute;
  top: clamp(4rem, 9vh, 5.25rem);
  z-index: 7;
  display: flex;
  flex-direction: column;
  width: min(24rem, 36vw);
  max-height: calc(100% - clamp(4rem, 9vh, 5.25rem) - var(--pad-y));
  outline: none;
  animation: settle 0.24s var(--ease) both;
}
.label[data-side="right"] {
  right: calc(var(--edge) + var(--rail-w) + 0.85rem);
}
.label[data-side="left"] {
  left: var(--edge);
}
.label__close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 1;
}
.label__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.55rem 1.6rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: #bdb7a6 transparent;
}
.label__name:has(+ .label__group[hidden]) {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.label__name {
  margin: 0 2.4rem 0.5rem 0;
  font: 400 1.75rem/1.08 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-wrap: balance;
  outline: none;
}
.label__group {
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  font: 400 0.75rem/1 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.label__text {
  margin: 0;
  font: 400 1.0625rem/1.55 var(--text);
  text-wrap: pretty;
}
.label__figure {
  margin: 1.15rem 0 0;
  animation: fade 0.3s ease-out both;
}
.label__picture {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
  border-radius: 2px;
  overflow: hidden;
  background: var(--rule);
}
.label__picture img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(40vh, 21rem);
}
.label__mark {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  padding: 0.48rem 0.58rem 0.4rem;
  font: 400 0.6875rem/1 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: none;
}
/* The Main Saloon's bookshelves picture opens the model on the shelf: a plain
   picture, a button only to the keyboard and over her (main.js, onShelfModel). */
.label__shelf {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: default;
}
.label__credit {
  margin-top: 0.6rem;
  font: 400 0.8125rem/1.45 var(--text);
  color: var(--ink-soft);
  text-wrap: pretty;
}
.label__credit a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
.label__credit a:hover {
  color: var(--ink);
}

/* ------------------------------------------------------------------ the parts list */

.sheet {
  width: min(78rem, calc(100vw - 2rem));
  max-width: none;
  max-height: min(56rem, calc(100vh - 2rem));
  max-height: min(56rem, calc(100dvh - 2rem));
  margin: auto;
  padding: 0;
  border: 0;
  overflow: hidden;
}
.sheet[open] {
  display: flex;
  flex-direction: column;
  animation: settle 0.26s var(--ease) both;
}
.sheet::backdrop {
  background: rgb(6 16 22 / 0.66);
  animation: fade 0.2s ease-out both;
}
.sheet__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 0 1rem;
  padding: 1.4rem 1.2rem 1.1rem 1.9rem;
  border-bottom: 1px solid var(--rule);
}
.sheet__title {
  margin: 0.35rem 0 0;
  font: 400 1.75rem/1 var(--display);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  outline: none;
}
.sheet__hint {
  grid-column: 1;
  margin: 0.55rem 0 0;
  font: 400 0.9375rem/1.4 var(--text);
  color: var(--ink-soft);
}
.sheet__close {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.sheet__groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  align-items: start;
  gap: 1.75rem 1.5rem;
  padding: 1.4rem 1.5rem 1.9rem 1.9rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #bdb7a6 transparent;
}
.group__title {
  margin: 0 0 0.5rem;
  padding: 0 0 0.65rem 0.95rem;
  border-bottom: 1px solid var(--rule);
  font: 400 0.75rem/1 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.group__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.part {
  display: grid;
  grid-template-columns: 0.95rem 1fr;
  align-items: baseline;
  width: 100%;
  padding: 0.45rem 0.4rem 0.38rem 0;
  border: 0;
  border-radius: 2px;
  background: none;
  font: 400 0.875rem/1.25 var(--display);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink-dim);
  cursor: pointer;
  transition: background-color 0.14s ease-out, color 0.14s ease-out;
}
.part::before {
  content: "";
  align-self: center;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
}
.part[data-in-view] {
  color: var(--ink);
}
.part[data-in-view]::before {
  background: var(--ink);
}
.part[aria-current="true"] {
  color: var(--ink);
}
.part[aria-current="true"]::before {
  background: var(--orange);
  box-shadow: 0 0 0 1px var(--ink);
}
.part:hover,
.part:focus-visible {
  background: rgb(20 24 26 / 0.07);
  color: var(--ink);
}
.part__where {
  display: block;
  grid-column: 2;
  margin-top: 0.1rem;
  font: 400 0.8125rem/1.3 var(--text);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ notices */

.notice {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 9;
  width: min(26rem, calc(100% - 2.5rem));
  margin: 0;
  padding: 1.4rem 1.6rem;
  font: 400 1.0625rem/1.5 var(--text);
  transform: translate(-50%, -50%);
}
.notice--static {
  position: fixed;
}

/* ------------------------------------------------------------------ motion */

@keyframes settle {
  from {
    opacity: 0;
    translate: 0 8px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ------------------------------------------------------------------ portrait: the film sits in a band, the words below it */

.stage[data-layout="band"] .scrim {
  display: none;
}
.stage[data-layout="band"] :is(.hero, .caption, .close) {
  left: 1.25rem;
  right: 1.25rem;
  top: calc(var(--film-h, 56vw) + 1.75rem);
  bottom: auto;
  width: auto;
  max-width: 34rem;
  text-shadow: none;
}
.stage[data-layout="band"] .hero__title {
  font-size: clamp(2.5rem, 12.5vw, 4rem);
}
.stage[data-layout="band"] .hero__text {
  margin-bottom: 1.5rem;
}
.stage[data-layout="band"] .close__credit {
  text-shadow: none;
}
.stage[data-layout="band"] .rail {
  top: var(--film-h, 56vw);
  right: 0;
  left: 0;
  width: auto;
  height: 3px;
  transform: none;
  border-radius: 0;
  box-shadow: none;
  background: rgb(242 239 230 / 0.16);
}
.stage[data-layout="band"] .rail__stops {
  display: none;
}
.stage[data-layout="band"] .rail__now {
  inset: 0 auto 0 0;
  width: 100%;
  height: auto;
  border-radius: 0;
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}
.stage[data-layout="band"] .label {
  inset: calc(var(--film-h, 56vw) + 3px) 0 0 0;
  width: auto;
  max-height: none;
  border-radius: 0;
  box-shadow: 0 -10px 30px -12px rgb(3 10 14 / 0.7);
}
.stage[data-layout="band"] .label__body {
  padding: 1.35rem 1.25rem 1.5rem;
}
.stage[data-layout="band"] .label__picture img {
  max-height: 15rem;
}
.stage[data-layout="band"][data-label] :is(.hero, .caption, .close) {
  visibility: hidden;
}

@media (max-width: 40rem) {
  .sheet {
    width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }
  .sheet__head {
    padding: 1rem 0.75rem 0.9rem 1.25rem;
  }
  .sheet__groups {
    grid-template-columns: 1fr;
    padding: 1.1rem 1rem 2rem 1.25rem;
  }
  .part {
    padding-block: 0.62rem 0.55rem;
  }
}

/* short, wide windows (a phone on its side) */
@media (max-height: 30rem) and (min-aspect-ratio: 1/1) {
  .hero__title {
    font-size: clamp(2rem, 9vh, 3rem);
  }
  .hero__text {
    margin-bottom: 0.9rem;
  }
  .caption__title {
    font-size: 1.25rem;
  }
  .caption__text {
    font-size: 0.9375rem;
    line-height: 1.45;
  }
  .label {
    top: 3.6rem;
    max-height: calc(100% - 4.2rem);
  }
  .close__plate {
    padding: 1rem 1.2rem 0.8rem;
  }
  .close__title {
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
  }
  .particulars {
    font-size: 0.875rem;
    gap: 0.15rem 1rem;
  }
  .close__credit {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .caption,
  .close {
    transform: none;
  }
}

/* ------------------------------------------------------------------ the model on the Main Saloon shelf */
/* A button over her on the film, for the keyboard only: a click on her reaches the film itself. */
.model-spot {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  pointer-events: none;
}
.model {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
}
.model[data-phase="spinning"]:active {
  cursor: grabbing;
}
.model__ambient {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  filter: blur(28px) brightness(0.5) saturate(0.9);
  opacity: var(--lift, 0);
}
.model__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--ui, 0);
  background: radial-gradient(100% 74% at 0% 100%, rgb(6 16 22 / 0.86) 0%, rgb(6 16 22 / 0.6) 40%, rgb(6 16 22 / 0) 82%);
}
.model__view {
  position: absolute;
  display: block;
  outline: none;
}
.model__view:focus-visible {
  outline: 2px solid var(--plate);
  outline-offset: -6px;
  box-shadow: none;
}
.model__caption {
  opacity: var(--ui, 0);
  transform: translateY(calc((1 - var(--ui, 0)) * 10px));
  z-index: 2;
}
/* The Voyage Schedule button: an ivory plate like every other button; the caption around it lets clicks through. */
.model__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  margin-top: 1.1rem;
  padding-inline: 1.25rem 1.1rem;
  text-decoration: none;
  text-shadow: none;
  pointer-events: auto;
}
.model__cta svg {
  flex: none;
  margin-top: -0.1rem;
}
.model__cta:focus-visible {
  outline: 2px solid var(--plate);
  outline-offset: 3px;
  box-shadow: var(--shadow), 0 0 0 7px var(--dark);
}
.model:is([data-phase="returning"], [data-phase="lowering"], [data-phase="fading-out"]) .model__cta {
  pointer-events: none;
}
.model__hint {
  position: absolute;
  top: calc(clamp(0.75rem, 2.2vh, 1.5rem) + 0.35rem);
  left: 50%;
  z-index: 2;
  translate: -50% 0;
  padding: 0.7rem 1rem 0.62rem;
  border-radius: 999px;
  background: rgb(17 22 25 / 0.72);
  color: var(--on-dark);
  white-space: nowrap;
  pointer-events: none;
  opacity: var(--ui, 0);
  transition: opacity 0.6s ease-out;
}
.model__hint[data-waiting] {
  opacity: 0;
}
.model__hint[data-gone] {
  opacity: 0;
  transition-duration: 0.9s;
}
.model__close {
  position: absolute;
  top: clamp(0.75rem, 2.2vh, 1.5rem);
  right: var(--edge);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: var(--ui, 0);
  transition: background-color 0.18s ease-out, transform 0.18s var(--ease);
}
.model__close:hover {
  background: var(--dark-lift);
  transform: scale(1.06);
}
.model__close:active {
  transform: scale(0.96);
}
.model[data-phase="returning"],
.model[data-phase="lowering"],
.model[data-phase="fading-out"] {
  pointer-events: none;
  cursor: default;
}
@media (max-width: 700px) {
  .model__caption {
    left: 1rem;
    right: 1rem;
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    width: auto;
  }
  .model__hint {
    top: auto;
    /* just above her words: model.js measures them into --caption-h */
    bottom: calc(max(1.25rem, env(safe-area-inset-bottom)) + var(--caption-h, 11.5rem) + 1.25rem);
  }
}

