:root {
  --ink: #170b12;
  --plum: #2b111d;
  --wine: #5f1d2c;
  --rose: #d98977;
  --copper: #d7a06c;
  --ivory: #f6eadc;
  --paper: #efe0cf;
  --muted: #c8aaa7;
  --photo-paper: #f3e5d4;
  --photo-paper-deep: #d9bfa7;
  --photo-gold: rgba(184, 126, 77, .72);
  --photo-shadow: rgba(3, 1, 2, .42);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
  --script: "Sacramento", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body { margin: 0; background: var(--ink); color: var(--ivory); font: 18px/1.65 var(--sans); overflow-x: hidden; }
body.locked { overflow: hidden; }
button { font: inherit; }
img { display: block; width: 100%; }

.love-lock {
  position: fixed;
  z-index: 96;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(1rem, 4vw, 3rem);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 16%, rgba(155,54,78,.38), transparent 28%),
    radial-gradient(circle at 78% 72%, rgba(218,137,119,.16), transparent 25%),
    linear-gradient(135deg, #12070c, #2b0d19 52%, #12070c);
  transition: opacity .85s ease, visibility .85s ease;
}
.love-lock[hidden] { display: none; }
.love-lock::before,
.love-lock::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(52rem, 72vw);
  aspect-ratio: 1;
  border: 1px solid rgba(232,180,137,.14);
  border-radius: 50%;
  animation: love-lock-ring 8s ease-in-out infinite alternate;
}
.love-lock::before { left: -27rem; top: -30rem; }
.love-lock::after { right: -28rem; bottom: -33rem; animation-delay: -4s; }
.love-lock__portrait {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 50%;
  overflow: hidden;
  opacity: .18;
  mask-image: linear-gradient(90deg, transparent, #000 40%);
}
.love-lock__portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(23,7,14,.38), transparent 50%, rgba(23,7,14,.3)); }
.love-lock__portrait img { height: 100%; object-fit: cover; object-position: 50% 35%; filter: sepia(.18) saturate(.74) contrast(1.05); animation: love-lock-photo 14s ease-out both; }
.love-lock__letter {
  position: relative;
  width: min(92vw, 36rem);
  padding: clamp(4.5rem, 8vw, 6rem) clamp(1.4rem, 5vw, 4rem) clamp(2rem, 4vw, 3.2rem);
  color: #4b1928;
  text-align: center;
  background:
    linear-gradient(rgba(247,235,220,.96), rgba(235,213,193,.98)),
    radial-gradient(circle at 20% 10%, #fff, transparent 36%);
  border: 1px solid rgba(255,235,207,.72);
  border-radius: .8rem 3.5rem .8rem 3.5rem;
  box-shadow: 18px 21px 0 rgba(100,31,50,.3), 0 34px 100px rgba(0,0,0,.6), inset 0 0 0 1px rgba(116,54,57,.12);
  animation: love-letter-arrive 1.15s cubic-bezier(.16,1,.3,1) both;
}
.love-lock__letter::before { content: ""; position: absolute; inset: .7rem; pointer-events: none; border: 1px solid rgba(124,60,64,.16); border-radius: .45rem 2.8rem .45rem 2.8rem; }
.love-lock__seal {
  position: absolute;
  left: 50%;
  top: 0;
  display: grid;
  place-items: center;
  width: 6rem;
  aspect-ratio: 1;
  color: #f7c79b;
  background: radial-gradient(circle at 35% 28%, #c8755c, #81273e 52%, #471020 100%);
  border: 1px solid rgba(255,212,164,.62);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(107,31,49,.2), inset 0 0 0 5px rgba(255,207,160,.16), 0 15px 30px rgba(70,15,31,.36), 0 0 32px rgba(203,98,100,.3);
  font: 2.25rem/1 var(--serif);
  transform: translate(-50%, -42%) rotate(-6deg);
  animation: love-seal-heartbeat 3.2s ease-in-out infinite;
}
.love-lock__script { margin: 0 0 .35rem; color: #9b3e52; font: clamp(2.3rem, 5vw, 3.6rem)/1 var(--script); }
.love-lock h1 { max-width: 11ch; margin: 0 auto 1rem; color: #3f1422; font: 500 clamp(2.45rem, 5.4vw, 4rem)/.96 var(--serif); letter-spacing: -.035em; }
.love-lock__intro { max-width: 29rem; margin: 0 auto 1.65rem; color: #754b55; font: 500 clamp(1.02rem, 1.8vw, 1.18rem)/1.65 var(--serif); }
.love-lock label { display: block; margin-bottom: .55rem; color: #7c3245; font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.love-lock__field { position: relative; max-width: 29rem; margin: 0 auto; }
.love-lock__field input {
  width: 100%;
  min-height: 3.6rem;
  padding: .8rem 5rem .8rem 1.2rem;
  color: #401522;
  background: rgba(255,250,243,.72);
  border: 1px solid rgba(126,48,67,.3);
  border-radius: 999px;
  outline: none;
  box-shadow: inset 0 2px 8px rgba(92,34,49,.06), 0 8px 24px rgba(92,34,49,.08);
  font: 600 1rem/1.2 var(--sans);
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.love-lock__field input::placeholder { color: #a48287; font-weight: 400; }
.love-lock__field input:focus { background: #fffaf3; border-color: #a7485d; box-shadow: 0 0 0 4px rgba(168,72,93,.12), 0 10px 28px rgba(92,34,49,.1); }
.password-visibility { position: absolute; right: .7rem; top: 50%; border: 0; padding: .45rem .65rem; color: #8f4052; background: transparent; font-size: .78rem; font-weight: 700; cursor: pointer; transform: translateY(-50%); }
.love-lock__message { min-height: 1.5rem; margin: .65rem auto .85rem; color: #91606a; font: italic 500 .94rem/1.45 var(--serif); }
.love-lock__button {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.45rem;
  border: 1px solid rgba(255,219,180,.45);
  border-radius: 999px;
  padding: .8rem 1.05rem .8rem 1.5rem;
  color: #fff5e9;
  background: linear-gradient(135deg, #72223a, #a74b56);
  box-shadow: 0 12px 30px rgba(92,26,46,.25), 0 0 0 0 rgba(167,75,86,.2);
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
  animation: love-button-glow 2.8s ease-in-out infinite;
}
.love-lock__button:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(92,26,46,.32), 0 0 0 7px rgba(167,75,86,.08); }
.love-lock__button svg { width: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.love-lock__signoff { margin: 1.2rem 0 0; color: #a65463; font: 1.6rem/1 var(--script); }
.love-lock__hearts i { position: absolute; color: rgba(237,145,135,.5); font: normal 1rem/1 var(--serif); opacity: 0; animation: love-lock-float 7s ease-in-out infinite; }
.love-lock__hearts i:nth-child(1) { left: 8%; top: 78%; animation-delay: -1s; }
.love-lock__hearts i:nth-child(2) { left: 18%; top: 28%; font-size: 1.6rem; animation-delay: -4s; }
.love-lock__hearts i:nth-child(3) { right: 13%; top: 18%; font-size: 1.25rem; animation-delay: -2s; }
.love-lock__hearts i:nth-child(4) { right: 7%; top: 68%; font-size: 1.8rem; animation-delay: -5.5s; }
.love-lock__hearts i:nth-child(5) { left: 48%; bottom: 3%; font-size: 1.15rem; animation-delay: -3s; }
.love-lock__letter.has-error { animation: love-lock-shake .46s ease; }
.love-lock__letter.has-error .love-lock__field input { border-color: #a12f4b; box-shadow: 0 0 0 4px rgba(161,47,75,.11); }
.love-lock__letter.has-error .love-lock__message { color: #96364d; }
.love-lock__letter.is-unlocking .love-lock__seal { animation: love-seal-unlock .9s cubic-bezier(.16,1,.3,1) both; }
.love-lock__letter.is-unlocking .love-lock__button { animation: none; opacity: .65; }
.love-lock.unlocked { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes love-letter-arrive { from { opacity: 0; transform: translateY(42px) scale(.96); filter: blur(7px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes love-lock-photo { from { transform: scale(1.02); } to { transform: scale(1.09); } }
@keyframes love-lock-ring { to { transform: scale(1.08); opacity: .55; } }
@keyframes love-seal-heartbeat { 0%, 100% { transform: translate(-50%, -42%) rotate(-6deg) scale(1); } 12% { transform: translate(-50%, -42%) rotate(-4deg) scale(1.06); } 24% { transform: translate(-50%, -42%) rotate(-6deg) scale(1); } }
@keyframes love-button-glow { 50% { box-shadow: 0 15px 34px rgba(92,26,46,.3), 0 0 0 7px rgba(167,75,86,.08); } }
@keyframes love-lock-float { 0% { opacity: 0; transform: translateY(20px) rotate(-8deg) scale(.7); } 25%, 68% { opacity: .62; } 100% { opacity: 0; transform: translateY(-80px) rotate(12deg) scale(1.12); } }
@keyframes love-lock-shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes love-seal-unlock { 35% { transform: translate(-50%, -42%) rotate(5deg) scale(1.18); } 100% { transform: translate(-50%, -42%) rotate(20deg) scale(.2); opacity: 0; filter: blur(8px); } }

.grain { position: fixed; inset: 0; pointer-events: none; z-index: 99; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.light-leak { position: fixed; z-index: 78; inset: -12%; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 30% 20%, rgba(255,174,111,.28), transparent 26%), radial-gradient(ellipse at 78% 68%, rgba(196,66,84,.2), transparent 25%); transform: translate3d(-8%, -4%, 0) rotate(-6deg); }
body:not(.locked) .light-leak { opacity: .16; }
@keyframes light-drift { to { transform: translate3d(14%, 7%, 0) rotate(8deg); } }

.love-atmosphere { position: fixed; z-index: 31; inset: 0; overflow: hidden; contain: strict; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; }
body.story-started .love-atmosphere { opacity: 1; }
body.finale-focus .love-atmosphere,
body.wish-open .love-atmosphere { opacity: .16; }
.love-orb { position: absolute; display: block; border-radius: 50%; opacity: .64; will-change: transform; }
.love-orb-one {
  width: min(58rem, 58vw);
  aspect-ratio: 1;
  left: -17vw;
  top: -9vh;
  background:
    radial-gradient(circle at 30% 24%, rgba(255,226,185,.18) 0 1.2%, transparent 5%),
    radial-gradient(circle at 58% 37%, rgba(225,164,105,.13) 0 2.2%, transparent 8%),
    radial-gradient(circle at 42% 68%, rgba(190,74,96,.12) 0 1.8%, transparent 7%),
    radial-gradient(circle at 48% 50%, rgba(142,41,68,.11), transparent 67%);
  animation: love-orbit-one 19s ease-in-out infinite alternate;
}
.love-orb-two {
  width: min(62rem, 62vw);
  aspect-ratio: 1;
  right: -20vw;
  bottom: -16vh;
  background:
    radial-gradient(circle at 38% 30%, rgba(255,226,185,.15) 0 1.3%, transparent 5.5%),
    radial-gradient(circle at 69% 48%, rgba(225,164,105,.14) 0 2.4%, transparent 8%),
    radial-gradient(circle at 32% 71%, rgba(190,74,96,.13) 0 1.8%, transparent 6.5%),
    radial-gradient(circle at 52% 54%, rgba(119,31,55,.13), transparent 68%);
  animation: love-orbit-two 23s ease-in-out infinite alternate;
}
.love-orb-three { display: none; }
@keyframes love-orbit-one { to { transform: translate3d(12vw, 8vh, 0) scale(1.08) rotate(5deg); } }
@keyframes love-orbit-two { to { transform: translate3d(-13vw, -9vh, 0) scale(.93) rotate(-4deg); } }
.love-firefly {
  position: fixed;
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, #fff7db 0 18%, #ffd28c 36%, rgba(236,143,88,.18) 68%, transparent 74%);
  box-shadow: 0 0 8px rgba(255,199,125,.86), 0 0 20px rgba(222,104,78,.34);
  animation: firefly-drift var(--duration, 18s) ease-in-out var(--delay, 0s) infinite alternate;
}
@keyframes firefly-drift {
  0% { opacity: .04; transform: translate3d(0, 16px, 0) scale(.7); }
  24% { opacity: var(--alpha, .55); }
  52% { opacity: .14; }
  76% { opacity: var(--alpha, .55); }
  100% { opacity: .06; transform: translate3d(var(--drift-x, 20px), var(--drift-y, -70px), 0) scale(1.02); }
}
.ambient-petal {
  position: fixed;
  z-index: 36;
  width: var(--petal-size, 12px);
  height: calc(var(--petal-size, 12px) * .72);
  border-radius: 72% 18% 68% 22%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(135deg, #9a3550, #d77c78 58%, #612035);
  box-shadow: 0 0 10px rgba(211,105,104,.22);
  animation: petal-drift var(--petal-duration, 4.6s) cubic-bezier(.2,.55,.25,1) forwards;
}
@keyframes petal-drift {
  0% { opacity: 0; transform: translate3d(0,-18px,0) rotate(0) scale(.68); }
  16% { opacity: .72; }
  72% { opacity: .5; }
  100% { opacity: 0; transform: translate3d(var(--petal-x, 90px), var(--petal-y, 150px), 0) rotate(var(--petal-turn, 280deg)) scale(1); }
}
.ambient-paused .love-orb,
.ambient-paused .love-firefly,
.ambient-paused .light-leak,
.wish-open .love-firefly { animation-play-state: paused; }
.heart-trail, .section-love { position: fixed; z-index: 72; pointer-events: none; color: #ef9a8d; text-shadow: 0 0 14px rgba(238,112,114,.72); }
.heart-trail {
  z-index: 85;
  contain: layout paint;
  color: var(--trail-color, #ff9d91);
  font-size: var(--trail-size, 1.4rem);
  line-height: 1;
  text-shadow: 0 1px 2px rgba(55,8,25,.62), 0 0 10px rgba(255,164,145,.86), 0 0 24px rgba(218,74,103,.42);
  transform-origin: center;
  will-change: transform, opacity;
  animation: trail-heart var(--trail-duration, 1.12s) cubic-bezier(.16,.78,.24,1) forwards;
}
@keyframes trail-heart {
  0% { opacity: 0; transform: translate3d(-50%,-35%,0) rotate(var(--trail-start, -8deg)) scale(.62); }
  18% { opacity: .9; transform: translate3d(-50%,-58%,0) rotate(0) scale(1.06); }
  100% { opacity: 0; transform: translate3d(calc(-50% + var(--trail-x, 10px)),var(--trail-y, -76px),0) rotate(var(--trail-end, 18deg)) scale(.68); }
}
.section-love { font-size: var(--size, 1rem); animation: section-heart 1.8s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes section-heart { 0% { opacity: 0; transform: translate3d(0,12px,0) scale(.35) rotate(-10deg); } 22% { opacity: .72; } 100% { opacity: 0; transform: translate3d(var(--burst-x, 25px), var(--burst-y, -100px), 0) scale(1.2) rotate(18deg); } }

.curtain-reveal { position: fixed; z-index: 90; inset: 0; display: grid; grid-template-columns: 1fr 1fr; pointer-events: none; visibility: hidden; }
.curtain-reveal span { background: linear-gradient(105deg, #16080e 0%, #4c1528 70%, #170a11 100%); box-shadow: 0 0 80px rgba(0,0,0,.65); }
.curtain-reveal span:first-child { transform: translateX(-102%); transform-origin: left; }
.curtain-reveal span:last-child { transform: translateX(102%); transform-origin: right; background: linear-gradient(255deg, #16080e 0%, #4c1528 70%, #170a11 100%); }
.curtain-reveal.playing { visibility: visible; }
.curtain-reveal.playing span:first-child { animation: curtain-left 1.8s cubic-bezier(.76,0,.24,1) both; }
.curtain-reveal.playing span:last-child { animation: curtain-right 1.8s cubic-bezier(.76,0,.24,1) both; }
@keyframes curtain-left { 0% { transform: translateX(-102%); } 38%, 58% { transform: translateX(0); } 100% { transform: translateX(-102%); } }
@keyframes curtain-right { 0% { transform: translateX(102%); } 38%, 58% { transform: translateX(0); } 100% { transform: translateX(102%); } }

.story-progress { display: none; position: fixed; z-index: 45; right: 1.1rem; top: 50%; justify-items: center; gap: .65rem; opacity: 0; transform: translateY(-50%) translateX(1rem); transition: opacity .6s ease, transform .6s ease; pointer-events: none; }
body.story-started .story-progress { opacity: 1; transform: translateY(-50%) translateX(0); }
.progress-label { writing-mode: vertical-rl; color: #b98d88; font-size: .58rem; letter-spacing: .28em; text-transform: uppercase; }
.progress-track { position: relative; width: 1px; height: 8rem; background: rgba(232,185,143,.22); overflow: hidden; }
.progress-track i { position: absolute; inset: 0 0 auto; height: var(--story-progress, 0%); background: linear-gradient(var(--copper), var(--rose)); box-shadow: 0 0 12px var(--rose); transition: height .45s ease; }
.progress-count { color: #d2aaa0; font: .72rem var(--serif); letter-spacing: .1em; }

.surprise { position: fixed; inset: 0; z-index: 80; min-height: 100svh; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 70% 20%, #4b1b2b 0, var(--ink) 46%, #0c0609 100%); transition: opacity 1s ease, visibility 1s ease; }
.surprise.opened { opacity: 0; visibility: hidden; }
.surprise::before { content: ""; position: absolute; width: 44rem; height: 44rem; border: 1px solid rgba(215,160,108,.2); border-radius: 50%; top: -28rem; right: -12rem; }
.surprise-photo { position: absolute; inset: 0 0 0 52%; overflow: hidden; mask-image: linear-gradient(to right, transparent, #000 28%); opacity: .48; }
.surprise-photo img { height: 100%; object-fit: cover; filter: sepia(.14) contrast(1.04); }
.locked .surprise-photo img { animation: surprise-photo-push 12s cubic-bezier(.2,.65,.25,1) both; }
@keyframes surprise-photo-push { from { transform: scale(1.015); } to { transform: scale(1.06); } }
.surprise-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(35,9,20,.15), transparent 45%); animation: photo-breathe 7s ease-in-out infinite alternate; }
.surprise.opened .surprise-photo::after,
.surprise.opened .primary-button,
.surprise.opened .primary-button::after,
.surprise.opened .ambient-hearts i { animation-play-state: paused; }
@keyframes photo-breathe { to { opacity: .35; } }
.surprise-card { position: relative; width: min(92vw, 44rem); margin-right: min(35vw, 28rem); padding: 3.5rem; text-align: left; }
.for-line, .script-line { margin: 0 0 .8rem; color: var(--rose); font: 2rem/1 var(--script); }
#petName { display: inline-block; min-width: 6.8ch; color: #f0b08f; transition: opacity .24s ease, transform .24s ease; }
#petName.changing { opacity: 0; transform: translateY(.2em); }
.surprise-card h1 { margin: 0; max-width: 12ch; font: 500 clamp(3.4rem, 7vw, 6.8rem)/.9 var(--serif); letter-spacing: -.04em; }
.surprise-card > p:not(.for-line) { max-width: 34rem; color: #f0dcda; font-size: 1.12rem; line-height: 1.8; margin: 1.8rem 0 2rem; }
.primary-button { border: 1px solid rgba(255,230,211,.45); color: #fff5e9; background: linear-gradient(135deg, #7b283d, #a94d55); border-radius: 999px; padding: 1rem 1.35rem 1rem 1.6rem; display: inline-flex; align-items: center; gap: 1.5rem; cursor: pointer; box-shadow: 0 12px 35px rgba(91,17,37,.3); transition: transform .25s ease, box-shadow .25s ease; }
.surprise .primary-button { position: relative; isolation: isolate; animation: button-heartbeat 2.8s ease-in-out infinite; }
.surprise .primary-button::after { content: ""; position: absolute; z-index: -1; inset: -9px; border: 1px solid rgba(236,164,139,.45); border-radius: inherit; animation: button-ripple 2.8s ease-out infinite; }
@keyframes button-heartbeat { 0%, 100% { transform: scale(1); } 8% { transform: scale(1.025); } 16% { transform: scale(1); } 24% { transform: scale(1.018); } }
@keyframes button-ripple { 0%, 35% { opacity: 0; transform: scale(.94); } 55% { opacity: .7; } 100% { opacity: 0; transform: scale(1.12); } }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 16px 42px rgba(138,46,65,.42); }
.primary-button:focus-visible, button:focus-visible { outline: 2px solid var(--copper); outline-offset: 4px; }
.primary-button svg { width: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.5; }
.tiny-signature { position: absolute; bottom: 1.3rem; left: 50%; transform: translateX(-50%); color: #9d7e82; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.ambient-hearts i { position: absolute; color: #ef9c88; font-style: normal; opacity: 0; text-shadow: 0 0 18px rgba(224,116,105,.5); animation: ambient-heart 7s ease-in-out infinite; }
.ambient-hearts i:nth-child(1) { left: 8%; bottom: 12%; animation-delay: .5s; }
.ambient-hearts i:nth-child(2) { left: 43%; bottom: 6%; animation-delay: 2.5s; font-size: .65rem; }
.ambient-hearts i:nth-child(3) { right: 8%; bottom: 16%; animation-delay: 4.2s; }
.ambient-hearts i:nth-child(4) { right: 33%; bottom: 2%; animation-delay: 1.4s; font-size: .75rem; }
.ambient-hearts i:nth-child(5) { left: 20%; bottom: 3%; animation-delay: 5.6s; font-size: .55rem; }
@keyframes ambient-heart { 0% { opacity: 0; transform: translateY(0) rotate(-8deg) scale(.7); } 20% { opacity: .5; } 70% { opacity: .3; } 100% { opacity: 0; transform: translateY(-36vh) rotate(12deg) scale(1.1); } }

main { opacity: 0; transition: opacity 1s ease .3s; }
main.visible { opacity: 1; }
.hero { min-height: 100svh; position: relative; display: grid; grid-template-columns: minmax(0, .95fr) minmax(22rem, .72fr); align-items: center; gap: clamp(2rem, 6vw, 7rem); padding: 8vw max(5vw, 2rem); background: radial-gradient(circle at 82% 28%, #4b1829 0, #27101a 34%, var(--ink) 68%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 12rem; background: linear-gradient(transparent, var(--plum)); pointer-events: none; }
.hero-copy { position: relative; z-index: 2; max-width: 48rem; }
.hero-copy h2 { margin: 0; font: 500 clamp(3.4rem, 7.3vw, 7.6rem)/.84 var(--serif); letter-spacing: -.055em; }
.hero-copy h2 span { display: block; overflow: hidden; opacity: 0; transform: translateY(1.05em); }
body.story-started .hero-copy h2 span { animation: line-rise .95s cubic-bezier(.16,1,.3,1) forwards; }
body.story-started .hero-copy h2 span:nth-child(2) { animation-delay: .13s; }
body.story-started .hero-copy h2 span:nth-child(3) { animation-delay: .26s; }
@keyframes line-rise { to { opacity: 1; transform: translateY(0); } }
.hero-copy h2 em { color: var(--rose); font-weight: 400; }
.hero-note { max-width: 38rem; color: #e2ceca; font-size: 1.12rem; line-height: 1.85; margin: 2.2rem 0; }
.text-button { appearance: none; border: 0; padding: .6rem 0; color: var(--ivory); background: transparent; border-bottom: 1px solid rgba(215,160,108,.55); cursor: pointer; letter-spacing: .04em; }
.text-button span { margin-left: 1rem; color: var(--copper); }
.hero-frame { position: relative; z-index: 2; isolation: isolate; margin: 0; padding: .8rem .8rem 3.4rem; background: linear-gradient(145deg, #fff3e3 0%, #ead6c1 62%, #d2af94 100%); color: #552435; border: 1px solid rgba(255,246,231,.72); border-radius: 2.5rem .85rem 2.5rem .85rem; transform: rotate(2deg); box-shadow: 14px 16px 0 rgba(113,45,61,.48), 0 42px 90px rgba(0,0,0,.48), inset 0 0 0 1px rgba(149,89,59,.18); }
.hero-frame::before { content: ""; position: absolute; z-index: 3; inset: .8rem .8rem 3.4rem; border: 1px solid rgba(246,217,181,.82); border-radius: 1.8rem .45rem 1.8rem .45rem; box-shadow: inset 0 0 0 1px rgba(84,27,44,.16); pointer-events: none; }
body.story-started .hero-frame { animation: photo-arrive 1.3s .2s cubic-bezier(.16,1,.3,1) both; }
@keyframes photo-arrive { from { opacity: 0; transform: translateY(80px) rotate(7deg) scale(.92); filter: blur(10px); } to { opacity: 1; transform: translateY(0) rotate(2deg) scale(1); filter: blur(0); } }
.hero-frame img { aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 40%; border-radius: 1.8rem .45rem 1.8rem .45rem; filter: saturate(.94) contrast(1.03); }
.hero-frame figcaption { font: italic 600 1.08rem/1.35 var(--serif); margin-top: 1rem; text-align: center; letter-spacing: .015em; }
.tape { position: absolute; top: -.7rem; left: 50%; width: 7.6rem; height: 2rem; background: linear-gradient(90deg, rgba(224,187,151,.42), rgba(255,231,198,.68), rgba(188,143,115,.42)); transform: translateX(-50%) rotate(-3deg); z-index: 4; border: 1px solid rgba(255,243,220,.24); box-shadow: 0 3px 10px rgba(56,24,31,.14); backdrop-filter: blur(2px); }
.scroll-whisper { position: absolute; right: 1.5rem; bottom: 8rem; z-index: 3; writing-mode: vertical-rl; color: #a88587; text-transform: uppercase; letter-spacing: .3em; font-size: .62rem; }

.opening-quote { min-height: 74vh; position: relative; isolation: isolate; display: grid; place-content: center; overflow: hidden; text-align: center; padding: 8rem 8vw; background: radial-gradient(circle at 50% 50%, #3b1423, var(--plum) 56%); }
.opening-quote::before { content: "♡"; position: absolute; z-index: -1; left: 50%; top: 50%; color: #e58f83; font: 54vw/1 var(--serif); opacity: .035; transform: translate(-50%,-50%); animation: giant-heartbeat 4.6s ease-in-out infinite; }
@keyframes giant-heartbeat { 0%, 100% { transform: translate(-50%,-50%) scale(.94); opacity: .025; } 12% { transform: translate(-50%,-50%) scale(1.02); opacity: .055; } 24% { transform: translate(-50%,-50%) scale(.96); opacity: .035; } }
.opening-quote p { max-width: 23ch; margin: 0 auto; font: 400 clamp(2.8rem, 6vw, 6.2rem)/1 var(--serif); text-shadow: 0 8px 35px rgba(0,0,0,.32); }
.opening-quote span { margin-top: 2rem; color: #d8bcba; font-size: .9rem; line-height: 1.6; letter-spacing: .16em; text-transform: uppercase; }

.memories { position: relative; isolation: isolate; overflow: hidden; padding: 10rem max(6vw, 1.5rem); background: linear-gradient(var(--plum), #1d0c13); }
.memories::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(circle at 12% 18%, rgba(146,46,76,.18), transparent 22%), radial-gradient(circle at 88% 52%, rgba(216,133,98,.12), transparent 24%), radial-gradient(circle at 30% 86%, rgba(126,40,68,.2), transparent 25%); animation: memory-aurora 14s ease-in-out infinite alternate; }
@keyframes memory-aurora { to { transform: translate3d(3vw,-2vh,0) scale(1.04); } }
.memory { position: relative; max-width: 76rem; margin: 0 auto 12rem; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(16rem, .65fr); gap: clamp(2rem, 7vw, 7rem); align-items: center; }
.memory::after { content: ""; position: absolute; z-index: -1; width: 18rem; height: 18rem; right: -7rem; bottom: -7rem; border: 1px solid rgba(222,156,122,.11); border-radius: 50%; box-shadow: 0 0 70px rgba(164,49,76,.1), inset 0 0 70px rgba(164,49,76,.08); animation: memory-ring 7s ease-in-out infinite; }
.memory-right::after { right: auto; left: -7rem; }
@keyframes memory-ring { 50% { transform: scale(1.16); opacity: .55; } }
.memory-right { grid-template-columns: minmax(16rem, .65fr) minmax(0, 1.2fr); }
.memory-right figure { order: 2; }
.memory figure { --tilt-x: 0deg; --tilt-y: 0deg; --lift: 0px; --glow-x: 50%; --glow-y: 50%; position: relative; isolation: isolate; margin: 0; padding: .72rem; overflow: hidden; background: radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(255,255,255,.72), transparent 28%), linear-gradient(145deg, #fff1df, #dfc4aa); border: 1px solid rgba(255,239,217,.55); box-shadow: 12px 14px 0 rgba(112,42,58,.42), 0 36px 76px var(--photo-shadow), inset 0 0 0 1px rgba(117,58,50,.13); clip-path: inset(0 48% 0 48%); filter: blur(5px); transform: perspective(1200px) translateY(var(--lift)) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); transform-style: preserve-3d; transition: clip-path 1.2s cubic-bezier(.16,1,.3,1), filter 1.1s ease, transform .35s ease, box-shadow .8s ease; }
.memory-left figure { border-radius: 1.25rem 7rem 1.25rem 1.25rem; }
.memory-right figure { border-radius: 7rem 1.25rem 1.25rem 1.25rem; }
.memory-wide figure { border-radius: 1.5rem 1.5rem 7rem 1.5rem; }
.memory.in-view figure { clip-path: inset(0); filter: blur(0); }
.memory figure::before { content: ""; position: absolute; z-index: 2; inset: .72rem; border: 1px solid rgba(255,224,181,.7); border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(79,28,42,.18); pointer-events: none; }
.memory figure::after { content: ""; position: absolute; z-index: 3; inset: .72rem; border-radius: inherit; background: linear-gradient(100deg, transparent 28%, rgba(255,228,194,.22) 50%, transparent 72%); transform: translateX(-120%); pointer-events: none; }
.memory.in-view figure::after { animation: memory-shimmer 1.5s .3s ease-out both; }
@keyframes memory-shimmer { to { transform: translateX(120%); } }
.memory figure img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: inherit; filter: saturate(.94) contrast(1.025); transform: scale(1.08) translateY(var(--parallax, 0px)); transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter .6s ease; }
.memory.in-view figure img { transform: scale(1) translateY(var(--parallax, 0px)); }
.memory figure:hover { --lift: -8px; box-shadow: 16px 20px 0 rgba(112,42,58,.48), 0 44px 90px rgba(0,0,0,.48); }
.memory figure:hover img { filter: saturate(1.04) contrast(1.02); transform: scale(1.025) translateY(var(--parallax, 0px)); }
.memory-wide { grid-template-columns: 1fr; max-width: 88rem; }
.memory-wide figure img { aspect-ratio: 16 / 8; object-position: center 42%; }
.memory-wide .memory-copy { max-width: 55rem; margin-top: -2rem; padding-left: 6vw; position: relative; z-index: 2; }
.memory-copy span, .promise-copy span { color: #edbd91; font-size: .82rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.memory-copy > * { opacity: 0; filter: blur(6px); transform: translateY(28px); transition: opacity .8s ease, filter .8s ease, transform .8s cubic-bezier(.16,1,.3,1); }
.memory.in-view .memory-copy > * { opacity: 1; filter: blur(0); transform: translateY(0); }
.memory.in-view .memory-copy > :nth-child(1) { transition-delay: .2s; }
.memory.in-view .memory-copy > :nth-child(2) { transition-delay: .34s; }
.memory.in-view .memory-copy > :nth-child(3) { transition-delay: .48s; }
.memory-copy h3 { margin: 1rem 0; font: 400 clamp(2.4rem, 4vw, 4.4rem)/1 var(--serif); background: linear-gradient(to right, var(--ivory), var(--ivory)) no-repeat left bottom / 0 1px; transition: background-size 1.2s .5s ease; }
.memory.in-view .memory-copy h3 { background-size: 100% 1px; }
.memory-copy p { color: #ddc7c4; font-size: 1.08rem; line-height: 1.85; }
.expand { position: absolute; z-index: 5; right: 1.55rem; bottom: 1.55rem; width: 2.8rem; height: 2.8rem; border: 1px solid rgba(255,243,223,.7); border-radius: 50%; color: white; background: rgba(49,13,27,.8); cursor: pointer; font-size: 1.2rem; box-shadow: 0 8px 22px rgba(0,0,0,.28); transition: transform .25s ease, background .25s ease; }
.expand:hover { transform: scale(1.08); background: #8f3850; }

.hands-break { min-height: 78vh; position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 7vw; overflow: hidden; padding: 8vw; background: radial-gradient(circle at 25% 50%, #f1dfce, #e7d3c1 48%, #dcbca7); color: #441726; }
.hands-break::before, .hands-break::after { content: ""; position: absolute; z-index: -1; left: 24%; top: 50%; width: 34vw; aspect-ratio: 1; border: 1px solid rgba(126,58,70,.13); border-radius: 50%; transform: translate(-50%,-50%); animation: promise-ripple 4.8s ease-out infinite; }
.hands-break::after { animation-delay: 2.4s; }
@keyframes promise-ripple { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.6); } 28% { opacity: .7; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.35); } }
.hands-photo { position: relative; isolation: isolate; width: 100%; max-height: 68vh; justify-self: center; }
.hands-photo img { max-height: 68vh; object-fit: cover; padding: .65rem; background: linear-gradient(145deg, #fff4e5, #d7b99f); border: 1px solid rgba(126,67,54,.2); border-radius: 7rem 7rem 1.3rem 1.3rem; box-shadow: 12px 14px 0 rgba(126,58,70,.22), 0 30px 70px rgba(56,17,30,.22), inset 0 0 0 1px rgba(255,255,255,.45); }
.hands-break.in-view img { animation: hands-breathe 4.8s ease-in-out infinite; }
@keyframes hands-breathe { 50% { transform: translateY(-8px) rotate(-.6deg); box-shadow: 16px 20px 0 rgba(126,58,70,.2), 0 38px 80px rgba(56,17,30,.27); } }
.hands-break .script-line { color: #9a4051; font-size: clamp(2.5rem, 5vw, 5rem); }
.hands-break blockquote { margin: 1rem 0 0; max-width: 16ch; font: 500 clamp(2.8rem, 5.5vw, 5.5rem)/.98 var(--serif); }

.collage-section { position: relative; isolation: isolate; overflow: hidden; padding: 10rem max(4vw, 1.2rem) 14rem; background: radial-gradient(circle at 50% 38%, #2a0e19, #13080e 60%); }
.collage-section::before { content: ""; position: absolute; z-index: -1; inset: -20%; opacity: .32; background: conic-gradient(from 180deg at 50% 50%, transparent, rgba(182,68,90,.18), transparent 28%, rgba(224,151,103,.12), transparent 64%); transform: rotate(8deg) scale(1.05); }
@keyframes collage-glow { to { transform: rotate(1turn) scale(1.08); } }
.section-heading { max-width: 70rem; margin: 0 auto 8rem; text-align: center; }
.section-heading .script-line { font-size: clamp(2.4rem, 4vw, 4rem); }
.section-heading h2 { max-width: 18ch; margin: 0 auto; font: 400 clamp(2.9rem, 5.6vw, 5.9rem)/.98 var(--serif); }
.collage { max-width: 92rem; margin: 0 auto; display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(2rem, 4vw, 5rem) clamp(1.2rem, 3vw, 3.2rem); align-items: start; }
.collage figure { position: relative; isolation: isolate; margin: 0; padding: .68rem .68rem 2.9rem; overflow: hidden; background: linear-gradient(145deg, #fff1df, #dfc4aa); color: #572536; border: 1px solid rgba(255,239,217,.62); box-shadow: 9px 11px 0 rgba(104,36,54,.5), 0 24px 55px rgba(0,0,0,.34), inset 0 0 0 1px rgba(119,61,48,.12); }
.collage figure::after { content: ""; position: absolute; left: 50%; bottom: 1.15rem; width: 2.4rem; height: 1px; background: linear-gradient(90deg, transparent, #9f5d3e, transparent); transform: translateX(-50%); opacity: .75; }
.collage figure:nth-child(4n+1) { border-radius: 5rem 5rem 1.15rem 1.15rem; }
.collage figure:nth-child(4n+2) { border-radius: 1.15rem 4.5rem 1.15rem 1.15rem; }
.collage figure:nth-child(4n+3) { border-radius: 4.5rem 1.15rem 1.15rem 1.15rem; }
.collage figure:nth-child(4n+4) { border-radius: 1.15rem 1.15rem 4.5rem 1.15rem; }
.collage figure { transition: transform .55s cubic-bezier(.16,1,.3,1), box-shadow .55s ease; transform-origin: center; }
.collage figure:hover { transform: translateY(-12px) rotate(0deg) scale(1.018); box-shadow: 13px 16px 0 rgba(104,36,54,.55), 0 40px 78px rgba(0,0,0,.48); }
.collage figure img { border: 1px solid rgba(122,70,48,.2); border-radius: inherit; filter: saturate(.94) contrast(1.02); transition: filter .55s ease, transform .65s ease; }
.collage figure:hover img { animation: none; filter: saturate(1.05); transform: scale(1.018); }
.collage figure.in-view img { animation: photo-alive 8s ease-in-out infinite alternate; animation-delay: calc(var(--photo-delay, 0) * 1s); }
.collage figure.in-view:hover img { animation: none; }
.collage figure:nth-child(3n+2) { --photo-delay: -2.4; }
.collage figure:nth-child(3n+3) { --photo-delay: -4.8; }
@keyframes photo-alive { to { transform: scale(1.035); filter: saturate(1.03) contrast(1.025); } }
.collage figure:nth-child(4n+1) { grid-column: 1 / span 5; }
.collage figure:nth-child(4n+2) { grid-column: 7 / span 6; margin-top: 8rem; }
.collage figure:nth-child(4n+3) { grid-column: 2 / span 4; margin-top: 3rem; }
.collage figure:nth-child(4n+4) { grid-column: 7 / span 5; }
.collage img { aspect-ratio: 4 / 5; object-fit: cover; }
.collage .landscape img { aspect-ratio: 5 / 3; }
.collage figcaption { min-height: 2rem; padding-top: .9rem; text-align: center; font: italic 600 1.08rem/1.35 var(--serif); letter-spacing: .01em; }
.tilt-left { transform: rotate(-2deg); }
.tilt-right { transform: rotate(2deg); }

.promise-break { min-height: 86vh; position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(18rem,.8fr) minmax(0,1.2fr); gap: 8vw; align-items: center; overflow: hidden; padding: 10vw; background: radial-gradient(circle at 20% 52%, #843148, var(--wine) 48%, #42101f); }
.promise-break::before { content: "♥"; position: absolute; z-index: -1; right: -4vw; top: 50%; color: rgba(255,196,165,.055); font: 44vw/1 var(--serif); transform: translateY(-50%) rotate(8deg); animation: promise-heart 5s ease-in-out infinite; }
@keyframes promise-heart { 50% { transform: translateY(-50%) rotate(8deg) scale(1.05); opacity: .75; } }

/* Keep the rich background motion local to the chapter that is actually visible. */
body.story-started .opening-quote:not(.scene-active)::before,
body.story-started .memories:not(.scene-active)::before,
body.story-started .memories:not(.scene-active) .memory::after,
body.story-started .hands-break:not(.scene-active)::before,
body.story-started .hands-break:not(.scene-active)::after,
body.story-started .collage-section:not(.scene-active)::before,
body.story-started .promise-break:not(.scene-active)::before,
body.story-started .letter-section:not(.scene-active) .seal-heart { animation-play-state: paused; }
.promise-break figure { margin: 0; padding: .72rem; overflow: hidden; background: linear-gradient(145deg, #fff1df, #d9bba1); border: 1px solid rgba(255,239,217,.6); border-radius: 5.5rem 1.2rem 5.5rem 1.2rem; transform: rotate(-2deg); box-shadow: 12px 14px 0 rgba(73,19,37,.35), 0 34px 72px rgba(0,0,0,.36); }
.promise-break.in-view figure { animation: promise-photo-arrive 1.15s .12s cubic-bezier(.16,1,.3,1) both; }
@keyframes promise-photo-arrive {
  from { opacity: .35; transform: translateY(28px) rotate(-4deg) scale(.975); }
  to { opacity: 1; transform: translateY(0) rotate(-2deg) scale(1); }
}
.promise-break img { aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid rgba(119,61,48,.18); border-radius: 4.8rem .65rem 4.8rem .65rem; filter: saturate(.96) contrast(1.02); }
.promise-copy p { margin: 1rem 0 0; max-width: 18ch; font: 400 clamp(2.6rem, 5vw, 5.4rem)/1 var(--serif); }

.letter-section { min-height: 100svh; position: relative; display: grid; place-items: center; padding: 8rem 5vw; overflow: hidden; background: radial-gradient(circle at 80% 20%, #4d1628, #16090f 60%); }
.letter-photo { position: absolute; width: min(44vw, 42rem); right: 5vw; top: 10%; overflow: hidden; transform: rotate(6deg); padding: .78rem .78rem 3.6rem; background: linear-gradient(145deg, #fff2e2, #d6b89d); border: 1px solid rgba(255,239,217,.58); border-radius: 1.2rem 5rem 1.2rem 5rem; box-shadow: 12px 14px 0 rgba(84,25,44,.38), 0 32px 70px rgba(0,0,0,.35); opacity: .82; }
.letter-photo.in-view { animation: letter-photo-float 6s ease-in-out infinite alternate; }
@keyframes letter-photo-float { to { transform: rotate(3deg) translateY(-14px); } }
.letter-photo img { aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid rgba(119,61,48,.18); border-radius: .7rem 4.3rem .7rem 4.3rem; filter: saturate(.94) contrast(1.02); }
.letter { position: relative; z-index: 2; width: min(90vw, 52rem); margin-right: 26vw; padding: clamp(2.3rem, 6vw, 5.5rem); color: #421421; background: linear-gradient(135deg, #f5eadc, #e5cfb9); box-shadow: 0 38px 90px rgba(0,0,0,.45); clip-path: polygon(0 1%, 4% 0, 8% 1%, 14% 0, 20% 1%, 27% 0, 34% 1%, 40% 0, 48% 1%, 55% 0, 63% 1%, 72% 0, 80% 1%, 88% 0, 94% 1%, 100% 0, 99% 100%, 0 100%); }
.letter .script-line { color: #7f273c; font-size: clamp(3rem, 5vw, 5rem); }
.letter h2 { margin: .4rem 0 1.4rem; font: 500 clamp(2.6rem, 4vw, 4.2rem)/1 var(--serif); }
.letter > p:not(.script-line):not(.letter-signoff) { font: 500 1.28rem/1.85 var(--serif); }
.primary-button.dark { margin-top: 1.5rem; background: #741e35; border-color: #741e35; }
.letter-signoff { margin: 2rem 0 0; font: 1.65rem/1.2 var(--script); }

footer { min-height: 55vh; display: grid; place-content: center; text-align: center; padding: 6rem 1.5rem; background: #0f060a; }
footer p { margin: 0; font: clamp(3.2rem, 7vw, 7rem)/1 var(--script); color: var(--rose); }
footer span { margin-top: 1.6rem; color: #dcc1bf; letter-spacing: .12em; text-transform: uppercase; font-size: .9rem; }

dialog { border: 0; padding: 0; }
dialog::backdrop { background: rgba(7,3,5,.82); backdrop-filter: blur(12px); }
.wish-dialog { width: min(92vw, 52rem); height: min(86vh, 52rem); max-height: 86vh; margin: auto; overflow: auto; color: #431623; background: #f0dfcc; box-shadow: 0 35px 100px rgba(0,0,0,.6); }
.wish-dialog[open] { position: fixed; inset: 0; }
.wish-dialog[open] { animation: letter-unfold .75s cubic-bezier(.16,1,.3,1) both; transform-origin: center bottom; }
@keyframes letter-unfold { from { opacity: 0; transform: perspective(900px) rotateX(12deg) translateY(90px) scale(.88); filter: blur(8px); } to { opacity: 1; transform: perspective(900px) rotateX(0) translateY(0) scale(1); filter: blur(0); } }
.wish-dialog[open] #personalWish p { opacity: 0; transform: translateY(14px); animation: wish-line .7s ease forwards; }
.wish-dialog[open] #personalWish p:nth-child(1) { animation-delay: .28s; }
.wish-dialog[open] #personalWish p:nth-child(2) { animation-delay: .42s; }
.wish-dialog[open] #personalWish p:nth-child(3) { animation-delay: .56s; }
.wish-dialog[open] #personalWish p:nth-child(4) { animation-delay: .7s; }
.wish-dialog[open] #personalWish p:nth-child(5) { animation-delay: .84s; }
@keyframes wish-line { to { opacity: 1; transform: translateY(0); } }
.wish-inner { position: relative; isolation: isolate; overflow: hidden; min-height: 100%; padding: clamp(2.4rem, 7vw, 5.5rem); }
.wish-inner::before { content: "♡"; position: absolute; z-index: -1; right: -6rem; bottom: -8rem; color: rgba(151,46,70,.055); font: 28rem/1 var(--serif); animation: wish-heartbeat 4s ease-in-out infinite; }
@keyframes wish-heartbeat { 0%, 100% { transform: scale(.92) rotate(-8deg); } 14% { transform: scale(1.02) rotate(-6deg); } 28% { transform: scale(.95) rotate(-8deg); } }
.wish-inner .script-line { font-size: clamp(2.8rem, 5vw, 4.5rem); color: #812a40; }
.wish-inner h2 { margin: 0 0 1.5rem; font: 500 clamp(2.6rem, 5vw, 4.6rem)/1 var(--serif); }
#personalWish { font: 500 1.16rem/1.9 var(--sans); letter-spacing: .005em; }
#personalWish p { margin: 0 0 1.3rem; }
#personalWish p:first-child { color: #7f273c; font: 600 1.28rem/1.75 var(--sans); }
.wish-signoff { margin-top: 2.2rem; font: 1.8rem var(--script); }
.dialog-close { position: sticky; display: block; margin: 1rem 1rem -3.6rem auto; top: 1rem; right: 1rem; z-index: 3; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid rgba(90,25,43,.25); color: #661f34; background: rgba(255,255,255,.72); cursor: pointer; font-size: 1.5rem; }
.lightbox { width: min(92vw, 76rem); background: transparent; overflow: visible; }
.lightbox img { max-height: 86vh; width: auto; max-width: 100%; margin: auto; object-fit: contain; box-shadow: 0 30px 80px #000; }
.lightbox[open] img { animation: lightbox-photo-in .26s cubic-bezier(.16,1,.3,1) both; }
@keyframes lightbox-photo-in { from { opacity: 0; scale: .985; } to { opacity: 1; scale: 1; } }
.lightbox .dialog-close { position: absolute; top: -1rem; right: -1rem; color: white; background: #53192b; border-color: rgba(255,255,255,.35); }

.reveal { opacity: 0; transform: translateY(35px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.tilt-left.reveal.in-view { transform: rotate(-2deg); }
.tilt-right.reveal.in-view { transform: rotate(2deg); }
.heart { position: fixed; z-index: 120; color: #d98877; pointer-events: none; animation: float-heart 2.4s ease-out forwards; }
.wish-dialog .heart { position: absolute; z-index: 6; }
@keyframes float-heart { 0% { transform: translate3d(0,0,0) scale(.55) rotate(0); opacity: 0; } 18% { opacity: 1; } 100% { transform: translate3d(var(--heart-drift, 0px), -70vh, 0) scale(1.45) rotate(var(--heart-rotate, 18deg)); opacity: 0; } }

@media (max-width: 800px) {
  .love-lock { align-items: center; padding: 1rem; }
  .love-lock__portrait { inset: 0; opacity: .1; mask-image: linear-gradient(to bottom, #000, transparent 86%); }
  .love-lock__letter { width: min(94vw, 31rem); padding: 4.2rem 1.25rem 1.8rem; border-radius: .65rem 2.5rem .65rem 2.5rem; box-shadow: 9px 12px 0 rgba(100,31,50,.25), 0 26px 70px rgba(0,0,0,.58); }
  .love-lock__letter::before { inset: .48rem; border-radius: .4rem 2rem .4rem 2rem; }
  .love-lock__seal { width: 5rem; }
  .love-lock__script { font-size: clamp(2.1rem, 10vw, 3rem); }
  .love-lock h1 { font-size: clamp(2.35rem, 11vw, 3.4rem); }
  .love-lock__intro { margin-bottom: 1.25rem; font-size: 1rem; line-height: 1.5; }
  .love-lock__field input { min-height: 3.4rem; font-size: .9rem; }
  .love-lock__message { margin-bottom: .7rem; font-size: .88rem; }
  .love-lock__signoff { margin-top: .85rem; }
  .story-progress { display: none; }
  .love-orb { opacity: .42; }
  .surprise-photo { inset: 0; mask-image: linear-gradient(to bottom, #000 0, transparent 68%); opacity: .26; }
  .surprise-card { margin: auto; padding: 2rem; text-align: center; align-self: end; padding-bottom: 18vh; }
  .surprise-card h1 { margin-inline: auto; font-size: clamp(3.3rem, 17vw, 5.4rem); }
  .surprise-card > p:not(.for-line) { margin-inline: auto; }
  .hero { grid-template-columns: 1fr; padding: 7rem 1.4rem 8rem; }
  .hero-copy h2 { font-size: clamp(3.5rem, 16vw, 5.7rem); }
  .hero-frame { width: 88%; margin: 1rem auto 0; }
  .scroll-whisper { display: none; }
  .opening-quote { min-height: 65vh; padding-inline: 1.5rem; }
  .memories { padding-block: 7rem; }
  .memory, .memory-right { grid-template-columns: 1fr; gap: 2rem; margin-bottom: 8rem; }
  .memory-left figure { border-radius: 1rem 4rem 1rem 1rem; }
  .memory-right figure { border-radius: 4rem 1rem 1rem 1rem; }
  .memory-wide figure { border-radius: 1rem 1rem 4rem 1rem; }
  .memory-right figure { order: 0; }
  .memory-copy { padding-inline: .5rem; }
  .memory-wide figure img { aspect-ratio: 4 / 3; }
  .memory-wide .memory-copy { margin: 0; padding: 0 .5rem; }
  .hands-break { grid-template-columns: 1fr; padding: 5rem 1.5rem; }
  .hands-break::before, .hands-break::after { left: 50%; top: 34%; width: 78vw; }
  .hands-break blockquote { font-size: clamp(2.7rem, 12vw, 4.3rem); }
  .collage-section { padding-block: 7rem; }
  .section-heading { margin-bottom: 5rem; }
  .collage { display: flex; overflow-x: auto; padding: 1rem 1rem 3rem; scroll-snap-type: x mandatory; gap: 1.4rem; }
  .collage figure, .collage figure:nth-child(n) { flex: 0 0 78vw; margin: 0; scroll-snap-align: center; }
  .collage figure:hover { transform: none; }
  .promise-break { grid-template-columns: 1fr; padding: 6rem 1.5rem; }
  .promise-break figure { width: 78%; }
  .letter-section { padding: 14rem 1rem 7rem; }
  .letter-photo { width: 72vw; right: -10vw; top: 4rem; }
  .letter { margin: 0; width: 94vw; padding: 3rem 1.6rem; }
  .letter > p:not(.script-line):not(.letter-signoff) { font-size: 1.2rem; }
  #personalWish { font-size: 1.1rem; line-height: 1.85; }
}

@media (prefers-reduced-motion: reduce) {
  .love-lock::before,
  .love-lock::after,
  .love-lock__portrait img,
  .love-lock__seal,
  .love-lock__button,
  .love-lock__hearts i { animation: none !important; }
  .love-lock__letter { animation: none; }
  .love-lock.unlocked { transition-duration: .1s; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-copy h2 span { opacity: 1; transform: none; }
  .memory figure { clip-path: inset(0); filter: none; }
  .curtain-reveal { display: none; }
  .love-firefly, .ambient-petal, .heart-trail, .section-love { display: none; }
  .love-orb { animation: none !important; opacity: .24; }
}

/* Cinematic scrapbook edition */
main { position: relative; isolation: isolate; }

.love-thread {
  position: absolute;
  z-index: 33;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
body.story-started .love-thread { opacity: .76; }
.love-thread__line,
.love-thread__glow {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.love-thread__line {
  stroke: url(#loveThreadGold);
  stroke-width: 1.7;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  opacity: .86;
  filter: none;
}
.love-thread__glow {
  stroke: rgba(255,190,130,.28);
  stroke-width: 5;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  opacity: .5;
  filter: none;
}
.love-thread__traveller {
  opacity: 0;
  fill: #fff4ce;
  stroke: rgba(225,137,100,.92);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px rgba(255,224,169,.95)) drop-shadow(0 0 9px rgba(222,104,78,.7));
  transition: opacity 1s ease;
}
body.story-started .love-thread__traveller { opacity: .94; }
.love-thread__traveller--two { opacity: 0; fill: #ffc99f; }
body.story-started .love-thread__traveller--two { opacity: .72; }
.ambient-paused .love-thread__traveller,
.wish-open .love-thread__traveller { opacity: 0; }

.chapter-transition {
  position: fixed;
  z-index: 77;
  inset: 0;
  visibility: hidden;
  overflow: hidden;
  pointer-events: none;
}
.chapter-transition.playing { visibility: visible; }
.chapter-transition__wash {
  position: absolute;
  inset: -24% -40%;
  opacity: 0;
  background: linear-gradient(112deg, transparent 34%, rgba(255,210,166,.06) 43%, rgba(230,120,112,.2) 50%, rgba(255,207,151,.07) 57%, transparent 66%);
  transform: translateX(-58%) skewX(-8deg);
}
.chapter-transition__spark {
  position: absolute;
  left: -18vw;
  top: 52%;
  width: 16vw;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, #ffd29b 55%, white);
  box-shadow: 0 0 18px rgba(255,164,116,.95);
  transform: rotate(-10deg);
}
.chapter-transition.playing .chapter-transition__wash { animation: chapter-wash 1.05s cubic-bezier(.3,.7,.2,1) both; }
.chapter-transition.playing .chapter-transition__spark { animation: chapter-spark .92s .08s cubic-bezier(.2,.7,.2,1) both; }
@keyframes chapter-wash {
  0% { opacity: 0; transform: translateX(-58%) skewX(-8deg); }
  36% { opacity: 1; }
  100% { opacity: 0; transform: translateX(58%) skewX(-8deg); }
}
@keyframes chapter-spark {
  0% { opacity: 0; transform: translate3d(0,8vh,0) rotate(-10deg) scaleX(.4); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(132vw,-18vh,0) rotate(-10deg) scaleX(1.4); }
}

.opening-quote,
.hands-break,
.collage-section,
.promise-break,
.letter-section {
  margin-top: -3rem;
  border-radius: 4rem 4rem 0 0;
  box-shadow: 0 -30px 70px rgba(5,1,3,.22);
}

.memories { padding: 9rem max(6vw, 1.5rem) 7rem; }
.memory {
  max-width: 86rem;
  margin: 0 auto 7rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0;
}
.memory:last-child { margin-bottom: 2rem; }
.memory figure { grid-column: 1 / span 8; grid-row: 1; }
.memory-copy {
  position: relative;
  z-index: 4;
  grid-column: 8 / -1;
  grid-row: 1;
  align-self: center;
  margin-left: -3.4rem;
  padding: clamp(2rem, 4vw, 3.7rem);
  color: #431724;
  background:
    linear-gradient(135deg, rgba(250,238,220,.97), rgba(224,199,172,.94)),
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.75), transparent 30%);
  clip-path: polygon(0 1.5%, 7% 0, 14% 1.2%, 22% .2%, 30% 1.4%, 39% .3%, 48% 1.2%, 57% 0, 66% 1.1%, 75% .2%, 84% 1.2%, 92% .2%, 100% 1.1%, 99.2% 99%, 91% 100%, 82% 98.9%, 72% 100%, 63% 98.8%, 53% 100%, 43% 99%, 34% 100%, 24% 98.9%, 14% 100%, 6% 99%, .7% 100%);
  box-shadow: 0 26px 65px rgba(0,0,0,.34);
}
.memory-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: .7rem -.7rem -.8rem .8rem;
  border: 1px solid rgba(197,135,84,.42);
  background: rgba(132,41,58,.3);
  transform: rotate(1.4deg);
}
.memory-copy::after {
  position: absolute;
  z-index: -1;
  right: 1rem;
  bottom: -1rem;
  color: rgba(111,35,53,.09);
  font: clamp(3rem, 7vw, 7rem)/1 var(--script);
  white-space: nowrap;
}
.memory:nth-child(1) .memory-copy::after { content: "chellame"; }
.memory:nth-child(2) .memory-copy::after { content: "thango"; }
.memory:nth-child(3) .memory-copy::after { content: "bujjuma"; }
.memory-right figure { grid-column: 5 / -1; grid-row: 1; order: 0; }
.memory-right .memory-copy { grid-column: 1 / span 5; margin: 0 -3.4rem 0 0; }
.memory-wide figure { grid-column: 1 / -1; grid-row: 1; }
.memory-wide .memory-copy {
  grid-column: 6 / -1;
  grid-row: 1;
  align-self: end;
  max-width: none;
  margin: 0 2rem -2.8rem 0;
  padding-left: clamp(2rem, 4vw, 3.7rem);
}
.memory-copy span { color: #9b4a4c; }
.memory-copy h3 { color: #421421; background-image: linear-gradient(to right, #812a40, #812a40); }
.memory-copy p { color: #65424a; }
.memory figure { box-shadow: 16px 18px 0 rgba(112,42,58,.38), 0 42px 82px var(--photo-shadow), inset 0 0 0 1px rgba(117,58,50,.13); }
.photo-tape {
  position: absolute;
  z-index: 7;
  top: -.55rem;
  left: 50%;
  width: clamp(5.2rem, 12vw, 8.4rem);
  height: 1.9rem;
  border: 1px solid rgba(255,244,219,.32);
  background: linear-gradient(90deg, rgba(185,143,105,.28), rgba(255,229,191,.66), rgba(169,124,99,.3));
  box-shadow: 0 4px 12px rgba(41,15,22,.12);
  backdrop-filter: blur(1.5px);
  transform: translateX(-50%) rotate(var(--tape-angle, -2deg));
  pointer-events: none;
}
.memory-right .photo-tape { left: 24%; --tape-angle: 3deg; }
.memory-wide .photo-tape { left: 72%; --tape-angle: -4deg; }

/* One warm keepsake effect for every personal photograph. */
.photo-surface {
  --photo-effect-inset: 0;
  --photo-effect-radius: inherit;
  --photo-charm-top: 1rem;
  --photo-charm-right: 1rem;
  isolation: isolate;
}
.surprise-photo { --photo-effect-inset: 0; --photo-effect-radius: 0; --photo-charm-top: 6vh; --photo-charm-right: 4vw; }
.hero-frame { --photo-effect-inset: .8rem .8rem 3.4rem; --photo-effect-radius: 1.8rem .45rem 1.8rem .45rem; --photo-charm-top: 1.25rem; --photo-charm-right: 1.25rem; }
.memory figure { --photo-effect-inset: .72rem; --photo-charm-top: 1.2rem; --photo-charm-right: 1.2rem; }
.memory-left figure,
.memory-wide figure { --photo-charm-left: 1.2rem; --photo-charm-right: auto; }
.hands-photo { --photo-effect-inset: .65rem; --photo-effect-radius: 6.35rem 6.35rem .7rem .7rem; --photo-charm-top: 1.15rem; --photo-charm-right: 1.15rem; }
.collage figure { --photo-effect-inset: .62rem .62rem 2.7rem; --photo-charm-top: .95rem; --photo-charm-right: .95rem; }
.promise-break figure { --photo-effect-inset: .72rem; --photo-effect-radius: 4.8rem .65rem 4.8rem .65rem; --photo-charm-top: 1.2rem; --photo-charm-right: 1.2rem; }
.story-photo { outline: 1px solid rgba(255,229,194,.16); outline-offset: -.38rem; backface-visibility: hidden; }
.photo-glint {
  position: absolute;
  z-index: 4;
  inset: var(--photo-effect-inset);
  overflow: hidden;
  border-radius: var(--photo-effect-radius);
  pointer-events: none;
}
.photo-glint::before {
  content: "";
  position: absolute;
  inset: -24% -72%;
  opacity: 0;
  background: linear-gradient(108deg, transparent 39%, rgba(255,232,198,.1) 46%, rgba(255,248,225,.5) 50%, rgba(238,166,129,.13) 54%, transparent 61%);
  transform: translate3d(-42%,0,0) skewX(-11deg);
}
.photo-charm {
  position: absolute;
  z-index: 6;
  top: var(--photo-charm-top);
  right: var(--photo-charm-right);
  left: var(--photo-charm-left, auto);
  display: grid;
  place-items: center;
  width: clamp(1.8rem, 2.2vw, 2.35rem);
  aspect-ratio: 1;
  border: 1px solid rgba(255,231,198,.68);
  border-radius: 50%;
  color: #fff0d7;
  background: radial-gradient(circle at 35% 28%, rgba(187,82,87,.9), rgba(95,29,47,.93) 68%);
  box-shadow: 0 5px 14px rgba(55,8,25,.32), 0 0 18px rgba(224,128,101,.2);
  opacity: 0;
  font: 1.05rem/1 var(--serif);
  transform: rotate(-12deg) scale(.45);
  transition: transform .45s cubic-bezier(.16,1,.3,1), box-shadow .45s ease;
  pointer-events: none;
}
.photo-surface.photo-awake > .photo-glint::before {
  animation: keepsake-glint 1.15s calc(.38s + var(--photo-effect-delay, 0s)) cubic-bezier(.2,.65,.25,1) both;
}
.photo-surface.photo-awake > .photo-charm {
  animation: photo-charm-arrive .78s calc(.3s + var(--photo-effect-delay, 0s)) cubic-bezier(.16,1,.3,1) both;
}
@keyframes keepsake-glint {
  0% { opacity: 0; transform: translate3d(-42%,0,0) skewX(-11deg); }
  22% { opacity: .58; }
  72% { opacity: .38; }
  100% { opacity: 0; transform: translate3d(42%,0,0) skewX(-11deg); }
}
@keyframes photo-charm-arrive {
  0% { opacity: 0; transform: rotate(-16deg) scale(.42); }
  62% { opacity: .92; transform: rotate(5deg) scale(1.08); }
  100% { opacity: .82; transform: rotate(0) scale(1); }
}
@media (hover: hover) and (pointer: fine) {
  .photo-surface:hover > .photo-glint::before { animation: keepsake-glint .92s cubic-bezier(.2,.65,.25,1) both; }
  .photo-surface:hover > .photo-charm { transform: rotate(7deg) scale(1.08); box-shadow: 0 7px 18px rgba(55,8,25,.38), 0 0 26px rgba(224,128,101,.32); }
}

.hands-break { padding-top: calc(8vw + 3rem); }
.hands-break.in-view img { animation: hands-arrive 1.4s cubic-bezier(.16,1,.3,1) both; }
@keyframes hands-arrive {
  from { opacity: 0; transform: translateY(38px) rotate(-2deg) scale(.96); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); filter: blur(0); }
}

.collage-section { padding: 10rem max(4vw, 1.2rem) 10rem; }
.section-heading { margin-bottom: 5rem; }
.collage {
  max-width: 88rem;
  grid-auto-flow: dense;
  gap: clamp(.8rem, 1.8vw, 2rem) clamp(1rem, 2.2vw, 2.4rem);
}
.collage figure {
  padding: .62rem .62rem 2.7rem;
  border-radius: .55rem;
  box-shadow: 10px 13px 0 rgba(104,36,54,.46), 0 28px 58px rgba(0,0,0,.4), inset 0 0 0 1px rgba(119,61,48,.12);
}
.collage figure:nth-child(3n+1) { border-radius: 3.5rem .6rem .6rem .6rem; }
.collage figure:nth-child(3n+2) { border-radius: .6rem 3.5rem .6rem .6rem; }
.collage figure:nth-child(3n+3) { border-radius: .6rem .6rem 3.5rem .6rem; }
.collage figure:nth-child(6n+1) { grid-column: 1 / span 5; margin: 0 0 -2.5rem; z-index: 5; }
.collage figure:nth-child(6n+2) { grid-column: 5 / span 7; margin: 6rem 0 0; z-index: 4; }
.collage figure:nth-child(6n+3) { grid-column: 2 / span 4; margin: -3rem 0 1rem; z-index: 6; }
.collage figure:nth-child(6n+4) { grid-column: 7 / span 5; margin: 1rem 0 -2rem; z-index: 5; }
.collage figure:nth-child(6n+5) { grid-column: 1 / span 6; margin: -1rem 0 0; z-index: 4; }
.collage figure:nth-child(6n+6) { grid-column: 6 / span 6; margin: 4rem 0 0; z-index: 6; }
.collage figure.reveal { clip-path: inset(0 0 76% 0 round 1rem); transition: opacity .9s ease, transform .9s ease, clip-path 1.1s cubic-bezier(.16,1,.3,1); }
.collage figure.reveal.in-view { clip-path: inset(0 round 0); }
.collage figure.in-view img { animation: none; }
.collage figure:nth-child(odd) .photo-tape { left: 28%; --tape-angle: -5deg; }
.collage figure:nth-child(even) .photo-tape { left: 72%; --tape-angle: 4deg; }
.collage figcaption { font-size: 1.16rem; }

.promise-break { padding-top: calc(10vw + 3rem); }

.letter-section {
  min-height: 112svh;
  padding: 0;
  background: #0d0508;
  box-shadow: 0 -40px 90px rgba(4,1,2,.5);
}
.finale-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.92) contrast(1.04) brightness(.82);
  transform: scale(1.055);
}
.letter-section.scene-active .finale-art { animation: finale-arrive 2.2s cubic-bezier(.16,1,.3,1) both; }
@keyframes finale-arrive {
  from { opacity: .15; transform: scale(1.12); filter: saturate(.6) contrast(1.08) brightness(.55) blur(7px); }
  to { opacity: 1; transform: scale(1.025); filter: saturate(.92) contrast(1.04) brightness(.82) blur(0); }
}
.finale-vignette {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 38%, rgba(7,2,4,.14) 64%, rgba(7,2,4,.7) 100%);
  pointer-events: none;
}
.letter {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 15%;
  width: min(36vw, 37rem);
  margin: 0;
  padding: 0 1rem;
  color: #421421;
  text-align: center;
  background: transparent;
  box-shadow: none;
  clip-path: none;
}
.letter.reveal { opacity: 0; transform: translate(-50%, 9rem) scale(.92); filter: blur(7px); }
.letter.reveal.in-view { opacity: 1; transform: translate(-50%, 0) scale(1); filter: blur(0); transition: opacity 1.1s .25s ease, transform 1.45s .2s cubic-bezier(.16,1,.3,1), filter 1.1s .2s ease; }
.letter .script-line { margin-bottom: .15rem; font-size: clamp(2.5rem, 4vw, 4.2rem); }
.letter h2 { margin: .15rem 0 .75rem; font-size: clamp(2.05rem, 3.25vw, 3.7rem); }
.letter > p:not(.script-line):not(.letter-signoff) { margin: 0 auto; max-width: 39rem; font: 600 clamp(.98rem, 1.15vw, 1.22rem)/1.58 var(--serif); }
.letter-signoff { margin-top: .65rem; font-size: 1.45rem; }
.seal-button {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 68%;
  display: grid;
  justify-items: center;
  gap: .75rem;
  width: 12rem;
  border: 0;
  padding: 0;
  color: #fff0dc;
  background: transparent;
  cursor: pointer;
}
.seal-button.reveal { opacity: 0; transform: translate(-50%, calc(-50% + 2.5rem)); }
.seal-button.reveal.in-view { opacity: 1; transform: translate(-50%, -50%); transition: opacity .7s .4s ease, transform .9s .35s cubic-bezier(.16,1,.3,1); }
.seal-heart {
  display: grid;
  place-items: center;
  width: 5.8rem;
  aspect-ratio: 1;
  border: 1px solid rgba(255,219,171,.72);
  border-radius: 50%;
  color: #f6c39a;
  background: radial-gradient(circle at 38% 30%, #bd704b 0, #8b3a31 38%, #4c1723 78%);
  box-shadow: 0 0 0 7px rgba(74,19,30,.52), inset 0 0 0 4px rgba(255,194,139,.24), 0 12px 32px rgba(0,0,0,.5), 0 0 26px rgba(238,133,94,.42);
  font: 2rem/1 var(--serif);
  animation: seal-pulse 3s ease-in-out infinite;
}
.seal-label {
  padding: .55rem 1rem;
  border: 1px solid rgba(246,205,165,.28);
  border-radius: 999px;
  background: rgba(31,8,16,.72);
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .05em;
  white-space: nowrap;
}
.seal-button:hover .seal-heart { transform: scale(1.07); box-shadow: 0 0 0 8px rgba(74,19,30,.48), inset 0 0 0 4px rgba(255,194,139,.3), 0 16px 38px rgba(0,0,0,.55), 0 0 38px rgba(238,133,94,.64); }
.seal-button:focus-visible { outline: 2px solid #ffd39d; outline-offset: 12px; border-radius: 50%; }
@keyframes seal-pulse {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.055); }
  23% { transform: scale(.99); }
  34% { transform: scale(1.035); }
}
.letter-section.is-opening .seal-heart { animation: seal-break .72s cubic-bezier(.2,.8,.2,1) both; }
.letter-section.is-opening .seal-label { animation: seal-label-away .45s ease both; }
.letter-section.is-opening .letter { animation: finale-letter-lift 1.05s cubic-bezier(.16,1,.3,1) both; }
.letter-section.is-opening .finale-art { animation: finale-bloom 1.1s ease both; }
.letter-section.is-opening .finale-vignette::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 63%, rgba(255,224,177,.68), rgba(224,112,89,.15) 18%, transparent 42%);
  animation: finale-flare 1.15s ease both;
}
@keyframes seal-break { 45% { transform: scale(1.18) rotate(-5deg); opacity: 1; } 100% { transform: scale(.2) rotate(22deg); opacity: 0; filter: blur(8px); } }
@keyframes seal-label-away { to { opacity: 0; transform: translateY(1rem); } }
@keyframes finale-letter-lift { to { transform: translate(-50%, -2.2rem) scale(1.015); } }
@keyframes finale-bloom { 0% { filter: saturate(.92) contrast(1.04) brightness(.82); transform: scale(1.025); } 50% { filter: saturate(1.16) contrast(1.04) brightness(1.02); transform: scale(1.05); } 100% { filter: saturate(.92) contrast(1.04) brightness(.82); transform: scale(1.025); } }
@keyframes finale-flare { from { opacity: 0; transform: scale(.5); } 38% { opacity: 1; } to { opacity: 0; transform: scale(1.5); } }

.wish-dialog {
  border: 1px solid rgba(246,214,177,.7);
  background:
    linear-gradient(rgba(240,223,204,.96), rgba(240,223,204,.96)),
    radial-gradient(circle at 20% 10%, #fff, transparent 35%);
  box-shadow: 0 0 0 1px rgba(91,28,43,.24), 0 35px 120px rgba(0,0,0,.72), 0 0 80px rgba(169,67,79,.2);
}
.wish-inner { border: 1px solid rgba(130,59,64,.18); margin: .75rem; min-height: calc(100% - 1.5rem); }
.wish-monogram {
  margin: 2.6rem auto 0;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(129,42,64,.2);
  color: #812a40;
  text-align: center;
  font: 2rem/1.2 var(--script);
}

@media (max-width: 800px) {
  body.story-started .love-thread { opacity: .5; }
  .love-thread__glow { stroke-width: 4; filter: none; opacity: .48; animation-duration: 6.2s; }
  .love-thread__line { stroke-width: 1.2; filter: none; opacity: .82; }
  .love-thread__traveller--two { display: none; }
  .opening-quote,
  .hands-break,
  .collage-section,
  .promise-break,
  .letter-section { margin-top: -1.5rem; border-radius: 2.2rem 2.2rem 0 0; }
  .memory,
  .memory-right,
  .memory-wide { display: grid; grid-template-columns: 1fr; gap: 0; margin-bottom: 5rem; }
  .memory figure,
  .memory-right figure,
  .memory-wide figure { grid-column: 1; grid-row: 1; order: 0; }
  .memory-copy,
  .memory-right .memory-copy,
  .memory-wide .memory-copy {
    grid-column: 1;
    grid-row: 2;
    width: calc(100% - 1.2rem);
    margin: -2rem auto 0;
    padding: 2.1rem 1.6rem 1.8rem;
  }
  .memory-copy::before { inset: .45rem -.35rem -.5rem .35rem; }
  .memory-copy h3 { font-size: clamp(2.55rem, 11vw, 3.9rem); }
  .memory-copy p { font-size: 1.05rem; }
  .collage-section { padding: 7rem .65rem 7rem; }
  .collage {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    overflow: visible;
    padding: .5rem .35rem 2rem;
    gap: 0;
  }
  .collage figure,
  .collage figure:nth-child(n) {
    grid-column: 1 / span 6;
    width: auto;
    margin: 0 0 -1.4rem;
    z-index: 2;
    scroll-snap-align: none;
  }
  .collage figure:nth-child(even) { grid-column: 3 / span 6; z-index: 3; }
  .collage figure:nth-child(3n) { margin-bottom: .8rem; }
  .collage figure:hover { transform: none; }
  .collage figcaption { font-size: 1.04rem; }
  .letter-section { min-height: 118svh; }
  .finale-art { object-position: center; filter: saturate(.9) contrast(1.04) brightness(.72); }
  .letter {
    top: 17%;
    width: min(78vw, 24rem);
    padding: 0 .6rem;
  }
  .letter .script-line { font-size: clamp(2.2rem, 10vw, 3.35rem); }
  .letter h2 { font-size: clamp(1.9rem, 8vw, 2.7rem); }
  .letter > p:not(.script-line):not(.letter-signoff) { font-size: .93rem; line-height: 1.48; }
  .letter-signoff { margin-top: .45rem; font-size: 1.28rem; }
  .seal-button { top: 70%; }
  .seal-heart { width: 5rem; }
  .seal-label { font-size: .8rem; }
  .wish-inner { margin: .45rem; padding: 2.8rem 1.45rem; }
  .wish-monogram { font-size: 1.7rem; }
}

@media (hover: none), (pointer: coarse) {
  .heart-trail { display: none; }
  .memory figure:hover { --lift: 0px; }
  .collage figure:hover { transform: none; box-shadow: 10px 13px 0 rgba(104,36,54,.46), 0 28px 58px rgba(0,0,0,.4); }
  .seal-button:hover .seal-heart { transform: none; }
  .love-orb-three { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .chapter-transition,
  .heart { display: none !important; }
  .photo-glint { display: none; }
  .photo-charm { opacity: .72; transform: none; animation: none !important; }
  body.story-started .love-thread { opacity: .38; }
  .love-thread__line { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .love-thread__glow { animation: none !important; stroke-dasharray: none !important; stroke-dashoffset: 0 !important; opacity: .18; }
  .love-thread__traveller { display: none; }
  .letter.reveal,
  .letter.reveal.in-view { opacity: 1; transform: translate(-50%, 0); filter: none; }
  .seal-button.reveal,
  .seal-button.reveal.in-view { opacity: 1; transform: translate(-50%, -50%); }
  .collage figure.reveal { clip-path: inset(0); }
}
