:root {
  color-scheme: dark;
  --ink: #101010;
  --paper: #f0e8d9;
  --coral: #ff5149;
  --cyan: #7cf1e2;
  --rule: #5b5751;
  --pad: clamp(17px, 3vw, 58px);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: var(--paper);
  background: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, figure, h1, h2, p { margin: 0; }
a { color: inherit; text-underline-offset: .25em; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.sr { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip { position: fixed; z-index: 8; left: 10px; top: 10px; padding: 10px; background: var(--ink); transform: translateY(-170%); }
.skip:focus { transform: none; }
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 58px;
  gap: 16px;
  padding-inline: var(--pad);
  border-bottom: 1px solid var(--rule);
}
.masthead a, .footer a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-size: 14px;
  text-decoration: none;
}
.masthead a:hover, .footer a:hover { text-decoration: underline; }
.brand { font-weight: 900; letter-spacing: .08em; }

.deck {
  --signal: var(--coral);
  position: relative;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.deck:has(#river:checked) { --signal: var(--cyan); }
.selector {
  position: absolute;
  z-index: 5;
  right: var(--pad);
  top: 22px;
  display: flex;
  background: var(--ink);
  border: 1px solid var(--paper);
}
.selector label {
  display: flex;
  align-items: center;
  gap: 17px;
  color: var(--paper);
  cursor: pointer;
  min-height: 48px;
  padding: 7px 13px;
  white-space: nowrap;
  font-size: 14px;
  transition: background-color .21s, color .21s;
}
.selector label + label { border-left: 1px solid var(--paper); }
.selector label:hover { background: #49433e; }
.selector label span:last-child { transition: transform .25s; }
.selector label:hover span:last-child { transform: translate(3px, -3px); }
#train:checked ~ .selector label[for="train"],
#river:checked ~ .selector label[for="river"] { background: var(--signal); color: var(--ink); font-weight: 800; }
#train:focus-visible ~ .selector label[for="train"],
#river:focus-visible ~ .selector label[for="river"] { outline: 2px solid var(--paper); outline-offset: 4px; }

.stage {
  position: relative;
  isolation: isolate;
  height: clamp(610px, 83svh, 1010px);
  overflow: hidden;
  background: var(--ink);
}
.title-block {
  position: absolute;
  z-index: 3;
  inset: 0 auto 0 0;
  width: 47%;
  display: grid;
  align-items: center;
  padding: 0 0 9% var(--pad);
  color: var(--ink);
}
.title-block::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--signal);
  clip-path: polygon(0 0, 100% 0, 73% 73%, 20% 73%, 10% 100%, 0 100%);
  transition: background-color .28s ease;
  animation: plate-in .66s cubic-bezier(.19,.77,.26,1) both;
}
h1 {
  font-size: clamp(95px, 12.65vw, 222px);
  line-height: .88;
  letter-spacing: 0;
  font-weight: 900;
  width: max-content;
  transform: skewX(-7deg);
  transform-origin: left center;
}
h1 span { display: block; padding-bottom: .11em; animation: type-in .66s cubic-bezier(.16,.78,.26,1) .12s both; }
h1 span + span { margin-left: .32em; animation-delay: .23s; }
@keyframes plate-in { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes type-in { from { opacity: 0; transform: translate(-70px, 30px); } to { opacity: 1; transform: none; } }

.scene { position: absolute; inset: 0; display: none; }
#train:checked ~ .stage .scene-train,
#river:checked ~ .stage .scene-river { display: block; }
.main-shot {
  position: absolute;
  top: 0;
  right: 0;
  width: 76%;
  height: 100%;
  object-fit: cover;
  object-position: 57% 50%;
  animation: frame-in .82s cubic-bezier(.19,.76,.23,1) both;
}
.scene-river .main-shot { object-position: 61% 50%; }
.second-shot {
  position: absolute;
  z-index: 4;
  left: 8%;
  bottom: -3%;
  width: 52%;
  height: 31%;
  pointer-events: none;
  background: var(--paper);
  clip-path: polygon(8% 0, 100% 0, 91% 100%, 0 100%);
  animation: strip-in .68s cubic-bezier(.19,.76,.23,1) .16s both;
}
.second-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 29% 69%;
  filter: grayscale(1) contrast(1.26);
  clip-path: polygon(9% 3%, 98% 3%, 90% 97%, 2% 97%);
}
.scene-river .second-shot img { object-position: 38% 64%; }
.scene figcaption {
  position: absolute;
  z-index: 4;
  right: var(--pad);
  bottom: 24px;
  padding: 13px 17px;
  display: grid;
  gap: 4px;
  background: var(--ink);
  border-left: 4px solid var(--signal);
  animation: type-in .52s cubic-bezier(.16,.78,.26,1) .31s both;
  font-size: 14px;
}
.scene figcaption strong { font-size: clamp(20px, 2vw, 32px); }
@keyframes frame-in {
  from { clip-path: polygon(100% 0, 100% 0, 100% 100%, 67% 100%); transform: scale(1.13); }
  to { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transform: none; }
}
@keyframes strip-in { from { transform: translate(-28%, 110%); } to { transform: none; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .stage { view-timeline: --poster block; }
    .main-shot, .second-shot {
      animation-timeline: auto, --poster;
      animation-range: normal, exit 0% exit 100%;
    }
    .main-shot {
      animation-name: frame-in, exit-main;
      animation-duration: .82s, 1ms;
      animation-fill-mode: both, forwards;
      animation-timing-function: cubic-bezier(.19,.76,.23,1), linear;
    }
    .second-shot {
      animation-name: strip-in, exit-strip;
      animation-duration: .68s, 1ms;
      animation-delay: .16s, 0s;
      animation-fill-mode: both, forwards;
      animation-timing-function: cubic-bezier(.19,.76,.23,1), linear;
    }
    @keyframes exit-main { from { translate: 0 0; } to { translate: 0 18%; } }
    @keyframes exit-strip { from { translate: 0 0; } to { translate: 14% -30%; } }
  }
}
@media (max-width: 840px) {
  .title-block { width: 54%; }
  h1 { font-size: clamp(86px, 13vw, 112px); }
}
@media (max-width: 640px) {
  .masthead { min-height: 51px; }
  .stage { height: clamp(570px, 77svh, 730px); }
  .selector { top: 13px; right: var(--pad); }
  .selector label { min-height: 44px; padding-inline: 9px; gap: 9px; }
  .title-block { inset: 0 0 auto 0; width: 100%; height: 45%; align-items: start; padding: 74px 0 0 var(--pad); }
  .title-block::before { clip-path: polygon(0 0, 82% 0, 63% 78%, 0 100%); }
  h1 { font-size: clamp(64px, 18vw, 106px); }
  .main-shot { width: 100%; height: 80%; inset: auto 0 0; object-position: 58% 52%; }
  .scene-river .main-shot { object-position: 64% 55%; }
  .second-shot { left: -5%; bottom: -2%; width: 64%; height: 22%; }
  .scene figcaption { right: var(--pad); bottom: 14px; padding: 9px 11px; font-size: 12px; }
  .scene figcaption strong { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

:root { --nav-clearance: 65px; }
.masthead {
  position: sticky;
  top: 0;
  z-index: 7;
  padding-inline: max(var(--pad), env(safe-area-inset-left)) max(var(--pad), env(safe-area-inset-right));
  background: var(--ink);
}
.skip { z-index: 9; }
.read-progress {
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
.site-nav a { text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--cyan); }
body:has(#stops:target) .site-nav a[href="#stops"],
body:has(#city:target) .site-nav a[href="#city"],
body:has(#metro:target) .site-nav a[href="#metro"],
body:has(#bus:target) .site-nav a[href="#bus"],
body:has(#ride:target) .site-nav a[href="#ride"],
body:has(#walk:target) .site-nav a[href="#walk"],
body:has(#night:target) .site-nav a[href="#night"] {
  color: var(--cyan);
  text-decoration: underline;
}
.scene-bridge {
  display: grid;
  justify-items: end;
  padding: 4px var(--pad);
  min-height: 55px;
  background: var(--ink);
  border-block: 1px solid var(--rule);
}
.scene-bridge a {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}
#train:checked ~ .scene-bridge .bridge-train,
#river:checked ~ .scene-bridge .bridge-river { display: inline-flex; }
.scene-bridge a span { color: var(--signal); }
.scene-bridge a:hover { text-decoration: underline; }

:root { --ui-ease: cubic-bezier(.22,.72,.32,1); }
#main, .story-reel, .story-beat[id] { scroll-margin-top: var(--nav-clearance); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 clamp(13px, 3vw, 43px); }
@supports (backdrop-filter: blur(12px)) {
  .masthead { background: #101010ed; backdrop-filter: blur(12px); }
}
.scene-bridge { align-items: center; min-height: 63px; }
.scene-bridge a { padding-inline: 13px; border: 1px solid #f0e8d962; border-radius: 6px; }
.scene-bridge a:hover { color: var(--cyan); text-decoration: none; }
.selector label:active { transform: scale(.96); transition: transform .1s ease-out; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .read-progress { animation: reading-progress 1ms linear both; animation-timeline: scroll(root block); }
    @keyframes reading-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }
}

.story-reel {
  --story-color: var(--cyan);
  --story-width: min(100%, 540px);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: #11181b;
  border-block-start: 1px solid #8197903d;
}
.story-beat {
  display: grid;
  align-items: center;
  justify-items: start;
  min-height: 58svh;
  padding: clamp(22px, 6vw, 100px) var(--pad);
}
.story-beat:first-child { min-height: 68svh; }
.story-right { justify-items: end; }
.story-ending { min-height: calc(94svh - var(--nav-clearance)); align-items: end; }
.story-caption {
  width: var(--story-width);
  max-width: 100%;
  padding: clamp(15px, 3vw, 29px);
  border-inline-start: 3px solid var(--story-color);
  background: #101618f0;
  box-shadow: 0 12px 42px #03070842;
  color: var(--paper);
}
.story-caption h2, .story-caption h3 { margin: 0; line-height: 1.15; font-weight: 850; }
.story-caption h2 { font-size: clamp(33px, 4.7vw, 67px); }
.story-caption h3 { font-size: clamp(19px, 2.5vw, 33px); }
.story-caption p { margin-top: 10px; line-height: 1.75; color: #e1ded5; text-wrap: pretty; }
.story-caption a { color: var(--story-color); }
.story-caption a:hover { color: var(--paper); }
.stop-list { margin-top: 12px; }
.stop-list details, .story-caption > details { border-top: 1px solid #d4e8e34d; }
.story-caption > details { margin-top: 13px; }
.story-caption summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  line-height: 1.4;
}
.stop-list summary span { display: block; font-size: 13px; color: #b9cbc9; }
.stop-list summary strong { font-size: 17px; }
.story-caption details[open] summary { color: var(--story-color); }
.story-caption details p { margin: 0 0 13px; }
.crossing-choice, .line-control {
  position: relative;
  margin: 12px 0 0;
  border: 0;
  padding: 0;
  min-inline-size: 0;
}
.crossing-choice:has(#cross-bus:checked), #bus .line-control { --story-color: #ffb59e; }
.crossing-switch, .line-switch { display: flex; flex-wrap: wrap; gap: 7px; }
.crossing-switch label, .line-switch label {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  min-height: 44px;
  border: 1px solid #a8c3c57a;
  cursor: pointer;
  touch-action: manipulation;
}
.crossing-switch label:hover, .line-switch label:hover { border-color: var(--story-color); }
#cross-metro:checked ~ .crossing-switch label[for="cross-metro"],
#cross-bus:checked ~ .crossing-switch label[for="cross-bus"],
#metro-1:checked ~ .line-switch label[for="metro-1"],
#metro-2:checked ~ .line-switch label[for="metro-2"],
#bus-12:checked ~ .line-switch label[for="bus-12"],
#bus-lishan:checked ~ .line-switch label[for="bus-lishan"] { background: var(--story-color); color: var(--ink); border-color: var(--story-color); }
#cross-metro:focus-visible ~ .crossing-switch label[for="cross-metro"],
#cross-bus:focus-visible ~ .crossing-switch label[for="cross-bus"],
#metro-1:focus-visible ~ .line-switch label[for="metro-1"],
#metro-2:focus-visible ~ .line-switch label[for="metro-2"],
#bus-12:focus-visible ~ .line-switch label[for="bus-12"],
#bus-lishan:focus-visible ~ .line-switch label[for="bus-lishan"] { outline: 2px solid var(--story-color); outline-offset: 3px; }
.crossing-route, .line-result { display: none; margin-top: 13px; }
#cross-metro:checked ~ .crossing-map .crossing-metro,
#cross-bus:checked ~ .crossing-map .crossing-bus,
#metro-1:checked ~ .line-first, #metro-2:checked ~ .line-second,
#bus-12:checked ~ .line-first, #bus-lishan:checked ~ .line-second { display: block; }
.line-result h3 { font-size: 19px; margin-bottom: 9px; }
.crossing-route ol, .stop-diagram {
  --station-count: 3;
  display: grid;
  position: relative;
  grid-template-columns: repeat(var(--station-count), minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
#metro .stop-diagram { --station-count: 4; }
.crossing-route ol::before, .stop-diagram::before {
  content: "";
  position: absolute;
  inset: 7px calc(50% / var(--station-count)) auto;
  height: 2px;
  background: var(--story-color);
  transform-origin: left;
  animation: story-route .58s var(--ui-ease) both;
}
.crossing-route li, .stop-diagram li {
  position: relative;
  padding: 21px 3px 0;
  text-align: center;
  font-size: clamp(11px, 1.3vw, 15px);
  line-height: 1.35;
}
.crossing-route li::before, .stop-diagram li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: calc(50% - 6px);
  width: 12px;
  height: 12px;
  border: 2px solid var(--story-color);
  border-radius: 50%;
  background: #101618;
  animation: story-station .25s .13s both;
}
.crossing-route li:nth-child(2)::before, .stop-diagram li:nth-child(2)::before { animation-delay: .22s; }
.crossing-route li:nth-child(3)::before, .stop-diagram li:nth-child(3)::before { animation-delay: .34s; }
.stop-diagram li:nth-child(4)::before { animation-delay: .46s; }
.crossing-bus li:nth-child(2)::before, .stop-diagram .via::before { border-radius: 0; rotate: 45deg; }
.stop-diagram small { display: block; margin-top: 4px; font-size: 11px; color: var(--story-color); }
@keyframes story-route { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes story-station { from { scale: 0; } to { scale: 1; } }
.crossing-route a, .story-return, .light-control { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; margin-top: 7px; }
.light-control { border: 1px solid #a8c3c57a; padding: 6px 10px; cursor: pointer; }
.story-return { margin-left: 10px; }
.light-dot { width: 8px; height: 8px; border-radius: 50%; background: #777; }
#night-lights:checked + .light-control .light-dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
#night-lights:focus-visible + .light-control { outline: 2px solid var(--cyan); outline-offset: 3px; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 20px; padding: 8px var(--pad); }
.route-sources { display: flex; gap: 17px; }

@media (max-width: 660px) {
  :root { --nav-clearance: 94px; }
  .masthead { align-items: center; flex-wrap: wrap; padding-top: 4px; gap: 0 14px; }
  .masthead .brand { min-height: 36px; }
  .site-nav { flex: 1 0 100%; justify-content: space-between; column-gap: 4px; }
  .site-nav a { min-height: 44px; font-size: 13px; }
  .site-nav a:focus-visible { outline-offset: 0; }
  .scene-bridge { justify-items: stretch; }
  .scene-bridge a { justify-content: space-between; }
  .story-beat { align-items: end; min-height: 66svh; }
  .story-beat:first-child { min-height: 74svh; }
  .story-beat.story-ending { min-height: calc(94svh - var(--nav-clearance)); }
  .story-caption { --story-width: min(100%, 360px); }
}
@media (max-width: 355px) {
  .selector label { gap: 5px; padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .story-beat, .story-beat:first-child, .story-beat.story-ending { min-height: 0; padding-block: 13px; }
}


.hero { position: relative; z-index: 2; }
.scene-bridge {
  position: absolute;
  z-index: 6;
  bottom: 12px;
  left: var(--pad);
  right: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.scene-bridge a {
  background: #101010eb;
  border-color: #f0e8d978;
}
.journey {
  --join: 0px;
  --light-off: 1;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: #11181b;
}
.journey:has(#night-lights:checked) { --light-off: 0; }
.journey-pages { z-index: 1; min-width: 0; }
.journey-backing { display: none; }
.story-reel {
  display: block;
  border: 0;
  background: linear-gradient(90deg, #0e121888, transparent 85%),
              var(--plate-source) center / cover;
}
.story-station { --plate-source: url("assets/poster-train.webp"); }
.story-river { --plate-source: url("assets/river-crossing.webp"); }
.story-night { --plate-source: url("assets/dusk-bank.webp"); --story-color: #ffb59e; }
.story-reel .story-beat { min-height: 48svh; }
.story-reel .story-beat:first-child { min-height: 54svh; }
.story-reel .story-ending { min-height: 64svh; }
.journey-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 6px;
}
.journey .onward-bus { display: none; }
.journey:has(#cross-bus:checked) .onward-metro { display: none; }
.journey:has(#cross-bus:checked) .onward-bus { display: inline-flex; color: #ffb59e; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero .stage {
      mask-image: linear-gradient(#000 0 78%, #000d 87%, transparent 100%);
    }
    .journey {
      --join: clamp(115px, 18svh, 185px);
      margin-top: calc(-1 * var(--join));
      view-timeline: --journey block;
      timeline-scope: --crossing-view, --ride-view, --night-view;
    }
    .journey-backing, .journey-pages { grid-area: 1 / 1; }
    .journey-backing {
      position: sticky;
      top: calc(var(--nav-clearance) - 7px);
      z-index: -1;
      display: block;
      align-self: start;
      height: calc(100svh - var(--nav-clearance) + 7px);
      overflow: hidden;
      isolation: isolate;
      background: #101010;
    }
    .journey-painting {
      position: absolute;
      inset: 0;
      z-index: 0;
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: var(--plate-position, 53%) center;
      animation: arrival-plate 1ms linear both;
      animation-timeline: --journey;
      animation-range: contain 0% contain 100%;
    }
    .plate-river {
      animation-name: river-plate;
      animation-timeline: --crossing-view;
      animation-range: entry 75% exit 45%;
      --plate-position: 54%;
      filter: brightness(.68) saturate(.63);
    }
    .plate-night {
      animation-name: night-plate;
      animation-timeline: --ride-view;
      animation-range: entry 25% exit 15%;
      --plate-position: 63%;
      object-view-box: inset(17% 0 16% 49%);
      filter: brightness(.65) saturate(.6);
    }
    .journey-backing::after {
      position: absolute;
      inset: 0;
      z-index: 1;
      content: "";
      pointer-events: none;
      background: #071318;
      animation: river-light 1ms linear both;
      animation-timeline: --night-view;
      animation-range: entry 20% entry 90%;
    }
    .journey-pages { padding-top: var(--join); }
    .journey .story-reel { background: none; }
    .journey .story-beat { min-height: 58svh; }
    .journey .story-beat:first-child { min-height: 64svh; }
    .journey .story-ending { min-height: calc(90svh - var(--nav-clearance)); }
    .journey .story-caption {
      animation: flow-caption 1ms linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 85%;
    }
    @keyframes arrival-plate {
      from { transform: scale(1.04); }
      to { transform: scale(1); }
    }
    #crossing { view-timeline: --crossing-view block; }
    .comic-ride { view-timeline: --ride-view block; }
    #night { view-timeline: --night-view block; }
    @keyframes river-plate {
      from {
        clip-path: polygon(0 100%, 100% 117%, 100% 120%, 0 120%);
        transform: translateY(1%) scale(1.06);
      }
      to {
        clip-path: polygon(0 -17%, 100% 0, 100% 120%, 0 120%);
        transform: scale(1);
      }
    }
    @keyframes night-plate {
      from {
        clip-path: polygon(118% 0, 100% 0, 100% 100%, 100% 100%);
        transform: translateY(1%) scale(1.06);
      }
      to {
        clip-path: polygon(0 0, 100% 0, 100% 100%, -18% 100%);
        transform: scale(1.025);
      }
    }
        @keyframes river-light { from { opacity: 0; } to { opacity: calc(var(--light-off) * .65); } }
    @keyframes flow-caption { from { opacity: .56; transform: translateY(22px); } to { opacity: 1; transform: none; } }
  }
}
@media (max-width: 660px) {
  .scene-bridge { bottom: 15px; right: auto; }
  .scene-bridge a { min-height: 44px; }
  .journey .story-beat { align-items: end; min-height: 66svh; }
  .journey .story-ending { min-height: 71svh; }
  .plate-arrival { --plate-position: 58%; }
  .plate-river { --plate-position: 55%; }

}
@media (prefers-reduced-motion: reduce) {
  .journey .story-beat, .journey .story-beat:first-child, .journey .story-ending { min-height: 0; }
  .story-night:has(#night-lights:not(:checked)) { background-blend-mode: multiply; background-color: #26323a; }
}

.reading-guide {
  position: fixed;
  z-index: 8;
  inset: 42% clamp(7px, 1.5vw, 24px) auto auto;
  display: grid;
  gap: 2px;
  justify-items: center;
}
.reading-track {
  position: absolute;
  z-index: -1;
  inset: 14px auto;
  width: 2px;
  background: #f0e8d95c;
  box-shadow: 0 0 0 1px #101010;
}
.reading-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cyan);
  transform-origin: top;
  transform: scaleY(0);
}
.reading-guide a {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 34px;
  text-decoration: none;
}
.reading-guide a::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1px solid var(--paper);
  background: var(--ink);
  rotate: 45deg;
}
.reading-guide a span {
  position: absolute;
  right: 100%;
  padding: 5px 8px;
  background: #101010f5;
  color: var(--paper);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
}
.reading-guide a:hover span, .reading-guide a:focus-visible span { opacity: 1; }
.reading-guide a:hover::before, .reading-guide a:focus-visible::before,
body:has(#stops:target) .reading-guide a[href="#stops"]::before,
body:has(#city:target) .reading-guide a[href="#city"]::before,
body:has(#night:target) .reading-guide a[href="#night"]::before { background: var(--cyan); border-color: var(--cyan); }
.story-beat { padding-inline-end: max(var(--pad), 48px); }
.story-station .story-beat:first-child .story-caption { --story-width: min(100%, 420px); }
.story-station .story-beat:first-child h2 { font-size: clamp(26px, 3vw, 42px); }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .reading-track::after {
      animation: rail-progress 1ms linear both;
      animation-timeline: scroll(root block);
    }
    @keyframes rail-progress { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .plate-arrival {
      transform-origin: 79% 96%;
      object-position: 62% 86%;
      animation-name: cover-track-continuation;
    }
    main:has(#river:checked) .plate-arrival { visibility: hidden; }
    main:has(#river:checked) .journey-backing { background: url("assets/river-window.webp") center 75% / cover no-repeat; }
    @keyframes cover-track-continuation {
      0%, 7% { opacity: 1; transform: translateY(-10%) scale(1.62); }
      26% { opacity: 1; transform: translateY(-16%) scale(1.72); }
      39% { opacity: 1; transform: translateY(-19%) scale(1.73); }
      43%, 100% { opacity: 0; transform: translateY(-19%) scale(1.73); }
    }
  }
}
@media (max-width: 660px) {
  .reading-guide { inset-inline-end: 2px; }
  .reading-guide a { width: 24px; height: 37px; }
  .story-beat { padding-inline-end: 31px; }
}

.rail-world { display: none; }
@supports (animation-timeline: view()) and (timeline-scope: --journey) {
  @media (prefers-reduced-motion: no-preference) {
    main { position: relative; isolation: isolate; timeline-scope: --journey; overflow: clip; }
    main:has(#train:checked) {
      --cover-h: clamp(610px, 83svh, 1010px);
      --cover-available: calc(76vw - 11px);
      --cover-image-h: var(--cover-h);
      --rail-w: max(var(--cover-available), calc(var(--cover-image-h) * 1.5));
      --rail-h: calc(var(--rail-w) * .6666667);
      --rail-right: calc((var(--cover-available) - var(--rail-w)) * .43);
      --rail-top: calc(var(--cover-h) - var(--rail-h));
      --camera-start: clamp(255px, 36svh, 420px);
      --camera-end: max(4300px, 455svh);
      --camera-travel: calc(var(--camera-end) - var(--camera-start));
      --camera-drop: clamp(300px, 51svh, 500px);
      --camera-x: clamp(36px, 6vw, 115px);
      --camera-zoom: 1.3;
      --train-start: 7svh;
      --train-end: 110svh;
      --train-release: 15svh;
    }
    main:has(#train:checked) .rail-world {
      position: absolute;
      display: block;
      inset: 0 0 auto;
      height: calc(var(--rail-top) + var(--rail-w) * 1.5);
      z-index: 0;
      overflow: hidden;
      pointer-events: none;
      mask-image: linear-gradient(90deg, transparent 12%, #000 26%);
      transform-origin: 66% top;
      animation: follow-street linear both;
      animation-timeline: scroll(root block);
      animation-range: var(--camera-start) var(--camera-end);
    }
    .rail-world img {
      position: absolute;
      right: var(--rail-right);
      top: var(--rail-top);
      display: block;
      width: var(--rail-w);
      height: auto;
      max-width: none;
    }
    .rail-original { animation: frame-in .82s cubic-bezier(.19,.76,.23,1) both; }
    .rail-outpaint {
      mask-image: linear-gradient(transparent 40%, #000 44.444%);
    }
    .rail-clean, .rail-train {
      visibility: hidden;
      animation: rail-departure steps(1, jump-start) both;
      animation-timeline: scroll(root block);
      animation-range: var(--train-start) var(--train-end);
      animation-fill-mode: forwards;
    }
    .rail-clean {
      visibility: visible;
      animation: rail-bed-reveal ease-in-out both;
      animation-timeline: scroll(root block);
      animation-range: var(--train-start) var(--train-release);
    }
    @keyframes rail-bed-reveal {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    .rail-train {
      animation-range: var(--train-start) var(--train-end), var(--train-release) var(--train-end);
      clip-path: polygon(10.9% 23.9%, 16.2% 27.1%, 22.3% 30.2%, 30% 33.9%, 40% 40%, 49% 45.5%, 57% 48.7%, 63.3% 52.2%, 66.4% 54.4%, 69% 58.4%, 71.2% 62.2%, 73.8% 68.8%, 75.5% 73.8%, 77.2% 80.3%, 78.25% 84.4%, 77.6% 86%, 75.7% 87%, 72.2% 87.8%, 69.5% 88%, 66.5% 86.3%, 63.1% 83%, 59.4% 78.4%, 54% 71.7%, 48% 64.4%, 41% 55.9%, 33% 47.3%, 26% 40.5%, 19.5% 35%, 13% 29.8%, 11.2% 28.4%, 10.6% 27.6%, 10.3% 26.6%, 10.3% 25.3%, 10.5% 24.4%);
      transform-origin: 72% 86%;
      animation-name: rail-departure, rail-drive;
      animation-timing-function: steps(1, jump-start), linear;
    }
    @keyframes rail-departure {
      from, to { visibility: visible; }
    }
    @keyframes rail-drive {
      from { transform: translate(0, 0) rotate(35deg) scale(1, 1) rotate(-35deg); animation-timing-function: cubic-bezier(.42, 0, .81, .59); }
      to { transform: translate(100%, 105%) rotate(35deg) scale(3, 1.18) rotate(-35deg); }
    }
    main:has(#train:checked) .hero .stage {
      background: transparent;
      mask-image: none;
    }
    main:has(#train:checked) .scene-train .main-shot { visibility: hidden; }
    main:has(#train:checked) .journey, main:has(#train:checked) .journey-backing { background: transparent; }
    main:has(#train:checked) .plate-arrival { display: none; }
    .rail-world::after {
      position: absolute;
      inset: 0;
      content: "";
      background: linear-gradient(105deg, #080f12 7%, #10191ccc 59%, #10191ca6);
      animation: street-shade linear both;
      animation-timeline: scroll(root block);
      animation-range: var(--camera-start) calc(var(--camera-start) + 70svh);
    }
    .rail-landmark {
      position: absolute;
      z-index: 1;
      left: calc(100% - var(--rail-right) - .18 * var(--rail-w));
      top: calc(var(--rail-top) + 1.10 * var(--rail-w));
      translate: -50% -100%;
      display: grid;
      justify-items: center;
      width: max-content;
      color: var(--paper);
      font-size: clamp(11px, 1.2vw, 15px);
      text-shadow: 0 1px 4px #05090a;
      animation: landmark-pass linear both;
      animation-timeline: scroll(root block);
      animation-range: 64svh 165svh;
    }
    .rail-landmark::after {
      content: "";
      width: 8px;
      height: 8px;
      margin-top: 6px;
      border: 2px solid #111618;
      background: var(--cyan);
      rotate: 45deg;
    }
    @keyframes landmark-pass {
      0%, 100% { opacity: 0; }
      24%, 69% { opacity: 1; }
    }
    @keyframes street-shade {
      from { opacity: 0; }
      to { opacity: .48; }
    }
    @keyframes follow-street {
      from { transform: none; }
      23% {
        transform: translate(calc(-1 * var(--camera-x)), calc(.23 * var(--camera-travel) - var(--camera-drop))) scale(var(--camera-zoom));
      }
      to {
        transform: translate(calc(-1 * var(--camera-x)), calc(var(--camera-travel) - var(--camera-drop))) scale(var(--camera-zoom));
      }
    }
  }
}
@media (max-width: 640px) {
  @supports (animation-timeline: view()) and (timeline-scope: --journey) {
    @media (prefers-reduced-motion: no-preference) {
      main:has(#train:checked) {
        --cover-h: clamp(570px, 77svh, 730px);
        --cover-image-h: calc(var(--cover-h) * .8);
        --cover-available: 100vw;
        --rail-right: calc((var(--cover-available) - var(--rail-w)) * .42);
        --camera-start: clamp(160px, 26svh, 220px);
        --camera-drop: 355px;
        --camera-x: 29px;
        --camera-zoom: 1.24;
        --train-end: 120svh;
      }
      main:has(#train:checked) .rail-world { mask-image: none; }
      .rail-world img {
        animation: rail-follow linear both;
        animation-timeline: scroll(root block);
        animation-range: var(--train-start) var(--train-end);
      }
      .rail-world .rail-landmark {
        animation-name: landmark-pass, landmark-follow;
        animation-timing-function: linear;
        animation-fill-mode: both;
        animation-timeline: scroll(root block);
        animation-range: 64svh 165svh, var(--train-start) var(--train-end);
      }
      @keyframes landmark-follow {
        from { translate: -50% -100%; }
        to { translate: calc(-50% - .14 * var(--rail-w)) -100%; }
      }
      .rail-world .rail-original {
        animation: frame-in .82s cubic-bezier(.19,.76,.23,1) both, rail-follow linear both;
        animation-timeline: auto, scroll(root block);
        animation-range: normal, var(--train-start) var(--train-end);
      }
      .rail-world .rail-clean {
        visibility: visible;
        animation-name: rail-follow, rail-bed-reveal;
        animation-timing-function: linear, ease-in-out;
        animation-fill-mode: both;
        animation-range: var(--train-start) var(--train-end), var(--train-start) var(--train-release);
      }
      .rail-world .rail-train {
        animation-name: rail-follow, rail-departure, rail-drive;
        animation-fill-mode: both, forwards, forwards;
        animation-range: var(--train-start) var(--train-end), var(--train-start) var(--train-end), var(--train-release) var(--train-end);
      }
      @keyframes rail-follow {
        from { translate: 0; }
        to { translate: calc(-.14 * var(--rail-w)); }
      }
    }
  }
}

.journey .comic-beat {
  grid-template-columns: minmax(240px, .72fr) minmax(0, 1.4fr);
  gap: clamp(25px, 5vw, 85px);
  align-items: center;
  min-height: 0;
  padding-block: clamp(38px, 7vw, 116px);
}
.comic-arrival .story-caption, .comic-river .story-caption {
  background: #111618;
  box-shadow: none;
}
.journey .comic-arrival {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  min-height: clamp(300px, 53svh, 570px);
}
.comic-arrival .story-caption {
  width: min(100%, 390px);
  background: #111618f5;
}
.comic-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1.64;
  margin: 0;
  padding: clamp(4px, .65vw, 10px);
  background: var(--paper);
  clip-path: polygon(8% 0, 100% 4%, 92% 100%, 0 96%);
}
.comic-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: polygon(8% 0, 100% 4%, 92% 100%, 0 96%);
}
.comic-route {
  aspect-ratio: 1.97;
  clip-path: polygon(0 6%, 94% 0, 100% 94%, 6% 100%);
  align-self: start;
}
.comic-crossing h2 { font-size: clamp(29px, 3.35vw, 52px); }
.comic-route img { clip-path: polygon(0 6%, 94% 0, 100% 94%, 6% 100%); }
.comic-route .comic-bus, .journey:has(#cross-bus:checked) .comic-metro { display: none; }
.journey:has(#cross-bus:checked) .comic-bus { display: block; }
.journey .comic-stops { min-height: 0; padding-block: clamp(18px, 3.5vw, 54px); }
.comic-stops .story-caption { width: min(100%, 410px); }
.journey .comic-stops { justify-items: start; }
.journey .comic-river { align-items: end; min-height: 69svh; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .comic-frame {
      animation: comic-enter linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
      --comic-x: -22%;
      --comic-turn: -4deg;
    }
    .comic-route {
      --comic-x: 16%;
      --comic-turn: 3deg;
    }
    @keyframes comic-enter {
      from { transform: translate(var(--comic-x), 9%) rotate(var(--comic-turn)); }
      to { transform: none; }
    }
  }
}
@media (min-width: 761px) {
  .journey .comic-crossing { grid-template-columns: minmax(0, 1.4fr) minmax(240px, .8fr); }
  .comic-crossing .story-caption { grid-area: 1 / 2; }
  .comic-crossing .comic-route { grid-area: 1 / 1; align-self: end; }
}
@media (max-width: 760px) {
  .journey .comic-beat {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-block: 36px;
  }
  .comic-frame { aspect-ratio: 1.48; }
  .journey .comic-arrival { min-height: 60svh; align-items: start; }
  .comic-route { aspect-ratio: 1.6; }
  .journey .comic-river { min-height: 58svh; }
}
.story-station { overflow: clip; }

.story-river, .story-night { overflow: clip; }
.comic-lines {
  --story-color: var(--cyan);
}
.comic-lines#bus { --story-color: #ffb59e; }
.comic-route-title {
  justify-self: start;
  margin: 0;
  padding: .34em .48em;
  background: var(--paper);
  color: var(--ink);
  font-size: clamp(34px, 5.2vw, 78px);
  font-weight: 900;
  line-height: 1.05;
  box-shadow: 7px 7px 0 var(--story-color);
}
.comic-diagram {
  justify-self: stretch;
  width: 100%;
  padding: clamp(16px, 2.8vw, 40px);
  border: 0;
  border-block-start: 5px solid var(--story-color);
  background: #101719;
  color: var(--paper);
}
.comic-diagram .line-result { margin-top: 24px; }
.comic-diagram .line-result h3 { font-size: clamp(19px, 2.25vw, 32px); }
.comic-diagram p { max-width: 41ch; line-height: 1.65; }
.comic-diagram .journey-link { color: var(--story-color); }
.comic-diagram .stop-diagram { margin-block: 22px; }
.comic-ride .story-caption, .comic-walk .story-caption { background: #101719; }
.comic-bike { aspect-ratio: 2.05; }
.comic-bike img { object-position: 62% 58%; }
.comic-street {
  aspect-ratio: 1.5;
  clip-path: polygon(0 6%, 94% 0, 100% 94%, 6% 100%);
}
.comic-street img { clip-path: polygon(0 6%, 94% 0, 100% 94%, 6% 100%); }
.journey .comic-finale {
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  justify-items: start;
  min-height: 68svh;
  padding: clamp(34px, 6vw, 85px) 0 0;
}
.finale-water {
  grid-area: 1 / 1;
  align-self: start;
  width: 100%;
  height: clamp(350px, 49vw, 720px);
  overflow: clip;
  margin: 0;
  background: #08181d;
}
.finale-water img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 64%;
  transition: filter .55s ease;
}
.comic-finale .story-caption {
  grid-area: 1 / 1;
  z-index: 1;
  margin: clamp(20px, 4vw, 68px);
  background: #101719;
}
.comic-finale:has(#night-lights:not(:checked)) .finale-water img {
  filter: brightness(.36) saturate(.48);
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .comic-diagram, .comic-street {
      animation: comic-enter linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
      --comic-x: -14%;
      --comic-turn: -1deg;
    }
    .comic-reverse .comic-diagram, .comic-street {
      --comic-x: 14%;
      --comic-turn: 2deg;
    }
    .finale-water img {
      animation: finale-pan linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 68%;
    }
    @keyframes finale-pan {
      from { transform: scale(1.15); }
      to { transform: scale(1); }
    }
  }
}
@media (min-width: 761px) {
  .journey .comic-reverse { grid-template-columns: minmax(0, 1.35fr) minmax(240px, .8fr); }
  .comic-reverse > :first-child { grid-area: 1 / 2; }
  .comic-reverse > :nth-child(2) { grid-area: 1 / 1; }
}
@media (max-width: 760px) {
  .comic-diagram .stop-diagram li { overflow-wrap: anywhere; }
  .comic-finale .story-caption {
    width: auto;
    margin: 0 var(--pad) 28px;
    grid-area: 2 / 1;
  }
  .journey .comic-finale { min-height: 0; }
  .finale-water { height: clamp(220px, 65vw, 410px); }
}
@media (prefers-reduced-motion: reduce) {
  .finale-water img { transition: none; }
}
@media (max-width: 760px) {
  .comic-stops .stop-list summary span {
    display: inline;
    margin-inline: .35em .55em;
    font-size: 12px;
  }
  .comic-stops .stop-list summary strong { font-size: 15px; }
}

.journey {
  --comic-accent: #ff514b;
  --comic-paper: #f1e8d7;
  --comic-ink: #111011;
  --story-color: var(--comic-accent);
  background-color: var(--comic-ink);
}
.journey .story-reel, .journey .comic-lines, .journey .line-control,
.journey .crossing-choice, .journey #bus .line-control, .journey .comic-lines#bus {
  --story-color: var(--comic-accent);
}
.journey .story-caption {
  position: relative;
  isolation: isolate;
  border: 0;
  padding: clamp(20px, 2.75vw, 42px) clamp(24px, 3vw, 46px);
  background: none;
  box-shadow: none;
  color: var(--comic-paper);
}
.journey .story-caption::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: var(--comic-ink);
  clip-path: polygon(0 3%, 100% 0, 97.5% 97%, 0 100%);
}
.journey .story-caption h2, .journey .comic-route-title {
  font-weight: 950;
  line-height: 1.04;
  letter-spacing: -.065em;
}
.journey .story-caption h2 { font-size: clamp(34px, 5.1vw, 73px); }
.story-station .comic-arrival .story-caption h2 { font-size: clamp(37px, 5vw, 68px); }
.journey .comic-crossing .story-caption h2 { font-size: clamp(30px, 3.5vw, 53px); }
.journey .story-caption p { max-width: 35ch; color: var(--comic-paper); margin-block: 12px; }
.journey .comic-arrival .story-caption { width: min(100%, 465px); }
.journey .comic-arrival .story-caption::before,
.journey .comic-river .story-caption::before {
  background: var(--comic-accent);
  clip-path: polygon(0 2%, 100% 0, 92% 97%, 0 100%);
}
.journey .comic-arrival .story-caption,
.journey .comic-river .story-caption { color: var(--comic-ink); }
.journey .comic-arrival p, .journey .comic-river p,
.journey .comic-river .journey-link { color: var(--comic-ink); }
.journey .comic-river .journey-link:hover { color: var(--comic-ink); text-decoration-thickness: 2px; }
.journey .story-caption a,
.journey .comic-diagram a {
  text-underline-offset: .29em;
  font-weight: 700;
}
.journey:has(#cross-bus:checked) .comic-river .onward-bus { color: var(--comic-ink); }
.journey .comic-frame {
  background: var(--comic-paper);
  padding: clamp(4px, .62vw, 9px);
}
.journey .comic-frame img {
  filter: grayscale(1) sepia(.12) contrast(1.18) brightness(.94);
}
.journey .comic-route img { object-position: 50% 57%; }
.journey .comic-bike img { object-position: 71% 60%; }
.journey .comic-street img { object-position: 47% 51%; }
.journey .comic-route-title {
  background: var(--comic-accent);
  color: var(--comic-ink);
  box-shadow: none;
  padding: .34em .65em .40em .44em;
  clip-path: polygon(0 4%, 100% 0, 94% 96%, 0 100%);
}
.journey .comic-diagram {
  background: var(--comic-paper);
  border: 0;
  border-block-end: 5px solid var(--comic-ink);
  color: var(--comic-ink);
}
.journey .comic-diagram .journey-link { color: var(--comic-ink); }
.journey .comic-diagram .stop-diagram li::before { background: var(--comic-paper); }
.journey .comic-diagram .stop-diagram small { color: #9b2522; }
.journey .crossing-switch, .journey .line-switch {
  gap: 0 16px;
  border-block-end: 1px solid currentColor;
  padding-bottom: 5px;
}
.journey :is(.crossing-switch, .line-switch) label {
  position: relative;
  isolation: isolate;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 6px 16px 8px;
  font-weight: 760;
}
.journey :is(.crossing-switch, .line-switch) label::before {
  position: absolute;
  inset: 4px 0;
  z-index: -1;
  content: "";
  background: var(--comic-accent);
  clip-path: polygon(4% 4%, 100% 0, 95% 99%, 0 93%);
  opacity: 0;
}
.journey input:checked ~ :is(.crossing-switch, .line-switch) label:hover { text-decoration: underline; text-underline-offset: 5px; }
.journey :is(#cross-metro:checked ~ .crossing-switch [for="cross-metro"],
             #cross-bus:checked ~ .crossing-switch [for="cross-bus"],
             #metro-1:checked ~ .line-switch [for="metro-1"],
             #metro-2:checked ~ .line-switch [for="metro-2"],
             #bus-12:checked ~ .line-switch [for="bus-12"],
             #bus-lishan:checked ~ .line-switch [for="bus-lishan"]) {
  color: var(--comic-ink);
  background: transparent;
}
.journey :is(#cross-metro:checked ~ .crossing-switch [for="cross-metro"],
             #cross-bus:checked ~ .crossing-switch [for="cross-bus"],
             #metro-1:checked ~ .line-switch [for="metro-1"],
             #metro-2:checked ~ .line-switch [for="metro-2"],
             #bus-12:checked ~ .line-switch [for="bus-12"],
             #bus-lishan:checked ~ .line-switch [for="bus-lishan"])::before { opacity: 1; }
.journey .stop-list summary span { color: #c8c2b7; }
.journey .stop-list details, .journey .story-caption > details { border-color: #f1e8d756; }
.journey .light-control {
  border: 0;
  border-bottom: 2px solid currentColor;
  padding-inline: 0;
  font-weight: 760;
}
.journey #night-lights:checked + .light-control .light-dot {
  background: var(--comic-accent);
  box-shadow: none;
}
.finale-water img { filter: none; }
.comic-finale:has(#night-lights:not(:checked)) .finale-water img {
  filter: grayscale(1) brightness(.37);
}
@supports (animation-timeline: view()) {
  .journey .plate-night { filter: brightness(.78); }
  .journey .plate-river {
    filter: brightness(.86);
  }
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    main:has(#train:checked) .rail-world { animation-name: follow-street, ink-street; }
    @keyframes ink-street {
      from { filter: none; }
      27%, to { filter: grayscale(.93) contrast(1.08); }
    }
  }
}
@media (max-width: 760px) {
  .journey .story-caption { padding: 20px 24px 25px 19px; }
  .journey .story-caption h2 { font-size: clamp(34px, 9.8vw, 57px); }
  .journey .comic-crossing .story-caption h2 { font-size: clamp(30px, 8.8vw, 48px); }
  .journey .comic-frame { padding: 4px; }
  .journey .comic-finale .story-caption { margin-inline: var(--pad); }
}

@media (prefers-reduced-motion: reduce) {
  .journey .story-reel {
    background-color: #69635a;
    background-blend-mode: multiply, luminosity;
  }
  .journey .story-night:has(#night-lights:not(:checked)) { background-color: #39332f; }
}

.journey .route-spread {
  min-height: 0;
  justify-items: start;
  padding-block: clamp(30px, 5vw, 82px);
}
.journey .route-spread:nth-of-type(even) { justify-items: end; }
.route-spread-sheet {
  width: min(100%, 1090px);
  padding: clamp(22px, 4.5vw, 62px);
  border-block: 4px solid var(--comic-ink);
  background: var(--comic-paper);
  color: var(--comic-ink);
}
.route-spread-sheet header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px clamp(20px, 4vw, 65px);
  align-items: end;
}
.route-spread-sheet h2 {
  margin: 0;
  font-size: clamp(31px, 4.45vw, 62px);
  text-wrap: balance;
  font-weight: 950;
  line-height: 1.03;
  letter-spacing: -.06em;
}
.route-spread-sheet header p, .route-spread-notes p {
  max-width: 38ch;
  margin: 0;
  font-size: clamp(14px, 1.25vw, 18px);
  line-height: 1.68;
}
.route-spread-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: clamp(24px, 4vw, 45px) 0 12px;
  padding: 0;
  list-style: none;
}
.route-spread-notes li {
  position: relative;
  padding-top: 16px;
  border-top: 2px solid var(--comic-ink);
}
.route-spread-notes li::before {
  position: absolute;
  top: -6px;
  left: 0;
  width: 9px;
  height: 9px;
  background: var(--comic-accent);
  border: 1px solid var(--comic-ink);
  rotate: 45deg;
  content: "";
}
.route-spread-notes h3 {
  margin: 0 0 7px;
  font-size: clamp(18px, 2.15vw, 28px);
  line-height: 1.16;
}
.route-spread-sheet .journey-link,
.journey:has(#cross-bus:checked) .route-spread-sheet .onward-bus {
  color: var(--comic-ink);
  font-weight: 750;
  text-underline-offset: .25em;
}
.route-spread-sheet .journey-link span { color: #a62721; }
@media (max-width: 660px) {
  .route-spread-sheet header, .route-spread-notes { grid-template-columns: minmax(0, 1fr); }
  .route-spread-notes { gap: 20px; }
  .route-spread-notes li { padding-top: 10px; }
}

.journey .chapter-notes {
  min-height: 0;
  padding-block: clamp(32px, 6vw, 96px);
}
.ink-folio {
  --folio-bg: var(--comic-paper);
  --folio-fg: var(--comic-ink);
  --folio-mark: #962d28;
  width: min(100%, 1040px);
  padding: clamp(22px, 4.6vw, 62px);
  border-block-start: 5px solid var(--comic-accent);
  background: var(--folio-bg);
  color: var(--folio-fg);
}
.ink-folio-dark {
  --folio-bg: var(--comic-ink);
  --folio-fg: var(--comic-paper);
  --folio-mark: var(--comic-accent);
}
#river-tunnel, #river-views { justify-items: end; }
.ink-folio h2 {
  margin: 0;
  font-size: clamp(34px, 5.5vw, 75px);
  line-height: 1.06;
  font-weight: 950;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.ink-folio p, .ink-folio dd, .ink-folio details li {
  max-width: 60ch;
  line-height: 1.7;
}
.ink-folio > p { margin: 16px 0 26px; }
.ink-folio a {
  color: inherit;
  text-underline-offset: .25em;
  font-weight: 750;
}
.ink-folio a span { color: var(--folio-mark); }
.ink-folio details { border-block-start: 1px solid currentColor; }
.ink-folio details:last-of-type { border-block-end: 1px solid currentColor; }
.ink-folio summary {
  min-height: 44px;
  padding-block: 12px;
  cursor: pointer;
  font-weight: 800;
}
.ink-folio details[open] summary { color: var(--folio-mark); }
.ink-folio details p, .ink-folio details ol { margin: 0 0 16px; }
.ink-folds a { display: inline-block; margin-bottom: 16px; }
.ink-stations, .river-cross-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  margin: 28px 0;
  list-style: none;
}
.ink-stations li, .river-cross-section li {
  position: relative;
  padding: 15px 12px 10px 0;
  border-block-start: 2px solid var(--folio-mark);
}
.ink-stations li::before {
  position: absolute;
  inset: -6px auto auto 1px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--folio-mark);
  background: var(--folio-bg);
  content: "";
  rotate: 45deg;
}
.ink-stations strong, .river-cross-section strong { display: block; font-size: clamp(16px, 2.25vw, 26px); }
.ink-stations span, .river-cross-section span { display: block; margin-top: 4px; font-size: clamp(12px, 1.4vw, 16px); }
.river-cross-section { grid-template-columns: repeat(5, minmax(0, 1fr)); text-align: center; }
.river-cross-section li { padding-inline: 4px; border-color: currentColor; }
.river-cross-section .river-water {
  margin-top: 18px;
  padding-bottom: 22px;
  border: 0;
  background: var(--comic-ink);
  color: var(--comic-paper);
  clip-path: polygon(0 8%, 100% 0, 100% 93%, 0 100%);
}
.view-readings { margin: 26px 0 10px; }
.view-readings div {
  display: grid;
  grid-template-columns: minmax(4.3em, .3fr) minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-block-start: 1px solid currentColor;
}
.view-readings dt {
  color: var(--folio-mark);
  font-weight: 900;
  font-size: clamp(21px, 3.25vw, 44px);
  letter-spacing: -.05em;
}
.view-readings dd { align-self: center; margin: 0; }
.route-sources { display: flex; flex-wrap: wrap; gap: 0 14px; }
@media (max-width: 660px) {
  .ink-folio { padding: 22px 17px; }
  .ink-stations { grid-template-columns: minmax(0, 1fr); }
  .ink-stations li { padding-block: 10px; }
  .river-cross-section strong { font-size: 13px; word-break: normal; }
  .river-cross-section span { font-size: 11px; }
  .view-readings div { gap: 8px; }
}

.journey .comic-route .comic-metro { filter: none; object-position: 52% 42%; }

.journey .comic-route .comic-bus { filter: none; object-position: 50% 56%; }

.journey .comic-bike img { filter: none; object-position: 58% 76%; }

.journey .comic-street img { filter: none; object-position: 67% 81%; }

.journey .shelter-frame {
  overflow: hidden;
  background: var(--comic-ink);
}
.journey .shelter-frame img {
  filter: none;
  object-position: 68% 80%;
  transform-origin: 72% 80%;
  clip-path: none;
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .journey .shelter-frame {
      view-timeline-name: --shelter-view;
      --comic-x: -12%;
      --comic-turn: -1deg;
    }
    .shelter-frame img {
      animation: shelter-approach linear both;
      animation-timeline: --shelter-view;
      animation-range: entry 0% cover 68%;
    }
    @keyframes shelter-approach {
      from { transform: scale(1); }
      to { transform: scale(1.24); }
    }
  }
}
@media (max-width: 760px) {
  .comic-stops .shelter-frame { grid-row: 1; }
  .comic-stops .story-caption { grid-row: 2; }
}
