:root {
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Avenir Next", system-ui, sans-serif;
  --ivory: #f5eee4;
  --gold: #dfc69a;
  --ink: #494052;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  display: grid; place-items: center;
  height: 100vh; height: 100dvh;
  background: radial-gradient(ellipse at 50% 35%, #25253f, #101220 65%);
  color: var(--ivory); font-family: var(--sans); -webkit-font-smoothing: antialiased;
}
body::before, body::after {
  position: fixed; top: 50%; color: #a9a0c4; opacity: .4;
  font-size: 10px; letter-spacing: .34em; text-transform: uppercase;
  writing-mode: vertical-rl; transform: translateY(-50%);
}
body::before { content: "A song for another spring"; left: max(32px, calc(50% - 420px)); transform: translateY(-50%) rotate(180deg); }
body::after { content: "To the seasons still to come"; right: max(32px, calc(50% - 420px)); }
button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
button:disabled { cursor: default; }
button, [tabindex] { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 1px dashed currentColor; outline-offset: 5px; }
button:active:not(:disabled) { translate: 0 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.svg-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }

/* One painted world. The same layers remain in place from night to dawn. */
#stage {
  position: relative; isolation: isolate; overflow: hidden;
  width: min(100%, 600px); height: 100%; max-height: 1080px;
  container-type: size; touch-action: manipulation;
  box-shadow: 0 0 100px #080a1755;
  --hf: #353850; --hm: #292e46; --hn: #1d253b;
  --stem: #6e7d7b;
  --flowers: .88; --meadow: .45; --warmth: 0;
  --text: #f5eee4; --muted: #cbc4d5; --accent: #dfc69a;
  --frame: #cdb8a24a; --shade: #171c35; --scrim: #15182c99;
  color: var(--text);
}
#stage.s1 { --hf: #56536d; --hm: #3e435e; --hn: #2d374d; --flowers: .96; --meadow: .7; }
#stage.s2 { --hf: #9a829e; --hm: #6b627f; --hn: #454c63; --flowers: .95; --meadow: .9; }
#stage.s3 {
  --hf: #cbb9ce; --hm: #b3a9c0; --hn: #96a5a2; --stem: #718371;
  --flowers: 1; --meadow: 1;
  --text: #494052; --muted: #64576a; --accent: #81624f; --frame: #77637255; --shade: #f5eee4; --scrim: #f5eee4b3;
  color-scheme: light;
}
#world, .sky, #stars, .paper, .vignette, #fx { position: absolute; inset: 0; pointer-events: none; }
#world { z-index: -1; overflow: hidden; }
.sky { opacity: 0; transition: opacity 1s ease; }
.night { opacity: 1; background: linear-gradient(#161a30 5%, #24263e 35%, #49415b 62%, #807080 85%); }
.moonlit { background: linear-gradient(#252940, #42415f 35%, #82718d 63%, #a48b9e 83%); }
.garden { background: linear-gradient(#45435f, #6b5b7d 32%, #aa8a9f 62%, #d4b5af 82%); }
.dawn { background: linear-gradient(#a7a0bf, #d0c2d2 25%, #f1dfd9 48%, #f7e9d2 68%, #e2c7a7); }
.s1 .moonlit, .s2 .garden, .s3 .dawn { opacity: 1; }
.s2:not(.s3) .dawn { opacity: calc(var(--warmth) * .4); }
.horizon {
  position: absolute; inset: 30% -20% 10%; opacity: var(--warmth);
  background: radial-gradient(ellipse at 50% 70%, #f9e1b4b0, #eebac54d 40%, transparent 70%);
  transition: opacity 850ms;
}
.sky-wash { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; transition: opacity 1s; }
.s3 .sky-wash { opacity: .65; }
.morning-pigment { opacity: 0; transition: opacity 1s; }
.s2 .morning-pigment { opacity: calc(var(--warmth) * .5); }
.s3 .morning-pigment { opacity: 1; }
#stars { opacity: .8; transition: opacity 1s; }
.s2 #stars { opacity: .5; }
.s3 #stars { opacity: .18; }
#stars i {
  position: absolute; width: var(--s); height: var(--s); border-radius: 50%;
  background: #fff3df; box-shadow: 0 0 5px #fce9c966;
  animation: twinkle var(--t) ease-in-out var(--d) infinite;
}
@keyframes twinkle { 50% { opacity: .25; } }
.celestial-map {
  position: absolute; width: 111%; left: -5.5%; top: 4%; height: 77%;
  stroke: #d4c2b4; stroke-width: .65; opacity: .19; transition: opacity 1s;
}
.celestial-map .orbit { stroke-dasharray: 1 10; }
.is-started .celestial-map { opacity: .1; }
.s3 .celestial-map { opacity: .12; stroke: #705d7c; }
.moon {
  position: absolute; top: calc(var(--safe-t) + 9cqh); left: 17%; width: 32px; height: 32px; border-radius: 50%;
  background: #f2e6d1; box-shadow: 0 0 34px 10px #f6e4cf18;
  opacity: 0; transform: translateY(10px); transition: opacity 1s, transform 1.2s;
}
.moon::after { content: ""; position: absolute; width: 29px; height: 29px; border-radius: 50%; background: #3c3c59; left: -5px; top: -3px; }
.s1 .moon { opacity: .7; transform: none; }
.s2 .moon { opacity: .2; transform: translateY(-12px); }
.s3 .moon { opacity: 0; }
.hills { position: absolute; left: -2%; bottom: -1%; width: 104%; height: 46%; }
.hills .far { fill: var(--hf); opacity: .8; }.hills .middle { fill: var(--hm); opacity: .7; }.hills .near { fill: var(--hn); opacity: .9; }
.hills path, #flora *, .perch * { transition: fill 1s, stroke 1s; }
.mist {
  position: absolute; left: -10%; right: -10%; bottom: 18%; height: 20%; opacity: .3;
  background: radial-gradient(ellipse, #d3b8c35c, transparent 65%); filter: blur(14px);
}
#flora {
  position: absolute; left: 0; bottom: -5%; width: 100%; height: 48%;
  opacity: var(--flowers); transition: opacity 1s, transform 1s;
}
.is-started #flora { transform: translateY(3%); }
#meadow { opacity: var(--meadow); transition: opacity 1s; }
.perch {
  position: absolute; right: -3%; top: 66%; width: 30%; overflow: visible;
  opacity: 0; transform: translateX(18%); transition: opacity 1s, transform 1.2s;
}
.s1 .perch { opacity: 1; transform: none; }
.perch .branch { fill: none; stroke: var(--stem); stroke-width: 8; stroke-linecap: round; opacity: .65; }
.perch .thin { stroke-width: 4; }.perch .leaf { fill: url(#bluebonnet-leaf-paint); opacity: .8; }
.perch .feather { fill: none; stroke: #e7e1d5; stroke-width: 1.8; stroke-linecap: round; opacity: .55; }
.perch .beak { fill: #8b8276; opacity: .9; }
.perch .feet { fill: none; stroke: #a98979; stroke-width: 3; stroke-linecap: round; }
.bird, .idle { transform-box: fill-box; transform-origin: 50% 100%; }
.idle { animation: bird-breath 4s ease-in-out infinite; }
@keyframes bird-breath { 50% { transform: scaleY(1.04); } }
.paper {
  opacity: .34; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.46 .62' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Cpath fill='%23fff' d='M0 0h240v240H0z' filter='url(%23g)'/%3E%3C/svg%3E");
}
.s3 .paper { mix-blend-mode: multiply; opacity: .18; }
.reading-wash {
  position: absolute; inset: 22% 0 42%; opacity: 0;
  background: linear-gradient(transparent, #20203559 20%, #20203559 80%, transparent);
  transition: opacity 1s;
}
.s1 .reading-wash, .s2 .reading-wash { opacity: 1; }.s3 .reading-wash { opacity: 0; }
.vignette { box-shadow: inset 0 -70px 100px #11182c99, inset 0 0 90px #14152655; transition: box-shadow 1s; }
.s3 .vignette { box-shadow: inset 0 -50px 100px #e9d5c34d; }
.scrim { position: absolute; inset: auto 0 0; height: 23%; background: linear-gradient(transparent, var(--scrim)); transition: background 1s; }
.frame { position: absolute; inset: 16px; border: 1px solid var(--frame); border-radius: 180px 180px 0 0 / 100px 100px 0 0; transition: border-color 1s; }
.frame::after { content: ""; position: absolute; inset: 5px; border: 1px solid var(--frame); border-top: 0; opacity: .35; border-radius: inherit; }
.frame i { position: absolute; left: 50%; translate: -50% -50%; font: normal 20px var(--serif); color: var(--accent); background: #1b1e33; padding: 0 10px; }
.frame i:first-child { top: 0; }.frame i:last-child { bottom: -20px; }
.s3 .frame i { background: #b4abc5; }

/* Quiet typography and controls sit above the illustration. */
.masthead {
  position: absolute; top: calc(var(--safe-t) + 34px); left: 38px; right: 32px;
  height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.wordmark { color: var(--muted); font-size: 9px; letter-spacing: .25em; text-transform: uppercase; }
#sound { display: flex; align-items: center; gap: 7px; min-width: 44px; min-height: 44px; color: var(--muted); }
#sound span { font-size: 10px; letter-spacing: .04em; }
#sound svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
#sound[aria-pressed="true"] .slash, #sound[aria-pressed="false"] .wave { display: none; }
.eyebrow { margin: 0; font: 400 10px/1.6 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
#chapter-heading { position: absolute; top: calc(var(--safe-t) + 13cqh); left: 28px; right: 28px; text-align: center; }
#chapter-title { margin: 7px 0 5px; font: 400 clamp(27px, 6.7cqw, 37px)/1.1 var(--serif); overflow-wrap: anywhere; }
#chapter-title:focus { outline: none; }
.heading-flourish { font: 15px var(--serif); letter-spacing: .18em; color: var(--accent); opacity: .7; }
#text {
  position: absolute; left: 36px; right: 36px; top: calc(var(--safe-t) + 28cqh);
  max-height: 27cqh; overflow-y: auto; overscroll-behavior: contain;
  text-align: center; scrollbar-width: thin; scrollbar-color: #cbbac24d transparent;
  font: 400 clamp(20px, 4.9cqw, 25px)/1.45 var(--serif);
  text-shadow: 0 1px 16px var(--shade), 0 0 3px var(--shade);
}
#text p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; animation: ink 550ms both; }
#text .opening-line { animation-duration: 300ms; }
#text .fragment + .fragment { margin-top: 19px; }
.fragment-number { display: block; margin-bottom: 5px; font: 10px var(--sans); letter-spacing: .2em; color: var(--accent); }
.wish-copy { text-align: left; padding-left: 15px; border-left: 1px solid #dfc69a4d; }
.wish-copy + .wish-copy { margin-top: 16px; }
.wish-copy .fragment-number { font-size: 9px; text-transform: uppercase; }
.flower-language { display: block; margin: 0 0 5px; font: italic 400 16px/1.3 var(--serif); color: #e3d0d9; }
.s2 #text {
  font-size: clamp(19px, 4.7cqw, 23px); max-height: 28cqh; padding-block: 12px;
  -webkit-mask-image: linear-gradient(transparent, #000 12px, #000 calc(100% - 12px), transparent);
  mask-image: linear-gradient(transparent, #000 12px, #000 calc(100% - 12px), transparent);
}
@keyframes ink { from { opacity: 0; transform: translateY(5px); } }
.scene-footer {
  position: absolute; left: 34px; right: 34px; bottom: calc(var(--safe-b) + 56px);
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
#hint { margin: 8px 0 13px; font: italic 400 clamp(17px, 4.2cqw, 20px)/1.4 var(--serif); color: var(--muted); text-wrap: balance; }
#hint:empty, #progress:empty { display: none; }
#progress { font-size: 9px; color: var(--muted); letter-spacing: .2em; }
.text-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 19px;
  min-height: 46px; padding: 4px 12px;
  font: 400 12px var(--sans); letter-spacing: .12em; color: var(--accent);
}
.text-action > span:last-child:not(:first-child) { font: 24px var(--serif); transition: transform 200ms; }
.text-action:hover > span:last-child { transform: translateX(4px); }
.quiet-action { min-height: 44px; padding: 8px 12px; font: 400 11px var(--sans); letter-spacing: .07em; color: var(--muted); }
#collected { font-size: 10px; min-height: 44px; text-decoration: underline; text-decoration-color: #c8b6c36b; text-underline-offset: 5px; }
#next:not([hidden]) + #collected { margin-top: -4px; }
#after { display: flex; flex-direction: column; align-items: center; }
#chapter-marks { position: absolute; bottom: calc(var(--safe-b) + 31px); left: 50%; translate: -50% 0; display: flex; align-items: center; gap: 13px; }
#chapter-marks span { width: 4px; height: 4px; background: var(--muted); opacity: .25; border-radius: 50%; transition: background 600ms, opacity 600ms, transform 600ms; }
#chapter-marks span.active { background: var(--accent); opacity: 1; transform: rotate(45deg); border-radius: 0; }
#chapter-marks span.past { opacity: .7; }

/* Large touch targets, delicate objects. */
.star {
  position: absolute; left: 50%; top: 59%; width: 112px; height: 112px; margin: -56px;
  display: grid; place-items: center; border-radius: 50%; opacity: .35; transition: opacity 400ms;
}
.star svg { width: 40px; height: 40px; fill: #ffedc9; filter: drop-shadow(0 0 10px #ffdeb8aa) drop-shadow(0 0 28px #e9b9b555); transition: transform 600ms, opacity 500ms; }
.star-orbit { position: absolute; inset: 18px; border: 1px solid #d9bf9755; border-radius: 50%; transform: rotate(-35deg) scaleY(.48); }
.star.ready { opacity: 1; }.star.ready svg { animation: beckon 3s ease-in-out infinite; }
.star.ready::before { content: ""; position: absolute; inset: 19px; border: 1px solid #f5dcb157; border-radius: 50%; animation: halo 3s ease-out infinite; }
.star.burst { opacity: 0; }.star.burst svg { transform: scale(2.5) rotate(45deg); opacity: 0; }
.s1 .star { visibility: hidden; }
@keyframes beckon { 50% { transform: scale(1.12); } }
@keyframes halo { from { opacity: .7; transform: scale(.6); } to { opacity: 0; transform: scale(1.55); } }
.interactions { position: absolute; left: 9%; right: 9%; top: 60%; display: flex; justify-content: space-around; align-items: center; }
.note { position: relative; width: 74px; height: 84px; display: grid; place-items: center; border-radius: 50%; color: #fae8d5; }
.note::before { content: ""; position: absolute; width: 65px; height: 65px; border-radius: 50%; background: radial-gradient(circle, #ffdebd3d, #d9adb912 47%, transparent 70%); animation: glow 3.5s ease-in-out var(--d) infinite; }
.note::after { content: ""; position: absolute; inset: 10px 5px; border: 1px solid #dfc69a38; border-radius: 50%; }
.note svg { width: 25px; height: 25px; fill: currentColor; stroke: currentColor; filter: drop-shadow(0 0 8px #f6d1bb77); animation: float 4s ease-in-out var(--d) infinite; transition: transform 350ms, opacity 350ms; }
.note:nth-child(2) { translate: 0 20px; }
.note.got svg { opacity: .45; transform: scale(.75); animation: none; }.note.got::after { border-style: dashed; }
.note.got::before { animation: none; opacity: .4; }
.object-label { position: absolute; top: 100%; left: -5px; right: -5px; margin-top: 5px; text-align: center; font: 9px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #e2d4d9; }
.note.got .object-label { color: var(--accent); }
@keyframes glow { 50% { opacity: .45; transform: scale(.88); } }
@keyframes float { 50% { transform: translateY(-5px); } }
#buds { top: 59%; }
.bud { position: relative; width: 76px; height: 124px; }
.bud:nth-child(2) { translate: 0 -8px; }
.bud svg { position: relative; width: 100%; height: 100%; overflow: visible; }
.bud::before { content: ""; position: absolute; left: 10%; top: 0; width: 80%; height: 65%; background: radial-gradient(circle, var(--c), transparent 65%); opacity: .5; transition: opacity 500ms; }
.bud:not(:disabled)::before { animation: glow 3s infinite; }
.bud .closed { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 600ms, opacity 500ms; }
.bud:not(:disabled) .closed { animation: beckon 3s ease-in-out infinite; }
.bud .petals { transform-box: fill-box; transform-origin: 50% 100%; transform: scale(.4, .2) rotate(-7deg); opacity: 0; transition: transform 800ms cubic-bezier(.2,.8,.3,1.1), opacity 600ms; }
.bud.open .closed { transform: scale(.2); opacity: 0; animation: none; }.bud.open .petals { transform: none; opacity: 1; }
.bud.open::before { opacity: .6; }.bud .object-label { margin-top: 0; color: #eee2e5; }
.s3 .bud .object-label { color: var(--ink); }.s3 #buds { opacity: .8; transition: opacity 600ms; }
.letter {
  position: absolute; left: 50%; top: 53%; width: 106px; height: 74px; margin: -37px -53px;
  background: linear-gradient(145deg, #fcf5ea, #e9d9c8); border: 1px solid #a88e7e55; border-radius: 2px;
  box-shadow: 0 7px 25px #7e607233, 0 0 65px #fae9b866; animation: letter-light 4s ease-in-out infinite;
}
@keyframes letter-light { 50% { box-shadow: 0 7px 25px #7e607233, 0 0 75px #fae9b8aa; } }
.letter::before { content: ""; position: absolute; inset: 0; background: #e7d4c2; clip-path: polygon(0 0, 100% 0, 50% 58%); }
.letter::after { content: ""; position: absolute; inset: 0; border: 1px solid #ae978738; clip-path: polygon(0 100%, 50% 42%, 100% 100%); }
.seal { position: absolute; z-index: 1; left: 50%; top: 58%; translate: -50% -50%; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #a87383; color: #f0d6c8; font: 17px var(--serif); box-shadow: 0 1px 3px #70515e44; }
.letter.opened { animation: none; opacity: 0; pointer-events: none; }
#stage.is-letter-open #buds { opacity: .32; }

/* The payoff is a letter, not another challenge. Long copy can scroll naturally. */
#message {
  position: absolute; left: 35px; right: 35px; top: calc(var(--safe-t) + 24cqh);
  max-height: calc(66cqh - var(--safe-t) - var(--safe-b) - 60px); overflow-y: auto; overscroll-behavior: contain;
  padding: 26px 25px 27px; color: var(--ink); text-align: center;
  background: #faf5e8eb; border: 1px solid #bca8945e;
  box-shadow: 0 8px 35px #5e47661a; scrollbar-width: thin; scrollbar-color: #b9a5b9 transparent;
  font: 400 clamp(20px, 4.8cqw, 24px)/1.45 var(--serif);
  animation: ink 800ms both;
}
#message::before { content: ""; position: absolute; inset: 7px; border: 1px solid #c6b4a433; pointer-events: none; }
#message .eyebrow { font-size: 8px; color: #8b6b76; margin-bottom: 14px; }
#message .orn { margin: 0 0 8px; color: #b28a84; font-size: 24px; }
#message .greet { font-size: 1.5em; font-weight: 500; margin: 0 0 16px; line-height: 1.15; overflow-wrap: anywhere; }
#message p { margin: 0 0 15px; white-space: pre-line; overflow-wrap: anywhere; }
#message .closing { font: italic 500 1.45em/1.1 var(--serif); margin-top: 22px; }
#message .sign { font: 400 10px var(--sans); letter-spacing: .1em; margin: 20px 0 0; }

/* The title page shares the garden instead of hiding it behind a splash screen. */
#gate { position: absolute; inset: 0; text-align: center; transition: opacity 700ms, visibility 700ms; }
#gate.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-heading { position: absolute; left: 30px; right: 30px; top: 23%; }
.gate-heading > .eyebrow { font-size: 9px; letter-spacing: .25em; }
.gate-spark { display: block; width: 24px; height: 24px; fill: var(--gold); margin: 21px auto 17px; filter: drop-shadow(0 0 12px #e9c89d55); }
#experience-title { margin: 0; font: 400 clamp(42px, 10.3cqw, 62px)/.98 var(--serif); letter-spacing: -.035em; }
#experience-title span, #experience-title em { display: block; }
#experience-title em { margin-top: 6px; font-weight: 400; color: #ead6cb; }
.title-divider { display: flex; align-items: center; justify-content: center; gap: 13px; margin: 24px 0 15px; color: var(--gold); font: 16px var(--serif); }
.title-divider span { height: 1px; width: 45px; background: linear-gradient(90deg, transparent, #d1b68c77); }
.title-divider span:last-child { rotate: 180deg; }
.gate-description { margin: 0; font: italic 400 clamp(18px, 4.4cqw, 23px)/1.5 var(--serif); white-space: pre-line; color: #d9ccda; }
.gate-actions { position: absolute; top: 72%; left: 30px; right: 30px; display: flex; flex-direction: column; align-items: center; }
.begin-button {
  display: flex; align-items: center; justify-content: center; gap: 28px; min-height: 52px;
  padding: 8px 25px; border: 1px solid #d9c5a278; background: #25263870;
  color: #f1dfc6; font: 400 12px var(--sans); letter-spacing: .13em;
  transition: background 200ms, border-color 200ms;
}
.begin-button:hover { background: #dfc69a17; border-color: #dfc69a; }
.begin-button > span:last-child { font: 25px var(--serif); }
.gate-actions .quiet-action { color: #dbced7; margin-top: 5px; }
.gate-footnote { color: #bfb4c9; margin: 13px 0 0; font: 9px/1.6 var(--sans); letter-spacing: .06em; }
.prototype-note { position: absolute; left: 28px; right: 28px; bottom: calc(var(--safe-b) + 28px); margin: 0; font: 8px var(--sans); letter-spacing: .15em; color: #bfb4c9; text-transform: uppercase; }
.no-script { position: absolute; inset: 40% 30px auto; background: #171c35; padding: 30px; z-index: 5; }

/* Native dialog supplies focus trapping, Escape, and return-to-trigger behavior. */
#poem {
  padding: 0; border: 1px solid #c6b49e; width: min(440px, calc(100vw - 36px)); max-height: 86dvh;
  background: #f6efe3; color: var(--ink); color-scheme: light;
  box-shadow: 0 20px 80px #10112466; overflow: hidden;
}
#poem::backdrop { background: #181b32b8; backdrop-filter: blur(5px); }
.poem-paper { padding: 26px 25px 12px; text-align: center; }
.poem-paper > .eyebrow { color: #856675; font-size: 8px; }
.poem-ornament { display: block; color: #a58679; font: 24px var(--serif); margin-top: 13px; }
#poem-title { margin: 12px 0 22px; font: italic 400 34px var(--serif); }
#poem-body { max-height: 49dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
#poem-body p { margin: 0 0 24px; white-space: pre-line; overflow-wrap: anywhere; font: 400 23px/1.5 var(--serif); }
#poem form { margin-top: 13px; border-top: 1px solid #b5a4a24d; padding-top: 7px; }
#poem .text-action { color: #785c65; }

/* Few particles, and only after a touch. */
.petal { position: absolute; width: 9px; height: 6px; border-radius: 80% 0 80% 0; background: var(--c); animation: drift var(--t) ease-in-out both; }
@keyframes drift {
  0% { opacity: 0; transform: translate(0, 0) rotate(0); }
  15% { opacity: .8; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); }
}
.petal.glint { border-radius: 50%; background: #ffe5b6; box-shadow: 0 0 7px #f5d6a9; animation-name: stardust; }
@keyframes stardust {
  from { opacity: .9; transform: translate(0, 0) scale(.5); }
  45% { border-radius: 50%; background: #ffe5b6; }
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); border-radius: 80% 0 80% 0; background: var(--c); box-shadow: none; }
}

@media (max-width: 760px) { body::before, body::after { display: none; } }
@media (max-width: 380px) {
  .masthead { left: 30px; right: 27px; }.wordmark { font-size: 8px; letter-spacing: .18em; }
  #text { left: 29px; right: 29px; }.scene-footer { left: 25px; right: 25px; }
  #message { left: 27px; right: 27px; padding: 22px 18px; }
  .gate-heading { left: 24px; right: 24px; }#experience-title { font-size: 10.5cqw; }
}
@media (max-height: 700px) {
  .masthead { top: calc(var(--safe-t) + 20px); }.frame { inset: 12px; }
  .gate-heading { top: 20%; }.gate-spark { margin: 16px auto 12px; width: 20px; height: 20px; }
  #experience-title { font-size: min(10.5cqw, 52px); }.title-divider { margin: 17px 0 10px; }
  .gate-actions { top: 69%; }.gate-footnote { margin-top: 7px; }.prototype-note { bottom: calc(var(--safe-b) + 21px); }
  #chapter-heading { top: calc(var(--safe-t) + 12cqh); }#chapter-title { font-size: clamp(25px, 6.7cqw, 31px); }
  #text { top: calc(var(--safe-t) + 28cqh); max-height: 28cqh; font-size: 20px; }
  #text .fragment + .fragment { margin-top: 12px; }.fragment-number { font-size: 8px; }
  .scene-footer { bottom: calc(var(--safe-b) + 38px); }#hint { margin: 5px 0; font-size: 16px; }
  #chapter-marks { bottom: calc(var(--safe-b) + 21px); }.object-label { margin-top: 0; font-size: 8px; }
  .note { width: 64px; height: 65px; }.note:nth-child(2) { translate: 0 10px; }
  .bud { width: 62px; height: 87px; }#buds { top: 60%; }
  #message { top: calc(var(--safe-t) + 24cqh); font-size: 20px; padding-top: 18px; max-height: calc(68cqh - var(--safe-t) - var(--safe-b) - 55px); }
  #message p { margin-bottom: 11px; }
}
@media (max-height: 450px) {
  #stage { width: min(100%, 560px); }.masthead { top: 12px; }.wordmark { font-size: 8px; }
  .gate-heading { top: 19%; left: 20px; right: 20px; }.gate-heading > .eyebrow { font-size: 8px; }
  .gate-spark { display: none; }#experience-title { font-size: 40px; margin-top: 10px; }
  .title-divider { display: none; }.gate-description { font-size: 17px; margin-top: 12px; }
  .gate-actions { top: 73%; flex-direction: row; justify-content: center; gap: 12px; }
  .begin-button { min-height: 44px; padding: 5px 15px; font-size: 10px; gap: 14px; }
  .gate-actions .quiet-action { margin: 0; }.gate-footnote, .prototype-note { display: none; }
  #chapter-heading { top: 18%; }#chapter-number, .heading-flourish { display: none; }#chapter-title { font-size: 25px; }
  #text { top: 30%; max-height: 25cqh; font-size: 18px; left: 45px; right: 45px; }
  .interactions { top: 55%; left: 19%; right: 19%; }.note { height: 55px; }.note svg { width: 20px; height: 20px; }
  .object-label { display: none; }#buds { top: 56%; }.bud { height: 63px; width: 50px; }
  .star { top: 58%; width: 85px; height: 85px; margin: -42px; }.star svg { width: 30px; }
  .scene-footer { bottom: 25px; }.scene-footer #hint { display: none; }#collected { min-height: 44px; }
  #progress { font-size: 8px; }#next:not([hidden]) + #collected { position: absolute; right: 0; bottom: 0; }
  #chapter-marks { bottom: 15px; }.letter { top: 51%; width: 85px; height: 60px; margin: -30px -42px; }
  #message { top: 28%; max-height: 48cqh; left: 55px; right: 55px; font-size: 18px; }
  #after { flex-direction: row; gap: 15px; }
  .poem-paper { padding: 12px 20px 5px; }.poem-ornament { display: none; }#poem-title { font-size: 26px; margin: 6px 0 10px; }
  #poem-body { max-height: 37dvh; }#poem-body p { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
