/* Room objects are real controls: art and hit area always move together. */
.room{height:490px;min-height:0;isolation:isolate}.room-bg{pointer-events:none}.bubble{z-index:5;pointer-events:none;top:20px;background:#fffaf0dd;border-radius:18px;padding:9px 14px;left:50%;right:auto;width:max-content;max-width:90%;transform:translateX(-50%)}
.pet-stage{--pet-size:220px;--pet-x:50%;left:var(--pet-x);bottom:17%;width:var(--pet-size);height:var(--pet-size);z-index:3;transition:left .8s ease-in-out,width 1s,height 1s,bottom .8s;}
.pet-stage.sleeping{left:80%;bottom:15%}.pet-stage.feeding{left:21%;bottom:13%}.pet-stage.playing{left:56%;bottom:9%}
.pet-touch{border:0;background:none;display:block;width:100%;height:100%;padding:0;border-radius:45%;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.pet-touch:disabled{opacity:1}.pet-art{width:100%;height:100%;overflow:visible}
.pet-stage svg{animation:none}.pet-tail{transform-box:fill-box;transform-origin:15% 85%;animation:tail-swish 3.8s ease-in-out infinite}.species-dog .pet-tail{animation-duration:1.1s}.species-rabbit .pet-tail{animation-duration:5s}.pet-ears{transform-box:fill-box;transform-origin:center bottom;animation:ear-twitch 7s ease-in-out infinite}.pet-head{transform-box:fill-box;transform-origin:center 80%;animation:look-around 11s ease-in-out infinite}.pet-body{transform-box:fill-box;transform-origin:center bottom;animation:soft-breath 3.5s ease-in-out infinite}.pet-eyes{transform-box:fill-box;transform-origin:center;animation:blink 5.7s infinite}.pet-body .pet-body{animation:none}
.sleeping .pet-tail,.sleeping .pet-ears,.sleeping .pet-head{animation:none}.sleeping .pet-body{animation:soft-breath 4.5s ease-in-out infinite}.pet-stage.sleeping{pointer-events:none}.sleeping .pet-touch{transform:rotate(8deg) scale(.86);transform-origin:center bottom}.sleep-mark{top:16%;right:15%;animation:dream 3s ease-in-out infinite;pointer-events:none}.feeding .pet-head{animation:nibble .38s ease-in-out infinite}.playing .pet-art{animation:play-hop .55s ease-in-out infinite}.cuddling .pet-head{animation:cuddle .7s ease-in-out infinite}.pet-effect{position:absolute;left:50%;top:5%;font-size:26px;color:#ba7381;pointer-events:none;animation:float-love 1.4s ease-out infinite}.feeding .pet-effect{color:#b18e5e;font-size:19px}
.room-object{position:absolute;z-index:2;border:0;background:none;padding:0;transform:translateX(-50%);width:100px;min-height:70px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.room-object svg{width:100%;height:auto;display:block;overflow:visible;filter:drop-shadow(0 7px 3px #74594714);transition:transform .2s}.room-object:hover:enabled svg{transform:translateY(-5px) rotate(-3deg)}.room-object:disabled{opacity:.65}.object-label{display:block;font-size:11px;background:#fffaf0eb;border:1px solid #e8dbca;border-radius:20px;padding:3px 9px;width:max-content;margin:0 auto;color:#746451}.room-object:focus-visible{outline-offset:7px;border-radius:15px}.food-object{left:16%;bottom:6%;width:90px}.ball-object{left:55%;bottom:3%;width:62px}.bed-object{left:82%;bottom:6%;width:142px}.bed-object .object-label{margin-top:-9px}.ball-object.is-active svg{animation:ball-roll .7s ease-in-out infinite}.food-object.is-active svg{animation:nibble .5s infinite}.room-label{bottom:auto;top:74px;left:50%;transform:translateX(-50%);white-space:nowrap;opacity:.6}.room-help{font-size:13px;color:var(--muted);text-align:center;margin:14px 0 0}.room-help strong{font-weight:600;color:#657c68}.growth{padding-top:21px;margin-top:24px;border-top:1px solid var(--line)}.growth-heading{display:flex;justify-content:space-between;align-items:center;gap:6px;font-size:13px}.growth-heading strong{font:22px Georgia,serif}.growth-track{margin-top:12px;height:7px;background:#f0e9df;border-radius:8px;overflow:hidden}.growth-track>div{height:100%;background:#b0bea3;transition:width 1s}.growth-stages{display:flex;justify-content:space-between;list-style:none;padding:0;margin:10px 0 14px;gap:4px;font-size:9px;color:#95877a}.growth-stages li{display:grid;text-align:center;gap:4px}.growth-stages li::before{content:'○';font-size:16px;line-height:1}.growth-stages li.reached{color:#467768}.growth-stages li.reached::before{content:'●'}.growth-note{font-size:12px;color:var(--muted);margin:0;line-height:1.7}.age-caption{margin-top:10px;font-size:13px;color:#7b7266}.choice svg{overflow:visible}.choice small:last-child{color:#467768}.pet-stage[data-stage="newborn"] .pet-touch{filter:drop-shadow(0 3px 0 #ffffff22)}
@keyframes blink{0%,42%,46%,100%{transform:scaleY(1)}44%{transform:scaleY(.08)}}
@keyframes tail-swish{0%,100%{transform:rotate(-8deg)}50%{transform:rotate(19deg)}}
@keyframes ear-twitch{0%,64%,76%,100%{transform:rotate(0)}67%,73%{transform:rotate(-7deg)}70%{transform:rotate(5deg)}}
@keyframes look-around{0%,25%,70%,100%{transform:rotate(0) translateX(0)}35%,48%{transform:rotate(-5deg) translateX(-2px)}80%,88%{transform:rotate(4deg) translateX(2px)}}
@keyframes soft-breath{0%,100%{transform:scaleY(1)}50%{transform:scaleY(1.025)}}
@keyframes nibble{50%{transform:translateY(5px) rotate(4deg)}}
@keyframes play-hop{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-19px) rotate(5deg)}}
@keyframes cuddle{50%{transform:rotate(-9deg) translateY(2px)}}
@keyframes dream{0%,100%{opacity:.3;transform:translateY(0)}50%{opacity:1;transform:translateY(-12px)}}
@keyframes float-love{from{opacity:0;transform:translate(-50%,15px) scale(.7)}40%{opacity:1}to{opacity:0;transform:translate(-50%,-32px) scale(1.1)}}
@keyframes ball-roll{0%,100%{transform:translateX(-18px) rotate(-45deg)}50%{transform:translateX(18px) rotate(45deg)}}
@media(max-width:760px){.room{height:410px}.pet-stage{width:calc(var(--pet-size)*.83);height:calc(var(--pet-size)*.83);bottom:20%}.pet-stage.sleeping{bottom:17%;left:77%}.pet-stage.feeding{left:24%;bottom:20%}.pet-stage.playing{left:53%;bottom:14%}.bed-object{left:79%;width:112px;bottom:10%}.food-object{left:17%;width:75px;bottom:10%}.ball-object{left:50%;width:55px;bottom:5%}.bubble{font-size:12px}.room-help{font-size:12px}.growth-stages{font-size:11px}.room-label{font-size:8px}}
/* Foreground props retain their own stacking context, including while disabled. */
.food-object,.ball-object{z-index:4}.room-object.is-active{opacity:1}
.pet-stage{bottom:var(--pet-y,17%)}
.pet-stage.walking{transition:left var(--walk-time,2s) linear,bottom var(--walk-time,2s) linear,width 1s,height 1s}
.walking .pet-touch{transform:scaleX(var(--walk-direction,1))}
.walking .pet-art{animation:idle-step .36s ease-in-out infinite}
.stretching .pet-art{transform-origin:50% 92%;animation:idle-stretch 2.2s ease-in-out}
.shaking .pet-art{transform-origin:50% 75%;animation:idle-shake .45s ease-in-out 4}
.sniffing .pet-head{animation:idle-sniff 2.2s ease-in-out}
@keyframes idle-step{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-5px) rotate(2deg)}}
@keyframes idle-stretch{0%,100%{transform:scale(1)}40%,65%{transform:scale(1.13,.85) translateY(5px)}80%{transform:scale(.97,1.04)}}
@keyframes idle-shake{0%,100%{transform:rotate(0)}25%{transform:rotate(-7deg)}75%{transform:rotate(7deg)}}
@keyframes idle-sniff{0%,100%{transform:rotate(0)}30%,70%{transform:translateY(8px) rotate(9deg)}45%,60%{transform:translateY(5px) rotate(6deg)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
