:root {
  --paper: #f1e8e0;
  --paper-clean: #faf6ee;
  --ink: #100f0f;
  --ink-soft: #383735;
  --red: #d52b24;
  --gray: #8e8985;
  --rail: clamp(72px, 18vw, 154px);
  --line: clamp(2px, .35vw, 4px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
html, body { margin: 0; min-height: 100%; }
body { overflow-x: hidden; background: #d9d3ca; color: var(--ink); font-family: "Shippori Mincho", Georgia, serif; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: url("assets/paper-texture.webp") center / 760px auto repeat; opacity: .68; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.story { --story-pages: 8; height: calc(var(--story-pages) * 100svh); position: relative; }
.story-stage { --scene-progress: 0; position: sticky; top: 0; width: min(calc(100% - 12px), 980px); height: 100svh; margin-inline: auto; overflow: hidden; isolation: isolate; touch-action: none; background: var(--paper) url("assets/paper-texture.webp") center / 720px auto repeat; box-shadow: 3px 0 0 #c8bbae, 6px 0 0 #eee4da, 8px 0 18px rgb(16 15 15 / 20%), 0 2px 0 #d3c8bc, 0 5px 0 #ebe1d7, 0 9px 22px rgb(16 15 15 / 18%), 0 0 90px rgb(16 15 15 / 14%); }
.story-stage::before { content: ""; position: absolute; inset: 0 auto 0 var(--rail); z-index: 16; width: 13px; pointer-events: none; background: linear-gradient(90deg, rgb(16 15 15 / 22%), rgb(16 15 15 / 7%) 42%, rgb(255 255 255 / 28%) 72%, transparent); opacity: .6; }
.story-stage::after { content: ""; position: absolute; inset: 0 0 0 var(--rail); z-index: 12; pointer-events: none; background-image: radial-gradient(circle, rgb(16 15 15 / 13%) 0 1px, transparent 1.5px); background-size: 8px 8px; mask-image: linear-gradient(135deg, transparent 0 8%, #000 22%, transparent 42% 74%, #000 94%); opacity: .24; mix-blend-mode: multiply; }
.scenes, .scene { position: absolute; inset: 0; }
.scene { padding-left: var(--rail); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(10px) scale(.995); transition: opacity 620ms ease, transform 720ms cubic-bezier(.22,.61,.36,1), visibility 0s linear 720ms; }
.scene.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.story-stage.is-page-turning .scene { transition: none; }
.story-stage .scenes.stf__parent { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0 !important; min-height: 0 !important; overflow: visible; transform: translateZ(0); }
.story-stage .stf__wrapper { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-stage .stf__block { position: absolute; inset: 0; width: 100%; height: 100%; perspective: 2000px; }
.story-stage.has-page-flip .scene { opacity: 1; visibility: visible; transform: none; transition: none; }
.story-stage.has-page-flip .scene-photo img { transition: none; }
.story-stage.has-page-flip .scene-copy, .story-stage.has-page-flip .speech, .story-stage.has-page-flip .sfx { transition: opacity 340ms cubic-bezier(.16,1,.3,1), transform 420ms cubic-bezier(.16,1,.3,1); }
.story-stage.has-page-flip .scene.is-scene-entering .scene-copy, .story-stage.has-page-flip .scene.is-scene-entering .speech, .story-stage.has-page-flip .scene.is-scene-entering .sfx { opacity: 0; }
.story-stage.has-page-flip .scene.is-scene-entering .scene-copy { transform: translateY(12px); }
.story-stage.has-page-flip .scene.is-scene-entering .speech { transform: translateY(10px) scale(.96); }
.story-stage.has-page-flip .scene.is-scene-entering .sfx { transform: translateX(10px); }
.story-stage.has-page-flip.is-page-turning .scene:not(.is-active) .scene-copy,
.story-stage.has-page-flip.is-page-turning .scene:not(.is-active) .speech,
.story-stage.has-page-flip.is-page-turning .scene:not(.is-active) .sfx,
.story-stage.has-page-flip.is-page-turning .scene.is-page-copy .scene-copy,
.story-stage.has-page-flip.is-page-turning .scene.is-page-copy .speech,
.story-stage.has-page-flip.is-page-turning .scene.is-page-copy .sfx { opacity: 1; visibility: visible; }

.page-turn { position: absolute; inset: 0; z-index: 18; visibility: hidden; overflow: hidden; pointer-events: none; }
.page-turn.is-turning { visibility: visible; }
.page-turn::after { content: ""; position: absolute; z-index: 2; inset: 0 0 0 var(--rail); opacity: 0; pointer-events: none; background: linear-gradient(90deg, rgb(16 15 15 / 20%), rgb(16 15 15 / 8%) 15%, transparent 48%); mix-blend-mode: multiply; }
.page-turn.is-turning::after { animation: pageCastShadow 840ms cubic-bezier(.4,0,.18,1) both; }
.page-leaf { position: absolute; z-index: 3; inset: 0; overflow: hidden; }
.page-turn.is-turning .page-leaf { will-change: clip-path, filter, opacity; }
.page-turn.is-forward .page-leaf { animation: pagePeelForward 840ms cubic-bezier(.42,0,.18,1) both; }
.page-turn.is-backward .page-leaf { animation: pagePeelBackward 840ms cubic-bezier(.42,0,.18,1) both; }
.page-face { position: absolute; inset: 0; overflow: hidden; border: 1px solid rgb(91 78 66 / 12%); }
.page-face-front { background: var(--paper) url("assets/paper-texture.webp") center / 720px auto repeat; }
.page-face-front::after { content: ""; position: absolute; z-index: 9; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 0 58%, rgb(16 15 15 / 8%) 72%, rgb(255 255 255 / 54%) 81%, rgb(16 15 15 / 13%) 95%, transparent); background-size: 190% 100%; mix-blend-mode: multiply; animation: printedPageCurl 840ms cubic-bezier(.42,0,.18,1) both; }
.page-face-front .scene { opacity: 1; visibility: visible; transform: none; transition: none; }
.page-face-front .scene-photo img { transform: scale(1.025); transition: none; }
.page-curl { position: absolute; z-index: 5; top: -1%; width: 13%; height: 102%; opacity: 0; overflow: hidden; border-radius: 58% 20% 20% 58% / 3% 1.5% 1.5% 3%; background: var(--paper-clean) url("assets/paper-texture.webp") center / 720px auto repeat; box-shadow: -8px 0 16px rgb(16 15 15 / 20%), inset 9px 0 14px rgb(255 255 255 / 42%), inset -8px 0 14px rgb(16 15 15 / 12%); }
.page-curl::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(16 15 15 / 11%), rgb(255 255 255 / 46%) 42%, rgb(16 15 15 / 13%) 82%, transparent); }
.page-curl span { position: absolute; inset-block: 0; right: 2%; width: 3px; border-radius: 50%; background: #fffaf0; box-shadow: -2px 0 3px rgb(16 15 15 / 20%); }
.page-turn.is-forward .page-curl { animation: curlForward 840ms cubic-bezier(.42,0,.18,1) both; }
.page-turn.is-backward .page-curl { transform: scaleX(-1); animation: curlBackward 840ms cubic-bezier(.42,0,.18,1) both; }
@keyframes pagePeelForward {
  0% { clip-path: polygon(0 0,100% 0,100% 100%,0 100%); filter: drop-shadow(0 0 0 transparent); opacity: 1; }
  20% { clip-path: polygon(0 0,86% 1.5%,82% 50%,86% 98.5%,0 100%); filter: drop-shadow(13px 4px 13px rgb(16 15 15 / 20%)); opacity: 1; }
  48% { clip-path: polygon(0 0,54% 2.5%,47% 50%,54% 97.5%,0 100%); filter: drop-shadow(18px 6px 20px rgb(16 15 15 / 27%)); opacity: 1; }
  76% { clip-path: polygon(0 1%,24% 3%,17% 50%,24% 97%,0 99%); filter: drop-shadow(10px 4px 12px rgb(16 15 15 / 20%)); opacity: .96; }
  89% { clip-path: polygon(0 2%,8% 4%,3% 50%,8% 96%,0 98%); opacity: .28; }
  100% { clip-path: polygon(0 4%,0 4%,0 96%,0 96%); opacity: 0; }
}
@keyframes pagePeelBackward {
  0% { clip-path: polygon(0 0,100% 0,100% 100%,0 100%); filter: drop-shadow(0 0 0 transparent); opacity: 1; }
  20% { clip-path: polygon(14% 1.5%,100% 0,100% 100%,14% 98.5%,18% 50%); filter: drop-shadow(-13px 4px 13px rgb(16 15 15 / 20%)); opacity: 1; }
  48% { clip-path: polygon(46% 2.5%,100% 0,100% 100%,46% 97.5%,53% 50%); filter: drop-shadow(-18px 6px 20px rgb(16 15 15 / 27%)); opacity: 1; }
  76% { clip-path: polygon(76% 3%,100% 1%,100% 99%,76% 97%,83% 50%); filter: drop-shadow(-10px 4px 12px rgb(16 15 15 / 20%)); opacity: .96; }
  89% { clip-path: polygon(92% 4%,100% 2%,100% 98%,92% 96%,97% 50%); opacity: .28; }
  100% { clip-path: polygon(100% 4%,100% 4%,100% 96%,100% 96%); opacity: 0; }
}
@keyframes curlForward {
  0% { left: 96%; opacity: 0; transform: scaleX(.32) skewY(0deg); }
  12% { opacity: .9; }
  42% { left: 48%; opacity: 1; transform: scaleX(1) skewY(.45deg); }
  72% { left: 17%; opacity: .95; transform: scaleX(.78) skewY(-.35deg); }
  86% { left: calc(var(--rail) - 5%); opacity: .3; transform: scaleX(.42) skewY(0deg); }
  100% { left: calc(var(--rail) - 8%); opacity: 0; transform: scaleX(.18); }
}
@keyframes curlBackward {
  0% { left: -7%; opacity: 0; transform: scaleX(-.32) skewY(0deg); }
  12% { opacity: .9; }
  42% { left: 34%; opacity: 1; transform: scaleX(-1) skewY(-.45deg); }
  72% { left: 68%; opacity: .95; transform: scaleX(-.78) skewY(.35deg); }
  86% { left: 91%; opacity: .3; transform: scaleX(-.42) skewY(0deg); }
  100% { left: 98%; opacity: 0; transform: scaleX(-.18); }
}
@keyframes printedPageCurl { 0% { background-position: 100% 0; opacity: .18; } 45% { background-position: 35% 0; opacity: .72; } 82% { background-position: -70% 0; opacity: .38; } 100% { background-position: -100% 0; opacity: 0; } }
@keyframes pageCastShadow { 0%, 100% { opacity: 0; transform: scaleX(.08); transform-origin: left; } 38% { opacity: .54; transform: scaleX(.48); transform-origin: left; } 78% { opacity: .18; transform: scaleX(.18); transform-origin: left; } }
.scene-photo { position: absolute; overflow: hidden; border: var(--line) solid var(--ink); background: var(--ink); }
.scene-photo::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, #000 0 1px, transparent 1.25px); background-size: 5px 5px; opacity: .13; mix-blend-mode: multiply; pointer-events: none; }
.scene-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08) sepia(.05); transform: scale(calc(1.025 + var(--scene-progress) * .012)); transition: transform 120ms linear; }
.scene-photo-main { left: calc(var(--rail) + 3.5vw); right: 0; top: 19%; height: 58%; clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 88%); }
.scene-photo-main img { object-position: center; }
.scene-photo-memory { left: calc(var(--rail) + 4vw); bottom: 10.5%; width: min(47vw, 420px); height: 21%; z-index: 4; transform: rotate(-1.2deg); }
.scene-photo-memory img { object-position: center 75%; }
.scene-copy { position: absolute; left: calc(var(--rail) + 5vw); top: 3.2%; z-index: 5; width: min(75%, 680px); }
.scene-eyebrow, .section-kicker { margin: 0 0 10px; font: 600 12px/1 "Barlow Condensed", sans-serif; letter-spacing: .34em; }
.scene-copy h2 { max-width: 760px; margin: 0; font-size: clamp(34px, 8.6vw, 82px); font-weight: 400; line-height: .97; letter-spacing: -.055em; }
.scene-copy h2::after { content: ""; display: block; width: 54px; height: 5px; margin-top: 18px; background: var(--red); }
.scene-narration { position: absolute; top: calc(100svh - 24vh); left: 0; width: min(70vw, 600px); margin: 0; padding: 14px 16px; border-inline-start: 2px solid var(--red); background: rgb(241 232 224 / 92%); font-size: clamp(13px, 2.8vw, 20px); line-height: 1.55; }
.speech { position: absolute; z-index: 6; top: 24%; left: calc(var(--rail) + 3vw); width: min(45vw, 390px); min-height: 112px; display: grid; place-items: center; margin: 0; padding: 20px 22px; border: var(--line) solid var(--ink); border-radius: 50%; background: var(--paper-clean); color: var(--ink-soft); font-size: clamp(15px, 3.7vw, 28px); font-style: italic; line-height: 1.25; text-align: center; }
.speech::after { content: ""; position: absolute; right: 7%; bottom: -17px; width: 35px; height: 35px; border-right: var(--line) solid var(--ink); border-bottom: var(--line) solid var(--ink); background: var(--paper-clean); transform: skew(24deg) rotate(28deg); }
.sfx { position: absolute; right: 2.5vw; bottom: 4.8%; z-index: 5; color: var(--red); font: 600 clamp(32px, 10vw, 92px)/.8 "Barlow Condensed", sans-serif; letter-spacing: -.05em; opacity: .9; writing-mode: vertical-rl; }
.scene-dark .scene-copy, .scene-dark .sfx { color: var(--paper-clean); }
.scene-dark .scene-photo-main { top: 0; height: 100%; clip-path: none; border-block: 0; }
.scene-dark .scene-copy { top: 5%; padding: 18px; background: rgb(16 15 15 / 72%); }
.scene-dark .speech { top: auto; bottom: 16%; }
.scene-dark .scene-narration { color: var(--ink); }
/* The final two scenes use their lower third for the narrative caption. */
.scene-6 .scene-copy { width: min(54%, 530px); }
.scene-6 .scene-narration { width: min(48vw, 470px); }
.scene-6 .speech { top: auto; right: clamp(12px, 3vw, 34px); bottom: 12%; left: auto; width: min(24vw, 225px); min-height: 0; padding: 15px 16px; font-size: clamp(14px, 2.35vw, 22px); }
.scene-6 .speech::after { right: 12%; bottom: -17px; left: auto; transform: skew(24deg) rotate(28deg); }
.scene-7 .scene-copy { width: min(52%, 500px); }
.scene-7 .scene-narration { width: min(52vw, 500px); }
.scene-7 .speech { top: auto; right: clamp(12px, 3vw, 34px); bottom: 13%; left: auto; width: min(24vw, 225px); min-height: 0; padding: 15px 16px; font-size: clamp(14px, 2.35vw, 22px); }
.scene-7 .speech::after { right: 12%; bottom: -17px; left: auto; transform: skew(24deg) rotate(28deg); }

.chapter-rail { position: absolute; inset: 0 auto 0 0; z-index: 20; width: var(--rail); display: flex; flex-direction: column; align-items: center; border-right: var(--line) solid var(--ink); background: var(--paper) url("assets/paper-texture.webp") center / 420px auto; text-align: center; }
.chapter-kicker { margin: 6svh 0 3px; font-size: 10px; letter-spacing: .14em; }
.chapter-number { font-size: clamp(42px, 11vw, 80px); font-weight: 400; line-height: .9; }
.chapter-dots { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between; height: 35svh; margin-top: 5svh; }
.chapter-dots::before { content: ""; position: absolute; inset: 4px auto; width: 1px; background: var(--ink); }
.chapter-dot { position: relative; width: 8px; aspect-ratio: 1; border: 1px solid var(--ink); border-radius: 50%; background: var(--paper); transition: transform 500ms ease, background-color 500ms ease; }
.chapter-dot.is-active { background: var(--red); transform: scale(1.8); }
.chapter-count { margin-top: 3.5svh; font: 600 14px/1 "Barlow Condensed", sans-serif; }
.rail-story { margin-top: auto; font: 500 10px/1 "Barlow Condensed", sans-serif; letter-spacing: .3em; writing-mode: vertical-rl; }
.rail-mark { margin: 3svh 0; color: var(--red); font-size: 13px; font-weight: 700; }
.progress-track { position: absolute; inset: 0 0 0 auto; z-index: 22; width: 4px; background: rgb(16 15 15 / 10%); }
.progress-track span { display: block; width: 100%; height: 100%; background: var(--red); transform: scaleY(.02); transform-origin: top; }
.scroll-hint { position: absolute; z-index: 15; right: 22px; bottom: 18px; margin: 0; font: 600 10px/1 "Barlow Condensed", sans-serif; letter-spacing: .28em; }
.scroll-hint span { display: inline-block; animation: scrollCue 1.8s ease-in-out infinite; }
@keyframes scrollCue { 50% { transform: translateY(5px); } }

.epilogue { width: min(100%, 980px); margin-inline: auto; overflow: hidden; background: var(--paper) url("assets/paper-texture.webp") center / 720px auto repeat; box-shadow: 0 30px 90px rgb(16 15 15 / 12%); }
.epilogue-cover { min-height: 88svh; display: grid; place-content: center; padding: 72px 26px; border-top: 12px solid var(--ink); text-align: center; }
.epilogue-cover h1 { margin: 8px 0 20px; font-size: clamp(48px, 13vw, 118px); font-weight: 400; letter-spacing: -.055em; }
.epilogue-cover h1::first-letter { color: var(--red); }
.epilogue-lead { max-width: 580px; margin: 0 auto 24px; font-size: clamp(18px, 4vw, 28px); line-height: 1.55; }
.epilogue-cover time { font: 600 14px/1 "Barlow Condensed", sans-serif; letter-spacing: .25em; text-transform: uppercase; }
.event-spread { position: relative; min-height: 92svh; display: grid; align-items: center; padding: 70px 24px 70px calc(var(--rail) + 20px); background: var(--ink); color: var(--paper-clean); }
.event-number { position: absolute; left: 0; top: 0; bottom: 0; width: var(--rail); display: grid; place-items: center; border-right: 1px solid var(--paper); color: var(--red); font-size: clamp(52px, 14vw, 110px); writing-mode: vertical-rl; }
.event-copy h2, .calendar-panel h2, .timeline-spread h2, .detail-panel h2, .rsvp-spread h2 { margin: 0 0 28px; font-size: clamp(38px, 9vw, 78px); font-weight: 400; line-height: 1.02; letter-spacing: -.055em; }
.event-facts { border-block: 1px solid rgb(250 246 238 / 34%); }
.event-facts p { display: flex; justify-content: space-between; gap: 20px; margin: 0; padding: 16px 0; border-bottom: 1px solid rgb(250 246 238 / 22%); }
.event-facts p:last-child { border-bottom: 0; }
.event-facts span { color: #bdb7b1; font: 500 12px/1 "Barlow Condensed", sans-serif; letter-spacing: .22em; text-transform: uppercase; }
.event-facts strong { text-align: right; font-weight: 400; }
address { margin: 24px 0; color: #d8d1c9; font-style: normal; line-height: 1.6; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; }
.manga-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 13px 18px; border: 2px solid currentColor; border-radius: 0; background: var(--red); color: #fff; font: 600 13px/1 "Barlow Condensed", sans-serif; letter-spacing: .16em; text-decoration: none; text-transform: uppercase; cursor: pointer; transition: transform 180ms ease, background-color 180ms ease, color 180ms ease; }
.manga-button:hover, .manga-button:focus-visible { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 currentColor; }
.manga-button-light { background: transparent; color: currentColor; }
.calendar-panel { padding: 100px 26px; border-bottom: var(--line) solid var(--ink); }
.calendar-panel h2 { max-width: 760px; }
.timeline-spread { padding: 90px 26px; }
.timeline { max-width: 760px; margin: 48px 0 0 auto; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 54px 38px 1fr; gap: 14px; min-height: 126px; }
.timeline time { padding-top: 8px; font: 600 14px/1 "Barlow Condensed", sans-serif; }
.timeline-index { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); color: var(--red); font: 600 11px/1 "Barlow Condensed", sans-serif; }
.timeline-index::after { content: ""; position: absolute; top: 32px; left: 50%; width: 2px; height: 92px; background: var(--ink); transform: translateX(-50%); }
.timeline li:last-child .timeline-index::after { display: none; }
.timeline h3 { margin: 4px 0 8px; font-size: 23px; font-weight: 400; }
.timeline p { margin: 0; color: #5b5753; line-height: 1.55; }
.details-grid { border-block: var(--line) solid var(--ink); }
.detail-panel { position: relative; min-height: 560px; padding: 80px 26px; overflow: hidden; }
.detail-panel + .detail-panel { border-top: var(--line) solid var(--ink); }
.detail-panel > p:not(.section-kicker):not(.panel-number) { max-width: 520px; font-size: 17px; line-height: 1.7; }
.panel-number { position: absolute; top: 12px; right: 18px; margin: 0; color: var(--red); font-size: 50px; }
.registry-panel { background: var(--red); color: white; }
.dress-figures { display: flex; align-items: end; justify-content: center; gap: 30px; height: 210px; margin-top: 36px; border-bottom: 3px solid var(--ink); }
.dress-figures span { position: relative; width: 68px; height: 160px; background: var(--ink); clip-path: polygon(35% 0,65% 0,73% 17%,100% 100%,0 100%,27% 17%); }
.dress-figures span:last-child { width: 76px; height: 184px; clip-path: polygon(36% 0,64% 0,70% 12%,82% 50%,100% 100%,0 100%,18% 50%,30% 12%); }
.rsvp-spread { display: grid; padding: 90px 26px; }
.rsvp-intro { margin-bottom: 44px; }
.rsvp-intro > p:last-child { font: 500 13px/1.5 "Barlow Condensed", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.rsvp-form { display: grid; gap: 22px; }
.rsvp-form label { display: grid; gap: 8px; font: 600 12px/1 "Barlow Condensed", sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.rsvp-form input, .rsvp-form select, .rsvp-form textarea { width: 100%; min-height: 48px; padding: 12px 0; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; outline: 0; background: transparent; color: var(--ink); font: 400 17px/1.45 "Shippori Mincho", serif; text-transform: none; }
.rsvp-form textarea { resize: vertical; }
.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus { border-color: var(--red); box-shadow: 0 3px 0 var(--red); }
.form-confirmation { margin: 0; padding: 16px; border: 2px solid var(--ink); background: #fff; line-height: 1.5; }
.final-panel { min-height: 88svh; display: grid; place-content: center; padding: 90px 26px; background: var(--ink); color: var(--paper-clean); text-align: center; }
.final-panel h2 { margin: 4px 0; color: var(--red); font-size: clamp(64px, 18vw, 150px); font-weight: 400; line-height: .9; letter-spacing: -.07em; }
.final-panel > p:not(.section-kicker) { margin: 0 0 46px; font-size: clamp(20px, 5vw, 34px); font-style: italic; }
.final-panel strong { font-size: 22px; font-weight: 400; letter-spacing: .16em; }
.final-panel span { margin-top: 12px; color: #bdb7b1; font: 500 13px/1 "Barlow Condensed", sans-serif; letter-spacing: .2em; }
.demo-badge { position: fixed; z-index: 40; right: 12px; top: 12px; padding: 7px 9px; border: 1px solid var(--ink); background: rgb(241 232 224 / 92%); font: 600 9px/1 "Barlow Condensed", sans-serif; letter-spacing: .14em; }
.reveal { opacity: 0; transform: translateY(20px) scale(.99); transition: opacity 700ms ease, transform 700ms cubic-bezier(.22,.61,.36,1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (min-width: 720px) {
  :root { --rail: 154px; }
  .scene-copy { left: calc(var(--rail) + 48px); }
  .scene-photo-main { left: calc(var(--rail) + 35px); }
  .scene-photo-memory { left: calc(var(--rail) + 48px); }
  .speech { left: calc(var(--rail) + 44px); }
  .event-spread { padding-inline: calc(var(--rail) + 68px) 70px; }
  .calendar-panel, .timeline-spread, .rsvp-spread { padding: 120px 70px; }
  .details-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-panel + .detail-panel { border-top: 0; border-left: var(--line) solid var(--ink); }
  .rsvp-spread { grid-template-columns: .9fr 1.1fr; gap: 80px; }
  .rsvp-intro { margin: 0; }
}
@media (max-width: 460px) {
  .scene-copy { width: calc(100% - var(--rail) - 14px); left: calc(var(--rail) + 12px); }
  .scene-copy h2 { font-size: clamp(29px, 9.2vw, 43px); }
  .scene-photo-main { left: calc(var(--rail) + 8px); top: 20%; }
  .scene-photo-memory { left: calc(var(--rail) + 10px); width: 52vw; }
  .speech { left: calc(var(--rail) + 10px); width: 50vw; min-height: 96px; padding: 14px; }
  .scene-6 .scene-copy, .scene-7 .scene-copy { width: calc(100% - var(--rail) - 24px); }
  .scene-6 .scene-narration { width: 48vw; }
  .scene-6 .speech, .scene-7 .speech { top: auto; right: 10px; bottom: 10%; left: auto; width: 32vw; min-height: 0; padding: 12px; font-size: clamp(13px, 3.2vw, 17px); }
  .scene-7 .scene-narration { width: 50vw; }
  .scene-narration { top: calc(100svh - 25vh); width: calc(100vw - var(--rail) - 26px); }
  .sfx { font-size: 42px; }
}
/* Each sheet owns an opaque paper surface and four separate reading regions.
   The renderer clips the entire printed sheet, including its text. */
.story-stage .scene { padding: 0; background: var(--paper); overflow: hidden; }
.story-stage .scene-sheet {
  display: grid;
  width: 100%; height: 100%;
  grid-template-rows: auto minmax(160px, 1fr) auto;
  gap: clamp(10px, 2svh, 18px);
  padding: clamp(18px, 3svh, 28px) clamp(16px, 3vw, 34px) 36px calc(var(--rail) + clamp(16px, 3vw, 34px));
  background: var(--paper) url("assets/paper-texture.webp") center / 720px auto;
  overflow: hidden;
}
.story-stage .scene-copy { position: relative; inset: auto; grid-row: 1; width: 100%; padding: 0; background: none; color: var(--ink); }
.story-stage .scene-copy h2 { font-size: clamp(27px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -.025em; }
.story-stage .scene-copy h2::after { margin-top: 12px; height: 3px; }
.story-stage .scene-photo-main { position: relative; inset: auto; grid-row: 2; width: 100%; height: 100%; min-height: 0; clip-path: none; border: var(--line) solid var(--ink); }
.story-stage .scene-photo-main img { transform: none; object-position: center 45%; }
.story-stage .scene-photo-memory { display: none; }
.story-stage .speech { position: relative; inset: auto; grid-row: 3; justify-self: end; width: fit-content; max-width: min(100%, 460px); min-height: 0; padding: 12px 24px; font-size: clamp(15px, 2vw, 22px); line-height: 1.3; }
.story-stage .speech::after { width: 18px; height: 18px; right: 20px; left: auto; bottom: -9px; }
.story-stage .scene-narration { position: relative; inset: auto; grid-row: 3; width: 100%; padding: 12px 14px; color: var(--ink); font-size: clamp(14px, 1.6vw, 18px); line-height: 1.5; }
.story-stage .sfx { display: none; }
.story-stage.has-page-flip .scene-copy, .story-stage.has-page-flip .speech { transition: none; transform: none; }
.story-stage .scene-6 .scene-photo-main img { object-fit: contain; }
.story-stage .scene-6 .scene-photo-main { background: #e8e7e3; }
/* Dialogues are attached to the photo; each placement follows its subjects. */
.story-stage .scene-photo-main .speech {
  position: absolute; inset: auto 14px 22px auto; z-index: 6;
  width: max-content; max-width: min(74%, 310px); min-height: 0;
  padding: 12px 20px; font-size: clamp(14px, 1.7vw, 19px);
  line-height: 1.3; border-width: 2px;
}
.story-stage .scene-1 .speech,
.story-stage .scene-3 .speech { inset: 16px auto auto 14px; }
.story-stage .scene-4 .speech,
.story-stage .scene-5 .speech { inset: auto auto 22px 14px; }
.story-stage .scene-0 .scene-photo-main img,
.story-stage .scene-5 .scene-photo-main img { object-position: center 22%; }
.story-stage .scene-7 .speech { max-width: min(64%, 270px); }
@media (max-width: 460px) {
  .story-stage .scene-sheet { gap: 10px; padding-top: 22px; }
  .story-stage .scene-eyebrow { font-size: 10px; letter-spacing: .18em; }
  .story-stage .speech { padding: 10px 16px; }
  .story-stage .scene-narration { padding: 10px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .story { height: auto; }
  .story-stage { position: relative; height: auto; overflow: visible; touch-action: auto; }
  .scenes { position: relative; }
  .scene { position: relative; min-height: 100svh; opacity: 1; visibility: visible; transform: none; border-bottom: var(--line) solid var(--ink); }
  .chapter-rail, .progress-track, .scroll-hint { display: none; }
  .scene, .scene-photo-main, .scene-photo-memory, .scene-copy, .speech { padding-left: 0; }
  .scene-photo-main { left: 0; }
  .reveal { opacity: 1; transform: none; }
  .story-stage .scene { position: relative; min-height: 100svh; }
  .story-stage .scene-sheet { height: auto; min-height: 100svh; padding-left: 24px; grid-template-rows: auto minmax(180px, 42svh) auto; }
}
