/* Visitor photographs and painted interpretations, with a little movement. */
.stage-interlude .stage-scene {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  overflow: hidden
}

.stage-interlude .stage-scene img {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
  filter: saturate(.8) contrast(1.06);
  transform: scale(1.035)
}

.stage-interlude .stage-scene .stage-photo {
  object-position: center 57%
}

.stage-interlude .stage-scene .stage-paint {
  object-position: center 42%;
  filter: saturate(.96) contrast(1.03)
}

.stage-interlude .stage-scene:after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 3%;
  bottom: 3%;
  left: 50%;
  width: 1px;
  background: #eed1a3a6;
  box-shadow: 0 0 25px #efd0a780
}

.stage-interlude:after {
  z-index: 1;
  background: linear-gradient(0deg,#090908f2 0%,#090908a8 26%,transparent 74%),linear-gradient(90deg,#0908078a,transparent 68%)
}

.stage-interlude .interlude-copy {
  bottom: 8%;
  right: 24px;
  max-width: 780px
}

.stage-interlude .interlude-copy span {
  max-width: 440px;
  line-height: 1.5;
  color: #ffe7c7;
  text-shadow: 0 2px 12px #000
}

.memory-art .memory-scene {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 2/3;
  border-radius: 48% 48% 6px 6px;
  border: 1px solid #d7af7a92;
  background: #172018;
  box-shadow: 16px 18px 0 #712b22,0 30px 72px #0009
}

.memory-art .memory-scene:after {
  content: "";
  position: absolute;
  inset: 40% 0 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(transparent,#10150c8c)
}

.memory-art .memory-scene .memory-painted {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  border-radius: 0;
  filter: saturate(.92);
  box-shadow: none;
  transform: scale(1.035)
}

.memory-art .memory-scene .memory-photo {
  position: absolute;
  z-index: 2;
  right: 6%;
  bottom: 8%;
  width: clamp(88px,29%,145px);
  height: auto;
  aspect-ratio: 236/314;
  object-fit: cover;
  border: 5px solid #f3e6cf;
  border-bottom-width: 18px;
  border-radius: 2px;
  box-shadow: 0 15px 28px #000c;
  transform: rotate(5deg)
}

.memory-art .memory-stamp {
  position: absolute;
  z-index: 2;
  top: 14%;
  left: 7%;
  max-width: 55%;
  font: italic clamp(16px,1.8vw,26px)/1.15 Georgia,serif;
  color: #fff1d5;
  text-shadow: 0 3px 13px #000b
}

.memory-art figcaption {
  font-size: 13px;
  color: #e5d5bd;
  margin-top: 20px;
  line-height: 1.55
}

@media(prefers-reduced-motion:no-preference) {
  .stage-interlude .stage-scene .stage-photo {
    animation: photoDrift 17s ease-in-out infinite alternate
  }
  .stage-interlude .stage-scene .stage-paint {
    animation: paintDrift 19s ease-in-out infinite alternate
  }
  .memory-art .memory-scene .memory-painted {
    animation: memoryDrift 18s ease-in-out infinite alternate
  }
  .memory-art .memory-scene .memory-photo {
    animation: photoFloat 6s ease-in-out infinite alternate
  }
  @keyframes photoDrift {
    to {
      transform: scale(1.12) translate(-1%,.5%)
    }
  }
  @keyframes paintDrift {
    to {
      transform: scale(1.1) translate(1%,-1%)
    }
  }
  @keyframes memoryDrift {
    to {
      transform: scale(1.085) translateY(-1.25%)
    }
  }
  @keyframes photoFloat {
    to {
      transform: rotate(2deg) translateY(-7px)
    }
  }
}

/* A compact but tactile cassette, with the real YouTube embed still visible. */
.dock {
  width: min(385px,calc(100vw - 28px));
  padding: 12px 14px 14px;
  border-radius: 18px;
  background: linear-gradient(150deg,#553425f5,#1b1715fa 46%,#0d120ffc);
  border: 1px solid #e3ae77;
  box-shadow: 0 0 0 3px #3a271f,0 22px 64px #000d,0 0 30px #c0693635
}

.dock-head .cassette-deck {
  display: none
}

.dock-head {
  margin-bottom: 6px
}

.dock-head .close {
  min-height: 38px;
  padding-inline: 11px;
  border-radius: 9px
}

.deck-copy #nowTitle {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.2
}

.cassette-showcase {
  position: relative;
  margin: 0 auto 8px;
  width: min(262px,100%);
  aspect-ratio: 2/1;
  filter: drop-shadow(0 9px 9px #0009)
}

.cassette-showcase>img {
  width: 100%;
  height: 100%;
  object-fit: contain
}

.cassette-showcase .showcase-track {
  position: absolute;
  top: 18%;
  left: 26%;
  right: 26%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  color: #432d24;
  font: 700 9px/1.1 'DM Sans',sans-serif
}

.cassette-showcase .showcase-reel {
  position: absolute;
  top: 47%;
  width: 10%;
  aspect-ratio: 1;
  border: 2px dashed #a47b6b;
  border-radius: 50%;
  opacity: .55;
  pointer-events: none
}

.cassette-showcase .reel-left {
  left: 27.5%
}

.cassette-showcase .reel-right {
  right: 27.5%
}

.dock.is-playing .showcase-reel {
  animation: reelSpin 2.5s linear infinite
}

@keyframes reelSpin {
  to {
    transform: rotate(360deg)
  }
}

.cassette-transport {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 5px;
  margin: 0;
  padding: 6px;
  border-radius: 11px
}

.cassette-transport button,.cassette-transport #cassettePlay {
  min-width: 0;
  min-height: 43px;
  padding: 5px 3px;
  flex-direction: column;
  gap: 2px;
  border-radius: 5px;
  font-size: 11px;
  letter-spacing: .03em;
  line-height: 1.1;
  white-space: nowrap;
  background: linear-gradient(#f7ead2,#bba789 64%,#927966);
  color: #211a15;
  box-shadow: 0 2px 0 #5a4537,inset 0 1px #fff
}

.cassette-transport button span:first-child {
  font-size: 13px;
  line-height: 1
}

.cassette-transport button[hidden] {
  display: none
}

.cassette-transport:has(.previous[hidden]) {
  grid-template-columns: repeat(2,minmax(0,1fr))
}

.deck-volume {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 7px 2px 5px;
  color: #ebd9bd;
  font-size: 11px;
  letter-spacing: .04em
}

.deck-volume label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 87px
}

.deck-volume output {
  color: #f6bd83;
  font-variant-numeric: tabular-nums
}

.deck-volume input {
  flex: 1;
  min-width: 80px;
  max-width: 100%;
  height: 24px;
  accent-color: #cb583b;
  cursor: pointer
}

.dock .video {
  height: 204px;
  min-height: 204px;
  border-radius: 8px
}

.dock .video iframe {
  height: 202px;
  min-height: 202px
}

.dock.expanded .cassette-showcase {
  display: none
}

.dock.expanded .cassette-deck {
  display: none
}

.dock.expanded .video {
  height: min(58vh,450px);
  min-height: 270px
}

.dock.expanded .video iframe {
  height: 100%;
  min-height: 270px
}

/* Every chapter and control stays legible and reachable on small screens. */
@media(max-width:800px) {
  .wrap {
    width: min(100% - 36px,1160px)
  }
  .stage-interlude {
    margin-inline: calc((min(100vw - 36px,1160px) - 100vw)/2);
    margin-bottom: 90px
  }
  .legacy-layout {
    grid-template-columns: minmax(0,1fr) minmax(220px,.73fr)
  }
}

@media(max-width:600px) {
  html,body {
    max-width: 100%;
    overflow-x: clip
  }
  .wrap {
    width: calc(100% - 32px)
  }
  .content {
    padding-top: 70px;
    padding-bottom: 80px
  }
  .hero {
    min-height: max(740px,100svh);
    height: auto
  }
  .hero .topbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 15px 16px 8px;
    background: linear-gradient(#11100fe9,#11100f75,transparent)
  }
  .station {
    font-size: 10px;
    line-height: 1.3
  }
  .station strong {
    font-size: 18px
  }
  .station em {
    margin-top: 2px
  }
  .hero .nav {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: none;
    gap: 5px;
    overflow: visible;
    white-space: normal;
    padding: 0 0 6px
  }
  .hero .nav a,.hero .nav a:nth-child(n) {
    display: inline-flex;
    flex: none;
    min-height: 40px;
    align-items: center;
    padding: 8px 10px;
    font-size: 12px;
    letter-spacing: .02em;
    color: #fff1dc;
    border: 1px solid #e8c29177;
    border-radius: 20px;
    background: #231c19be
  }
  .hero .nav a:focus-visible {
    outline-offset: 1px
  }
  .hero-center {
    justify-content: flex-end;
    align-items: flex-start;
    padding: 38px 18px 114px;
    max-width: 100%;
    text-align: left
  }
  .hero h1 {
    font-size: clamp(49px,13vw,76px);
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.04
  }
  .hero .roman {
    font-size: clamp(24px,7vw,33px);
    margin-top: 6px
  }
  .hero .tagline {
    font-size: 15px;
    line-height: 1.5;
    max-width: 300px;
    margin-bottom: 20px
  }
  .hero .enter {
    max-width: 100%;
    min-height: 66px;
    padding: 8px 14px 8px 8px;
    gap: 11px;
    font-size: 16px;
    line-height: 1.2;
    border-radius: 38px;
    box-shadow: 0 10px 27px #000b
  }
  .hero .enter .play-circle {
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 50%
  }
  .hero .enter small {
    margin-top: 3px;
    font-size: 9px;
    line-height: 1.2;
    letter-spacing: .1em
  }
  .hero-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    margin-top: 22px
  }
  .hero-shortcuts a {
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
    padding: 5px 0;
    color: #fff3e1
  }
  .hero-catalog {
    font-size: 14px;
    margin-top: 18px;
    color: #ffd09d
  }
  .hero-hint {
    font-size: 12px;
    color: #ecddca;
    max-width: 320px;
    margin-top: 9px
  }
  .hero-photo-credit {
    font-size: 9px;
    left: 17px;
    bottom: 17px;
    max-width: 55%;
    letter-spacing: .04em;
    line-height: 1.4
  }
  .hero-bottom {
    right: 15px;
    bottom: 16px
  }
  .hero-bottom a {
    font-size: 9px;
    max-width: 100px
  }
  .hero-grid {
    opacity: .11
  }
  .hero-orbit-word {
    display: none
  }
  .stage-interlude {
    height: 520px;
    min-height: 0;
    margin-block: 30px 75px
  }
  .stage-interlude .stage-scene {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr
  }
  .stage-interlude .stage-scene img {
    grid-column: 1;
    grid-row: 1;
    object-position: center 38%
  }
  .stage-interlude .stage-scene .stage-photo {
    object-position: center 47%
  }
  .stage-interlude .stage-scene .stage-paint {
    opacity: 0
  }
  .stage-interlude .stage-scene:after {
    display: none
  }
  .stage-interlude:after {
    background: linear-gradient(0deg,#070809ee 0%,#070809a0 37%,transparent 75%)
  }
  .stage-interlude .interlude-copy {
    left: 22px;
    right: 22px;
    bottom: 8%
  }
  .stage-interlude .interlude-copy strong {
    font-size: clamp(42px,12vw,63px);
    line-height: 1.01
  }
  .stage-interlude .interlude-copy span {
    font-size: 11px;
    margin-top: 15px
  }
  .legacy-layout {
    grid-template-columns: 1fr
  }
  .memory-art {
    width: min(340px,100%);
    margin: 24px auto 0!important
  }
  .memory-art .memory-scene {
    max-height: 460px
  }
  .memory-art .memory-stamp {
    font-size: 18px
  }
  .dock {
    left: 8px;
    right: 8px;
    bottom: max(8px,env(safe-area-inset-bottom));
    width: auto;
    max-height: calc(100dvh - 18px);
    overflow-y: auto;
    padding: 10px 11px 11px;
    border-radius: 17px
  }
  .dock-head {
    gap: 7px;
    margin-bottom: 5px
  }
  .dock-head .cassette-deck {
    display: block;
    flex: 0 0 70px;
    width: 70px;
    min-width: 70px;
    max-width: 70px
  }
  .dock-head .cassette-deck img {
    width: 70px;
    height: 35px
  }
  .deck-copy #nowTitle {
    font-size: 14px;
    line-height: 1.12
  }
  .dock-head .close {
    padding: 5px 7px;
    min-height: 38px;
    font-size: 10px
  }
  .cassette-showcase {
    display: none
  }
  .cassette-transport {
    gap: 4px;
    margin: 0;
    padding: 4px
  }
  .cassette-transport button,.cassette-transport #cassettePlay {
    min-height: 43px;
    font-size: 11px;
    padding: 4px 2px
  }
  .deck-volume {
    margin: 4px 0 2px;
    font-size: 11px
  }
  .dock-view-toggle {
    margin: 4px 0 5px;
    padding: 2px
  }
  .dock-view-toggle button {
    min-height: 34px;
    font-size: 11px
  }
  .dock .quiet-note {
    font-size: 10px;
    line-height: 1.3;
    margin: 3px 0 5px;
    padding: 5px 7px
  }
  .dock .video {
    height: 204px;
    min-height: 204px
  }
  .dock .video iframe {
    height: 202px;
    min-height: 202px
  }
  .dock-links {
    margin-top: 5px;
    gap: 4px
  }
  .dock-links a {
    font-size: 10px
  }
  .dock.expanded {
    max-height: 100dvh;
    padding: 10px;
    justify-content: flex-start
  }
  .dock.expanded .video {
    height: min(50svh,420px);
    min-height: 204px
  }
  .dock.expanded .video iframe {
    height: 100%;
    min-height: 202px
  }
  .film-rail,.timeline-cues,.place-route,.reading-grid {
    scrollbar-width: thin
  }
  .reading-grid>a {
    min-width: 0
  }
  .read-more,.farewell,.remembrance {
    overflow-wrap: anywhere
  }
}

