:root {
  --dawn: #ffd6e0; --lav: #cdbcf0; --deodar: #1f3d34; --snow: #f7f4ff; --rose: #e0527f; --gold: #ffcf70; --night: #0e1330;
  --ink: #3a2447; --ink2: #6b4f7a;
  --display: "Cormorant Garamond", Georgia, serif; --script: "Dancing Script", cursive; --body: "Nunito", system-ui, sans-serif; --dev: "Tiro Devanagari Hindi", "Cormorant Garamond", serif;
  --top: #f7c6d6; --bot: #fde8d8;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: auto; overflow-x: hidden; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: #fde8d8; line-height: 1.55; -webkit-font-smoothing: antialiased; }
html:has(body.locked) { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
.eyebrow { font-size: .78rem; letter-spacing: .28em; text-transform: uppercase; opacity: .75; font-weight: 700; }

/* ---------- fixed layers ---------- */
#sky { position: fixed; inset: 0; z-index: -3; background: linear-gradient(180deg, var(--top), var(--bot)); }
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: 0; pointer-events: none; transition: opacity .6s; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 30; pointer-events: none; }
.music { position: fixed; z-index: 60; left: 14px; bottom: 14px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .55); backdrop-filter: blur(8px); font-size: 1.3rem; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.music.off { opacity: .55; text-decoration: line-through; }
#road { position: fixed; z-index: 25; top: 0; right: 0; width: 46px; height: 100vh; pointer-events: none; opacity: 0; transition: opacity .8s; }
#road.on { opacity: 1; }
#roadPath { stroke: #ff8a1f; stroke-width: 20; stroke-linecap: round; }
@media (max-width: 600px) { #road { width: 34px; } #roadPath { stroke-width: 15; } }

/* ---------- gate ---------- */
#gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: linear-gradient(180deg, #f7c6d6, #cdbcf0 60%, #9d93d8); transition: opacity 1s, transform 1s; overflow: auto; }
#gate.leave { opacity: 0; pointer-events: none; transform: scale(1.04); }
.gate-card { width: min(380px, 100%); text-align: center; background: rgba(255, 255, 255, .5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .7); border-radius: 28px; padding: 26px 22px 22px; box-shadow: 0 20px 50px rgba(80, 50, 120, .25); }
#gate.shake .gate-card { animation: shake .5s; }
#gate.open .gate-card { animation: lift .9s forwards; }
@keyframes lift { to { transform: translateY(-14px) scale(.96); opacity: .0; } }
@keyframes shake { 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
.gate-fly { position: relative; height: 50px; }
.gate-fly i { position: absolute; top: 8px; width: 34px; height: 26px; background: radial-gradient(circle at 30% 30%, #ff9db8, #e0527f); border-radius: 60% 40% 60% 40%; animation: flap .5s ease-in-out infinite alternate; }
.gate-fly i:first-child { left: calc(50% - 34px); transform-origin: 100% 50%; }
.gate-fly i:last-child { left: 50%; transform-origin: 0 50%; background: radial-gradient(circle at 70% 30%, #e1d4ff, #a58be0); border-radius: 40% 60% 40% 60%; animation-name: flap2; }
@keyframes flap { to { transform: rotateY(65deg) translateY(-2px); } }
@keyframes flap2 { to { transform: rotateY(-65deg) translateY(-2px); } }
.gate-title { font-family: var(--script); font-size: 3.2rem; line-height: 1.1; color: #7a2a52; margin: 4px 0 6px; }
.gate-sub { font-size: .95rem; margin-bottom: 14px; }
.dots { display: flex; gap: 9px; justify-content: center; margin-bottom: 8px; }
.dots i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #b0508a; transition: .2s; }
.dots i.on { background: #e0527f; border-color: #e0527f; transform: scale(1.15); }
.gate-msg { min-height: 2.8em; font-size: .88rem; color: #7a2a52; margin-bottom: 8px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { height: 54px; border-radius: 16px; font-size: 1.35rem; font-weight: 700; background: rgba(255, 255, 255, .8); box-shadow: 0 3px 0 rgba(120, 70, 140, .25); transition: transform .1s, box-shadow .1s; color: #5b2a62; }
.keypad button:active { transform: translateY(3px); box-shadow: none; }
.about { font-size: .8rem; }

/* ---------- begin (hold) ---------- */
#begin { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; text-align: center; padding: 20px; background: radial-gradient(circle at 50% 40%, rgba(255, 240, 230, .9), rgba(205, 188, 240, .95) 70%); transition: opacity 1.6s ease, backdrop-filter 1.6s; backdrop-filter: blur(14px); }
#begin.go { opacity: 0; pointer-events: none; backdrop-filter: blur(0); }
.begin-in { display: grid; gap: 14px; justify-items: center; }
.big-lantern { width: 150px; height: 188px; filter: drop-shadow(0 0 24px rgba(255, 190, 90, .8)); animation: bob 3s ease-in-out infinite; touch-action: none; user-select: none; -webkit-user-select: none; transition: filter .3s, transform .3s; }
.big-lantern.hold { filter: drop-shadow(0 0 46px rgba(255, 200, 100, 1)); transform: scale(1.06); }
.big-lantern svg { width: 100%; height: 100%; overflow: visible; }
.flame { animation: flick .4s ease-in-out infinite alternate; transform-origin: 60px 90px; }
@keyframes flick { to { transform: scale(.9, 1.08) translateX(1px); opacity: .85; } }
@keyframes bob { 50% { transform: translateY(-10px); } }
.begin-t { font-family: var(--script); font-size: 2.1rem; color: #7a2a52; }
.begin-s { font-size: .95rem; color: var(--ink2); }

/* ---------- scenes ---------- */
#site { position: relative; z-index: 1; }
.scene { overflow-x: clip; position: relative; padding: 14vh 20px 12vh; min-height: 100vh; text-align: center; }
.scene.night { color: #f4efff; }
.scene-title { font-family: var(--script); font-size: clamp(2.2rem, 9vw, 3.6rem); line-height: 1.1; margin-bottom: 22px; text-shadow: 0 2px 18px rgba(255, 255, 255, .25); }
.scene-title small { display: block; font-family: var(--body); font-size: .95rem; letter-spacing: .06em; font-weight: 600; opacity: .8; margin-top: 6px; }
.night .scene-title { text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.hint, .poem-hint, .pastry-msg { font-size: .9rem; opacity: .8; }
.btn { background: linear-gradient(135deg, #ff9db8, #e0527f); color: #fff; padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 1.05rem; box-shadow: 0 8px 22px rgba(224, 82, 127, .4); transition: transform .15s; }
.btn:active { transform: scale(.95); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s, transform .9s; }
.reveal.in { opacity: 1; transform: none; }

/* hero */
.hero { user-select: none; -webkit-user-select: none; padding: 0; height: 100vh; min-height: 560px; overflow: hidden; }
.mountains { position: absolute; inset: 0; }
.mountains svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; display: block; }
.par { will-change: transform; }
.sun { position: absolute; left: 50%; top: 26%; width: 150px; height: 150px; margin-left: -75px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 244, 200, .95), rgba(255, 200, 160, .0) 70%); filter: blur(4px); animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.12); opacity: .8; } }
.mist { position: absolute; inset: 0; pointer-events: none; --clear: 0; }
.mist i { position: absolute; left: -20%; width: 140%; height: 46%; background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, .92), rgba(255, 255, 255, 0) 68%); filter: blur(16px); opacity: calc(1 - var(--clear)); transition: opacity .2s; }
.mist i:nth-child(1) { top: 26%; transform: translateX(calc(var(--clear) * -30%)); animation: drift 16s ease-in-out infinite alternate; }
.mist i:nth-child(2) { top: 46%; transform: translateX(calc(var(--clear) * 34%)); animation: drift 21s ease-in-out infinite alternate-reverse; }
.mist i:nth-child(3) { top: 62%; transform: translateX(calc(var(--clear) * -40%)); animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { margin-left: 8%; } }
.hero-text { position: absolute; z-index: 3; left: 0; right: 0; top: 11vh; padding: 0 22px; display: grid; gap: 10px; justify-items: center; }
#title { font-family: var(--script); font-size: clamp(4rem, 21vw, 8.6rem); line-height: 1; color: #7a2a52; text-shadow: 0 4px 30px rgba(255, 255, 255, .7); }
#title .l { display: inline-block; opacity: 0; filter: blur(14px); transform: translateY(24px) scale(.9); animation: letter 1.4s forwards; }
@keyframes letter { to { opacity: 1; filter: blur(0); transform: none; } }
.hero-sub { font-family: var(--display); font-style: italic; font-size: clamp(1.2rem, 5vw, 1.7rem); color: #5a2b55; }
.counter { font-size: .86rem; color: #6b3a66; max-width: 30em; opacity: .9; }
.hero .hint { color: #5a2b55; margin-top: 6px; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(8px); } }
.scroll-cue { position: absolute; z-index: 3; bottom: 18px; left: 0; right: 0; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.scroll-cue i { display: block; width: 2px; height: 28px; margin: 6px auto 0; background: linear-gradient(#fff, transparent); animation: cue 1.8s infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* poem */
.poem { padding: 0; height: 340vh; }
.sticky { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; overflow: hidden; }
.poem-in { max-width: 560px; padding: 0 28px; display: grid; gap: 12px; }
.pl { font-family: var(--display); font-size: clamp(1.35rem, 5.6vw, 2rem); line-height: 1.35; font-weight: 500; }
.pl.dev { font-family: var(--dev); font-size: clamp(1.3rem, 5.2vw, 1.9rem); color: #7a2a52; }
.w { display: inline-block; opacity: .1; filter: blur(4px); transform: translateY(10px); transition: opacity .6s, filter .6s, transform .6s; }
.w.on { opacity: 1; filter: none; transform: none; }
b[data-bloom] { font-weight: 700; color: var(--rose); cursor: pointer; border-bottom: 2px dotted var(--rose); animation: glow 2.2s ease-in-out infinite; padding: 0 2px; }
@keyframes glow { 50% { text-shadow: 0 0 14px rgba(224, 82, 127, .85); } }
.poem-hint { position: absolute; bottom: 7vh; left: 0; right: 0; }
.moon { position: absolute; right: 12%; top: 100%; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fffbe8, #ffe9a8 60%, #f2c96a); box-shadow: 0 0 60px rgba(255, 233, 168, .9); transition: transform 3s cubic-bezier(.2, .8, .2, 1), opacity 1s; opacity: 0; pointer-events: none; }
.moon.up { transform: translateY(-56vh); opacity: 1; }
.moon.up.down { transform: translateY(0); opacity: 0; transition-duration: 2s; }

/* village */
.valley { margin: 0 auto 26px; width: min(340px, 86%); }
.valley img { width: 100%; aspect-ratio: 3/5; max-height: 72vh; object-fit: cover; border-radius: 22px; box-shadow: 0 14px 38px rgba(60, 40, 60, .35); border: 6px solid #fffdf8; background: #fffdf8; }
.valley figcaption { font-family: var(--display); font-style: italic; font-size: 1.2rem; margin-top: 12px; opacity: .85; }
.line-title { font-family: var(--display); font-style: italic; font-size: 1.15rem; margin: 20px 0 14px; opacity: .85; }
.clothesline { display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); gap: 6px; max-width: 760px; margin: 0 auto; padding-top: 26px; }
.pol { position: relative; padding-top: 22px; perspective: 700px; }
.pol::before { content: ""; position: absolute; top: 0; left: -4px; right: -4px; height: 2px; background: #8a6f6a; }
.pol .pin { position: absolute; top: -6px; left: 50%; width: 10px; height: 24px; margin-left: -5px; background: #e0a96a; border-radius: 3px; z-index: 2; }
.pol .in { position: relative; width: 112px; height: 150px; margin: 0 auto; transform-origin: 50% 0; animation: sway 4.5s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
@keyframes sway { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
.pol .card { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, 1.3, .5, 1); cursor: pointer; }
.pol.flip .card { transform: rotateY(180deg); }
.pol .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fffdf8; padding: 6px 6px 22px; border-radius: 4px; box-shadow: 0 8px 18px rgba(0, 0, 0, .25); }
.pol .face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; border-radius: 2px; }
.pol .back { transform: rotateY(180deg); display: grid; place-items: center; padding: 10px; font-family: var(--script); font-size: 1.05rem; line-height: 1.2; color: #7a2a52; }

/* meadow */
.meadow { padding-bottom: 6vh; }
.meadow-box { position: relative; height: 66vh; min-height: 440px; max-width: 760px; margin: 0 auto; border-radius: 26px; overflow: hidden; background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(170, 220, 160, .35)); box-shadow: inset 0 0 40px rgba(255, 255, 255, .5), 0 14px 40px rgba(50, 90, 70, .22); user-select: none; -webkit-user-select: none; }
#meadowC { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.reason { position: absolute; z-index: 3; left: 0; right: 0; top: 14px; display: grid; place-items: center; padding: 0 16px; pointer-events: none; }
.reason span { display: inline-block; max-width: 28em; background: rgba(255, 255, 255, .7); backdrop-filter: blur(8px); border-radius: 18px; padding: 10px 16px; font-family: var(--display); font-style: italic; font-size: 1.15rem; line-height: 1.3; transition: opacity .4s, transform .4s; box-shadow: 0 6px 20px rgba(0, 0, 0, .1); }
.reason.swap span { opacity: 0; transform: translateY(8px); }
.grass { position: absolute; left: 0; bottom: 0; width: 100%; height: 24%; pointer-events: none; }
.fl { transform-box: fill-box; transform-origin: 50% 100%; animation: wave 3s ease-in-out infinite alternate; }
@keyframes wave { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }

/* dusk */
.dusk { padding: 0; height: 420vh; }
.dusk .sticky { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 8vh 20px 0; gap: 18px; }
.postcards { position: relative; flex: none; width: min(92vw, 560px, calc(46vh * 4 / 3)); aspect-ratio: 4/3; }
.pc { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.2s; }
.pc.on { opacity: 1; }
.pc img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; box-shadow: 0 16px 44px rgba(20, 10, 50, .5); filter: saturate(1.05) contrast(1.02); }
.pc::after { content: ""; position: absolute; inset: 0; border-radius: 22px; box-shadow: inset 0 0 80px rgba(60, 20, 90, .35); pointer-events: none; }
.pc figcaption { position: absolute; left: 14px; bottom: 12px; font-family: var(--script); font-size: 1.8rem; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); z-index: 2; }
.dusk-t { position: static; min-height: 2.8em; font-family: var(--display); font-style: italic; font-size: clamp(1.2rem, 4.6vw, 1.6rem); color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .45); max-width: 26em; }
.lamps { position: absolute; left: 0; right: 0; bottom: 14vh; display: flex; justify-content: space-around; padding: 0 20px; }
.lamp { width: 10px; height: 74px; background: #2a2340; border-radius: 4px; position: relative; opacity: .85; }
.lamp::before { content: ""; position: absolute; left: 50%; top: -10px; width: 22px; height: 18px; margin-left: -11px; border-radius: 50% 50% 8px 8px; background: #6b5d8a; transition: background .6s, box-shadow .6s; }
.lamp.on::before { background: #ffe29a; box-shadow: 0 0 22px 10px rgba(255, 214, 120, .75), 0 40px 60px 6px rgba(255, 214, 120, .25); }
.track { position: absolute; left: 0; right: 0; bottom: 5vh; height: 44px; }
.track > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.train { position: absolute; bottom: 8px; left: 0; width: 120px; will-change: transform; }
.videos { padding-top: 10vh; }
.windows { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; max-width: 760px; margin: 0 auto; padding-right: 14px; }
.vwin { position: relative; aspect-ratio: 3/4.2; overflow: hidden; border-radius: 999px 999px 18px 18px; border: 6px solid #f2e3c6; box-shadow: 0 0 0 3px #8a6f6a, 0 14px 30px rgba(0, 0, 0, .35); background: #000; }
.vwin img, .vwin video { width: 100%; height: 100%; object-fit: cover; }
.vwin span { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; display: grid; place-items: center; background: rgba(255, 255, 255, .8); border-radius: 50%; color: #7a2a52; font-size: 1.2rem; padding-left: 4px; }
.vwin.play span { display: none; }

/* call */
.thread-box { position: relative; width: min(360px, 88vw); aspect-ratio: 360/300; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.thread-box svg { width: 100%; height: 100%; overflow: visible; }
#pulse { animation: travel 3.2s linear infinite; }
.thread-box.held #thread { opacity: 1; stroke-width: 7; } .thread-box.held #pulse { animation-duration: 1.2s; stroke-width: 9; }
@keyframes travel { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100; } }
.halo { animation: halo 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.cpin { position: absolute; font-size: .95rem; font-weight: 700; background: rgba(255, 255, 255, .15); backdrop-filter: blur(6px); border-radius: 999px; padding: 4px 12px; }
.cpin.p1 { left: 8%; top: 4%; } .cpin.p2 { right: 4%; bottom: 4%; }
.call-timer { margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: .1em; opacity: .85; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 16px 0 10px; }
.chips button { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 9px 18px; font-weight: 700; transition: transform .15s, background .2s; }
.chips button:active { transform: scale(.94); } .chips button.on { background: rgba(255, 207, 112, .35); }
.call-line { font-family: var(--display); font-style: italic; font-size: 1.3rem; max-width: 24em; margin: 0 auto; min-height: 4.2em; padding: 0 12px; }

/* home */
.home { padding: 0; height: 380vh; }
.home .sticky { display: grid; align-content: center; justify-items: center; gap: 12px; padding: 0 24px; }
.home .scene-title { margin-bottom: 0; }
.house-draw { width: min(420px, 88vw); }
.house-draw svg { width: 100%; height: auto; overflow: visible; }
.house-draw .d { stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); }
#houseLight { opacity: 0; transition: opacity 1.4s; }
#houseLight.on { opacity: .85; filter: drop-shadow(0 0 14px #ffcf70); }
.promises { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; max-width: 28em; }
.promises li { font-family: var(--display); font-style: italic; font-size: clamp(1.1rem, 4.6vw, 1.45rem); opacity: 0; transform: translateY(14px); transition: opacity .8s, transform .8s; }
.promises li.on { opacity: 1; transform: none; }

/* lanterns */
.pastry { width: min(220px, 62vw); margin: 10px auto 6px; display: block; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .4)); transition: transform .3s; }
.pastry:active { transform: scale(.97); }
.cflame { transform-origin: 110px 34px; animation: flick .35s ease-in-out infinite alternate; filter: drop-shadow(0 0 10px #ffcf70); }
.pastry.out .cflame { opacity: 0; animation: none; }
.pastry-msg { margin-bottom: 10px; }
.lantern-cap { font-family: var(--display); font-style: italic; font-size: 1.3rem; min-height: 3.4em; max-width: 26em; margin: 18px auto 0; padding: 0 12px; }
.lantern-count { font-weight: 700; letter-spacing: .12em; opacity: .85; margin-bottom: 6px; }
.lgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px 6px; max-width: 520px; margin: 14px auto 0; padding-right: 22px; }
@media (min-width: 640px) { .lgrid { grid-template-columns: repeat(6, 1fr); } }
.ln { position: relative; width: 44px; height: 58px; margin: 0 auto; border-radius: 42% 42% 32% 32%; background: linear-gradient(180deg, #6d4a5e, #4a3350); opacity: .65; transition: opacity .6s, background .6s, box-shadow .6s; font-size: .72rem; font-weight: 700; color: #cbb8da; display: grid; place-items: center; animation: lbob 4s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
.ln::before { content: ""; position: absolute; top: -5px; left: 10px; right: 10px; height: 6px; border-radius: 3px; background: #a07650; }
.ln::after { content: ""; position: absolute; bottom: -9px; left: 50%; width: 2px; height: 9px; margin-left: -1px; background: #a07650; }
@keyframes lbob { to { transform: translateY(-7px); } }
.ln.lit { opacity: 1; color: #6a2a30; background: radial-gradient(circle at 50% 55%, #fff6c8, #ffcf70 60%, #ff8f5a); box-shadow: 0 0 26px 8px rgba(255, 190, 90, .65); }
.ln.last { opacity: .35; } .ln.last.ready { opacity: 1; animation: lbob 1.4s ease-in-out infinite alternate; box-shadow: 0 0 20px 4px rgba(255, 207, 112, .5); }
.ln.rise { animation: rise 6s ease-in forwards; }
@keyframes rise { to { transform: translateY(-70vh) scale(1.6); opacity: 0; } }

/* letter */
.envelope { position: relative; width: min(340px, 86vw); height: 220px; margin: 20px auto 0; transition: transform 1s, opacity 1s, height 1s; }
.env-back, .env-front { position: absolute; inset: 0; border-radius: 10px; }
.env-back { background: #f0d6c4; }
.env-front { background: linear-gradient(135deg, transparent 49%, #e8c5b0 50%) left / 51% 100% no-repeat, linear-gradient(225deg, transparent 49%, #eccdb9 50%) right / 51% 100% no-repeat, linear-gradient(0deg, #f6dccb 0 50%, transparent 50%); border-radius: 10px; box-shadow: 0 14px 30px rgba(0, 0, 0, .35); }
.flap { position: absolute; left: 0; right: 0; top: 0; height: 60%; background: #e2baa5; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .9s; z-index: 2; }
.seal { position: absolute; z-index: 3; left: 50%; top: 52%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff7da0, #a6264f); color: #ffe9a8; font-family: var(--script); font-size: 1.3rem; display: grid; place-items: center; box-shadow: 0 5px 14px rgba(0, 0, 0, .45); touch-action: none; user-select: none; -webkit-user-select: none; animation: bob 3s ease-in-out infinite; }
.seal svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.envelope.open { opacity: 0; height: 0; margin-top: 0; transform: translateY(40px); pointer-events: none; }
.envelope.open .flap { transform: rotateX(180deg); }
.paper { max-width: 520px; margin: 0 auto; background: #fff8ee; color: #4a2c3d; border-radius: 6px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); max-height: 0; overflow: hidden; opacity: 0; transition: max-height 1.4s ease, opacity 1s; background-image: repeating-linear-gradient(transparent 0 33px, rgba(180, 140, 120, .18) 33px 34px); }
.paper.open { max-height: 2600px; opacity: 1; }
.paper-in { padding: 26px 24px 30px; text-align: left; font-family: var(--script); font-size: clamp(1.25rem, 4.8vw, 1.6rem); line-height: 1.45; }
.paper-in p { margin: 0 0 .7em; min-height: 1.4em; }
.paper-in p:first-child { color: #a6264f; font-size: 1.15em; }
.paper-in p.sign { text-align: right; color: #a6264f; }
.caret::after { content: "|"; opacity: .6; animation: blink .8s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* finale */
.finale { padding-bottom: 8vh; display: grid; align-content: center; justify-items: center; gap: 16px; min-height: 120vh; }
.const-box { width: min(420px, 88vw); }
.const-box svg { width: 100%; overflow: visible; }
.cl { stroke-dasharray: 600; stroke-dashoffset: 600; filter: drop-shadow(0 0 6px #ffe9a8); }
.const-box.draw .cl { animation: drawL 3.2s ease forwards; }
.const-box.draw .cl:nth-child(2) { animation-delay: 1.2s; } .const-box.draw .cl:nth-child(3) { animation-delay: 2.4s; }
@keyframes drawL { to { stroke-dashoffset: 0; } }
.cs circle { animation: tw 2.4s ease-in-out infinite alternate; }
@keyframes tw { from { opacity: .25; } to { opacity: 1; } }
.finale-t { font-family: var(--script); font-size: clamp(2.6rem, 12vw, 5rem); line-height: 1.1; background: linear-gradient(100deg, #fff2b8, #ffcf70 35%, #ff9db8 70%, #ffcf70); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.finale-s { font-family: var(--display); font-style: italic; font-size: 1.5rem; }
.finale-h { font-size: .85rem; opacity: .7; max-width: 26em; }
.credits { font-size: .72rem; opacity: .6; margin-top: 30px; max-width: 30em; }
.credits summary { cursor: pointer; } .credits ul { list-style: none; padding: 0; margin: 8px 0 0; }
.credits li { margin: 2px 0; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* road ke liye jagah (mobile) */
@media (max-width: 600px) { .scene { padding-right: 38px; } .hero, .poem, .dusk, .home { padding-right: 0; } .poem-in, .home .sticky { padding-right: 34px; } }
