:root {
  --ink: #071426;
  --ink-2: #102b45;
  --paper: #f1eadb;
  --paper-dim: rgba(241, 234, 219, .68);
  --cyan: #76e8dc;
  --dawn: #ff9b7c;
  --gold: #f6d6a8;
  --line: rgba(241, 234, 219, .25);
  --px: 0;
  --py: 0;
  --safe-top: max(24px, env(safe-area-inset-top));
  --safe-right: max(24px, env(safe-area-inset-right));
  --safe-bottom: max(22px, env(safe-area-inset-bottom));
  --safe-left: max(24px, env(safe-area-inset-left));
}

* { box-sizing: border-box; }

html, body { width: 100%; height: 100%; }

html { background: var(--ink); color-scheme: dark; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

button, a { font: inherit; }
button { color: inherit; }

button:focus-visible, a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 5px;
}

h1:focus, h2:focus, h3:focus { outline: none; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-150%);
  transition: transform .2s;
}

.skip-link:focus { transform: translateY(0); }

.eyebrow {
  margin: 0;
  font-size: 10px;
  letter-spacing: .34em;
  text-transform: uppercase;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--ink);
  transition: opacity .8s cubic-bezier(.16, 1, .3, 1), visibility .8s;
}

.loader.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }

.loader__image,
.loader__shade,
.loader__grain {
  position: absolute;
  inset: 0;
}

.loader__image {
  background: url("assets/scene-01-awakening.webp") center / cover no-repeat;
  transform: scale(1.08);
  filter: saturate(.75) contrast(1.06);
  animation: loader-breathe 9s ease-in-out infinite alternate;
}

.loader__shade {
  background:
    linear-gradient(90deg, rgba(3, 10, 20, .92) 0%, rgba(3, 10, 20, .68) 46%, rgba(3, 10, 20, .18) 76%),
    linear-gradient(0deg, rgba(3, 10, 20, .58), transparent 55%);
}

.loader__grain,
.grain {
  opacity: .16;
  pointer-events: none;
  background-image:
    repeating-radial-gradient(circle at 17% 32%, rgba(255,255,255,.34) 0 1px, transparent 1px 4px),
    repeating-radial-gradient(circle at 73% 64%, rgba(0,0,0,.38) 0 1px, transparent 1px 5px);
  background-size: 7px 7px, 9px 9px;
  mix-blend-mode: soft-light;
}

.loader__topline {
  position: absolute;
  top: var(--safe-top);
  left: var(--safe-left);
  right: var(--safe-right);
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: .28em;
  color: rgba(241, 234, 219, .68);
}

.loader__content {
  position: relative;
  width: min(620px, calc(100vw - 48px));
  justify-self: start;
  margin-left: clamp(24px, 8vw, 140px);
}

.loader__content h1 {
  margin: 18px 0 20px;
  font-family: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  font-size: clamp(58px, 8.4vw, 136px);
  font-weight: 400;
  line-height: .88;
  letter-spacing: -.08em;
}

.loader__content h1 span { display: block; }
.loader__content h1 span:last-child { margin-left: .78em; color: var(--cyan); }

.loader__intro {
  margin: 0 0 42px;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 2;
  letter-spacing: .1em;
  color: rgba(241, 234, 219, .8);
}

.loader__status {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 10px;
  letter-spacing: .18em;
  color: rgba(241, 234, 219, .62);
}

.loader__status span:last-child {
  font-family: Georgia, serif;
  font-size: 24px;
  letter-spacing: .04em;
  color: var(--paper);
}

.loader__bar { height: 1px; background: rgba(241,234,219,.18); overflow: hidden; }
.loader__bar i { display: block; width: 0; height: 100%; background: var(--cyan); transition: width .35s ease; }

.loader__actions { display: flex; align-items: center; gap: 12px; margin-top: 28px; }

.primary-button,
.quiet-button {
  border: 0;
  cursor: none;
  transition: transform .25s ease, background .25s, color .25s, opacity .25s;
}

.primary-button {
  min-width: 188px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 15px 18px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: .14em;
}

.primary-button:disabled { opacity: .36; }
.primary-button:not(:disabled):hover { transform: translateY(-2px); background: var(--cyan); }

.quiet-button {
  padding: 14px 16px;
  background: transparent;
  border: 1px solid rgba(241,234,219,.32);
  font-size: 11px;
  letter-spacing: .08em;
}

.quiet-button:hover, .quiet-button[aria-pressed="true"] { border-color: var(--cyan); color: var(--cyan); }
.sound-glyph { display: inline-block; margin-right: 6px; }

