@import url('./assets/fonts/fonts.css');
:root{color-scheme:dark;--ink:#060c17;--ivory:#f0e9e3;--muted:#a4b4c2;--pink:#dca6b9;--line:#c4d8ea24;--serif:'Cormorant Garamond',Georgia,serif;--sans:'Manrope',Arial,sans-serif;font-family:var(--sans);color:var(--ivory);background:var(--ink);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100svh;overflow-x:hidden}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;border:0}a{color:inherit}button:focus-visible,a:focus-visible{outline:2px solid #dfaec4;outline-offset:6px}h1,h2,h3,p,figure{margin:0}[hidden]{display:none!important}h1:focus,h2:focus{outline:none}button:active{transform:translateY(1px)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:fixed;left:20px;top:-80px;background:var(--ivory);color:var(--ink);padding:14px;z-index:20;pointer-events:auto}.skip-link:focus{top:15px}
#world{position:fixed;inset:0;z-index:0;background:radial-gradient(ellipse at 50% 48%,#163247 0%,#0a1728 37%,#060c17 75%)}#world canvas{display:block;width:100%;height:100%;opacity:0;transition:opacity 1.2s}.world-ready #world canvas{opacity:1}#app{position:relative;z-index:1;pointer-events:none}button,a,.letter-paper,.memory-copy,.photo-stack{pointer-events:auto}.masthead{height:84px;padding:0 4.7%;display:flex;align-items:center;justify-content:space-between;position:absolute;inset:0 0 auto;z-index:5}.date{font-size:17px;letter-spacing:3px;color:#d0dce7;white-space:nowrap}.date i{color:#95536c;font-style:normal;padding:0 10px}.date>span{font-size:10px;letter-spacing:2px;margin-left:14px;color:#7c98ad}.header-dedication{font-size:11px;letter-spacing:3px;color:#819bad;position:absolute;left:50%;transform:translateX(-50%)}.scene-controls{display:flex;align-items:center;gap:17px}.subtle-button{background:transparent;padding:10px 0;color:#99acbc;font-size:12px}.subtle-button:hover{color:#f0d4df}.icon-button{background:#15304742;border:1px solid #87b2d12f;border-radius:50%;height:33px;width:33px;display:grid;place-items:center;font-size:14px;color:#b9cfe0}.sound-button{display:flex;align-items:center;gap:9px;background:transparent;padding:10px 0;font-size:12px}.sound-bars{height:18px;display:flex;gap:3px;align-items:center}.sound-bars i{height:5px;width:2px;background:#c3b1ce}.sound-bars i:nth-child(2){height:14px}.sound-bars i:nth-child(3){height:10px}.sound-bars i:nth-child(4){height:17px}.sound-button[aria-pressed=true] i{animation:equalize 1.1s ease-in-out infinite alternate}.sound-button i:nth-child(even){animation-delay:-.6s}
.chapter{position:relative;min-height:100svh}.chapter.active{animation:arrive .9s both}.celebration{height:100svh;min-height:620px}.sky-caption{position:absolute;top:105px;left:0;width:100%;text-align:center;color:#b1c7d8}.sky-caption p{font-size:14px;letter-spacing:1.2px}.small-star{display:block;margin-bottom:12px;font-size:23px;color:#a1bfd4}.wish-invitation,.wish-reveal{position:absolute;left:5%;right:5%;bottom:86px;text-align:center}.wish-line{font:25px/1.3 var(--serif);color:#e3d7e1;margin-bottom:15px}.wish-line em{font-family:var(--serif);font-size:21px;color:#d8b4c7}.wish-button{display:inline-flex;align-items:center;justify-content:center;gap:23px;min-height:48px;padding:12px 27px;background:linear-gradient(110deg,#233c4bb3,#24233dcc);border:1px solid #9ebace80;border-radius:2px;backdrop-filter:blur(12px);font-size:14px;letter-spacing:.6px;box-shadow:0 0 35px #77b6e414;transition:background .25s,box-shadow .25s,border-color .25s}.wish-button:hover{border-color:#eedde8;background:#564059aa;box-shadow:0 0 35px #d57cba2a}.wish-button>span{color:#d3b8d7;font-size:19px}.wish-hint{font-size:10px;letter-spacing:2px;color:#96a4b5;margin-top:13px}.wish-reveal{bottom:84px;animation:reveal 1.2s both}.eyebrow{font-size:11px;letter-spacing:2.8px;line-height:1.8;color:#b29caf}.wish-reveal h2{font:31px/1.3 var(--serif);letter-spacing:0;margin:8px auto 17px}.wish-reveal h2 em{font:italic 500 27px var(--serif);color:#e3b6ca}.page-footer{position:absolute;bottom:0;left:4.7%;right:4.7%;height:61px;display:flex;align-items:center;justify-content:space-between;gap:20px;z-index:4}.footer-message{font-size:10px;letter-spacing:2px;color:#627e94}.footer-message em{font-style:normal;color:#9e8fa6;margin-left:3px}.chapter-nav{display:flex;gap:13px}.chapter-dot{display:flex;gap:8px;align-items:center;background:transparent;padding:14px 0;color:#627388;min-width:38px}.dot-index{font-size:10px}.dot-line{height:1px;width:18px;background:#42617b;transition:width .4s,background .4s}.chapter-dot.current{color:#cee0ed}.chapter-dot.current .dot-line{width:38px;background:#a9cbe1}.chapter-dot:hover{color:#fff}.loading-veil{position:fixed;inset:0;background:#060c17;display:grid;align-content:center;justify-items:center;gap:22px;z-index:6;pointer-events:none}.loading-veil>span{font-size:45px;font-weight:400;color:#a3c4df;animation:breathe 1.8s ease-in-out infinite}.loading-veil p{font:24px var(--serif);color:#bfadbc;letter-spacing:1px}.fallback-name{display:none}.world-fallback .fallback-name{display:block;position:absolute;top:30%;width:100%;text-align:center;font:120px var(--serif);color:#c5def2;letter-spacing:8px;text-shadow:0 0 60px #b9ddff55}.fallback-name span{display:block;font:12px var(--sans);letter-spacing:5px;color:#98a9bf;margin-top:18px}.world-fallback .wish-hint{visibility:hidden}
.memories{padding:119px 9% 100px}.memory-heading{max-width:1120px;margin:0 auto 34px}.memory-heading .eyebrow{margin-bottom:12px}h2{font:400 clamp(48px,5.3vw,80px)/1.04 var(--serif);letter-spacing:-1.8px}h2 em{font-family:var(--serif);font-weight:400;color:#d7a8c0}.memory-layout{display:grid;grid-template-columns:1.1fr 1fr;align-items:center;gap:11%;max-width:1040px;margin:0 auto}.memory-stage{padding:8px 35px 12px 0;perspective:1100px}.photo-stack{position:relative;aspect-ratio:1/1.34;width:100%;max-width:315px;margin:auto;touch-action:pan-y}.photo-card{position:absolute;inset:0;background:#eee6dc;padding:12px 12px 0;transform:translate(calc(var(--offset,0)*9px),calc(var(--offset,0)*-3px)) rotate(calc(2deg + var(--offset,0)*4deg));opacity:.4;z-index:1;transition:transform .65s,opacity .5s;box-shadow:0 20px 45px #0005;pointer-events:none}.photo-card.selected{transform:rotate(-4deg);opacity:1;z-index:4}.photo-card img{width:100%;height:calc(100% - 37px);object-fit:cover;display:block}.photo-card figcaption{display:flex;align-items:center;height:37px;color:#4a3339;font-size:11px;letter-spacing:1.8px}.world-ready .photo-card{opacity:0;box-shadow:none}.photo-bow{position:absolute;width:94px;right:-27px;top:-24px;z-index:6;transform:rotate(15deg);pointer-events:none}.camera-sticker{position:absolute;width:111px;bottom:-28px;left:-42px;z-index:6;transform:rotate(-13deg);pointer-events:none}.photo-count{font:46px var(--serif);color:#c3b9d0}.photo-count small{font:13px var(--sans);color:#708297;letter-spacing:2px;margin-left:8px}.memory-copy{position:relative}.memory-copy h3{font:39px/1.15 var(--serif);margin:23px 0 18px}.memory-copy>p{font-size:17px;line-height:1.9;color:#bcc5d0;max-width:350px}.photo-controls{display:flex;align-items:center;gap:12px;margin:28px 0 28px}.round-button{width:45px;height:45px;display:grid;place-items:center;border-radius:50%;border:1px solid #b6d6f342;background:#12273bcc;font-size:20px}.round-button:hover{background:#533246}.control-hint{font-size:10px;letter-spacing:1.8px;color:#7f93aa;margin-left:8px}.text-button{font-size:14px;padding:10px 0;border-bottom:1px solid #796579;background:transparent;display:inline-flex;align-items:center;justify-content:space-between;gap:28px;line-height:1.5}.text-button span{font-size:21px}.text-button:hover{color:#e9b6c7}.headphones-sticker{position:absolute;width:105px;right:-20px;top:-80px;transform:rotate(15deg);pointer-events:none;opacity:.9}
.letter{display:grid;grid-template-columns:.85fr 1.2fr;gap:10%;align-items:start;padding:128px 10% 100px;max-width:1500px;margin:auto}.letter-intro .eyebrow{margin-bottom:26px}.letter-side-note{margin-top:24px;color:#a9bacb;font-size:17px;line-height:1.8}.letter-paper{background:#eee6dc;color:#45363d;padding:41px 45px;box-shadow:0 25px 65px #0006;transform:rotate(1.2deg);position:relative;border-top:4px solid #d8c9c3}.letter-date{font-size:11px;letter-spacing:2.7px;color:#856c73}.letter-paper h3{font:italic 500 39px var(--serif);margin:28px 0}.letter-paper>p{font-size:16px;line-height:1.95;margin:16px 0;color:#604953}.letter-paper>p:first-of-type{font-weight:600}.letter-paper .sign-off{font:italic 500 29px/1.5 var(--serif);margin-top:29px;color:#75273f}.sign-off span{display:block;font-size:37px}.dark-ink{font-size:13px;color:#644151;border-color:#a78390;gap:25px}.dark-ink:hover{color:#9d3e62}.letter-sticker{position:absolute;width:94px;top:-28px;right:-24px;transform:rotate(12deg);pointer-events:none}#letter-object-space{height:255px;width:270px;margin-top:28px}.envelope-fallback{width:100%;transform:rotate(-10deg)}.world-ready .envelope-fallback{opacity:0}
@keyframes arrive{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}@keyframes reveal{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}@keyframes equalize{to{height:4px}}@keyframes breathe{50%{opacity:.35;transform:scale(.9)}}
@media(min-width:1600px){.sky-caption{top:125px}.wish-invitation,.wish-reveal{bottom:105px}.memory-layout{max-width:1150px}.photo-stack{max-width:365px}.memory-heading{max-width:1260px}}
@media(max-height:760px) and (min-width:651px){.sky-caption{top:83px}.sky-caption .small-star{display:none}.wish-invitation{bottom:71px}.wish-line{font-size:21px;margin-bottom:10px}.wish-line em{font-size:18px}.wish-hint{font-size:9px;margin-top:9px}.wish-button{min-height:43px;padding:9px 24px}.memories{padding-top:100px}.memory-heading{margin-bottom:20px}.memory-heading h2{font-size:54px}.photo-stack{max-width:255px}.memory-copy h3{font-size:35px}.wish-reveal{bottom:74px}}
@media(max-width:1000px){.date>span{display:none}.masthead{height:75px}.header-dedication{font-size:10px;letter-spacing:2px}.scene-controls{gap:12px}.memories{padding-left:8%;padding-right:8%}.memory-layout{gap:8%;grid-template-columns:1fr 1fr}.memory-stage{padding-right:22px}.memory-copy h3{font-size:33px}.memory-copy>p{font-size:16px}.letter{gap:6%;grid-template-columns:.8fr 1.2fr;padding-left:7%;padding-right:7%}.letter-paper{padding:32px}.headphones-sticker{width:90px;right:0;top:-70px}}
@media(max-width:650px){.masthead{height:70px;padding:0 6%}.date{font-size:14px;letter-spacing:2px}.date i{padding:0 6px}.header-dedication{display:none}.scene-controls{gap:11px}.subtle-button{font-size:11px}.icon-button{height:30px;width:30px}.sound-button{font-size:11px}.sound-button>span:last-child{display:none}.sound-bars{transform:scale(.8)}.celebration{min-height:570px}.sky-caption{top:93px;padding:0 9%}.sky-caption p{font-size:12px;letter-spacing:.9px}.small-star{font-size:20px;margin-bottom:10px}.wish-invitation,.wish-reveal{bottom:85px;left:6%;right:6%}.wish-line{font-size:22px;margin-bottom:14px}.wish-line em{font-size:18px}.wish-button{font-size:13px;min-height:48px;padding:11px 22px;gap:17px}.wish-hint{font-size:9px;letter-spacing:1.2px;margin-top:14px}.wish-reveal h2{font-size:27px;max-width:350px;margin:11px auto 18px}.wish-reveal h2 em{font-size:23px;display:block;margin-top:3px}.wish-reveal .eyebrow{font-size:9px;letter-spacing:1.7px}.page-footer{height:61px;left:6%;right:6%;gap:10px}.footer-message{font-size:9px;letter-spacing:1px}.footer-message em{display:block;margin:4px 0 0}.chapter-nav{gap:10px}.chapter-dot{min-width:28px;gap:6px}.dot-index{font-size:9px}.dot-line{width:13px}.chapter-dot.current .dot-line{width:29px}.memories{padding:105px 8% 100px}.memory-heading{margin-bottom:35px}.memory-heading .eyebrow{font-size:10px;letter-spacing:2px;margin-bottom:13px}h2{font-size:48px;letter-spacing:-1.3px}.memory-layout{display:flex;flex-direction:column;gap:30px}.memory-stage{width:100%;padding:0 30px 10px 15px}.photo-stack{max-width:242px}.photo-bow{width:74px;right:-25px;top:-22px}.camera-sticker{width:86px;left:-30px;bottom:-22px}.memory-copy{width:100%;padding:0 3px}.photo-count{font-size:34px;float:right}.photo-count small{font-size:11px}.memory-copy h3{font-size:30px;margin:12px 0}.memory-copy>p{font-size:15px;line-height:1.9;max-width:285px}.photo-controls{margin:19px 0 21px}.control-hint{font-size:10px}.headphones-sticker{width:61px;right:0;top:70px;opacity:.65}.text-button{font-size:13px;gap:22px}.letter{display:flex;flex-direction:column;gap:38px;padding:108px 8% 100px}.letter-intro .eyebrow{font-size:10px;margin-bottom:15px}.letter-intro h2{font-size:50px}.letter-intro h2 br{display:none}.letter-side-note{margin-top:18px;font-size:15px}.letter-side-note br{display:none}.letter-paper{padding:31px 24px;transform:rotate(.6deg);width:100%}.letter-paper h3{font-size:31px}.letter-paper>p{font-size:15px;line-height:1.9}.letter-paper .sign-off{font-size:24px}.letter-sticker{width:75px;right:-14px;top:-24px}.dark-ink{font-size:12px}#letter-object-space{display:none}.world-fallback .fallback-name{font-size:90px;top:31%}.world-fallback .fallback-name span{font-size:10px}}
@media(max-height:620px) and (max-width:650px){.celebration{height:620px}.sky-caption{top:80px}.sky-caption .small-star{display:none}.wish-invitation{bottom:90px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.chapter.active{transform:none}}


/* Circular gallery and layered letter presentation. */
h2{font-weight:500;letter-spacing:-.035em}.sky-caption p{font-family:var(--serif);font-size:23px;font-weight:500;letter-spacing:.03em}.wish-line{font-size:29px;font-weight:500}.wish-line em{font-size:28px}.wish-reveal h2{font-weight:500;font-size:37px}.eyebrow{font-weight:500;letter-spacing:.22em}.memory-heading{text-align:center;margin-bottom:12px}.memory-heading h2{font-size:clamp(54px,6.5vw,86px)}.memory-layout{display:block;max-width:1020px}.memory-stage{padding:0;width:100%}.photo-stack{max-width:860px;width:100%;height:390px;aspect-ratio:auto}.memory-copy{max-width:550px;margin:10px auto 0;text-align:center}.memory-copy h3{font-size:35px;font-weight:500;margin:9px 0 10px}.memory-copy>p{max-width:480px;margin:auto;font-size:16px}.photo-count{font-size:27px}.photo-count small{font-size:11px}.photo-controls{justify-content:center;margin:17px 0}.headphones-sticker{width:78px;right:-64px;top:32px}.camera-sticker{width:83px;left:3%;bottom:14px}.photo-bow{width:75px;right:5%;top:20px}.memories{padding-top:109px}.letter{perspective:1600px}.letter-paper{--tilt-x:2deg;--tilt-y:-3deg;transform-style:preserve-3d;transform:perspective(1300px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));transition:transform .5s ease-out;animation:letter-lift 1.3s cubic-bezier(.2,.75,.2,1) both;box-shadow:0 2px 0 #c3afa2,0 5px 0 #aa8b80,0 9px 0 #533d43,0 30px 70px #0008,0 0 85px #c46d9220;border:1px solid #f3e3d0;border-radius:2px;background:linear-gradient(115deg,#fff6e9,#e8d8c8)}.letter-paper:before{content:'';position:absolute;inset:10px;border:1px solid #aa826740;pointer-events:none;transform:translateZ(1px)}.letter-paper h3,.letter-paper .sign-off,.letter-sticker{transform:translateZ(18px)}.letter-paper>p{line-height:1.95}.letter-date{display:block;transform:translateZ(6px)}.letter-intro h2{font-size:80px}.letter-sticker{filter:drop-shadow(0 10px 8px #543d4f44)}
@keyframes letter-lift{from{opacity:0;transform:perspective(1300px) translateY(70px) rotateX(20deg) rotateY(-16deg)}to{opacity:1;transform:perspective(1300px) translateY(0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y))}}
@media(max-width:650px){.sky-caption p{font-size:20px;line-height:1.3}.memory-heading h2{font-size:58px}.photo-stack{height:310px;width:100%}.memory-stage{padding:0}.memory-layout{display:block}.memories{padding:100px 5% 100px}.memory-copy{padding:0 5%;margin-top:5px}.photo-count{float:none;font-size:26px}.memory-copy h3{font-size:33px}.memory-copy>p{font-size:15px;max-width:285px}.photo-bow{width:56px;top:24px;right:4%}.camera-sticker{width:61px;bottom:4px;left:2%}.headphones-sticker{display:none}.letter-intro h2{font-size:61px}.letter-paper{transform:perspective(1300px) rotateY(-2deg)}.letter-paper h3{font-size:35px}.wish-line{font-size:25px}.wish-line em{font-size:24px}.wish-reveal h2{font-size:29px}.wish-reveal h2 em{font-size:27px}}
@media(prefers-reduced-motion:reduce){.letter-paper{animation:none!important;transform:none!important;transition:none!important}}

/* Keep the scene above its reading area, with quiet space around each object. */
.celebration{height:100svh;min-height:620px}
.sky-caption{top:88px}.sky-caption .small-star{display:none}
.sky-caption p{font-size:20px;color:#e4dbe2;letter-spacing:.02em}
.wish-invitation,.wish-reveal{bottom:67px;left:0;right:0;padding:28px 6% 6px;background:linear-gradient(0deg,#060c17 45%,#060c17eb 72%,#060c1700)}
.wish-reveal h2{font-size:32px;margin:5px auto 14px;line-height:1.15}
.wish-reveal h2 em{font-size:29px}.wish-reveal .eyebrow{color:#d5b7c7;font-size:10px}
.wish-line{font-size:27px;margin-bottom:12px}.wish-line em{font-size:26px}
.fire-greeting{position:absolute;left:8%;top:39%;transform:rotate(-7deg);font:500 clamp(28px,3.2vw,46px)/.95 var(--serif);color:#ffe7bb;text-shadow:0 -2px 4px #ffc268,0 -5px 13px #d65c21,0 -11px 24px #c1371966;animation:flame-type 2.3s ease-in-out infinite alternate}
.fire-greeting span,.fire-greeting em{display:block}.fire-greeting em{margin-left:18px;font-weight:500}
@keyframes flame-type{to{text-shadow:0 -3px 5px #ffd785,0 -8px 17px #e27429,0 -15px 29px #c1371955}}
.memories{padding:96px 6% 92px}
.memory-heading{margin:0 auto 2px}.memory-heading .eyebrow{margin-bottom:5px;font-size:10px}
.memory-heading h2{font-size:clamp(44px,5vw,66px)}
.memory-layout{max-width:880px}.photo-stack{height:clamp(355px,49vh,440px);width:100%;max-width:760px;aspect-ratio:auto}
.memory-copy{margin:0 auto;max-width:610px}.memory-copy h3{font-size:30px;margin:4px 0 5px}
.memory-copy>p{font-size:14px;line-height:1.7;max-width:560px}.photo-count{font-size:22px;float:none}
.photo-controls{margin:12px 0 8px}.round-button{height:40px;width:40px}.memory-copy .text-button{font-size:13px}
.world-fallback .photo-card{max-width:240px;margin:auto}.world-fallback .photo-card:not(.selected){visibility:hidden}
.letter{display:flex;flex-direction:column;align-items:center;gap:28px;padding:103px 7% 110px;max-width:900px}
.letter-intro{width:100%;text-align:center}.letter-intro .eyebrow{margin-bottom:10px;font-size:10px}
.letter-intro h2{font-size:clamp(46px,5vw,65px)}.letter-intro h2 br{display:none}
.letter-side-note{margin-top:10px;font-size:14px}.letter-side-note br{display:none}
#letter-object-space{display:block;width:260px;height:175px;margin:20px auto 0;position:relative}
.letter-paper{width:100%;max-width:640px;padding:36px 46px;animation:none;--tilt-x:2deg;--tilt-y:-2deg}
.letter-paper h3{margin:22px 0;font-size:37px}.letter-paper>p{font-size:15px;line-height:1.95}
.closed-envelope{position:absolute;inset:18px 8px;background:linear-gradient(145deg,#eadbca,#cdb9a9);border:1px solid #f0e1cb;box-shadow:0 15px 35px #0007;transform:rotate(-6deg);border-radius:3px;overflow:hidden}
.closed-envelope:before{content:'';position:absolute;inset:0;background:#f6e9d8;clip-path:polygon(0 0,100% 0,50% 64%)}
.closed-envelope span{position:absolute;left:calc(50% - 16px);top:45%;width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:#781731;border:3px double #b96776;color:#e3b1b8}
.world-ready .closed-envelope{visibility:hidden}
@media(max-width:650px){
 .sky-caption{top:83px}.sky-caption p{font-size:18px}
 .fire-greeting{left:6%;top:17%;font-size:25px}
 .wish-invitation,.wish-reveal{bottom:68px;padding-top:25px}.wish-reveal h2{font-size:27px}.wish-reveal h2 em{font-size:25px}
 .wish-hint{margin-top:10px}.wish-line,.wish-line em{font-size:24px}
 .memories{padding:87px 4% 92px}.memory-heading h2{font-size:46px}
 .photo-stack{height:clamp(300px,91vw,390px)}.memory-copy{padding:0 6%}.memory-copy h3{font-size:28px}.memory-copy>p{font-size:14px;max-width:340px}
 .letter{padding:91px 7% 100px;gap:20px}.letter-intro h2{font-size:49px}.letter-paper{padding:29px 25px}.letter-paper h3{font-size:32px}
 #letter-object-space{width:225px;height:150px;margin-top:15px}
}
@media(max-height:650px) and (min-width:651px){.sky-caption{top:72px}.sky-caption p{font-size:17px}.fire-greeting{top:32%;left:12%;font-size:30px}.wish-invitation,.wish-reveal{bottom:54px;padding-top:20px}.wish-reveal h2{font-size:25px}.wish-reveal h2 em{font-size:25px}.wish-line{font-size:23px}.wish-hint{display:none}}
.motion-paused *,.motion-paused *:before,.motion-paused *:after{animation-play-state:paused!important}
.letter-intro h2 em{margin-left:.18em}

/* The greeting is drawn in real fire by the scene; the CSS version is the fallback. */
.world-ready .fire-greeting{opacity:0;visibility:hidden}
.world-fallback .fire-greeting{opacity:1;visibility:visible}
/* The letter sits inside its own fire, so its edges glow and its paper looks scorched. */
.world-ready .letter-paper{box-shadow:0 2px 0 #c3afa2,0 5px 0 #aa8b80,0 9px 0 #533d43,0 26px 60px #000a,0 0 42px #5fd0ff3d,0 0 120px #2aa6e02e;border-color:#f0dcc2}
.world-ready .letter-paper:after{content:'';position:absolute;inset:0;pointer-events:none;border-radius:2px;box-shadow:inset 0 0 26px #6a4a3a2e,inset 0 0 6px #43a9d63d}
.world-ready .closed-envelope{visibility:hidden}

/* ---- Letter: candle light instead of fire, on a larger sheet ---------------- */
.letter{max-width:1020px}
.letter-paper{max-width:740px;padding:44px 56px}
.world-ready .letter-paper{
  background:linear-gradient(118deg,#fff9ee 0%,#f7ead8 46%,#eeddc8 100%);
  border:1px solid #f6e8d2;
  box-shadow:0 2px 0 #cdb9a8,0 6px 0 #b09280,0 11px 0 #54404a,0 34px 72px #000a,0 0 74px #ffb15f2b,0 0 170px #ff9b3a17;
}
.world-ready .letter-paper:before{inset:13px;border:1px solid #c39a5f52}
.world-ready .letter-paper:after{content:'';position:absolute;inset:0;pointer-events:none;border-radius:2px;box-shadow:inset 0 0 48px #8a5f3a1c}
.letter-date{color:#9a7a57;letter-spacing:3px}
.letter-date:after{content:'';display:block;width:56px;height:1px;margin-top:13px;background:linear-gradient(90deg,#c39a5f,#c39a5f00)}
.letter-paper h3{font-size:42px;color:#4a3540;margin:24px 0 22px}
.letter-paper>p{font-size:16px;line-height:2.02;color:#5a464f;margin:18px 0}
.letter-paper>p:first-of-type{font-weight:500;font-size:17px;color:#4b3840}
.letter-paper .sign-off{color:#8a2f4a;margin-top:34px}
.letter-intro h2{letter-spacing:-.03em}

/* ---- Larger photo cards ----------------------------------------------------- */
.photo-stack{height:clamp(392px,56vh,510px);max-width:830px}
.memory-layout{max-width:960px}

/* The flat fallback greeting is gold, not fire. */
.fire-greeting{color:#f3dcb0;text-shadow:0 0 16px #d9a75f5c,0 0 44px #b9793a30;animation:none}
@media(max-width:650px){
 .photo-stack{height:clamp(330px,96vw,430px)}
 .letter-paper{padding:32px 26px}
 .letter-paper h3{font-size:33px}
 .world-ready .letter-paper:before{inset:9px}
}

/* ---- The book ---------------------------------------------------------------- */
.book-stage,.book,.book-nav{pointer-events:auto}
.letter{max-width:1180px;padding:92px 4% 74px;gap:16px}
.letter-intro h2{font-size:clamp(36px,3.8vw,54px)}
.book-stage{width:100%;display:flex;flex-direction:column;align-items:center;gap:18px;perspective:2800px}
.book{position:relative;width:min(1000px,94vw);height:min(58vh,588px);transform-style:preserve-3d;transform:rotateX(4deg);cursor:pointer}
.book-face{position:absolute;top:0;height:100%;border-radius:2px}
.book-face--left{left:0;width:50%}
.book-face--right{left:50%;width:50%}
.book-board{background:linear-gradient(120deg,#2b1d24,#171016);border:1px solid #ffffff0f;display:grid;place-items:center;z-index:0;box-shadow:inset 0 0 80px #000a}
.board-mark{font-size:32px;color:#c39a5f40}
.book-spine{position:absolute;left:50%;top:-1%;height:102%;width:36px;transform:translateX(-50%);z-index:60;pointer-events:none;background:linear-gradient(90deg,#0000,#00000052 42%,#00000073 50%,#00000052 58%,#0000)}
.leaf{position:absolute;top:0;left:50%;width:50%;height:100%;transform-origin:left center;transform-style:preserve-3d;transition:transform 1.05s cubic-bezier(.44,.02,.16,1)}
.leaf.turned{transform:rotateY(-180deg)}
.page{position:absolute;inset:0;backface-visibility:hidden;overflow:hidden;border-radius:2px;background:linear-gradient(118deg,#fffaf1,#f7ead8 52%,#eeddc8);box-shadow:0 16px 44px #00000085}
.page--back{transform:rotateY(180deg)}
.page:after{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 40px #8a5f3a1a}
.page--front:before{content:'';position:absolute;inset:0;pointer-events:none;z-index:2;background:linear-gradient(90deg,#3a2a1f33,#0000 15%)}
.page--back:before{content:'';position:absolute;inset:0;pointer-events:none;z-index:2;background:linear-gradient(270deg,#3a2a1f33,#0000 15%)}
.page-shade{position:absolute;inset:0;pointer-events:none;z-index:3;background:linear-gradient(90deg,#0000,#00000059);opacity:0;transition:opacity .55s}
.leaf.turning .page-shade{opacity:1}
.page-fold{position:absolute;top:0;bottom:0;right:0;width:10px;pointer-events:none;z-index:2;background:linear-gradient(90deg,#0000,#0000001f)}
.page-fold--back{left:0;right:auto;background:linear-gradient(270deg,#0000,#0000001f)}
.page-inner{position:absolute;inset:0;padding:clamp(20px,3.2vw,44px);display:flex;flex-direction:column;justify-content:center;color:#5a464f;z-index:1}
.page-inner p{font-size:clamp(13.5px,1.12vw,16.5px);line-height:2;margin:0 0 15px}
.page-inner .w{display:inline-block;opacity:0;transform:translateY(.34em);filter:blur(4px)}
.page-inner.reading .w{animation:word-in .6s cubic-bezier(.2,.7,.2,1) forwards;animation-delay:calc(var(--i)*34ms + 240ms)}
@keyframes word-in{to{opacity:1;transform:none;filter:blur(0)}}
.page-mark{font:10px var(--sans);letter-spacing:3.4px;color:#a58a63;margin-bottom:18px}
.page-salutation{font:italic 500 clamp(25px,2.9vw,36px) var(--serif);color:#4a3540;margin:0 0 14px}
.page-signoff{font:italic 500 clamp(19px,2.1vw,27px) var(--serif);color:#8a2f4a;margin-top:20px}
.page-signoff i{display:block;font-style:normal;font-size:1.35em;line-height:1.1}
.page-closing .dark-ink{margin-top:20px;align-self:flex-start}
.page-title{justify-content:flex-start;padding-top:13%}
.page-date{font:10px var(--sans);letter-spacing:3.4px;color:#a58a63}
.page-title h3{font:400 clamp(38px,4.4vw,60px)/1.02 var(--serif);color:#42303a;margin:16px 0 0;letter-spacing:-.02em}
.page-title h3 em{display:block;font-style:italic;color:#8a2f4a}
.page-rule{display:block;width:72px;height:1px;margin:22px 0;background:linear-gradient(90deg,#c39a5f,#c39a5f00)}
.page-lead{font:italic 400 clamp(14px,1.25vw,18px)/1.7 var(--serif);color:#6b5058;max-width:24ch}
.page-hint{margin-top:auto;font:9px var(--sans);letter-spacing:3px;color:#b09a7a}
.page-photo{justify-content:center;gap:14px;padding:clamp(16px,2.4vw,34px)}
.photo-mount{position:relative;flex:1;min-height:0;display:block;border:1px solid #c39a5f3d;padding:9px;background:#fffdf7;box-shadow:0 9px 24px #00000024;opacity:0;transform:translateY(12px) scale(.986);transition:opacity .85s .18s,transform .95s cubic-bezier(.2,.7,.2,1) .18s}
.photo-mount img{width:100%;height:100%;object-fit:contain;display:block}
.page-photo figcaption{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font:italic 500 clamp(16px,1.6vw,21px) var(--serif);color:#6b5058;opacity:0;transform:translateY(8px);transition:opacity .7s .38s,transform .7s .38s}
.page-photo figcaption span{font:10px var(--sans);letter-spacing:3px;color:#a58a63}
.page-photo.reading .photo-mount,.page-photo.reading figcaption{opacity:1;transform:none}
.book-nav{display:flex;align-items:center;gap:16px}
.book-progress{font:22px var(--serif);color:#c3b9d0;min-width:76px;text-align:center}
.book-progress small{font:11px var(--sans);color:#708297;letter-spacing:2px;margin-left:3px}
.round-button:disabled{opacity:.32;cursor:default}
.round-button:disabled:hover{background:#12273bcc}
@media(max-width:760px){
 .letter{padding:88px 5% 70px}
 .book{width:min(430px,94vw);height:min(64vh,540px);transform:none}
 .book-face--left,.book-face--right,.leaf{left:0;width:100%}
 .book-spine{display:none}
 .page-title{padding-top:16%}
 .page-inner p{line-height:1.95}
}
@media(prefers-reduced-motion:reduce){
 .leaf{transition:none!important}
 .page-inner .w{opacity:1!important;transform:none!important;filter:none!important;animation:none!important}
 .photo-mount,.page-photo figcaption{opacity:1!important;transform:none!important;transition:none!important}
}
/* Pages need more room on the hinge side, so nothing sits under the spine. */
.page--front .page-inner{padding-left:clamp(32px,4.4vw,62px)}
.page--back .page-inner{padding-right:clamp(32px,4.4vw,62px)}
@media(max-width:760px){
 .page--front .page-inner,.page--back .page-inner{padding-left:clamp(20px,5vw,30px);padding-right:clamp(20px,5vw,30px)}
}
.book-again{font-size:13px;color:#9db0c2;border-bottom-color:#5c4a5e;gap:16px}
.book-again:hover{color:#e9b6c7}

/* ---- The closed book and its cover ------------------------------------------ */
.book{transition:transform 1.05s cubic-bezier(.44,.02,.16,1)}
.book.closed{transform:rotateX(4deg) translateX(-22.5%) translateY(3%) rotate(-3.4deg) scale(.9)}
.book.closed .book-face--left,.book.closed .book-spine{opacity:0}
.book-face--left,.book-spine{transition:opacity .5s}
.book-open-hint{font:9px var(--sans);letter-spacing:3.2px;color:#8fa2b4;opacity:0;height:0;transition:opacity .5s;pointer-events:none}
.book-shut .book-open-hint{opacity:1;height:auto}
.book-shut .book-nav,.book-shut .book-again{opacity:0;pointer-events:none;height:0;overflow:hidden;margin:0}
.book-nav,.book-again{transition:opacity .45s}
.page-cover{padding:0;background:
  radial-gradient(120% 90% at 22% 12%,#7a2740 0%,#0000 58%),
  linear-gradient(146deg,#4a1526 0%,#5e1c31 42%,#2b0c17 100%);
  overflow:hidden}
.page-cover .cover-grain{position:absolute;inset:0;pointer-events:none;opacity:.5;
  background:repeating-linear-gradient(94deg,#ffffff0a 0 1px,#0000 1px 3px),repeating-linear-gradient(4deg,#00000012 0 1px,#0000 1px 4px)}
.cover-frame{position:absolute;inset:clamp(16px,2.3vw,30px);border:1px solid #c9a15e59;
  display:flex;flex-direction:column;justify-content:center;padding:clamp(20px,3vw,42px);gap:0;
  box-shadow:inset 0 0 0 1px #c9a15e1f,inset 0 0 60px #00000059}
.cover-eyebrow{font:9px var(--sans);letter-spacing:3.6px;color:#d8b075b8}
.cover-frame h3{font:400 clamp(34px,4.1vw,56px)/1.06 var(--serif);color:#f2dcb4;margin:14px 0 0;letter-spacing:-.015em;
  text-shadow:0 1px 0 #00000059,0 0 26px #d8a45c33}
.cover-frame h3 em{display:block;font-style:italic;color:#f7cfa0;margin-left:.5em}
.cover-rule{display:block;width:64px;height:1px;margin:22px 0 0;background:linear-gradient(90deg,#d8b075,#d8b07500)}
.cover-foot{margin-top:auto;font:9px var(--sans);letter-spacing:3.4px;color:#d8b0757a}
.cover-edge{position:absolute;top:5px;bottom:5px;right:0;width:8px;border-radius:0 2px 2px 0;
  background:repeating-linear-gradient(180deg,#f3e7d3 0 2px,#cbb69a 2px 4px);box-shadow:-2px 0 8px #0009}
.cover-sticker{position:absolute;pointer-events:none;filter:drop-shadow(0 8px 12px #0000006b)}
.cover-sticker--bow{width:26%;top:-3%;right:6%;transform:rotate(13deg)}
.cover-sticker--camera{width:27%;bottom:6%;left:5%;transform:rotate(-11deg)}
.cover-sticker--headphones{width:20%;bottom:9%;right:9%;transform:rotate(9deg);opacity:.92}
.page-board{background:linear-gradient(120deg,#2b1d24,#171016);display:grid;place-items:center;
  box-shadow:inset 0 0 80px #000a}
.page-board .board-mark{font-size:30px;color:#c39a5f40}
@media(max-width:760px){
 .book.closed{transform:rotate(-2.6deg) scale(.94)}
 .cover-sticker--bow{width:30%}
 .cover-sticker--camera{width:31%}
 .cover-sticker--headphones{width:23%}
}
