*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#100e17;font-family:Arial,sans-serif}button{font:inherit;-webkit-tap-highlight-color:transparent;cursor:pointer}button:focus-visible{outline:2px solid #b04f7c;outline-offset:5px}.scene{position:absolute;inset:0;height:100svh;overflow:hidden}.scene[hidden]{display:none!important}#journey{width:100%;height:100%;display:block;max-width:650px;margin:auto}.place{fill:#eee2ee;font-size:25px;letter-spacing:.2px;font-family:Arial,sans-serif}#mapScene{transition:opacity .8s}#arrival.arrived{animation:arrive 1s ease-out forwards}#ropeScene{z-index:5}#curtain{position:absolute;inset:0;background:repeating-linear-gradient(90deg,#101016,#16141e 12%,#0d0c12 25%);box-shadow:0 20px 50px #0005;transition:transform 1.15s cubic-bezier(.66,0,.16,1);transform:translateY(var(--pull,0px))}#curtain.lift{transform:translateY(-110%)}#rope{position:absolute;top:0;left:calc(50% - 45px);width:90px;height:53%;border:0;background:none;display:flex;flex-direction:column;align-items:center;touch-action:none;user-select:none}.cord{flex:1;width:5px;background:repeating-linear-gradient(150deg,#e8c9ae 0 3px,#988074 4px 6px);box-shadow:0 0 22px #ffd5b329}.ring{width:45px;height:62px;border:5px solid #e1bea3;border-radius:40%;box-shadow:0 0 35px #e1bea325;flex-shrink:0}.pull-label{position:absolute;bottom:-53px;color:#d7c3d1;font-size:15px;animation:pull 2s infinite}#gameScene,#birthdayScene{background:radial-gradient(ellipse at 50% 35%,#fffaf8,#ffe1eb)}#playfield{position:relative;width:min(100%,640px);height:100%;margin:auto}#glassHeart{position:absolute;width:clamp(230px,64vw,350px);height:auto;left:50%;top:9%;transform:translateX(-50%);overflow:visible;filter:drop-shadow(0 25px 30px #c54c7820)}#guide{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:.65}#aimLine{stroke:#bc6f8e;stroke-width:2;stroke-dasharray:3 10}#aimDot{stroke:#b76484;stroke-width:1.5;fill:#fff6}#bow{position:absolute;width:180px;height:99px;left:calc(50% - 90px);bottom:110px;transform-origin:50% 84%;pointer-events:none}#bow svg{width:100%;height:100%;overflow:visible}.bow-limb{stroke:#a45675;stroke-width:7;fill:none;stroke-linecap:round}#bowString{stroke:#b88d99;stroke-width:1.5;fill:none}#projectile{position:absolute;width:36px;height:117px;left:calc(50% - 18px);bottom:107px;transform-origin:50% 90%;pointer-events:none;z-index:3}#projectile svg{width:100%;height:100%;stroke:#aa5c79;stroke-width:2.3;fill:#e9a6bd;stroke-linejoin:round}#aimPad{position:absolute;width:250px;height:190px;left:calc(50% - 125px);bottom:63px;background:transparent;border:0;touch-action:none;z-index:4;user-select:none;cursor:grab}#aimPad:active{cursor:grabbing}#hint{position:absolute;bottom:38px;left:0;right:0;text-align:center;font-size:14px;color:#a96e86;margin:0;pointer-events:none}#gesture{position:absolute;bottom:68px;left:0;right:0;text-align:center;color:#c3889e;font-size:27px;pointer-events:none;animation:sway 2s infinite}#playfield.aiming #gesture{opacity:0}#playfield.shooting #guide,#playfield.shooting #gesture{opacity:0}#playfield.hit #glassHeart{animation:shatter .65s ease-in forwards}#playfield.hit #bow,#playfield.hit #projectile,#playfield.hit #hint,#playfield.hit #guide{opacity:0}.shard{position:absolute;left:50%;top:30%;width:14px;height:23px;background:linear-gradient(135deg,#fff,#eea7c6);clip-path:polygon(0 0,100% 30%,40% 100%);pointer-events:none;animation:scatter 1.1s ease-out forwards}.message{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:25px}.big-heart{font-size:64px;margin-bottom:25px;animation:beat 2s infinite}h1{color:#894b66;font-size:clamp(30px,6vw,50px);font-weight:400;line-height:1.5;margin:0}h1 span{font-family:Georgia,serif;font-style:italic;font-size:1.35em}#replay{background:none;border:0;color:#a77288;font-size:28px;margin-top:45px;padding:12px}#confetti{position:absolute;inset:0;pointer-events:none}.petal{position:absolute;top:-30px;color:#ce7fa280;font-size:20px;animation:fall linear infinite}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@keyframes arrive{to{r:55;opacity:0}}@keyframes pull{50%{translate:0 8px}}@keyframes sway{50%{translate:13px 0}}@keyframes shatter{to{opacity:0;transform:translateX(-50%) scale(1.4);filter:blur(5px)}}@keyframes scatter{to{transform:translate(var(--x),var(--y)) rotate(var(--r));opacity:0}}@keyframes fall{to{transform:translate(30px,110vh) rotate(180deg)}}@keyframes beat{50%{transform:scale(1.08)}}@media(max-height:600px){#glassHeart{width:190px;top:5%}#bow{bottom:85px}#projectile{bottom:82px}#aimPad{bottom:40px}#hint{bottom:20px}#gesture{bottom:45px}}@media(min-width:700px){#journey{max-width:600px}#glassHeart{top:7%;width:310px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* Natural Earth world geography; local SVG, no map service needed. */
#journey{width:100%;max-width:1400px;height:100%;overflow:visible}.country{fill:url(#land);stroke:#c7aecb;stroke-opacity:.42;stroke-width:.6;stroke-linejoin:round}.country.highlight{fill:#b98caa;stroke:#f5c6df;stroke-opacity:.95;stroke-width:1.2}.label-leader{fill:none;stroke:#edbdd4;stroke-width:1.2;stroke-opacity:.8}.place{font-size:26px;fill:#ffdeec;paint-order:stroke;stroke:#191420;stroke-width:4px;stroke-linejoin:round}#mapScene{background:radial-gradient(ellipse at center,#262232,#100e17 75%)}

