/* The generated sheet stays intact; four equal 627px windows show each pose. */
.puppy-art{display:block;width:100%;aspect-ratio:1;background:url('./assets/puppy-poses-v38.webp') 0 0/200% 200% no-repeat;pointer-events:none}
.puppy-art-chew{background-position:100% 0}.puppy-art-spit{background-position:0 100%}.puppy-art-dance{background-position:100% 100%}
/* Unpainted lower margin excludes the one-pixel start of the bottom dance cell. */
.puppy-art-ready,.puppy-art-chew{clip-path:inset(0 0 2.5% 0)}
.puppy-game-card{border-color:#e4c596}.puppy-game-card .word-game-number{color:#91623b}.puppy-game-card .word-game-choice{background:#fae8c6;color:#77542e}
.puppy-game-picture{background:radial-gradient(ellipse at 50% 100%,#e4edd2 0,transparent 65%),#fff1d7;position:relative;overflow:hidden}
.puppy-choice-art{position:absolute;width:215px;max-width:65%;right:10%;bottom:8px}
.puppy-choice-biscuit{position:absolute;display:flex;align-items:center;justify-content:center;width:146px;height:62px;left:8%;bottom:20px;transform:rotate(-12deg)}
.puppy-choice-badge{position:absolute;left:18px;top:19px;font-weight:700;background:#fffdf8;border:1px solid #e9d5af;padding:4px 12px;border-radius:18px;font-size:.85rem;transform:rotate(-4deg)}
.puppy-game{max-width:880px}.puppy-game .bridge-heading{margin-bottom:14px}.puppy-game .bridge-heading h1 span{color:#a66c3b}
.puppy-total{white-space:nowrap;border:1px solid #e6d5b5;border-radius:18px;padding:5px 13px;background:#fff7e7;font-size:.85rem;color:#82603b}.puppy-total b{font-size:1.25rem}
.puppy-topics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:14px}
.puppy-topics button{min-height:46px;background:#fffdf7;border:1px solid #e5dfd0;border-radius:12px;font-weight:700;font-size:.95rem;padding:6px 10px}.puppy-topics small{font-size:.75rem;margin-left:7px;font-weight:400;color:#777c68}
.puppy-topics button.active{background:#eaf3df;color:#41633a;border-color:#9bbb8d;box-shadow:inset 0 0 0 1px #9bbb8d}
.puppy-chapters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));list-style:none;padding:0;margin:0 0 14px;gap:7px}
.puppy-chapters li{display:flex;gap:8px;align-items:center;justify-content:center;border-radius:12px;padding:7px;background:#f0efe7;color:#7d816e;font-weight:700;line-height:1.3}
.puppy-chapters li>span{width:26px;height:26px;display:grid;place-items:center;border-radius:50%;background:#fffdf7;font-size:.85rem}.puppy-chapters small{font-size:.8rem}
.puppy-chapters .is-current{background:#f9e7bb;color:#775329}.puppy-chapters .is-current>span{background:#e8c075;color:#604622}.puppy-chapters .is-done{background:#e3edda;color:#3f643d}.puppy-chapters .is-done>span{background:#5b8250;color:#fff}
.puppy-playground{overflow:hidden;background:#fffbf0;border:1px solid #e4d8bd;border-radius:25px;box-shadow:var(--shadow)}
.puppy-yard{background:#f1f2dd center/cover no-repeat}
.puppy-yard[data-puppy-theme="fruits"]{background-color:#f2efcf;background-image:url('./assets/puppy-scene-fruits-v53.webp')}
.puppy-yard[data-puppy-theme="vegetables"]{background-color:#e8efdb;background-image:url('./assets/puppy-scene-vegetables-v53.webp')}
.puppy-yard[data-puppy-theme="snacks"]{background-color:#f8e8df;background-image:url('./assets/puppy-scene-snacks-v53.webp')}
.puppy-yard[data-puppy-theme="meals"]{background-color:#f5eedd;background-image:url('./assets/puppy-scene-meals-v53.webp')}
.puppy-scene{height:540px;position:relative;isolation:isolate;container-type:inline-size;overflow:hidden}
.puppy-topic{position:absolute;left:6%;top:52px;width:32%;text-align:center;transform:rotate(-3deg);padding:22px 12px 17px;border:2px solid #dabb89;border-radius:15px;background:#fffdf4;box-shadow:0 5px 0 #e2c79a40;color:#74573c}
.puppy-topic:before,.puppy-topic:after{content:'';position:absolute;top:11px;width:6px;height:6px;border-radius:50%;background:#caab7a}.puppy-topic:before{left:12px}.puppy-topic:after{right:12px}
.puppy-topic-label{display:block;font-size:.8rem;color:#8d836b}.puppy-topic strong{display:block;line-height:1.2;margin:8px 0 4px;font-size:clamp(18px,4.25cqw,37px);color:#587444;white-space:nowrap}.puppy-topic-ko{font-size:1rem}.puppy-topic>small{display:block;font-size:.8rem;margin-top:6px}
.puppy-mini-paws{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;width:100%;max-width:124px;margin:15px auto 0}.puppy-mini-paws span{display:block;flex:0 0 25px;width:25px;height:25px;color:#e0ddd1}.puppy-mini-paws svg{width:100%;height:100%;fill:currentColor}.puppy-mini-paws .is-fed{color:#92af6e}
.puppy-character,.puppy-mouth-layer{position:absolute;right:8%;top:38px;width:38%;max-width:290px;aspect-ratio:1}
.puppy-character{pointer-events:none}.puppy-mouth-layer{pointer-events:none;z-index:3}
.puppy-character:before{content:'';position:absolute;left:15%;right:12%;height:9%;bottom:5%;border-radius:50%;background:#b5be8b38;z-index:-1}
.puppy-mouth{position:absolute;left:28%;top:36%;width:41%;height:29%;min-width:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:transparent;pointer-events:none}
.puppy-speech-row{position:relative;height:130px;pointer-events:none}
.puppy-hunger{position:absolute;left:6%;top:12px;width:32%;max-width:310px;color:#795533;text-align:center;z-index:1}
.puppy-hunger-head{font-size:1.05rem;font-weight:700;line-height:1.2;white-space:nowrap}
.puppy-hunger-head>span{display:inline-block;padding:0 8px;border-radius:10px;background:#fffdf4eb}
.puppy-hunger-track{height:104px;margin:4px 0 3px}
.puppy-hunger-paw{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 3px 2px #aa795d26)}
.puppy-hunger-outline{fill:#faf0d3;stroke:#87452f;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.puppy-hunger-pad{fill:#fff;stroke:#87452f;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.puppy-hunger-piece.is-filled .puppy-hunger-pad{fill:#f4aac0}
.puppy-hunger-piece.is-new{transform-box:fill-box;transform-origin:center;animation:puppy-pad-fill .55s ease-out both}
.puppy-hunger-status{display:inline-block;padding:0 6px;border-radius:9px;background:#fffdf4eb;font-size:.85rem;line-height:1.2;color:#786956;white-space:nowrap;vertical-align:top}.puppy-hunger.is-full .puppy-hunger-status{color:#8c5e50}
/* The tail tip is at 45% of the bubble; the 44% offset aims it at the dog's center. */
.puppy-speech-anchor{position:absolute;right:8%;top:calc(100% + 38px);width:38%;max-width:290px;aspect-ratio:1;z-index:4}
.puppy-reaction{position:absolute;left:50%;bottom:calc(92% + 2px);display:block;width:min(200px,85%);aspect-ratio:200/108;transform:translateX(-44%);font-size:1.875rem;line-height:1.2;font-weight:700;white-space:nowrap;color:#92714c;--bubble-outline:#d9bd91}
.puppy-bubble-shape{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 3px 2px #a9824d12)}
.puppy-bubble-shape path{fill:#fffef9;stroke:var(--bubble-outline);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.puppy-reaction-text{position:absolute;inset:0 9% 18%;display:grid;place-items:center;transform:rotate(-3deg)}
.is-chew .puppy-art{animation:puppy-chew .23s ease-in-out 3}.is-spit .puppy-art{animation:puppy-spit .45s ease-out}.is-spit .puppy-reaction{bottom:calc(100% + 4px);color:#b16247;--bubble-outline:#dfa98d}.is-dance .puppy-art{animation:puppy-dance .65s ease-in-out infinite;transform-origin:50% 90%}.is-dance .puppy-reaction{bottom:calc(100% + 28px);color:#607f40}
.puppy-treat-field{position:absolute;right:5%;bottom:24px;width:72%;height:176px}
.puppy-treat,.puppy-flying-treat{position:absolute;display:flex;align-items:center;justify-content:center;padding:0 14px 2px;border:0;background:transparent;user-select:none;-webkit-user-select:none;touch-action:manipulation;color:#69472b;line-height:1.15}
.puppy-treat{width:46%;height:70px;cursor:pointer;transform:rotate(var(--tilt));z-index:2;transition:opacity .15s,filter .15s;-webkit-touch-callout:none}
.puppy-treat-0{left:1%;top:0;--tilt:-7deg}.puppy-treat-1{right:2%;top:8px;--tilt:5deg}.puppy-treat-2{left:3%;bottom:0;--tilt:4deg}.puppy-treat-3{right:0;bottom:-4px;--tilt:-5deg}
.puppy-biscuit{position:absolute;width:100%;height:100%;inset:0;overflow:visible;filter:drop-shadow(0 4px 0 #ad8d5e26);pointer-events:none}
.puppy-treat-word{position:relative;z-index:1;text-align:center;font-size:clamp(15px,2.25cqw,20px);font-weight:800;color:#fff;-webkit-text-stroke:.2px #fff;text-shadow:0 1px 1px #542d1a90;overflow-wrap:normal;pointer-events:none}
.puppy-treat-number{position:absolute;left:7%;top:4%;z-index:1;background:#754426;color:#fff;font-weight:700;width:23px;height:23px;display:grid;place-items:center;font-size:.7rem;border-radius:50%;border:1px solid #c9915e;pointer-events:none}
.puppy-treat.is-rejected{opacity:.45;filter:saturate(.5)}.puppy-rejected-mark{position:absolute;right:7%;top:4%;color:#a3573d;font-weight:700;font-size:24px;line-height:1}.puppy-treat.is-eaten{opacity:0;pointer-events:none}
.puppy-flying-treat{position:absolute;z-index:5;pointer-events:none;transform:translate(-50%,-50%);animation:puppy-feed-flight var(--flight-duration,420ms) cubic-bezier(.25,.65,.4,1) both;filter:drop-shadow(0 6px 4px #68513925)}
.puppy-flying-treat .puppy-treat-word{font-size:17px}
.puppy-spat-treat{position:absolute;right:28%;top:155px;width:150px;height:55px;display:flex;align-items:center;justify-content:center;z-index:4;pointer-events:none;animation:puppy-toss .75s ease-in forwards}.puppy-spat-treat .puppy-treat-word{font-size:15px}
.puppy-feedback{position:relative;padding:16px 22px 17px;min-height:94px;text-align:center;border-top:1px dashed #dbd7bd;background:#fffdf7;color:#577347;line-height:1.5}.puppy-feedback strong{font-size:1.15rem}.puppy-feedback p{font-size:.9rem;color:#7d7965;margin:4px 0 0}.puppy-feedback.is-wrong strong{color:#aa6143}
.puppy-help{text-align:center;font-size:.9rem;margin:12px 0 0;color:#687659;line-height:1.5}.puppy-help span{color:#8b8c7d;font-size:.8rem}
.puppy-stage-clear{position:absolute;left:10%;right:10%;bottom:38px;padding:14px 16px;border:1px solid #d9c99f;border-radius:18px;background:#fffdf3ed;text-align:center;color:#5c763d}.puppy-stage-clear strong{display:block;font-size:1.8rem;letter-spacing:1px}.puppy-stage-clear span{display:block;font-size:.9rem;color:#877550;margin-top:4px}
.puppy-celebrate{position:absolute;inset:0;pointer-events:none;color:#dba748}.puppy-celebrate i{position:absolute;font-size:42px;font-style:normal;animation:puppy-sparkle .8s ease-in-out infinite alternate}.puppy-celebrate i:nth-child(1){left:41%;top:8%;font-size:30px}.puppy-celebrate i:nth-child(2){right:1%;top:45%;color:#82a268;animation-delay:-.3s}.puppy-celebrate i:nth-child(3){left:38%;top:59%;color:#d79883;animation-delay:-.6s}.puppy-celebrate i:nth-child(4){right:8%;top:3%;animation-delay:-.2s}
.puppy-fireworks{position:absolute;inset:auto 0 0;height:210px;overflow:hidden;pointer-events:none;z-index:1}
.puppy-final-burst{position:absolute;width:clamp(105px,20cqw,170px);aspect-ratio:1;opacity:0;animation:puppy-firework 1.45s ease-out both;color:#dbaa49;left:-2%;top:10px}
.puppy-final-burst svg{display:block;width:100%;height:100%}.puppy-final-burst:nth-child(2){left:auto;right:-2%;top:28px;color:#9caf79;animation-delay:.2s}.puppy-final-burst:nth-child(3){left:3%;top:32px;color:#d9998c;animation-delay:.85s}.puppy-final-burst:nth-child(4){left:auto;right:3%;top:6px;color:#a39ac4;animation-delay:1.05s}
.puppy-finale-banner{position:absolute;left:50%;bottom:24px;transform:translateX(-50%);width:calc(100% - 104px);max-width:620px;padding:14px 18px 13px;border:2px solid #d4ac61;border-radius:19px;background:#ffedbd;text-align:center;color:#54713f;box-shadow:0 5px 0 #d4ac6129;z-index:2;animation:puppy-banner-in .5s cubic-bezier(.2,.85,.3,1.2) both}
.puppy-finale-banner:before,.puppy-finale-banner:after{content:'';position:absolute;top:24px;width:24px;height:52px;background:#e8c57e;z-index:-1}.puppy-finale-banner:before{right:calc(100% + 2px);clip-path:polygon(0 0,100% 0,100% 100%,0 100%,30% 50%)}.puppy-finale-banner:after{left:calc(100% + 2px);clip-path:polygon(0 0,100% 0,70% 50%,100% 100%,0 100%)}
.puppy-finale-label{display:block;font-size:.7rem;line-height:1.4;letter-spacing:2px;color:#94703a;font-weight:700;margin-bottom:5px}.puppy-finale-banner h2{font-size:clamp(23px,3.6cqw,30px);line-height:1.3;letter-spacing:-.5px;word-break:keep-all}.puppy-finale-banner h2 span{display:inline-block}.puppy-finale-banner h2:focus{outline:none}.puppy-finale-banner p{margin-top:8px;font-size:.85rem;line-height:1.5;color:#8c7146}.puppy-finale-banner p span{color:#c69a42;margin:0 5px}
.puppy-result-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:18px}.puppy-result-actions .btn{min-height:46px}
.puppy-playground.is-paused *{animation-play-state:paused!important}
@keyframes puppy-feed-flight{0%{opacity:1;transform:translate(-50%,-50%) rotate(-4deg) scale(1)}55%{opacity:1;transform:translate(calc(-50% + var(--flight-mid-x)),calc(-50% + var(--flight-mid-y))) rotate(8deg) scale(.7)}100%{opacity:0;transform:translate(calc(-50% + var(--flight-x)),calc(-50% + var(--flight-y))) rotate(-8deg) scale(.08)}}
@keyframes puppy-chew{0%,100%{transform:scale(1)}50%{transform:scale(1.035,.965) translateY(2px)}}
@keyframes puppy-spit{20%{transform:translateX(6px) rotate(2deg)}50%{transform:translateX(-8px) rotate(-3deg)}80%{transform:translateX(3px)}}
@keyframes puppy-dance{0%,100%{transform:translateY(0) rotate(-7deg)}50%{transform:translateY(-12px) rotate(7deg)}}
@keyframes puppy-toss{0%{opacity:1;transform:translate(0,0) scale(.4) rotate(0)}40%{opacity:1;transform:translate(-70px,-25px) rotate(-35deg)}100%{opacity:0;transform:translate(-140px,105px) rotate(-90deg)}}
@keyframes puppy-sparkle{to{transform:translateY(-12px) rotate(10deg);opacity:.5}}
@keyframes puppy-firework{0%{opacity:0;transform:translateY(30px) scale(.08)}12%{opacity:1}65%{opacity:.9;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(16px) scale(1.18)}}
@keyframes puppy-banner-in{from{opacity:0;transform:translate(-50%,12px) scale(.9)}to{opacity:1;transform:translate(-50%,0) scale(1)}}
@keyframes puppy-pad-fill{0%{opacity:.35;transform:scale(.82)}65%{opacity:1;transform:scale(1.07)}100%{opacity:1;transform:scale(1)}}
@media(max-width:650px){
 .puppy-game .bridge-heading{align-items:center;gap:8px}.puppy-game .bridge-heading h1{font-size:1.45rem}.puppy-game .bridge-heading .eyebrow{font-size:.65rem;letter-spacing:1.1px}.puppy-total{font-size:.7rem;padding:3px 9px}.puppy-total b{font-size:1.1rem}
 .puppy-topics{gap:5px;margin-bottom:10px}.puppy-topics button{padding:5px 2px;font-size:.85rem}.puppy-topics small{font-size:.65rem;margin-left:4px}
 .puppy-chapters{gap:5px;margin-bottom:11px}.puppy-chapters li{flex-direction:column;gap:3px;padding:6px 2px}.puppy-chapters small{font-size:.65rem}.puppy-chapters li>span{width:24px;height:24px;font-size:.8rem}
 .puppy-playground{border-radius:18px}.puppy-scene{height:clamp(402px,calc(56vw + 202px),497px)}
 .puppy-topic{left:4%;top:29px;width:37%;padding:15px 7px 11px;border-width:1.5px;transform:rotate(-3deg);border-radius:12px}.puppy-topic-label{font-size:.65rem}.puppy-topic strong{font-size:clamp(17px,4.8cqw,27px);margin-top:8px;letter-spacing:-.4px}.puppy-topic-ko{font-size:.8rem}.puppy-topic>small{font-size:.65rem;margin-top:7px}.puppy-mini-paws{gap:4px;max-width:80px;margin-top:10px}.puppy-mini-paws span{flex-basis:17px;width:17px;height:17px}
 .puppy-character,.puppy-mouth-layer{right:1.5%;top:34px;width:56%;max-width:245px}.puppy-speech-row{height:clamp(112px,calc(28vw + 18px),128px)}.puppy-speech-anchor{right:1.5%;top:calc(100% + 34px);width:56%;max-width:245px}.puppy-reaction{width:min(184px,92%);font-size:1.5rem}.puppy-bubble-shape path{stroke-width:1.75}
 .puppy-hunger{left:4%;top:10px;width:37%}.puppy-hunger-head{font-size:.95rem}.puppy-hunger-track{height:78px;margin:3px 0 2px}.puppy-hunger-outline,.puppy-hunger-pad{stroke-width:2}.puppy-hunger-status{font-size:.75rem}
 .puppy-treat-field{right:2%;width:96%;bottom:22px;height:152px}.puppy-treat{width:46%;height:65px;padding-inline:10px}.puppy-treat-word{font-size:clamp(14px,4.35cqw,18px)}.puppy-treat-number{width:20px;height:20px;font-size:.65rem;top:4%}
 .puppy-spat-treat{top:109px;right:19%;width:120px;height:50px}
 .puppy-feedback{padding:13px 13px 14px;min-height:95px}.puppy-feedback strong{font-size:1rem}.puppy-feedback p{font-size:.8rem;line-height:1.5}.puppy-help{font-size:.85rem;margin-top:10px}.puppy-help span{font-size:.75rem}
 .puppy-stage-clear{bottom:55px;left:5%;right:5%}.puppy-stage-clear strong{font-size:1.3rem}.puppy-stage-clear span{font-size:.8rem}.puppy-celebrate i{font-size:30px}.puppy-celebrate i:nth-child(1){left:40%;top:5%;font-size:22px}.puppy-celebrate i:nth-child(2){top:54%}.puppy-celebrate i:nth-child(3){left:18%;top:56%}
 .puppy-fireworks{height:190px}.puppy-final-burst{width:clamp(105px,25cqw,145px);left:-6%;top:2px}.puppy-final-burst:nth-child(2){right:-6%;top:18px}.puppy-final-burst:nth-child(3){left:-2%;top:24px}.puppy-final-burst:nth-child(4){right:-2%;top:0}
 .puppy-finale-banner{width:calc(100% - 48px);bottom:22px;padding:11px 10px 10px;border-radius:16px}.puppy-finale-banner:before,.puppy-finale-banner:after{width:17px;height:46px;top:30px}.puppy-finale-label{font-size:.6rem;letter-spacing:1.2px;margin-bottom:6px}.puppy-finale-banner h2{font-size:clamp(22px,5.2cqw,26px);line-height:1.3}.puppy-finale-banner h2 span{display:block}.puppy-finale-banner p{font-size:.72rem;margin-top:8px}.puppy-finale-banner p span{margin:0 2px}
 .puppy-result-actions{gap:8px}.puppy-result-actions .btn{font-size:.85rem}.puppy-result-actions .btn:first-child{flex-basis:100%;justify-content:center}
}
@media(min-width:451px) and (max-width:650px){.puppy-scene{height:497px}.puppy-treat-field{height:176px}}
@media(max-width:360px){.puppy-game .bridge-heading h1{font-size:1.3rem}.puppy-topics small{display:block;margin:0;line-height:1.2}.puppy-topic strong{font-size:16px}.puppy-treat-word{font-size:14px}.puppy-flying-treat .puppy-treat-word{font-size:14px}}
@media(prefers-reduced-motion:reduce){.puppy-game *,.puppy-flying-treat{animation:none!important;transition:none!important}.puppy-spat-treat{display:none}}