.loader__note { margin: 18px 0 0; font-size: 9px; letter-spacing: .15em; color: rgba(241,234,219,.45); }

.loader__edition {
  position: absolute;
  right: var(--safe-right);
  bottom: var(--safe-bottom);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: Georgia, serif;
  font-size: 11px;
}

.loader__edition i { width: 54px; height: 1px; background: rgba(241,234,219,.4); }

@keyframes loader-breathe {
  from { transform: scale(1.08) translate3d(-.5%, 0, 0); }
  to { transform: scale(1.13) translate3d(.8%, -.5%, 0); }
}

.story {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}

#fxCanvas,
.scene-stack,
.scene,
.scene img,
.scene__veil,
.scene__depth,
.grain,
.vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#fxCanvas { z-index: 4; pointer-events: none; }
.scene-stack { z-index: 1; }

.scene {
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.025);
  transition: opacity 1s ease, transform 1.6s cubic-bezier(.16,1,.3,1), visibility 1s;
}

.scene.is-active { opacity: 1; visibility: visible; transform: scale(1); }

.scene img {
  object-fit: cover;
  transform: scale(1.065) translate3d(calc(var(--px) * -13px), calc(var(--py) * -9px), 0);
  filter: saturate(.96) contrast(1.02);
  transition: transform 1.5s cubic-bezier(.16,1,.3,1), filter 1s;
  will-change: transform;
}

.scene__veil--left {
  background:
    linear-gradient(90deg, rgba(3,9,18,.82) 0%, rgba(3,9,18,.52) 30%, transparent 60%),
    linear-gradient(0deg, rgba(3,9,18,.5), transparent 42%);
}

.scene__veil--outro {
  background: linear-gradient(90deg, rgba(247,215,179,.9), rgba(249,222,188,.72) 42%, rgba(255,232,202,.15));
  mix-blend-mode: screen;
}

.scene__depth {
  background: radial-gradient(circle at calc(50% + var(--px) * 5%), calc(50% + var(--py) * 4%), transparent 15%, rgba(3,9,18,.12) 62%, rgba(3,9,18,.38) 100%);
}

.grain { z-index: 16; }
.vignette { z-index: 15; pointer-events: none; box-shadow: inset 0 0 150px rgba(1,5,12,.38); }

.hud {
  position: fixed;
  z-index: 20;
  top: var(--safe-top);
  left: var(--safe-left);
  right: var(--safe-right);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(-14px);
  pointer-events: none;
  transition: opacity .6s, transform .6s;
}

.hud.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

.hud__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--paper);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: .18em;
}

.hud__brand i { width: 28px; height: 1px; background: currentColor; opacity: .55; }
.hud__actions { display: flex; align-items: center; gap: 8px; }

.hud-button {
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid rgba(241,234,219,.26);
  background: rgba(5,14,27,.24);
  color: var(--paper);
  backdrop-filter: blur(10px);
  cursor: none;
  font-size: 9px;
  letter-spacing: .12em;
  transition: background .25s, border-color .25s, color .25s;
}

.hud-button:hover, .hud-button[aria-pressed="true"] { border-color: var(--cyan); color: var(--cyan); background: rgba(5,14,27,.55); }
.hud-button--sound { display: flex; align-items: center; gap: 8px; }

.sound-bars { display: flex; align-items: center; gap: 2px; height: 10px; }
.sound-bars i { width: 1px; height: 4px; background: currentColor; }
.sound-bars i:nth-child(2) { height: 9px; }
.sound-bars i:nth-child(3) { height: 6px; }
.hud-button[aria-pressed="true"] .sound-bars i { animation: sound-bar .8s ease-in-out infinite alternate; }
.hud-button[aria-pressed="true"] .sound-bars i:nth-child(2) { animation-delay: -.35s; }
.hud-button[aria-pressed="true"] .sound-bars i:nth-child(3) { animation-delay: -.6s; }

@keyframes sound-bar { to { transform: scaleY(.35); } }

.chapter-nav {
  position: fixed;
  z-index: 20;
  right: var(--safe-right);
  top: 50%;
  transform: translateY(-50%);
}

.chapter-nav ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 15px; }
.chapter-nav button {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 10px;
  width: 72px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  cursor: none;
}

.chapter-nav button i {
  width: 15px;
  height: 1px;
  background: currentColor;
  opacity: .45;
  transition: width .3s, opacity .3s, background .3s;
}

