:root {
  color-scheme: light;
  --paper: #f6f3eb;
  --paper-light: #fcfaf4;
  --ink: #343f3a;
  --muted: #68716a;
  --accent: #a84e36;
  --accent-dark: #783d30;
  --line: #d9d8cd;
  --sky: #ebe9dd;
  --sun: #e5b384;
  --water: #8caaa6;
  --rain: #7b9099;
  --white: #fffdf8;
  --overlay: #343f3a55;
  --serif: 'Lora', Georgia, serif;
  --sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;
  --text-xs: .6875rem;
  --text-sm: .8125rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.5rem;
  --text-xl: 2rem;
  --display: clamp(2.45rem, 4.2vw, 4.4rem);
  --display-small: clamp(2.5rem, 4vw, 4rem);
  --round: .625rem;
  --pill: 100rem;
  --hairline: 1px;
  --header-height: 6rem;
  --page-gutter: clamp(1.5rem, 5.6vw, 6rem);
  --duration: 240ms;
  --scene-duration: 1300ms;
  --paper-duration: 480ms;
  --flap-duration: 420ms;
  --flower-duration: 460ms;
  --flower-stagger: 45ms;
  --paper-fold: #e9e3d6;
  --petal-peach: #d2a28c;
  --petal-cream: #ead0a8;
  --leaf: #6e8781;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + var(--space-5)); }
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--text-base)/1.75 var(--sans); -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0; z-index: 6; pointer-events: none; opacity: .2; background-image: url('./assets/grain.svg'); }
::selection { background: var(--sun); color: var(--accent-dark); }
button, textarea { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: .3em; }
button:focus-visible, a:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: var(--space-1); }
button:disabled { cursor: wait; opacity: .6; }
button:active, .primary-link:active { transform: translateY(1px); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: var(--space-4); left: var(--space-4); z-index: 20; transform: translateY(-200%); padding: var(--space-3) var(--space-5); background: var(--ink); color: var(--white); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); height: var(--header-height); padding-inline: var(--page-gutter); border-bottom: var(--hairline) solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; min-height: var(--space-7); font: 600 var(--text-lg)/1 var(--serif); white-space: nowrap; }
.wordmark svg { width: 2.4rem; height: var(--space-6); stroke: var(--accent); fill: none; stroke-width: 1.3; }
.wordmark-dot { color: var(--accent); }
.header-caption { margin: 0; color: var(--muted); font-size: var(--text-sm); letter-spacing: .03em; }
.header-actions { display: flex; align-items: center; gap: var(--space-5); }
.quiet-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--space-7); padding: var(--space-2) var(--space-3); background: transparent; color: var(--ink); border: var(--hairline) solid transparent; font-size: var(--text-sm); transition: color var(--duration), border-color var(--duration); }
.quiet-button:hover { color: var(--accent); border-bottom-color: var(--accent); }
.motion-icon { font-family: var(--serif); font-size: var(--text-lg); color: var(--accent); }
.keep-button { border: var(--hairline) solid var(--line); border-radius: var(--pill); padding-inline: var(--space-5); }
.journey { display: grid; grid-template-columns: 46% 54%; align-items: start; padding-inline: var(--page-gutter); position: relative; }
.chapters { grid-column: 1; grid-row: 1; min-width: 0; }
.chapter { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 100svh; padding-block: var(--space-9); padding-right: var(--space-5); }
.chapter-opening { min-height: calc(100svh - var(--header-height)); padding-top: var(--space-8); }
.eyebrow { margin: 0 0 var(--space-6); color: var(--accent); font-size: var(--text-xs); font-weight: 600; line-height: 1.7; letter-spacing: .15em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 400; text-wrap: balance; }
.chapter h1, .chapter h2 { font-size: var(--display); line-height: 1.2; letter-spacing: -.05em; }
.chapter h1 span, .chapter h2 span { display: block; }
.chapter-opening h1 span:last-child { color: var(--accent); font-style: italic; }
.chapter-copy { max-width: 36rem; margin-top: var(--space-6); color: var(--muted); font-size: var(--text-base); line-height: 1.9; }
.chapter-copy p { margin: 0 0 var(--space-4); }
.chapter-copy p:last-child { margin-bottom: 0; }
.primary-link { display: inline-flex; align-items: center; gap: var(--space-6); padding-block: var(--space-3); margin-top: var(--space-5); min-height: var(--space-7); border-bottom: var(--hairline) solid var(--accent); color: var(--accent); font-size: var(--text-sm); text-decoration: none; transition: gap var(--duration); }
.primary-link:hover { gap: var(--space-7); }
.primary-link span { font-size: var(--text-lg); }
.margin-note { position: relative; margin: var(--space-7) 0 0; padding-left: var(--space-6); max-width: 29rem; font: italic var(--text-sm)/1.8 var(--serif); color: var(--muted); }
.margin-note::before { position: absolute; left: 0; top: .6em; content: ''; width: var(--space-4); height: var(--hairline); background: var(--accent); }
.world { grid-column: 2; grid-row: 1; position: sticky; z-index: 3; top: var(--space-6); display: flex; flex-direction: column; justify-content: center; min-width: 0; height: calc(100svh - var(--space-8)); max-height: 56rem; padding-left: var(--space-4); --boat-left-x: 137px; --boat-left-y: 348px; --boat-right-x: 560px; --boat-right-y: 362px; --scene-sky: var(--sky); --scene-sun: var(--sun); }
.world { --sun-y: 0px; --sun-opacity: 1; --cloud-y: -20px; --cloud-opacity: 0; --rain-opacity: 0; --heart-y: -30px; --heart-opacity: 0; --sparkles-opacity: 0; --halo-opacity: .12; }
.scene-meta { display: flex; justify-content: space-between; padding-inline: var(--space-6); align-items: center; color: var(--muted); font-size: var(--text-xs); letter-spacing: .1em; }
.scene-tools { display: flex; align-items: center; gap: var(--space-4); }
.scene-motion-toggle { min-height: 2.75rem; font-size: var(--text-xs); color: var(--muted); letter-spacing: 0; }
.scene-small-note { font: italic var(--text-sm)/1.4 var(--serif); letter-spacing: 0; }
.landscape { display: block; width: 100%; max-height: 67svh; overflow: visible; }
.sky-disc { fill: var(--scene-sky); transition: fill var(--scene-duration); }
.sun { fill: var(--scene-sun); transform: translateY(var(--sun-y)); opacity: var(--sun-opacity); transform-origin: 445px 221px; transition: fill var(--scene-duration), transform var(--scene-duration), opacity var(--scene-duration); }
.sun-halo { fill: var(--scene-sun); opacity: var(--halo-opacity); transition: fill var(--scene-duration), opacity var(--scene-duration); }
.sky-lines { stroke: var(--muted); stroke-width: 1.25; opacity: .6; }
.stars { color: var(--accent); opacity: .7; }
.city { stroke: var(--muted); stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.bank { stroke: var(--water); }
.city-label { fill: var(--muted); font: 10px var(--sans); letter-spacing: 2px; text-anchor: middle; }
.connection { stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 3 8; opacity: .65; transition: opacity var(--scene-duration); }
.connection-heart { stroke: var(--accent); stroke-width: 1.6; transform: translateY(var(--heart-y)); opacity: var(--heart-opacity); transition: opacity var(--scene-duration), transform var(--scene-duration); }
.water { stroke: var(--water); stroke-width: 1.5; stroke-linecap: round; }
.water path:nth-child(2) { opacity: .75; }
.water path:nth-child(3) { opacity: .5; }
.water path:nth-child(4) { opacity: .35; }
.boat-position { transition: transform var(--scene-duration) var(--ease); }
.boat-left { transform: translate(var(--boat-left-x), var(--boat-left-y)); }
.boat-right { transform: translate(var(--boat-right-x), var(--boat-right-y)); }
.boat-hull { fill: var(--boat-fill, var(--accent)); stroke: var(--boat-stroke, var(--accent-dark)); stroke-width: 1.4; stroke-linejoin: round; }
.boat-sail { fill: var(--paper-light); stroke: var(--boat-stroke, var(--accent-dark)); stroke-width: 1.4; stroke-linejoin: round; }
.boat-fold { fill: none; stroke: var(--boat-stroke, var(--accent-dark)); stroke-width: 1.3; }
.boat-right { --boat-fill: var(--water); --boat-stroke: var(--ink); }
.clouds { stroke: var(--rain); fill: var(--paper); stroke-width: 1.3; opacity: var(--cloud-opacity); transform: translateY(var(--cloud-y)); transition: opacity var(--scene-duration), transform var(--scene-duration); }
.rain { color: var(--rain); opacity: var(--rain-opacity); transition: opacity var(--scene-duration); }
.dawn-sparkles { color: var(--accent); opacity: var(--sparkles-opacity); transition: opacity var(--scene-duration); }
.paper-grain { pointer-events: none; color: var(--ink); }
.scene-caption { display: flex; justify-content: center; align-items: center; gap: var(--space-3); color: var(--muted); font: italic var(--text-sm)/1.5 var(--serif); text-align: center; padding-inline: var(--space-4); }
.caption-mark { font-size: var(--text-lg); color: var(--accent); }
.world[data-scene='busy'] { --scene-sky: #e5e7e2; --scene-sun: #d2bc9e; --boat-left-x: 180px; --boat-right-x: 518px; --sun-y: 20px; --sun-opacity: .7; --cloud-y: 0px; --cloud-opacity: .8; }
.world[data-scene='storm'] { --scene-sky: #dce2e1; --scene-sun: #c0c9c6; --boat-left-x: 208px; --boat-left-y: 340px; --boat-right-x: 485px; --boat-right-y: 370px; --sun-opacity: .15; --cloud-y: 12px; --cloud-opacity: 1; --rain-opacity: .65; }
.world[data-scene='storm'] .connection, .world[data-scene='storm'] .stars { opacity: .15; }
.world[data-scene='together'] { --scene-sky: #eae6d9; --scene-sun: #dfbc94; --boat-left-x: 277px; --boat-left-y: 350px; --boat-right-x: 434px; --boat-right-y: 355px; --heart-opacity: .85; --heart-y: 0px; }
.world[data-scene='dawn'] { --scene-sky: #eee6d5; --scene-sun: #e3ac79; --boat-left-x: 302px; --boat-left-y: 354px; --boat-right-x: 426px; --boat-right-y: 356px; --sun-y: -30px; --halo-opacity: .22; --sparkles-opacity: 1; --heart-opacity: 1; --heart-y: 0px; }
.world[data-scene='dawn'] .connection { opacity: .3; }
html[data-motion='on'] .boat-bob { animation: float 5s ease-in-out infinite; transform-origin: center; }
html[data-motion='on'] .boat-right .boat-bob { animation-delay: -2s; animation-duration: 6s; }
html[data-motion='on'] .world[data-scene='storm'] .rain { animation: rainfall 2s linear infinite; }
html[data-motion='on'] .world[data-scene='storm'] .boat-bob { animation-duration: 3s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1deg); } }
@keyframes rainfall { from { transform: translateY(-16px); } to { transform: translateY(16px); } }
.letter-section { display: grid; grid-template-columns: .85fr 1.15fr; align-items: start; gap: var(--space-9); padding: var(--space-10) var(--page-gutter); border-block: var(--hairline) solid var(--line); background: var(--paper-light); }
.letter-intro { padding-top: var(--space-6); }
.letter-intro h2 { max-width: 25rem; font-size: var(--display-small); line-height: 1.2; letter-spacing: -.045em; }
.letter-intro > p:not(.eyebrow) { margin-top: var(--space-6); color: var(--muted); max-width: 22rem; }
.handwritten { display: block; padding-top: var(--space-8); color: var(--accent); font: italic var(--text-base)/1.6 var(--serif); transform: rotate(-5deg); }
.letter-envelope { background: var(--paper); border: var(--hairline) solid var(--line); }
.letter-envelope > summary { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 22rem; list-style: none; padding: var(--space-8); cursor: pointer; background: var(--paper); }
.letter-envelope > summary::before { content: ''; position: absolute; inset: 0 0 auto; height: var(--space-9); background: var(--paper-fold); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: center top; transition: transform var(--flap-duration) var(--ease), opacity var(--flap-duration); pointer-events: none; opacity: .6; }
.letter-envelope[open] > summary::before { transform: perspective(500px) rotateX(160deg); opacity: 0; }
summary::-webkit-details-marker { display: none; }
.envelope-address { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.envelope-address .eyebrow { margin-bottom: var(--space-4); color: var(--muted); }
.recipient-name { font: italic clamp(2.8rem, 4vw, 4rem)/1.2 var(--serif); color: var(--accent); letter-spacing: -.03em; }
.envelope-sublabel { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--muted); }
.wax-seal { position: absolute; right: var(--space-7); top: var(--space-7); display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--accent); color: var(--paper-light); font: italic var(--text-xl)/1 var(--serif); transform: rotate(-13deg); border: 3px double var(--paper); transition: transform var(--duration); }
.letter-envelope > summary:hover .wax-seal { transform: rotate(4deg); }
.open-letter-label { align-self: flex-start; margin-top: var(--space-7); padding-bottom: var(--space-1); color: var(--accent); border-bottom: var(--hairline) solid var(--accent); font-size: var(--text-sm); }
.letter-envelope[open] > summary { min-height: auto; padding-block: var(--space-7); border-bottom: var(--hairline) solid var(--line); }
.letter-envelope[open] .open-letter-label { margin-top: var(--space-5); }
.letter-envelope[open] .recipient-name { font-size: var(--text-xl); }
.letter-paper { padding: var(--space-7) var(--space-8); background: var(--white); }
.letter-paper > p { margin: 0 0 var(--space-5); font-size: var(--text-base); line-height: 1.9; }
.letter-paper .letter-greeting { font: italic var(--text-lg)/1.5 var(--serif); color: var(--accent); margin-bottom: var(--space-6); }
.signature { padding-top: var(--space-3); }
.signature span { display: inline-block; padding-top: var(--space-2); font: italic var(--text-xl)/1.5 var(--serif); color: var(--accent); }
.postscript { margin-top: var(--space-7); border-top: var(--hairline) solid var(--line); font-size: var(--text-sm); }
.postscript > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--space-7); padding-block: var(--space-3); cursor: pointer; color: var(--accent); }
.postscript > p { padding-bottom: var(--space-3); }
.paper-surprise { margin-top: var(--space-5); border-block: var(--hairline) solid var(--line); }
.paper-surprise > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--space-7); padding-block: var(--space-3); color: var(--accent); font-size: var(--text-sm); cursor: pointer; list-style: none; }
.surprise-star { display: inline-block; font-size: var(--text-lg); transition: transform var(--duration) var(--ease); }
.paper-surprise > summary:hover .surprise-star, .paper-surprise[open] .surprise-star { transform: rotate(90deg); }
.bouquet-card { padding: var(--space-4) 0 var(--space-6); }
.paper-bouquet { display: block; width: min(100%, 22rem); height: auto; margin-inline: auto; }
.bouquet-sun { fill: var(--paper-fold); opacity: .5; }
.bouquet-stems { fill: none; stroke: var(--leaf); stroke-width: 2; stroke-linecap: round; }
.bouquet-leaf { fill: var(--leaf); stroke: var(--leaf); opacity: .9; }
.paper-flower { fill: var(--accent); stroke: var(--accent-dark); stroke-width: .8; }
.flower-right { fill: var(--petal-peach); }
.flower-top { fill: var(--petal-cream); }
.flower-center { fill: var(--paper-light); stroke: var(--accent-dark); }
.bouquet-wrapper { fill: var(--paper-fold); stroke: var(--muted); stroke-width: 1; stroke-linejoin: round; }
.paper-fold { fill: none; opacity: .55; }
.bouquet-ribbon { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.bouquet-dots { fill: var(--accent); stroke: var(--accent); stroke-width: 1.5; }
.bouquet-card .eyebrow { margin-top: var(--space-4); margin-bottom: var(--space-3); }
.bouquet-card h3 { margin: 0; color: var(--accent); font: 400 var(--text-lg)/1.4 var(--serif); text-wrap: balance; }
.bouquet-message { margin: var(--space-4) 0 0; font-size: var(--text-sm); line-height: 1.85; color: var(--muted); }
html[data-motion='on'] .letter-envelope[open] .letter-paper { animation: paper-unfold var(--paper-duration) var(--ease); }
html[data-motion='on'] .paper-surprise[open] .paper-flower { animation: paper-bloom var(--flower-duration) var(--ease) both; }
html[data-motion='on'] .paper-surprise[open] .flower-right { animation-delay: var(--flower-stagger); }
html[data-motion='on'] .paper-surprise[open] .flower-top { animation-delay: calc(2 * var(--flower-stagger)); }
@keyframes paper-unfold { from { opacity: .45; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes paper-bloom { from { opacity: .25; transform: scale(.4) rotate(-12deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
.reply-area { margin-top: var(--space-6); }
.primary-button { min-height: var(--space-7); padding: var(--space-3) var(--space-5); display: inline-flex; gap: var(--space-5); justify-content: center; align-items: center; border: var(--hairline) solid var(--accent); border-radius: var(--pill); background: var(--accent); color: var(--white); font-size: var(--text-sm); transition: background var(--duration); }
.primary-button:hover { background: var(--accent-dark); }
.reply-explanation { font-size: var(--text-sm); color: var(--muted); line-height: 1.7; }
.reply-text { width: 100%; min-height: 9rem; padding: var(--space-4); border: var(--hairline) solid var(--line); color: var(--ink); background: var(--paper); border-radius: var(--round); resize: vertical; }
.site-footer { display: flex; justify-content: space-between; gap: var(--space-6); align-items: center; padding: var(--space-8) var(--page-gutter) var(--space-10); }
.site-footer > a { font-size: var(--text-sm); min-height: var(--space-7); display: inline-flex; align-items: center; gap: var(--space-4); }
.site-footer p { font: var(--text-base)/1.8 var(--serif); margin: 0; }
.site-footer p span { color: var(--muted); font-style: italic; font-size: var(--text-sm); }
.footer-flower { font-size: var(--display-small); color: var(--accent); }
.chapter-navigation { position: fixed; z-index: 7; bottom: calc(var(--space-5) + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; padding-inline: var(--space-3); border: var(--hairline) solid var(--line); border-radius: var(--pill); background: var(--paper-light); max-width: calc(100% - var(--space-6)); }
.chapter-navigation a { display: flex; align-items: center; justify-content: center; gap: var(--space-3); min-width: 2.75rem; min-height: 3rem; padding-inline: var(--space-3); color: var(--muted); text-decoration: none; border-radius: var(--pill); font-size: var(--text-xs); white-space: nowrap; }
.chapter-dot { width: .375rem; height: .375rem; background: var(--muted); border-radius: 50%; flex-shrink: 0; }
.nav-label { display: none; }
.chapter-navigation a[aria-current] { color: var(--accent); }
.chapter-navigation a[aria-current] .chapter-dot { background: var(--accent); }
.chapter-navigation a[aria-current] .nav-label { display: inline; }
.chapter-navigation a:hover { background: var(--sky); }
.update-banner { position: fixed; z-index: 10; left: 50%; top: var(--space-4); transform: translateX(-50%); display: flex; align-items: center; justify-content: center; gap: var(--space-5); width: max-content; max-width: calc(100% - var(--space-6)); padding: var(--space-2) var(--space-5); background: var(--ink); color: var(--white); border-radius: var(--round); font-size: var(--text-sm); }
.update-banner .quiet-button { color: var(--white); text-decoration: underline; }
.install-dialog { width: min(32rem, calc(100% - var(--space-6))); padding: var(--space-7); border: var(--hairline) solid var(--line); border-radius: var(--round); background: var(--paper-light); color: var(--ink); max-height: 85svh; }
.install-dialog::backdrop { background: var(--overlay); backdrop-filter: blur(4px); }
.dialog-heading { display: flex; justify-content: space-between; gap: var(--space-4); align-items: center; }
.dialog-heading .eyebrow { margin: 0; }
.icon-button { display: grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0; border: var(--hairline) solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: var(--text-lg); }
.icon-button:hover { color: var(--accent); border-color: var(--accent); }
.install-dialog h2 { font-size: var(--text-xl); line-height: 1.35; margin-top: var(--space-5); }
.install-explanation { font-size: var(--text-base); margin-block: var(--space-5); }
.offline-status { font-size: var(--text-sm); color: var(--muted); padding-top: var(--space-4); border-top: var(--hairline) solid var(--line); }
html[data-motion='off'] { scroll-behavior: auto; }
html[data-motion='off'] *, html[data-motion='off'] *::before, html[data-motion='off'] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion='on']) { scroll-behavior: auto; }
  html:not([data-motion='on']) *, html:not([data-motion='on']) *::before, html:not([data-motion='on']) *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 1500px) { .journey { max-width: 110rem; margin-inline: auto; } }
@media (min-width: 701px) { .letter-intro { position: sticky; top: var(--space-6); } }
@media (max-width: 1100px) { .header-caption { display: none; } .journey { grid-template-columns: 48% 52%; } .chapter h1, .chapter h2 { font-size: clamp(2.4rem, 4.5vw, 3.5rem); } .scene-small-note { display: none; } .letter-section { gap: var(--space-7); } .letter-paper { padding: var(--space-7); } }
@media (max-width: 700px) {
  :root { --header-height: 4.5rem; --page-gutter: 1.5rem; }
  .site-header { position: relative; gap: var(--space-3); }
  .wordmark { font-size: var(--text-md); gap: var(--space-2); }
  .wordmark svg { width: 2rem; }
  .header-actions { gap: var(--space-1); }
  .keep-button { padding-inline: var(--space-3); font-size: var(--text-xs); }
  .motion-toggle { width: 2.75rem; padding-inline: var(--space-2); }
  .motion-label { display: none; }
  .journey { display: block; padding-inline: 0; }
  .world { position: sticky; top: 0; z-index: 3; height: 40svh; min-height: 14rem; max-height: 23rem; padding: var(--space-3) var(--space-4) var(--space-4); background: var(--paper); border-bottom: var(--hairline) solid var(--line); }
  .scene-meta { padding-inline: var(--space-4); font-size: .5625rem; }
  .scene-small-note { display: none; }
  .scene-tools { gap: var(--space-2); }
  .scene-motion-toggle { font-size: var(--text-xs); padding-inline: var(--space-2); }
  .landscape { flex: 1; min-height: 0; max-height: none; margin-block: -.75rem; }
  .scene-caption { display: none; }
  .caption-mark { font-size: var(--text-md); }
  .chapter { min-height: 88svh; justify-content: flex-start; padding: var(--space-8) var(--page-gutter) var(--space-9); scroll-margin-top: 40svh; }
  .chapter-opening { min-height: 76svh; padding-top: var(--space-6); }
  .chapter h1, .chapter h2 { font-size: clamp(2.15rem, 8.8vw, 3.7rem); line-height: 1.15; letter-spacing: -.045em; }
  .eyebrow { margin-bottom: var(--space-5); font-size: .625rem; }
  .chapter-copy { margin-top: var(--space-5); font-size: .9375rem; line-height: 1.85; }
  .margin-note { margin-top: var(--space-6); font-size: var(--text-sm); }
  .primary-link { margin-top: var(--space-4); }
  .letter-section { grid-template-columns: 1fr; gap: var(--space-7); padding-block: var(--space-8); }
  .letter-intro { padding-top: 0; }
  .letter-intro h2 { max-width: 19rem; font-size: 2.8rem; }
  .letter-intro .eyebrow { max-width: 19rem; }
  .handwritten { padding-top: var(--space-4); transform: rotate(-3deg); }
  .letter-envelope > summary { min-height: 20rem; padding: var(--space-6); }
  .recipient-name { font-size: 3rem; }
  .wax-seal { top: var(--space-5); right: var(--space-5); width: 2.75rem; height: 2.75rem; font-size: var(--text-lg); }
  .letter-paper { padding: var(--space-6) var(--space-5); }
  .letter-paper > p { font-size: .9375rem; }
  .letter-envelope[open] > summary { padding: var(--space-6) var(--space-5); }
  .letter-envelope[open] .wax-seal { width: 2rem; height: 2rem; font-size: var(--text-base); }
  .envelope-sublabel { max-width: 13rem; }
  .chapter-navigation { position: static; transform: none; flex-shrink: 0; width: max-content; margin-inline: auto; padding-inline: var(--space-2); border: none; background: transparent; }
  .chapter-navigation a { min-width: 2.75rem; padding-inline: var(--space-2); gap: var(--space-2); }
  .chapter-navigation a[aria-current] .nav-label { max-width: 7rem; overflow: hidden; text-overflow: ellipsis; }
  .site-footer { flex-wrap: wrap; padding-block: var(--space-7) var(--space-10); align-items: flex-start; }
  .site-footer > a { order: 2; width: 100%; }
  .site-footer p { max-width: 15rem; }
  .footer-flower { font-size: 2rem; }
  .install-dialog { padding: var(--space-5); }
}
@media (max-height: 620px) and (max-width: 700px) { .world { position: relative; min-height: 15rem; } .chapter { scroll-margin-top: var(--space-4); } }
@media print { .site-header, .chapter-navigation, .world, .header-actions, .reply-area, .install-dialog { display: none; } .journey, .letter-section { display: block; } .chapter { min-height: auto; padding: var(--space-6); break-inside: avoid; } .letter-envelope > summary { min-height: auto; } body::before { display: none; } }

/* Archival correspondence art direction */
:root {
  --paper: #f1e8d7;
  --paper-light: #faf5e9;
  --white: #fffaf0;
  --ink: #39292c;
  --muted: #66564f;
  --accent: #743744;
  --accent-dark: #512731;
  --line: #c8b99f;
  --sky: #e9deca;
  --sun: #d6b27f;
  --water: #70847b;
  --rain: #6f7d81;
  --overlay: #241b1d88;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
  --petal-peach: #bc827b;
  --petal-cream: #dbc69b;
  --leaf: #68786a;
  --page-gutter: clamp(1.5rem, 6vw, 7rem);
  --header-height: 7rem;
}
body { background: var(--paper); color: var(--ink); font-size: .9375rem; line-height: 1.85; }
body::before { opacity: .12; mix-blend-mode: multiply; }
::selection { background: #d6bd9e; color: var(--accent-dark); }
.site-header { min-height: var(--header-height); height: auto; padding-block: 1rem; border-bottom: 3px double var(--line); }
.wordmark { gap: .75rem; font-size: 1.75rem; font-weight: 500; letter-spacing: -.035em; }
.wordmark svg { width: 2.55rem; height: 2rem; stroke: var(--accent); }
.wordmark-dot { color: #9b7151; }
.header-caption { font: italic 1.1rem/1.2 var(--serif); color: var(--muted); letter-spacing: .01em; }
.header-actions { gap: 1rem; }
.quiet-button { min-height: 2.75rem; color: var(--accent-dark); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.keep-button { border-radius: 0; border-color: var(--line); border-inline: 0; padding-inline: .7rem; }
.quiet-button:hover { border-bottom-color: var(--accent); color: var(--accent); }
.motion-icon { color: #98764f; }
.edition-mark { display: flex; flex-direction: column; align-items: center; gap: .3rem; margin: 0; color: var(--muted); font-size: .625rem; font-weight: 600; letter-spacing: .19em; line-height: 1.5; text-transform: uppercase; }
.edition-name { color: var(--accent-dark); font: italic 1.22rem/1.2 var(--serif); letter-spacing: .015em; text-transform: none; }
.letter-intro-copy { color: var(--muted); }
.journey { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); }
.chapter { padding-right: clamp(1rem, 3vw, 3rem); }
.chapter-opening { position: relative; }
.chapter-opening::before { content: '❧'; position: absolute; top: 15%; right: 5%; color: #a78962; font: 2rem/1 var(--serif); opacity: .72; }
.eyebrow { color: var(--accent); font-size: .625rem; font-weight: 600; letter-spacing: .2em; }
.chapter h1, .chapter h2 { color: var(--ink); font-size: clamp(3.1rem, 5.5vw, 6.25rem); line-height: .99; letter-spacing: -.045em; }
.chapter-opening h1 span:last-child { color: var(--accent); }
.chapter-copy { max-width: 34rem; margin-top: 2rem; color: #51423d; font-size: .9375rem; line-height: 1.95; }
.margin-note { margin-top: 2rem; color: var(--muted); font-size: 1.05rem; }
.primary-link { min-height: 2.75rem; color: var(--accent); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.primary-link span { color: #96744f; }
.world { padding-left: 0; }
.scene-meta { padding-inline: 1.2rem; color: #5d5148; font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; }
.scene-motion-toggle { min-height: 2.75rem; padding-inline: .5rem; font-size: .6rem; }
.scene-small-note { color: var(--muted); font-size: 1rem; }
.landscape { filter: drop-shadow(0 1.2rem 1.4rem #5b41301c); }
.painted-landscape { opacity: .94; mix-blend-mode: multiply; pointer-events: none; }
.sky-disc { opacity: .22; }
.sun-halo { opacity: calc(var(--halo-opacity) * .75); }
.sun { opacity: calc(var(--sun-opacity) * .78); }
.sky-lines { opacity: .28; }
.city { opacity: .34; stroke: #655649; }
.city .bank { stroke: #78877c; opacity: .72; }
.city-label { fill: #594942; font-family: var(--sans); font-size: 11px; letter-spacing: 2.5px; }
.connection { stroke: var(--accent); opacity: .52; }
.water { stroke: #74867c; opacity: .7; }
.boat-hull { fill: var(--boat-fill, #773844); stroke: var(--boat-stroke, #482830); filter: drop-shadow(0 3px 2px #40272b42); }
.boat-sail { fill: #fff8e9; }
.boat-right { --boat-fill: #879084; --boat-stroke: #3e4842; }
.clouds { fill: #f5ebd9; stroke: #6e6660; }
.rain { color: #586c71; opacity: calc(var(--rain-opacity) * .7); }
.scene-caption { padding-top: .6rem; color: var(--muted); font-size: 1rem; }
.caption-mark { color: #9a7853; }
.chapter-navigation { gap: .2rem; padding: .25rem .45rem; border-color: #bda98c; border-radius: 0; background: #f8f0e1ed; box-shadow: 0 4px 15px #46352812; }
.chapter-navigation a { min-width: 2.75rem; min-height: 2.75rem; border-radius: 0; color: #5d5049; font-size: .63rem; letter-spacing: .06em; }
.chapter-dot { width: .3rem; height: .3rem; background: #938374; }
.chapter-navigation a[aria-current] { color: var(--accent-dark); }
.chapter-navigation a[aria-current] .chapter-dot { background: var(--accent); }
.chapter-navigation a:hover { background: #e9deca; }
.letter-section { position: relative; grid-template-columns: minmax(15rem, .8fr) minmax(0, 1.2fr); gap: clamp(2.5rem, 7vw, 7rem); padding-block: clamp(5rem, 10vw, 9rem); border-block: 3px double #bdab8b; background: #f7f0e3; }
.letter-section::before { content: ''; position: absolute; inset: .65rem var(--page-gutter); border-block: 1px solid #c9b899; pointer-events: none; }
.letter-intro { padding-top: 1.5rem; }
.letter-intro h2 { max-width: 31rem; color: var(--accent-dark); font-size: clamp(3.35rem, 6vw, 6rem); line-height: .98; letter-spacing: -.04em; }
.letter-intro > p:not(.eyebrow) { max-width: 24rem; margin-top: 1.6rem; color: #51423d; }
.handwritten { padding-top: 2.4rem; color: var(--accent); font-size: 1.15rem; }
.letter-envelope { position: relative; border: 1px solid #c7b795; border-radius: 0; background: #fcf6e9; box-shadow: 7px 8px 0 #dfd2bc; }
.letter-envelope > summary { min-height: 26rem; padding: clamp(2rem, 5vw, 4.5rem); background: linear-gradient(145deg, #fcf7eb, #f4ead8); }
.letter-envelope > summary::before { height: 7rem; background: #e9dcc4; opacity: .4; }
.letter-envelope > summary:hover { background: #fff9ed; }
.envelope-address .eyebrow { margin-bottom: 1rem; }
.recipient-name { max-width: 85%; color: var(--accent); font-size: clamp(3.3rem, 5vw, 5.25rem); line-height: .98; }
.envelope-sublabel { color: var(--muted); font-size: .78rem; letter-spacing: .04em; }
.wax-seal { top: 2rem; right: 2rem; width: 3.6rem; height: 3.6rem; border: 3px double #ead8b9; border-radius: 50%; background: var(--accent); box-shadow: 0 2px 4px #43272b33; }
.open-letter-label { min-height: 2.75rem; margin-top: 2.25rem; padding: .65rem 0 .3rem; border-bottom: 1px solid #9b745a; color: var(--accent); font-size: .68rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.letter-envelope[open] > summary { min-height: 0; padding-block: 1.6rem; background: #f6eddd; }
.letter-envelope[open] .recipient-name { font-size: 2.3rem; line-height: 1.1; }
.letter-paper { padding: clamp(1.6rem, 4vw, 3.5rem); background-color: #fffaf0; background-image: repeating-linear-gradient(transparent 0 2.4rem, #d9cdb93b 2.4rem calc(2.4rem + 1px)); }
.letter-paper > p { color: #3e302f; font-size: .95rem; line-height: 1.9; }
.letter-paper .letter-greeting { color: var(--accent); font-size: 1.65rem; }
.signature span { color: var(--accent); font-size: 2rem; }
.postscript, .paper-surprise { border-color: #bca98d; }
.postscript > summary, .paper-surprise > summary { min-height: 2.75rem; color: var(--accent); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.paper-surprise { border-block: 1px solid #bca98d; }
.surprise-star { color: #95734d; }
.paper-bouquet { display: grid; place-items: center; width: min(100%, 27rem); margin: .5rem auto 1.25rem; }
.paper-bouquet .painted-bouquet { display: block; width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: contain; filter: drop-shadow(0 8px 10px #4b392221); transform-origin: 50% 80%; }
.bouquet-card { padding: 1rem 0 2rem; }
.bouquet-card .eyebrow { margin-top: 1rem; }
.bouquet-card h3 { color: var(--accent); font-size: 2rem; }
.bouquet-message { color: #51423d; font-size: .9rem; }
.reply-area { border-top: 1px solid #c5b393; padding-top: 1.5rem; }
.primary-button { min-height: 2.75rem; padding-inline: 1.5rem; border-radius: 0; border-color: var(--accent); background: var(--accent); font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.reply-explanation { color: var(--muted); }
.reply-text { border-radius: 0; border-color: #bca98d; background: #fffaf0; }
.site-footer { border-top: 3px double var(--line); }
.site-footer > a { min-height: 2.75rem; color: var(--accent); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.site-footer p { color: var(--accent-dark); font-size: 1.3rem; }
.site-footer p span { color: var(--muted); }
.footer-flower { color: #91714d; }
.update-banner { border: 1px solid #d7c7aa; border-radius: 0; background: var(--accent-dark); }
.install-dialog { border-radius: 0; border-color: #bca98d; background: var(--paper-light); }
.install-dialog h2 { color: var(--accent); font-size: 2.5rem; }
.icon-button { border-radius: 0; }
button:focus-visible, a:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 3px solid #963c4e; outline-offset: 3px; }
summary { min-height: 2.75rem; }
@media (max-width: 1100px) {
  .site-header { gap: 1rem; }
  .motion-label { display: none; }
  .motion-toggle { width: 2.75rem; min-width: 2.75rem; padding-inline: 0; }
  .journey { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .chapter h1, .chapter h2 { font-size: clamp(3rem, 5vw, 4.5rem); }
  .letter-section { gap: 2.5rem; }
}
@media (max-width: 700px) {
  :root { --header-height: 4.7rem; --page-gutter: 1.25rem; }
  .site-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .75rem; min-height: var(--header-height); padding-block: .65rem; border-bottom-width: 3px; }
  .wordmark { grid-column: 1; grid-row: 1; font-size: 1.55rem; }
  .wordmark svg { width: 1.9rem; }
  .edition-mark { grid-column: 1 / -1; grid-row: 2; flex-direction: row; justify-content: center; align-items: baseline; gap: .6rem; font-size: .6rem; }
  .edition-name { font-size: 1rem; }
  .header-actions { grid-column: 2; grid-row: 1; gap: .2rem; }
  .keep-button { flex-shrink: 0; min-height: 2.75rem; padding-inline: .5rem; font-size: .55rem; letter-spacing: .04em; white-space: nowrap; }
  .motion-toggle { flex-shrink: 0; min-height: 2.75rem; width: 2.75rem; }
  .journey { display: block; padding-inline: 0; }
  .world { position: sticky; top: 0; z-index: 3; height: 40svh; min-height: 14rem; max-height: 23rem; padding: .65rem .75rem .75rem; background: var(--paper); border-bottom: 3px double var(--line); }
  .scene-meta { padding-inline: .5rem; font-size: .55rem; }
  .scene-tools { gap: .25rem; }
  .scene-motion-toggle { min-width: 2.75rem; padding-inline: .3rem; font-size: .58rem; }
  .landscape { margin-block: -.55rem; }
  .chapter { min-height: 88svh; padding: 4.5rem var(--page-gutter) 5rem; scroll-margin-top: 40svh; }
  .chapter-opening { min-height: 76svh; padding-top: 3.5rem; }
  .chapter-opening::before { top: 2.5rem; right: 1rem; font-size: 1.5rem; }
  .chapter h1, .chapter h2 { font-size: clamp(3rem, 12vw, 4.4rem); line-height: .98; letter-spacing: -.04em; }
  .eyebrow { margin-bottom: 1.2rem; font-size: .58rem; }
  .chapter-copy { margin-top: 1.5rem; font-size: .9rem; line-height: 1.9; }
  .margin-note { margin-top: 1.5rem; font-size: 1rem; }
  .primary-link { margin-top: 1.2rem; }
  .letter-section { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: 4rem; }
  .letter-section::before { inset: .55rem .85rem; }
  .letter-intro { padding-top: 0; }
  .letter-intro h2 { max-width: 22rem; font-size: clamp(3.2rem, 14vw, 4.5rem); }
  .letter-intro .eyebrow { max-width: 19rem; }
  .handwritten { padding-top: 1.4rem; font-size: 1.05rem; }
  .letter-envelope { box-shadow: 4px 5px 0 #dfd2bc; }
  .letter-envelope > summary { min-height: 21rem; padding: 2rem 1.5rem; }
  .recipient-name { max-width: 80%; font-size: clamp(3rem, 14vw, 4rem); }
  .wax-seal { top: 1.25rem; right: 1.25rem; width: 2.8rem; height: 2.8rem; font-size: 1.5rem; }
  .letter-paper { padding: 1.6rem 1.25rem; background-image: repeating-linear-gradient(transparent 0 2.35rem, #d9cdb93b 2.35rem calc(2.35rem + 1px)); }
  .letter-paper > p { font-size: .9rem; }
  .letter-envelope[open] > summary { padding: 1.25rem; }
  .letter-envelope[open] .recipient-name { font-size: 1.65rem; }
  .letter-envelope[open] .wax-seal { width: 2.3rem; height: 2.3rem; font-size: 1.2rem; }
  .envelope-sublabel { max-width: 13rem; font-size: .7rem; }
  .chapter-navigation { position: static; transform: none; flex-shrink: 0; width: max-content; max-width: 100%; margin-inline: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .chapter-navigation a { min-width: 2.75rem; min-height: 2.75rem; padding-inline: .45rem; gap: .45rem; }
  .chapter-navigation a[aria-current] .nav-label { max-width: 7rem; overflow: hidden; text-overflow: ellipsis; }
  .site-footer { flex-wrap: wrap; align-items: flex-start; padding-block: 3rem 5rem; }
  .site-footer > a { order: 2; width: 100%; }
  .site-footer p { max-width: 15rem; }
  .footer-flower { font-size: 2rem; }
  .install-dialog { padding: 1.4rem; }
}