/* Fixed regional camera: Europe/Africa through Asia, centred on Kuwait–India. */
#journey{max-width:900px;overflow:hidden;touch-action:pan-y}#mapScene{overflow:hidden}

/* Crop all map artwork, including letterboxed areas, to the nearby region. */
#journey{max-width:720px}.place{font-size:16px;stroke-width:2}.country{stroke-width:.4}.country.highlight{stroke-width:.7}

/* Physical cord, weighted wooden pull, and soft studio reflections. */
#curtain{background:radial-gradient(ellipse at 50% 25%,#57423730,transparent 52%),repeating-linear-gradient(90deg,#0b0a10 0%,#201a25 4%,#302632 7%,#17121c 11%,#0b090f 14%);box-shadow:inset 0 0 110px #0009,0 25px 55px #0008}#curtain:after{content:'';position:absolute;inset:0;pointer-events:none;opacity:.1;background:repeating-linear-gradient(0deg,transparent 0 2px,#c9b4a1 3px,transparent 4px)}#rope{left:calc(50% - 90px);width:180px;height:77%;min-height:380px;max-height:760px;display:block;z-index:2;filter:drop-shadow(10px 7px 12px #0006)}#ropeVisual{display:block;width:100%;height:100%;overflow:visible}.cord-path{fill:none;stroke-linecap:round}.cord-shadow{stroke:#000;stroke-width:14;opacity:.3;transform:translate(4px,4px)}.cord-base{stroke:url(#ropeShade);stroke-width:10}.cord-braid{stroke:url(#braid);stroke-width:10}#rope .pull-label{bottom:-4px;left:0;right:0;font-size:12px;color:#cbb79f;letter-spacing:1px}.heart-floor{position:absolute;top:calc(9% + clamp(230px,64vw,350px)*.91);left:50%;width:180px;height:24px;transform:translateX(-50%);border-radius:50%;background:radial-gradient(ellipse,#a9477840,transparent 68%);filter:blur(8px)}#glassHeart{filter:drop-shadow(0 18px 20px #964a7228);width:clamp(250px,70vw,350px)}.glass-sweep{animation:glassLight 7s ease-in-out infinite}#gameScene{background:radial-gradient(ellipse at 35% 20%,#fffefa,#f8e8ef 52%,#ead8e4)}#playfield.hit .heart-floor{opacity:0}.shard{background:linear-gradient(130deg,#fff9,#f8bfd780,#8d3d7390);border:1px solid #fff8;box-shadow:0 0 10px #e8bad2}@keyframes glassLight{0%,25%{translate:-80px 0}65%,100%{translate:570px 0}}@media(max-height:600px){#rope{min-height:0;height:76%}#glassHeart{width:210px}.heart-floor{top:calc(5% + 195px)}}@media(prefers-reduced-motion:reduce){.glass-sweep{animation:none}}