.chapter-nav button span { opacity: 0; transform: translateX(5px); font-size: 9px; letter-spacing: .15em; transition: opacity .25s, transform .25s; }
.chapter-nav button:hover span, .chapter-nav button[aria-current="step"] span { opacity: .8; transform: translateX(0); }
.chapter-nav button[aria-current="step"] { color: var(--cyan); }
.chapter-nav button[aria-current="step"] i { width: 28px; opacity: 1; }

.chapter {
  position: absolute;
  inset: 0;
  z-index: 8;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .75s ease, visibility .75s;
}

.chapter.is-active { opacity: 1; visibility: visible; pointer-events: auto; }

.chapter__copy {
  position: absolute;
  width: min(390px, calc(100vw - 64px));
  z-index: 3;
  color: var(--paper);
  text-shadow: 0 2px 28px rgba(0,0,0,.48);
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .9s .35s ease, transform .9s .35s cubic-bezier(.16,1,.3,1);
}

.chapter.is-active .chapter__copy { opacity: 1; transform: translateY(0); }
.chapter__copy--top-left { top: clamp(110px, 17vh, 180px); left: clamp(26px, 8vw, 140px); }

.chapter__meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 17px;
  font-size: 8px;
  letter-spacing: .3em;
  color: var(--cyan);
}

.chapter__meta::after { content: ""; width: 42px; height: 1px; background: currentColor; opacity: .55; }

.chapter__copy h2 {
  margin: 0 0 18px;
  font-family: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  font-size: clamp(62px, 7.2vw, 112px);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.08em;
}

.chapter__copy p {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(13px, 1.12vw, 17px);
  line-height: 2;
  letter-spacing: .12em;
  color: rgba(241,234,219,.8);
}

