@font-face{font-family:Rubik;src:url('assets/fonts/rubik-latin-v31.woff2')}*{box-sizing:border-box}body{margin:0;color:#30251f;background:#e9e7e1;font-family:Rubik,system-ui}main{width:min(1040px,calc(100% - 24px));margin:auto;padding:16px 0 52px}.topbar{display:flex;align-items:center;gap:9px;padding:0 4px}.topbar img{width:42px;height:42px}.topbar span{margin-left:auto;font-weight:750}.tabs{display:flex;gap:22px;margin:12px 0 18px;border-bottom:1px solid #b7b0a8}.tabs button{padding:11px 2px;border:0;color:#5e564f;background:transparent;font:inherit;font-weight:750;cursor:pointer}.tabs .active{color:#246c9e;box-shadow:inset 0 -3px #368fce}.pet-panel,.sheet{border-radius:28px;background:#faf9f6;box-shadow:0 16px 42px #30251f14}.pet-panel{position:sticky;top:12px;padding:18px;background:#30251f;color:#fffaf2;z-index:2}.pet-panel h1{margin:10px 0 3px;font-size:1.35rem}.pet-panel p{margin:5px 0}.bar{height:12px;overflow:hidden;border-radius:10px;background:#5b4b41}.bar i{display:block;height:100%;background:#368fce}.sheet{padding:26px}.daily-panel{min-width:0}.section-heading,.ledger-heading{display:flex;align-items:start;justify-content:space-between;gap:12px}.section-heading h2,.ledger-heading h2{margin:0;font-size:2rem;letter-spacing:-.045em}.section-heading p{margin:6px 0 0;color:#5e564f;font-size:1rem}.section-heading strong{color:#246c9e;font-size:1.65rem}.week-picker{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin:26px 0 20px}.day-button{position:relative;display:grid;min-height:84px;padding:7px 2px;place-items:center;border:0;border-radius:22px;color:#5e564f;background:transparent;font:inherit;cursor:pointer}.day-button span{font-size:.76rem;font-weight:800}.day-button b{font-size:1.35rem}.day-button.has-data:after{position:absolute;bottom:7px;width:8px;height:8px;border-radius:50%;background:#368fce;content:''}.day-button.selected{color:#fff;background:#30251f}.day-button.selected.has-data:after{background:#fff}.task-list{border-top:1px solid #b7b0a8}.task{display:grid;width:100%;grid-template-columns:68px minmax(0,1fr) 54px;gap:16px;align-items:center;min-height:112px;padding:12px 0;border:0;border-bottom:1px solid #b7b0a8;color:#30251f;background:transparent;font:inherit;font-size:1.22rem;font-weight:760;text-align:left;cursor:pointer}.task>img{width:64px;height:64px;object-fit:contain;image-rendering:pixelated}.task i{display:grid;width:54px;height:54px;place-items:center;border:2px solid #b7b0a8;border-radius:50%;color:white;font-style:normal}.task.done{color:#5e564f;background:#e6e4de}.task.done span{text-decoration:line-through}.task.done i{border-color:#368fce;background:#368fce}.mood-check,.three-rbt{margin-top:20px;padding-top:22px;border-top:1px solid #b7b0a8}.mood-title{display:grid;grid-template-columns:62px 1fr;gap:12px;align-items:center;margin-bottom:16px}.mood-title img{width:56px;height:56px;object-fit:contain;image-rendering:pixelated}.mood-title h3{margin:0;font-size:1.3rem}.mood-title p{margin:3px 0 0;color:#5e564f}.mood-options{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.mood-options button{display:grid;min-height:104px;place-items:center;border:0;border-radius:22px;color:#5e564f;background:#e4e1db;font:inherit;font-size:.8rem;font-weight:760;cursor:pointer}.mood-options img{width:48px;height:48px;object-fit:contain;image-rendering:pixelated}.mood-options button[aria-pressed=true]{color:#fff;background:#368fce}.rbt-toggle{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;padding:6px 0;border:0;color:#30251f;background:transparent;font:inherit;text-align:left;cursor:pointer}.rbt-title{display:flex;gap:12px;align-items:center}.rbt-title img{width:50px;height:50px;object-fit:contain;image-rendering:pixelated}.rbt-title strong,.rbt-title small{display:block}.rbt-title strong{font-size:1.25rem}.rbt-title small{margin-top:3px;color:#5e564f;font-size:.95rem;font-weight:500}.rbt-toggle>#rbt-count{font-size:1.1rem;font-weight:800}.rbt-fields{padding:18px 0 4px}.rbt-fields>p{margin:0 0 17px;color:#5e564f;line-height:1.48}.reflection{display:grid;gap:8px;margin:18px 0}.reflection span{display:flex;gap:8px;align-items:center;font-weight:800}.reflection img{width:30px;height:30px;object-fit:contain;image-rendering:pixelated}.reflection textarea{width:100%;min-height:112px;resize:vertical;border:1px solid #b7b0a8;border-radius:22px;padding:15px;color:#30251f;background:#fffefa;font:inherit;font-size:1rem}.reflection textarea:focus{border-color:#246c9e;outline:3px solid #cfeaf3}.week-ledger{margin-top:18px}.ledger-heading{align-items:center;margin-bottom:20px}.ledger-heading span{color:#5e564f;font-weight:700}.ledger-scroll{overflow:auto;border:1px solid #b7b0a8}table{width:100%;min-width:720px;border-collapse:collapse}th,td{min-width:62px;padding:10px 7px;border-right:1px solid #b7b0a8;border-bottom:1px solid #b7b0a8;text-align:center}thead th{color:#5e564f;background:#dfdcd5;font-size:.78rem;text-transform:uppercase}thead th:first-child{min-width:205px;text-align:left}tbody th{display:flex;gap:9px;align-items:center;color:#30251f;background:#e3e0da;text-align:left;font-size:.88rem}tbody th img{width:38px;height:38px;object-fit:contain;image-rendering:pixelated}.ledger-dot{display:inline-grid;width:36px;height:36px;place-items:center;border-radius:50%;color:white;background:#368fce;font-weight:800}#room{position:relative;display:grid;height:205px;place-items:center;overflow:hidden;border-radius:18px;background:#000}#pet{z-index:2;height:205px;max-width:230px;object-fit:contain}#equipped{position:absolute;inset:0;z-index:3;pointer-events:none}.room-prop{position:absolute;object-fit:contain}.room-prop--teddy{width:64px;bottom:-4px;left:5px}.room-prop--ball{width:46px;bottom:4px;right:8px}.room-prop--plant{width:70px;bottom:-5px;right:-5px}.room-prop--books{width:66px;bottom:4px;left:57px}.room-prop--garland{width:190px;top:-34px;left:50%;transform:translateX(-50%)}.room-prop--rug{width:155px;bottom:-27px;left:50%;transform:translateX(-50%);z-index:-1}.room-prop--crayons{width:48px;bottom:5px;right:55px}.room-prop--aquarium{width:72px;bottom:-5px;left:-4px}.room-prop--balloons{width:80px;top:-15px;right:-12px}#items{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.item{min-height:108px;padding:10px;border-radius:12px;background:#eceae5;display:grid;grid-template-columns:72px 1fr;grid-template-rows:1fr auto;column-gap:8px}.shop-preview{grid-row:span 2;width:72px;height:82px;object-fit:contain}.item b,.item small{display:block}.item-copy{align-self:center}.item button{margin:8px 4px 0 0;padding:7px;border:0;border-radius:9px;color:#30251f;background:#d6ebe6;font:inherit;font-size:.8rem;cursor:pointer}.item button:disabled{opacity:.45}.item-actions{white-space:nowrap}@media(min-width:800px){#home{display:grid;grid-template-columns:320px minmax(0,1fr);gap:18px}.pet-panel{grid-row:span 2}.week-ledger{grid-column:2}}@media(max-width:560px){main{width:min(100% - 16px,650px)}.sheet{padding:22px 16px}.section-heading h2,.ledger-heading h2{font-size:1.8rem}.week-picker{gap:5px}.day-button{min-height:74px;border-radius:18px}.task{grid-template-columns:58px minmax(0,1fr) 45px;gap:11px;min-height:88px;font-size:1rem}.task>img{width:54px;height:54px}.task i{width:44px;height:44px}.mood-options button{min-height:90px;border-radius:18px}.mood-options img{width:43px;height:43px}}
.ledger-mood{width:36px;height:36px;object-fit:contain;image-rendering:pixelated}
#pet.egg-wiggle{animation:egg-wiggle .82s steps(1,end)}#pet.pet-hop{animation:pet-hop .82s cubic-bezier(.22,.8,.35,1)}@keyframes egg-wiggle{0%,100%{transform:translateX(0) rotate(0)}12%{transform:translateX(-9px) rotate(-6deg)}25%{transform:translateX(9px) rotate(6deg)}38%{transform:translateX(-7px) rotate(-5deg)}51%{transform:translateX(7px) rotate(5deg)}64%{transform:translateX(-4px) rotate(-3deg)}77%{transform:translateX(4px) rotate(3deg)}}@keyframes pet-hop{0%,100%{transform:translateY(0)}18%{transform:translateY(0) scale(1.03,.95)}49%{transform:translateY(-26px) scale(.98,1.04)}72%{transform:translateY(-8px) scale(1.02,.98)}}@media(prefers-reduced-motion:reduce){#pet.egg-wiggle,#pet.pet-hop{animation:none}}
@media(min-width:800px){.pet-panel{grid-column:1;grid-row:1;align-self:start}.daily-panel{grid-column:2;grid-row:1}.week-ledger{grid-column:1/-1;grid-row:2}}
.tabs a{padding:11px 2px;border:0;color:#5e564f;background:transparent;font:inherit;font-weight:750;text-decoration:none;cursor:pointer}.tabs a.active{color:#246c9e;box-shadow:inset 0 -3px #368fce}
#evolve{width:100%;margin-top:12px;padding:12px;border:0;border-radius:12px;color:#30251f;background:#fffaf2;font:inherit;font-weight:800;cursor:pointer}#evolve:disabled{opacity:.65}#room.evolving{animation:evolution-flash .99s steps(1,end)}#room.evolution-pop:after{position:absolute;inset:0;z-index:5;pointer-events:none;background:radial-gradient(circle,#fffaf2 0 8%,transparent 9%);background-size:22px 22px;content:'';animation:evolution-pop .82s ease-out}@keyframes evolution-flash{0%,100%{background:#000}12%,36%,60%,84%{background:#fffaf2}}@keyframes evolution-pop{0%{opacity:0;transform:scale(.4)}24%{opacity:1;transform:scale(1.1)}100%{opacity:0;transform:scale(1.8)}}@media(prefers-reduced-motion:reduce){#room.evolving,#room.evolution-pop:after{animation:none}}
#sync-button,#sync-create,#sync-copy{border:0;border-radius:10px;padding:8px 11px;color:#fff;background:#368fce;font:inherit;font-weight:750;cursor:pointer}#sync-button{margin-left:auto}.topbar #coins{margin-left:0}.sync-panel{margin:0 0 18px}.sync-heading{display:flex;justify-content:space-between;gap:16px;align-items:start}.sync-heading h2{margin:0;font-size:1.55rem}.sync-heading p,.sync-panel p{color:#5e564f;line-height:1.45}.sync-heading button{border:0;background:transparent;color:#30251f;font:inherit;font-size:2rem;line-height:1;cursor:pointer}.sync-panel label{display:block;margin:14px 0 6px;font-size:.9rem;font-weight:800}.sync-panel input{width:100%;padding:11px;border:1px solid #b7b0a8;border-radius:10px;color:#30251f;background:#fffefa;font:inherit}.sync-panel #sync-copy{margin-top:10px}
#devolve{width:100%;margin-top:8px;padding:10px;border:1px solid #fffaf2;border-radius:12px;color:#fffaf2;background:transparent;font:inherit;font-weight:750;cursor:pointer}#devolve:disabled{opacity:.65}

/* Lena's care HUD keeps the full room width while reserving only its left quarter. */
#room{height:clamp(270px,76vw,360px);place-items:initial}
#pet{position:absolute;right:0;bottom:0;width:75%;height:92%;max-width:none;object-fit:contain;object-position:center bottom}
.care-hud{position:absolute;inset:12px auto 8px 8px;z-index:5;display:grid;width:calc(25% - 10px);grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;pointer-events:none}
.care-meter{display:grid;min-width:0;grid-template-rows:minmax(0,1fr) 27px 13px;place-items:center;gap:3px}
.care-pill{position:relative;width:clamp(12px,3.3vw,20px);height:100%;min-height:150px;overflow:hidden;border:2px solid #fff4d7;border-radius:999px;background:#141414;box-shadow:0 0 0 1px #2b211c}
.care-pill i{position:absolute;inset:0;height:100%;background:#368fce;transform:scaleY(1);transform-origin:center bottom;transition:transform .35s ease,background-color .25s ease}
.care-pill i[data-band="yellow"]{background:#f3c33b}.care-pill i[data-band="orange"]{background:#ef8c32}.care-pill i[data-band="red"]{background:#d94b45}
.care-meter img{width:26px;height:26px;object-fit:contain;image-rendering:pixelated}
.care-meter span{overflow:visible;color:#fff4d7;font-size:clamp(.42rem,1.7vw,.62rem);font-weight:800;letter-spacing:.02em;line-height:1;text-transform:uppercase;white-space:nowrap}
#poop-layer{position:absolute;inset:0;z-index:4;pointer-events:none}
.poop-prop{position:absolute;right:16px;bottom:12px;width:39px;height:39px;object-fit:contain;image-rendering:pixelated}
.poop-prop--2{right:58px;bottom:11px}.poop-prop--3{right:18px;bottom:50px}.poop-prop--4{right:72px;bottom:13px}.poop-prop--5{right:60px;bottom:48px}
.care-animation{position:absolute;inset:0 0 0 25%;z-index:6;overflow:hidden;pointer-events:none}
.care-animation img{position:absolute;opacity:0;object-fit:contain;image-rendering:pixelated;will-change:transform,opacity,clip-path}
.care-animation--water .care-anim-tap{top:2%;left:calc(13% - 36px);width:90px}.care-animation--water .care-anim-bowl{bottom:1%;left:13%;width:78px}.care-animation--water .care-anim-stream{top:25%;left:calc(13% + 4px);width:70px;height:174px;object-fit:fill}.care-animation--water .care-anim-splash{bottom:15%;left:calc(13% - 3px);z-index:2;width:84px}
.care-animation--water.is-playing .care-anim-tap,.care-animation--water.is-playing .care-anim-bowl{animation:care-slide-in 1.75s cubic-bezier(.16,1,.3,1) both}.care-animation--water.is-playing .care-anim-stream{animation:care-water-flow 1.75s ease-in-out both}.care-animation--water.is-playing .care-anim-splash{animation:care-water-splash 1.75s ease-in-out both}
.care-animation--food .care-anim-food-bag{top:2%;left:10%;width:104px}.care-animation--food .care-anim-bowl{bottom:1%;left:15%;width:84px}.care-animation--food .care-anim-carrot{bottom:5%;left:calc(15% + 22px);z-index:1;width:40px}.care-animation--food .care-anim-food-finished{z-index:2}
.care-animation--food.is-playing .care-anim-food-bag{animation:care-food-pour 1.85s cubic-bezier(.16,1,.3,1) both}.care-animation--food.is-playing .care-anim-food-empty{animation:care-food-empty-bowl 1.85s cubic-bezier(.16,1,.3,1) both}.care-animation--food.is-playing .care-anim-carrot{animation:care-carrot-drop 1.85s cubic-bezier(.45,.05,.55,.95) both}.care-animation--food.is-playing .care-anim-food-finished{animation:care-food-finished 1.85s cubic-bezier(.16,1,.3,1) both}
.care-animation--fun .care-anim-ball{bottom:12%;left:0;width:62px}.care-animation--fun.is-playing .care-anim-ball{animation:care-ball-play 1.45s linear both}
.care-animation--clean .care-anim-broom{bottom:-4%;left:-150px;width:142px}.care-animation--clean .care-anim-whoosh{bottom:1%;left:-150px;width:142px}.care-animation--clean .care-anim-sparkles{top:12%;left:18%;width:180px}
.care-animation--clean.is-playing .care-anim-broom{animation:care-sweep 1.25s cubic-bezier(.45,.05,.55,.95) both}.care-animation--clean.is-playing .care-anim-whoosh{animation:care-whoosh 1.25s ease-out both}.care-animation--clean.is-playing .care-anim-sparkles{animation:care-clean-sparkles 1.85s steps(2,end) both}
@keyframes care-slide-in{0%,100%{opacity:0;transform:translateX(-115%)}16%,78%{opacity:1;transform:translateX(0)}}
@keyframes care-water-flow{0%,25%,78%,100%{opacity:0;clip-path:inset(0 0 100% 0)}34%,68%{opacity:1;clip-path:inset(0)}}
@keyframes care-water-splash{0%,36%,74%,100%{opacity:0;transform:scale(.7)}43%{opacity:1;transform:scale(1)}52%{opacity:.6;transform:scale(.84)}61%{opacity:1;transform:scale(1.05)}69%{opacity:.65;transform:scale(.9)}}
@keyframes care-food-pour{0%,100%{opacity:0;transform:translate(-70%,-55%)}16%,64%{opacity:1;transform:translate(0,0)}}
@keyframes care-food-empty-bowl{0%,100%{opacity:0;transform:translateX(-115%)}16%,56%{opacity:1;transform:translateX(0)}61%,100%{opacity:0;transform:translateX(0)}}
@keyframes care-food-finished{0%,57%{opacity:0;transform:translateX(0)}62%,86%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-115%)}}
@keyframes care-carrot-drop{0%,30%{opacity:0;transform:translateY(-260px) rotate(-12deg)}36%{opacity:1}56%{opacity:1;transform:translateY(0) rotate(18deg)}61%,100%{opacity:0;transform:translateY(0) rotate(18deg)}}
@keyframes care-ball-play{0%{opacity:0;transform:translate(-110%,0) rotate(0)}8%{opacity:1}20%{transform:translate(0,-92px) rotate(72deg)}40%{transform:translate(110%,0) rotate(150deg)}60%{transform:translate(230%,-72px) rotate(230deg)}80%{opacity:1;transform:translate(350%,0) rotate(310deg)}100%{opacity:0;transform:translate(470%,-38px) rotate(390deg)}}
@keyframes care-sweep{0%{left:-150px;opacity:0;transform:scaleX(-1) rotate(-5deg)}8%{opacity:1}76%{left:calc(100% - 20px);opacity:1;transform:scaleX(-1) rotate(8deg)}100%{left:100%;opacity:0;transform:scaleX(-1) rotate(8deg)}}
@keyframes care-whoosh{0%,8%{left:-160px;opacity:0}20%{opacity:.95}78%{left:calc(100% - 100px);opacity:.8}100%{left:100%;opacity:0}}
@keyframes care-clean-sparkles{0%,58%{opacity:0;transform:scale(.72)}66%,86%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.08)}}
#room + .bar{margin-top:12px}.pet-care{margin-top:18px;padding:20px 24px}.daily-panel{margin-top:18px}
.care-toggle{display:flex;width:100%;align-items:center;justify-content:space-between;padding:0;border:0;color:#30251f;background:transparent;font:inherit;font-size:1.35rem;font-weight:800;cursor:pointer}
.care-chevron{font-size:1.5rem;line-height:1;transition:transform .2s ease}.care-toggle[aria-expanded="false"] .care-chevron{transform:rotate(180deg)}
.care-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:16px}.care-actions[hidden]{display:none}
.care-actions button{display:grid;min-width:0;min-height:112px;grid-template-rows:76px auto;place-items:center;padding:4px 8px;border:0;border-right:1px solid #d1cbc3;color:#246c9e;background:transparent;font:inherit;font-weight:800;cursor:pointer}
.care-actions button:last-child{border-right:0}.care-actions button:active{background:#eef5fa}.care-actions button:disabled{opacity:.38;cursor:default}
.care-actions img{width:70px;height:70px;object-fit:contain;image-rendering:pixelated}.care-actions span{line-height:1.05;text-align:center}
@media(min-width:800px){#home{display:block}.pet-panel,.pet-care,.daily-panel,.week-ledger{width:100%}.daily-panel{margin-top:18px}.care-hud{left:14px}.care-meter span{font-size:.68rem}}
@media(max-width:420px){.pet-panel{padding:14px}.pet-care{padding:18px 12px}.care-actions button{min-height:96px;grid-template-rows:62px auto;padding:4px}.care-actions img{width:58px;height:58px}.care-actions span{font-size:.78rem}.poop-prop{width:36px;height:36px}}
@media(prefers-reduced-motion:reduce){.care-animation{display:none}.care-animation img{animation:none!important}}

/* Care scene alignment: the tap spout sits in front of a full-height stream. */
.care-animation--water .care-anim-tap{z-index:3;top:-9px;left:calc(var(--care-scene-x) - 75px);width:94px;height:94px}
.care-animation--water .care-anim-stream{z-index:1;top:57px;bottom:auto;left:calc(var(--care-scene-x) - 17px);width:34px;height:calc(100% - 105px);object-fit:fill}
.care-animation--water .care-anim-splash{z-index:2}
.care-animation--water .care-anim-bowl{z-index:2}

/* Keep every growth stage grounded and centered in the space after the HUD. */
#pet{right:0;bottom:-18px;width:75%;height:100%;object-position:center bottom}

/* Five poops form a compact pyramid with a safe inset from the room edge. */
.poop-prop--1{right:20px;bottom:10px}.poop-prop--2{right:62px;bottom:10px}.poop-prop--3{right:104px;bottom:10px}.poop-prop--4{right:41px;bottom:52px}.poop-prop--5{right:83px;bottom:52px}.poop-prop--6{right:62px;bottom:94px}
@media(max-width:799px){.pet-panel.is-compact #pet{right:0;bottom:-14px;width:75%;height:108%}}

/* 2026-09 interface cleanup ------------------------------------------------ */
:root{--paper:#eceae5;--paper-deep:#d7d4cd;--surface:#faf9f6;--ink:#30251f;--muted:#5e564f;--line:#b7b0a8;--blue:#368fce;--blue-dark:#246c9e;--blue-soft:#dceefa;--panel-radius:28px;--control-radius:12px}
button,a,input,textarea{touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid var(--blue-dark);outline-offset:3px}
.pet-panel,.sheet{border-radius:var(--panel-radius)}

/* Keep the care scene on one shared anchor so the water visibly reaches its bowl. */
.care-animation--water,.care-animation--food{--care-scene-x:clamp(72px,16%,112px);--care-bowl-w:88px}
.care-animation--water .care-anim-tap{top:-9px;left:calc(var(--care-scene-x) - 75px);width:94px;height:94px;object-fit:contain}
.care-animation--water .care-anim-bowl{bottom:-2px;left:calc(var(--care-scene-x) - (var(--care-bowl-w) / 2));width:var(--care-bowl-w);height:82px;object-fit:contain;object-position:center bottom}
.care-animation--water .care-anim-stream{top:64px;bottom:auto;left:calc(var(--care-scene-x) - 21px);width:34px;height:calc(100% - 105px);object-fit:fill;object-position:center top}
.care-animation--water .care-anim-splash{bottom:42px;left:calc(var(--care-scene-x) - 43px);width:86px;height:62px;object-fit:contain;object-position:center bottom}
.care-animation--water.is-playing .care-anim-tap,.care-animation--water.is-playing .care-anim-bowl{animation:care-scene-hold 1.75s cubic-bezier(.16,1,.3,1) both}
@keyframes care-scene-hold{0%{opacity:0;transform:translateX(-42px)}14%,86%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-18px)}}
@keyframes care-water-flow{0%,24%{opacity:0;clip-path:inset(0 0 100% 0)}28%{opacity:1;clip-path:inset(0 0 100% 0)}50%,70%{opacity:1;clip-path:inset(0)}78%,100%{opacity:0;clip-path:inset(0)}}
@keyframes care-water-splash{0%,50%{opacity:0;transform:scale(.72)}58%{opacity:1;transform:scale(1)}67%{opacity:.65;transform:scale(.86)}74%{opacity:1;transform:scale(1.08)}84%,100%{opacity:0;transform:scale(.94)}}

/* The carrot sits between two copies of the empty bowl: base below, front lip above. */
.care-animation--food .care-anim-food-bag{display:none}
.care-animation--food .care-anim-bowl{left:calc(var(--care-scene-x) - (var(--care-bowl-w) / 2));bottom:-2px;width:var(--care-bowl-w);height:82px;object-fit:contain;object-position:center bottom}
.care-animation--food .care-anim-food-empty{z-index:1}
.care-animation--food .care-anim-food-lip{z-index:3;clip-path:inset(55% 0 0 0)}
.care-animation--food .care-anim-carrot{left:calc(var(--care-scene-x) - 28px);bottom:32px;z-index:2;width:56px;height:56px;object-fit:contain;transform-origin:50% 85%}
.care-animation--food.is-playing .care-anim-food-empty,.care-animation--food.is-playing .care-anim-food-lip{animation:care-food-bowl 1.85s cubic-bezier(.16,1,.3,1) both}
@keyframes care-food-bowl{0%{opacity:0;transform:translateX(-42px)}14%,86%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-18px)}}
@keyframes care-carrot-drop{0%,24%{opacity:0;transform:translateY(-126px) rotate(-8deg)}30%{opacity:1}54%,86%{opacity:1;transform:translateY(0) rotate(6deg)}100%{opacity:0;transform:translate(-18px,0) rotate(6deg)}}

/* Four deterministic room zones. Main may set data-room-slot or room-prop--slot-N. */
#equipped{z-index:1}
#pet{z-index:2}
.room-prop{z-index:1;max-width:92px;max-height:92px;image-rendering:auto}
.room-prop[data-room-slot="wall-left"],.room-prop--slot-1{top:8px;left:27%;bottom:auto;right:auto;transform:none}
.room-prop[data-room-slot="wall-right"],.room-prop--slot-2{top:8px;right:2%;bottom:auto;left:auto;transform:none}
.room-prop[data-room-slot="floor-left"],.room-prop--slot-3{left:27%;bottom:2px;right:auto;top:auto;transform:none}
.room-prop[data-room-slot="floor-right"],.room-prop--slot-4{right:2%;bottom:2px;left:auto;top:auto;transform:none}
.room-prop--garland{top:-20px;left:62%;width:min(190px,44%);transform:translateX(-50%)}
.room-prop--rug{bottom:-22px;left:64%;width:min(155px,38%);transform:translateX(-50%);z-index:0}
.room-prop--teddy,.room-prop--books,.room-prop--aquarium{left:27%;right:auto}
.room-prop--ball,.room-prop--plant,.room-prop--crayons{right:2%;left:auto}
.room-prop--balloons{top:-10px;right:1%;left:auto}
#equipped .room-prop[data-slot="0"],#shop-room .room-prop[data-slot="0"]{left:27%;right:auto;bottom:2px;top:auto;transform:none}
#equipped .room-prop[data-slot="1"],#shop-room .room-prop[data-slot="1"]{left:42%;right:auto;bottom:5px;top:auto;transform:none}
#equipped .room-prop[data-slot="2"],#shop-room .room-prop[data-slot="2"]{left:auto;right:15%;bottom:5px;top:auto;transform:none}
#equipped .room-prop[data-slot="3"],#shop-room .room-prop[data-slot="3"]{left:auto;right:1%;bottom:2px;top:auto;transform:none}

/* Shop preview mirrors the room without exposing interactive care controls. */
#shop-room{position:relative;height:clamp(190px,54vw,280px);margin:18px 0 22px;overflow:hidden;border-radius:var(--panel-radius);background:#000}
#shop-room #pet,#shop-room .shop-room-pet,#shop-room .shop-pet{position:absolute;right:0;bottom:0;z-index:2;width:75%;height:92%;object-fit:contain;object-position:center bottom}
#shop-room #equipped,#shop-room .shop-room-props{position:absolute;inset:0;pointer-events:none}
#equipment-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 20px}
.equipment-slot{display:grid;min-height:74px;place-items:center;padding:8px;border:1px dashed var(--line);border-radius:var(--control-radius);color:var(--muted);background:var(--paper);font-size:.78rem;font-weight:700;text-align:center}
.equipment-slot img{width:52px;height:52px;object-fit:contain}
#items{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.item{min-height:124px;padding:12px;grid-template-columns:82px minmax(0,1fr);column-gap:12px}
.shop-preview{width:82px;height:92px}
.item-actions{display:flex;gap:8px;white-space:normal}
.item button{min-height:44px;margin:8px 0 0;padding:10px 13px;color:#fff;background:var(--blue);font-size:.9rem;font-weight:780}
.item button:hover:not(:disabled){background:var(--blue-dark)}
.item button:disabled{color:#6c625c;background:var(--paper-deep);opacity:1}

/* History stays readable while the grid pans horizontally. */
.ledger-heading{flex-wrap:wrap}
.week-nav{display:flex;align-items:center;gap:8px;margin-left:auto}
.week-nav button{display:grid;width:44px;height:44px;place-items:center;border:0;border-radius:var(--control-radius);color:var(--blue-dark);background:var(--blue-soft);font:inherit;font-size:1.2rem;font-weight:800;cursor:pointer}
.week-nav button:disabled{color:var(--muted);background:var(--paper-deep);cursor:default}
.ledger-scroll{position:relative;border-radius:var(--control-radius);-webkit-overflow-scrolling:touch}
.ledger-scroll thead th:first-child,.ledger-scroll tbody th{position:sticky;left:0;z-index:2;box-shadow:1px 0 0 var(--line)}
.ledger-scroll thead th:first-child{z-index:3}
.ledger-scroll thead th:not(:first-child) span,.ledger-weekday{display:block;font-size:.75rem;line-height:1.1}
.ledger-date{display:block;margin-top:4px;color:var(--ink);font-size:.95rem;line-height:1}

/* Reflection header and parent-only tester affordances. */
.rbt-chevron{display:inline-grid;width:28px;height:28px;place-items:center;color:var(--blue-dark);font-size:1.25rem;transition:transform .2s ease}
.rbt-toggle[aria-expanded="true"] .rbt-chevron{transform:rotate(180deg)}
.header-tools{position:relative;display:flex;min-height:44px;align-items:center;justify-content:flex-end;gap:2px;padding:0 4px;color:var(--muted);font-size:.75rem;font-weight:650}
.tester-trigger{position:absolute;top:0;right:0;width:180px;height:44px;align-self:center;margin:0;padding:0;border:0;border-radius:9px;background:transparent;opacity:0;cursor:pointer}
.tester-trigger[hidden]{display:none}
#testing[hidden]{display:none}
#testing{margin:0 0 18px;padding:18px}
#testing h2{margin:0 0 6px;font-size:1.25rem}
#testing p{margin:0 0 14px;color:var(--muted)}
#testing label{display:block;margin:16px 0 6px;font-size:.85rem;font-weight:780}
#testing select{width:100%;min-height:46px;padding:9px 11px;border:1px solid var(--line);border-radius:var(--control-radius);color:var(--ink);background:#fffefa;font:inherit}
#testing>button,#tester-banner button{min-height:44px;padding:9px 12px;border:0;border-radius:var(--control-radius);color:#fff;background:var(--blue);font:inherit;font-weight:750;cursor:pointer}
#testing>button{margin-top:10px}
#tester-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 18px;padding:10px 12px;border-radius:var(--control-radius);color:#fff;background:var(--ink);font-size:.86rem;font-weight:750}
#tester-banner[hidden]{display:none}
.testing-actions{display:flex;flex-wrap:wrap;gap:8px}
.testing-actions button{min-height:44px;padding:9px 12px;border:0;border-radius:var(--control-radius);color:#fff;background:var(--blue);font:inherit;font-weight:750;cursor:pointer}
dialog{width:min(520px,calc(100% - 24px));padding:0;border:0;border-radius:var(--panel-radius);color:var(--ink);background:var(--surface);box-shadow:0 24px 70px #30251f3d}
dialog::backdrop{background:#21191599}
dialog form{padding:24px}
dialog form h2{margin:0 0 8px}dialog form p{color:var(--muted);line-height:1.45}
.dialog-body{padding:24px}
.dialog-body h2{margin:0 0 8px}.dialog-body p{color:var(--muted);line-height:1.45}
.dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:22px}
.dialog-actions button{min-height:44px;padding:10px 14px;border:0;border-radius:var(--control-radius);color:#fff;background:var(--blue);font:inherit;font-weight:750;cursor:pointer}
.dialog-actions .secondary{color:var(--ink);background:var(--paper-deep)}

/* On phones the room is full-size at the top, then settles into a 200px sticky HUD. */
.pet-panel-sentinel{height:1px;margin-bottom:-1px;pointer-events:none}
.pet-panel.is-reflection-focus{position:relative;top:auto;transform:none!important}
@media(max-width:799px){
  .pet-panel{top:8px}
  .pet-panel.is-compact{padding:10px 12px}
  .pet-panel.is-compact #room{height:164px}
  .pet-panel.is-compact .care-hud{inset:7px auto 5px 6px}
  .pet-panel.is-compact .care-pill{min-height:92px}
  .pet-panel.is-compact #room + .bar{height:8px;margin-top:8px}
  .pet-panel.is-compact #xp-copy,.pet-panel.is-compact #evolve,.pet-panel.is-compact #devolve{display:none}
  #equipment-slots{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ledger-scroll thead th:first-child{min-width:112px;width:112px}
  .ledger-scroll tbody th{min-width:112px;width:112px;gap:6px;padding:8px 6px;font-size:.75rem}
  .ledger-scroll tbody th img{width:30px;height:30px}
}
@media(max-width:420px){
  .topbar{flex-wrap:wrap}.tester-trigger{order:10;margin-left:auto}
  #items{grid-template-columns:1fr}.item{grid-template-columns:76px minmax(0,1fr)}
  .shop-preview{width:76px;height:86px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}
  .pet-panel{transition:none}
}

/* Care mini-games temporarily take over the existing black room. */
#room.is-game-active>.care-hud,#room.is-game-active>#pet,#room.is-game-active>#equipped,#room.is-game-active>#poop-layer,#room.is-game-active>#care-animation{display:none}
.game-room{position:absolute;inset:0;z-index:10;overflow:hidden;color:#fff4d7;background:#000;font-family:Rubik,system-ui;touch-action:none}
.game-hud{position:absolute;z-index:8;top:0;right:0;left:0;display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:9px;align-items:center;min-height:44px;padding:7px 10px;background:#30251f}
.game-hud button{display:grid;width:30px;height:30px;place-items:center;border:1px solid #fff4d7;border-radius:50%;color:#fff4d7;background:transparent;font:700 1.25rem/1 Rubik;cursor:pointer}
.game-hud div{display:grid;gap:1px;min-width:0}.game-hud strong{font-size:.86rem}.game-hud span,.game-status{font-size:.64rem;font-weight:700;color:#dceefa}.game-hud b{font-size:.74rem;white-space:nowrap;color:#fff4d7}.game-status{position:absolute;z-index:8;right:12px;bottom:8px;margin:0;color:#fff4d7}.game-feedback{position:absolute;z-index:12;top:50%;left:50%;padding:10px 15px;border-radius:999px;color:#30251f;background:#fff4d7;font-size:1.1rem;font-weight:900;letter-spacing:-.03em;opacity:0;pointer-events:none;transform:translate(-50%,-44%) scale(.9);transition:opacity .15s ease,transform .15s ease}.game-feedback.is-visible{opacity:1;transform:translate(-50%,-50%) scale(1)}
.game-water,.game-food,.game-pong{position:absolute;inset:44px 0 0;overflow:hidden}.game-water{outline:0}.water-game-gauge{position:absolute;z-index:4;top:22px;right:17px;bottom:38px;width:16px;overflow:hidden;border:2px solid #fff4d7;border-radius:999px;background:#141414}.water-game-gauge::after{position:absolute;right:0;bottom:81.7%;left:0;height:3px;background:#efe6a5;content:''}.water-game-gauge i{position:absolute;right:0;bottom:0;left:0;height:0;background:#368fce;transition:height .05s linear}.water-game-gauge em{position:absolute;z-index:2;right:0;bottom:81.7%;left:0;height:7px;background:#efe6a5;opacity:.72}.water-game-tap,.water-game-stream,.water-game-bowl,.water-game-splash{position:absolute;object-fit:contain;image-rendering:pixelated}.water-game-tap{z-index:3;top:-10px;left:13%;width:94px;height:94px}.water-game-stream{z-index:1;top:59px;bottom:67px;left:calc(13% + 38px);width:32px;height:calc(100% - 125px);opacity:0;object-fit:fill}.water-game-bowl{z-index:2;bottom:-4px;left:calc(13% + 1px);width:88px;height:82px}.water-game-splash{z-index:2;bottom:37px;left:calc(13% - 14px);width:88px;opacity:0}.water-game.is-running .water-game-stream,.water-game.is-running .water-game-splash{opacity:1}.water-game-hint{position:absolute;z-index:4;top:34px;left:calc(13% + 55px);display:grid;width:34px;height:34px;place-items:center;border:2px solid #dceefa;border-radius:50%;color:#dceefa;font-size:1.2rem}.water-game.has-started .water-game-hint{display:none}
.game-food{touch-action:none}.food-game-bag,.food-game-bowl,.food-game-lip,.food-game-carrot,.food-game-pet{position:absolute;object-fit:contain;image-rendering:pixelated}.food-game-bag{bottom:6px;left:4%;width:94px}.food-game-bowl{z-index:1;bottom:-3px;left:24%;width:88px}.food-game-lip{z-index:4;bottom:-3px;left:24%;width:88px;clip-path:inset(55% 0 0 0)}.food-game-carrot{z-index:3;bottom:27px;left:calc(24% + 20px);width:42px;height:42px;touch-action:none;cursor:grab;transform:rotate(-16deg)}.food-game-carrot.is-dragging{position:absolute;cursor:grabbing;transform:rotate(18deg)}.food-game-carrot.is-returning{transition:left .35s cubic-bezier(.16,1,.3,1),top .35s cubic-bezier(.16,1,.3,1)}.food-game-pet{right:-1%;bottom:-17px;width:66%;height:106%;object-position:center bottom}.food-game-mouth{position:absolute;z-index:5;top:52%;left:70%;width:31px;height:31px;border:2px solid #fff4d7;border-radius:50%;opacity:.78;animation:mouth-pulse 1.2s ease-in-out infinite}.game-food:has(.food-game-carrot.is-dragging) .food-game-mouth{opacity:1}@keyframes mouth-pulse{50%{transform:scale(1.17);opacity:.35}}
.game-pong{outline:0;touch-action:none}.pong-paddle{position:absolute;z-index:4;top:0;left:18px;width:16px;height:62px;border:3px solid #fff4d7;border-radius:999px;background:#368fce}.pong-ball{position:absolute;z-index:5;top:0;left:0;width:14px;height:14px;border:2px solid #30251f;border-radius:50%;background:#fff4d7;box-shadow:-9px 0 0 -5px #dceefa,-17px 0 0 -7px #368fce}.pong-pet{position:absolute;right:-3%;bottom:-18px;width:66%;height:107%;object-fit:contain;object-position:center bottom}.pong-trail{display:none}
@media(max-width:420px){.game-hud{grid-template-columns:30px minmax(0,1fr) auto;padding:6px 7px}.game-hud button{width:27px;height:27px}.water-game-tap{left:9%;transform:scale(.88);transform-origin:top left}.water-game-stream{left:calc(9% + 33px)}.water-game-bowl{left:calc(9% + 1px)}.water-game-splash{left:calc(9% - 12px)}.water-game-hint{left:calc(9% + 50px)}.food-game-bag{width:80px}.food-game-bowl,.food-game-lip{left:21%;width:78px}.food-game-carrot{left:calc(21% + 19px)}}
@media(prefers-reduced-motion:reduce){.game-feedback{transition:none}.food-game-mouth{animation:none}.pong-ball{box-shadow:none}.water-game-gauge i{transition:none}}

/* Approved care interactions: the selected Pet care control opens this room view. */
.care-actions button[aria-pressed="true"]{background:#eef5fa;box-shadow:inset 0 -3px #368fce}
.game-room{z-index:10;animation:care-room-open .24s ease-out both}
.game-close{position:absolute;z-index:12;top:10px;right:12px;display:grid;width:31px;height:31px;place-items:center;border:1px solid #fff4d7;border-radius:50%;color:#fff4d7;background:#30251f;font:700 1.25rem/1 Rubik;cursor:pointer}
.game-prompt{position:absolute;z-index:11;top:14px;right:14%;left:14%;margin:0;color:#fff4d7;font-size:clamp(.68rem,1.7vw,.86rem);font-weight:850;text-align:center}
.game-meter{position:absolute;z-index:11;top:14%;bottom:13%;left:4%;display:grid;width:11%;grid-template-rows:minmax(0,1fr) 27px 13px;place-items:center;gap:3px;pointer-events:none}
.game-meter .care-pill{width:clamp(12px,3.3vw,20px);height:100%;min-height:150px}.game-meter img{width:26px;height:26px;object-fit:contain;image-rendering:pixelated}.game-meter span{color:#fff4d7;font-size:clamp(.42rem,1.7vw,.62rem);font-weight:800;letter-spacing:.02em;line-height:1;text-transform:uppercase;white-space:nowrap}
.care-game{position:absolute;inset:0;overflow:hidden}.care-game--water{--game-scene-x:clamp(142px,30%,202px)}.care-game img,.care-game button img{object-fit:contain;image-rendering:pixelated}.game-pet{position:absolute;z-index:4;right:-1%;bottom:-5px;width:clamp(210px,51vw,310px);height:clamp(210px,51vw,310px);object-fit:contain;animation:care-pet-enter .42s cubic-bezier(.16,1,.3,1) both}
.water-game-tap{position:absolute;z-index:5;top:10%;left:calc(var(--game-scene-x) - 75px);width:94px;height:94px;padding:0;border:0;background:transparent;cursor:pointer;animation:care-prop-enter .42s .03s cubic-bezier(.16,1,.3,1) both}.water-game-tap img{display:block;width:100%;height:100%}.water-game-stream{position:absolute;z-index:1;top:calc(10% + 72px);left:calc(var(--game-scene-x) - 21px);width:34px;height:calc(86% - 82px);opacity:0;object-fit:fill}.water-game-bowl{position:absolute;z-index:2;bottom:-2px;left:calc(var(--game-scene-x) - 44px);width:88px;height:82px}.water-game-splash{position:absolute;z-index:3;bottom:32px;left:calc(var(--game-scene-x) - 65px);width:129px;height:93px;opacity:0}.care-game--water.is-pouring .water-game-stream,.care-game--water.is-pouring .water-game-splash{opacity:1}.care-game--water.is-pouring .water-game-splash{animation:water-game-splash .34s ease-in-out infinite alternate}
.food-game-bag{position:absolute;z-index:5;bottom:9px;left:13%;width:clamp(82px,17vw,112px);padding:0;border:0;background:transparent;cursor:grab;touch-action:none;animation:care-prop-enter .42s .03s cubic-bezier(.16,1,.3,1) both}.food-game-bag img{display:block;width:100%;height:100%}.food-game-carrot{position:absolute;z-index:7;left:19%;bottom:29%;width:52px;height:52px;opacity:0;pointer-events:none;transform:rotate(-24deg)}.food-game-carrot.is-dragging{left:calc(var(--drag-x) - 26px);top:calc(var(--drag-y) - 26px);opacity:1;pointer-events:auto;transform:rotate(8deg)}.food-game-happy{z-index:5;opacity:0}.care-game--food.is-fed .food-game-pet{opacity:0}.care-game--food.is-fed .food-game-happy{animation:food-game-chomp .48s cubic-bezier(.16,1,.3,1) both}.care-game--food.is-fed .food-game-carrot{animation:food-game-carrot .48s ease both}
.play-game-ball{position:absolute;z-index:7;bottom:24%;left:16%;width:70px;height:70px;padding:0;border:0;background:transparent;cursor:grab;touch-action:none;animation:care-prop-enter .42s .03s cubic-bezier(.16,1,.3,1) both}.play-game-ball img{width:100%;height:100%}.play-game-ball.is-dragging{left:calc(var(--drag-x) - 35px);top:calc(var(--drag-y) - 35px)}.play-game-excited{z-index:5;opacity:0}.care-game--play.is-returning .play-game-ball{animation:play-game-v 3.06s linear forwards;pointer-events:none}.care-game--play.is-pet-hit .play-game-pet{opacity:0}.care-game--play.is-pet-hit .play-game-excited{animation:play-game-excited .72s cubic-bezier(.2,.8,.3,1) both}.care-game--play.is-returned .play-game-ball{left:16%;bottom:24%;animation:none;cursor:pointer}
.game-feedback{z-index:13}.game-feedback.is-visible{opacity:1}
@keyframes care-room-open{from{opacity:0}to{opacity:1}}@keyframes care-prop-enter{from{opacity:0;transform:translateX(-20px) scale(.82)}to{opacity:1;transform:translateX(0) scale(1)}}@keyframes care-pet-enter{from{opacity:0;transform:translateX(24px) scale(.9)}to{opacity:1;transform:translateX(0) scale(1)}}@keyframes water-game-splash{to{transform:translateY(-4px) scale(1.08)}}@keyframes food-game-chomp{0%,100%{opacity:1;transform:translateY(0)}50%{opacity:1;transform:translateY(-4px) scale(1.02,.98)}}@keyframes food-game-carrot{to{opacity:0;transform:translate(146px,138px) rotate(10deg) scale(.22)}}@keyframes play-game-excited{0%{opacity:0;transform:translateY(0)}12%,88%{opacity:1}52%{opacity:1;transform:translateY(-24px)}100%{opacity:1;transform:translateY(0)}}@keyframes play-game-v{0%{transform:translate(0,0) rotate(0)}25%{transform:translate(76px,58px) rotate(180deg)}50%{transform:translate(152px,0) rotate(360deg)}75%{transform:translate(76px,58px) rotate(540deg)}100%{transform:translate(0,0) rotate(720deg)}}
@media(max-width:420px){.game-meter{left:3%;width:12%}.care-game--water{--game-scene-x:clamp(132px,35%,165px)}.food-game-bag{left:12%;width:82px}.play-game-ball,.care-game--play.is-returned .play-game-ball{bottom:23%;width:62px;height:62px}}
@media(prefers-reduced-motion:reduce){.game-room,.game-pet,.water-game-tap,.food-game-bag,.play-game-ball,.care-game--water.is-pouring .water-game-splash,.care-game--food.is-fed .food-game-happy,.care-game--food.is-fed .food-game-carrot,.care-game--play.is-returning .play-game-ball,.care-game--play.is-pet-hit .play-game-excited{animation:none!important}}

/* Keep the approved demo's geometry and its direct-touch behaviour. */
#tester-trigger,.water-game-tap,.food-game-bag,.food-game-carrot,.play-game-ball{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
.game-close{display:none}
.care-game--water{--game-scene-x:clamp(150px,33%,200px)}
.care-game .water-game-stream{bottom:auto;height:calc(86% - 97px);object-fit:fill;object-position:center top}
.food-game-bag{bottom:12px;left:18%;width:25%}
.game-pet,.water-game-tap,.food-game-bag,.play-game-ball{animation:none}
@media(max-width:420px){.care-game--water{--game-scene-x:clamp(150px,38%,200px)}.water-game-stream{height:calc(86% - 91px)}.food-game-bag{bottom:12px;left:18%;width:25%}}

/* Pet collection */
/* The jug tips around its pouring lip so the stream stays anchored to it. */
.water-game-jug{position:absolute;z-index:5;top:14%;left:calc(var(--game-scene-x) - 86.48px);width:94px;height:94px;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;cursor:grab;touch-action:none;transform-origin:92% 32%;transform:rotate(var(--jug-angle,0deg));transition:transform .18s cubic-bezier(.16,1,.3,1);-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
.water-game-jug{top:calc(14% + 52px)}
.water-game-jug.is-tilting{cursor:grabbing;transition:none}
.water-game-jug img{display:block;width:100%;height:100%;pointer-events:none;-webkit-touch-callout:none;user-select:none}
.water-game-jug:focus-visible{outline:2px solid #fff4d7;outline-offset:5px}
.jug-spout{position:absolute;top:32%;left:92%;width:0;height:0;pointer-events:none}
.jug-stream{position:absolute;z-index:1;width:8px;overflow:hidden;opacity:0;pointer-events:none}
.care-game .jug-stream img{display:block;width:100%;height:100%;object-fit:fill;object-position:center top}
.jug-splash{position:absolute;z-index:3;width:50px;height:34px;opacity:0;pointer-events:none;transform-origin:center 76%}
.care-game--water.is-pouring .jug-stream,.care-game--water.is-pouring .jug-splash{opacity:1}
.care-game--water.is-pouring .jug-splash{animation:jug-splash .32s ease-in-out infinite alternate}
@keyframes jug-splash{to{transform:scale(1.08,.94)}}
@media(prefers-reduced-motion:reduce){.water-game-jug{transition:none}.care-game--water.is-pouring .jug-splash{animation:none}}

.pet-name{display:block;margin:10px auto 4px;padding:4px 10px;border:0;border-radius:999px;background:transparent;color:var(--ink);font:inherit;font-weight:800;cursor:pointer}.pet-name:hover,.pet-name:focus-visible{background:var(--paper-deep)}
main:has(> #gallery:not([hidden])){width:min(1480px,calc(100% - 32px))}
#gallery{padding:28px 24px}
#gallery h1{margin:0 0 8px;font-size:2rem;letter-spacing:-.025em}
#gallery>p{margin:0;color:var(--muted);line-height:1.5}
.gallery-scroll{max-width:100%;overflow:auto;overscroll-behavior-inline:contain;margin-top:24px;scroll-padding-inline-start:168px}
#pet-gallery{width:100%;min-width:860px;border-collapse:separate;border-spacing:0;table-layout:fixed}
#pet-gallery th,#pet-gallery td{min-width:0;padding:12px;border:0;border-bottom:1px solid #dedbd5}
#pet-gallery thead th{padding:0 12px 16px;background:transparent;color:var(--muted);font-size:.78rem;font-weight:700;text-align:center;letter-spacing:.04em}
#pet-gallery th:first-child{width:168px;text-align:left}
#pet-gallery thead th:first-child{position:sticky;left:0;z-index:3;background:var(--surface)}
#pet-gallery tbody th{display:table-cell;position:sticky;left:0;z-index:2;vertical-align:middle;background:var(--surface);color:var(--ink);text-align:left}
#pet-gallery td{vertical-align:middle}
#pet-gallery tbody tr:last-child th,#pet-gallery tbody tr:last-child td{border-bottom:0}
.gallery-species{display:block;font-size:1.1rem;font-weight:800;line-height:1.2;overflow-wrap:anywhere}
.gallery-nickname{display:block;margin-top:6px;font-size:.9rem;font-weight:500;line-height:1.4;overflow-wrap:anywhere}
.gallery-rename{display:block;min-height:44px;margin-top:4px;padding:8px 0;border:0;background:transparent;color:var(--blue-dark);font:inherit;font-size:.85rem;font-weight:700;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.gallery-rename:hover{color:var(--ink)}
.gallery-frame,.gallery-locked{display:grid;width:100%;aspect-ratio:1;place-items:center;border-radius:14px}
.gallery-frame{padding:10px;background:#f0eee8}
.gallery-locked{background:#dededc}
.gallery-pet{display:block;width:100%;height:100%;min-height:0;object-fit:contain;image-rendering:pixelated}
#gallery>.gallery-scroll-hint{display:none;margin-top:16px;font-size:.8rem}
.pet-name:disabled{cursor:default}
@media(max-width:900px){#gallery>.gallery-scroll-hint{display:block}.gallery-scroll{margin-top:16px}}
@media(max-width:540px){main:has(> #gallery:not([hidden])){width:calc(100% - 16px)}#gallery{padding:24px 8px}#gallery>h1,#gallery>p{margin-inline:8px}#gallery h1{font-size:1.8rem}.gallery-scroll{scroll-padding-inline-start:128px}#pet-gallery{min-width:808px}#pet-gallery th:first-child{width:128px}#pet-gallery th,#pet-gallery td{padding:12px 6px}#pet-gallery thead th{padding:0 6px 12px}.gallery-frame{padding:8px}.gallery-species{font-size:1rem}.gallery-nickname{font-size:.85rem}}
.egg-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}.egg-choice{display:grid;justify-items:center;gap:6px;min-height:130px;padding:10px 6px;border:2px solid #e5e7eb;border-radius:16px;background:#fff;color:var(--ink);font:inherit;font-weight:750;cursor:pointer}.egg-choice:hover,.egg-choice:focus-visible{border-color:var(--blue);transform:translateY(-2px)}.egg-choice img{width:88px;height:88px;object-fit:contain;image-rendering:pixelated}.egg-arrive{animation:egg-arrive .7s cubic-bezier(.2,.85,.3,1)}@keyframes egg-arrive{0%{opacity:.2;transform:translateY(-26px) scale(.72)}65%{opacity:1;transform:translateY(5px) scale(1.06)}100%{transform:translateY(0) scale(1)}}
#pet-name-input{width:100%;min-height:46px;padding:10px 12px;border:1px solid #bbc4d0;border-radius:10px;font:inherit}
@media(max-width:540px){.egg-choices{gap:7px}.egg-choice{min-height:116px}.egg-choice img{width:76px;height:76px}}
@media(prefers-reduced-motion:reduce){.egg-arrive{animation:none}.egg-choice:hover{transform:none}}

[hidden]{display:none!important}.care-hud[hidden],.pet-care[hidden]{display:none!important}

/* 2026-11 first-use UX: contrast, 44px targets, locked egg care, reward feedback ----------- */
#sync-button{min-height:44px;background:var(--blue-dark)}
.tabs a{display:inline-flex;min-height:44px;align-items:center;padding:0 2px}
.pet-name{min-height:44px;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:4px}.pet-name:disabled{text-decoration:none}.pet-name:not(:disabled):after{content:" · Rename";color:var(--muted);font-size:.8rem;font-weight:650}
.sync-panel button{min-height:44px;padding:8px 14px;border:0;border-radius:var(--control-radius);color:#fff;background:var(--blue-dark);font:inherit;font-weight:750;cursor:pointer}.sync-panel .sync-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}.sync-panel input{display:block;width:100%;min-height:44px;margin-top:6px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--control-radius);font:inherit}.sync-panel #sync-close{flex:none;width:44px;min-width:44px;padding:0;color:var(--ink);background:transparent;font-size:2rem;line-height:1}
.care-lock{margin:10px 0 0;color:var(--muted);font-weight:700;line-height:1.4}.care-lock[hidden]{display:none}.pet-care.is-locked .care-actions{pointer-events:none}.pet-care.is-locked .care-actions button{cursor:not-allowed}
.reward-toast{min-height:30px;margin:0 0 8px;padding:4px 12px;border-radius:999px;color:var(--blue-dark);background:transparent;font-size:.9rem;font-weight:800;line-height:22px;text-align:center;pointer-events:none}.reward-toast.is-visible{background:var(--blue-soft)}#mood-reward,#rbt-reward{margin-top:10px}.reward-toast:empty{visibility:hidden}
@media(prefers-reduced-motion:no-preference){.reward-toast.is-visible{animation:reward-fade .25s ease-out}@keyframes reward-fade{from{opacity:0}to{opacity:1}}}
.backup{margin-top:18px;padding:0 18px}.backup[hidden]{display:none}.backup summary{display:flex;align-items:center;min-height:44px;padding:8px 0;font-weight:800;color:var(--blue-dark);cursor:pointer}.backup p{margin:0 0 12px;color:var(--muted);line-height:1.45}
.backup-actions{display:flex;flex-wrap:wrap;gap:10px;margin:4px 0 14px}.backup-actions button{min-height:44px;padding:9px 14px;border:0;border-radius:var(--control-radius);color:#fff;background:var(--blue-dark);font:inherit;font-weight:750;cursor:pointer}.backup-actions .secondary{color:var(--ink);background:var(--paper-deep)}
.backup-msg{color:#9b2d1f!important;font-weight:700}.backup-ok{color:var(--blue-dark)!important;font-weight:700}.backup-msg:empty,.backup-ok:empty{display:none}
.backup summary::after{content:'⌄';margin-left:auto;font-size:1.2rem}.backup[open] summary::after{transform:rotate(180deg)}
