:root{--ink:#334638;--muted:#7d8c7e;--forest:#477c58;--forest-deep:#346344;--cream:#fffdf8;--paper:#f8f5ec;--line:#e9e9dc;--mint:#e7f2e6;--peach:#fae7d5;--rose:#e9a99b;--sun:#e4b86b;--shadow:0 22px 80px rgba(46,62,38,.16)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft Yahei",sans-serif;color:var(--ink)}body{background:radial-gradient(circle at 14% 11%,#f1dfc7 0%,transparent 27%),radial-gradient(circle at 95% 80%,#dcebdc 0%,transparent 30%),#f5f2e9}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}.desktop-shell{height:100dvh;min-height:0;overflow:hidden;display:flex;justify-content:center;align-items:center;gap:clamp(36px,7vw,130px);padding:26px}.editorial{width:390px;max-width:38vw}.eyebrow{letter-spacing:.22em;color:var(--forest);font-size:12px;font-weight:850}.editorial h1{font-family:Georgia,"Songti SC",serif;font-size:clamp(38px,4.2vw,62px);line-height:1.14;letter-spacing:-.035em;margin:20px 0}.editorial h1 span{color:#6c976f}.editorial p{line-height:1.9;color:#697a6b;font-size:15px}.principle{display:flex;gap:15px;align-items:flex-start;padding:16px 0;border-bottom:1px solid #d8d9cc}.principle b{font:24px Georgia;color:#97a995}.principle span,.principle strong,.principle small{display:block}.principle small{line-height:1.6;color:#7f8d80;margin-top:5px}
.phone{width:414px;height:min(880px,calc(100vh - 42px));min-height:620px;border:7px solid #304b39;background:var(--cream);border-radius:44px;box-shadow:var(--shadow);overflow:hidden;position:relative;flex-shrink:0;display:flex;flex-direction:column}.phone:before{content:"";position:absolute;top:9px;left:50%;transform:translateX(-50%);width:100px;height:20px;border-radius:50px;background:#304b39;z-index:5;pointer-events:none}.topbar{flex-shrink:0;padding:40px 22px 13px;display:flex;justify-content:space-between;align-items:center;gap:12px;background:var(--cream)}.brand{font-family:Georgia,"Songti SC",serif;font-size:20px;font-weight:800}.subtle{font-size:11px;color:var(--muted);margin-top:3px}.demo-badge{display:inline-block;background:#9a633f;color:#fff;font:800 9px ui-sans-serif;padding:3px 6px;border-radius:6px;vertical-align:3px;letter-spacing:.08em}.demo-badge[hidden]{display:none}.header-actions{display:flex;gap:7px}.icon-btn{border:1px solid var(--line);background:#fff;border-radius:12px;padding:8px 10px;color:var(--ink);font-size:13px;min-height:38px}.scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#d5ddcd transparent}.page{padding:6px 18px 38px}.nav{height:75px;flex-shrink:0;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,1fr);background:var(--cream);padding:8px 8px 12px;box-shadow:0 -5px 18px rgba(49,75,48,.03)}.nav button{border:0;background:transparent;border-radius:14px;color:#8b9488;font-size:10px;font-weight:750;display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:center}.nav button span{font-size:21px}.nav button.active{color:var(--forest);background:#ebf3e9}
.pill{display:inline-flex;align-items:center;gap:5px;background:var(--mint);color:var(--forest-deep);border-radius:50px;font-size:11px;font-weight:750;padding:7px 11px}.pill.rest{background:#f5ecdc;color:#986a3d}.pill.demo{background:#f4e5d8;color:#8e6041}.title{font-family:Georgia,"Songti SC",serif;font-weight:750;font-size:23px;margin:8px 0;line-height:1.32}.lead{line-height:1.65;color:var(--muted);font-size:13px}.section-heading{font-size:15px;font-weight:800;margin:22px 0 10px;display:flex;align-items:center;justify-content:space-between;gap:10px}.section-heading span{font-size:10px;color:var(--muted);font-weight:500}.card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:16px;box-shadow:0 4px 16px rgba(49,72,44,.025)}.card+.card{margin-top:10px}.row{display:flex;align-items:center;justify-content:space-between;gap:10px}.row.start{align-items:flex-start}.stack{display:grid;gap:10px}.two{display:grid;grid-template-columns:1fr 1fr;gap:9px}.btn{border:0;background:var(--forest);color:#fff;border-radius:13px;padding:12px 15px;font-size:13px;font-weight:760;box-shadow:0 4px 10px rgba(45,107,61,.10);min-height:43px}.btn:hover{background:var(--forest-deep)}.btn.secondary{background:#e7f1e4;color:var(--forest-deep);box-shadow:none}.btn.ghost{background:#fff;border:1px solid var(--line);color:var(--forest-deep);box-shadow:none}.btn.peach{background:#f6e7d8;color:#8c623e;box-shadow:none}.btn.danger{background:#f8e8e3;color:#9f5f57;box-shadow:none}.btn.block{width:100%}.btn.small{padding:8px 10px;min-height:36px;font-size:11px}.button-row{display:flex;gap:8px;flex-wrap:wrap}.button-row>*{flex:1}.mini{font-size:11px;color:var(--muted);line-height:1.6}.hint{font-size:11px;color:#839083;line-height:1.65}.note{background:#f5f8f1;border-left:3px solid #9cbea1;border-radius:9px;padding:10px 12px;font-size:11px;color:#6e816e;line-height:1.7}.warning{background:#fff7e8;border-left-color:#d5a65f;color:#886944}.divider{height:1px;background:var(--line);margin:14px 0}
.pet-scene{height:220px;border-radius:26px;position:relative;overflow:hidden;background:linear-gradient(165deg,#f1f4e7 0%,#fff5e5 68%,#edd9bc 100%);border:1px solid #e9e7d9;isolation:isolate}.window{width:88px;height:80px;border:7px solid #fefdf4;border-radius:48px 48px 8px 8px;position:absolute;right:36px;top:24px;background:linear-gradient(#cfe6e3,#f7eccc)}.window:after{content:"";position:absolute;top:32px;left:0;width:100%;height:5px;background:#fefdf4}.floor{position:absolute;bottom:-25px;left:-12%;width:125%;height:88px;background:#e7ccb2;border-radius:50% 50% 0 0}.rug{position:absolute;width:218px;height:48px;left:50%;bottom:14px;transform:translateX(-50%);border:2px solid #d9b789;border-radius:48% 52% 50% 49%;background:repeating-radial-gradient(ellipse at center,transparent 0 6px,rgba(166,113,73,.14) 7px 8px,transparent 9px 14px),repeating-linear-gradient(103deg,rgba(255,255,255,.2) 0 2px,rgba(177,121,79,.1) 3px 4px,transparent 5px 8px),#e9c592;box-shadow:inset 0 3px 4px #fff4d5a8,inset 0 -5px 7px #a96e4829,0 3px 2px #b27c552b}.rug:after{content:"";position:absolute;inset:6px 12px;border:1px dashed #c18b6099;border-radius:50%;opacity:.75}.nest{position:absolute;left:calc(25% - 77px);bottom:31px;width:154px;height:70px;border-radius:50%;z-index:2;pointer-events:none;background:linear-gradient(160deg,#b97c4e,#8c5738 76%);box-shadow:inset 0 5px 8px #f2c69291,0 4px 3px #7e4e3526}.nest:before{content:"";position:absolute;inset:5px 9px 15px;border-radius:50%;background:repeating-radial-gradient(ellipse at center,#e9c28c 0 4px,#d69c65 5px 7px,#f0d39e 8px 11px);box-shadow:inset 0 -5px 7px #89533355}.nest-cushion{position:absolute;left:20px;right:20px;top:16px;height:39px;border-radius:50%;background:radial-gradient(ellipse at 48% 36%,#fff0c9 0 12%,#e9bd7d 48%,#c78752 100%);box-shadow:inset 0 4px 5px #fff7dc91}.nest-rim{position:absolute;left:calc(25% - 75px);bottom:31px;width:150px;height:39px;border-radius:0 0 50% 50%;border:8px solid #a4613d;border-top-color:#d99a61;background:repeating-linear-gradient(104deg,transparent 0 7px,#f0bd7b77 8px 10px,transparent 11px 16px);box-shadow:inset 0 5px 6px #70402844;z-index:4;pointer-events:none}.pet-button{position:absolute;border:0;background:transparent;left:50%;top:43%;transform:translate(-50%,-35%);padding:0;filter:drop-shadow(0 11px 7px rgba(92,91,56,.15));z-index:3;outline-offset:7px}.pet-art{width:156px;height:146px;overflow:visible;transform-origin:50% 76%;animation:petBreath 2.9s ease-in-out infinite}.pet-button.happy .pet-art{animation:petHop .72s ease-in-out 2}.pet-button.rest .pet-art{animation:petBreath 5s ease-in-out infinite;transform:rotate(-7deg)}.speech{position:absolute;left:14px;top:13px;max-width:175px;padding:9px 11px;border-radius:13px 13px 13px 3px;background:#fffffff2;box-shadow:0 3px 12px rgba(60,80,54,.09);font-size:11px;line-height:1.5;z-index:5}.scene-progress{position:absolute;bottom:9px;left:50%;transform:translateX(-50%);background:#ffffffd9;border-radius:20px;padding:5px 9px;color:#72836c;font-size:10px;white-space:nowrap;z-index:5}@keyframes petBreath{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-4px) scale(1.02)}}@keyframes petHop{0%,100%{transform:translateY(0) rotate(-2deg)}45%{transform:translateY(-14px) rotate(3deg)}}
.task{display:flex;gap:12px;align-items:flex-start}.task-icon{width:42px;height:42px;display:grid;place-items:center;background:#f4f3e7;border-radius:13px;font-size:22px;flex-shrink:0}.task-body{flex:1;min-width:0}.task-name{font-size:14px;font-weight:800;margin-bottom:4px}.task-sub{font-size:12px;line-height:1.6;color:var(--muted)}.status{display:inline-block;border-radius:40px;font-size:10px;font-weight:800;padding:4px 8px;background:#f2f1e9;color:#858f80}.status.completed{background:#e2f3e6;color:#377247}.status.partial{background:#fff0d7;color:#ac7b39}.status.missed{background:#f7e9e4;color:#aa756c}.status.paused,.status.adjusted{background:#eae9ef;color:#716889}.status.unknown{background:#f0f1ec;color:#7f887b}.form-label{font-size:12px;font-weight:750;margin:12px 0 7px;display:block}.field{background:#fff;border:1px solid #e1e6d9;border-radius:12px;padding:11px 12px;width:100%;min-height:43px;color:var(--ink);outline-color:#7cb38c;font-size:13px}.field:focus{border-color:#7cb38c}.picture{width:100%;height:120px;border:1px dashed #c8d9c6;background:#f1f6ef;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;font-size:12px;color:#63846a;overflow:hidden;cursor:pointer}.picture img{width:100%;height:100%;object-fit:cover}.radio-row{display:flex;flex-wrap:wrap;gap:7px}.radio-pill{position:relative}.radio-pill input{position:absolute;opacity:0}.radio-pill span{display:block;border:1px solid #e4e7dd;background:#fff;color:#728170;border-radius:12px;padding:9px 11px;font-size:12px;font-weight:650}.radio-pill input:checked+span{background:#e5f2e6;border-color:#86b18c;color:#3f7451}.list-entry{border-top:1px solid var(--line);padding:12px 0;display:flex;justify-content:space-between;gap:10px}.list-entry:first-child{border-top:0}.list-entry strong{font-size:13px}.list-entry small{display:block;color:var(--muted);line-height:1.6;margin-top:3px}.entry-actions{display:flex;gap:5px;align-items:flex-start}.entry-actions button{border:0;background:#f3f5ed;border-radius:8px;padding:6px;font-size:11px;color:#617660}.timer{text-align:center;padding:15px;background:#f3f6ee;border-radius:16px}.timer-time{font:32px ui-monospace,SFMono-Regular,monospace;letter-spacing:.06em;margin:5px 0 12px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.stat{padding:12px 5px;border:1px solid var(--line);background:#fff;border-radius:15px;text-align:center}.stat strong{display:block;font-size:21px;margin:3px 0}.stat small{font-size:9px;color:var(--muted)}.week-row{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.day-dot{border:0;border-radius:10px;padding:8px 2px;background:#eef0e8;color:#7d8d7d;font-size:9px}.day-dot.active{background:#5d8d68;color:#fff}.day-dot.completed{box-shadow:inset 0 -3px #8fbc96}.day-dot.paused{box-shadow:inset 0 -3px #b7afc7}.day-dot.unknown{box-shadow:inset 0 -3px #d5d8cf}.day-dot:disabled{opacity:.75;cursor:default}
.modal-backdrop,.reward-backdrop{position:absolute;inset:0;z-index:20;background:rgba(27,46,31,.42);display:flex;align-items:flex-end;justify-content:center}.sheet{background:#fffdf8;border-radius:25px 25px 0 0;width:100%;padding:21px 21px calc(26px + env(safe-area-inset-bottom));max-height:89%;overflow:auto;box-shadow:0 -12px 28px rgba(10,20,10,.11)}.sheet h2{font-family:Georgia,"Songti SC",serif;margin:3px 0 8px;font-size:22px}.close{border:0;background:#f0f1e9;border-radius:50%;width:31px;height:31px;color:#6f7d6d;font-weight:800}.reward-backdrop{align-items:center;padding:20px;backdrop-filter:blur(4px)}.reward-card{width:100%;max-width:330px;border:1px solid #f3e3c6;border-radius:26px;background:radial-gradient(circle at 50% 5%,#fff7d9 0%,transparent 52%),#fffdf8;padding:25px 22px 22px;text-align:center;box-shadow:0 26px 55px #15281555;animation:rewardPop .46s cubic-bezier(.2,1.4,.5,1) both}.reward-emoji{font-size:64px;margin:7px}.reward-card h2{font:750 22px/1.4 Georgia,"Songti SC",serif}.reward-card p{font-size:12px;line-height:1.7;color:#748274}.toast{position:absolute;z-index:30;bottom:92px;left:26px;right:26px;background:#3d6448;color:#fff;font-size:12px;line-height:1.5;padding:12px 16px;border-radius:13px;text-align:center;box-shadow:0 8px 20px rgba(30,60,30,.16)}@keyframes rewardPop{from{opacity:0;transform:translateY(26px) scale(.86)}to{opacity:1;transform:none}}
.setup{padding:6px 3px}.setup-art{text-align:center;background:linear-gradient(155deg,#e6f0e1,#fff1df);border-radius:24px;padding:18px 10px;margin-bottom:18px;font-size:70px}.ending-art{height:145px;border-radius:17px;display:grid;place-items:center;font-size:75px;background:linear-gradient(#d1e9e6 0%,#f9ebca 66%,#9bbd89 67%);overflow:hidden}.ending-art.balcony{background:linear-gradient(#f5dbc1 0%,#f5ebd7 68%,#ba8e73 69%)}.ending-art.tree{background:linear-gradient(#d5e8d9 0%,#fff0cd 65%,#88b58a 66%)}.ending-art.home,.ending-art.insufficient{background:linear-gradient(#d5d9dd 0%,#f1e5d5 66%,#bc9985 67%)}.ending-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-bottom:10px}.ending-tabs button{border:1px solid #e4e9dd;border-radius:10px;padding:8px 1px;background:#f6f7f1;color:#839080;font-size:10px;font-weight:800}.ending-tabs button.active{color:#376b49;background:#e2f0e1;border-color:#a8c8af}.legacy{margin-top:12px;padding:10px;border-radius:12px;background:#fff7e8;color:#876b47;font-size:11px;line-height:1.6}
@media(max-width:860px){body{background:var(--cream)}.desktop-shell{padding:0;display:block;min-height:100dvh}.editorial{display:none}.phone{width:100%;height:100dvh;min-height:0;max-width:none;border:0;border-radius:0;box-shadow:none}.phone:before{display:none}.topbar{padding-top:calc(14px + env(safe-area-inset-top))}.nav{padding-bottom:calc(8px + env(safe-area-inset-bottom));height:calc(70px + env(safe-area-inset-bottom))}.sheet{max-height:92%}}
@media(max-width:380px){.page{padding-left:14px;padding-right:14px}.topbar{padding-left:17px;padding-right:17px}.pet-scene{height:205px}.title{font-size:21px}.two{grid-template-columns:1fr}.radio-pill span{padding:8px 9px}.btn{padding-left:11px;padding-right:11px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;scroll-behavior:auto!important;transition:none!important}}

/* Pet presentation layer: the current SVG is a deliberate fallback until formal art ships. */
.pet-render{display:inline-flex;align-items:flex-end;justify-content:center;line-height:0;opacity:1;transition:opacity .2s ease}.pet-render .pet-art{display:block;max-width:100%;object-fit:contain;object-position:center bottom}.pet-render .pet-image{object-fit:contain;object-position:center bottom}.pet-fallback{display:block}.pet-fallback[hidden]{display:none}.pet-button .pet-render{width:156px;height:146px}.pet-button .pet-art{width:156px;height:146px;overflow:visible;transform-origin:50% 76%;animation:petBreath 3.6s ease-in-out infinite}.pet-button.excited .pet-art{animation:petHop .7s ease-in-out 2}.pet-button.rest .pet-art{animation:petRestBreath 4.8s ease-in-out infinite}.pet-motion-shake .pet-art{animation:petShake .55s ease-in-out both!important}.pet-motion-settle .pet-art{animation:petSettle .7s ease-in-out both!important}.pet-reward{width:128px;height:112px;margin:-14px auto -6px}.pet-reward .pet-art{width:128px;height:112px;animation:petHop .7s ease-in-out 2}.pet-ending{position:absolute;right:14px;bottom:2px;width:118px;height:118px;z-index:1}.pet-ending .pet-art{width:118px;height:118px;animation:petBreath 3.8s ease-in-out infinite}.ending-icon{position:absolute;left:25px;bottom:24px;font-size:49px;z-index:0}.setup-art{font-size:0;min-height:156px;display:grid;place-items:center}.pet-setup{width:150px;height:142px}.pet-setup .pet-art{width:150px;height:142px;animation:petBreath 3.6s ease-in-out infinite}@keyframes petRestBreath{0%,100%{transform:translateY(1px) rotate(-7deg) scale(1)}50%{transform:translateY(-2px) rotate(-7deg) scale(1.012)}}@keyframes petShake{0%,100%{transform:rotate(0)}25%{transform:rotate(-4deg) translateY(-2px)}75%{transform:rotate(4deg) translateY(-2px)}}@keyframes petSettle{0%,100%{transform:translateY(0) scale(1)}45%{transform:translateY(2px) scale(.985)}}
@media(prefers-reduced-motion:reduce){.pet-button .pet-art,.pet-reward .pet-art,.pet-ending .pet-art,.pet-setup .pet-art{animation:none!important}}

/* V0.6H candidate: autonomous position is a slow outer layer. The approved
   WebPs stay intact; only the opt-in route uses this four-frame raster cycle. */
.pet-button{touch-action:manipulation}
.pet-prototype-scene .pet-button{--roam-duration:1800ms;--step-duration:520ms;left:50%;top:43%;transition:left var(--roam-duration) linear,top var(--roam-duration) linear}
.pet-button .pet-sequence-candidate{width:156px;height:146px;animation:none;transform:none}
.pet-walk-facing,.pet-walk-size,.pet-walk-turn,.pet-walk-viewport,.pet-walk-frames{display:block;width:156px;height:146px;position:relative;transform-origin:center bottom}
.pet-walk-viewport{overflow:hidden}
.pet-walk-viewport[hidden],.pet-nest-rest-art[hidden],.pet-walk-frames[hidden]{display:none!important}
.pet-walk-frame{position:absolute;inset:0;width:156px;height:146px;object-fit:contain;object-position:center bottom;max-width:none;opacity:0;user-select:none;-webkit-user-drag:none}
.pet-nest-rest-art{position:absolute;inset:0;width:156px;height:146px;object-fit:contain;object-position:center bottom;opacity:0;pointer-events:none;transform:translateY(-18px) scale(.8);transform-origin:center center}
.pet-walk-frame-1{opacity:1}
.pet-button[data-direction="left"] .pet-walk-facing{transform:scaleX(-1)}
.pet-button[data-direction="right"] .pet-walk-facing{transform:scaleX(1)}
.pet-button[data-roam-state="turning"] .pet-walk-turn{animation:candidateTurn 280ms ease-in-out both}
.prototype-badge{position:absolute;left:10px;bottom:8px;z-index:7;padding:4px 7px;border-radius:8px;background:#7d553f;color:#fff;font-size:8px;font-weight:800;letter-spacing:.03em}
.pet-button[data-roam-state="walking"] .pet-walk-frame-1{animation:candidateWalkFrame1 var(--step-duration) linear infinite}
.pet-button[data-roam-state="walking"] .pet-walk-frame-2{animation:candidateWalkFrame2 var(--step-duration) linear infinite}
.pet-button[data-roam-state="walking"] .pet-walk-frame-3{animation:candidateWalkFrame3 var(--step-duration) linear infinite}
.pet-button[data-roam-state="walking"] .pet-walk-frame-4{animation:candidateWalkFrame4 var(--step-duration) linear infinite}
.pet-button[data-roam-state="walking"] .pet-walk-viewport{animation:candidateWalkBob var(--step-duration) ease-in-out infinite}
.pet-button[data-spot-activity="rug-stretch"] .pet-walk-viewport{transform:translateY(5px) scaleY(.96) rotate(-2deg)}
.pet-button[data-spot-activity="window-look"] .pet-walk-viewport{transform:translateY(-4px) rotate(-6deg)}
.pet-button[data-spot-activity="nest-rest"] .pet-walk-viewport,
.pet-button[data-roam-state="sleeping"] .pet-walk-viewport{opacity:0;animation:none!important}
.pet-button[data-spot-activity="nest-rest"] .pet-nest-rest-art,
.pet-button[data-roam-state="sleeping"] .pet-nest-rest-art{opacity:1}
/* The foreground lip should ground a nap, not cover it. Keep this override
   scoped to the prototype scene so the established static scene remains calm. */
.pet-prototype-scene .nest-rim{height:24px;border-width:5px;box-shadow:inset 0 3px 4px #70402844}
/* Keep the roaming candidate subordinate to the rug and nest while preserving
   its bottom edge; the approved resting art keeps its existing nest scale. */
.pet-prototype-scene .pet-button:not([data-spot-activity="nest-rest"]) .pet-walk-size{transform:scale(.88)}
.pet-motion-tilt .pet-walk-viewport,.pet-button[data-roam-state="stop-look"] .pet-walk-viewport{animation:candidateTilt .72s ease-in-out both}
.pet-motion-blink .pet-walk-viewport{animation:candidateBlink .65s ease-in-out both}
.pet-motion-hop .pet-walk-viewport{animation:candidateHop .72s ease-in-out both!important}
.pet-motion-petting .pet-walk-viewport{animation:candidateNuzzle 1.1s ease-in-out both!important}
.pet-motion-sleep-react .pet-walk-viewport{animation:candidateSleepReact .7s ease-in-out both}
.pet-motion-sleep-react .pet-nest-rest-art,.pet-button[data-roam-state="sleep-react"] .pet-nest-rest-art{animation:candidateSleepReact .7s ease-in-out both}
.pet-button[data-roam-state="settling"] .pet-walk-turn{animation:candidateSettle .36s ease-out both}
/* Four discrete source drawings: the front/rear paws change contact and swing
   pose per frame; only the viewport bob is CSS motion. */
@keyframes candidateWalkFrame1{0%,24.99%,100%{opacity:1}25%,99.99%{opacity:0}}
@keyframes candidateWalkFrame2{0%,24.99%,50%,100%{opacity:0}25%,49.99%{opacity:1}}
@keyframes candidateWalkFrame3{0%,49.99%,75%,100%{opacity:0}50%,74.99%{opacity:1}}
@keyframes candidateWalkFrame4{0%,74.99%,100%{opacity:0}75%,99.99%{opacity:1}}
@keyframes candidateWalkBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@keyframes candidateTurn{0%,100%{filter:none;transform:rotate(0)}45%{filter:drop-shadow(3px 0 0 rgba(185,158,117,.18));transform:translateY(-2px) rotate(-3deg)}}
@keyframes candidateSettle{0%{transform:translateY(-2px) scaleY(1.02)}55%{transform:translateY(2px) scaleY(.97)}100%{transform:none}}
@keyframes candidateTilt{0%,100%{transform:rotate(0)}45%,72%{transform:translateY(-2px) rotate(8deg)}}
@keyframes candidateBlink{0%,100%{transform:scaleY(1)}50%{transform:scaleY(.94)}}
@keyframes candidateHop{0%,100%{transform:translateY(0)}42%{transform:translateY(-11px) rotate(2deg)}68%{transform:translateY(2px) scaleY(.97)}}
@keyframes candidateNuzzle{0%,100%{transform:translate(0,0)}30%{transform:translate(-3px,2px) rotate(-3deg)}62%{transform:translate(4px,1px) rotate(4deg)}}
@keyframes candidateSleepReact{0%,100%{transform:rotate(0)}50%{transform:translateY(-2px) rotate(5deg)}}
.pet-roam-toggle{position:absolute;right:10px;top:10px;z-index:6;width:28px;height:28px;border:1px solid #dfe5d8;border-radius:50%;background:#ffffffe8;color:#627967;font-size:15px;line-height:1}
.pet-roam-toggle:focus-visible{outline:2px solid #6d9c74;outline-offset:2px}
@media(prefers-reduced-motion:reduce){.pet-button{transition:none!important}.pet-roam-toggle{display:none}.pet-walk-facing,.pet-walk-size,.pet-walk-turn,.pet-walk-viewport,.pet-walk-frame{animation:none!important;transition:none!important}}

/* V0.7 meal recognition stays inside the existing calm, paper-like system. */
.photo-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:8px 0}.photo-actions .danger{grid-column:1/-1}.photo-actions label{display:flex;align-items:center;justify-content:center}.picture{position:relative;cursor:default;height:176px}.picture-empty{text-align:center;line-height:1.8}.picture .photo-state{position:absolute;left:8px;right:8px;bottom:8px;border-radius:9px;background:#263b31c9;color:#fff;padding:7px 9px;font-size:10px;text-align:center}.inline-error{margin:9px 0;border:1px solid #efc9bd;background:#fff2ed;color:#9b5148;border-radius:12px;padding:10px 12px;font-size:12px;line-height:1.55}.analysis-meta{display:flex;justify-content:space-between;gap:8px;align-items:center;margin:12px 0 8px;padding:10px 11px;border-radius:12px;background:#edf5e9;color:#416b4d;font-size:11px}.analysis-meta span{color:#738272;font-size:10px}.analysis-uncertainties{margin:7px 0}.analysis-uncertainties summary{cursor:pointer;font-weight:750}.analysis-uncertainties small{display:block;margin-top:7px;line-height:1.55}.portion-scale{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}.portion-scale span{font-weight:800;color:var(--muted)}.section-heading.compact{margin:16px 0 8px}.section-heading.compact .btn{color:var(--forest-deep);font-weight:760}.empty-lines{border:1px dashed #d9ded1;border-radius:12px;padding:12px;color:var(--muted);font-size:11px;margin-bottom:9px}.ingredient-list{display:grid;gap:8px;margin-bottom:10px}.ingredient-row{position:relative;display:grid;grid-template-columns:1fr;gap:6px;padding:10px 34px 10px 10px;background:#f7f8f3;border:1px solid #e5e8dd;border-radius:14px}.ingredient-row .field{min-height:38px;padding:8px 9px;font-size:11px}.gram-range{display:grid;grid-template-columns:1fr auto 1fr auto;gap:5px;align-items:center;color:var(--muted);font-size:11px}.line-remove{position:absolute;right:7px;top:7px;border:0;width:25px;height:25px;border-radius:50%;background:#f5e5df;color:#9a5f55;font-size:17px}.nutrition-card{margin:9px 0 14px;padding:13px;border-radius:14px;background:#edf5e9;border:1px solid #dbe8d8;color:#48634c}.nutrition-card.muted{background:#f5f6f1;border-color:#e5e7df;color:#748073}.nutrition-card.warning{background:#fff7e8;border-color:#f0dfbd;color:#80633c}.nutrition-card>b,.nutrition-card>span{display:block}.nutrition-card>span,.nutrition-card small{font-size:10px;line-height:1.55}.nutrition-card>strong{display:block;font:750 22px Georgia,"Songti SC",serif;margin:9px 0 6px}.nutrition-card .row span{font-size:10px}.nutrition-macros{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:7px}.nutrition-macros span{background:#fff9;border-radius:8px;padding:5px 7px;font-size:10px}
@media(min-width:381px){.ingredient-row{grid-template-columns:1fr 1.25fr}.ingredient-row .gram-range{grid-column:1/-1}}

/* V0.7A room-first home. The generated room is scenery only; every action,
   pet state, label, response and sheet remains a separate DOM layer. */
.room-dock{display:none}
.phone[data-view="home"]{background:#f8f0df}
.phone[data-view="home"] .topbar{position:absolute;z-index:15;left:0;right:0;top:0;padding:calc(22px + env(safe-area-inset-top)) 17px 12px;background:linear-gradient(180deg,#fff7e6e8 0%,#fff7e6ae 67%,transparent);pointer-events:none}
.phone[data-view="home"] .topbar>*{pointer-events:auto}
.phone[data-view="home"] .brand{font-size:21px;color:#244d39;text-shadow:0 1px #fff8e8}
.phone[data-view="home"] .subtle{color:#617364;font-size:10px;font-weight:650}
.phone[data-view="home"] .header-actions{align-items:center}
.phone[data-view="home"] .icon-btn{min-height:40px;border-color:#e3d5bd;background:#fffaf0e8;color:#294a38;box-shadow:0 4px 13px #6f4a2720;font-weight:750}
.phone[data-view="home"] .rest-shortcut{display:none}
.phone:not([data-view="home"]) #night-toggle{display:none}
.phone[data-view="home"] .scroll{overflow:hidden;overscroll-behavior:none}
.phone[data-view="home"] .page{height:100%;padding:0}
.phone[data-view="home"] .legacy-nav{display:none}
.phone[data-view="home"] .room-dock{height:70px;flex-shrink:0;display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin:0 12px calc(8px + env(safe-area-inset-bottom));padding:7px;background:#fffdf7ed;border:1px solid #e3d6c0;border-radius:24px;box-shadow:0 10px 28px #5d402630,0 2px 8px #5d402618;backdrop-filter:blur(12px);z-index:16}
.room-dock button{min-height:52px;border:0;border-radius:18px;background:transparent;color:#657064;font-size:11px;font-weight:780;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.room-dock button:first-child{background:#e8f1e2;color:#2f6644;box-shadow:inset 0 0 0 1px #dbe9d5}
.room-dock button:focus-visible,.room-hotspot:focus-visible{outline:3px solid #4e845e;outline-offset:2px}
.room-dock span{font-size:22px;line-height:1}
.room-home{position:relative;height:100%;min-height:0;overflow:hidden;isolation:isolate;display:grid;grid-template-rows:minmax(0,1fr) auto;background:#f4e4ca}
.room-world.pet-scene{--floor-anchor:calc(100% - clamp(42px,15cqh,82px));--nest-pet-anchor:calc(var(--floor-anchor) - clamp(24px,6cqh,40px));--sofa-seat-anchor:calc(var(--floor-anchor) - 35cqw);position:relative;grid-row:1;inset:auto;width:100%;height:100%;min-height:0;border:0;border-radius:0;overflow:hidden;background:transparent;isolation:isolate;container-type:size}
.scene-backdrop,.room-ground,.room-props,.room-pet-layer,.room-feedback{position:absolute;inset:0}
.scene-backdrop{z-index:0;pointer-events:none;background:#ecd3ae}
.room-backdrop-art{display:block;width:100%;height:100%;object-fit:cover;object-position:center center;user-select:none;-webkit-user-drag:none}
.room-ground{z-index:1;pointer-events:none}.room-rug-art{--rug-height:clamp(72px,min(68cqw,26cqh),150px);position:absolute;left:50%;top:calc(var(--floor-anchor) - (var(--rug-height) * .54));width:clamp(190px,68cqw,310px);height:var(--rug-height);object-fit:contain;transform:translateX(-50%);filter:drop-shadow(0 7px 7px #70441f20)}
.room-props{z-index:2;pointer-events:none}
.room-hotspot{pointer-events:auto;position:absolute;min-width:44px;min-height:44px;border:0;color:#2f4d3b;font:inherit;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.room-hotspot:active{filter:brightness(.98);transform:translateY(1px)}
.room-prop-image{display:block;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none;filter:drop-shadow(0 8px 7px #5a351f28)}
.hotspot-label{position:absolute;z-index:3;min-height:38px;padding:8px 11px;border-radius:18px;background:#fffdf4f2;border:1px solid #dfd1b9;box-shadow:0 5px 13px #62471d20;color:#294b38;font-size:11px;font-weight:820;line-height:20px;white-space:nowrap;backdrop-filter:blur(6px)}
.hotspot-label b{font-size:15px;vertical-align:-1px}
.room-mantra-note{position:absolute;left:5%;top:17%;width:39%;max-width:158px;min-height:120px;padding:22px 16px 14px;text-align:left;border:3px solid #bd8b58;border-radius:5px 8px 6px 9px;background:#fff8e7f0;box-shadow:0 7px 14px #82562d20;transform:rotate(-1.8deg);color:#3f4e3d}
.room-mantra-note:before{content:"";position:absolute;inset:4px;border:1px solid #ead5ae;border-radius:3px;pointer-events:none}.room-mantra-note strong{position:relative;font:750 16px/1.68 Georgia,"Songti SC",serif}.room-mantra-note i{position:absolute;right:12px;bottom:8px;color:#e98569;font:700 24px Georgia,serif}.room-note-pin{position:absolute;left:50%;top:-12px;width:9px;height:20px;border:2px solid #9d774e;border-radius:7px;transform:rotate(9deg)}
.room-cabinet{right:4%;top:31%;width:20%;height:11%;background:transparent}
.cabinet-photo{position:absolute;right:3%;bottom:0;width:63%;aspect-ratio:4/5;display:grid;place-items:center;border:5px solid #805838;border-radius:3px;background:linear-gradient(145deg,#f7e3bd,#d9a777);box-shadow:0 6px 8px #5d3a2430;transform:rotate(2deg)}.cabinet-photo:before{content:"";position:absolute;inset:4px;border:1px solid #fff2d2}.cabinet-photo i{position:relative;color:#875b40;font:700 17px Georgia,serif}
.room-cabinet .hotspot-label{right:-2px;top:-27px}
.room-meal-table{left:1%;top:auto;bottom:calc(100% - var(--floor-anchor) - 12px);width:32%;height:clamp(72px,18cqh,130px);padding:0;background:transparent}
.room-meal-table .hotspot-label{left:6%;top:-18px}
.room-nest{right:1%;top:auto;bottom:calc(100% - var(--floor-anchor) + 25px);width:32%;height:clamp(78px,20cqh,142px);padding:0;background:transparent}
.room-nest .hotspot-label{right:6%;top:16px}
.room-shoes{right:1%;top:auto;bottom:calc(100% - var(--floor-anchor) - 35px);width:31%;height:clamp(56px,14cqh,100px);padding:0;background:transparent}
.room-shoes .hotspot-label{right:1%;top:-18px}
.room-bottom-panel{position:relative;z-index:8;grid-row:2;margin:0 4% clamp(8px,1.5%,14px);display:grid;gap:8px;align-items:end;pointer-events:none}.room-bottom-panel>*{pointer-events:auto}
.room-task-paper{position:relative;left:auto;bottom:auto;width:min(68%,292px);min-height:88px;padding:12px 38px 12px 14px;text-align:left;border:1px solid #dbcbaa;border-radius:7px 8px 12px 7px;background:#fffaf0f2;box-shadow:0 8px 18px #62411e29;transform:rotate(-.7deg)}
.room-task-paper:before{content:"";position:absolute;right:-3px;top:-3px;width:28px;height:24px;background:linear-gradient(135deg,#fffdf5 0 48%,#dbcbaa 49% 52%,transparent 53%);opacity:.75}.room-task-paper .room-task-title,.room-task-paper strong{display:block;position:relative}.room-task-paper .room-task-title{font:800 15px Georgia,"Songti SC",serif;color:#2d523e}.room-task-paper .room-task-title b{font-family:ui-sans-serif;font-size:17px}.room-task-paper strong{margin:8px 0 6px;font-size:11px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.room-task-paper .status{position:relative;padding:3px 7px}.room-task-paper>i{position:absolute;right:14px;bottom:17px;color:#315440;font:700 24px/1 Georgia,serif}
.room-pet-layer{z-index:3;pointer-events:none}.pet-shadow{position:absolute;z-index:0;left:50%;top:calc(var(--floor-anchor) - 2cqh);width:clamp(118px,32cqw,154px);height:clamp(10px,4cqh,18px);border-radius:50%;transform:translateX(-50%);background:#7352342b;filter:blur(4px)}.room-yarn{position:absolute;z-index:1;left:35%;top:calc(var(--floor-anchor) + clamp(8px,4cqh,22px));width:25px;height:25px;border-radius:50%;background:repeating-linear-gradient(24deg,#77866a 0 3px,#9fab88 4px 6px);box-shadow:2px 3px 4px #57462e38}.room-world .pet-button{pointer-events:auto;left:51%;top:var(--floor-anchor);z-index:2;transform:translate(-50%,-100%)}.room-world.pet-prototype-scene .pet-button{transition:left var(--roam-duration) linear,top var(--roam-duration) linear;transform:translate(-50%,-35%)}
.room-world .pet-button .pet-render{width:clamp(112px,min(40cqw,43cqh),172px);height:clamp(108px,min(38cqw,40cqh),160px)}.room-world .pet-button .pet-art{width:100%;height:100%}
.room-world:not(.pet-prototype-scene) .pet-button.rest{left:83%;top:calc(var(--floor-anchor) - clamp(24px,6cqh,40px))}.room-pet-layer:has(.pet-button.rest) .pet-shadow,.room-pet-layer:has(.pet-button[data-spot-activity="nest-rest"]) .pet-shadow{display:none}.room-world:has(.pet-button.rest) .room-shoes .hotspot-label,.room-world:has(.pet-button[data-spot-activity="nest-rest"]) .room-shoes .hotspot-label{right:calc(100% + 6px);top:-18px}.room-world:has(.pet-button.rest) .room-nest .hotspot-label,.room-world:has(.pet-button[data-spot-activity="nest-rest"]) .room-nest .hotspot-label{right:calc(100% + 6px);top:16px;bottom:auto}.room-world:not(.pet-prototype-scene) .pet-button.rest .pet-render{width:clamp(84px,min(26cqw,28cqh),108px);height:clamp(78px,min(24cqw,26cqh),100px)}
.room-feedback{z-index:6;pointer-events:none}.room-feedback-bubble{pointer-events:auto;position:absolute;left:35%;top:31%;width:min(59%,218px);padding:13px 40px 13px 15px;border:1px solid #e4d7c1;border-radius:21px 22px 22px 7px;background:#fffdf7f2;box-shadow:0 8px 20px #54432920;font:650 12px/1.65 Georgia,"Songti SC",serif;color:#3c5141;animation:roomBubbleIn .25s ease-out both}.room-feedback-bubble:after{content:"";position:absolute;left:24px;bottom:-10px;border:10px solid transparent;border-left-color:#fffdf7;transform:rotate(14deg)}.room-feedback-bubble button{position:absolute;right:0;top:0;width:44px;height:44px;border:0;border-radius:50%;background:transparent;color:#8a9486}.room-feedback-bubble.rest{background:#fff7e8}
@keyframes roomBubbleIn{from{opacity:0;transform:translateY(7px) scale(.97)}to{opacity:1;transform:none}}
.room-night .scene-backdrop:after{content:"";position:absolute;inset:0;background:linear-gradient(#17384952,#2334297d);mix-blend-mode:multiply}.room-night .room-backdrop-art{filter:brightness(.61) saturate(.78) hue-rotate(8deg)}.room-night .room-ground,.room-night .room-pet-layer{filter:brightness(.78) saturate(.78)}.room-night .room-mantra-note,.room-night .cabinet-photo{filter:brightness(.78) saturate(.78)}.room-night .room-prop-image{filter:drop-shadow(0 8px 7px #5a351f28) brightness(.78) saturate(.78)}.room-night .topbar{background:linear-gradient(180deg,#263f3cf0 0%,#263f3cb8 68%,transparent)}.room-night .brand,.room-night .subtle{color:#fffbe8}.room-night .icon-btn{background:#536361;color:#fff8df;border-color:#71807c}
.room-sheet-task{display:flex;align-items:center;gap:10px;padding:13px;margin:8px 0 12px;border-radius:14px;background:#f5f5ed}.room-sheet-task strong{font-size:14px}.room-flow-sheet{max-height:86%;padding-top:16px}.room-flow-sheet .sheet-heading{position:sticky;top:-16px;z-index:5;margin:-16px -2px 8px;padding:13px 2px 9px;background:#fffdf8f2;backdrop-filter:blur(8px)}.room-sheet-flow>.pill,.room-sheet-flow>.title{display:none}.room-sheet-flow>.lead{margin-top:4px}.room-sheet-flow .picture{height:135px}.room-flow-cancel{margin-top:10px}.room-memory-flow .ending-art{height:120px}
.room-memory-heading{margin-top:8px}.memory-tabs{display:grid;gap:12px}.memory-tabs>div{padding:12px;border:1px solid var(--line);border-radius:16px;background:#fff}.memory-tabs h3{margin:0 0 6px;font-size:13px}.memory-dated-entry{padding-top:8px}.memory-dated-entry>span{font-size:9px;color:var(--muted);font-weight:700}.memory-dated-entry .list-entry{padding-top:5px}

@media(max-width:350px){.room-mantra-note{width:41%;min-height:105px;padding:18px 12px 11px}.room-mantra-note strong{font-size:13px}.room-task-paper{width:72%;min-height:80px;padding-top:10px}.hotspot-label{min-height:34px;padding:6px 8px;font-size:9px}.room-world .pet-button .pet-render{width:130px;height:124px}}
@media(max-height:740px){.room-mantra-note{top:16%;min-height:104px;padding-top:17px}.room-mantra-note strong{font-size:14px}.room-nest .hotspot-label{top:22px}.room-cabinet{top:30%}.room-bottom-panel{gap:6px}}
@media(max-height:650px){.room-bottom-panel{margin-left:3%;margin-right:3%;margin-bottom:6px;gap:5px}.room-task-paper{min-height:64px;padding:7px 34px 7px 11px}.room-task-paper .room-task-title{font-size:13px}.room-task-paper .room-task-title b{font-size:14px}.room-task-paper strong{margin:3px 0;font-size:10px}.room-task-paper .status{padding:2px 6px;font-size:8px}.room-task-paper>i{right:12px;bottom:10px}.room-yarn{display:none}}
@media(prefers-reduced-motion:reduce){.room-feedback-bubble{animation:none!important}}

/* Soft-body lively companion. This is independent of the legacy
   ?petPrototype=1 route so its 35% experimental anchor remains unchanged. */
.room-world.pet-life-scene .room-props{z-index:auto}
.room-world.pet-life-scene .hotspot-label{z-index:7}
.room-world.pet-life-scene .pet-shadow{display:none}
.room-world.pet-life-scene .pet-button{--roam-duration:1800ms;--step-duration:640ms;--action-duration:1200ms;transition:left var(--roam-duration) linear,top var(--roam-duration) linear;transform:translate(calc(-50% + var(--pet-life-travel-x,0px)),calc(-100% + var(--pet-life-travel-y,0px)))}
.room-world.pet-life-scene .pet-button[data-roam-state="walking"]{transition:transform var(--roam-duration) linear;will-change:transform}
.pet-life-candidate,.pet-life-facing,.pet-life-size,.pet-life-turn,.pet-life-stage,.pet-life-sequence{display:block;position:relative;width:100%;height:100%;transform-origin:center bottom}
.pet-life-facing{position:relative}
.pet-life-stage{overflow:hidden}
.pet-life-stage[hidden],.pet-life-static[hidden]{display:none!important}
.pet-life-sequence{position:absolute;inset:0;opacity:0;pointer-events:none}
.pet-life-sequence-walk{inset:0 auto 0 0;display:flex;width:800%;opacity:1}
.pet-life-frame{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:contain;object-position:center bottom;opacity:0;user-select:none;-webkit-user-drag:none}
.pet-life-sequence-walk .pet-life-frame{position:relative;inset:auto;flex:0 0 12.5%;width:12.5%;height:100%;opacity:1}
.pet-life-sequence-walk .pet-life-frame-1{object-position:calc(50% - 1.5px) bottom}
.pet-life-sequence-walk .pet-life-frame-2{object-position:calc(50% + 1px) bottom}
.pet-life-sequence-walk .pet-life-frame-4,.pet-life-sequence-walk .pet-life-frame-7{object-position:calc(50% + .5px) bottom}
.pet-life-sequence-walk .pet-life-frame-5{object-position:calc(50% - 2.5px) bottom}
.pet-life-frame-1{opacity:1}
.pet-life-static{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom}
.pet-life-scene .pet-button[data-direction="left"] .pet-life-facing{transform:scaleX(-1)}
.pet-life-scene .pet-button[data-direction="right"] .pet-life-facing{transform:scaleX(1)}
.room-world.pet-life-scene .pet-button.rest .pet-render{width:clamp(112px,min(40cqw,43cqh),172px);height:clamp(108px,min(38cqw,40cqh),160px)}
@media(max-width:350px){.room-world.pet-life-scene .pet-button.rest .pet-render{width:130px;height:124px}}
.pet-life-scene .pet-button[data-pet-surface="sofa"] .pet-life-size{transform:scale(.72)}
.pet-life-scene .pet-button[data-spot-activity="nest-rest"] .pet-life-size,
.pet-life-scene .pet-button[data-roam-state="sleeping"] .pet-life-size,
.pet-life-scene .pet-button[data-roam-state="sleep-react"] .pet-life-size{transform:scale(.76)}
.pet-life-scene .pet-button[data-spot-activity="nest-rest"] .pet-life-sequence-walk,
.pet-life-scene .pet-button[data-roam-state="sleeping"] .pet-life-sequence-walk,
.pet-life-scene .pet-button[data-roam-state="sleep-react"] .pet-life-sequence-walk{opacity:0}
.pet-life-scene .pet-button[data-spot-activity="nest-rest"] .pet-life-sequence-loaf,
.pet-life-scene .pet-button[data-roam-state="sleeping"] .pet-life-sequence-loaf,
.pet-life-scene .pet-button[data-roam-state="sleep-react"] .pet-life-sequence-loaf{opacity:1}
.pet-life-scene .pet-button[data-spot-activity="nest-rest"] .pet-life-sequence-loaf .pet-life-frame{animation:none;opacity:0}
.pet-life-scene .pet-button[data-spot-activity="nest-rest"] .pet-life-sequence-loaf .pet-life-frame-3{opacity:1;animation:petLifeLoafRest3 4.2s steps(1,end) infinite}
.pet-life-scene .pet-button[data-spot-activity="nest-rest"] .pet-life-sequence-loaf .pet-life-frame-4{animation:petLifeLoafRest4 4.2s steps(1,end) infinite}
.pet-life-scene .pet-button[data-roam-state="sleep-react"] .pet-life-sequence-loaf .pet-life-frame{animation:none;opacity:0}
.pet-life-scene .pet-button[data-roam-state="sleep-react"] .pet-life-sequence-loaf .pet-life-frame-1{opacity:1}
.pet-life-scene .pet-button.pet-motion-greet .pet-life-sequence,
.pet-life-scene .pet-button.pet-motion-groom .pet-life-sequence,
.pet-life-scene .pet-button[data-spot-activity="rug-groom"] .pet-life-sequence,
.pet-life-scene .pet-button[data-spot-activity="sofa-play"] .pet-life-sequence{opacity:0}
.pet-life-scene .pet-button.pet-motion-greet .pet-life-sequence-greet{opacity:1;--action-duration:1100ms}
.pet-life-scene .pet-button.pet-motion-groom .pet-life-sequence-groom{opacity:1;--action-duration:1320ms}
.pet-life-scene .pet-button[data-spot-activity="rug-groom"] .pet-life-sequence-groom{opacity:1;--action-duration:1320ms}
.pet-life-scene .pet-button[data-spot-activity="sofa-play"] .pet-life-sequence-jump{opacity:1;--action-duration:960ms}
.pet-life-scene .pet-button[data-roam-state="walking"] .pet-life-sequence-walk{animation:petLifeWalkStrip var(--step-duration) steps(8,end) infinite;will-change:transform}
.pet-life-scene .pet-life-sequence[data-frame-count="4"] .pet-life-frame-1{animation:petLife4Frame1 var(--action-duration) linear infinite;animation-play-state:paused}
.pet-life-scene .pet-life-sequence[data-frame-count="4"] .pet-life-frame-2{animation:petLife4Frame2 var(--action-duration) linear infinite;animation-play-state:paused}
.pet-life-scene .pet-life-sequence[data-frame-count="4"] .pet-life-frame-3{animation:petLife4Frame3 var(--action-duration) linear infinite;animation-play-state:paused}
.pet-life-scene .pet-life-sequence[data-frame-count="4"] .pet-life-frame-4{animation:petLife4Frame4 var(--action-duration) linear infinite;animation-play-state:paused}
.pet-life-scene .pet-button.pet-motion-greet .pet-life-sequence-greet .pet-life-frame,
.pet-life-scene .pet-button.pet-motion-groom .pet-life-sequence-groom .pet-life-frame,
.pet-life-scene .pet-button[data-roam-state="exploring"][data-spot-activity="rug-groom"] .pet-life-sequence-groom .pet-life-frame,
.pet-life-scene .pet-button[data-roam-state="arriving"][data-spot-activity="sofa-play"] .pet-life-sequence-jump .pet-life-frame,
.pet-life-scene .pet-button[data-roam-state="departing"][data-spot-activity="sofa-play"] .pet-life-sequence-jump .pet-life-frame,
.pet-life-scene .pet-button[data-roam-state="exploring"][data-spot-activity="sofa-play"] .pet-life-sequence-jump .pet-life-frame{animation-play-state:running}
.pet-life-scene .pet-button[data-roam-state="departing"] .pet-life-sequence-jump .pet-life-frame{animation-direction:reverse}
/* The source canvases share a foot baseline. Only their chest is registered
   horizontally here (within 2.5 rendered pixels), preserving the real paw
   contacts and vertical body bob instead of faking motion with whole-cat shake. */
@keyframes petLifeWalkStrip{from{transform:translateX(0)}to{transform:translateX(-100%)}}
@keyframes petLife4Frame1{0%,24.99%,100%{opacity:1}25%,99.99%{opacity:0}}
@keyframes petLife4Frame2{0%,24.99%,50%,100%{opacity:0}25%,49.99%{opacity:1}}
@keyframes petLife4Frame3{0%,49.99%,75%,100%{opacity:0}50%,74.99%{opacity:1}}
@keyframes petLife4Frame4{0%,74.99%,100%{opacity:0}75%,99.99%{opacity:1}}
@keyframes petLifeLoafRest3{0%,74.9%,100%{opacity:1}75%,89.9%{opacity:0}}
@keyframes petLifeLoafRest4{0%,74.9%,90%,100%{opacity:0}75%,89.9%{opacity:1}}
.pet-life-header-toggle{width:40px;height:40px;min-height:40px;padding:0;display:grid;place-items:center;font-size:16px;line-height:1}
.pet-life-header-toggle[hidden]{display:none}
.pet-life-header-toggle:focus-visible{outline:3px solid #4e845e;outline-offset:2px}
.pet-life-header-toggle:disabled{opacity:.62}
@media(prefers-reduced-motion:reduce){.pet-life-scene .pet-button{transition:none!important}.pet-life-header-toggle{display:none!important}.pet-life-facing,.pet-life-size,.pet-life-turn,.pet-life-stage,.pet-life-sequence,.pet-life-frame{animation:none!important;transition:none!important}}

/* PWA updates stay out of the room layout and never force-refresh a draft. */
.pwa-update{position:absolute;z-index:60;left:12px;right:12px;bottom:calc(82px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:10px;padding:10px 10px 10px 12px;border:1px solid #d7decf;border-radius:14px;background:#fffdf8f5;box-shadow:0 8px 26px #314b3526;color:#405b46;font-size:11px;line-height:1.45}
.pwa-update span{flex:1}.pwa-update button{min-width:44px;min-height:44px;border:0;border-radius:12px;background:#e7f1e3;color:#346344;font:inherit;font-weight:800}.pwa-update button:focus-visible{outline:3px solid #4e845e;outline-offset:2px}
@media(prefers-reduced-motion:reduce){.pwa-update{scroll-behavior:auto}}
.pwa-guide-backdrop{position:absolute;inset:0;z-index:70;display:flex;align-items:flex-end;background:#1b2e1f6b}.pwa-guide{width:100%;max-height:92%;overflow:auto;padding:21px 21px calc(26px + env(safe-area-inset-bottom));border-radius:25px 25px 0 0;background:#fffdf8;box-shadow:0 -12px 28px #0a140a1c}.pwa-guide h2{margin:3px 0 12px;font:750 22px Georgia,"Songti SC",serif}.pwa-guide h3{margin:18px 0 6px;font-size:14px;color:#405b46}.pwa-guide p{margin:0;color:var(--muted);font-size:12px;line-height:1.7}.pwa-guide .note{margin:18px 0}.pwa-guide-close{width:44px;height:44px;border:0;border-radius:50%;background:#f0f1e9;color:#6f7d6d;font-size:22px;font-weight:800}.pwa-guide-close:focus-visible,.pwa-guide-done:focus-visible{outline:3px solid #4e845e;outline-offset:2px}

.today-summary,.meal-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:#fffdf8;color:var(--ink);font-size:11px;line-height:1.5}
.phone[data-view="home"] .today-summary{position:relative;z-index:auto;left:auto;right:auto;bottom:auto;margin:0;min-height:66px;padding:8px 9px 8px 11px;border-color:#decfb5;border-radius:8px 10px 7px 11px;background:#fffaf0ed;box-shadow:0 7px 18px #61411f25;transform:rotate(.35deg);backdrop-filter:blur(5px)}.today-summary>div:first-child{display:grid;gap:1px;min-width:0}.phone[data-view="home"] .today-summary strong{font:800 12px Georgia,"Songti SC",serif;color:#31523f}.phone[data-view="home"] .today-summary span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px}.today-summary span,.meal-summary span{color:var(--muted)}.today-summary-actions{display:grid;gap:4px;flex:none}
.body-snapshot{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}.body-metric{min-width:0;padding:11px 9px;border:1px solid var(--line);border-radius:14px;background:#fff}.body-metric small,.body-metric span,.body-metric em{display:block;overflow-wrap:anywhere;font-size:10px;line-height:1.5}.body-metric small{color:#687768;font-weight:760}.body-metric strong{display:block;margin:5px 0 3px;font-size:14px;line-height:1.25;color:var(--ink)}.body-metric span{color:var(--muted)}.body-metric em{margin-top:4px;color:#58725f;font-style:normal}.body-clear{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:10px}.body-clear label{display:flex;align-items:center;gap:4px;min-width:0;padding:8px;border:1px solid var(--line);border-radius:10px;background:#f8faf5;color:var(--muted);font-size:10px;line-height:1.35}.body-clear input{margin:0;accent-color:var(--forest)}
.today-summary button{flex:none;min-height:30px;padding:4px 8px;border:1px solid #dce4d6;border-radius:7px;background:#eef3e8;color:#405b46;font:inherit;font-size:9px;font-weight:750}
.meal-summary{align-items:flex-start;flex-direction:column;margin:8px 0}.target-form{margin:12px 0;padding:12px;border:1px solid var(--line);border-radius:8px;background:#fffdf8}.target-input{display:flex;gap:8px;align-items:center}.target-input .field{flex:1;min-width:0}.target-form .hint{display:block;margin:7px 0 0}
.macro-summary,.meal-templates,.nutrition-week{display:block;margin:10px 0;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fffdf8;color:var(--ink);font-size:11px;line-height:1.5}
.macro-summary.complete{border-color:#cfe0cb;background:#f2f8ef}.macro-summary.partial{border-color:#ead7ad;background:#fff9ea}.macro-summary.empty,.macro-summary.unavailable{background:#f5f6f2;color:#667064}
.macro-summary .row,.meal-templates>.row{display:flex;align-items:center;justify-content:space-between;gap:8px}.macro-summary .row span,.meal-templates>.row span{color:var(--muted);font-size:10px}
.macro-summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:9px 0}.macro-summary-grid div{padding:8px 5px;border-radius:8px;background:#ffffffb8;text-align:center}.macro-summary-grid small,.macro-summary-grid strong{display:block}.macro-summary-grid small{color:var(--muted);font-size:9px}.macro-summary-grid strong{margin-top:2px;font-size:11px}.macro-summary p,.meal-templates p,.nutrition-week p{margin:7px 0 0;color:var(--muted);font-size:10px}
.nutrition-week>summary,.meal-templates summary{cursor:pointer;font-weight:780;color:#405b46}.trend-days{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(76px,1fr);gap:6px;margin-top:9px;overflow-x:auto;padding-bottom:4px}.trend-day{display:grid;gap:2px;min-height:103px;padding:8px;border-radius:9px;border:1px solid #d6e3d2;background:#f1f7ee}.trend-day.partial{border-color:#e8d7b1;background:#fff8e8}.trend-day.no-record,.trend-day.unavailable{border-color:#e2e4de;background:#f3f4f0}.trend-day b{font-size:10px}.trend-day span{font-size:9px;color:#617264}.trend-day small{font-size:9px;color:#677068}.trend-day.no-record small,.trend-day.unavailable small{margin-top:auto}
.template-apply{display:grid;gap:8px;margin-top:9px}.template-apply label{display:flex;align-items:center;justify-content:space-between;color:var(--muted)}.template-apply label span{display:flex;align-items:center;gap:5px}.template-apply label .field{width:82px;min-height:38px}.meal-templates details{margin-top:10px}.template-manage-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:5px;margin-top:7px}.template-manage-row .field{min-width:0;min-height:38px;font-size:11px}.template-manage-row .btn{padding-inline:9px}
.meal-intro{margin:4px 0 8px;color:var(--muted);font-size:11px;line-height:1.5}.meal-templates{margin:7px 0}.meal-recent{margin:-2px 0 9px}.meal-basics .form-label:first-child{margin-top:5px}.meal-optional,.meal-insights{margin:10px 0;border:1px solid var(--line);border-radius:14px;background:#fffdf8}.meal-optional>summary,.meal-insights>summary{cursor:pointer;padding:12px;font-size:12px;font-weight:780;color:#405b46;list-style-position:inside}.meal-optional>summary span{float:right;color:var(--muted);font-size:10px;font-weight:650}.meal-optional[open],.meal-insights[open]{padding:0 12px 12px}.meal-optional[open]>summary,.meal-insights[open]>summary{margin:0 -12px 4px;padding:12px}.meal-task-confirm{min-width:0;margin:11px 0 5px;padding:10px;border:1px solid #d9e6d6;border-radius:14px;background:#f2f7ef}.meal-task-confirm legend{padding:0 4px;color:#365c40;font-size:12px;font-weight:800}.meal-task-confirm p{margin:2px 0 8px;font-size:11px;color:var(--muted)}.meal-task-confirm small{display:block;margin-top:7px;line-height:1.45;color:var(--muted)}.meal-task-confirm .radio-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}.meal-task-confirm .radio-pill span{height:100%;padding:7px 4px;text-align:center;font-size:10px;line-height:1.35}.meal-actions{display:grid;gap:7px;padding:8px 0 5px;background:#fffdf8}.meal-actions .meal-save,.meal-actions>.btn.ghost{margin:0}.room-flow-sheet .meal-actions{position:sticky;bottom:-20px;z-index:6;margin-inline:-2px;padding:9px 2px 14px;box-shadow:0 -9px 15px #fffdf8}.room-sheet-flow .picture{height:105px}.meal-insights{margin:10px 0}.meal-insights .nutrition-week{margin-bottom:0}.list-entry strong>small{display:inline;margin:0 0 0 4px;font-size:9px;font-weight:700;color:var(--muted)}