.chapter__copy--dark { color: #17253a; text-shadow: 0 1px 20px rgba(255,238,207,.4); }
.chapter__copy--dark .chapter__meta { color: #2b776f; }
.chapter__copy--dark p { color: rgba(23,37,58,.8); }

.interaction {
  position: absolute;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.interaction__label {
  margin: 0;
  font-size: 10px;
  letter-spacing: .15em;
  color: rgba(241,234,219,.72);
  text-shadow: 0 1px 16px rgba(0,0,0,.7);
}

.interaction__label span { color: var(--cyan); margin-right: 7px; }
.interaction__label--dark { color: rgba(23,37,58,.78); text-shadow: none; }
.interaction__label--dark span { color: #2b776f; }

.interaction__progress { width: 118px; height: 1px; background: rgba(241,234,219,.2); overflow: hidden; }
.interaction__progress i { display: block; width: 0; height: 100%; background: var(--cyan); box-shadow: 0 0 9px var(--cyan); transition: width .08s linear; }
.interaction__progress--dark { background: rgba(23,37,58,.18); }
.interaction__progress--dark i { background: #2b776f; box-shadow: 0 0 9px rgba(43,119,111,.45); }

.interaction--seed { left: 50%; bottom: clamp(72px, 12vh, 120px); transform: translateX(-50%); }

.hold-orb,
.sun-hold {
  position: relative;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: none;
  touch-action: none;
}

.hold-orb__core {
  width: 15px;
  height: 23px;
  border-radius: 60% 40% 60% 40%;
  transform: rotate(45deg);
  background: #d9fffa;
  box-shadow: 0 0 15px 5px rgba(118,232,220,.7), 0 0 40px 14px rgba(118,232,220,.35);
}

.hold-orb__halo,
.hold-orb__ring {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(118,232,220,.52);
  border-radius: 50%;
  animation: halo 2.4s ease-out infinite;
}

.hold-orb__ring { inset: 0; animation-delay: -1.2s; }
.hold-orb.is-holding .hold-orb__core { animation: core-pulse .55s ease-in-out infinite alternate; }

@keyframes halo { from { transform: scale(.52); opacity: .9; } to { transform: scale(1.16); opacity: 0; } }
@keyframes core-pulse { to { transform: rotate(45deg) scale(1.45); filter: brightness(1.4); } }

.trail-area {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  background: transparent;
  cursor: none;
  touch-action: none;
}

.wander-light {
  position: absolute;
  left: 50%;
  top: 57%;
  width: 18px;
  height: 18px;
  margin: -9px;
  border-radius: 50%;
  background: #e6fffb;
  box-shadow: 0 0 15px 7px rgba(118,232,220,.8), 0 0 54px 24px rgba(118,232,220,.3);
  transform: translate3d(0,0,0);
  transition: transform .22s ease-out;
}

.trail-area.is-dragging .wander-light { transition: none; transform: scale(1.2); }
.interaction--trail { left: 50%; bottom: var(--safe-bottom); transform: translateX(-50%); }

.city-hotspots { position: absolute; inset: 0; z-index: 4; pointer-events: none; }

.hotspot {
  position: absolute;
  width: 58px;
  height: 58px;
  margin: -29px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
  cursor: none;
  touch-action: manipulation;
}

.hotspot--a { left: 37%; top: 47%; }
.hotspot--b { left: 61%; top: 58%; }
.hotspot--c { left: 82%; top: 34%; }

.hotspot i {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(246,214,168,.72);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(246,214,168,.3);
  animation: hotspot 2s ease-out infinite;
}

.hotspot span {
  position: absolute;
  left: calc(100% - 4px);
  top: 50%;
  transform: translateY(-50%);
  font-family: Georgia, serif;
  font-size: 9px;
  color: rgba(246,214,168,.75);
}

.hotspot.is-lit i { background: #ffe1a7; box-shadow: 0 0 16px 7px rgba(255,181,106,.58), 0 0 65px 30px rgba(255,181,106,.3); animation: none; }
.hotspot.is-lit span { color: #ffe1a7; }

@keyframes hotspot { to { transform: scale(1.7); opacity: 0; box-shadow: 0 0 0 15px rgba(246,214,168,0); } }

.interaction--city { left: 50%; bottom: var(--safe-bottom); transform: translateX(-50%); }
.city-count { display: flex; align-items: baseline; gap: 3px; color: var(--cyan); font-family: Georgia, serif; }
.city-count b { font-size: 28px; font-weight: 400; }
.city-count span { font-size: 11px; opacity: .7; }

.interaction--sun { left: 71.5%; top: 53%; transform: translate(-50%, -50%); }
.sun-hold { width: 112px; height: 112px; }
.sun-hold__core {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff6de;
  box-shadow: 0 0 25px 10px rgba(255,224,165,.55), 0 0 80px 34px rgba(255,155,124,.38);
}
.sun-hold__pulse { position: absolute; inset: 10px; border: 1px solid rgba(43,119,111,.45); border-radius: 50%; animation: halo 2.8s ease-out infinite; }
.sun-hold.is-holding .sun-hold__core { animation: sun-pulse .6s ease-in-out infinite alternate; }
@keyframes sun-pulse { to { transform: scale(1.25); filter: brightness(1.18); } }

.skip-interaction {
  position: absolute;
  z-index: 8;
  left: var(--safe-left);
  bottom: var(--safe-bottom);
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid rgba(241,234,219,.28);
  background: transparent;
  color: rgba(241,234,219,.52);
  font-size: 9px;
  letter-spacing: .13em;
  cursor: none;
}
.skip-interaction:hover { color: var(--cyan); border-color: var(--cyan); }
.skip-interaction--dark { color: rgba(23,37,58,.6); border-color: rgba(23,37,58,.25); }

.chapter.is-complete .interaction__label { opacity: .65; }
.chapter.is-complete .skip-interaction { opacity: 0; pointer-events: none; }

.story-controls {
  position: fixed;
  z-index: 20;
  left: var(--safe-left);
  right: var(--safe-right);
  bottom: var(--safe-bottom);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s;
}
.story-controls.is-visible { opacity: 1; }
.story-controls > * { pointer-events: auto; }

.gesture-hint { display: flex; align-items: center; gap: 9px; color: rgba(241,234,219,.55); font-size: 8px; letter-spacing: .15em; }
.mouse-icon { width: 14px; height: 21px; border: 1px solid currentColor; border-radius: 8px; display: grid; justify-items: center; }
.mouse-icon i { width: 1px; height: 5px; margin-top: 4px; background: currentColor; animation: mouse-wheel 1.6s ease-in-out infinite; }
@keyframes mouse-wheel { 50% { transform: translateY(5px); opacity: .25; } }

.next-button {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 14px;
  border: 1px solid rgba(241,234,219,.3);
  background: rgba(5,14,27,.22);
  backdrop-filter: blur(12px);
  color: var(--paper);
  font-size: 9px;
  letter-spacing: .12em;
  cursor: none;
  transition: opacity .3s, border-color .3s, color .3s;
}
.next-button:disabled { opacity: .45; }
.next-button:not(:disabled):hover { border-color: var(--cyan); color: var(--cyan); }
.next-button i { font-style: normal; font-size: 15px; }

.chapter-index { justify-self: end; display: flex; align-items: center; gap: 9px; font-family: Georgia, serif; font-size: 10px; }
.chapter-index b { font-weight: 400; color: var(--cyan); }
.chapter-index i { width: 34px; height: 1px; background: rgba(241,234,219,.4); }

.chapter--outro { display: grid; align-items: center; }
.outro-card {
  width: min(620px, calc(100vw - 48px));
  margin-left: clamp(24px, 8vw, 140px);
  color: #18273a;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s .25s, transform 1.1s .25s cubic-bezier(.16,1,.3,1);
}
.chapter--outro.is-active .outro-card { opacity: 1; transform: translateY(0); }
.outro-card .eyebrow { color: #2b776f; }
.outro-card h2 {
  margin: 18px 0 22px;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(38px, 5.7vw, 86px);
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: -.05em;
}
.outro-card h2 em { color: #a75046; font-style: normal; }
.outro-card > p { font-family: "Songti SC", "STSong", serif; font-size: 15px; line-height: 1.9; letter-spacing: .12em; }

.signature { display: flex; align-items: center; gap: 12px; margin: 32px 0 26px; }
.signature span { font-size: 8px; letter-spacing: .2em; opacity: .62; }
.signature strong { font-family: "Songti SC", "STSong", serif; font-size: 26px; font-weight: 400; }
.signature i { width: 45px; height: 1px; background: currentColor; opacity: .35; }
.signature b { font-family: Georgia, serif; font-size: 13px; font-weight: 400; letter-spacing: .15em; }
.primary-button--dark { border: 1px solid #18273a; background: #18273a; color: var(--paper); }
.primary-button--dark:hover { background: #a75046; border-color: #a75046; }

.transition-mask {
  position: fixed;
  inset: -10%;
  z-index: 40;
  pointer-events: none;
  transform: translate3d(-115%,0,0) rotate(-3deg);
  background: var(--ink);
  transition: transform .64s cubic-bezier(.76,0,.24,1);
}
.transition-mask i { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0 67%, rgba(118,232,220,.32) 78%, transparent 88%); }
.transition-mask.is-covering { transform: translate3d(0,0,0) rotate(0); }
.transition-mask.is-revealing { transform: translate3d(115%,0,0) rotate(3deg); }

.cursor {
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
  margin: -21px;
  border: 1px solid rgba(241,234,219,.72);
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: width .25s, height .25s, margin .25s, opacity .2s, background .25s;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-active { width: 70px; height: 70px; margin: -35px; background: rgba(255,255,255,.13); }
.cursor span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 8px; letter-spacing: .12em; }

.status-toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%) translateY(10px);
  padding: 10px 15px;
  color: var(--paper);
  background: rgba(4,12,23,.72);
  border: 1px solid rgba(241,234,219,.2);
  backdrop-filter: blur(12px);
  font-size: 10px;
  letter-spacing: .12em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.status-toast.is-visible { opacity: 1; transform: translate(-50%,-50%) translateY(0); }

.transcript[hidden] { display: none; }
.transcript { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; }
.transcript__backdrop { position: absolute; inset: 0; background: rgba(2,8,16,.76); backdrop-filter: blur(8px); }
.transcript__panel {
  position: relative;
  width: min(700px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  overflow-y: auto;
  padding: clamp(28px, 6vw, 72px);
  background: #f1eadb;
  color: #17253a;
  box-shadow: 0 30px 90px rgba(0,0,0,.38);
}
.transcript__panel h2 { margin: 14px 0 36px; font-family: "Songti SC", "STSong", serif; font-size: clamp(30px, 5vw, 54px); font-weight: 400; }
.transcript__panel section { padding: 22px 0; border-top: 1px solid rgba(23,37,58,.16); }
.transcript__panel h3 { margin: 0 0 8px; font-family: "Songti SC", "STSong", serif; font-weight: 400; }
.transcript__panel p { margin: 0; line-height: 1.9; }
.transcript__panel footer { margin-top: 20px; padding-top: 28px; border-top: 1px solid #17253a; }
.transcript__panel footer strong { display: block; margin-top: 16px; font-family: "Songti SC", "STSong", serif; font-size: 22px; font-weight: 400; }
.transcript__close { position: absolute; top: 18px; right: 20px; width: 38px; height: 38px; border: 1px solid rgba(23,37,58,.25); background: transparent; color: #17253a; cursor: pointer; font-size: 24px; }

.noscript { position: fixed; inset: 20px; z-index: 1000; padding: 30px; background: var(--paper); color: var(--ink); }

body.is-dawn .hud__brand,
body.is-dawn .hud-button,
body.is-dawn .chapter-nav button,
body.is-dawn .gesture-hint,
body.is-dawn .chapter-index,
body.is-dawn .next-button { color: #17253a; border-color: rgba(23,37,58,.28); text-shadow: none; }
body.is-dawn .chapter-nav button[aria-current="step"], body.is-dawn .chapter-index b { color: #2b776f; }
body.is-outro .story-controls { opacity: 0; pointer-events: none; }

body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
}
body.reduced-motion .scene img { transform: scale(1.02); }
body.reduced-motion .transition-mask { transition-duration: .18s; }

@media (pointer: coarse), (max-width: 820px) {
  body { cursor: auto; }
  button, .primary-button, .quiet-button, .hud-button, .next-button, .chapter-nav button, .skip-interaction { cursor: pointer; }
  .cursor { display: none; }
  .hud { align-items: center; }
  .hud__actions { gap: 5px; }
  .hud-button { padding: 8px; }
  #transcriptButton { display: none; }
  .chapter-nav { top: auto; bottom: calc(var(--safe-bottom) + 50px); right: 50%; transform: translateX(50%); }
  .chapter-nav ol { display: flex; gap: 10px; }
  .chapter-nav button { width: auto; flex-direction: column; gap: 5px; padding: 8px; }
  .chapter-nav button i { width: 16px; }
  .chapter-nav button span { display: none; }
  .chapter-nav button[aria-current="step"] i { width: 30px; }
  .chapter__copy--top-left { top: max(88px, calc(var(--safe-top) + 58px)); left: 24px; }
  .chapter__copy { width: min(330px, calc(100vw - 48px)); }
  .chapter__copy h2 { font-size: clamp(50px, 18vw, 74px); }
  .chapter__copy p { font-size: 13px; line-height: 1.8; }
  .scene img { transform: scale(1.1); }
  .scene[data-scene="0"] img { object-position: 52% center; }
  .scene[data-scene="1"] img { object-position: 55% center; }
  .scene[data-scene="2"] img { object-position: 60% center; }
  .scene[data-scene="3"] img, .scene[data-scene="4"] img { object-position: 66% center; }
  .interaction--seed { bottom: 17vh; }
  .interaction--trail, .interaction--city { bottom: calc(var(--safe-bottom) + 92px); width: 100%; }
  .interaction--sun { left: 68%; top: 58%; width: 260px; }
  .interaction__label { max-width: 260px; text-align: center; line-height: 1.6; }
  .hotspot--a { left: 28%; top: 56%; }
  .hotspot--b { left: 56%; top: 65%; }
  .hotspot--c { left: 81%; top: 44%; }
  .skip-interaction { bottom: calc(var(--safe-bottom) + 55px); }
  .story-controls { grid-template-columns: 1fr auto; }
  .gesture-hint { display: none; }
  .next-button { grid-column: 1; justify-self: start; }
  .chapter-index { grid-column: 2; }
  .loader__content { margin-left: 24px; }
  .loader__content h1 { font-size: clamp(58px, 19vw, 94px); }
  .loader__content h1 span:last-child { margin-left: .42em; }
  .loader__intro { font-size: 13px; }
  .loader__actions { align-items: stretch; flex-direction: column; width: min(280px, 100%); }
  .loader__note { line-height: 1.6; }
  .loader__edition { display: none; }
  .outro-card { margin-left: 24px; width: min(470px, calc(100vw - 48px)); }
  .outro-card h2 { font-size: clamp(40px, 11vw, 62px); }
}

@media (max-width: 560px) {
  .hud__brand i, .hud__brand span:last-child { display: none; }
  .hud-button { font-size: 0; width: 36px; }
  .hud-button::after { font-size: 13px; }
  #motionButton::after { content: "◒"; }
  #soundButton { width: auto; font-size: 0; }
  .sound-bars { margin: auto; }
  .chapter__meta { margin-bottom: 10px; }
  .chapter__copy h2 { margin-bottom: 10px; }
  .chapter__copy--top-left { top: max(76px, calc(var(--safe-top) + 48px)); }
  .interaction--seed { bottom: 16vh; }
  .loader__content { width: calc(100vw - 40px); margin-left: 20px; }
  .loader__content h1 { font-size: clamp(56px, 20vw, 82px); }
  .loader__intro br:first-child { display: none; }
  .signature { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