/* A paired heartbeat; hit detection follows the transformed SVG contour. */
#playfield:not(.hit) #glassHeart{transform-origin:50% 50%;animation:heartLubDub 1.65s ease-in-out infinite;will-change:transform}
#playfield:not(.hit) .heart-floor{animation:heartShadow 1.65s ease-in-out infinite}
@keyframes heartLubDub{0%,36%,100%{transform:translateX(-50%) scale(1)}10%{transform:translateX(-50%) scale(1.065)}18%{transform:translateX(-50%) scale(1.015)}26%{transform:translateX(-50%) scale(1.045)}}
@keyframes heartShadow{0%,36%,100%{transform:translateX(-50%) scale(1);opacity:.65}10%{transform:translateX(-50%) scale(1.15);opacity:1}18%{transform:translateX(-50%) scale(1.03);opacity:.75}26%{transform:translateX(-50%) scale(1.1);opacity:.9}}
@media(prefers-reduced-motion:reduce){#playfield:not(.hit) #glassHeart,#playfield:not(.hit) .heart-floor{animation:none;will-change:auto}}

/* Match the map camera to the screen, without a clipped square or letterboxing. */
#mapScene{height:100%;height:100dvh;background:radial-gradient(ellipse at 48% 40%,#30283d 0%,#201b2b 57%,#13101c 100%)}
#journey{display:block;width:100%;height:100%;max-width:none;margin:0;overflow:hidden;touch-action:pan-y}
#mapScene:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#100d1926,transparent 18%,transparent 80%,#100d1933)}
#worldCountries .country{fill:#79677f;fill-opacity:.62;stroke:#d5b9d1;stroke-opacity:.35;stroke-width:.38}
#worldCountries .country.highlight{fill:#d899bc;fill-opacity:.82;stroke:#ffe1f0;stroke-opacity:.9;stroke-width:.7}
.place{font-size:15px;stroke:#211a2a;stroke-width:2.3}.label-leader{stroke-width:.9}#travelPath{stroke-width:1.5}

/* Night map with decorative white city lights. */
#mapScene{background:radial-gradient(ellipse at 55% 40%,#101c2b,#050a13 80%)}
#worldCountries .country{fill:#182538;fill-opacity:.9;stroke:#8294af;stroke-opacity:.2;stroke-width:.25}
#worldCountries .country.highlight{fill:#243649;fill-opacity:.95;stroke:#b6c7df;stroke-opacity:.5;stroke-width:.4}
#cityLights{fill:#fff7e8;pointer-events:none}.city-halo{fill:#f4eddd;opacity:.09}
#travelPath{stroke:#fff6e8;stroke-opacity:.28;stroke-width:.65;stroke-dasharray:1 3}
#travelTrail{stroke:#fff1df;stroke-width:.85;stroke-linecap:round;filter:drop-shadow(0 0 1.5px #fff0d6);opacity:.85}
#travellingHeart path{fill:#ffc0d5;stroke:#fff5f9;stroke-width:2}#travellingHeart circle{fill:#ffd7e6;opacity:.5}
.place{fill:#f2f5fb;stroke:#08111f;stroke-width:2.5;font-size:13px}.label-leader{stroke:#d6e4f5;stroke-opacity:.65;stroke-width:.65}
#arrival{stroke:#fff3e0}#mapScene:after{background:linear-gradient(180deg,#02050b45,transparent 22%,transparent 78%,#02050b45)}

/* The touch target stays invisible; keyboard focus lights the bow itself. */
#aimPad,#aimPad:focus,#aimPad:focus-visible{outline:none;box-shadow:none;border:0;background:transparent;appearance:none;-webkit-appearance:none}
#bow{filter:drop-shadow(0 5px 4px #59382430)}
#bowString{stroke:#c5b8a0;stroke-width:1.1;fill:none}
#projectile svg{stroke:none;fill:none;filter:drop-shadow(1px 2px 1px #44251935)}
#playfield:has(#aimPad:focus-visible) #bow{filter:drop-shadow(0 0 5px #b04f7c80)}

/* A full photograph and a quiet gold birthday dedication. */
#birthdayScene{background:#101824;isolation:isolate}
.birthday-ambient{position:absolute;inset:-35px;background:linear-gradient(#10182480,#101824bb),url('amma-blessing.webp') center/cover;filter:blur(26px);opacity:.65;z-index:-1}
#birthdayScene .message{position:relative;width:100%;max-width:900px;margin:auto;padding: max(12px,env(safe-area-inset-top)) 16px max(8px,env(safe-area-inset-bottom));gap:12px}
.birthday-photo{flex:1;min-height:0;width:100%;display:flex;justify-content:center;align-items:center;animation:memory-in 1.5s ease-out both}
.birthday-photo img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:3px;box-shadow:0 10px 50px #0005}
.birthday-wish{flex:0 0 auto;text-align:center;animation:wish-in 1.4s .5s ease-out both}
#birthdayScene h1{font-family:Georgia,serif;font-size:clamp(22px,5vw,32px);line-height:1.15;color:#f4d8a6;font-weight:400;text-shadow:0 2px 22px #e6b46d45}
#birthdayScene h1>span{display:block;font-size:clamp(40px,10vw,60px);font-style:italic;line-height:1.2;margin-top:4px;letter-spacing:.02em}
#birthdayScene .wish-heart{display:inline-block;font-size:.5em;vertical-align:middle;animation:beat 2.8s infinite}
#birthdayScene #replay{margin:3px 0 0;padding:4px 14px;color:#e6c79a;font-size:24px;min-width:44px;min-height:44px}
#birthdayScene #confetti{z-index:2;opacity:.6}
#birthdayScene .petal{color:#ffe0a6;font-size:14px}
@keyframes memory-in{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}
@keyframes wish-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media (orientation:landscape) and (max-height:600px){#birthdayScene .message{flex-direction:row;gap:28px;padding:14px 24px}.birthday-photo{height:100%;width:55%;flex:1}.birthday-wish{flex:1}#birthdayScene h1{font-size:25px}#birthdayScene h1>span{font-size:48px}}

/* Illuminated birthday lettering, with a slow gold reflection. */
.birthday-wish{position:relative;isolation:isolate;width:min(100%,440px)}
.birthday-wish:before{content:"";position:absolute;inset:-22px -10px 22px;z-index:-1;pointer-events:none;background:radial-gradient(ellipse,#d28d333b,transparent 68%);filter:blur(10px);animation:wish-halo 4s ease-in-out infinite}
#birthdayScene h1{color:#fff0c9;text-shadow:0 0 3px #fff7df,0 0 12px #f5c566a0,0 0 28px #e4a23c70;letter-spacing:.04em}
#birthdayScene .amma-glow{font-weight:400;display:inline-block;background:linear-gradient(110deg,#d99b4c 0%,#ffe1a0 20%,#fff9e8 35%,#e4b86b 48%,#fff 53%,#fff0c9 58%,#e0a754 75%,#fff2c7 100%);background-size:250% 100%;background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent;text-shadow:none;filter:drop-shadow(0 0 2px #ffe6a5aa) drop-shadow(0 0 8px #efa92b80) drop-shadow(0 0 20px #ec922955);animation:gold-reflection 5s ease-in-out infinite}
#birthdayScene .wish-heart{filter:drop-shadow(0 0 5px #ff94b9) drop-shadow(0 0 14px #f35e8c99)}
.wish-lights{position:absolute;inset:0 0 40px;pointer-events:none;z-index:-1}
.wish-lights i{position:absolute;font-style:normal;color:#ffe5b0;text-shadow:0 0 6px #ffd382,0 0 16px #efac41;font-size:16px;animation:little-light 4s ease-in-out infinite}
.wish-lights i:nth-child(1){left:7%;top:48%;color:#ffc7d6;animation-delay:-.5s}
.wish-lights i:nth-child(2){left:17%;top:0;animation-delay:-2s;font-size:10px}
.wish-lights i:nth-child(3){right:5%;top:33%;animation-delay:-1s}
.wish-lights i:nth-child(4){right:18%;top:1%;animation-delay:-3s;font-size:12px}
.wish-lights i:nth-child(5){left:23%;bottom:0;animation-delay:-2.5s;font-size:11px}
.wish-lights i:nth-child(6){right:22%;bottom:2%;animation-delay:-1.5s;font-size:9px}
@keyframes gold-reflection{0%,100%{background-position:100% 50%}50%{background-position:0% 50%}}
@keyframes little-light{0%,100%{opacity:.3;transform:translateY(3px) scale(.8)}50%{opacity:1;transform:translateY(-5px) scale(1.1)}}
@keyframes wish-halo{0%,100%{opacity:.6;transform:scale(.96)}50%{opacity:1;transform:scale(1.05)}}
@media(prefers-reduced-motion:reduce){#birthdayScene .amma-glow{background-position:45% 50%}.wish-lights i{opacity:.75}}

#balloons{position:absolute;inset:0;pointer-events:none}
.balloon{position:absolute;width:32%;height:auto;overflow:visible;filter:drop-shadow(0 12px 12px #bd4a7020);animation:balloon-float 4.2s ease-in-out infinite;transform-origin:50% 30%}
.balloon:nth-child(1){left:1%;top:18%;animation-delay:-1.3s}
.balloon:nth-child(2){left:34%;top:7%;animation-delay:-2.7s}
.balloon:nth-child(3){left:67%;top:19%;animation-delay:-.2s}
.balloon-string{fill:none;stroke:#bc8c9a;stroke-width:.65;opacity:.65}
.balloon.popped{visibility:hidden;animation:none}
#aimPad{pointer-events:none}
#playfield{touch-action:none}
.balloon-piece{position:absolute;width:9px;height:13px;pointer-events:none;border-radius:70% 20% 60% 30%;background:var(--color);animation:balloon-burst .65s ease-out forwards;z-index:6}
@keyframes balloon-float{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-8px) rotate(2deg)}}
@keyframes balloon-burst{to{transform:translate(var(--x),var(--y)) rotate(var(--r));opacity:0}}
@media(max-height:600px){.balloon{width:25%;max-height:48%;}.balloon:nth-child(1){left:5%;top:9%}.balloon:nth-child(2){left:37.5%;top:2%}.balloon:nth-child(3){left:70%;top:9%}}

/* Connected scenes: a living tree, a heart, and a sealed letter. */
.scene{height:100svh}
.scene.scene-enter{z-index:2;animation:scene-arrive .85s cubic-bezier(.22,.7,.24,1) both}
.scene.scene-leave{z-index:1;pointer-events:none;animation:scene-depart .85s ease both}
@keyframes scene-arrive{from{opacity:0;transform:translateY(35px) scale(1.025)}to{opacity:1;transform:none}}
@keyframes scene-depart{to{opacity:0;transform:translateY(-25px) scale(.98)}}
#gameScene{background:radial-gradient(ellipse at 30% 35%,#fffcf6,#f9e7eb 70%,#f2d9e4)}
#loveTree{position:absolute;left:0;top:3%;width:67%;height:calc(100% - 225px);overflow:visible;pointer-events:none}
.tree-stroke{fill:none;stroke:url(#treeBark);stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1}
.tree-root{stroke-width:5}.tree-trunk{stroke-width:19}.tree-branch{stroke-width:var(--branch-width)}
.tree-leaf{opacity:0;transform:scale(0)}
.growing .tree-root{animation:tree-draw .65s ease-out forwards}
.growing .tree-trunk{animation:tree-draw 1.2s .4s ease-out forwards}
.growing .tree-branch{animation:tree-draw 1s var(--delay) ease-out forwards}
.growing .tree-leaf{animation:leaf-bloom .8s var(--delay) cubic-bezier(.2,.8,.3,1.3) forwards}
@keyframes tree-draw{to{stroke-dashoffset:0}}
@keyframes leaf-bloom{to{opacity:1;transform:scale(1)}}
#targetHeart{position:absolute;left:71%;top:25%;width:27%;height:auto;overflow:visible;opacity:0;pointer-events:none;filter:drop-shadow(0 12px 14px #ce5b8138)}
.growing #targetHeart{animation:target-appear .8s 2s both,target-breathe 3s 2.8s ease-in-out infinite}
@keyframes target-appear{from{opacity:0;transform:scale(.65)}to{opacity:1;transform:scale(1)}}
@keyframes target-breathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-7px) scale(1.035)}}
#playfield.hit #targetHeart{animation:target-pop .45s ease-out forwards}
@keyframes target-pop{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.35)}}
#envelopeScene{display:flex;align-items:center;justify-content:center;flex-direction:column;background:radial-gradient(ellipse,#fff9ef,#f3e0e7);perspective:1200px}
.letter-aura{position:absolute;width:min(85vw,500px);aspect-ratio:1;background:radial-gradient(circle,#efc39b50,transparent 65%);pointer-events:none}
#envelope{position:relative;display:block;width:clamp(240px,70vw,360px);aspect-ratio:1.55;border:0;padding:0;background:none;perspective:1000px;filter:drop-shadow(0 18px 22px #8f546630);transition:transform 1s;animation:letter-float 4s ease-in-out infinite}
#envelope:focus-visible{outline:2px solid #b37478;outline-offset:15px;border-radius:5px}
#envelope>span{position:absolute;display:block}
.envelope-back{inset:0;background:#bc7e80;border-radius:5px}
.letter-card{inset:6% 6% 5%;background:linear-gradient(135deg,#fffdf3,#ffeecf);border:1px solid #e6c79b;border-radius:3px;display:flex!important;align-items:center;justify-content:center;flex-direction:column;color:#b0736a;font:italic 28px Georgia,serif;transition:transform 1s .35s;z-index:1}
.letter-heart{font-size:46px;color:#cc6986;margin-top:12px}
.envelope-front{inset:0;background:linear-gradient(145deg,#f8dcd7,#e3b3b8);clip-path:polygon(0 0,50% 57%,100% 0,100% 100%,0 100%);border-radius:4px;z-index:3}
.envelope-front:after{content:"";position:absolute;inset:0;background:linear-gradient(150deg,#ffebe0,#e9c1c0);clip-path:polygon(0 100%,50% 45%,100% 100%)}
.envelope-flap{inset:0;background:linear-gradient(#f9dfd4,#eac0bd);clip-path:polygon(0 0,100% 0,50% 58%);transform-origin:50% 0;transition:transform .7s ease,z-index 0s .35s;z-index:4;backface-visibility:hidden}
.envelope-seal{left:43%;top:43%;width:14%;aspect-ratio:1;border-radius:50%;display:grid!important;place-items:center;color:#fff0db;background:radial-gradient(circle at 35% 25%,#db9b9c,#ac536e);box-shadow:0 2px 5px #7b3c4c55,inset 0 0 0 3px #efb6ac66;font-size:22px;z-index:5;transition:opacity .3s}
.envelope-hint{font:italic 18px Georgia,serif;color:#ac7780;margin:38px 0 0;transition:opacity .3s}
#envelope.open{animation:none;transform:translateY(20px)}
#envelope.open .envelope-flap{transform:rotateX(180deg);z-index:0}
#envelope.open .letter-card{transform:translateY(-65%)}
#envelope.open .envelope-seal,#envelope.open+.envelope-hint{opacity:0}
@keyframes letter-float{50%{transform:translateY(-8px)}}
@media(max-height:600px){#loveTree{top:1%;height:63%;width:62%}#targetHeart{top:10%;left:73%;width:22%;max-height:35%}#bow{bottom:73px}#projectile{bottom:70px}#hint{bottom:12px}#gesture{bottom:36px}#envelope{width:min(42vw,280px)}.envelope-hint{margin-top:20px}}
@media(prefers-reduced-motion:reduce){.growing .tree-stroke{stroke-dashoffset:0}.growing .tree-leaf{opacity:1;transform:none}.growing #targetHeart{opacity:1}.hit #targetHeart{opacity:0}#envelope.open .letter-card{transform:translateY(-65%)}}

/* Moonlit garden, real-time 3D foreground and a full-screen water wipe. */
#gameScene{background:radial-gradient(ellipse at 28% 35%,#24373b 0%,#121f2b 44%,#080e19 100%)}
#gardenCanvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1}
.has-3d #loveTree,.has-3d #targetHeart,.has-3d #bow,.has-3d #projectile{opacity:0!important}
#guide{z-index:2;opacity:.45}#aimLine{stroke:#f7d9b0}#aimDot{stroke:#ffdab2;fill:#ffdab233}
#hint,#gesture{z-index:3;color:#e9c9ae;text-shadow:0 1px 8px #0009}
#loveTree{filter:drop-shadow(0 0 12px #f5adbf22)}
#envelopeScene{background:radial-gradient(ellipse at 50% 45%,#31414a,#14202d 55%,#080f1b)}
.letter-aura{background:radial-gradient(circle,#f3c99524,transparent 65%)}
.envelope-hint{color:#e4c4ac}
#envelope{filter:drop-shadow(0 20px 30px #0009) drop-shadow(0 0 22px #e6c79b18)}
#heartTransition{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:1000}
#heartTransition[hidden]{display:none}

/* Soft moonlight, distant haze and a warm pool around the heart tree. */
#gameScene{background:radial-gradient(ellipse at 76% 12%,#41627666,transparent 34%),radial-gradient(ellipse at 25% 55%,#394e494a,transparent 42%),linear-gradient(155deg,#172333,#101e2d 50%,#09131e)}
#gameScene:before{content:"";position:absolute;inset:-15%;pointer-events:none;background:conic-gradient(from 150deg at 75% 10%,transparent 0deg,#a7d9ec0c 8deg,transparent 16deg,#b5ddeb12 23deg,transparent 31deg,#c5d8f010 40deg,transparent 48deg);filter:blur(9px);animation:moon-rays 16s ease-in-out infinite alternate}
#gameScene:after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 28% 63%,#dfa96713,transparent 32%),linear-gradient(0deg,#070d1755,transparent 25%);z-index:0}
#playfield{z-index:1}
@keyframes moon-rays{from{opacity:.6;transform:rotate(-3deg)}to{opacity:1;transform:rotate(3deg)}}

.tree-trunk{stroke-width:14}.tree-branch{stroke-width:calc(var(--branch-width)*.8)}

#gameScene{background:radial-gradient(ellipse at 78% 12%,#33495c66,transparent 36%),radial-gradient(ellipse at 27% 58%,#51483b3b,transparent 40%),linear-gradient(155deg,#17232b,#0d1823 55%,#090f16)}
#playfield.hit #targetHeart{animation:heart-fall 1.55s forwards!important;transform-origin:50% 50%}
#playfield.has-3d.hit #targetHeart{animation:none!important;transform:none!important}
@keyframes heart-fall{0%{opacity:1;transform:translateY(0) rotate(0)}55%{opacity:1;transform:translateY(var(--fall-distance)) rotate(18deg)}65%{opacity:1;transform:translateY(var(--fall-distance)) scale(1.12,.75) rotate(18deg)}100%{opacity:0;transform:translateY(var(--fall-distance)) scale(1.3,.8) rotate(23deg)}}
.impact-piece{position:absolute;pointer-events:none;background:linear-gradient(135deg,#ffe7f0,#bf3868);clip-path:polygon(0 0,100% 20%,65% 100%);width:14px;height:20px;z-index:6;animation:impact-scatter .8s ease-out forwards}
@keyframes impact-scatter{to{transform:translate(var(--x),var(--y)) rotate(var(--r));opacity:0}}

/* Folded paper, a two-sided hinged flap, then the letter slides out. */
#envelope{transform-style:preserve-3d;perspective:1400px;isolation:isolate;animation:letter-float 5s ease-in-out infinite}
.envelope-back{background:linear-gradient(155deg,#b7886c,#dfb79a 50%,#a67460);box-shadow:inset 0 3px 10px #593c3444;border:1px solid #f6d8bb99}
#envelope .letter-card{inset:5% 6% 7%;padding:8px 12px;gap:5px;background:repeating-linear-gradient(0deg,#fff9ec 0 2px,#fbf2df 3px 4px);box-shadow:0 4px 12px #503a2933;justify-content:space-between;font-size:16px;transition:transform 1.2s .8s cubic-bezier(.22,.7,.2,1);overflow:hidden;z-index:2}
.letter-dedication{font:italic 16px Georgia,serif;color:#8c6149}
.letter-photo{width:100%;height:65%;min-height:0;object-fit:contain;background:#18232d;border:3px solid #fff;box-shadow:0 2px 4px #0002}
.letter-signature{font:italic 16px Georgia,serif;color:#9d5c63}
#envelope .envelope-front{clip-path:none;background:none;z-index:4;overflow:hidden;box-shadow:0 2px 3px #6e453722}
.envelope-front:after{display:none}
.envelope-front>span{position:absolute;inset:0;display:block}
.fold-left{clip-path:polygon(0 0,54% 55%,0 100%);background:linear-gradient(125deg,#f5dfc7,#dbb79b)}
.fold-right{clip-path:polygon(100% 0,46% 55%,100% 100%);background:linear-gradient(230deg,#f4ddc5,#d7ae90)}
.fold-bottom{clip-path:polygon(0 100%,0 98%,50% 48%,100% 98%,100% 100%);background:linear-gradient(170deg,#fff0da,#e5c4a6);filter:drop-shadow(0 -1px 1px #7c564266)}
#envelope .envelope-flap{clip-path:none;background:none;transform-style:preserve-3d;backface-visibility:visible;transition:transform .9s cubic-bezier(.4,0,.2,1),z-index 0s .46s;z-index:6}
.envelope-flap>span{position:absolute;inset:0;display:block;clip-path:polygon(0 0,100% 0,50% 58%);backface-visibility:hidden;-webkit-backface-visibility:hidden}
.flap-outside{background:linear-gradient(165deg,#fff0dc,#e1bd9e);filter:drop-shadow(0 2px 2px #815c3e55)}
.flap-inside{transform:rotateX(180deg);background:linear-gradient(#d9b598,#f4dfc7)}
#envelope .envelope-seal{z-index:7;background:radial-gradient(circle at 30% 25%,#d98992,#9e405d);box-shadow:0 3px 5px #50303d55,inset 0 0 0 3px #efa5b077;transition:opacity .25s,transform .35s}
#envelope.open{transform:translateY(38px);animation:none}
#envelope.open .envelope-flap{transform:rotateX(-175deg);z-index:1}
#envelope.open .letter-card{transform:translateY(-64%) rotate(-2deg)}
#envelope.open .envelope-seal{opacity:0;transform:translateY(8px) scale(.8)}
.grass-blade{transform-box:fill-box;transform-origin:50% 100%;animation:grass-breeze 3.4s ease-in-out infinite alternate}
@keyframes grass-breeze{from{transform:skewX(-7deg) rotate(-3deg)}to{transform:skewX(10deg) rotate(5deg)}}
@media(max-height:450px){#envelope{width:min(40vw,230px)}#envelope.open{transform:translateY(35px)}.letter-dedication,.letter-signature{font-size:13px}.envelope-hint{font-size:15px}}

/* The garden is rooted in a continuous meadow, not an isolated platform. */
.meadow-floor{position:absolute;left:0;right:0;top:var(--ground-top,62%);bottom:0;pointer-events:none;background:linear-gradient(180deg,#31472c,#1e3627 30%,#10271f 75%,#0c1b18);box-shadow:0 -10px 25px #354b2620}
.meadow-floor:before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(103deg,transparent 0 5px,#72905b0a 6px 7px,transparent 8px 13px);opacity:.7}
#loveTree>ellipse,.tree-grass{display:none}
#hint{color:#fff0d9;text-shadow:0 2px 6px #000,0 0 18px #000}

/* A quiet morning: pale blue sky, hazy sun and a soft green lawn. */
#gameScene{background:linear-gradient(180deg,#c7e5ef 0%,#e1edf0 36%,#f7f2dc 68%,#e7eacd 100%)}
#gameScene:before{inset:0;background:radial-gradient(circle at 82% 13%,#fffef5 0 21px,#fff5ce99 23px,#fff2c333 66px,transparent 115px);filter:none;animation:none;opacity:1;transform:none}
#gameScene:after{inset:0;background:radial-gradient(ellipse 120px 25px at 16% 17%,#ffffffa8,transparent 76%),radial-gradient(ellipse 170px 30px at 64% 29%,#ffffff88,transparent 78%),radial-gradient(ellipse 130px 22px at 85% 6%,#ffffff70,transparent 75%);opacity:.8}
.meadow-floor{background:linear-gradient(180deg,#a5b974,#8fa65f 35%,#79954f 100%);box-shadow:0 -10px 22px #d0dc9e55}
.meadow-floor:before{opacity:.22}
#hint,#gesture{color:#57452f;text-shadow:0 1px 2px #fff8}
#guide{opacity:.4}#aimLine{stroke:#97795c}#aimDot{stroke:#92704e;fill:#fff7}
#loveTree{filter:drop-shadow(3px 7px 7px #59432d15)}
#targetHeart{filter:drop-shadow(2px 10px 12px #915e7030)}
#envelopeScene{background:radial-gradient(ellipse at 50% 30%,#fffaf0,#f2e7d8 70%,#e4ddd0)}
.letter-aura{background:radial-gradient(circle,#fff4d999,transparent 65%)}
.envelope-hint{color:#8e6658}
#envelope{filter:drop-shadow(0 18px 22px #7752422b)}

#targetHeart{overflow:visible}.heart-leaf-fall{position:absolute;pointer-events:none;color:#ed91ad;font-size:15px;z-index:2;animation:leaf-drift 7s ease-in forwards}@keyframes leaf-drift{0%{opacity:0;transform:translate(0,0) rotate(0)}10%{opacity:.9}85%{opacity:.8}100%{opacity:0;transform:translate(var(--drift,25px),var(--drop,180px)) rotate(150deg)}}

/* Golden country edges and gentle airborne lights, confined to the opening map. */
#worldCountries .country.highlight{stroke:#e5bc70;stroke-opacity:.85;stroke-width:.45}
#goldBorders{pointer-events:none;fill:none;stroke-linecap:round;stroke-linejoin:round}
.gold-border-halo{stroke:#ffc663;stroke-width:1.5;opacity:.45;filter:blur(1px)}
.gold-border-edge{stroke:#edc47b;stroke-width:.55;filter:drop-shadow(0 0 .8px #ffc964);opacity:.95}
.gold-border-shine{stroke:#fff3c7;stroke-width:.85;stroke-dasharray:7 93;animation:gold-border-travel 5.5s linear infinite;filter:drop-shadow(0 0 1.2px #ffd77c)}
#goldBorders .gold-border-shine:last-child{animation-duration:7s;animation-delay:-2s}
@keyframes gold-border-travel{to{stroke-dashoffset:-100}}
#journey{position:relative;z-index:1}
.map-motes{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:2}
.map-motes i{position:absolute;left:var(--x);top:var(--y);width:var(--size);height:var(--size);border-radius:50%;background:#fff0c5;box-shadow:0 0 7px 2px #ffce7455;opacity:0;animation:map-light-float var(--time) ease-in-out var(--delay) infinite}
.map-motes i:nth-child(4n){background:#fff9e9;box-shadow:0 0 12px 3px #f9d58c44}
@keyframes map-light-float{0%{opacity:0;transform:translate(0,25px) scale(.5)}30%{opacity:.5}65%{opacity:.3}100%{opacity:0;transform:translate(var(--drift),-75px) scale(1)}}
@media(prefers-reduced-motion:reduce){.gold-border-shine{display:none}.map-motes i{animation:none;opacity:.2}}

/* A small distant flock in the morning sky. */
.sky-birds{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:2}
.sky-bird{position:absolute;left:-60px;top:var(--top);width:var(--size);opacity:.55;animation:bird-crossing var(--duration) linear var(--delay) infinite;will-change:transform}
.sky-bird svg{display:block;width:100%;height:auto;overflow:visible;fill:#526c76;animation:bird-bob 3.7s ease-in-out var(--delay) infinite}
.bird-wings{transform-origin:24px 19px;animation:bird-wingbeat var(--flap) ease-in-out infinite}
@keyframes bird-crossing{from{transform:translateX(-4vw)}to{transform:translateX(calc(100vw + 120px))}}
@keyframes bird-wingbeat{0%,100%{transform:scaleY(1)}50%{transform:scaleY(-.65)}}
@keyframes bird-bob{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-9px) rotate(3deg)}}
@media(prefers-reduced-motion:reduce){.sky-birds{display:none}}

/* Warm morning light and a lush canopy inspired by the reference film. */
#gameScene{background:radial-gradient(ellipse at 75% 12%,#fff7da88,transparent 45%),linear-gradient(#d2ebef,#f9f3e6 67%,#e3e7ba)}
.growing .tree-trunk{animation:tree-draw 1.65s .25s ease-out forwards}
.growing .tree-leaf{animation:leaf-bloom .85s var(--delay) cubic-bezier(.2,.8,.3,1.15) forwards}
.growing #targetHeart{animation-delay:3.8s}
#loveTree{filter:drop-shadow(2px 5px 5px #80534016)}

[hidden]{display:none!important}.story-scene{display:flex;align-items:center;justify-content:center;padding:30px 22px;color:#fbe6e8;text-align:center;overflow-y:auto}.story-center{width:min(100%,640px);margin:auto}.story-scene h2{font-family:Georgia,serif;font-weight:400;font-size:clamp(32px,6vw,58px);line-height:1.12;margin:15px 0 30px}.eyebrow{font-size:11px;letter-spacing:3px;text-transform:uppercase;opacity:.7}.story-scene p{line-height:1.7}.story-next{padding:14px 26px;border-radius:30px;border:1px solid #f8d4ac88;background:linear-gradient(110deg,#e8bc8c,#f9dfba);color:#553542;font-size:13px;margin:22px auto 0;min-height:46px;box-shadow:0 5px 30px #dc986318}.quiet-next{background:none;border:0;color:inherit;padding:18px;font-size:12px;letter-spacing:1px}.midnight{background:radial-gradient(ellipse at 50% 78%,#5b2247,#25132d 52%,#100f20);isolation:isolate}.midnight:before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:radial-gradient(circle,#ffe2ad99 0 1px,transparent 2px),radial-gradient(circle,#ffd8e655 0 1px,transparent 2px);background-size:97px 131px,163px 179px;background-position:12px 31px,54px 15px;opacity:.5}.rose-reveal{background:radial-gradient(ellipse at 30% 20%,#f36f8d,#bd2f5b 65%,#7d254d)}.rose-reveal h2{font-size:clamp(65px,15vw,138px);letter-spacing:-4px;color:#fff4e4;animation:memory-in 1.2s both}.rose-reveal h2 span{display:block;font:italic clamp(30px,6vw,48px) Georgia;letter-spacing:0;margin-top:22px;color:#ffe0ae}
.bloom-scene{background:radial-gradient(ellipse at 60% 30%,#fffdf5,#f3e6db);color:#9b3e5d;position:absolute;overflow:hidden}.tree-wish{position:absolute;left:8%;top:40%;width:38%;text-align:left;z-index:2}.tree-wish h2{font-size:clamp(24px,4vw,58px);font-style:italic}.tree-wish p{font-family:Georgia,serif}.tree-wish .eyebrow{font-size:10px}.tree-wish em{color:#c85478}#storyTreeWrap{position:absolute;right:6%;top:3%;width:51%;height:90%}#storyTree{width:100%;height:100%;overflow:visible}#storyTree .tree-root{opacity:0}#storyTree .tree-grass{display:none}.bloom-scene .quiet-next{position:absolute;bottom:15px;left:0;right:0;width:100%}
.shooting-intro #loveTree{visibility:hidden}.shooting-intro #targetHeart{left:36%;top:22%;width:28%;animation-delay:.7s}#gameScene:has(.shooting-intro){background:radial-gradient(ellipse at center,#fffaf2,#f4e8df)}#gameScene:has(.shooting-intro) .meadow-floor,#gameScene:has(.shooting-intro) .sky-birds{display:none}#gameScene:has(.shooting-intro):before,#gameScene:has(.shooting-intro):after{display:none}.shooting-intro #hint{color:#8b6270}
#wishCandle{display:block;position:relative;width:240px;height:270px;margin:5px auto 10px;border:0;background:none;cursor:pointer}.cake-tier{position:absolute;left:25px;width:190px;border-radius:50% / 14%;background:repeating-linear-gradient(0deg,#f5c5ce 0 14px,#fff1df 15px 25px);box-shadow:inset -18px 0 24px #b3576e33,0 12px 20px #0003}.cake-bottom{bottom:25px;height:76px}.cake-top{bottom:96px;height:60px;left:45px;width:150px;z-index:2}.cake-tier:before{content:"";position:absolute;left:0;right:0;top:0;height:18px;border-radius:50%;background:#ffebdf;box-shadow:0 4px 0 #e6adbd}.cake-plate{position:absolute;bottom:14px;left:8px;width:224px;height:21px;border-radius:50%;background:linear-gradient(#fff6ea,#af8e9f);z-index:-1}.cake-candle{position:absolute;bottom:152px;left:113px;width:14px;height:65px;background:repeating-linear-gradient(35deg,#fff1d7 0 8px,#ed92af 9px 15px);border-radius:3px;z-index:3}.cake-flame{position:absolute;left:111px;bottom:221px;width:19px;height:30px;border-radius:70% 30% 65% 35%;background:radial-gradient(ellipse at 50% 70%,#fff,#ffe48e 45%,#f8a344);box-shadow:0 0 23px #ffe29c,0 0 80px #ffd07888;animation:flame-dance .9s alternate infinite;transform-origin:center bottom;z-index:4}.blown .cake-flame{animation:none;opacity:0;transform:translateY(-24px) scale(.2);transition:.6s}.blown .cake-candle:after{content:"";position:absolute;bottom:100%;left:3px;width:9px;height:35px;border-radius:50%;background:#fff5;filter:blur(5px);animation:candle-smoke 1.3s forwards}@keyframes flame-dance{to{transform:rotate(7deg) scale(.9,1.1)}}@keyframes candle-smoke{to{transform:translate(12px,-55px);opacity:0}}#cakeCaption{font-size:13px;color:#eac2d2}
.balloon-bunch{height:260px;display:flex;align-items:center;justify-content:center;gap:10px;margin:30px 0}.wish-balloon{position:relative;background:transparent;border:0;width:85px;height:125px;padding:0;animation:balloon-bob 3s ease-in-out infinite;animation-delay:calc(var(--i)*-.6s)}.wish-balloon:nth-child(even){margin-top:70px}.wish-balloon span{display:block;width:100%;height:100%;border-radius:50% 50% 47% 47%;background:radial-gradient(ellipse at 28% 25%,#fff9,transparent 26%),radial-gradient(ellipse at 30% 25%,var(--balloon),var(--balloon) 45%,#6b355f);box-shadow:inset -8px -5px 16px #45172e25,0 12px 40px #f6b3cb10;transition:transform .25s,opacity .25s}.wish-balloon span:before{content:"";position:absolute;bottom:-7px;left:calc(50% - 5px);border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:9px solid var(--balloon)}.wish-balloon:after{content:"";position:absolute;top:calc(100% + 5px);left:50%;width:12px;height:70px;border-left:1px solid #e9c3d177;border-radius:50%;transition:opacity .2s}.wish-balloon.popped span{transform:scale(1.6);opacity:0}.wish-balloon.popped:after{opacity:0}.wish-balloon:disabled{cursor:default}@keyframes balloon-bob{50%{transform:translateY(-12px) rotate(3deg)}}.story-note{min-height:55px;font-family:Georgia,serif;color:#f9d3bc;font-size:17px}.quiz-answers{display:grid;gap:13px;max-width:380px;margin:auto}.quiz-answers button{background:#ffffff08;color:#f8e4ed;border:1px solid #d7abc54d;border-radius:13px;padding:17px;font-size:15px}.quiz-answers .chosen{border-color:#f4cd9e;background:#f4cd9e19}.memory-frame{width:min(270px,65vw);margin:0 auto;padding:10px 10px 6px;background:#fff5e8;box-shadow:0 15px 65px #0004;transform:rotate(-3deg);color:#7a4a58}.memory-frame img{width:100%;max-height:44svh;object-fit:contain;display:block}.memory-frame p{font:italic 13px Georgia;margin:14px 0}.love-letter{background:linear-gradient(110deg,#fff9e8,#f9ead2);padding:clamp(23px,5vw,44px);text-align:left;width:min(92vw,530px);color:#684755;box-shadow:0 20px 85px #0005;border-radius:3px;max-height:72svh;overflow-y:auto;font:16px/1.8 Georgia,serif}.letter-to{font-style:italic;font-size:23px;margin:0 0 20px}.letter-signoff{font-style:italic;text-align:right}#letterWords{white-space:pre-wrap}#letterScene{flex-direction:column;gap:8px}#fireworks{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:4}
@media(max-width:650px){.tree-wish{top:8%;left:8%;width:84%}.tree-wish h2{margin:10px 0;font-size:34px}.tree-wish p{margin:8px 0}#storyTreeWrap{top:25%;right:9%;width:82%;height:69%}.balloon-bunch{gap:7px;height:220px}.wish-balloon{width:55px;height:79px}.story-scene h2{font-size:34px}.rose-reveal h2{font-size:76px}.shooting-intro #targetHeart{width:36%;left:32%;top:23%}.love-letter{font-size:15px}.story-center{padding:12px 0}}
@media(max-height:600px){.story-scene{padding:14px}.story-scene h2{font-size:30px;margin:8px 0 15px}.balloon-bunch{height:150px;margin:5px 0}.wish-balloon{width:55px;height:75px}#wishCandle{transform:scale(.7);margin:-30px auto -35px}.story-next{margin-top:10px}.memory-frame img{max-height:35svh}}

#storyTree .tree-stroke{stroke:url(#bloom-treeBark)}
