@font-face {
  font-family: ArchiveHan;
  src: url(assets/archive-han.ttf) format("truetype");
  font-display: swap;
}
@font-face {
  font-family: SeaGrid;
  src: url(assets/sea-grid.woff) format("woff");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --paper: #edf3eb;
  --caption: #b7c8c9;
  --rule: rgb(203 212 205 / 23%);
  --edge: clamp(24px, 5.5vw, 100px);
  --pixel: SeaGrid, ArchiveHan, monospace;
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--paper);
}
* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { margin: 0; background: #090f14; }
button, a { color: inherit; -webkit-tap-highlight-color: transparent; }
button {
  border: 0; background: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 400; line-height: 1.5;
}
a { text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 1px solid var(--paper); outline-offset: 3px; }
.skip { position: fixed; left: var(--edge); top: -100px; z-index: 8; }
.skip:focus { top: 12px; }
#ocean, .ocean-vignette, main, .scene { position: fixed; inset: 0; width: 100%; height: 100dvh; }
#ocean { cursor: pointer; touch-action: manipulation; }
.ocean-vignette, main { pointer-events: none; }
.ocean-vignette { background: linear-gradient(90deg, #08101691, transparent 39%), linear-gradient(0deg, #070e135c, transparent 19%); }
.masthead, .console {
  position: fixed; z-index: 3; left: var(--edge); right: var(--edge);
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.masthead > *, .console > * { pointer-events: auto; }
.masthead { top: max(env(safe-area-inset-top), 2.7vh); }
.wordmark { display: inline-flex; gap: 13px; align-items: center; min-height: 44px; font: 19px/1 var(--pixel); letter-spacing: .07em; }
.wordmark img { width: 31px; image-rendering: pixelated; filter: grayscale(1) brightness(1.35); }
#capture, .controls button, #nextPage { min-height: 44px; display: inline-flex; gap: 10px; align-items: center; letter-spacing: .07em; }
#capture, .controls button { color: var(--caption); }
#capture span { font: 18px Georgia, serif; transition: transform .3s; }
#capture:hover span { transform: translateY(2px); }
.scene { display: flex; align-items: center; padding: 0 var(--edge); }
.scene[hidden] { display: none; }
.scene-copy { position: relative; margin-top: 6vh; display: grid; justify-items: start; }
.folio {
  display: inline-flex; align-items: center; gap: 7px; order: -1;
  font: 14px/1 var(--pixel); letter-spacing: .08em; color: #99abb1;
}
.folio em { font-style: normal; color: var(--accent); }
.folio i { width: 9px; height: 13px; background: currentColor;
  clip-path: polygon(66% 0,100% 0,100% 25%,75% 25%,75% 50%,50% 50%,50% 75%,25% 75%,25% 100%,0 100%,0 65%,25% 65%,25% 40%,50% 40%,50% 15%,66% 15%); }
h1, h2 {
  display: flex; gap: .045em; margin: 15px 0 0; padding: 0 0 4px;
  font: 400 clamp(64px,6.9vw,108px)/1.13 var(--pixel);
}
.scene-copy p { margin: 16px 0 0; color: var(--caption); font-size: 13px; line-height: 1.9; letter-spacing: .06em; }
.scene.is-active h1 span, .scene.is-active h2 span { animation: typeset .46s steps(8,end) both; }
.scene.is-active h1 span + span, .scene.is-active h2 span + span { animation-delay: .09s; }
.scene.is-active .folio i { animation: rule-in .7s ease-out both; }
.scene.is-active p, .scene.is-active #fishChoices { animation: appear .65s .19s both; }
@keyframes typeset { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rule-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
#fishChoices { display: inline-flex; pointer-events: auto; margin-top: 12px; }
#fishChoices button { width: 37px; height: 44px; display: grid; place-items: center; }
#fishChoices i { width: 8px; height: 8px; border-radius: 0; background: var(--fish); outline: 1px solid transparent; outline-offset: 4px; transition: outline-color .25s; }
#fishChoices [aria-pressed=true] i, #fishChoices button:hover i { outline-color: var(--caption); }
.console { bottom: max(14px, env(safe-area-inset-bottom), 2.2vh); border-top: 1px solid var(--rule); padding-top: 10px; }
.controls { display: flex; align-items: center; gap: 24px; }
.controls button:hover, #capture:hover, .controls [aria-pressed=true] { color: var(--paper); }
#scatter i { width: 10px; height: 10px; background: radial-gradient(circle, currentColor 1px, transparent 1.3px) 0 0 / 5px 5px; }
#pause::before { content: ''; width: 6px; height: 10px; border-inline: 2px solid currentColor; }
#pause[aria-pressed=true]::before { border: 0; background: currentColor; clip-path: polygon(0 0,100% 50%,0 100%); }
.chapter-nav { display: flex; position: absolute; left: 50%; transform: translateX(-50%); }
.chapter-nav a { width: 38px; min-height: 44px; display: grid; place-items: center; position: relative; }
.chapter-nav a::before { content: attr(data-number); font: 13px/1 var(--pixel); color: #859ba0; }
.chapter-nav a::after { content: ''; position: absolute; width: 3px; height: 3px; bottom: 2px; background: transparent; }
.chapter-nav [aria-current]::before, .chapter-nav a:hover::before { color: var(--paper); }
.chapter-nav [aria-current]::after { background: var(--accent); }
.chapter-nav a span { position: absolute; bottom: 100%; white-space: nowrap; font: 14px var(--pixel); opacity: 0; }
.chapter-nav a:hover span, .chapter-nav a:focus-visible span { opacity: 1; }
#nextPage { gap: 20px; }
#nextPage i { font: 26px/1 Georgia, serif; transition: transform .35s; }
#nextPage:hover i { transform: translateX(4px); }
.sr-only { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.notice { position: fixed; bottom: 95px; left: 50%; transform: translateX(-50%); font-size: 12px; opacity: 0; pointer-events: none; }
.notice.visible { opacity: 1; }
.scene-action {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  min-height: 44px;
  border-bottom: 0;
  color: var(--paper);
  pointer-events: auto;
}
.scene-action::before { content: ''; width: 8px; height: 10px; background: var(--accent);
  clip-path: polygon(0 0,25% 0,25% 20%,50% 20%,50% 40%,75% 40%,75% 60%,50% 60%,50% 80%,25% 80%,25% 100%,0 100%); }
.scene-action span { display: none; }
.scene-action, .quiet-action, #undoPrint, #capture, .controls button, #nextPage { font: 16px/1.45 var(--pixel); }
.print-actions { display: flex; align-items: baseline; gap: 18px; }
#undoPrint { pointer-events: auto; min-height: 44px; color: var(--caption); }
body:is([data-chapter="0"], [data-chapter="1"]) #ocean { touch-action: none; cursor: crosshair; }
body:is([data-chapter="2"], [data-chapter="3"], [data-chapter="4"], [data-chapter="5"], [data-chapter="6"], [data-chapter="7"]) #ocean { touch-action: none; cursor: grab; }
body:is([data-chapter="2"], [data-chapter="3"], [data-chapter="4"], [data-chapter="5"], [data-chapter="6"], [data-chapter="7"]) #ocean:active { cursor: grabbing; }
.fallback { position: fixed; inset: 22% 7%; display: grid; place-content: center; pointer-events: none; text-align: center; }
.fallback img { max-width: 80vw; }
@media (max-width: 720px) {
  .scene { align-items: flex-start; padding-top: clamp(78px,13vh,122px); }
  .scene-copy { margin-top: 0; }
  h1, h2 { font-size: clamp(54px,15vw,72px); margin-top: 9px; }
  .scene-copy p { font-size: 12px; margin-top: 10px; }
  .ocean-vignette { background: linear-gradient(180deg,#08101655,transparent 36%); }
  .console { padding-top: 5px; }
  .chapter-nav { bottom: calc(100% + 2px); left: 0; right: 0; justify-content: space-between; transform: none; }
  .chapter-nav a { width: 12%; min-height: 37px; }
  .controls { gap: 19px; }
  #fishChoices { margin-top: 4px; }
}
@media (max-height: 470px) and (orientation: landscape) {
  .masthead { top: 4px; }
  .scene { align-items: center; padding-top: 0; }
  h1,h2 { font-size: 46px; margin-top: 8px; }
  .scene-copy p { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.scene-tools { display: flex; gap: 18px; align-items: baseline; }
.quiet-action { pointer-events: auto; color: var(--caption); min-height: 44px; }
.quiet-action:hover, .scene-action:hover { color: #fff4d5; }
body { --accent: #f0579a; }
body:is([data-chapter="2"],[data-chapter="3"],[data-chapter="7"]) { --accent: #73d8ca; }
body[data-chapter="4"] { --accent: #d8b583; }
body[data-chapter="5"] { --accent: #84d8ff; }
.notice { padding: 8px 16px; white-space: nowrap; background: #081419df; border-radius: 2px; }
@media (max-width: 720px) and (max-height: 740px) {
  .scene { padding-top: 72px; }
  h1, h2 { margin-top: 10px; }
  .scene-copy p { margin-top: 4px; }
}

@media (min-width: 721px) {
  body[data-chapter="2"] .ocean-vignette {
    background: linear-gradient(90deg,#07121aed 0%,#07121ad9 15%,#07121a77 25%,transparent 41%),
                linear-gradient(0deg,#07101688,transparent 18%);
  }
}



@font-face { font-family: SeaHeavy; src: url(assets/sea-heavy.woff) format('woff'); font-weight: 800; font-display: swap; }
@font-face { font-family: SeaCondensed; src: url(assets/sea-condensed.woff) format('woff'); font-weight: 800; font-display: swap; }
:root { --display: SeaHeavy,ArchiveHan,sans-serif; }
.scene-copy { max-width: 390px; width: 30vw; position: relative; margin-top: 2vh; isolation: isolate; }
.folio { font: 11px/1 var(--pixel); letter-spacing: .12em; opacity: .75; }
.folio i { height: 1px; width: 34px; clip-path: none; opacity: .5; }
h1,h2 { position: relative; display: flex; font: 800 clamp(100px,10.2vw,164px)/1.08 var(--display);
  letter-spacing: -.08em; gap: 0; margin: 42px 0 24px; overflow: visible; padding: 0;
  width: max-content; z-index: 1; }
h1 span,h2 span { display: block; transform-origin: center; }
h1::before,h2::before { content: attr(data-word); position: absolute; z-index: -1; pointer-events: none;
  font: 800 clamp(66px,7.4vw,116px)/.86 SeaCondensed,sans-serif;
  letter-spacing: -.065em; color: transparent; -webkit-text-stroke: 1px #86c2c14a;
  left: -3px; top: -28px; transform: translateY(-45%) scaleX(.77); transform-origin: left; white-space: nowrap; }
.scene-copy p { max-width: 260px; color: #adc1c6; font-size: 12px; line-height: 2; letter-spacing: .09em; margin-top: 24px; text-wrap: pretty; }
.scene-action,.quiet-action { font-family: inherit; font-size: 12px; margin-top: 14px; min-height: 44px; letter-spacing: .08em; }
.scene-action::before { width: 5px; height: 5px; clip-path: none; border-radius: 50%; }
.wordmark { font: 800 16px/1 var(--display); letter-spacing: .08em; }
.scene-tools { flex-wrap: wrap; gap: 20px; }
.scene.is-active h1 span,.scene.is-active h2 span { animation: type-rise .9s cubic-bezier(.15,.8,.25,1) both; }
.scene.is-active h1 span+span,.scene.is-active h2 span+span { animation-delay: .1s; }
@keyframes type-rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
#wind h1 { transform: rotate(-8deg) scaleX(.87); transform-origin: left center; margin-bottom: 34px; }
#wind h1::before { transform: translate(27px,-48%) rotate(9deg) scaleX(.83); -webkit-text-stroke: 0; color: #bbc9c52b; }
#wind .scene-copy { margin-top: 6vh; }
#form h2 { transform: rotate(5deg); font-size: clamp(105px,10.5vw,162px); margin-top: 54px; }
#form h2 span+span { transform: translate(-.05em,.27em) scale(.72); color: #c4e5d9; }
#form h2 span:first-child { -webkit-text-stroke: 1.5px #edf3eb; color: transparent; }
#form h2::before { top: -40px; transform: translate(18px,-25%) rotate(-12deg) scaleX(.9); color: #7dbead16; }
#form p { margin-top: 40px; }
#current h2 { transform: skewY(-7deg) scaleX(.84); transform-origin: left; margin-top: 48px; }
#current h2 span+span { transform: translate(-.04em,.25em); color: #b9e6dd; }
#current h2::before { color: #b3e7e510; -webkit-text-stroke: 0; transform: translate(-4px,-38%) scaleX(.57); }
#current p { margin-top: 55px; }
#vortex h2 { transform: rotate(-13deg) scaleX(.85); transform-origin: left; margin-top: 60px; }
#vortex h2 span:first-child {  }
#vortex h2 span+span { transform: translate(-.08em,.30em) rotate(10deg) scale(.84); }
#vortex h2::before { color: #9bdddb16; -webkit-text-stroke: .6px #a5dedc70; transform: translate(-5px,-32%) rotate(12deg) scaleX(.62); }
#vortex p { margin-top: 63px; }
#letter h2 { display: flex; flex-direction: column; font-size: clamp(81px,7.5vw,115px); gap: 0; transform: rotate(-7deg); margin-top: 30px; margin-left: 26px; }
#letter h2 span+span { transform: translate(.45em,-.06em) rotate(13deg); color: #d8cbb4; }
#letter h2::before { writing-mode: vertical-rl; text-orientation: sideways; font-size: 88px; left: 100%; top: 2%; transform: rotate(8deg) scaleX(.7); -webkit-text-stroke: 0; color: #d8cbb423; }
#letter .scene-copy { margin-top: -4vh; }
#letter p { max-width: 240px; }
#stars h2 { transform: rotate(-7deg) scaleX(.88); transform-origin: left; margin-top: 54px; }
#stars h2::before { color: #89c9e623; -webkit-text-stroke: 0; transform: translate(24px,-42%) rotate(8deg) scaleX(.9); }
#stars .scene-copy { margin-top: 9vh; }
#school h2 { transform: rotate(7deg) scaleX(.86); transform-origin: left; }
#school h2 span:first-child { transform: translateY(.14em) scale(.72); color: #b9dad0; }
#school h2::before { font-size: 68px; transform: translate(0,-32%) rotate(-10deg) scaleX(.52); color: #b9dad019; }
#sea h2 { transform: rotate(-6deg) scaleX(.89); transform-origin: left; }
#sea h2 span+span { transform: translateY(.14em) scale(.77); color: #b5e1da; }
#sea h2::before { font-size: 128px; color: #8fcbc721; -webkit-text-stroke: 0; transform: translate(24px,-38%) rotate(8deg) scaleX(.9); }
#sea .scene-copy { margin-top: -14vh; }
.title-particles { position: absolute; left: -32px; top: -32px; width: calc(100% + 64px); height: calc(100% + 64px); pointer-events: none; }


@media (max-width:720px) {
  .scene { padding-top: clamp(83px,12.5vh,122px); }
  .scene-copy { max-width: 90vw; width: auto; }
  #wind .scene-copy,#letter .scene-copy,#stars .scene-copy,#sea .scene-copy { margin-top: 0; }
  h1,h2,#form h2 { font-size: clamp(81px,23vw,110px); margin-top: 34px; margin-bottom: 18px; }
  h1::before,h2::before { font-size: 70px; top: -16px; }
  #wind h1 { margin-bottom: 18px; }
  #form h2 { margin-top: 35px; }
  #form h2::before { top: -15px; }
  #current h2,#vortex h2,#stars h2 { margin-top: 36px; }
  #school h2::before { font-size: 50px; }
  #sea h2::before { font-size: 88px; }
  .scene-copy p { font-size: 11px; max-width: 255px; margin-top: 12px; line-height: 1.85; }
  #form p { margin-top: 27px; }
  #current p,#vortex p { margin-top: 28px; }
  .scene-action,.quiet-action { margin-top: 4px; }
  #letter .scene-copy { display: grid; grid-template-columns: 100px minmax(0,1fr); column-gap: 22px; }
  #letter .folio { grid-column: 1 / -1; }
  #letter h2 { grid-row: 2 / 4; grid-column: 1; font-size: 63px; margin: 22px 0 0; }
  #letter h2::before { font-size: 64px; left: 75%; opacity: .65; }
  #letter p { grid-column: 2; grid-row: 2; align-self: end; max-width: 165px; margin-top: 22px; }
  #letter .scene-action { grid-column: 2; grid-row: 3; align-self: start; }
}
@media (max-height:740px) and (max-width:720px) {
  .scene { padding-top: 76px; }
  h1,h2,#form h2 { font-size: 76px; margin-top: 24px; }
  #current h2,#vortex h2,#stars h2 { margin-top: 26px; }
  h1::before,h2::before { font-size: 57px; }
  #current p,#vortex p { margin-top: 24px; }
}
@media (max-height:470px) and (orientation:landscape) {
  .scene-copy,#wind .scene-copy,#letter .scene-copy,#stars .scene-copy,#sea .scene-copy { margin-top: 0; }
  h1,h2,#form h2 { font-size: 78px; margin-top: 20px; margin-bottom: 8px; }
  #current h2,#vortex h2,#stars h2 { margin-top: 20px; }
  #letter h2 { flex-direction: row; font-size: 68px; margin-top: 15px; }
  #letter h2::before { writing-mode: horizontal-tb; left: 0; top: -15px; font-size: 62px; }
  .scene-copy p,#current p,#vortex p,#form p { margin-top: 22px; }
}
@media (prefers-reduced-motion:reduce) { .scene.is-active h1 span,.scene.is-active h2 span { animation: none; } }

/* Grain is the shared title material; size and orientation carry the hierarchy. */
h1 > span,h2 > span { position: relative; }
.glyph-grain { position: absolute; inset: -28px; width: calc(100% + 56px); height: calc(100% + 56px); pointer-events: none; }
h1 > .grain-ready,h2 > .grain-ready { color: transparent !important; -webkit-text-stroke: 0 !important; }
h1::before,h2::before {
  -webkit-text-stroke: 0 !important; color: transparent;
  background: radial-gradient(circle,#aad2c96b .75px,transparent 1px) 0 0 / 2.4px 2.4px;
  background-clip: text; -webkit-background-clip: text;
}
#wind h1 span+span { transform: translate(-.12em,.3em) scale(.68); }
#wind h1 { margin-bottom: 44px; }
#current h2 span:first-child { transform: scale(.77); transform-origin: bottom left; }
#current h2 span+span { transform: translate(-.18em,.12em); }
#vortex h2 span:first-child { filter: none; transform: scale(.92); }
#stars h2 { display:flex; flex-direction:column; font-size:clamp(99px,10vw,156px); gap:0; margin-top:28px; margin-left:14px; }
#stars h2 span+span { transform:translate(.47em,-.16em) scale(.72); }
#stars h2::before { writing-mode:vertical-rl; text-orientation:sideways; left:100%; top:3%; transform:rotate(6deg) scaleX(.75); font-size:95px; }
#stars .scene-copy { margin-top:0; }
#stars p { margin-top:0; }
#letter h2 { flex-direction:row; margin-left:0; transform:rotate(-8deg) scaleX(.85); transform-origin:left; font-size:clamp(105px,10.5vw,162px); }
#letter h2 span+span { transform:translate(-.03em,.23em) scale(.76); }
#letter h2::before { writing-mode:horizontal-tb; left:0; top:-18px; font-size:88px; transform:translate(24px,-45%) rotate(8deg) scaleX(.75); }
#letter p { margin-top:47px; }
@media (max-width:720px) {
  #wind h1 { margin-bottom:25px; }
  #stars h2 { flex-direction:row; font-size:80px; margin-top:30px; margin-left:0; }
  #stars h2 span+span { transform:translate(-.08em,.22em) scale(.78); }
  #stars h2::before { writing-mode:horizontal-tb; left:0; top:-15px; font-size:65px; transform:translate(10px,-40%) rotate(8deg) scaleX(.85); }
  #stars p { margin-top:24px; }
  #letter .scene-copy { grid-template-columns:100px minmax(0,1fr); }
  #letter h2 { flex-direction:column; font-size:67px; transform:rotate(-7deg); margin-top:20px; }
  #letter h2 span+span { transform:translate(.35em,-.06em) scale(.8); }
  #letter h2::before { writing-mode:vertical-rl; left:80%; top:8%; font-size:61px; transform:rotate(7deg) scaleX(.7); }
  #letter p { margin-top:20px; }
}
@media (max-height:470px) and (orientation:landscape) {
  #stars h2,#letter h2 { flex-direction:row; font-size:78px; margin-top:20px; }
  #stars h2::before,#letter h2::before { writing-mode:horizontal-tb; top:-16px; left:0; font-size:59px; transform:translate(15px,-35%) scaleX(.8); }
  #stars p,#letter p { margin-top:24px; }
}

@media (min-width:721px) {
  #wind h1 { font-size:clamp(130px,12.4vw,186px); margin-top:65px; margin-bottom:16px; }
  #wind h1::before { font-size:clamp(60px,6.4vw,92px); top:-4px; }
  h1::before,h2::before { opacity:.65; }
}
@media (max-width:720px) {
  #wind h1::before { font-size:60px; top:0; }
  #wind h1 { margin-top:42px; margin-bottom:12px; }
}
@media (min-width:721px) { .folio { position:relative; translate:0 -32px; } }
@font-face {
  font-family: SeaText;
  src: url(assets/sea-text.woff) format('woff');
  font-weight: 400;
  font-display: swap;
}
:root { font-family: SeaText,'PingFang SC','Microsoft YaHei',sans-serif; }
.scene-copy p { font-family: SeaText,sans-serif; font-size: 13px; line-height: 2; letter-spacing: .10em; color: #bdced1; }
.scene-action,.quiet-action,#undoPrint,#capture,.controls button,#nextPage {
  font-family: SeaText,sans-serif; font-size: 12px; font-weight: 400; letter-spacing: .12em;
}
.folio { font: 11px/1 SeaCondensed,SeaText,sans-serif; letter-spacing: .12em; }
.chapter-nav a::before { font: 800 11px/1 SeaCondensed,SeaText,sans-serif; letter-spacing: .08em; }
.chapter-nav a span { font: 400 12px/1.4 SeaText,sans-serif; letter-spacing: .12em; }
.notice { font-family: SeaText,sans-serif; letter-spacing: .08em; }
#stars .scene-tools { gap: 9px 19px; max-width: 300px; }
@media (max-width:720px) {
  .scene-copy p { font-size: 12px; max-width: 280px; line-height: 1.9; }
  .scene-action,.quiet-action,#undoPrint,#capture,.controls button,#nextPage { font-size: 12px; }
  #stars .scene-tools { gap: 6px 17px; max-width: 88vw; }
}
@font-face {
  font-family: SeaTypewriter;
  src: url(assets/sea-typewriter.woff) format('woff');
  font-weight: 400;
  font-display: swap;
}
:root { --small-type: SeaTypewriter,SeaText,monospace; }
.scene-copy p {
  font-family: var(--small-type);
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: .035em;
  font-variant-numeric: tabular-nums;
}
.scene-action,.quiet-action,#undoPrint,#capture,.controls button,#nextPage,.notice {
  font-family: var(--small-type);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .035em;
  font-variant-numeric: tabular-nums;
}
.folio { font: 400 11px/1 var(--small-type); letter-spacing: .04em; }
.chapter-nav a::before { font: 400 11px/1 var(--small-type); letter-spacing: .02em; }
.chapter-nav a span { font: 400 12px/1.4 var(--small-type); letter-spacing: .04em; }
@media (max-width:720px) {
  .scene-copy p { font-size: 12px; line-height: 1.9; letter-spacing: .025em; }
  .scene-action,.quiet-action,#undoPrint,#capture,.controls button,#nextPage { font-size: 12px; }
}
/* The frame and navigation share a quiet, exhibition-like rhythm. */
:root {
  --paper: #e9efea;
  --caption: #acc2c4;
  --rule: rgb(188 222 216 / 15%);
  --edge: clamp(26px,5.9vw,96px);
}
.wordmark { gap: 13px; align-items:center; }
.wordmark img { width: 29px; opacity: .8; }
.brand-type { display:grid; gap:8px; }
.brand-type strong { font: 800 15px/1 var(--display); letter-spacing:.16em; }
.brand-caption { font:400 9px/1.2 var(--small-type); color:#8fa7ac; letter-spacing:.17em; }
.masthead { top: max(22px,env(safe-area-inset-top),3.1vh); }
#capture { font-size:11px; color:#98afb4; gap:9px; }
.scene-copy p { color:#afc3c7; line-height:2.1; letter-spacing:.08em; }
.scene-action { position:relative; gap:10px; border-bottom:1px solid #b6dbd62b; }
.scene-action::before { width:4px; height:4px; opacity:.85; box-shadow:0 0 8px #b7e6d533; }
.quiet-action { color:#91aaae; transition:color .25s; }
.scene-tools { gap:12px 22px; }
.controls button { font-size:11px; color:#94adb0; }
.console { border-top:0; padding-top:13px; bottom:max(17px,env(safe-area-inset-bottom),2.6vh); }
.console::before { content:''; position:absolute; left:0;right:0;top:0;height:1px;
  background:linear-gradient(90deg,#b4d3d42b,transparent 38%,transparent 62%,#b4d3d42b); }
#nextPage { gap:20px; font-size:11px; }
#nextPage i { font-size:22px; color:#b9d1d1; }
.chapter-nav a { transition:color .3s; }
@media (min-width:1000px) and (min-height:550px) {
  .chapter-nav {
    position:fixed; left:auto; right:17px; top:50%; bottom:auto;
    transform:translateY(-50%); flex-direction:column; gap:0;
  }
  .chapter-nav a { width:48px; min-height:43px; padding-right:12px; }
  .chapter-nav a::before { color:#627d85; font-size:10px; }
  .chapter-nav a::after { width:8px;height:1px;bottom:auto;top:50%;right:0; background:#627d8544;transition:width .35s,background .35s; }
  .chapter-nav [aria-current]::before { color:#c8dedb; }
  .chapter-nav [aria-current]::after { width:14px;background:var(--accent); }
  .chapter-nav a span {
    bottom:auto;right:calc(100% + 4px);left:auto;
    font-size:10px;letter-spacing:.16em;
    color:#9eb6bb;transform:translateX(5px);transition:opacity .25s,transform .25s;
  }
  .chapter-nav a[aria-current] span,.chapter-nav a:hover span,.chapter-nav a:focus-visible span {opacity:1;transform:none;}
  .scene-copy { width:29vw; max-width:360px; }
  #wind h1 { font-size:clamp(132px,11.8vw,180px); }
  #stars h2 { font-size:clamp(112px,9.7vw,148px); }
  h1::before,h2::before { opacity:.43; }
}
@media (max-width:999px) {
  .chapter-nav { bottom:calc(100% + 8px); left:0;right:0; transform:none; justify-content:center; }
  .chapter-nav a { width:34px; min-height:35px; }
  .chapter-nav a::after { width:3px;height:3px;bottom:2px;top:auto;right:auto; }
}
@media (max-width:720px) {
  .masthead { top:max(18px,env(safe-area-inset-top)); }
  .brand-type { gap:6px; }
  .brand-type strong { font-size:14px; }
  .brand-caption { font-size:8px; letter-spacing:.13em; }
  .scene { padding-top:clamp(110px,15vh,140px); }
  .scene-copy p { line-height:1.95; letter-spacing:.06em; }
  .console { padding-top:9px; }
  .chapter-nav { justify-content:space-between; bottom:calc(100% + 6px); }
  .chapter-nav a { width:12%; min-height:35px; }
  .chapter-nav a span { display:none; }
  #stars .scene-tools { gap:4px 16px; }
  .scene-action,.quiet-action { min-height:44px; }
  #sea .scene-tools { gap:4px 16px; }
  h1::before,h2::before { opacity:.48; }
}
@media (max-height:740px) and (max-width:720px) {
  .scene { padding-top:100px; }
  #wind h1 { font-size:78px; margin-top:32px; }
  #letter h2 { font-size:60px; }
}
@media (prefers-reduced-motion:reduce) { .chapter-nav a,.chapter-nav a::after,.chapter-nav a span,.quiet-action { transition:none; } }
/* Fine echoes sit behind the grain; the orbit carries the title into its scene. */
h1::after,h2::after {
  content:attr(aria-label);position:absolute;inset:8px auto auto 8px;z-index:-1;
  font:inherit;letter-spacing:inherit;color:transparent;-webkit-text-stroke:.6px #add7cf;
  opacity:.16;pointer-events:none;white-space:nowrap;
  transform:translate(7px,10px) scaleX(1.015);
  mask-image:linear-gradient(transparent 14%,#000 63%,transparent);
}
#wind h1::after,#stars h2::after,#sea h2::after {
  content:'';left:-9%;top:39%;width:116%;height:24%;inset-inline-end:auto;
  border:1px solid #b5dbd0;border-radius:50%;opacity:.23;
  transform:rotate(-15deg);mask-image:linear-gradient(90deg,#000,transparent 32%,transparent 66%,#000);
}
#stars h2::after { top:31%;left:-22%;width:170%;height:19%;transform:rotate(-23deg); }
#letter h2::after { transform:translate(12px,13px) rotate(1deg);opacity:.2; }
.scene.is-entering .scene-copy {
  animation:chapter-arrive 1.1s .22s cubic-bezier(.16,.8,.22,1) both;
}
.scene.is-leaving .scene-copy {
  animation:chapter-depart .62s cubic-bezier(.45,0,.8,.4) both;
}
.scene.is-leaving button,.scene.is-leaving a { pointer-events:none; }
.scene.is-entering h1::before,.scene.is-entering h2::before { animation:caption-depth 1.4s .18s cubic-bezier(.16,.8,.22,1) both; }
@keyframes chapter-depart {
  from { opacity:1;translate:0 0;filter:blur(0); }
  to { opacity:0;translate:0 -22px;filter:blur(3px); }
}
@keyframes chapter-arrive {
  from { opacity:0;translate:0 24px;filter:blur(3px); }
  to { opacity:1;translate:0 0;filter:blur(0); }
}
@keyframes caption-depth {
  from { opacity:0;translate:14px 7px;filter:blur(2px); }
  to { opacity:.43;translate:0 0;filter:blur(0); }
}
@media (max-width:720px) {
  #stars h2::after {top:42%;left:-7%;width:118%;height:24%;transform:rotate(-15deg);}
  h1::after,h2::after {opacity:.13;}
}
body[data-motion="paused"] .scene-copy,
body[data-motion="paused"] h1::before,
body[data-motion="paused"] h2::before { animation:none; }
@media (prefers-reduced-motion:reduce) {
  .scene.is-entering .scene-copy,.scene.is-leaving .scene-copy,
  .scene.is-entering h1::before,.scene.is-entering h2::before {animation:none;}
}
