:root{font-family:system-ui,-apple-system,sans-serif;color:#fff1d7;background:#080e23;color-scheme:dark}*{box-sizing:border-box}body{margin:0;min-height:100dvh}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #ffda87;outline-offset:4px}.landscape,.shade,#particles,#flash{position:fixed;inset:0;pointer-events:none}.landscape{z-index:0;background-size:cover;background-position:center;opacity:0;transition:opacity 1.25s ease;transform:scale(1.025)}.landscape.visible{opacity:1;animation:land-breathe 20s ease-in-out infinite alternate}.shade{z-index:1;background:linear-gradient(#060c22c9,transparent 36%,#090e2322 56%,#070c22e8)}#particles{z-index:2;width:100%;height:100%}#flash{z-index:4;background:radial-gradient(circle at 58% 40%,#fffde6,#ffcf68a0 30%,transparent 75%);opacity:0}#flash.burst{animation:light-burst 1.8s ease-out}.journey{position:relative;z-index:3;max-width:620px;margin:auto;min-height:100dvh;padding:max(15px,env(safe-area-inset-top)) 22px max(12px,env(safe-area-inset-bottom));display:flex;flex-direction:column}header{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:10px;letter-spacing:3px;color:#e0c6a4}.round{border:1px solid #fff1d725;background:#10162a40;border-radius:50%;width:39px;height:39px;color:#ffe2aa;font-size:23px}.round:disabled{opacity:.2}#scene{display:flex;flex:1;flex-direction:column;align-items:center;text-align:center;animation:scene-in .8s ease;min-height:0;padding-top:22px}#scene.leaving{animation:scene-out .32s ease forwards}.tag{font-size:10px;letter-spacing:2.7px;text-transform:uppercase;color:#e9bd78;margin:0 0 12px}h1{font:normal clamp(28px,7.5vw,41px)/1.15 Georgia,serif;white-space:pre-line;margin:0 0 13px;text-wrap:balance;text-shadow:0 3px 16px #0008}.description{font-size:14px;line-height:1.7;max-width:360px;margin:0;color:#e7d8cd;text-shadow:0 2px 8px #0009}.stage{position:relative;width:100%;flex:1;min-height:240px;margin:8px 0;max-height:55dvh}.actor{position:absolute;object-fit:contain;filter:drop-shadow(0 0 19px #ffb14c80);user-select:none;pointer-events:none}.flame{width:145px;height:170px;left:calc(50% - 72px);bottom:6%;animation:flicker 3s ease-in-out infinite}.sun{width:150px;height:150px;top:4%;right:3%;animation:float 4s ease-in-out infinite}.hint{font-size:13px;line-height:1.5;max-width:360px;color:#f7cf93;margin:8px 0 17px;font-style:italic;text-shadow:0 2px 8px #000}.primary{min-height:49px;width:min(100%,345px);border:1px solid #ffe8b370;border-radius:28px;background:linear-gradient(120deg,#ffe3a0,#ffc680);color:#4c2a20;font-size:14px;font-weight:600;padding:13px 22px;box-shadow:0 5px 32px #ffb34225;flex-shrink:0}.primary:disabled{opacity:.4}.secondary{border:0;background:#0a102b88;border-radius:18px;padding:9px 18px;color:#eed8b6;font-size:12px;margin-top:9px}footer{text-align:center;padding-top:17px;color:#c1a78b;font-size:9px;letter-spacing:2px}#progress{display:flex;justify-content:center;gap:6px;margin-bottom:8px}#progress i{width:5px;height:5px;background:#fff3;border-radius:9px}#progress i.current{width:22px;background:#ffd98b}#progress i.done{background:#c49652}.embers{position:absolute;bottom:0;left:25%;width:50%;height:12%;border-radius:50%;background:radial-gradient(ellipse,#ff861952,transparent 70%);animation:flicker 2s infinite}.sleeping{filter:drop-shadow(0 0 12px #f8882b60);animation:sleep-breathe 4s infinite}.notice .sun{width:110px;height:110px;right:12%;top:0;animation:sun-arrive 2.5s ease both,float 4s 2.5s infinite}.notice .flame{left:12%;bottom:2%}.flight .flame{width:132px;height:155px;left:7%;bottom:3%;animation:fly-to-sun 5s cubic-bezier(.4,0,.3,1) infinite}.trail{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.trail path{fill:none;stroke:#ffd37c;stroke-width:.8;stroke-dasharray:1 3;filter:drop-shadow(0 0 3px #ffb34b);animation:trail-flow 8s linear infinite}.flight .sun{top:0;right:0}.touch .sun{right:4%;top:4%;width:190px;height:190px;animation:sun-glow 3s infinite}.touch .flame{left:10%;bottom:8%;width:170px;height:190px;animation:reunion 2.5s ease both}.aura{position:absolute;inset:-10%;background:repeating-conic-gradient(from 0deg at 62% 35%,#ffd66800 0deg 10deg,#ffd66825 12deg 16deg,#ffd66800 18deg 28deg);mask-image:radial-gradient(ellipse,#000,transparent 65%);animation:aura-turn 35s linear infinite}.game-stage{touch-action:none;min-height:370px;max-height:58dvh;margin:0}.game-stage .sun{width:76px;height:76px;left:calc(50% - 38px);top:5%;z-index:1}.spiral-line{opacity:.42}.star{position:absolute;transform:translate(-50%,-50%);width:44px;height:44px;border:0;padding:0;background:none;z-index:2;transition:opacity .25s,filter .25s}.star img{width:100%;height:100%;pointer-events:none;object-fit:contain;filter:drop-shadow(0 0 6px #ffb142)}.star:disabled{opacity:.42}.star.next{animation:target-pulse 1.5s infinite}.star.collected{opacity:.12}.star.collected img{filter:grayscale(.6)}.player{width:65px;height:80px;position:absolute;transform:translate(-50%,-50%);pointer-events:none;z-index:3;transition:left .12s linear,top .12s linear}.player img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 0 13px #ffbc6a)}.player.arrived{transition:left 1.1s ease,top 1.1s ease}.counter{font-size:12px;letter-spacing:2px;color:#ffdc98;margin:12px 0 0}.game .description{font-size:12px;line-height:1.5}.game h1{font-size:28px}.game .hint{min-height:20px;margin:2px 0 10px}.gift-stage{display:flex;align-items:center;justify-content:center;min-height:210px;max-height:34dvh}.gift-button{background:none;border:0;width:220px;height:230px;padding:0;position:relative;animation:gift-materialize 1.6s ease both,float 4s 1.6s ease-in-out infinite}.gift-button img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 0 35px #ffc263a0)}.gift-button.open img{animation:gift-open .9s ease both}.gift-stage .aura{inset:-20%;opacity:.75;pointer-events:none}.cards{display:grid;gap:9px;width:min(100%,350px);margin:0 0 10px;animation:scene-in .7s ease}.card{text-decoration:none;border-radius:15px;background:linear-gradient(120deg,#fff0d3,#f4d2b7);color:#4a2b28;text-align:left;padding:15px 18px;font-size:14px;display:flex;justify-content:space-between;gap:12px;border:0;min-height:50px}.card[aria-disabled=true]{color:#705c50;background:#fff1d7ca}.card small{font-size:11px;opacity:.75}.town .flame{left:calc(50% - 80px);bottom:38%;width:160px;height:180px;animation:town-flight 7s ease-in-out infinite}.town .trail{opacity:.6}.heart-stage{display:grid;place-items:center;min-height:200px}.heart-art{width:220px;height:220px;overflow:visible;filter:drop-shadow(0 0 16px #ffb245)}.heart-art path{fill:#ffc86110;stroke:#ffdb85;stroke-width:2;stroke-linecap:round;stroke-dasharray:300;stroke-dashoffset:300;animation:heart-draw 3s ease forwards}.ending .stage{max-height:38dvh}.ending .description{font-size:15px}.dawn .shade{background:linear-gradient(#35163166,transparent 45%,#161427be)}.dawn .landscape.visible{animation:dawn-brighten 2.8s ease both,land-breathe 20s 2.8s ease-in-out infinite alternate}
@keyframes scene-in{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}@keyframes scene-out{to{opacity:0;transform:translateY(-12px)}}@keyframes float{50%{translate:0 -9px}}@keyframes flicker{50%{scale:1.035;filter:drop-shadow(0 0 24px #ffb545a0)}}@keyframes sleep-breathe{50%{scale:.96;translate:0 3px}}@keyframes sun-arrive{from{opacity:0;translate:25px 60px}to{opacity:1;translate:0 0}}@keyframes fly-to-sun{0%,100%{transform:translate(0,0) rotate(-8deg)}45%,65%{transform:translate(105px,-120px) rotate(8deg)}}@keyframes trail-flow{to{stroke-dashoffset:-80}}@keyframes reunion{from{transform:translate(-50px,70px);opacity:0}to{transform:translate(45px,-45px);opacity:1}}@keyframes sun-glow{50%{filter:drop-shadow(0 0 42px #ffe28c);scale:1.05}}@keyframes aura-turn{to{rotate:360deg}}@keyframes light-burst{0%{opacity:0}20%{opacity:.95}100%{opacity:0}}@keyframes target-pulse{50%{scale:1.18;filter:drop-shadow(0 0 13px #fff3b9)}}@keyframes gift-materialize{0%{opacity:0;scale:.15;translate:0 45px;filter:blur(14px)}70%{opacity:1;scale:1.1;filter:blur(0)}100%{scale:1;translate:0 0}}@keyframes gift-open{40%{scale:1.15;rotate:-5deg}100%{scale:.8;opacity:.7}}@keyframes town-flight{0%,100%{translate:-40px 20px;rotate:-7deg}50%{translate:40px -40px;rotate:7deg}}@keyframes heart-draw{to{stroke-dashoffset:0}}@keyframes land-breathe{to{transform:scale(1.075)}}@keyframes dawn-brighten{from{filter:brightness(.45)}to{filter:brightness(1)}}
@media(min-width:700px){.landscape{background-position:center 64%}.journey{max-width:570px}.stage{max-height:52dvh}.game-stage{min-height:430px}.star{width:49px;height:49px}}
@media(max-height:740px){.journey{padding-top:10px}#scene{padding-top:14px}.tag{margin-bottom:8px}h1{font-size:29px}.description{font-size:12px;line-height:1.55}.stage{min-height:195px}.game-stage{min-height:305px}.game h1{font-size:24px}.game .description{font-size:11px}.game .hint{font-size:11px}.flame{width:120px;height:140px}.sun{width:125px;height:125px}.hint{font-size:12px;margin:5px 0 10px}footer{padding-top:10px}.gift-stage{min-height:160px}.gift-button{width:165px;height:175px}.star{width:39px;height:39px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}.heart-art path{stroke-dashoffset:0}#particles,#flash{display:none}.touch .flame{transform:translate(45px,-45px)}}
body{overflow-x:hidden}.gift-stage,.touch{overflow:clip}#gift-cards{width:min(100%,350px)}.cards{width:100%}

/* Position actors relative to the updated story. */
.camp{min-height:380px;max-height:none}.camp .sleeping{width:435px;height:510px;left:calc(50% - 217.5px);bottom:-65px;transform-origin:50% 85%}.camp .embers{bottom:-25px}.game-stage .sun{left:calc(50% - 38px);top:calc(50% - 38px);animation:sun-glow 4s ease-in-out infinite}.gift-stage~.secondary[hidden]{display:none}
@media(max-height:740px){.camp{min-height:315px}.camp .sleeping{width:360px;height:420px;left:calc(50% - 180px);bottom:-55px}}

html{overflow-x:clip}.camp .sleeping{bottom:-110px}@media(max-height:740px){.camp .sleeping{bottom:-85px}}

.camp .sleeping{width:305px;height:357px;left:calc(50% - 152.5px);bottom:-75px}@media(max-height:740px){.camp .sleeping{width:252px;height:294px;left:calc(50% - 126px);bottom:-55px}}

.card{justify-content:center;text-align:center}.card[aria-disabled=true]{flex-direction:column;align-items:center}.restart{display:block;margin:12px auto 0;letter-spacing:normal;font-size:12px}

/* New opening scene and story beats. */
.intro-body .shade{background:linear-gradient(#06112b33,#07132b18 40%,#07101f55 75%,#07101fb0)}
.intro-body .landscape{background-position:center center;transform:none}.intro-body .landscape.visible{animation:none}
.intro-body header,.intro-body footer{visibility:hidden}
#scene.intro{padding:15vh 12px 16vh;justify-content:flex-start;min-height:calc(100dvh - 92px)}
.intro .tag,.intro .hint{display:none}
.intro h1{color:#fff1d7}
.intro .description{white-space:pre-line}
.intro-ornament{color:#ffdb91;font-size:28px;letter-spacing:12px;margin-top:24px;text-shadow:0 0 14px #ffce71}
.intro-spacer{flex:1;min-height:24px}
.camp .sleeping{opacity:.42;filter:brightness(.55) drop-shadow(0 0 7px #ff712c);animation:weak-flame 4s ease-in-out infinite}
.camp .embers{height:18%;bottom:-10px;background:radial-gradient(ellipse,#fa6b2599 0%,#ac271459 32%,transparent 72%);box-shadow:0 0 25px #f9542233;animation:ember-glow 2.7s ease-in-out infinite}
.camp .smoke{position:absolute;left:41%;bottom:20%;width:18%;height:50%;background:radial-gradient(ellipse at 40% 80%,#bbc3d12e,transparent 45%),radial-gradient(ellipse at 70% 42%,#b6c3d21e,transparent 48%);filter:blur(8px);animation:smoke-rise 6s ease-in-out infinite;pointer-events:none}
.notice:before{content:"";position:absolute;inset:10% 0 0;background:radial-gradient(ellipse at 77% 17%,#ffe7a100 0%,#ffc77300 12%,#ffc4654a 28%,transparent 62%);opacity:0;animation:first-rays 3s ease forwards;pointer-events:none}
.notice .sun{opacity:0;animation:gradual-sun 3.4s ease-out forwards,float 4s 3.4s ease-in-out infinite}
.notice .flame{animation:notice-light 3.5s ease both}
.flight .flame{animation:climb-to-sun 4.5s ease-in-out infinite}
.spiral-line path{stroke-width:1.2;stroke-dasharray:2 1.5;opacity:.95;filter:drop-shadow(0 0 5px #ffcc6e)}
.player img{filter:brightness(var(--brightness,.75)) drop-shadow(0 0 13px #ffbc6a);transition:filter .35s ease}
.touch .flame{animation:touch-sun 2.1s ease-out forwards}
.touch .sun{animation:touch-sun-glow 2.4s ease forwards}
.gift-stage:before,.gift-stage:after{content:"";position:absolute;width:53%;height:28%;bottom:8%;border-radius:50%;background:radial-gradient(ellipse,#c9d8f37a,transparent 70%);filter:blur(10px);pointer-events:none}
.gift-stage:before{left:-8%}.gift-stage:after{right:-8%}
.gift-button{z-index:1}.gift-stage .aura{background:radial-gradient(circle at center,#fffbd888,#ffce6129 38%,transparent 72%),repeating-conic-gradient(from 0deg,#ffe49b00 0deg 12deg,#ffe49b4d 13deg 15deg,#ffe49b00 17deg 30deg);animation:gift-flash 2s ease-out both,aura-turn 35s 2s linear infinite}
.ending .heart-stage{overflow:hidden}.city-lights{position:absolute;inset:42% 0 2%;background:radial-gradient(circle at 10% 78%,#ffcf6e 0 2px,transparent 3px),radial-gradient(circle at 25% 68%,#ffcf6e 0 2px,transparent 3px),radial-gradient(circle at 40% 82%,#ffcf6e 0 3px,transparent 4px),radial-gradient(circle at 56% 70%,#ffcf6e 0 2px,transparent 3px),radial-gradient(circle at 71% 84%,#ffcf6e 0 2px,transparent 3px),radial-gradient(circle at 87% 69%,#ffcf6e 0 3px,transparent 4px);background-size:80px 65px;opacity:0;animation:city-ignite 5.5s ease-in forwards;filter:drop-shadow(0 0 7px #ffd476)}
.final-flame{position:absolute;width:110px;height:130px;object-fit:contain;z-index:2;filter:drop-shadow(0 0 18px #ffc35b);animation:final-flight 7s ease-in-out infinite}
body[data-scene="7"] .shade:after{content:"";position:absolute;inset:0;background:#020a1cbd;animation:city-reveal 6s ease-in-out forwards}
@keyframes weak-flame{50%{opacity:.33;transform:scale(.9) translateY(5px)}}
@keyframes ember-glow{50%{opacity:.52;filter:brightness(.7)}}
@keyframes smoke-rise{0%{opacity:.25;transform:translate(0,16px) scale(.8)}50%{opacity:.58;transform:translate(12px,-15px) scale(1.1)}100%{opacity:0;transform:translate(-7px,-55px) scale(1.3)}}
@keyframes first-rays{0%,20%{opacity:0}80%,100%{opacity:1}}
@keyframes gradual-sun{0%,22%{opacity:0;transform:translate(16px,40px) scale(.72)}60%{opacity:.45}100%{opacity:1;transform:none}}
@keyframes notice-light{0%,55%{filter:brightness(.55) drop-shadow(0 0 8px #ffad51);transform:rotate(-8deg)}100%{filter:brightness(1.2) drop-shadow(0 0 22px #ffce78);transform:rotate(8deg)}}
@keyframes climb-to-sun{0%,100%{transform:translate(0,0) rotate(-8deg) scale(.9)}60%{transform:translate(140px,-160px) rotate(12deg) scale(1.15)}}
@keyframes touch-sun{0%{transform:translate(-50px,70px);opacity:.7}68%{transform:translate(52px,-48px);opacity:1}100%{transform:translate(59px,-54px) scale(1.14)}}
@keyframes touch-sun-glow{0%,65%{filter:drop-shadow(0 0 20px #ffe28c)}100%{filter:drop-shadow(0 0 65px #fff6b8) brightness(1.3)}}
@keyframes gift-flash{0%{opacity:1;filter:brightness(3)}100%{opacity:.7;filter:brightness(1)}}
@keyframes city-ignite{0%,15%{opacity:0}100%{opacity:1}}
@keyframes final-flight{0%{left:-30%;top:76%;transform:rotate(-22deg) scale(.65)}50%{left:38%;top:34%;transform:rotate(4deg) scale(1)}100%{left:118%;top:-25%;transform:rotate(20deg) scale(1.1)}}
@keyframes city-reveal{0%{clip-path:inset(0 0 0 0)}100%{clip-path:inset(0 0 0 100%)}}
@media(max-height:740px){#scene.intro{padding-top:10vh;padding-bottom:7vh}}
@media(prefers-reduced-motion:reduce){.city-lights{opacity:1}.final-flame{left:64%;top:20%}.notice .sun{opacity:1}.camp .smoke{opacity:.3}body[data-scene="7"] .shade:after{display:none}}