@media(max-width:600px) and (prefers-reduced-motion:no-preference) {
  .stage-interlude .stage-scene .stage-paint {
    animation: mobileStageFade 13s ease-in-out infinite
  }
  @keyframes mobileStageFade {
    0%,30% {
      opacity: 0
    }
    45%,80% {
      opacity: 1
    }
    100% {
      opacity: 0
    }
  }
}

@media(max-width:360px) {
  .hero .topbar {
    padding-inline: 12px
  }
  .hero-center {
    padding-inline: 14px
  }
  .hero h1 {
    font-size: clamp(45px,12vw,54px)
  }
  .hero .enter {
    font-size: 14px
  }
  .hero-shortcuts a {
    font-size: 12px
  }
  .deck-copy #nowTitle {
    font-size: 12px
  }
  .dock-head .cassette-deck {
    display: none
  }
  .cassette-transport button,.cassette-transport #cassettePlay {
    font-size: 9px
  }
  .dock-links a {
    font-size: 9px
  }
}

@media(prefers-reduced-motion:reduce) {
  .stage-interlude .stage-scene img,.memory-art .memory-scene img,.dock .showcase-reel {
    animation: none!important;
    transform: none!important
  }
  .stage-interlude .stage-scene .stage-paint {
    opacity: 1
  }
  .memory-art .memory-scene .memory-photo {
    transform: rotate(4deg)!important
  }
}
