:root{color-scheme:light;--bg:#eff8f3;--ink:#183c2d;--green:#247a5b;--yellow:#ffe69b;--line:#d6e8dd;--muted:#496657;font-family:"Noto Sans KR","Malgun Gothic",system-ui,sans-serif;color:var(--ink);background:var(--bg);line-height:1.6}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 50% 20%,#fbfdf7 0%,transparent 58%)}button{font:inherit;color:inherit;cursor:pointer;min-height:48px;border-radius:14px;border:1px solid transparent;font-weight:700}button:disabled{cursor:default;opacity:.55}button:focus-visible{outline:3px solid #254a39;outline-offset:3px}h1:focus{outline:none}h1,h2,p{margin:0}h1{font-size:clamp(24px,4vw,32px);line-height:1.3;letter-spacing:-.045em}p{color:var(--muted)}small{font-size:14px;color:var(--muted)}
.mast{text-align:center;padding:24px 16px 20px;background:#ffffffc9;border-bottom:1px solid var(--line)}.brand{font-size:22px;letter-spacing:-.045em;font-weight:900}.brand span{display:inline-grid;place-items:center;background:#d9efe2;color:var(--green);width:32px;height:32px;border-radius:12px;margin-right:4px}.mast p{font-size:14px;margin-top:4px}
main{max-width:928px;margin:auto;padding:24px 24px 48px}.steps{display:flex;justify-content:center;gap:8px;list-style:none;margin:0 0 24px;padding:0}.steps li{display:flex;align-items:center;gap:6px;padding:6px 10px;font-size:14px;color:var(--muted);border-radius:12px;white-space:nowrap}.steps b{display:grid;place-items:center;background:#deeee5;border-radius:50%;width:23px;height:23px;font-size:12px}.steps .current{background:#d9efe2;color:#14543b;font-weight:800}.steps .current b{color:#fff;background:var(--green)}
.intro{text-align:center;margin:0 0 24px}.eyebrow{display:inline-block;color:#226b50;font-weight:800;font-size:14px;margin-bottom:8px}.intro p{margin-top:8px}.pet-list{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.pet-option{display:grid;justify-items:center;gap:4px;padding:12px 12px 16px;background:#fff;border-color:var(--line);box-shadow:0 6px 20px #1a4e3010}.pet-option strong{font-size:18px}.pet-option .pet{width:100%;max-width:220px}.pet{position:relative;display:grid;place-items:center;aspect-ratio:1/1;isolation:isolate;border-radius:14px;background:radial-gradient(circle,#fff 6%,var(--pet-color) 100%);overflow:hidden}.pet span{font-size:clamp(48px,13vw,120px);filter:drop-shadow(0 12px 9px #3a291d30)}.pet.grown span{transform:scale(1.15)}.pet::before{content:"";position:absolute;inset:0;background-image:url('pets.png');background-size:300% 200%;background-position:var(--col,0%) 0%;z-index:1}.pet-1{--col:50%}.pet-2{--col:100%}.pet.grown::before{background-position:var(--col,0%) 100%}.has-art .pet span{visibility:hidden}
.actions{display:grid;gap:8px;margin:20px auto 0;max-width:440px}.actions button{padding:10px 14px}.primary{background:var(--green);color:#fff;box-shadow:0 4px 0 #14513a24}.primary:hover:not(:disabled){background:#196247}.secondary{background:#fff;border-color:#a8cab7}.text-button{background:transparent;color:#22664c}.picked{border-color:var(--green)!important;box-shadow:0 0 0 2px var(--green);background:#f4fbf7}.home-grid{display:grid;grid-template-columns:1.12fr 1fr;gap:16px;align-items:start}.stage,.panel{border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 10px 32px #1c513011;padding:20px}.stage{background:linear-gradient(#e0f2e7,#f8fcf8);display:grid;justify-items:center;gap:12px}.stage .pet{width:min(100%,275px)}.stage-top,.quiz-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%}.tag{font-size:14px;background:#e5f4eb;border-radius:12px;padding:4px 10px;font-weight:700}.tag.food{background:#fff4ce}.speech{background:#fff;padding:8px 12px;border-radius:12px;text-align:center;font-size:14px}.home-grid .intro{text-align:left;margin-bottom:16px}.xp{display:grid;gap:8px;margin-bottom:12px}.xp div{display:flex;justify-content:space-between;gap:8px}progress{width:100%;height:14px;appearance:none;border:0;border-radius:14px;overflow:hidden;background:#e3efe8}progress::-webkit-progress-bar{background:#e3efe8}progress::-webkit-progress-value{background:var(--green)}progress::-moz-progress-bar{background:var(--green)}.done{background:#fff1bd;border-radius:12px;padding:12px;font-weight:800;margin-bottom:12px}
.subject-list{display:grid;gap:10px;max-width:540px;margin:auto}.subject{display:grid;grid-template-columns:auto 1fr auto;align-items:center;text-align:left;gap:12px;padding:12px 16px;background:#fff;border-color:var(--line)}.subject:hover,.option:hover:not(:disabled){background:#edf9f1}.subject strong,.subject small{display:block}.subject-icon{display:grid;place-items:center;width:44px;height:44px;background:#e6f4ec;border-radius:12px;font-size:22px}.quiz,.result{max-width:620px;margin:auto}.quiz .intro{text-align:left;margin:16px 0}.quiz h1{font-size:clamp(24px,4vw,28px)}.options{display:grid;gap:10px}.option{display:flex;align-items:center;gap:10px;text-align:left;padding:10px 14px;background:#fff;border-color:var(--line)}.option span{background:#e7f4ec;border-radius:8px;min-width:26px;text-align:center}.option.picked:disabled{opacity:1}.notice{display:flex;align-items:center;gap:10px;margin-top:16px;padding:12px;border-radius:12px}.notice>span{font-size:24px}.notice p{font-size:14px;margin-top:3px}.wrong{background:#fff3cf}.right{background:#e3f5e8}.result{text-align:center;background:radial-gradient(ellipse at 50% 45%,#fff3c9,#fff 70%)}.result .pet{width:min(100%,300px);margin:auto}.result .pet::after{content:"";position:absolute;inset:0;background:#fff9d6;opacity:0;z-index:2}.transform .pet::after{animation:glow 1s ease both}.transform .pet{animation:pop 1s ease both}.fed .pet{animation:bounce .46s ease both}.storage{margin:16px auto;text-align:center;font-size:14px}dialog{max-width:min(440px,calc(100% - 32px));padding:24px;color:var(--ink);border:1px solid var(--line);border-radius:16px}dialog::backdrop{background:#183c2d66}dialog p{margin-top:8px}
@keyframes glow{0%{opacity:1}35%{opacity:.85}100%{opacity:0}}@keyframes pop{0%{transform:scale(.82)}65%{transform:scale(1.05)}100%{transform:scale(1)}}@keyframes bounce{50%{transform:translateY(-10px) scale(1.04)}}
@media(max-width:600px){main{padding:16px 16px 32px}.mast{padding:16px}.steps{gap:2px;margin-bottom:16px}.steps li{font-size:11px;padding:5px 4px;gap:3px}.steps b{width:17px;height:17px;font-size:10px}.pet-list,.home-grid{grid-template-columns:1fr;gap:10px}.pet-option{grid-template-columns:88px 1fr;grid-template-rows:1fr 1fr;text-align:left;justify-items:start;column-gap:14px;padding:8px 12px}.pet-option .pet{grid-row:span 2}.pet-option strong{align-self:end}.pet-option small{align-self:start}.stage,.panel{padding:16px}.stage .pet{width:min(100%,180px)}.stage{gap:8px}.intro{margin-bottom:16px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;scroll-behavior:auto!important}}
.has-art .pet{background:#eaf5f0}.has-art .pet::before{inset:0 16.666%;background-size:300% 200%}.result.transform .pet::before{animation:swap 1s step-end both}@keyframes swap{0%{background-position:var(--col,0%) 0%}40%,100%{background-position:var(--col,0%) 100%}}
@media(prefers-reduced-motion:reduce){.result.transform .pet::before{animation:none}}
.sad-pet{position:relative;flex:0 0 56px}.sad-pet .pet{width:56px;filter:saturate(.76);transform:rotate(-8deg)}.sad-pet .pet span{font-size:28px}.sad-pet>span{position:absolute;right:-2px;bottom:-3px;font-size:15px}

/* The same habitat frames the first meeting, care, and evolution. */
:root{--bg:#eff8f3;--ink:#183c2d;--green:#247a5b;--line:#d9e9de}
body{background:linear-gradient(165deg,#fbfcf5,var(--bg) 54%,#e2f1e7);min-height:100svh}
.mast{background:transparent;border:0;padding:18px 16px 8px}.brand{font-size:19px}.brand span{background:#dceee2;width:27px;height:27px;border-radius:9px}.mast p{display:none}
main{width:min(100%,560px);padding:20px 20px 36px}.intro{margin-bottom:16px}.intro p{font-size:15px}.eyebrow{font-size:14px;letter-spacing:.08em}
.home-grid{display:block}.stage,.portrait-select,.reveal-stage{position:relative;isolation:isolate;overflow:hidden;border-radius:16px;background:#eaf5ed;border:1px solid #d8e9d9;display:grid;justify-items:center}
.habitat{position:absolute;inset:0;z-index:-1;background:radial-gradient(ellipse at 51% 60%,#fff9de 0%,#eaf5ed 49%,transparent 71%),linear-gradient(155deg,#f3f9f1,#cce7d6)}
.habitat::before,.habitat::after{content:"";position:absolute;inset:auto -10% -54% -10%;height:80%;background:#d6ead6;border-radius:50%;transform:rotate(-12deg)}.habitat::after{inset:auto -15% -65% -10%;background:#d9ebd9;transform:rotate(13deg)}
.portrait-select{min-height:210px;padding:8px 12px}.portrait-label{position:absolute;bottom:8px;left:12px;background:#ffffffdb;border-radius:9px;padding:2px 10px;font-size:14px;font-weight:750}
.portrait-select .pet,.stage .pet,.result .pet{width:min(100%,240px);height:auto;aspect-ratio:1.1;background:transparent;overflow:visible}
.portrait-select .pet,.stage .pet,.result .pet{mask-image:radial-gradient(ellipse closest-side,#000 79%,#000d 89%,transparent 100%)}
.has-art .pet::before{inset:0 20%;mix-blend-mode:multiply}
.pet-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}.pet-option{display:grid;grid-template-columns:none;grid-template-rows:none;justify-items:center;text-align:center;padding:8px 2px;gap:0;min-width:0;box-shadow:none}.pet-option strong{font-size:15px}.pet-option small{font-size:13px}.choice-icon{font-size:22px}.pet-option.picked{background:#f7fcf8}
.actions{margin-top:14px;max-width:none}.primary{min-height:52px;border-radius:14px;background:#247a5b;box-shadow:0 4px 0 #164d3922}.text-button{min-height:44px}
.stage{gap:0;padding:12px;box-shadow:none}.stage-top{position:absolute;inset:10px 10px auto;width:auto;z-index:3}.tag{background:#ffffffde;font-size:14px}.tag.food{background:#fff0bc}.speech{z-index:3;padding:5px 10px;background:#ffffffdf;min-height:32px;margin-top:-7px}
.home-grid .panel{border-radius:16px;margin-top:12px;padding:14px 16px;box-shadow:0 6px 24px #143e2510}.home-grid .intro{margin-bottom:10px}.home-grid .eyebrow{display:none}.home-grid h1{font-size:25px}.home-grid p{font-size:15px}.xp{margin-bottom:8px}.xp div{font-size:14px}.xp progress{height:9px}
.quiz,.result{padding:16px}.quiz h1{font-size:clamp(22px,5.8vw,27px)}.quiz .intro{margin:12px 0}.quiz .eyebrow{display:none}.quiz .option{min-height:48px}.result{background:#fff}.reveal-stage{min-height:224px}.result .pet{width:min(100%,270px)}
.lion-cel{display:none}
.has-lion .pet-0::before{display:none}.has-lion .pet-0 span{visibility:hidden}
.has-lion .pet-0 .lion-cel{display:block;position:absolute;inset:0 20%;background-image:url('lion.png');background-size:300% 200%;background-position:var(--x,0%) var(--y,0%);opacity:0;mix-blend-mode:multiply;pointer-events:none}
.lion-cel.blink{--x:50%}.lion-cel.perk{--x:100%}.lion-cel.sad{--y:100%}.lion-cel.chew{--x:50%;--y:100%}.lion-cel.adult{--x:100%;--y:100%}
.has-lion .pet-0 .lion-cel.open,.has-lion .pet-0.grown .lion-cel.adult{opacity:1}
.has-lion .pet-0.grown .lion-cel.open,.has-lion .pet-0.pose-sad .lion-cel.open{opacity:0}
.has-lion .pet-0.pose-sad .lion-cel.sad{opacity:1}
.has-lion .pet-0.pose-idle:not(.grown) .lion-cel.open{animation:open-eyes 8.1s step-end infinite,breath 3.9s ease-in-out infinite}
.has-lion .pet-0.pose-idle:not(.grown) .lion-cel.blink{animation:blink-eyes 8.1s step-end infinite,breath 3.9s ease-in-out infinite}
.has-lion .pet-0.pose-idle:not(.grown) .lion-cel.perk{animation:perk-up 8.1s step-end infinite,breath 3.9s ease-in-out infinite}
.has-lion .pet-0.grown.pose-idle .lion-cel.adult{animation:breath 4.5s ease-in-out infinite}
.lion-cel{transform-origin:50% 82%}
.has-lion .pet-0.pose-feeding:not(.grown) .lion-cel.chew{animation:chew 1.15s step-end both,breath .34s ease-in-out 3}
.has-lion .pet-0.pose-feeding:not(.grown) .lion-cel.open{animation:feed-open 1.15s step-end both}
.has-lion .stage.fed .pet-0{animation:none}.meal-fx{position:absolute;left:29%;top:37%;z-index:4;pointer-events:none;animation:snack .86s ease-in both}
.has-lion .result.transform .pet-0 .lion-cel.open{animation:before-rise 1.45s step-end both}
.has-lion .result.transform .pet-0 .lion-cel.adult{animation:after-rise 1.45s step-end both}
.result.transform .pet-0{animation:pop 1.45s ease both}
.result.transform .reveal-stage::after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse,#fffbda 12%,#fff7d600 71%);pointer-events:none;animation:flash 1.45s ease both}
@keyframes breath{50%{transform:scale(1.013,1.027)}}@keyframes open-eyes{0%,35%,72%,81%{opacity:1}33%,64%,78%{opacity:0}}@keyframes blink-eyes{0%,35%,81%{opacity:0}33%,78%{opacity:1}}@keyframes perk-up{0%,72%{opacity:0}64%{opacity:1}}@keyframes chew{0%,100%{opacity:0}25%{opacity:1}}@keyframes feed-open{0%,100%{opacity:1}25%{opacity:0}}@keyframes snack{0%{opacity:1;transform:translate(-20px,18px) scale(1.2)}68%{opacity:1}100%{opacity:0;transform:translate(44px,-5px) scale(.35)}}@keyframes before-rise{0%{opacity:1}48%,100%{opacity:0}}@keyframes after-rise{0%{opacity:0}48%,100%{opacity:1}}@keyframes flash{0%,100%{opacity:0}48%{opacity:1}}
@media(max-width:420px){main{padding:12px 14px 24px}.mast{padding-top:12px}.portrait-select .pet,.stage .pet{width:min(100%,218px)}.portrait-select{min-height:192px}.quiz .notice{margin-top:10px}}
@media(prefers-reduced-motion:reduce){.meal-fx{display:none}}
.has-art .pet-1.pose-sad::before,.has-art .pet-2.pose-sad::before{background-image:url('expressions.png');background-size:200% 200%;inset:0 7%;background-position:0 0}
.has-art .pet-1.grown.pose-sad::before{background-position:100% 0}.has-art .pet-2.pose-sad::before{background-position:0 100%}.has-art .pet-2.grown.pose-sad::before{background-position:100% 100%}
.has-lion .pet-0.grown.pose-sad .lion-cel.sad{opacity:0}
.stage .pet,.portrait-select .pet{width:min(100%,280px)}
.result .pet{width:min(100%,300px)}
.stage,.portrait-select,.reveal-stage{background:#e8f2e4}
.habitat{background:linear-gradient(#eff8f329,#e6f1e359),url('grove.png') center 58% / cover,#e8f2e4}
.habitat::before,.habitat::after{display:none}
.stage .pet,.portrait-select .pet,.result .pet{mask-image:radial-gradient(ellipse 49% 55%,#000 66%,#000e 82%,transparent 100%)}
.has-lion .pet-0 .lion-cel{inset:0 19.7%}
.stage .pet::after,.portrait-select .pet::after{content:"";position:absolute;bottom:14%;left:33%;right:33%;height:8%;border-radius:50%;background:#36524038;filter:blur(7px);z-index:-1}
@media(max-width:420px){.stage .pet,.portrait-select .pet{width:min(100%,260px)}}

/* The character picker doubles as the opening scene. */
.opening-page{background:#10231a}.opening-page .mast{display:none}.opening-page main{width:100%;padding:0}
.opening{isolation:isolate;position:relative;display:grid;grid-template-rows:auto minmax(240px,1fr) auto;min-height:100svh;overflow:hidden;color:#fff9e9;background:#10231a}
.opening-art,.opening-shade,.opening-sparks{position:absolute;inset:0;pointer-events:none;z-index:-1}
.opening-art{overflow:hidden;background:radial-gradient(ellipse at 50% 50%,#c2ddb0,#213f2d 52%,#10231a 80%)}
.opening-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 48%;animation:opening-camera 11s ease-in-out infinite alternate}
.opening-art .pet{position:absolute;inset:18% 0 auto;margin:auto;width:min(86vw,440px);aspect-ratio:1;background:transparent;mask-image:radial-gradient(ellipse closest-side,#000 68%,transparent 100%)}
.opening-shade{background:linear-gradient(180deg,#0b1914e8 0%,#0b191474 22%,transparent 42%,transparent 56%,#0b1914ba 78%,#0b1914 100%)}
.opening-copy,.opening-controls{width:min(100%,440px);margin-inline:auto;padding-inline:22px}
.opening-copy{padding-top:clamp(24px,5svh,50px);animation:opening-arrive .55s ease-out both}
.opening-kicker{display:flex;align-items:center;gap:8px;color:#ffe69b;font-weight:800;font-size:14px;letter-spacing:.08em;margin-bottom:10px}
.opening h1{font-size:clamp(34px,8vw,58px);line-height:1.12;letter-spacing:-.065em;text-shadow:0 2px 22px #0b1914}
.opening-guide{margin-top:9px;color:#f4f7ec;font-size:15px;text-shadow:0 1px 10px #0b1914}
.opening-controls{grid-row:3;padding-bottom:max(20px,env(safe-area-inset-bottom));animation:opening-arrive .55s .08s ease-out both}
.opening-caption{display:flex;justify-content:space-between;align-items:center;font-size:14px;color:#eff6eb}.opening-caption b{color:#ffe69b}
.opening .pet-list{margin-top:7px}.opening .pet-option{min-height:52px;display:flex;justify-content:center;align-items:center;gap:6px;color:#f5f8ef;background:#162f25ed;border:1px solid #9ec6a66b;padding:8px 4px;box-shadow:none}
.opening .pet-option.picked{background:#284735;border-color:#ffe69b!important;box-shadow:inset 0 0 0 1px #ffe69b}.opening .choice-icon{font-size:20px}
.opening .actions{margin-top:10px}.opening .primary{position:relative;background:#ffe69b;color:#203a2a;box-shadow:0 5px 24px #ffe69b35}.opening .primary:hover{background:#fff1bb}.opening .primary span{position:absolute;right:16px}.opening .text-button{color:#fff9e9}.opening button:focus-visible{outline-color:#fff}
.opening-sparks i{position:absolute;left:var(--x);top:var(--y);width:5px;height:5px;border-radius:50%;background:#fff0a5;box-shadow:0 0 11px 3px #ffe69b;animation:firefly 4s var(--d) ease-in-out infinite}
.opening-sparks i:nth-child(1){--x:16%;--y:53%;--d:0s}.opening-sparks i:nth-child(2){--x:78%;--y:39%;--d:-1s}.opening-sparks i:nth-child(3){--x:89%;--y:60%;--d:-2s}.opening-sparks i:nth-child(4){--x:30%;--y:66%;--d:-3s}.opening-sparks i:nth-child(5){--x:60%;--y:28%;--d:-1.7s}
@keyframes firefly{0%,100%{opacity:.22;transform:translateY(5px)}55%{opacity:.95;transform:translate(9px,-16px)}}@keyframes opening-camera{from{transform:scale(1)}to{transform:scale(1.045)}}@keyframes opening-arrive{from{opacity:.35;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:760px){.opening{grid-template-columns:minmax(345px,43%) 1fr;grid-template-rows:1fr 1fr;min-height:100svh;align-content:center}.opening-art img{left:42%;width:58%;object-position:center 53%}.opening-art .pet{left:42%;right:0;top:50%;transform:translateY(-50%);width:min(53vw,570px)}.opening-shade{background:linear-gradient(90deg,#10231a 34%,#10231a77 55%,transparent 72%),linear-gradient(0deg,#10231a 0%,transparent 22%)}.opening-copy{grid-column:1;grid-row:1;align-self:end;padding-bottom:26px}.opening-controls{grid-column:1;grid-row:2;align-self:start}.opening-sparks{left:38%}}
@media(max-width:759px) and (max-height:670px){.opening{grid-template-rows:auto minmax(150px,1fr) auto}.opening-copy{padding-top:17px}.opening h1{font-size:34px}.opening-controls{padding-bottom:14px}}

/* Continue the opening's forest lighting into the short quiz. */
.quiz-page{color:#f7f5e7;background:#10231a radial-gradient(ellipse at 50% 13%,#35513c,#10231a 60%);min-height:100svh}
.quiz-page::before{content:"";position:fixed;inset:0;pointer-events:none;background:linear-gradient(#10231a60,#10231a 86%),url('grove.png') center top/cover;opacity:.25}
.quiz-page main,.quiz-page .mast{position:relative}.quiz-page .mast{padding-top:16px;color:#fff6dc}.quiz-page .brand span{background:#284637;color:#ffe69b}
.quiz-page .intro p,.quiz-page small{color:#c9ddcb}.quiz-page .eyebrow{color:#ffe69b}
.quiz-page .panel{background:#172e24f5;border-color:#4d6a53;box-shadow:0 20px 70px #07170e70}
.quiz-page .tag{background:#2a4937;color:#e3f0df}.quiz-meta b{color:#ffe69b}
.quiz-companion{position:relative;display:flex;align-items:center;gap:10px;min-height:65px;margin:8px 0 10px;isolation:isolate}
.quiz-companion::before{content:"";position:absolute;left:-8px;top:-8px;width:104px;height:82px;background:radial-gradient(ellipse,#ddbd5660,transparent 69%);z-index:-1}
.quiz-companion .pet{width:76px;flex:0 0 76px;aspect-ratio:1.2;background:transparent;mask-image:radial-gradient(ellipse,#000 42%,transparent 73%)}
.quiz-companion p{font-size:14px;color:#e4efdf;background:#284535;border:1px solid #4a6a50;border-radius:12px;padding:5px 10px}
.quiz-companion .pet span{font-size:37px}.quiz-companion .pet.pose-sad{animation:gentle-dip .45s ease both}
.quiz-companion.cheer .pet{animation:cheer .6s cubic-bezier(.18,.72,.29,1.22) both}
.quiz-page .quiz .intro{margin:8px 0 14px}.quiz-page .quiz h1{color:#fff9e9;font-size:clamp(22px,5.6vw,28px)}
.quiz-page .subject,.quiz-page .option,.quiz-page .secondary{color:#f5f7eb;background:#213e30;border-color:#55745b}
.quiz-page .subject:hover,.quiz-page .option:hover:not(:disabled),.quiz-page .secondary:hover{background:#2c503c}
.quiz-page .subject-icon,.quiz-page .option span{background:#365746;color:#f3e8b5}
.quiz-page .option.picked{border-color:#ffe69b!important;box-shadow:inset 0 0 0 1px #ffe69b}
.quiz-page .option:disabled:not(.picked){opacity:.66}
.quiz-page .primary{background:#ffe69b;color:#203a2a;box-shadow:0 5px 22px #ffe69b26}
.quiz-page .primary:hover:not(:disabled){background:#fff1bb}
.quiz-page .text-button{color:#daecd9}.quiz-page button:focus-visible{outline-color:#fff5cd}
.quiz-page .notice{position:relative;isolation:isolate;overflow:hidden}.quiz-page .notice p{color:inherit}
.quiz-page .notice.wrong{background:#483b25;color:#fff2cf;border:1px solid #8f784d}
.quiz-page .notice.wrong .sad-pet{display:none}
.quiz-page .notice.right{background:#274e39;color:#ecf6e6;border:1px solid #769b77;animation:quiz-enter .35s ease-out both}
.quiz-page .notice .reward-icon{position:relative;z-index:1;display:grid;place-items:center;width:36px;height:36px;flex:none;border-radius:50%;background:#d8edc5;color:#183c2d;font-weight:900}
.quiz-page .reward-notice .reward-icon{background:#ffe69b;width:52px;height:52px;font-size:27px;box-shadow:0 0 22px #ffd56c8a;animation:reward-pop .68s cubic-bezier(.18,.72,.29,1.22) both}
.quiz-page .notice.reward-notice{min-height:82px;background:linear-gradient(115deg,#5b4928,#373d25 55%,#213e30);border-color:#dbb66c;color:#fff7df}
.quiz-page .reward-rays{pointer-events:none;position:absolute;z-index:-1;inset:0;background:linear-gradient(108deg,transparent 20%,#fff2a744 44%,transparent 63%);transform:translateX(-110%);animation:gold-sweep .75s ease-out both}
.quiz-page .correct-notice .reward-rays{display:none}
.quiz-page :is(.correct-scene,.reward-scene) .option.picked{background:#315e42;animation:answer-shine .65s ease-out both}
.has-art .pet:is(.pet-1,.pet-2).pose-idle::before{transform-origin:50% 82%;animation:friend-sway 4.2s ease-in-out infinite}
.has-art .pet.pet-2.pose-idle::before{animation-delay:-1.1s;animation-duration:4.8s}
@keyframes friend-sway{0%,100%{transform:rotate(-1deg) scaleY(1)}50%{transform:rotate(1.3deg) scaleY(1.029)}}
@keyframes cheer{0%,100%{transform:translateY(0)}42%{transform:translateY(-7px) scale(1.06)}}
@keyframes gentle-dip{50%{transform:translateY(3px) rotate(-4deg)}}
@keyframes quiz-enter{from{opacity:.5;transform:translateY(4px)}to{opacity:1;transform:none}}
@keyframes reward-pop{0%{transform:scale(.68) rotate(-14deg)}60%{transform:scale(1.16) rotate(5deg)}100%{transform:none}}
@keyframes gold-sweep{to{transform:translateX(110%)}}
@keyframes answer-shine{40%{box-shadow:inset 0 0 0 1px #ffe69b,0 0 20px #ffe69b65}}

/* One continuous forest setting from the last snack to the first evolution. */
.care-page{color:#f7f5e7;background:#10231a radial-gradient(ellipse at 50% 13%,#35513c,#10231a 60%);min-height:100svh}
.care-page::before{content:"";position:fixed;inset:0;pointer-events:none;background:linear-gradient(#10231a55,#10231a 88%),url('grove.png') center top/cover;opacity:.25}
.care-page main,.care-page .mast{position:relative}.care-page .brand span{background:#284637;color:#ffe69b}.care-page .mast{color:#fff6dc}
.care-page .panel{background:#172e24f5;border-color:#4d6a53;box-shadow:0 20px 70px #07170e70}
.care-page .panel p{color:#c9ddcb}.care-page .eyebrow,.care-page .xp b{color:#ffe69b}
.care-page .stage,.care-page .reveal-stage{background:#223a2c;border-color:#5b795a;box-shadow:inset 0 0 38px #101f1855}
.care-page .habitat{background:linear-gradient(180deg,#0e221a33,#0e221a92),url('grove.png') center 58%/cover,#284635}
.care-page .speech,.care-page .tag{background:#183429eb;color:#fff9e9;border:1px solid #9fc59959}
.care-page .tag.food,.care-page .done{background:#443b26;color:#ffe69b;border:1px solid #bda46a}
.care-page .secondary{background:#213e30;color:#fff9e9;border-color:#55745b}
.care-page .secondary:hover{background:#2c503c}
.care-page .text-button{color:#daecd9}.care-page button:focus-visible{outline-color:#fff5cd}
.care-page .primary{background:#ffe69b;color:#203a2a;box-shadow:0 5px 22px #ffe69b26}
.care-page .primary:hover{background:#fff1bb}
.care-page progress,.care-page progress::-webkit-progress-bar{background:#335142}.care-page progress::-webkit-progress-value{background:#ffe69b}.care-page progress::-moz-progress-bar{background:#ffe69b}
.care-page .evolution-ready{border-color:#b69b60;box-shadow:0 0 32px #eac66f26}
.evolution-halo{pointer-events:none;position:absolute;inset:10% 16%;background:radial-gradient(ellipse,#ffe5a169,transparent 65%);z-index:-1}
.result.transform .evolution-halo{animation:evolution-halo 1.45s ease both}
.care-page .result.transform .reveal-stage::after{background:radial-gradient(ellipse,#fff7cd 7%,#ffdb7b75 35%,transparent 68%)}
@keyframes evolution-halo{0%{opacity:.35;transform:scale(.65)}48%{opacity:1;transform:scale(1.3)}100%{opacity:.75;transform:scale(1)}}
.has-art .pet,.has-lion .pet-0{background:transparent;mask-image:none}
.has-art .pet::before,.has-lion .pet-0 .lion-cel{mix-blend-mode:normal}
.quiz-companion .pet::before,.sad-pet .pet::before{inset:0 14%}
.care-page .result.transform .pet::after{display:none}
.has-art .result.transform .pet:is(.pet-1,.pet-2)::before{animation:swap-forest 1.45s step-end both}
@keyframes swap-forest{0%{background-position:var(--col,0%) 0%}48%,100%{background-position:var(--col,0%) 100%}}

/* Independent alpha images keep adjacent characters out of every pose. */
.friend-image{position:absolute;inset:0;margin:auto;width:88%;height:100%;object-fit:contain;object-position:center bottom;pointer-events:none;transform-origin:50% 86%;filter:drop-shadow(0 5px 10px #11251b42)}
.has-art .pet:is(.pet-1,.pet-2)::before{display:none}
.pet:is(.pet-1,.pet-2) .friend-image{max-width:100%;max-height:100%}
.pet:is(.pet-1,.pet-2).pose-idle .friend-image{animation:plush-breath 4.8s ease-in-out infinite}
.pet-2.pose-idle .friend-image{animation-delay:-1.4s;animation-duration:5.4s}
.friend-image.before-evolution{visibility:hidden}
.result.transform .friend-image:not(.before-evolution){animation:plush-reveal 1.45s ease both}
.result.transform .friend-image.before-evolution{animation:plush-before 1.45s step-end both}
@keyframes plush-breath{0%,100%{transform:scale(1) rotate(-.45deg)}50%{transform:scale(1.012,1.033) rotate(.65deg)}}
@keyframes plush-before{0%{visibility:visible}48%,100%{visibility:hidden}}
@keyframes plush-reveal{0%,47%{visibility:hidden;opacity:0;transform:scale(.91)}48%{visibility:visible;opacity:.55}78%{opacity:1;transform:scale(1.025)}100%{visibility:visible;opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.result.transform .friend-image.before-evolution{visibility:hidden}}
.has-lion .pet-0 .lion-cel{inset:0 6%;background-size:contain;background-repeat:no-repeat;background-position:center bottom;filter:drop-shadow(0 5px 10px #11251b42)}
.has-lion .lion-cel.open{background-image:url('lion-open.png')}.has-lion .lion-cel.blink{background-image:url('lion-blink.png')}.has-lion .lion-cel.perk{background-image:url('lion-perk.png')}
.has-lion .lion-cel.sad{background-image:url('lion-sad.png')}.has-lion .lion-cel.chew{background-image:url('lion-chew.png')}.has-lion .lion-cel.adult{background-image:url('lion-adult.png')}
/* The old sheet is never painted, even while standalone images are loading. */
.pet::before{display:none}

/* Every friend uses the same composition and forest floor. */
.opening-art{--forest-floor:85%;background:#10231a;inset:0;overflow:hidden}
.opening-forest{position:absolute;inset:0;background:url('opening-forest.jpg') 50% 56% / cover no-repeat}
.opening-art .opening-friend{position:absolute;inset:auto auto calc(100% - var(--forest-floor)) 50%;width:min(88%,490px);height:min(58%,480px);object-fit:contain;object-position:center bottom;transform:translateX(-50%);transform-origin:50% 100%;filter:drop-shadow(0 10px 12px #071b1466);animation:opening-friend-breath 5s ease-in-out infinite}
.opening-floor{position:absolute;left:50%;top:var(--forest-floor);width:min(55%,290px);height:28px;transform:translate(-50%,-48%);background:radial-gradient(ellipse,#0b1d15a6,transparent 70%)}
.opening-shade{background:linear-gradient(180deg,#0b1914ee 0%,#0b191474 22%,transparent 42%,transparent 56%,#0b1914ba 81%,#0b1914 100%)}
@keyframes opening-friend-breath{0%,100%{transform:translateX(-50%) scaleY(1)}50%{transform:translateX(-50%) scaleY(1.025)}}
@media(max-width:759px){.opening-art{--forest-floor:76%}.opening-art .opening-friend{height:clamp(140px,48svh,420px);width:min(88%,420px)}.opening-shade{background:linear-gradient(180deg,#0b1914ea 0%,#0b191479 20%,transparent 43%,transparent 60%,#0b1914d4 81%,#0b1914 100%)}}
@media(min-width:760px){.opening-art{left:43%;--forest-floor:94%}.opening-forest{background-position:center 62%}.opening-art .opening-friend{height:76%;width:90%;max-width:690px}.opening-shade{background:linear-gradient(90deg,#10231a 36%,#10231a66 51%,transparent 63%),linear-gradient(0deg,#10231a66 0%,transparent 18%)}}

/* Preserve the forest setting for the growing collection and wardrobe. */
.care-links{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.unit-group{border:1px solid #55745b;border-radius:14px;background:#172e24f5;padding:0 12px}
.unit-group summary{padding:11px 4px;cursor:pointer;font-weight:800;min-height:48px;color:#fff6dc}
.unit-options{display:grid;gap:6px;padding:0 0 10px}
.quiz-page .unit-options .subject{grid-template-columns:1fr auto}
.grove-scene{min-height:200px}.grove-scene .pet{width:min(100%,235px);background:transparent;mask-image:none}
.wardrobe-progress{margin:12px 0 6px}.wardrobe-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.wardrobe-items .option{background:#213e30;color:#fff9e9;border-color:#55745b;font-size:14px;padding:8px}
.wardrobe-items .option span{background:#395543}
.wardrobe-items .option.picked{background:#34533e;border-color:#ffe69b!important;box-shadow:inset 0 0 0 1px #ffe69b}
.pet .worn-item,.has-art .pet .worn-item,.has-lion .pet-0 .worn-item{visibility:visible;position:absolute;z-index:4;left:57%;top:66%;font-size:clamp(19px,14cqw,38px);filter:drop-shadow(0 2px 3px #201d10aa);pointer-events:none}
.pet{container-type:inline-size}.pet .worn-3{top:15%;left:40%}.pet .worn-2{top:61%;left:45%}
.mature-pet{background:transparent}.mature-pet.pose-idle .friend-image{animation:plush-breath 4.8s ease-in-out infinite}
.mature-pet.pose-sad .friend-image{animation:gentle-dip .45s ease both}
.notice .item-unlock{color:#ffe69b;font-weight:800}
.opening .pet-option:has(.friend-progress){flex-wrap:wrap;column-gap:5px;row-gap:0}.opening .friend-progress{flex-basis:100%;font-size:11px;color:#cfdfce}

/* Six individually toggleable pieces, composed around the pet rather than over its face. */
.gear-0{--jewel:#ffde83;--jewel-fill:#b87627;--aura:#ffc75b80}
.gear-1{--jewel:#e7ddff;--jewel-fill:#765cb1;--aura:#bb9bff85}
.gear-2{--jewel:#ffd3a8;--jewel-fill:#bc4e35;--aura:#ff8c5488}
.gear{display:contents}
.gear-piece{position:absolute;z-index:5;color:var(--jewel);pointer-events:none;filter:drop-shadow(0 0 6px var(--aura));line-height:0}
.gear-piece svg,.gear-thumb svg{display:block;width:100%;height:100%}
.gear-slot-0{z-index:-1;inset:6% 6% 18%;border-radius:50%;background:radial-gradient(ellipse,var(--aura),transparent 68%);opacity:.76}
.gear-slot-0 svg{opacity:.66}
.gear-slot-1{width:13%;left:45%;top:64%}
.gear-slot-2{width:30%;right:3%;bottom:13%;transform:rotate(20deg);animation:wand-hover 4.8s ease-in-out infinite}
.gear-slot-3{width:21%;left:40%;top:5%;transform:rotate(-5deg)}
.pet-1 .gear-slot-3,.gear-1 .gear-slot-3{top:19%;left:39%;width:18%}
.gear-slot-4{width:31%;left:5%;top:30%;animation:gear-twinkle 3.6s ease-in-out infinite}
.gear-slot-5{width:78%;height:26%;bottom:1%;left:11%;opacity:.83;z-index:0;background:radial-gradient(ellipse,var(--aura),transparent 60%)}
.gear-slot-5 svg{transform:scaleX(2.2)}
.quiz-companion .gear-slot-0,.quiz-companion .gear-slot-4,.quiz-companion .gear-slot-5{opacity:.45}
.wardrobe-items .gear-thumb{display:grid;place-items:center;flex:0 0 37px;height:37px;padding:4px;background:#10291e;color:var(--jewel);border:1px solid #7c956b;border-radius:10px;filter:drop-shadow(0 0 5px var(--aura))}
.wardrobe-items .gear-label{display:block;min-width:0;background:none;border-radius:0;text-align:left;line-height:1.35}
.wardrobe-items .gear-label small{display:block;color:#c9ddcb;font-size:11px;margin-top:3px}
.wardrobe-progress small{color:#c9ddcb}
@keyframes wand-hover{50%{transform:translateY(-4px) rotate(13deg)}}
@keyframes gear-twinkle{0%,100%{opacity:.48}55%{opacity:1}}

/* Sculpted accessories are alpha images, with glows reserved for ambient pieces. */
.gear-piece .gear-art,.gear-thumb .gear-art{display:block;width:100%;height:100%;object-fit:contain}
.gear-piece:has(.gear-art){filter:drop-shadow(0 2px 3px #091b16bb)}
.gear-slot-1{width:16%;left:43%;top:62%}
.gear-slot-2{width:21%;right:4%;bottom:15%;transform:rotate(18deg)}
.gear-slot-3{width:26%;left:37%;top:1%}
.gear-1 .gear-slot-3{top:16%;left:39%;width:22%}
.gear-slot-0{opacity:.60;background:radial-gradient(ellipse,var(--aura),transparent 63%)}.gear-slot-0 svg{opacity:.30}
.gear-slot-4{width:26%;left:4%;top:36%;opacity:.64}
.gear-slot-5{opacity:.57}
.wardrobe-items .gear-thumb{background:radial-gradient(ellipse at 50% 33%,#536c4c,#172b22 73%);border-color:#768365}
.wardrobe-items .gear-thumb:has(.gear-art){padding:2px}

/* Give each revealed silhouette room, with the light peaking at the image swap. */
.result .reveal-stage{min-height:clamp(240px,59vw,340px)}
.result .mature-pet{width:min(100%,360px);aspect-ratio:1.02}
.result .mature-pet .friend-image{width:94%;height:98%;object-position:center bottom}
.result .evolution-halo{inset:3% 8%}
.reveal-pet-1 .evolution-halo{background:radial-gradient(ellipse,#d4bafaab,transparent 65%)}
.reveal-pet-2 .evolution-halo{background:radial-gradient(ellipse,#ffad6c9c,transparent 65%)}
.reveal-level-4 .friend-image:not(.before-evolution),.reveal-level-5 .friend-image:not(.before-evolution){filter:drop-shadow(0 0 16px #f9cc6540)}
.stage .mature-pet .friend-image,.grove-scene .mature-pet .friend-image{width:96%}

/* Wearables follow pose anchors; the wand has its own lane in the scene. */
.gear-slot-1{left:var(--chest-x,50%);top:var(--chest-y,64%);width:11%;transform:translate(-50%,-50%)}
.gear .gear-slot-3{left:var(--head-x,50%);top:var(--head-y,22%);width:21%;transform:translate(-50%,-91%) rotate(-4deg)}
.gear-1 .gear-slot-3{width:17%}
.stage .pet:has(.gear-slot-2),.result .pet:has(.gear-slot-2),.wardrobe .pet:has(.gear-slot-2){overflow:visible}
.gear-slot-2{left:calc(100% + 3px);right:auto;bottom:15%;width:15%;height:47%;transform-origin:50% 70%;transform:rotate(8deg);animation:staff-hover 4.6s ease-in-out infinite}
.gear-slot-2 .gear-art{object-position:center bottom}
.gear-slot-5{width:70%;left:15%;bottom:0;opacity:.46}
.quiz-companion .gear-slot-2{left:89%;width:13%;height:35%}
.grove-scene,.result .reveal-stage{padding-inline:clamp(24px,9%,55px)}
.stage:has(.gear-slot-2){padding-inline:clamp(24px,9%,55px)}
.wardrobe-items .option{min-width:0;overflow:hidden}
.wardrobe-items .gear-thumb{position:relative;display:block;flex:0 0 37px;width:37px;min-width:37px;height:37px;overflow:hidden;padding:0}
.wardrobe-items .gear-thumb .gear-art,.wardrobe-items .gear-thumb svg{position:absolute;inset:3px;width:calc(100% - 6px);height:calc(100% - 6px);object-fit:contain}
@keyframes staff-hover{0%,100%{transform:translateY(0) rotate(8deg)}50%{transform:translateY(-4px) rotate(3deg)}}
.opening-art .opening-saved{display:grid;place-items:end center;animation:none;filter:none;max-width:80%}
.opening-saved .pet{position:relative;inset:auto;margin:0;width:100%;height:100%;aspect-ratio:auto;max-height:100%;transform:none;overflow:visible;mask-image:none;background:transparent}
.opening-saved .pet .friend-image{position:absolute;inset:0;width:88%;height:100%;object-fit:contain;object-position:center bottom;animation:plush-breath 4.8s ease-in-out infinite}
.opening-saved .gear-slot-2{left:87%;width:12%}
.opening-caption{gap:8px}.opening-caption b{text-align:right}
@media(prefers-reduced-motion:reduce){.opening-saved .pet .friend-image{animation:none}}

/* Scenery sits in the clearing, with a separate depth plane for the ground sigil. */
.forest-set{position:absolute;inset:0;pointer-events:none;color:var(--jewel);display:contents}
.forest-piece{position:absolute;z-index:3;pointer-events:none;line-height:0}
.forest-piece svg,.forest-piece img{display:block;width:100%;height:100%;object-fit:contain}
.forest-slot-0{inset:-4% -18% 10%;z-index:-1;background:conic-gradient(from 153deg at 48% 0%,transparent 0deg,var(--aura) 11deg,transparent 25deg),radial-gradient(ellipse at 50% 38%,var(--aura),transparent 66%);opacity:.72;filter:blur(4px)}
.forest-slot-0 svg{display:none}
.forest-slot-1,.forest-slot-2,.forest-slot-3{filter:drop-shadow(0 6px 4px #11251b90)}
.forest-slot-1{width:34%;left:-10%;bottom:1%;animation:forest-arrive .42s ease-out both}
.forest-slot-2{width:33%;right:-10%;bottom:2%;transform-origin:center bottom;animation:forest-grow .55s ease-out both}
.forest-slot-3{width:23%;right:1%;bottom:21%;z-index:-1;animation:forest-grow .55s ease-out both}
.gear-1 .forest-slot-2{filter:hue-rotate(31deg) drop-shadow(0 6px 4px #11251b90)}
.gear-2 .forest-slot-3{filter:hue-rotate(329deg) saturate(1.4) drop-shadow(0 6px 4px #11251b90)}
.forest-slot-4{inset:7% -13% 16%;background:radial-gradient(circle at 14% 56%,var(--jewel) 0 2px,transparent 4px),radial-gradient(circle at 89% 33%,var(--jewel) 0 1px,transparent 4px),radial-gradient(circle at 9% 30%,var(--jewel) 0 1px,transparent 4px),radial-gradient(circle at 84% 72%,var(--jewel) 0 2px,transparent 4px),radial-gradient(circle at 55% 11%,var(--jewel) 0 1px,transparent 3px);filter:drop-shadow(0 0 5px var(--jewel));animation:gear-twinkle 3.8s ease-in-out infinite}
.forest-slot-4 svg{display:none}
.forest-slot-5{width:95%;aspect-ratio:1;left:2.5%;bottom:-38%;transform:scaleY(.29);z-index:-1;filter:drop-shadow(0 0 7px var(--jewel));opacity:.9}
.forest-slot-5 svg{background:radial-gradient(ellipse,var(--aura),transparent 68%);border-radius:50%}
.stage .pet:has(.forest-set),.result .pet:has(.forest-set),.wardrobe .pet:has(.forest-set){max-width:78%;overflow:visible}
.quiz-companion .forest-set,.sad-pet .forest-set{display:none}
.opening-saved .forest-slot-1{left:1%}.opening-saved .forest-slot-2{right:1%}.opening-saved .forest-slot-3{right:10%}
.opening-saved .forest-slot-5{bottom:-26%}
@keyframes forest-grow{from{opacity:0;transform:scale(.72)}to{opacity:1;transform:scale(1)}}
@keyframes forest-arrive{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.mast .mast-creator{color:#ffe69b;font-size:12px;font-weight:800;line-height:1.4;margin-bottom:3px}
.opening h1{word-break:keep-all}
/* Keep young friends on the same floor line, with more of the grove visible. */
.opening-baby .opening-art .opening-friend{width:min(72%,344px);height:clamp(115px,39svh,344px)}
@media(min-width:760px){.opening-baby .opening-art .opening-friend{width:74%;max-width:565px;height:62%}}


/* A five-second forest vignette plays above the actual picker. */
.forest-intro{margin:0;position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;border:0;padding:0;overflow:hidden;background:#10231a;color:#fff9e9;isolation:isolate}
.forest-intro::backdrop{background:#10231a}
.intro-canopy,.intro-path,.intro-fireflies{position:absolute;inset:0;pointer-events:none}
.intro-canopy{background:linear-gradient(180deg,#06181278,transparent 52%,#0a1e16a8),url('opening-forest.jpg') center 64%/cover;transform:scale(1.04)}
.intro-path{background:linear-gradient(0deg,#081b13b8,transparent 35%)}
.intro-fireflies i{position:absolute;left:var(--x);top:var(--y);width:5px;height:5px;border-radius:50%;background:#fff0a4;box-shadow:0 0 12px 4px #ffda5c;animation:firefly 3.2s var(--d) ease-in-out infinite}
.intro-fireflies i:nth-child(1){--x:18%;--y:46%;--d:0s}.intro-fireflies i:nth-child(2){--x:73%;--y:39%;--d:-1s}.intro-fireflies i:nth-child(3){--x:86%;--y:67%;--d:-2s}.intro-fireflies i:nth-child(4){--x:41%;--y:34%;--d:-3s}.intro-fireflies i:nth-child(5){--x:61%;--y:73%;--d:-1.7s}
.intro-runner{position:absolute;left:-32%;bottom:var(--ground);width:clamp(128px,24vw,300px);opacity:0;will-change:transform}
.intro-runner img{display:block;width:100%;height:clamp(115px,25vh,220px);object-fit:contain;object-position:center bottom;filter:drop-shadow(0 10px 8px #0719108c)}
.intro-runner-lion{--ground:17%;--runner-delay:0s}.intro-runner-rabbit{--ground:24%;--runner-delay:.27s;width:clamp(104px,19vw,244px)}.intro-runner-fox{--ground:12%;--runner-delay:.48s}
.intro-playing .intro-runner{animation:cross-grove 4.45s var(--runner-delay) linear both}
.intro-playing .intro-runner img{animation:forest-bound .61s var(--runner-delay) cubic-bezier(.45,0,.55,1) infinite}
.intro-playing .intro-canopy{animation:grove-camera 5s ease-out both}
.intro-end{position:absolute;top:19%;left:16px;right:16px;text-align:center;text-shadow:0 4px 25px #071910;opacity:0}
.intro-end p{color:#ffe69b;font-weight:800;letter-spacing:.08em;margin-bottom:5px}.intro-end h2{font-size:clamp(31px,6vw,65px);letter-spacing:-.06em;line-height:1.15;word-break:keep-all}
.intro-playing .intro-end{animation:intro-end-reveal 1.25s 3.1s ease both}
.intro-skip{position:absolute;right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));padding:8px 15px;background:#10231aeb;color:#fff9e9;border:1px solid #ffe69b88;z-index:2}
.intro-skip:focus-visible{outline-color:#ffe69b}
@keyframes cross-grove{0%{transform:translateX(-12vw) scale(.85);opacity:0}9%{opacity:1}92%{opacity:1}100%{transform:translateX(150vw) scale(1.04);opacity:0}}
@keyframes forest-bound{0%,100%{transform:translateY(2%) rotate(-4deg) scaleY(.94)}49%{transform:translateY(-22%) rotate(5deg) scaleY(1.02)}}
@keyframes grove-camera{to{transform:scale(1.11) translateX(-1%)}}
@keyframes intro-end-reveal{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* Footfall animation is separate from the camera's tracking move. */
.intro-foreground{position:absolute;z-index:1;inset:0;pointer-events:none;background:radial-gradient(ellipse at 1% 101%,#06150dd9,transparent 31%),radial-gradient(ellipse at 98% 95%,#071a13b8,transparent 25%),linear-gradient(0deg,#0b1a1199,transparent 16%);transform-origin:center bottom}
.intro-playing .intro-foreground{animation:foreground-parallax 5s ease-out both}
.intro-playing .intro-canopy{animation:grove-tracking 5s ease-out both}
.intro-playing .intro-runner{animation:track-run 4.55s var(--runner-delay) linear both;transform-origin:center bottom}
.intro-runner-lion{--ground:15%;--runner-delay:0s}.intro-runner-rabbit{--ground:24%;--runner-delay:.19s}.intro-runner-fox{--ground:10%;--runner-delay:.37s}
.intro-stride{position:relative;height:clamp(95px,23vh,210px);transform-origin:center bottom}
.intro-runner .stride{position:absolute;inset:0;width:100%;height:100%;opacity:0;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 2px 4px #1b271455)}
.intro-playing .intro-runner .stride{animation:stride-switch .45s step-end infinite;animation-delay:var(--frame)}
.stride-0{--frame:0s}.stride-1{--frame:-.3375s}.stride-2{--frame:-.225s}.stride-3{--frame:-.1125s}
.intro-ground-shadow{position:absolute;bottom:-5%;left:14%;width:72%;height:19%;background:radial-gradient(ellipse,#091912b0,transparent 68%);filter:blur(4px);transform-origin:center}
.intro-playing .intro-ground-shadow{animation:foot-shadow .45s ease-in-out infinite}
.intro-playing .intro-stride{animation:stride-weight .45s ease-in-out infinite}
.intro-end{z-index:2;top:17%}
.intro-playing .intro-end{animation:intro-end-reveal 1.1s 3.5s ease both}
@keyframes stride-switch{0%{opacity:1}25%,100%{opacity:0}}
@keyframes stride-weight{0%,100%{transform:translateY(-5%) rotate(-1deg)}25%{transform:translateY(1%) rotate(1deg)}65%{transform:translateY(-1%) rotate(-2deg)}}
@keyframes foot-shadow{0%,100%{opacity:.45;transform:scaleX(.91)}25%,65%{opacity:.87;transform:scaleX(1.03)}}
@keyframes track-run{0%{transform:translateX(-5vw) scale(.8);opacity:0}7%{opacity:1}48%{transform:translateX(68vw) scale(1.14)}90%{opacity:1}100%{transform:translateX(145vw) scale(1.04);opacity:0}}
@keyframes grove-tracking{0%{transform:scale(1.14) translateX(2%)}52%{transform:scale(1.2) translateX(-3%)}100%{transform:scale(1.08) translateX(-1%)}}
@keyframes foreground-parallax{from{transform:scale(1.22) translateX(4%)}to{transform:scale(1.04) translateX(-4%)}}

/* Layer the decorations behind and in front of the friend. */
.forest-set{
  display:block;
  position:absolute;
  inset:0;
  z-index:auto;
  pointer-events:none;
  --clearing-ground:4%;
}
.stage>.pet,.reveal-stage>.pet,.opening-art>.opening-saved{z-index:2}
.stage>.forest-set{--clearing-ground:13%}
.opening-art>.forest-set{--clearing-ground:calc(100% - var(--forest-floor))}
.forest-set .forest-prop{object-position:center bottom}
.forest-set .forest-slot-0{
  inset:0;
  z-index:0;
  opacity:.65;
  background:conic-gradient(from 146deg at 36% -10%,transparent 0deg,var(--aura) 13deg,transparent 27deg);
}
.forest-set .forest-slot-1{
  left:38%;
  right:auto;
  bottom:var(--clearing-ground);
  width:24%;
  height:24%;
  z-index:3;
}
.forest-set .forest-slot-2{
  left:auto;
  right:8%;
  bottom:calc(var(--clearing-ground) + 5%);
  width:24%;
  height:34%;
  z-index:1;
}
.forest-set .forest-slot-3{
  left:8%;
  right:auto;
  bottom:calc(var(--clearing-ground) + 8%);
  width:21%;
  height:31%;
  z-index:1;
}
.forest-set .forest-slot-4{
  inset:8% 5% 24%;
  z-index:1;
  background:radial-gradient(circle at 15% 37%,var(--jewel) 0 1px,transparent 3px),
    radial-gradient(circle at 26% 23%,var(--jewel) 0 1px,transparent 3px),
    radial-gradient(circle at 78% 26%,var(--jewel) 0 1px,transparent 3px),
    radial-gradient(circle at 89% 49%,var(--jewel) 0 2px,transparent 4px),
    radial-gradient(circle at 84% 69%,var(--jewel) 0 1px,transparent 3px);
}
.forest-set .forest-slot-5{
  left:31%;
  bottom:calc(var(--clearing-ground) - 2%);
  width:38%;
  height:17%;
  aspect-ratio:auto;
  transform:none;
  z-index:1;
  opacity:.65;
}
.forest-set .forest-slot-5 svg{
  overflow:visible;
  transform:scaleX(2.35);
  background:none;
}
.forest-set:has(.forest-slot-5) .forest-slot-1{left:30%;width:22%}

/* Reserve ground in the wardrobe for props in front of the friend. */
.grove-scene{
  padding-block:8px clamp(32px,10vw,48px);
}
.grove-scene .forest-set{--clearing-ground:3%}
.grove-scene .forest-set .forest-slot-1{
  left:34%;
  width:32%;
  height:17%;
}
.grove-scene .forest-set:has(.forest-slot-5) .forest-slot-1{left:25%}
.grove-scene .forest-slot-1::before{
  content:"";
  position:absolute;
  inset:54% -15% -5%;
  z-index:-1;
  background:radial-gradient(ellipse,#e4b64783,transparent 69%),
    radial-gradient(ellipse at 50% 82%,#142918c4,transparent 70%);
}
.grove-scene .forest-set .forest-slot-2{
  right:5%;
  bottom:12%;
  width:27%;
  height:36%;
}
.grove-scene .forest-set .forest-slot-3{
  left:5%;
  bottom:15%;
  width:24%;
  height:32%;
}
.grove-scene .forest-set .forest-slot-0{
  filter:none;
  opacity:.92;
  background:conic-gradient(from 122deg at 8% -10%,transparent 2deg,var(--aura) 13deg,transparent 21deg,var(--aura) 29deg,transparent 43deg),
    radial-gradient(ellipse at 16% 10%,var(--aura),transparent 56%);
}
.grove-scene .forest-set .forest-slot-5{
  left:32%;
  bottom:1%;
  width:39%;
  height:15%;
}

/* Keep the quiz controls within reach even when a question or explanation is long. */
@media (max-width:640px){
  body.quiz-page main{padding-top:8px;padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))}
  .quiz-page .mast{padding-block:8px}
  .quiz-page .quiz-companion{min-height:40px;margin:4px 0}
  .quiz-page .quiz-companion .pet{width:48px;flex-basis:48px}
  .quiz-page .quiz .intro{margin:8px 0}
  .quiz-page .quiz h1{font-size:clamp(19px,5.4vw,24px);word-break:keep-all}
  .quiz-page .quiz .options{gap:6px}
  .quiz-page .quiz .option{min-height:44px;padding-block:6px}
  .quiz-page .quiz>.actions{
    position:fixed;
    inset:auto 0 0;
    z-index:20;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:8px;
    margin:0 auto;
    max-width:560px;
    padding:8px 16px calc(8px + env(safe-area-inset-bottom,0px));
    background:#142c21;
    border-top:1px solid #4a6a50;
    box-shadow:0 -4px 18px #0c1f1960;
  }
  .quiz-page .quiz>.actions button{min-height:44px;padding:6px 10px}
  .quiz-page .quiz>.actions button:only-child{grid-column:1/-1}
  .quiz-page .quiz>.actions .text-button{font-size:13px}
}

/* Ground the props and give each forest theme its own lighting. */
.forest-set.gear-0{--canopy-glow:#ffdc8b80;--ground-glow:#e5ae4e55}
.forest-set.gear-1{--canopy-glow:#d9c8ff85;--ground-glow:#af9dec55}
.forest-set.gear-2{--canopy-glow:#ffc09988;--ground-glow:#ff976052}

.forest-set .forest-slot-0{
  filter:none;
  opacity:.9;
  background:
    conic-gradient(from 119deg at 11% -12%,transparent 0deg,var(--canopy-glow) 12deg,transparent 22deg,var(--aura) 30deg,transparent 44deg),
    radial-gradient(ellipse at 14% 7%,var(--canopy-glow),transparent 54%);
}

.forest-set :is(.forest-slot-1,.forest-slot-2,.forest-slot-3)::before{
  content:"";
  position:absolute;
  inset:auto 6% -7%;
  height:37%;
  z-index:-1;
  background:
    radial-gradient(ellipse at 50% 56%,#091a14a8,transparent 61%),
    radial-gradient(ellipse,var(--ground-glow),transparent 72%);
}

.forest-set .forest-slot-4{
  inset:8% 6% 15%;
  filter:drop-shadow(0 0 5px var(--jewel));
  background:
    radial-gradient(circle at 13% 24%,#fffbe8 0 1px,var(--jewel) 2px,transparent 4px),
    radial-gradient(circle at 28% 12%,var(--jewel) 0 1px,transparent 3px),
    radial-gradient(circle at 18% 66%,var(--jewel) 0 1px,transparent 3px),
    radial-gradient(circle at 79% 20%,#fffbe8 0 1px,var(--jewel) 2px,transparent 4px),
    radial-gradient(circle at 86% 55%,#fffbe8 0 1px,var(--jewel) 2px,transparent 4px),
    radial-gradient(circle at 93% 36%,var(--jewel) 0 1px,transparent 3px);
}
.forest-set .forest-slot-4::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 23% 41%,#fffbe8 0 1px,transparent 3px),
    radial-gradient(circle at 11% 52%,var(--jewel) 0 1px,transparent 3px),
    radial-gradient(circle at 91% 67%,var(--jewel) 0 1px,transparent 3px),
    radial-gradient(circle at 73% 9%,var(--jewel) 0 1px,transparent 3px);
  animation:forest-fireflies-drift 5s ease-in-out infinite alternate;
}
@keyframes forest-fireflies-drift{
  from{transform:translateY(3%);opacity:.55}
  to{transform:translateY(-5%);opacity:1}
}

.forest-set .forest-slot-5{
  opacity:.88;
  background:radial-gradient(ellipse,var(--ground-glow),transparent 71%);
}
.forest-set .forest-slot-5 svg{filter:drop-shadow(0 0 3px var(--jewel))}

/* Hang the crown and constellation in the canopy, clear of the portrait. */
.grove-scene .forest-set .forest-slot-0 svg,
.grove-scene .forest-set .forest-slot-4 svg{
  position:absolute;
  display:block;
  width:22%;
  height:29%;
  filter:drop-shadow(0 0 5px var(--aura));
}
.grove-scene .forest-set .forest-slot-0 svg{top:1%;left:3%}
.grove-scene .forest-set .forest-slot-4 svg{top:0;right:1%;opacity:.78}
.grove-scene .forest-set .forest-slot-1{height:20%}
.grove-scene .forest-set .forest-slot-2{height:38%}
.grove-scene .forest-set .forest-slot-3{height:35%}
.grove-scene .forest-set .forest-slot-5 svg{transform:scaleX(1.9)}

/* Reserve separate ground for the seal and foreground prop. */
.grove-scene:has(.forest-slot-2,.forest-slot-3)>.mature-pet{
  width:min(76%,220px);
}
.grove-scene:has(.forest-slot-5){
  padding-bottom:clamp(55px,16vw,75px);
}
.grove-scene .forest-set .forest-slot-5{
  left:18%;
  bottom:2%;
  width:64%;
  height:24%;
  opacity:.9;
}
.grove-scene .forest-set .forest-slot-5 svg{transform:scaleX(2.35)}
.grove-scene .forest-set:has(.forest-slot-5) .forest-slot-1{
  left:5%;
  bottom:4%;
  width:24%;
  height:22%;
}
.grove-scene .forest-set.gear-0 .forest-slot-2{
  right:3%;
  width:25%;
  bottom:16%;
}
.grove-scene .forest-set.gear-0 .forest-slot-3{
  left:3%;
  width:22%;
  bottom:19%;
}
.grove-scene .forest-set.gear-0 .forest-slot-0 svg{
  top:0;
  left:1%;
  width:18%;
  height:22%;
  opacity:.72;
}
.grove-scene .forest-set.gear-0 .forest-slot-4 svg{display:none}

/* Keep the pond and brazier clear of the two ground emblems. */
.grove-scene .forest-set.gear-1 .forest-slot-1{left:28%;width:44%;height:23%}
.grove-scene .forest-set.gear-2 .forest-slot-1{left:35%;width:30%;height:24%}
.grove-scene .forest-set.gear-1:has(.forest-slot-5) .forest-slot-1{
  left:4%;bottom:4%;width:34%;
}
.grove-scene .forest-set.gear-2:has(.forest-slot-5) .forest-slot-1{
  left:72%;bottom:4%;width:24%;
}
.grove-scene .forest-set:is(.gear-1,.gear-2) .forest-slot-2{
  right:2%;bottom:20%;width:27%;height:39%;
}
.grove-scene .forest-set:is(.gear-1,.gear-2) .forest-slot-3{
  left:2%;bottom:22%;width:21%;height:38%;
}
.grove-scene .forest-set:is(.gear-1,.gear-2) .forest-slot-5 svg{
  transform:scaleX(1.7);
}
.grove-scene .forest-set:is(.gear-1,.gear-2) .forest-slot-0 svg{
  top:0;left:2%;width:17%;height:21%;
}
.grove-scene .forest-set:is(.gear-1,.gear-2) .forest-slot-4 svg{
  top:-5%;right:0;width:17%;height:23%;opacity:.56;
}

/* Korean names wrap at spaces across character, ornament and unit cards. */
.intro :is(h1,p),.opening-caption,.opening-controls .primary,.pet-option strong,
.wardrobe-items .gear-label,.unit-group summary,.subject strong,.quiz-meta .tag,
.quiz .option,.item-unlock{word-break:keep-all}

.wardrobe-items .option{
  gap:7px;
  border-radius:13px;
  background:#233d31;
}
.wardrobe-items .option.picked{
  background:#2c4838;
  border-color:#a5905b!important;
  box-shadow:none;
}
.wardrobe-items .gear-label{background:none;overflow-wrap:anywhere}
.wardrobe-items .gear-thumb{filter:none}

.grove-scene{
  --portrait-floor:clamp(32px,10vw,48px);
  padding-bottom:var(--portrait-floor);
}
.grove-scene:has(.forest-slot-5){
  --portrait-floor:clamp(55px,16vw,75px);
}
.grove-scene::before{
  content:"";
  position:absolute;
  z-index:1;
  pointer-events:none;
  bottom:calc(var(--portrait-floor) - 8px);
  left:31%;
  width:38%;
  height:20px;
  background:radial-gradient(ellipse,#18281bb3,transparent 72%);
}
.grove-scene .forest-set .forest-slot-5{
  background:none;
  opacity:.78;
}
.grove-scene .forest-set .forest-slot-5 svg{
  filter:drop-shadow(0 1px 1px #211708b3);
}
.grove-scene .forest-set.gear-2 .forest-slot-5 svg{transform:scale(1.7,.84)}
.grove-scene .forest-set.gear-2 .forest-slot-0 svg{width:12%;opacity:.65}
.grove-scene .forest-set.gear-2 .forest-slot-4 svg{width:13%;top:-2%}
.grove-scene .forest-set.gear-2:has(.forest-slot-5) .forest-slot-1{
  left:4%;bottom:3%;width:23%;height:22%;
}
.grove-scene .forest-set.gear-2 .forest-slot-2{right:3%;bottom:17%;width:25%}

@media(max-width:360px){
  .wardrobe-items .option{padding-inline:6px}
  .wardrobe-items .gear-thumb{flex-basis:28px;min-width:28px;width:28px;height:32px}
}

/* Remove the faint matte on the last two fox portraits while keeping soft fur edges. */
.pet-2:is(.stage-4,.stage-5) .friend-image:not(.before-evolution),
.pet-2.stage-5 .before-evolution{
  filter:url(#fox-portrait-matte);
}

/* Keep status controls outside the same composition used by the wardrobe. */
.home-grove .stage-top{
  position:static;
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.home-grove .speech{
  position:static;
  display:table;
  margin:8px auto 0;
}
.home-grove .grove-scene{margin:0}
.care-links{grid-template-columns:repeat(2,minmax(0,1fr))}
.care-links .text-button{
  padding-inline:4px;
  font-size:clamp(13px,3.8vw,16px);
  white-space:nowrap;
}
.grove-scene .forest-set.gear-0 .forest-slot-3{bottom:23%}
.grove-scene .forest-set.gear-0:has(.forest-slot-5) .forest-slot-1{
  left:3%;
  width:20%;
}
.grove-scene .forest-set.gear-0 .forest-slot-5{
  opacity:.64;
}
.pet-0.stage-5 .friend-image:not(.before-evolution){
  filter:url(#fox-portrait-matte);
}

/* Prominent, illustrated care menus. */
.care-links{grid-template-columns:1fr;gap:12px;margin-top:14px}
.care-menu{display:grid;grid-template-columns:70px 1fr 18px;align-items:center;gap:12px;min-height:88px;padding:10px 16px;text-align:left;border:1px solid #d7b969;border-radius:19px;background:linear-gradient(120deg,#304c38,#142e23);color:#fff1c4;box-shadow:inset 0 1px 0 #fff4c32b,0 5px 16px #071b242c;overflow:hidden}
.shop-menu{background:linear-gradient(115deg,#62451f,#302d1d);border-color:#edc56e}
.care-menu>span:nth-child(2){font-size:18px;font-weight:800;word-break:keep-all}
.care-menu small{display:block;margin-top:5px;color:#e2dec7;font-size:12px;font-weight:400}
.care-menu>b{font-size:28px;color:#ebd394}
.care-menu-art{display:block;position:relative;width:70px;height:64px;background:radial-gradient(ellipse,#e8c97545,transparent 70%)}
.care-menu-art img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 4px #0005)}
.friends-menu-art img{position:absolute;bottom:0;width:42px;height:56px}
.friends-menu-art img:nth-child(1){left:-6px;transform:rotate(-9deg)}
.friends-menu-art img:nth-child(2){left:16px;bottom:5px;z-index:1}
.friends-menu-art img:nth-child(3){right:-8px;transform:rotate(9deg)}
.care-menu:hover{filter:brightness(1.12);border-color:#fff0a9}
.care-menu:active{transform:scale(.98)}
.care-menu:focus-visible{outline:3px solid #ffe69b;outline-offset:3px}
.opening .choice-icon{width:64px;height:68px;display:block}
.choice-icon img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 3px #0005)}
.opening .pet-option{padding:8px 4px;gap:4px}
/* Keep original portrait quality and compose motion in the same frame. */
.friend-play .pet .play-pose{object-fit:contain;image-rendering:auto}
.interaction-effect{position:absolute;inset:0;pointer-events:none;z-index:8;color:#ffe9aa}
.interaction-effect i{position:absolute;left:45%;top:38%;width:8px;height:8px;border-radius:50%;background:currentColor;box-shadow:0 0 8px currentColor;animation:companion-sparks 2.6s ease-out both}
.interaction-effect i:nth-child(2){left:25%;animation-delay:.16s}
.interaction-effect i:nth-child(3){left:68%;animation-delay:.3s}
.effect-splash,.effect-sip,.effect-inspect{color:#a9e5ff}
.effect-splash i,.effect-sip i{border-radius:60% 40% 60% 40%;animation-name:companion-droplets}
.effect-pluck i,.effect-listen i,.effect-ring i{background:transparent;border:2px solid currentColor;width:14px;height:14px;box-shadow:none;animation-name:companion-rings}
.effect-warm{color:#ffc170}
.effect-sniff{color:#e8bbe5}
.ornament-active[data-interaction] .gear-art{animation:companion-glow 2.6s ease both}
.ornament-active:is([data-interaction=ring],[data-interaction=listen],[data-interaction=sway]) .gear-art{transform-origin:50% 10%;animation:companion-swing 2.6s ease both}
@keyframes companion-sparks{0%,15%{opacity:0;transform:translateY(8px) scale(.2)}35%{opacity:1}85%,100%{opacity:0;transform:translateY(-40px) scale(.5)}}
@keyframes companion-droplets{0%,25%{opacity:0;transform:translate(0,0) scale(.3)}45%{opacity:1;transform:translate(-8px,-25px)}80%,100%{opacity:0;transform:translate(12px,12px) scale(.5)}}
@keyframes companion-rings{0%,20%{opacity:0;transform:scale(.3)}40%{opacity:.9}90%,100%{opacity:0;transform:scale(3)}}
@keyframes companion-glow{0%,100%{filter:brightness(1)}40%,65%{filter:brightness(1.3) drop-shadow(0 0 7px #ffe5a3)}}
@keyframes companion-swing{0%,100%{transform:rotate(0)}35%,65%{transform:rotate(-7deg)}50%,80%{transform:rotate(7deg)}}
@media(prefers-reduced-motion:reduce){.interaction-effect{display:none}.ornament-active[data-interaction] .gear-art{animation:none}.care-menu:active{transform:none}}

/* Explicit placement overrides legacy slot-specific transforms and hit boxes. */
.forest-set .forest-piece.placed-ornament{position:absolute!important;inset:auto!important;left:var(--prop-x)!important;top:var(--prop-y)!important;width:var(--prop-w)!important;height:var(--prop-h)!important;aspect-ratio:auto;transform:none!important;background:none!important;filter:none!important;opacity:1!important;animation:none!important;z-index:var(--prop-z,1)}
.forest-set .placed-ornament::before,.forest-set .placed-ornament::after{display:none!important}
.forest-set .placed-ornament>.forest-prop,.forest-set .placed-ornament>.ornament-touch{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;transform:none;object-fit:contain;object-position:center bottom}
.forest-set .placed-ornament>.forest-prop{filter:drop-shadow(0 4px 3px #10201666)}
.food-icon,.toy-icon{display:inline-block;width:1.8em;height:1.8em;object-fit:contain;vertical-align:middle;flex-shrink:0;filter:drop-shadow(0 2px 2px #0003)}
.play-prop .food-icon,.play-prop .toy-icon,.meal-fx .food-icon{width:clamp(42px,12vw,68px);height:clamp(42px,12vw,68px)}
.reward-icon .food-icon{width:100%;height:100%}
.pet .sprite-motion{animation:none!important;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 4px 6px #11251b42)}
.meal-fx{left:47%;top:50%;animation:food-approach 3.4s ease both}
.play-snack .play-prop{top:50%;left:48%;animation:food-approach 3.4s ease both}
@keyframes food-approach{0%{opacity:0;transform:translate(-100px,55px) scale(.7)}18%,30%{opacity:1;transform:translate(-20px,-20px) scale(1)}48%{opacity:1;transform:translate(-10px,-25px) scale(.75)}59%,100%{opacity:0;transform:translate(0,-28px) scale(.2)}}
@media(prefers-reduced-motion:reduce){.meal-fx,.play-prop{animation:none!important;opacity:0}}

/* =====================================================================
   PC · 넓은 화면 최적화
   - 모든 규칙은 @media 안에 있어 모바일(세로) 화면에는 영향이 없습니다.
   - 장면(숲+친구+장식)은 컨테이너 단위(cqw)로 비율을 유지하며 커집니다.
   ===================================================================== */

/* 시작 화면: main의 max-width(928px)가 화면을 가운데 상자에 가두던 문제 */
.opening-page main{max-width:none}

/* 오프닝 영상(세로 480x854)은 가로 화면에서 3배 확대·잘림 없이 가운데에 */
@media (min-aspect-ratio:1/1){
  .forest-intro .intro-video{object-fit:contain;background:transparent}
  .forest-intro.intro-video-playing .intro-canopy{filter:blur(22px) brightness(.6);transform:scale(1.14)}
}

/* 노트북·PC, 그리고 가로로 돌린 태블릿·휴대폰 */
@media (min-width:1024px), (min-width:640px) and (orientation:landscape){
  body.quiz-page main,body.care-page main{width:min(100%,760px);max-width:none;padding:28px 32px 64px}

  /* ── 육성(홈): 왼쪽 숲 장면 / 오른쪽 조작 패널 2단 ── */
  body.care-page main:has(.home-grid){width:min(100%,1180px)}
  body.care-page main:has(.home-grid){min-height:calc(100svh - 108px);display:flex;flex-direction:column;justify-content:center;padding-block:8px 56px}
  .home-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:32px;align-items:center}
  .home-grid .panel{margin-top:0;padding:24px 26px}
  .home-grid h1{font-size:30px}
  .home-grid p{font-size:16px}
  .home-grid .xp div{font-size:15px}
  .home-grid .xp progress{height:11px}
  .home-grove{container-type:inline-size}
  .home-grove .grove-scene{padding-block:1.5cqw 9.2cqw}
  .home-grove .grove-scene:has(.forest-slot-5){padding-bottom:14.4cqw}
  .home-grove .grove-scene .pet{width:min(100%,45.2cqw)}
  .home-grove .grove-scene:has(.forest-slot-2,.forest-slot-3)>.mature-pet{width:min(76%,42.3cqw)}
  .home-grove .tag,.home-grove .speech{font-size:15px}

  /* ── 장식 상점: 왼쪽 장면(고정) / 오른쪽 장식 목록 ── */
  body.care-page main:has(.wardrobe){width:min(100%,1080px)}
  .wardrobe{container-type:inline-size;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:28px;align-items:start;
    grid-template-areas:"intro intro" "scene items" "prog items" "act act";grid-template-rows:auto auto 1fr auto;padding:24px 28px}
  .wardrobe>.intro{grid-area:intro}
  .wardrobe>.reveal-stage{grid-area:scene;position:sticky;top:16px}
  .wardrobe>.wardrobe-progress{grid-area:prog}
  .wardrobe>.wardrobe-items{grid-area:items}
  .wardrobe>.actions{grid-area:act;max-width:520px;width:100%}
  .wardrobe .grove-scene{padding-block:.8cqw 4.9cqw}
  .wardrobe .grove-scene:has(.forest-slot-5){padding-bottom:7.7cqw}
  .wardrobe .grove-scene .pet{width:min(100%,22.6cqw)}
  .wardrobe .grove-scene:has(.forest-slot-2,.forest-slot-3)>.mature-pet{width:min(76%,22cqw)}
  @container (max-width:760px){.wardrobe-items{grid-template-columns:minmax(0,1fr)}}

  /* ── 퀴즈·단원 선택: 읽기 편한 폭과 큰 글자 ── */
  .quiz{max-width:680px;padding:28px 32px}
  .quiz h1{font-size:30px}
  .quiz .option{min-height:56px;font-size:17px;padding:12px 16px}
  .quiz-page .subject-list{max-width:680px}
  .quiz-page .subject{padding:14px 18px}
  .quiz-page .intro h1{font-size:34px}
  .quiz-page .intro p{font-size:16px}

  /* ── 진화 결과 ── */
  .result{max-width:680px}
}

/* 아주 큰 모니터 */
@media (min-width:1800px){
  body.care-page main:has(.home-grid){width:min(100%,1440px)}
  body.care-page main:has(.wardrobe){width:min(100%,1280px)}
  body.quiz-page main{width:min(100%,860px)}
  .quiz{max-width:780px}
  .quiz-page .subject-list{max-width:780px}
}
/* 큰 모니터 */
@media (min-width:1600px){
  body.care-page main:has(.home-grid){width:min(100%,1280px)}
  body.care-page main:has(.wardrobe){width:min(100%,1180px)}
  .brand{font-size:22px}
}

/* 높이가 낮은 노트북(≈820px 이하): 퀴즈·상점이 스크롤 없이 보이도록 살짝 압축 */
@media (min-width:1024px) and (max-height:820px){
  body.quiz-page main,body.care-page main{padding-top:16px}
  .quiz{padding:18px 32px}
  .quiz .intro{margin:8px 0}
  .quiz h1{font-size:26px}
  .quiz .option{min-height:48px;padding:8px 16px}
  .quiz .actions{margin-top:12px}
  .quiz-companion{margin:2px 0 4px}
  .wardrobe{padding:18px 28px}
  .wardrobe>.intro{margin-bottom:12px}
  .wardrobe>.intro p{display:none}
  .wardrobe-items{gap:6px}
  .wardrobe-items .option{padding:5px 8px}
  .wardrobe>.actions{margin-top:12px;gap:4px}
  .wardrobe>.actions button{min-height:44px}
}

/* =====================================================================
   가로로 돌린 휴대폰·낮은 화면 (높이 640px 이하): 스크롤 없이 한눈에
   ===================================================================== */
@media (min-width:640px) and (orientation:landscape) and (max-height:640px){
  /* 상단 제목줄은 숨겨 세로 공간 확보 (오프닝·화면 안에 제목이 이미 있음) */
  body.quiz-page .mast,body.care-page .mast{display:none}
  body.quiz-page main,body.care-page main{padding:10px 24px 20px}

  /* 시작 화면 */
  .opening h1{font-size:34px}
  .opening-copy{padding-top:12px;padding-bottom:6px}
  .opening-kicker{margin-bottom:4px}
  .opening-guide{margin-top:4px;font-size:14px}
  .opening-controls{padding-bottom:12px}
  .opening .pet-option{min-height:44px}
  .opening .primary{min-height:46px}
  .opening .actions{margin-top:8px}

  /* 육성(홈) */
  body.care-page main:has(.home-grid){min-height:100svh;padding-block:4px}
  .home-grid{gap:20px}
  .home-grid .panel{padding:12px 16px}
  .home-grid h1{font-size:22px}
  .home-grid .panel>p{display:none}
  .home-grid .intro{margin-bottom:4px}
  .home-grid .xp{margin-bottom:4px}
  .home-grid .actions{margin-top:8px;gap:6px}
  .home-grid .actions button{min-height:38px;padding:4px 12px}
  .home-grid .care-links{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .home-grid .care-menu{min-height:0;padding:8px 8px;justify-content:center;white-space:nowrap}
  .home-grid .care-menu small,.home-grid .care-menu b,.home-grid .care-menu-art{display:none}
  .home-grid .care-menu span{font-size:14px}
  /* 음악 버튼을 작게 하고 퀴즈 우측 상단 표시와 겹치지 않게 */
  .forest-music{min-height:28px;padding:2px 8px;font-size:11px}
  .quiz>.quiz-meta{padding-right:84px}
  .home-grove .stage-top{margin-bottom:2px}
  .home-grove .stage-top .tag{min-height:0;padding:3px 10px;font-size:13px}
  .home-grove .speech{margin-top:3px;padding:2px 10px;min-height:0;font-size:13px}
  /* 놀이 모드 버튼 줄: 가로 휴대폰에서도 화면 안에 */
  .home-grove .play-controls{margin-top:2px;gap:6px}
  .home-grove .play-controls button{min-height:38px;padding:2px 12px}

  /* 단원 선택: 2열 */
  .quiz-page .unit-options{grid-template-columns:repeat(2,minmax(0,1fr))}
  .quiz-page .unit-options>p{grid-column:1/-1}
  .quiz-page .intro{margin-bottom:8px}
  .quiz-page .intro h1{font-size:24px}
  .quiz-page .quiz-companion{display:none}

  /* 퀴즈: 왼쪽 문제 / 오른쪽 보기 */
  .quiz{max-width:none;padding:12px 20px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:24px;align-items:start}
  .quiz>.quiz-meta{grid-column:1/-1}
  .quiz>.quiz-companion{display:flex;grid-column:1;margin:2px 0;min-height:48px}
  .quiz>.intro{grid-column:1;margin:2px 0}
  .quiz h1{font-size:20px;line-height:1.35}
  .quiz>.options{grid-column:2;grid-row:2 / span 2;gap:5px}
  .quiz .option{min-height:40px;font-size:15px;padding:4px 12px}
  .quiz>.notice{grid-column:2;margin-top:6px;padding:6px 10px}
  .quiz>.actions{grid-column:2;margin-top:6px;gap:4px}
  .quiz>.actions button{min-height:40px}

  /* 상점 */
  .wardrobe{padding:12px 18px;column-gap:20px}
  .wardrobe>.intro{margin-bottom:4px}
  .wardrobe>.intro p{display:none}
  .wardrobe>.reveal-stage{top:8px}
  .wardrobe .intro h1{font-size:22px}
  .wardrobe-items .option{min-height:44px}
  .wardrobe>.actions{max-width:none}

  /* 진화 결과: 왼쪽 안내 / 오른쪽 장면 */
  .result{max-width:none;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);column-gap:24px;align-items:center;padding:14px 20px;
    grid-template-areas:"intro stage" "act stage"}
  .result>.intro{grid-area:intro;margin:0}
  .result>.reveal-stage{grid-area:stage;min-height:0}
  .result>.actions{grid-area:act}
  .result .pet{width:min(100%,230px)}
}

/* 가로 휴대폰(640~759px): 시작 화면도 좌우 2단 */
@media(min-width:640px) and (max-width:759px) and (orientation:landscape){.opening{grid-template-columns:minmax(345px,43%) 1fr;grid-template-rows:1fr 1fr;min-height:100svh;align-content:center}.opening-art img{left:42%;width:58%;object-position:center 53%}.opening-art .pet{left:42%;right:0;top:50%;transform:translateY(-50%);width:min(53vw,570px)}.opening-shade{background:linear-gradient(90deg,#10231a 34%,#10231a77 55%,transparent 72%),linear-gradient(0deg,#10231a 0%,transparent 22%)}.opening-copy{grid-column:1;grid-row:1;align-self:end;padding-bottom:26px}.opening-controls{grid-column:1;grid-row:2;align-self:start}.opening-sparks{left:38%}}
@media(min-width:640px) and (max-width:759px) and (orientation:landscape){.opening-art{left:43%;--forest-floor:94%}.opening-forest{background-position:center 62%}.opening-art .opening-friend{height:76%;width:90%;max-width:690px}.opening-shade{background:linear-gradient(90deg,#10231a 36%,#10231a66 51%,transparent 63%),linear-gradient(0deg,#10231a66 0%,transparent 18%)}}
@media(min-width:640px) and (max-width:759px) and (orientation:landscape){.opening-baby .opening-art .opening-friend{width:74%;max-width:565px;height:62%}}

/* Keep every decoration reachable even when a mature portrait fills the scene. */
.grove-scene>.forest-set{z-index:auto;pointer-events:none}
.grove-scene>.pet{pointer-events:none}
.forest-set .placed-ornament>.ornament-touch{pointer-events:auto;min-width:44px;min-height:44px;max-width:100%;padding:0;border:0;background:transparent;box-shadow:none;border-radius:8px;touch-action:manipulation}
.forest-set .placed-ornament>.ornament-touch:focus-visible{outline:3px solid #ffe6a2;outline-offset:2px;background:#fff0b31c}


/* Quiz learning flow: keep long choices readable and controls reachable. */
.unit-card{display:grid;gap:2px;min-width:0}
.unit-card>.subject{width:100%}
.unit-card>.text-button{min-height:44px;text-align:left;padding:6px 16px}
.quiz-progress{display:grid;gap:4px;margin:10px 0}
.quiz-progress label{font-size:14px;font-weight:700}
.quiz-progress progress{display:block;margin-top:4px;height:8px}
.quiz-progress p{font-size:13px;overflow-wrap:anywhere}
.quiz-page .quiz-progress p,.quiz-page .quiz-hint p{color:#e4efdf}
.quiz-meta .tag{min-width:0;overflow-wrap:anywhere}
.quiz-hint{border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:10px 0}
.quiz-hint summary{cursor:pointer;font-weight:700;min-height:32px}
.quiz-hint p{margin-top:8px}
.quiz .option{min-height:48px;min-width:0}
.quiz-page .quiz .option>.option-copy{min-width:0;overflow-wrap:anywhere;white-space:normal;background:transparent;color:inherit;text-align:left;border-radius:0}
.quiz .option>span:first-child{flex:0 0 26px}
.quiz .option-copy small{display:block;margin-top:3px;font-size:13px}
.quiz .answer-correct:disabled{opacity:1;border:2px solid #247a5b;background:#e5f4eb;color:#183c2d}
.quiz .answer-wrong:disabled{opacity:1;border:2px solid #a44d37;background:#fff1e9;color:#633020}
.quiz .option-copy small{color:inherit}
.quiz .actions button{min-height:44px;white-space:normal}
.quiz .notice{min-width:0;overflow-wrap:anywhere}
.forest-effects{position:fixed;z-index:21;top:max(8px,env(safe-area-inset-top));right:calc(max(8px,env(safe-area-inset-right)) + 106px);min-height:44px;padding:4px 10px;border:1px solid #a69665;border-radius:20px;background:#183126;color:#f7ebc6;font-size:12px;white-space:nowrap}
.forest-effects[hidden]{display:none}
.forest-effects:focus-visible{outline:3px solid #ffe69b;outline-offset:2px}
body .forest-music{min-height:44px;width:98px}
body.quiz-page .mast,body.care-page .mast{padding-top:58px}
@media(min-width:640px) and (orientation:landscape) and (max-height:640px){
  body.quiz-page main{padding-top:60px}
  .quiz>.quiz-meta{padding-right:0;flex-wrap:wrap}
  .quiz>.quiz-progress{grid-column:1/-1;margin:4px 0 8px}
  .quiz>.quiz-companion{grid-row:3}
  .quiz>.intro{grid-row:4}
  .quiz>.options{grid-row:3 / span 2}
  .quiz>.quiz-hint{grid-column:2}
  .quiz .option{min-height:48px}
  .quiz .actions button{min-height:44px}
}

/* 축하 폭죽: 먹이 보상과 진화 순간에 색종이처럼 터집니다 */
.burst{pointer-events:none;position:absolute;left:38px;top:50%;width:0;height:0;z-index:3}
.burst i{position:absolute;left:0;top:0;width:var(--s);height:var(--s);margin:calc(var(--s)/-2);border-radius:40%;background:var(--c);opacity:0;animation:burst-fly 1.35s cubic-bezier(.12,.7,.3,1) var(--t) both}
.result .burst{left:50%;top:46%;z-index:4}
.result .burst i{animation-duration:1.8s}
.quiz-page .notice.reward-notice{position:relative}
@keyframes burst-fly{0%{opacity:0;transform:translate(0,0) scale(.3) rotate(0)}12%{opacity:1}70%{opacity:1;transform:translate(var(--x),var(--y)) scale(1) rotate(260deg)}100%{opacity:0;transform:translate(var(--x),calc(var(--y) + var(--g))) scale(.6) rotate(420deg)}}
@media (prefers-reduced-motion:reduce){.burst{display:none}}
