/* Layer order: world decorations, interactive stickers, dogs, HUD, native dialog. */
:root{--stage-ink:#72374b;--stage-rose:#b64068;--stage-paper:#ffedd9}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.illustrated-dialog{width:min(1280px,calc(100vw - 24px));border:0;border-radius:18px 8px 20px 12px;background:#f8c8cc;box-shadow:0 30px 90px #43253366;max-height:calc(100dvh - 24px)}
.illustrated-dialog .dialog-close{position:absolute;right:8px;top:8px;margin:0;background:#fce2db;border-color:#a45970;color:#783449;z-index:10}
.art-screen{position:relative;aspect-ratio:16/9;isolation:isolate;overflow:hidden;min-height:0}
.screen-art{display:block;width:100%;height:100%;object-fit:fill}
.screen-actions{position:absolute;bottom:3%;left:10%;right:10%;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:10px 20px;text-align:center;z-index:4}
.screen-actions p{flex-basis:100%;margin:0;font-size:clamp(16px,1.8vw,24px);color:#582c40;text-shadow:0 1px 3px #ffecc9,0 0 8px #ffecc9}
.ink-button{background:#fbe4c9;border:2px solid #9e5466;border-radius:47% 8% 43% 10% / 12% 40% 13% 42%;min-height:46px;padding:9px 22px;color:#702e47;box-shadow:3px 5px 0 #a952692e;font:400 23px var(--hand);cursor:pointer;transition:transform .2s,box-shadow .2s}
.ink-button:hover{transform:translateY(-4px) rotate(-1deg);box-shadow:5px 9px 0 #a9526930}.ink-button:active{transform:translateY(1px)}
.ink-button:disabled{opacity:.5;cursor:wait}.ink-button:focus-visible,.archive-choice:focus-visible,.memory-frame:focus-visible{outline:3px solid #72374b;outline-offset:5px}
.start-screen .screen-actions{bottom:2%;gap:3px}.start-screen .ink-button{background:#ffe8c9ed;font-size:clamp(21px,2.4vw,32px);padding:10px 34px}.start-screen .screen-actions p{font-size:17px}
.scene-heading{position:absolute;z-index:3;top:17%;left:22%;right:22%;text-align:center;margin:0;color:#763c4a;font:400 clamp(20px,2.8vw,36px) var(--hand);text-shadow:0 1px 4px #ffecc9}
.childhood-screen .scene-heading{top:19%;color:#603044}.memory-frame{position:absolute;left:40%;top:34%;width:20%;height:38%;background:#ffdb8933;border:8px ridge #c68860;transform:rotate(-4deg);cursor:pointer;box-shadow:8px 12px 0 #452a4033;overflow:visible}
.frame-camera{position:absolute;left:14%;right:14%;top:22%;bottom:22%;display:block!important;background:#7f897f;border:4px solid #4c4541;border-radius:9px;box-shadow:inset 0 -10px #63746e,7px 9px #4c343433;transform:rotate(2deg)}.frame-camera:before{content:'';position:absolute;left:17%;top:-17%;width:38%;height:22%;background:#a79778;border:4px solid #4c4541;border-bottom:0;border-radius:6px 6px 0 0}.frame-camera i{position:absolute;width:42%;aspect-ratio:1;left:29%;top:22%;border:8px double #4c4541;border-radius:50%;background:#9eb5b1;box-shadow:inset 0 0 0 8px #d3c594}.frame-camera b{position:absolute;right:8%;top:9%;width:13%;aspect-ratio:1;border-radius:50%;background:#e7cf83;border:2px solid #4c4541}
.film-projector{position:absolute;left:17%;right:17%;top:35%;height:45%;display:block!important;background:#677c77;border:4px solid #4b4543;border-radius:8px;box-shadow:7px 9px #4c343433}.film-projector:after{content:'';position:absolute;right:-27%;top:28%;border-left:38px solid #9d8265;border-top:19px solid transparent;border-bottom:19px solid transparent}.film-projector i,.film-projector b{position:absolute;top:-58%;width:48%;aspect-ratio:1;border:7px double #514946;border-radius:50%;background:repeating-conic-gradient(#d7c698 0 12deg,#647a76 13deg 27deg)}.film-projector i{left:-5%}.film-projector b{right:-5%}.film-projector em{position:absolute;left:43%;bottom:-30%;width:14%;height:32%;background:#78644f;transform:skew(-8deg)}.pets-emerge .film-projector i,.pets-emerge .film-projector b{animation:reel-spin 1.1s linear infinite}@keyframes reel-spin{to{rotate:360deg}}
.memory-frame span{position:absolute;left:-45%;right:-45%;top:100%;font-size:clamp(16px,1.8vw,24px);color:#542a39;text-shadow:0 0 4px #ffda75}.camera-keepsake{position:absolute;left:7%;bottom:17%;font-size:clamp(16px,1.6vw,23px);max-width:28%}
.childhood-screen .screen-actions p{color:#ffefc2;text-shadow:0 1px 3px #352631}.pets-emerge .frame-camera{animation:camera-wake .7s both}.pets-emerge .memory-frame>span:last-child{opacity:0}@keyframes camera-wake{50%{transform:translateY(-13px) rotate(-4deg) scale(1.08)}to{transform:rotate(2deg)}}
@keyframes emerge-from-frame{0%{transform:scale(.85)}45%{transform:translate(15%,30%) scale(1.35) rotate(5deg)}100%{transform:translate(110%,70%) scale(1.2) rotate(0)}}
.illustrated-finale{padding:0;background:none;min-height:0}.finale-screen .scene-heading{top:29%;left:27%;right:27%;font-size:clamp(17px,2.3vw,30px)}
.finale-screen .screen-actions{bottom:1.5%;left:24%;right:24%;gap:0}.finale-screen .screen-actions p{font-size:clamp(14px,1.5vw,20px)}.finale-screen .ink-button{font-size:20px;padding:3px 18px;min-height:40px}
.finale-screen .candle-target{position:absolute;left:39%;top:48%;width:23%;height:33%;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:none;cursor:pointer}
.stage-match{position:absolute;left:72%;top:68%;width:19%;height:9%;transform:rotate(-38deg);z-index:6;margin:0}.stage-match:before{width:90%;height:10px;background:#e9be88;border:2px solid #9a6041;border-radius:4px}.stage-match span{left:7%;top:50%;margin-top:-17px;background:#8d4e3a;border:2px solid #743d33;width:28px;height:33px}
.stage-match.is-burning span{background:#ffdb79;box-shadow:0 0 18px #ff923a,0 -7px 0 #fff2a4}.strike-target{position:absolute;left:7%;top:69%;width:21%;height:19%;background:none;border:0;cursor:pointer;z-index:3}.strike-target:hover{outline:3px dashed #873d48;outline-offset:-12px}
.birthday-flame{position:absolute;width:1.15%;height:4.4%;border-radius:65% 40% 65% 40%;background:#fff4ab;box-shadow:0 0 6px 3px #ffbb58,0 0 32px 10px #ffdb7880;transform:translate(-50%,-100%);animation:candle-flicker 1.2s ease-in-out infinite alternate;pointer-events:none;z-index:2}
.finale-screen{filter:drop-shadow(0 18px 22px #60384935)}.cake-runner{position:absolute;z-index:5;width:16%;height:19%;object-fit:contain;bottom:9%;left:30%;filter:drop-shadow(6px 9px 2px #543b413f);animation:run-around-cake 5.4s linear infinite}.cake-runner-b{animation-delay:-2.7s;scale:.82}@keyframes run-around-cake{0%{left:24%;translate:0 0;scale:.8}44%{z-index:5}50%{left:66%;translate:0 -8%;scale:.95}51%{z-index:1;transform:scaleX(-1)}100%{left:24%;translate:0 0;scale:.8;transform:scaleX(-1)}}.copyright-note{position:absolute;left:7%;right:7%;bottom:1.5%;z-index:6;text-align:center;margin:0;color:#704052;font:18px var(--hand);text-shadow:1px 2px #fff0de,2px 3px #fff0de}.thanks-screen .screen-actions{bottom:7%}
@keyframes candle-flicker{to{transform:translate(-50%,-100%) rotate(8deg) scale(.88,1.1)}}
.illustrated-finale .notes-wall{margin:0;padding:30px;background:#c39575;border:0}.illustrated-finale .notes-wall h3{font-size:28px}.illustrated-finale .notes-wall>.ink-button{display:block;margin:24px auto 0}
.photo-workroom{background:#f8d7d9}.photo-artboard{position:relative;aspect-ratio:16/9}.archive-choices{position:absolute;z-index:8;left:6.4%;top:16%;width:18%;height:72.5%;display:flex;flex-direction:column;gap:10px;overflow-y:auto;overscroll-behavior:contain;scroll-snap-type:y mandatory;padding:4px 10px}.archive-choice{border:0;background:transparent;cursor:pointer;padding:4%;min-height:46%;flex:0 0 46%;scroll-snap-align:center;transition:transform .2s;transform:rotate(-1deg)}.archive-choice:nth-child(even){transform:rotate(1deg)}.archive-choice img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(4px 7px 1px #a64c6533)}.archive-choice:hover,.archive-choice[aria-pressed=true]{transform:translateY(-4px) rotate(-3deg);outline:3px dashed #b83f68;outline-offset:-6px}
.portrait-composition{position:absolute;left:30%;top:21%;width:62%;height:55%;overflow:hidden;display:flex;justify-content:center;align-items:flex-end;gap:3%}.portrait-composition>img:not([hidden]){width:43%;height:90%;object-fit:contain;filter:drop-shadow(6px 10px 2px #86506733)}.portrait-composition>img.user-portrait{object-fit:contain;height:70%;z-index:2}.portrait-composition>img.movable-sticker{position:absolute;z-index:5;right:8%;bottom:0;width:42%;height:88%;touch-action:none;cursor:grab;user-select:none}.portrait-composition>img.movable-sticker:active{cursor:grabbing}.portrait-composition>img.movable-sticker:focus-visible{outline:3px dashed #b83f68;outline-offset:-4px}.portrait-composition>img.hug-result{position:absolute;z-index:7;inset:0;width:100%;height:100%;object-fit:contain;filter:none}.camera-preview{position:absolute;z-index:1;inset:0;width:100%;height:100%;object-fit:cover;background:#714958}.shutter{position:absolute;z-index:9;left:64.4%;top:79%;width:8%;height:13%;border:0;border-radius:50%;background:transparent;cursor:pointer}.shutter:hover{box-shadow:0 0 0 4px #963b68}.sticker-nudges{display:flex;justify-content:center;gap:8px;padding-top:8px}.sticker-nudges button{width:44px;height:44px;border:1px solid #9c5b70;background:#ffe5d9;color:#73354c;font-size:22px;border-radius:45%}
.booth-controls{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;padding:16px 24px 5px}.booth-controls .ink-button{font-size:21px;padding:8px 14px}.booth-controls input[type=file]{display:none}.pose-label{display:flex;align-items:center;gap:8px;font-size:19px;color:#71334b}.pose-label select{font:inherit;max-width:180px;background:#ffe7d5;border:1px solid #a76578;padding:10px;color:inherit}.primary-ink{background:#a13e5a;color:#fff0dc}.booth-status{margin:0;padding:12px 28px 22px;text-align:center;font-size:19px;color:#693347}.photo-workroom[aria-busy=true] .portrait-composition:after{content:'正在绘制手绘拥抱…';position:absolute;inset:0;display:grid;place-items:center;color:#71334b;background:#ffe6dccc;font-size:28px}.photo-workroom[aria-busy=true] .booth-controls>*:not(#generateHug){pointer-events:none;opacity:.5}
.bedtime-quote{position:absolute;width:390px;height:160px;z-index:38;border:0;background:none;color:#784756;font:400 21px var(--hand);text-shadow:3px 5px 2px #77684944;cursor:pointer;transition:transform .4s;pointer-events:auto}.bedtime-quote span{position:absolute;left:50%;bottom:8px;transform-origin:0 135px;transform:rotate(calc((var(--i) - 13) * 3.6deg)) translateY(-132px);white-space:pre}.bedtime-quote.text-lifted{transform:translateY(-20px) rotate(3deg) scale(1.14)}
.chapter-stops{position:absolute;inset:-20px -20px auto;display:flex;justify-content:space-between}.chapter-stops button{font-size:15px!important;border:0!important;min-width:0!important;width:auto!important;height:44px!important;white-space:nowrap;padding:0 5px!important;background:transparent!important}.chapter-stops button:before{content:'◇';display:block;line-height:12px;color:#9a6347}.journey-track{margin-bottom:22px}
@media(max-width:650px){.illustrated-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);border-radius:12px}.illustrated-dialog .dialog-close{width:40px;height:40px;font-size:24px;right:0;top:0}.art-screen{aspect-ratio:auto;height:70dvh;min-height:430px}.art-screen>.screen-art{object-fit:cover;object-position:center}.start-screen>.screen-art{object-fit:contain;background:#f7c5cc}.start-screen .screen-actions{bottom:10%;left:4%;right:4%}.start-screen .ink-button{font-size:22px}.childhood-screen>.screen-art{object-fit:fill}.scene-heading{top:20%;left:14%;right:14%;font-size:26px}.memory-frame{left:32%;width:36%;height:26%;top:35%;border-width:5px}.camera-keepsake{left:9%;bottom:23%;max-width:80%;font-size:19px}.screen-actions{left:5%;right:5%;bottom:5%}.screen-actions p{font-size:18px}.finale-screen{height:auto;min-height:0;aspect-ratio:16/9;margin-bottom:115px}.finale-screen>.screen-art{object-fit:fill}.finale-screen .scene-heading{top:24%;left:24%;right:24%;font-size:16px}.finale-screen .screen-actions{top:100%;bottom:auto;left:6%;right:6%;padding:14px 0}.finale-screen .screen-actions p{font-size:17px}.finale-screen{overflow:visible}.stage-match:before{height:5px;border-width:1px}.stage-match span{width:15px;height:18px;margin-top:-9px}.photo-artboard{min-height:0}.photo-workroom .dialog-close{background:#ffeddd}.archive-choices{left:4%;width:22%}.portrait-composition{left:28%;width:64%;height:54%}.booth-controls{padding:12px 10px;gap:8px}.booth-controls .ink-button{font-size:19px;min-height:46px}.booth-status{font-size:18px;padding:8px 18px 24px}.illustrated-finale .notes-wall{padding:18px}.illustrated-finale .notes-wall h3{font-size:23px}.chapter-stops button{font-size:11px!important;padding:0 1px!important}.title-mark strong{font-size:21px}.thanks-screen>.screen-art{object-fit:contain;background:#edbba9}.thanks-screen .screen-actions{bottom:9%}.bedtime-quote{font-size:18px;width:300px}}
@media(prefers-reduced-motion:reduce){.pets-emerge .frame-camera{animation:none}.birthday-flame{animation:none}.ink-button,.bedtime-quote,.archive-choice{transition:none}}
.illustrated-finale .scene-heading{font-family:var(--hand);font-weight:400;line-height:1.3}
.dimensional-title,.place-title,.title-mark{transform-style:preserve-3d;filter:drop-shadow(5px 8px 1px #553c4a38)}.dimensional-title{text-shadow:1px 1px #f7d6aa,3px 4px #a96d76,6px 8px 2px #4d324033}.memory-book-link{display:block;width:max-content;max-width:100%;margin:20px auto;text-decoration:none;background:#a9586d;color:#fff4de!important;box-shadow:5px 7px #60394a55}
.title-mark strong,.place-title strong{font-family:var(--hand)}
.chapter-stops button[aria-current=step]{color:#92354c;text-shadow:1px 2px #f5dc9b;transform:translateY(-5px)}
.chapter-stops button[aria-current=step]:before{content:'◆'}
@media(max-width:650px){.childhood-screen{height:auto;min-height:0;aspect-ratio:16/9;margin-bottom:195px;overflow:visible}.childhood-screen>.screen-art{object-fit:contain}.childhood-screen .scene-heading{top:20%;font-size:19px}.childhood-screen .memory-frame{left:40%;top:35%;width:20%;height:38%;border-width:3px}.childhood-screen .memory-frame span{display:none}.childhood-screen .camera-keepsake{top:105%;bottom:auto;left:5%;max-width:90%;width:90%}.childhood-screen .screen-actions{top:135%;bottom:auto;left:5%;right:5%}.childhood-screen .screen-actions p{color:#582c40;text-shadow:none}.childhood-screen .ink-button{font-size:21px}.chapter-stops{inset:-20px -5px auto}.chapter-stops button{writing-mode:vertical-rl;height:55px!important}.journey-track{margin-bottom:30px}}
