/* One cinematic rhythm across the interactive chapters. */
.scene{isolation:isolate}.scene.scene-enter{animation:cinema-arrive 1.05s cubic-bezier(.22,.75,.2,1) both}.scene.scene-leave{animation:cinema-depart 1.05s cubic-bezier(.4,0,.4,1) both}
@keyframes cinema-arrive{from{opacity:0;transform:translateY(18px) scale(1.035)}to{opacity:1;transform:none}}
@keyframes cinema-depart{to{opacity:0;transform:translateY(-12px) scale(.985)}}
.scene-atmosphere{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none}.scene-atmosphere i{position:absolute;left:var(--x);top:var(--y);width:2px;height:2px;border-radius:50%;background:#f8d7a1;box-shadow:0 0 8px #f1c78666;opacity:0;animation:scene-drift 9s var(--d) ease-in-out infinite}.scene[hidden] *{animation-play-state:paused!important}
@keyframes scene-drift{0%,100%{opacity:0;transform:translate3d(0,15px,0)}40%{opacity:.45}80%{opacity:.12;transform:translate3d(12px,-28px,0)}}
.story-center,.love-letter,.story-next,.quiet-next{position:relative;z-index:2}
.cinema-active .story-center>.eyebrow{animation:editorial-in 1.1s .2s both}.cinema-active .story-center>h2{animation:editorial-in 1.5s .35s both}.cinema-active .story-next{animation:editorial-in 1s .85s both}
@keyframes editorial-in{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}
.story-next{color:#f5dfb7;background:linear-gradient(115deg,#eac79518,#f2d6a908);border:1px solid #e9c89766;box-shadow:inset 0 1px 0 #ffe8be12,0 12px 35px #0002;font-size:12px;letter-spacing:.35px;transition:background .3s,box-shadow .3s}.story-next:hover{background:#e9c89720;box-shadow:0 0 24px #e9c89715}.story-next:active{scale:.97}button:focus-visible{outline-color:#e8c68e}
#gameScene:has(.shooting-intro){background:radial-gradient(ellipse at 50% 31%,#354045,#132830 40%,#06111a 88%)}
#gameScene:has(.shooting-intro):before{display:block;inset:0;background:radial-gradient(ellipse at 50% 34%,#eccaa618,transparent 34%);filter:none;animation:stage-light 8s ease-in-out infinite alternate}
#gameScene:has(.shooting-intro):after{display:block;background:radial-gradient(ellipse at 50% 83%,#d7b89016,transparent 30%);z-index:0}
@keyframes stage-light{to{opacity:.5;transform:scale(1.12)}}
.shooting-intro #hint{color:#e9d5bb;text-shadow:none;letter-spacing:.5px;font-size:12px}.shooting-intro #gesture{color:#d0b797}.shooting-intro #guide{opacity:.26}.shooting-intro #targetHeart{filter:drop-shadow(0 10px 28px #f6abc82b)}
#revealScene{background:radial-gradient(ellipse at 50% 45%,#653348 0%,#2a2632 45%,#091820 100%)}
#revealScene:before{content:'';position:absolute;width:min(78vw,620px);aspect-ratio:1;border-radius:50%;border:1px solid #e9c68f32;box-shadow:0 0 90px #e4a4a512,inset 0 0 70px #d3a3970b;pointer-events:none}
#revealScene:after{content:'';position:absolute;width:min(85vw,680px);aspect-ratio:1;border:1px solid #efd2a112;border-radius:50%;pointer-events:none;animation:stage-light 7s alternate infinite}
#revealScene h2{font-size:clamp(60px,11vw,128px);line-height:1.02;letter-spacing:-3px;color:#fff1db;text-shadow:0 5px 45px #e4b3a318}#revealScene h2 span{color:#e8bd97;margin-top:28px;font-size:clamp(30px,5vw,46px)}
#bloomScene{background:radial-gradient(ellipse at 68% 20%,#fffdf1 0%,#f5e9d8 50%,#e4d4c1 100%)}
#bloomScene:before{content:'';position:absolute;inset:-20%;background:conic-gradient(from 165deg at 75% 0%,transparent 0deg,#fffdfc88 9deg,transparent 19deg,#fffcf17a 27deg,transparent 39deg);opacity:.4;animation:sun-drift 18s ease-in-out infinite alternate;pointer-events:none}
@keyframes sun-drift{to{transform:rotate(-5deg) translateX(-2%);opacity:.65}}
#bloomScene .scene-atmosphere i{background:#bd855a;box-shadow:0 0 8px #ffd4a8}
.cinema-active .tree-wish{animation:editorial-in 1.6s .6s both}.tree-wish{color:#865363}.tree-wish h2{line-height:1.1}.tree-wish em{color:#b6667e}.tree-wish .eyebrow{letter-spacing:2.4px}
#storyTreeWrap.growing{transform-origin:50% 94%;animation:tree-breeze 9s 4s ease-in-out infinite alternate}#storyTree{filter:drop-shadow(4px 10px 10px #85593d12)}
@keyframes tree-breeze{from{transform:rotate(-.65deg)}to{transform:rotate(.65deg)}}
#bloomScene .quiet-next{z-index:5;color:#8b5b67;animation:editorial-in 1s 4s both}
.cinema-petal{position:absolute;pointer-events:none;z-index:3;font-size:12px;font-style:normal;animation:cinema-petal-fall 6.5s ease-in forwards}
@keyframes cinema-petal-fall{0%{opacity:0;transform:translate(0,0) rotate(0)}10%{opacity:.75}100%{opacity:0;transform:translate(var(--dx),var(--drop)) rotate(160deg)}}
#balloonsScene,#letterScene,#envelopeScene{background:radial-gradient(ellipse at 50% 47%,#314048 0%,#142731 45%,#07131c 100%);color:#f6e5cc}
#balloonsScene:before,#letterScene:before{background:radial-gradient(ellipse at 50% 65%,#d7a27718,transparent 55%);opacity:1}
#balloonsScene h2{font-style:italic;font-size:clamp(34px,5vw,58px)}
.balloon-bunch{gap:18px;margin:35px 0 20px}.wish-balloon{animation:cinema-balloon-float 5s ease-in-out infinite;animation-delay:calc(var(--i)*-.7s);touch-action:manipulation}.wish-balloon span{box-shadow:inset -12px -8px 22px #24192150,inset 3px 4px 9px #fff5,0 15px 40px #0003;transition:transform .3s cubic-bezier(.1,.7,.2,1),opacity .25s}.wish-balloon span:after{content:'';position:absolute;left:17%;top:14%;width:18%;height:27%;border-radius:50%;background:linear-gradient(135deg,#fff8,#fff0);transform:rotate(25deg)}
@keyframes cinema-balloon-float{0%,100%{transform:translateY(4px) rotate(-2deg)}50%{transform:translateY(-14px) rotate(2deg)}}
.wish-balloon.popped{animation-play-state:paused}.wish-balloon.popped span{transform:scale(1.25);opacity:0}.story-note{color:#e4c6a8;line-height:1.6;font-size:16px;max-width:360px;margin:20px auto 0}
.cinema-spark{position:absolute;z-index:5;pointer-events:none;width:4px;height:4px;border-radius:50%;background:var(--tone);box-shadow:0 0 8px var(--tone);animation:cinema-spark-out .9s ease-out forwards}
@keyframes cinema-spark-out{to{opacity:0;transform:translate(var(--dx),var(--dy)) scale(.2)}}
#envelopeScene .letter-aura{width:min(110vw,650px);background:radial-gradient(circle,#e9bd8033,transparent 65%);animation:stage-light 7s alternate infinite}
#envelope{filter:drop-shadow(0 30px 28px #0005) drop-shadow(0 0 35px #d1a8781a);z-index:2}#envelope:not(.open){animation:envelope-camera 7s ease-in-out infinite}
@keyframes envelope-camera{0%,100%{transform:translateY(5px) rotate(-1deg)}50%{transform:translateY(-7px) rotate(1deg)}}
.envelope-hint{color:#d6bfa2;font-size:14px;letter-spacing:.7px;z-index:2}#envelope.open{transition:transform 1.5s cubic-bezier(.22,.7,.2,1);transform:translateY(32px) scale(1.04)}
.love-letter{position:relative;background:linear-gradient(115deg,#fff9e9,#f0ddbf);border:1px solid #f7dfb1;box-shadow:0 30px 90px #0006,inset 0 0 50px #d9b18216;color:#76545a;max-width:490px;padding:clamp(25px,6vw,45px);border-radius:2px;overflow:auto}
.cinema-active .love-letter{animation:letter-unfold 1.6s cubic-bezier(.2,.75,.2,1) both;transform-origin:50% 100%}
@keyframes letter-unfold{from{opacity:0;transform:perspective(1000px) rotateX(12deg) translateY(35px) scale(.94)}to{opacity:1;transform:none}}
.letter-to{font-size:24px}.letter-line{display:block;animation:editorial-in .9s var(--line-delay) both}.letter-signoff{font-size:15px;color:#9e6f71}.love-letter:after{content:'♡';position:absolute;right:25px;top:20px;font:25px Georgia;color:#c69a7566}
#birthdayScene{background:#08141e}.birthday-photo img{animation:photo-camera 18s ease-in-out infinite alternate;transform-origin:50% 40%}
@keyframes photo-camera{from{transform:scale(1)}to{transform:scale(1.035)}}
.cinema-active .birthday-wish{animation:editorial-in 1.8s .7s both}.birthday-wish h1{filter:drop-shadow(0 0 20px #ecc99925)}#fireworks{opacity:.65}#replay{position:relative;z-index:8}
@media(max-width:650px){.balloon-bunch{gap:10px}.wish-balloon{width:52px;height:80px}#revealScene h2{font-size:70px}.story-scene{padding:24px 20px}.tree-wish{top:8%}.tree-wish h2{font-size:35px}#storyTreeWrap{top:25%;height:66%}.love-letter{width:min(90vw,490px)}}
@media(max-height:550px){#revealScene h2{font-size:48px;margin:8px 0}#revealScene h2 span{margin-top:10px;font-size:27px}.balloon-bunch{height:125px;margin:8px 0}.wish-balloon{height:65px;width:45px}.wish-balloon:after{height:35px}.story-note{margin-top:12px;min-height:25px}.story-scene h2{margin:8px 0 15px}#balloonsScene .eyebrow{display:none}}
@media(prefers-reduced-motion:reduce){.scene-atmosphere,.cinema-petal,.cinema-spark{display:none}.scene,.cinema-active *{animation:none!important;transition:none!important}.letter-line{opacity:1;transform:none}}
