:root{--ink:#292829;--muted:#89827d;--paper:#f7f1e8;--card:#fffdfa;--line:#e9e0d6;--coral:#ef8f78;--coral-dark:#d96f5d;--lilac:#d9ccf3;--mint:#c8e6d6;--blue:#c8e1f3;--sun:#f4d98e;--shadow:0 18px 50px rgba(78,56,37,.06);--sans:ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;--round:ui-rounded,'Trebuchet MS',ui-sans-serif,system-ui,sans-serif}
*{box-sizing:border-box}html{background:var(--paper);scroll-behavior:smooth}body{margin:0;color:var(--ink);font-family:var(--sans);font-size:0.875rem;line-height:1.5;min-height:100vh;background:radial-gradient(ellipse at 5% 6%,rgba(246,210,178,.18),transparent 28%),radial-gradient(ellipse at 92% 20%,rgba(210,199,243,.16),transparent 26%),var(--paper)}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid rgba(217,111,93,.45);outline-offset:3px}button:disabled{opacity:.55;cursor:wait}[hidden]{display:none!important}.paper-grain{position:fixed;inset:0;pointer-events:none;z-index:20;opacity:.12;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E")}.topbar{height:88px;padding:0 clamp(22px,5vw,78px);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(221,207,190,.72);position:relative;z-index:21}.brand{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none}.brand-mark{width:42px;height:42px;border-radius:15px;background:#f0aa94;display:grid;place-items:center;transform:rotate(-5deg);box-shadow:inset 0 -3px 0 rgba(147,75,58,.12)}.brand-mark span{font-size:1.4375rem;color:white;text-shadow:0 1px 1px #d98978}.brand-copy{display:flex;flex-direction:column;line-height:1.1;gap:4px}.brand-copy strong{font-family:var(--round);font-size:1.3125rem;font-weight:900;letter-spacing:-.8px}.brand-copy small{font-size:0.5rem;letter-spacing:1.55px;color:#a59a91;font-weight:700}.topbar-right{display:flex;align-items:center;gap:12px}.connection-pill{height:30px;border:1px solid #e5ddd3;border-radius:99px;display:inline-flex;align-items:center;gap:7px;padding:0 11px;font-size:0.6875rem;color:#8d857c;background:rgba(255,253,250,.75)}.connection-pill i,.live-dot{width:6px;height:6px;background:#72b997;border-radius:50%;box-shadow:0 0 0 3px rgba(114,185,151,.12)}.connection-pill.offline i{background:#d3a36b;box-shadow:0 0 0 3px rgba(211,163,107,.12)}.pal-switcher{background:#fffdfa;border:1px solid var(--line);border-radius:10px;padding:8px 12px;max-width:180px;color:var(--ink)}.button{border:0;border-radius:12px;padding:11px 16px;font-weight:700;transition:transform .16s ease,box-shadow .16s ease,background .16s ease;display:inline-flex;align-items:center;justify-content:center;gap:8px}.button:hover:not(:disabled){transform:translateY(-1px)}.button-small{padding:8px 12px;font-size:0.75rem}.button-dark{background:#34302f;color:white;box-shadow:0 4px 10px #38302b13}.button-primary{background:var(--coral);color:#fffdf9;box-shadow:0 7px 15px #e58b7830}.button-primary:hover:not(:disabled){background:#e88570;box-shadow:0 9px 18px #e58b7845}.button-wide{width:100%;min-height:49px}.button-quiet{background:#fffcf7;border:1px solid var(--line);color:#756e67;padding:10px 13px;font-size:0.75rem}.button-quiet:hover{background:#fff}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.app-shell{max-width:1260px;margin:0 auto;padding:0 35px}.loading-screen{min-height:65vh;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#8b8078;gap:14px}.loading-screen p{margin:0;font-size:0.8125rem}.loading-orbit{width:78px;height:78px;border-radius:25px;background:#fffaf4;box-shadow:inset 0 0 0 1px #eadfd4;display:flex;align-items:center;justify-content:center;gap:7px;color:#e58f79;animation:float 2.7s ease-in-out infinite}.loading-orbit span{font-size:1.25rem}.loading-orbit span:nth-child(2){color:#bfacd9}.loading-orbit span:nth-child(3){font-size:1.875rem;color:#90c5a9}.adopt-screen{padding:45px 0 22px;display:grid;grid-template-columns:minmax(0,.92fr) minmax(430px,1.08fr);align-items:center;gap:clamp(38px,7vw,100px);min-height:calc(100vh - 88px)}.adopt-intro{padding:0 0 35px 3px}.eyebrow{font-size:0.5625rem;font-weight:800;letter-spacing:1.85px;color:#a69a90;margin:0 0 12px;text-transform:uppercase}.eyebrow-star{color:#e9947d;font-size:0.9375rem;vertical-align:-1px;margin-right:4px}.adopt-intro h1,.page-intro h1{font-family:var(--round);font-weight:900;letter-spacing:-2.1px;font-size:clamp(2.5rem,5vw,3.875rem);line-height:1.05;margin:0 0 22px}.adopt-intro h1 em,.page-intro h1 em{font-style:normal;color:#dd8b76}.intro-copy{max-width:410px;color:#81786f;font-size:0.875rem;line-height:1.9;margin:0 0 27px}.promise-line{display:inline-flex;align-items:center;gap:9px;border:1px dashed #e0cabe;border-radius:99px;padding:8px 13px;color:#877a70;font-size:0.6875rem;background:#fffbf5aa}.promise-line span{color:#e18d80;font-size:1.0625rem}.adopt-card{border:1px solid #eadfd4;background:rgba(255,253,250,.94);padding:clamp(22px,3vw,34px);border-radius:24px;box-shadow:0 24px 80px rgba(89,66,45,.07);position:relative;overflow:hidden}.adopt-card:before{content:"";position:absolute;right:-50px;top:-70px;width:160px;height:160px;border-radius:50%;background:#f8e3d7;opacity:.48}.card-heading{display:flex;justify-content:space-between;align-items:flex-start;position:relative;margin-bottom:20px}.card-heading .eyebrow{margin-bottom:5px}.card-heading h2,.section-heading h2,.modal-card h2{font-family:var(--round);font-size:1.375rem;font-weight:900;letter-spacing:-.45px;margin:0;line-height:1.3}.tiny-stamp{font-family:var(--round);font-size:0.5625rem;font-weight:900;color:#d78c78;border:1px solid #efd6ca;border-radius:10px;transform:rotate(6deg);padding:7px 9px;line-height:1.6;text-align:center;background:#fff9f2}.species-fieldset,.color-fieldset{border:0;padding:0;margin:0;min-width:0}.species-fieldset legend,.color-fieldset legend{font-weight:700;font-size:0.6875rem;margin-bottom:10px;color:#6d655e}.species-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.species-option{border:1px solid #ece4dc;background:#fffdf9;min-width:0;border-radius:12px;padding:10px 4px 8px;display:flex;align-items:center;flex-direction:column;color:#70665e;transition:border-color .15s ease,background .15s ease,transform .15s ease;position:relative}.species-option:hover{transform:translateY(-2px);border-color:#e1c4b4}.species-option.selected{border-color:#e9937e;background:#fff2e9;box-shadow:inset 0 0 0 1px #e9937e33}.species-face{font-size:1.4375rem;height:35px;display:grid;place-items:center;margin-bottom:2px;filter:saturate(.8)}.species-option strong{font-family:var(--round);font-size:0.75rem;font-weight:900;color:#403a37}.species-option small{font-size:0.5rem;color:#a49a91;margin-top:1px;white-space:nowrap}.form-row{margin:18px 0 16px}.field-label{display:flex;justify-content:space-between;font-weight:700;font-size:0.6875rem;color:#6d655e;margin-bottom:8px}.field-label span{font-size:0.5625rem;color:#aaa097;font-weight:500}.form-row input,.modal-card input{width:100%;height:44px;padding:0 13px;border:1px solid #e7ded4;border-radius:11px;background:#fffdfa;color:#3e3935;outline:none;transition:border-color .15s}.form-row input:focus,.modal-card input:focus{border-color:#e69b85}.color-fieldset{margin-bottom:19px}.color-options{display:flex;align-items:center;gap:10px}.color-swatch{border:2px solid transparent;width:31px;height:31px;border-radius:50%;padding:3px;background:transparent;display:grid;place-items:center}.color-swatch span{display:block;width:100%;height:100%;border-radius:50%;background:var(--swatch);box-shadow:inset 0 -3px 0 #0000000b}.color-swatch.selected{border-color:#6a625a}.color-swatch[data-color=peach]{--swatch:#f0b49c}.color-swatch[data-color=mint]{--swatch:#bfe3cf}.color-swatch[data-color=lilac]{--swatch:#d4c4f0}.color-swatch[data-color=sky]{--swatch:#a9d0eb}.color-swatch[data-color=lemon]{--swatch:#f0dc90}.color-swatch[data-color=berry]{--swatch:#d9a4b9}.form-error{font-size:0.6875rem;color:#bd5747;background:#fff0eb;border-radius:8px;padding:9px 11px;margin:0 0 10px}.tiny-note{text-align:center;font-size:0.5625rem;color:#a89d93;margin:10px 0 0}.import-row{text-align:center;border-top:1px solid #f0e8df;margin-top:18px;padding-top:14px}.text-button{padding:0;border:0;background:transparent;color:#9b7f73;font-size:0.6875rem;font-weight:600}.text-button:hover{color:#d47664}.page-footer{text-align:center;grid-column:1/-1;font-size:0.5rem;letter-spacing:1.6px;color:#b0a49a;padding:0 0 10px}.page-footer span{color:#e09b86;margin:0 8px}.pet-screen{padding:36px 0 14px}.page-intro{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:23px}.page-intro .eyebrow{margin-bottom:7px}.page-intro h1{font-size:clamp(2.125rem,4.2vw,2.875rem);margin:0}.intro-actions{display:flex;gap:8px;padding-bottom:4px}.offline-banner{display:flex;gap:12px;align-items:center;padding:12px 16px;background:#fff6e5;border:1px solid #eddfbd;border-radius:13px;margin-bottom:16px;color:#937650}.offline-banner>span{font-size:1.25rem}.offline-banner strong{font-size:0.75rem}.offline-banner p{margin:0;font-size:0.625rem}.pet-layout{display:grid;grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr);gap:18px;align-items:stretch}.panel-card{background:rgba(255,253,250,.95);border:1px solid #e9dfd5;border-radius:20px;box-shadow:var(--shadow)}.pet-world{padding:19px 20px 0;display:flex;flex-direction:column;overflow:hidden;min-width:0}.world-scene{height:300px;position:relative;display:flex;align-items:center;justify-content:center;isolation:isolate;margin:4px -4px 0;overflow:hidden;background:linear-gradient(180deg,#f9e9dd 0%,#f9e7df 53%,#d7ecdc 53.3%,#cce4d5 100%);border-radius:15px 15px 0 0}.world-scene:after{content:"";position:absolute;left:-8%;right:-8%;bottom:36px;height:32px;border-radius:50% 50% 0 0;background:#c2dfcb;z-index:-1}.cloud{position:absolute;width:65px;height:21px;background:#fffbf7;opacity:.72;border-radius:99px;top:50px}.cloud:before,.cloud:after{content:"";position:absolute;bottom:3px;border-radius:50%;background:#fffbf7}.cloud:before{width:26px;height:26px;left:11px}.cloud:after{width:19px;height:19px;left:31px}.cloud-left{left:8%;transform:scale(.75)}.cloud-right{right:7%;top:80px;transform:scale(.55)}.scene-sparkle{position:absolute;color:#e4a48e;font-size:1.375rem;animation:twinkle 3s ease-in-out infinite}.sparkle-one{left:22%;top:22%;animation-delay:.4s}.sparkle-two{right:21%;top:26%;font-size:1.125rem;color:#d2a7cc;animation-delay:1.3s}.sparkle-three{right:28%;top:49%;font-size:2.1875rem;color:#f8c95f}.pet-art{position:relative;width:210px;height:220px;z-index:4;display:grid;place-items:center;animation:float 3.4s ease-in-out infinite;filter:drop-shadow(0 10px 6px rgba(81,74,62,.07))}.pet-art svg{overflow:visible;width:100%;height:100%}.ground-shadow{position:absolute;bottom:38px;left:50%;width:145px;height:20px;transform:translateX(-50%);background:#91bea3;opacity:.45;border-radius:50%;filter:blur(2px)}.scene-grass{position:absolute;z-index:2;bottom:39px;width:24px;height:21px;border:2px solid #87ba9b;border-bottom:0;border-radius:25px 25px 0 0;opacity:.8}.grass-left{left:15%}.grass-right{right:15%;height:28px}.tiny-flower{position:absolute;z-index:3;bottom:39px;font-size:1.3125rem;color:#f5d5dd}.flower-left{left:9%}.flower-right{right:10%;font-size:1rem;color:#fff1af}.bond-heart{font-size:0.9375rem;line-height:14px}.mini-star{color:#e8a88e}.heart-pink{color:#df948a}.care-column{display:flex;flex-direction:column;gap:18px;min-width:0}.needs-card,.actions-card,.journal-card,.keepsake-card{padding:20px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:17px}.section-heading .eyebrow{font-size:0.5rem;letter-spacing:1.5px;margin-bottom:4px}.section-heading h2{font-size:1.25rem}.weather-sticker{width:39px;height:39px;border-radius:13px;background:#f5ebfb;color:#b7a3cf;display:grid;place-items:center;font-size:1.3125rem}.needs-list{display:flex;flex-direction:column;gap:13px}.need-row{display:grid;grid-template-columns:31px minmax(0,1fr);gap:10px;align-items:center}.need-icon{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;font-size:0.9375rem}.need-food{background:#fff0dc;color:#d6a061}.need-happy{background:#ffebec;color:#dc8a99}.need-energy{background:#eee8fa;color:#a99ad3}.need-clean{background:#e4f3e9;color:#72b597}.need-health{background:#e4f0fa;color:#78a8d3}.need-body{min-width:0}.need-label-row{display:flex;align-items:center;justify-content:space-between;font-size:0.625rem;color:#938980;margin-bottom:5px}.need-label-row strong{font-size:0.625rem;color:#685f59}.need-track{height:6px;background:#f1ebe4;border-radius:99px;overflow:hidden}.need-track span{display:block;height:100%;width:0;border-radius:99px;transition:width .4s ease;background:#eeb18f}.need-row[data-need=happiness] .need-track span{background:#e4a3a8}.need-row[data-need=energy] .need-track span{background:#b9a8de}.need-row[data-need=cleanliness] .need-track span{background:#8ec5a6}.need-row[data-need=health] .need-track span{background:#8eb9df}.need-row.low .need-label-row strong{color:#c56f61}.needs-footnote{display:flex;gap:7px;align-items:flex-start;font-size:0.5625rem;line-height:1.5;color:#a69b91;border-top:1px solid #f1e9e0;padding-top:12px;margin:16px 0 0}.needs-footnote span{color:#e5a186}.action-count{font-size:0.5625rem;color:#ad9182;background:#fff0e8;border-radius:99px;padding:5px 8px;white-space:nowrap}.action-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.care-action{border:1px solid #eee5dc;border-radius:12px;min-width:0;min-height:94px;padding:10px 4px 8px;display:flex;align-items:center;flex-direction:column;background:#fffdfa;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;color:#45403b}.care-action:hover:not(:disabled){transform:translateY(-2px);border-color:#dfcabc;box-shadow:0 6px 15px #6548320c}.action-emoji{font-size:1.375rem;height:31px;margin-bottom:3px;filter:saturate(.87)}.care-action strong{font-family:var(--round);font-size:0.6875rem;line-height:1.2;font-weight:900}.care-action small{font-size:0.5rem;color:#a79d93;text-align:center;line-height:1.3;margin-top:3px}.action-feed{background:#fff9ed}.action-play{background:#f8f4ff}.action-cuddle{background:#fff2f2}.action-sleep{background:#f2f1ff}.action-bath{background:#f0fbf6}.action-clean{background:#f8f7ef}.action-treat{background:#fff7f0}.action-medicine{background:#f2f8fd}.care-feedback{font-size:0.625rem;color:#a18d80;background:#faf5ef;border-radius:9px;margin:13px 0 0;padding:9px 11px;min-height:35px;display:flex;align-items:center}.lower-grid{display:grid;grid-template-columns:1.32fr .68fr;gap:18px;margin-top:18px}.journal-card,.keepsake-card{min-width:0}.journal-mark{width:34px;height:34px;border-radius:11px;background:#f9eee3;color:#c89c81;display:grid;place-items:center;font-size:1.0625rem}.journal-list{display:flex;flex-direction:column;gap:0}.journal-item{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:10px;border-top:1px solid #f1e9e0;padding:10px 0}.journal-item:first-child{border-top:0;padding-top:0}.journal-icon{width:30px;height:30px;border-radius:10px;background:#f8f0e7;display:grid;place-items:center;font-size:0.9375rem}.journal-copy strong{display:block;font-size:0.625rem;color:#696057;margin-bottom:2px}.journal-copy small{font-size:0.5625rem;color:#a69a90;display:block}.journal-time{font-size:0.5rem;color:#b9aea4;white-space:nowrap}.empty-journal{margin:0;color:#a79c91;font-size:0.6875rem;padding:4px 0}.keepsake-card{background:#f0e9f8;border-color:#e8dcf1;position:relative;overflow:hidden;padding:22px 24px}.keepsake-card .eyebrow{position:relative;z-index:1;color:#a193b1;font-size:0.5rem}.keepsake-card h2{font-family:var(--round);font-weight:900;font-size:1.6875rem;letter-spacing:-.8px;line-height:1.05;margin:0 0 12px;position:relative;z-index:1}.keepsake-card>p:not(.eyebrow){font-size:0.625rem;color:#857895;line-height:1.7;max-width:240px;position:relative;z-index:1;margin-bottom:17px}.keepsake-card .text-button{position:relative;z-index:1;color:#9380ad}.keepsake-doodle{position:absolute;right:15px;top:5px;font-size:5.8125rem;line-height:1;color:#e4d7f1;transform:rotate(-18deg);font-family:var(--round)}.keepsake-doodle span{position:absolute;font-size:1.75rem;right:0;top:61px;color:#c7b4df}.pet-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:21px 2px 8px;color:#b0a49a;font-size:0.5rem;letter-spacing:1.45px}.footer-star{color:#e09b86;margin:0 4px}.pet-footer .text-button{letter-spacing:0;font-size:0.625rem}.modal-card{border:1px solid #e9dfd5;padding:26px;border-radius:22px;background:#fffdfa;color:var(--ink);box-shadow:0 25px 100px #4d3b2d32;width:min(450px,calc(100% - 28px));}.modal-card::backdrop{background:#312b27a8;backdrop-filter:blur(4px)}.modal-card h2{margin:0 0 18px}.modal-top{display:flex;justify-content:space-between;align-items:center}.modal-close{border:0;background:#f7eee6;color:#887a70;border-radius:9px;width:31px;height:31px;font-size:1.3125rem;line-height:1}.modal-card .color-fieldset{margin:17px 0 20px}
/* Creature art */
.pet-art .pet-bob{transform-box:fill-box;transform-origin:center;animation:petBob 2.9s ease-in-out infinite}.pet-art .eye-blink{transform-box:fill-box;transform-origin:center;animation:blink 5.5s infinite}.pet-art .cheek{opacity:.62}.pet-art .pet-outline{stroke:#6c5a56;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.pet-art .pet-eye{fill:#453a3b}.pet-art .shine{fill:#fff9ef}.pet-art .pet-mouth{fill:none;stroke:#6c5a56;stroke-width:2.2;stroke-linecap:round}.pet-art .pet-belly{fill:#fff2d9;stroke:#6c5a56;stroke-width:2}.pet-art.species-cat .ears,.pet-art.species-bunny .ears{fill:var(--pet-fill)}.pet-art.species-cat .inner-ear,.pet-art.species-bunny .inner-ear{fill:#e99c9b}.pet-art.species-dog .ears{fill:var(--pet-shade)}.pet-art.species-dragon .horns{fill:#f3d78f;stroke:#6c5a56;stroke-width:2}.pet-art.species-axolotl .gills{fill:#f29caf;stroke:#6c5a56;stroke-width:1.8}.pet-art.species-owl .wing{fill:var(--pet-shade);stroke:#6c5a56;stroke-width:2}.pet-art .accessory{fill:#f4c6a5;stroke:#6c5a56;stroke-width:1.5}.pet-art.species-blob .pet-body{stroke-dasharray:none}.pet-art .pet-body{fill:var(--pet-fill);stroke:#6c5a56;stroke-width:2.5;stroke-linejoin:round}.pet-art .pet-shade{fill:var(--pet-shade)}.pet-art .nose{fill:#d9858b}.pet-art .species-star{fill:#fff1bd}
@keyframes float{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-7px) rotate(1deg)}}@keyframes petBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}@keyframes twinkle{0%,100%{transform:scale(.85) rotate(-8deg);opacity:.62}50%{transform:scale(1.15) rotate(8deg);opacity:1}}@keyframes blink{0%,46%,50%,100%{transform:scaleY(1)}48%{transform:scaleY(.1)}}
@media (min-width:1400px){.app-shell{max-width:1340px}.world-scene{height:330px}.pet-art{width:230px;height:240px}.care-action{min-height:98px}}
@media (max-width:1000px){.app-shell{padding:0 22px}.adopt-screen{gap:32px;grid-template-columns:.86fr 1.14fr}.species-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.pet-layout{grid-template-columns:1fr;max-width:800px;margin:0 auto}.care-column{display:grid;grid-template-columns:1fr 1fr;align-items:start}.world-scene{height:310px}.lower-grid{max-width:800px;margin:18px auto 0}.care-action{min-height:92px}.needs-card,.actions-card,.journal-card,.keepsake-card{padding:18px}}
@media (max-width:720px){.topbar{height:72px;padding:0 17px}.brand-mark{width:37px;height:37px;border-radius:13px}.brand-copy strong{font-size:1.125rem}.brand-copy small{font-size:0.4375rem}.connection-pill{padding:0 8px;height:28px}.connection-pill span{display:none}.topbar-right{gap:7px}.pal-switcher{max-width:100px;font-size:0.625rem;padding:7px 5px}.button-small{font-size:0.625rem;padding:7px 9px}.app-shell{padding:0 14px}.adopt-screen{padding:35px 0 22px;grid-template-columns:1fr;gap:22px;min-height:0}.adopt-intro{padding:0 4px}.adopt-intro h1{font-size:2.6875rem;margin-bottom:13px}.intro-copy{font-size:0.75rem;line-height:1.7;margin-bottom:13px}.promise-line{font-size:0.625rem}.adopt-card{padding:22px 18px;border-radius:20px}.card-heading h2{font-size:1.3125rem}.species-grid{gap:6px}.species-option{padding:8px 1px 7px;border-radius:10px}.species-face{font-size:1.3125rem;height:30px}.species-option strong{font-size:0.6875rem}.species-option small{font-size:0.4375rem}.page-footer{padding-top:4px}.pet-screen{padding-top:27px}.page-intro{align-items:flex-start;flex-direction:column;gap:13px;margin-bottom:17px}.page-intro h1{font-size:2.3125rem}.intro-actions{width:100%;padding:0}.intro-actions .button{flex:1}.pet-layout{gap:13px}.pet-world{padding:15px 15px 0;border-radius:17px}.world-scene{height:270px;margin-left:-4px;margin-right:-4px}.pet-art{width:190px;height:205px}.care-column{display:flex;gap:13px}.needs-card,.actions-card,.journal-card,.keepsake-card{padding:17px 15px;border-radius:17px}.section-heading{margin-bottom:14px}.section-heading h2{font-size:1.1875rem}.need-row{grid-template-columns:29px minmax(0,1fr);gap:9px}.need-icon{width:28px;height:28px}.needs-list{gap:11px}.action-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.care-action{min-height:89px;padding:8px 2px 6px;border-radius:10px}.action-emoji{font-size:1.25rem;height:27px}.care-action strong{font-size:0.625rem}.care-action small{font-size:0.4375rem;letter-spacing:-.1px}.lower-grid{grid-template-columns:1fr;gap:13px;margin-top:13px}.keepsake-card{min-height:200px}.keepsake-card h2{font-size:1.625rem}.pet-footer{align-items:flex-start;flex-direction:column;padding:17px 0}.modal-card{padding:22px}}
@media (max-width:390px){.species-option small{font-size:0.40625rem}.species-face{font-size:1.1875rem}.action-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.care-action strong{font-size:0.5625rem}.care-action small{font-size:0.40625rem}.pet-art{width:170px;height:190px}.world-scene{height:245px}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Pocket Pals v0.2.0: hatchery, arcade, and genetic evolution */
/* Sprite evolution refinements are appended in the v0.3.0 section below. */
.egg-grid .species-option{min-height:94px;padding:9px 4px 8px}.egg-grid .species-face{font-size:1.125rem;letter-spacing:-4px;width:100%;height:31px}.egg-grid .species-option strong{font-size:0.625rem}.egg-grid .species-option small{white-space:normal;text-align:center;line-height:1.2;min-height:19px;max-width:100%;padding:0 2px}
.egg-care-card{padding:20px;min-width:0;background:linear-gradient(145deg,#fffdfa,#fff7f0);border-color:#efdfd0}.egg-care-copy{font-size:0.6875rem;color:#8e8074;line-height:1.65;margin:0 0 13px}.hatch-track{height:9px;border-radius:99px;background:#f1e5d8;overflow:hidden;margin:12px 0 15px;box-shadow:inset 0 1px 2px #8a6e5510}.hatch-track span{display:block;width:0;height:100%;border-radius:99px;background:linear-gradient(90deg,#eeb79b,#d8c4ef,#a9d7c0);transition:width .45s ease}.egg-ritual-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.egg-ritual-grid .care-action{min-height:88px}.egg-ritual-grid .care-action strong{font-size:0.625rem}.care-action.ritual-done{border-color:#9cc9ae;background:#f1fbf3;box-shadow:inset 0 0 0 1px #9cc9ae55}.care-action.ritual-done:after{content:'✓ done';font-size:0.5rem;color:#4e9b70;font-weight:800;margin-top:3px}.stage-egg .egg-wobble{transform-box:fill-box;transform-origin:center;animation:eggWobble 2.6s ease-in-out infinite}.stage-egg .egg-wobble path{vector-effect:non-scaling-stroke}.stage-egg .ground-shadow{opacity:.5}
.arcade-card{padding:22px 24px;margin-top:18px;min-width:0}.arcade-heading{align-items:flex-start}.section-subtitle{font-size:0.625rem;color:#a1958a;margin:4px 0 0}.arcade-stamp{font-size:0.5rem;line-height:1.55;text-align:center;letter-spacing:1px;font-weight:900;color:#ae98c7;border:1px dashed #d7c7e9;border-radius:10px;padding:7px 9px;transform:rotate(5deg);background:#faf5ff}.arcade-games{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.game-card{display:grid;grid-template-columns:52px minmax(0,1fr) auto;grid-template-rows:auto auto;column-gap:12px;align-items:center;text-align:left;border:1px solid #eee3d9;border-radius:15px;padding:13px;background:#fffdf9;color:#49413b;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;min-width:0}.game-card:hover:not(:disabled){transform:translateY(-2px);border-color:#dfc8ba;box-shadow:0 8px 22px #59412f0e}.game-art{grid-column:1;grid-row:1/3;width:50px;height:50px;border-radius:15px;display:grid;place-items:center;font-size:1.6875rem;background:#fff0dc}.game-memory .game-art{background:#f1eafb}.game-snack .game-art{background:#fff0f0}.game-card strong{font-family:var(--round);font-weight:900;font-size:0.75rem;line-height:1.25;grid-column:2;grid-row:1}.game-card small{font-size:0.5625rem;color:#9d9187;grid-column:2;grid-row:2;margin-top:3px;line-height:1.35}.game-launch{grid-column:3;grid-row:1/3;font-size:0.5625rem;color:#ba8374;font-weight:800;white-space:nowrap}.arcade-stats{display:flex;gap:22px;flex-wrap:wrap;border-top:1px solid #f0e7de;margin-top:15px;padding-top:12px;color:#a0958b;font-size:0.5625rem}.arcade-stats span{display:flex;gap:6px;align-items:center}.arcade-stats strong{color:#74655b;font-size:0.6875rem}.lower-grid{grid-template-columns:1.04fr 1.12fr .8fr;align-items:stretch}.evolution-card{padding:20px 22px;min-width:0}.genome-summary{display:flex;flex-direction:column;gap:3px;margin:-3px 0 11px}.genome-summary strong{font-family:var(--round);font-size:0.875rem;color:#574c60}.genome-summary span{font-size:0.5625rem;color:#a293b2;text-transform:capitalize}.gene-chips{display:flex;gap:5px;flex-wrap:wrap;margin:0 0 12px}.gene-chip{display:inline-flex;align-items:center;border-radius:99px;background:#f1eafb;color:#8b7aab;padding:5px 8px;font-size:0.5rem;font-weight:800;letter-spacing:.2px}.evolution-caption{font-size:0.5625rem;line-height:1.6;color:#9c9187;margin:0 0 12px}.evolution-tree{display:flex;flex-direction:column;gap:0}.evolution-node{position:relative;display:grid;grid-template-columns:24px minmax(0,1fr);gap:9px;align-items:center;padding:8px 0;min-height:44px;color:#b1a49a}.evolution-node:not(:last-child):before{content:'';position:absolute;left:11px;top:29px;height:calc(100% - 12px);width:2px;background:#eee4dc}.evolution-dot{position:relative;z-index:1;display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#f4eee7;color:#af9c8d;font-size:0.6875rem;box-shadow:0 0 0 3px #fffdfa}.evolution-node-copy{display:flex;min-width:0;flex-direction:column;gap:2px}.evolution-node-copy strong{font-size:0.625rem;line-height:1.3;color:#8e8379}.evolution-node-copy small{font-size:0.5rem;color:#b3a89e;line-height:1.35}.evolution-node.complete .evolution-dot{background:#d8efdf;color:#548b68}.evolution-node.complete:before{background:#bbddc5}.evolution-node.complete .evolution-node-copy strong{color:#6b9a78}.evolution-node.current .evolution-dot{background:#f3c4b4;color:#8c5445;box-shadow:0 0 0 3px #fffdfa,0 0 0 5px #f4d5ca}.evolution-node.current .evolution-node-copy strong{color:#60493e;font-weight:900}.evolution-node.current .evolution-node-copy small{color:#a28374}.game-modal{width:min(520px,calc(100% - 28px));max-height:min(86vh,780px);overflow:auto}.game-modal h2{margin:0 0 6px}.game-intro{font-size:0.625rem;color:#9a8b80;margin:0 0 16px;line-height:1.6}.game-prompt{font-size:0.75rem;font-weight:800;color:#66594f;line-height:1.5;margin:0 0 13px}.game-board{display:grid;gap:8px;margin:0 auto 12px}.star-board{grid-template-columns:repeat(3,minmax(0,1fr));max-width:290px}.memory-board{grid-template-columns:repeat(4,minmax(0,1fr));max-width:330px}.snack-board{grid-template-columns:1fr;max-width:380px}.game-tile{display:flex;align-items:center;justify-content:center;border:1px solid #e9dfd5;border-radius:13px;background:#fcf6ee;color:#64574c;min-width:0;min-height:63px;font-size:1.5rem;transition:transform .12s ease,background .12s ease,border-color .12s ease}.star-tile{min-height:71px;font-size:1.5625rem;background:#faf5ff;border-color:#e7dcf2}.memory-tile{font-size:1.3125rem;min-height:62px;background:#f2f8ef;border-color:#dcebdc}.snack-tile{font-size:0.75rem;font-weight:800;min-height:50px;background:#fff8ef}.game-tile:hover:not(:disabled){transform:translateY(-1px);border-color:#d6b9a8}.game-tile.hit{background:#eaf7ec;border-color:#a5d4af;color:#4c8d62}.game-tile.miss{background:#fff0eb;border-color:#edc1b5;color:#b46b5a}.game-preview{padding:13px 8px;border-radius:13px;text-align:center;background:#f3eefb;color:#856da8;font-size:1.375rem;letter-spacing:1px;margin-bottom:10px}.game-feedback{font-size:0.625rem;line-height:1.55;color:#9a8679;background:#faf5ef;border-radius:10px;padding:10px 12px;min-height:37px;margin:12px 0}.game-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}.game-actions>span{font-size:0.625rem;color:#a58d7f;font-weight:800}.game-actions .button{padding:8px 11px}.game-stage[hidden]{display:none!important}
@keyframes eggWobble{0%,100%{transform:rotate(-2deg) translateY(0)}50%{transform:rotate(2deg) translateY(-4px)}}
@media(max-width:1100px){.arcade-games{grid-template-columns:1fr}.game-card{grid-template-columns:48px minmax(0,1fr) auto}.arcade-card{max-width:800px;margin:18px auto 0;width:100%}.lower-grid{grid-template-columns:1fr 1fr;max-width:800px;margin:18px auto 0}.evolution-card{grid-column:1/-1;grid-row:1}.journal-card{grid-column:1;grid-row:2}.keepsake-card{grid-column:2;grid-row:2}}
@media(max-width:720px){.egg-grid .species-option{min-height:90px}.egg-grid .species-option small{font-size:0.4375rem}.egg-ritual-grid{gap:6px}.egg-ritual-grid .care-action{min-height:85px}.arcade-card{padding:17px 15px}.arcade-heading{gap:8px}.arcade-stamp{font-size:0.4375rem}.arcade-games{grid-template-columns:1fr;gap:8px}.game-card{padding:10px;grid-template-columns:43px minmax(0,1fr) auto}.game-art{width:42px;height:42px;border-radius:12px;font-size:1.5rem}.arcade-stats{gap:13px}.lower-grid{grid-template-columns:1fr;gap:13px}.evolution-card,.journal-card,.keepsake-card{grid-column:1;grid-row:auto}.evolution-card{padding:17px 15px}.game-tile{min-height:56px}.star-tile{min-height:63px}.memory-tile{min-height:56px}.game-preview{font-size:1.125rem}.game-modal{padding:20px}.game-prompt{font-size:0.6875rem}}
@media(prefers-reduced-motion:reduce){.stage-egg .egg-wobble{animation:none}}

/* Pocket Pals v0.3.0: lineage-specific growth sprites */
.egg-grid .species-face{width:100%;height:40px;display:grid;place-items:center;letter-spacing:0;margin:0 0 4px}
.egg-grid .species-face svg{display:block;width:100%;height:42px;overflow:visible}
.evolution-node{grid-template-columns:44px minmax(0,1fr);gap:9px;min-height:58px;padding:8px 0}
.evolution-node:not(:last-child):before{left:20px;top:42px;height:calc(100% - 21px)}
.evolution-node-portrait{position:relative;z-index:1;display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#fff8f0;border:1px solid #f0e4d8;box-shadow:0 0 0 3px #fffdfa;overflow:visible}
.evolution-node-portrait svg{display:block;width:42px;height:42px;overflow:visible}
.evolution-node.current .evolution-node-portrait{background:#fff0e8;border-color:#e7b9a8;box-shadow:0 0 0 3px #fffdfa,0 0 0 5px #f4d5ca}
.evolution-node.complete .evolution-node-portrait{background:#f0fbf2;border-color:#bbddc5}
.stage-complete-badge{position:absolute;right:-5px;bottom:-4px;width:15px;height:15px;border-radius:50%;background:#7cb88d;color:white;border:2px solid #fffdfa;display:grid;place-items:center;font-size:0.5625rem;font-weight:900;line-height:1}
.pet-art .egg-wobble{transform-box:fill-box;transform-origin:center;animation:eggWobble 2.6s ease-in-out infinite}
.pet-art .sprite-float{transform-box:fill-box;transform-origin:center;animation:petBob 2.9s ease-in-out infinite}
@media(max-width:390px){.egg-grid .species-face{height:36px}.egg-grid .species-face svg{height:38px}.evolution-node-portrait,.evolution-node-portrait svg{width:39px;height:39px}.evolution-node{grid-template-columns:41px minmax(0,1fr)}}

/* v0.4.0: custom colour picker and clearer ritual availability */
.custom-color-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:13px;padding-top:12px;border-top:1px solid #f0e6dc;color:#8c7d72;font-size:0.625rem;font-weight:750}
.custom-color-control{display:flex;align-items:center;gap:8px;padding:4px 7px 4px 4px;background:#fffdfa;border:1px solid #e9dfd5;border-radius:999px;transition:border-color .15s ease,box-shadow .15s ease}
.custom-color-control.custom-color-selected{border-color:#a48cce;box-shadow:0 0 0 2px #ece4fa}
.custom-color-control input[type=color]{appearance:none;-webkit-appearance:none;border:0;background:transparent;width:32px;height:32px;padding:0;border-radius:50%;cursor:pointer;overflow:hidden}
.custom-color-control input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.custom-color-control input[type=color]::-webkit-color-swatch{border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #d8ccc0}
.custom-color-control input[type=color]::-moz-color-swatch{border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #d8ccc0}
.custom-color-control output{font-size:0.5625rem;font-variant-numeric:tabular-nums;color:#837467;min-width:58px}
.egg-ritual-grid .care-action:not(:disabled){opacity:1;cursor:pointer}
.egg-ritual-grid .care-action:not(:disabled):hover{transform:translateY(-2px);border-color:#e3b9a5;box-shadow:0 5px 15px #704d2b12}
@media(max-width:420px){.custom-color-row{align-items:flex-start;flex-direction:column;gap:7px}.custom-color-control{align-self:flex-end}}

.growth-timer{font-size:0.625rem;line-height:1.55;color:#6f8f76;background:#f0f7ef;border:1px solid #dcebd9;border-radius:10px;padding:9px 11px;margin:0 0 12px;font-weight:750}.growth-timer[hidden]{display:none!important}

/* v0.6.0: reciprocal friendships, autonomous wandering, and visit journals */
.friends-card{width:100%;margin:18px auto 0;max-width:1180px;padding:clamp(17px,2.2vw,25px)}
.friend-code-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0;padding:13px 15px;border:1px dashed #d8c4b2;border-radius:15px;background:linear-gradient(105deg,#fff8ee,#f2f8ed)}
.friend-code-row>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.friend-code-label{font-size:0.5rem;font-weight:900;letter-spacing:1.1px;color:#a18b78}
.friend-code-value{font-size:clamp(1.125rem,3vw,1.5625rem);letter-spacing:2px;color:#5d745e;font-variant-numeric:tabular-nums}
.friend-tools{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);align-items:end;gap:16px}
.friend-add-form{display:flex;flex-direction:column;gap:7px;min-width:0}
.friend-add-control{display:flex;gap:8px;min-width:0}
.friend-add-control input{flex:1;min-width:0;border:1px solid #e7d9cd;border-radius:11px;background:#fffdfa;padding:11px 12px;color:#63564b;font-family:inherit;font-size:0.6875rem;font-weight:800;line-height:1.2;letter-spacing:1px;text-transform:uppercase;outline:none}
.friend-add-control input:focus{border-color:#b5cdb4;box-shadow:0 0 0 3px #eaf4e6}
.friend-add-control .button{white-space:nowrap}
.auto-visits-setting{display:flex;align-items:center;gap:10px;min-height:46px;padding:11px 13px;border:1px solid #e8e0d8;border-radius:12px;background:#fffdfa;cursor:pointer}
.auto-visits-setting input{width:17px;height:17px;accent-color:#7eaf87;flex:0 0 auto}
.auto-visits-setting span{display:flex;flex-direction:column;gap:3px}
.auto-visits-setting strong{font-size:0.625rem;color:#69584c;line-height:1.35}
.auto-visits-setting small{font-size:0.5625rem;line-height:1.45;color:#a09185}
.social-feedback{margin:12px 0 17px;padding:10px 12px;border-radius:10px;background:#faf5ef;color:#978577;font-size:0.625rem;line-height:1.6}
.friend-content-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:15px}
.friend-list-section,.visit-history-section{min-width:0;padding:14px;border:1px solid #f0e6dc;border-radius:15px;background:#fffdfa}
.friends-subheading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.friends-subheading h3{margin:0;font-size:0.75rem;color:#6a5749}
.friend-count{font-size:0.5rem;font-weight:800;color:#a39183;background:#f7f0e8;border-radius:999px;padding:5px 7px;white-space:nowrap}
.friends-list,.visit-history{display:flex;flex-direction:column;gap:8px}
.social-empty{margin:0;padding:14px 8px;text-align:center;color:#a7978b;font-size:0.625rem;line-height:1.6}
.friend-row{display:grid;grid-template-columns:47px minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px;border:1px solid #f1e9e0;border-radius:12px;background:#fff}
.friend-avatar{display:grid;place-items:center;width:45px;height:45px;border-radius:12px;background:#f8f4ed;overflow:hidden}
.friend-avatar svg{width:44px;height:44px;display:block;overflow:visible}
.friend-info{display:flex;flex-direction:column;gap:4px;min-width:0}
.friend-info strong{font-size:0.6875rem;line-height:1.35;color:#6b5749;overflow-wrap:anywhere}
.friend-info small{font-size:0.5rem;line-height:1.5;color:#a18e7f}
.friend-row-actions{display:flex;flex-direction:column;align-items:stretch;gap:5px}
.friend-row-actions .button{padding:7px 9px;font-size:0.5625rem}
.friend-remove-button{border:0;background:transparent;padding:5px 7px;color:#ae9388;font-size:0.5rem;font-weight:750;cursor:pointer}
.friend-remove-button:hover:not(:disabled){color:#ab625a;text-decoration:underline}
.friend-row-actions button:disabled,.auto-visits-setting input:disabled{opacity:.48;cursor:not-allowed}
.visit-row{display:flex;align-items:flex-start;gap:9px;padding:10px 9px;border-radius:11px;background:#faf7f1}
.visit-icon{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:10px;background:#f1e7f4;font-size:0.9375rem}
.visit-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.visit-copy strong{font-size:0.625rem;line-height:1.45;color:#705c4e}
.visit-copy small{font-size:0.5rem;line-height:1.5;color:#a18d7f}
@media(max-width:760px){.friend-tools{grid-template-columns:1fr;gap:12px}.friend-content-grid{grid-template-columns:1fr}.friends-card{padding:16px 13px}.friend-row{grid-template-columns:42px minmax(0,1fr) auto;gap:7px;padding:8px}.friend-avatar,.friend-avatar svg{width:40px;height:40px}.friend-row-actions .button{padding:7px 8px}}
@media(max-width:390px){.friend-code-row{align-items:flex-start;flex-direction:column}.friend-add-control{flex-direction:column}.friend-add-control .button{width:100%}.friend-row{grid-template-columns:38px minmax(0,1fr) auto}.friend-avatar,.friend-avatar svg{width:36px;height:36px}.friend-remove-button{font-size:0.4375rem}}

/* Pocket Pals v0.8.0: daily rhythms, bathroom care, gentle illness, and attention calls */
.world-scene.is-night{background:linear-gradient(180deg,#34395d 0%,#55577c 53%,#a9b7c5 53.3%,#b3cfc3 100%)}
.world-scene.is-night:after{background:#9fbfae}
.pet-art.is-sleeping{filter:drop-shadow(0 10px 6px rgba(81,74,62,.07)) saturate(.86)}
.pet-art.is-sleeping:after{content:'z ᶻ';position:absolute;right:7px;top:18px;color:#9988c8;font-family:var(--round);font-size:1.5rem;font-weight:900;letter-spacing:3px;transform:rotate(10deg);animation:sleepyZ 3.8s ease-in-out infinite;pointer-events:none}
.life-heading{align-items:center}
.sleep-state-pill{display:inline-flex;align-items:center;gap:5px;border:1px solid #d9e7d6;border-radius:99px;background:#f1f8ee;color:#66866a;padding:6px 9px;font-size:0.5625rem;font-weight:900;white-space:nowrap}
.sleep-state-pill.is-sleeping{background:#f0ecfc;border-color:#dfd5f4;color:#8874b0}
.routine-summary{display:flex;flex-direction:column;gap:12px}
.routine-line{display:flex;align-items:flex-start;gap:10px;min-width:0}
.routine-icon{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:11px;background:#f0ecfc;font-size:1.0625rem}
.routine-line:nth-child(2) .routine-icon{background:#fff1e5}
.routine-line>div{flex:1;min-width:0}
.routine-line strong{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#65574c;font-size:0.625rem;line-height:1.5}
.routine-line small{display:block;color:#9b8d80;font-size:0.5625rem;line-height:1.55;margin-top:3px}
.routine-track{height:7px;border-radius:99px;overflow:hidden;background:#eee9df;margin:6px 0 5px}
.routine-track span{display:block;width:0;height:100%;border-radius:99px;background:linear-gradient(90deg,#a8d4b5,#e8d28c);transition:width .35s ease}
.routine-track.urgent span{background:linear-gradient(90deg,#e9c27e,#e78e78)}
.mess-status{margin:0 0 0 44px;padding:8px 10px;border:1px solid #f1dfc8;border-radius:9px;background:#fff6e9;color:#a47b4c;font-size:0.5625rem;line-height:1.5}
.life-alert{display:flex;align-items:flex-start;gap:9px;padding:10px 11px;border-radius:11px;margin:13px 0 0;font-size:0.5625rem;line-height:1.5}
.life-alert-icon{display:grid;place-items:center;flex:0 0 25px;width:25px;height:25px;border-radius:8px;background:#fff9f2;font-size:0.9375rem}
.life-alert>span:last-child{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}
.life-alert strong{font-size:0.625rem;color:#78614f}
.life-alert small{font-size:0.5625rem;line-height:1.55;color:#9b8372}
.illness-alert{background:#fff0ec;border:1px solid #f2d4ca}
.attention-alert{background:#fff8e8;border:1px solid #f1e1b8}
.gentle-alert-row{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:13px;padding-top:12px;border-top:1px solid #ece9de}
.gentle-alert-row>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.gentle-alert-row strong{font-size:0.5625rem;color:#776b5c}
.gentle-alert-row small{font-size:0.5rem;line-height:1.45;color:#a39688}
.gentle-alert-row .button{flex:0 0 auto;padding:7px 9px;font-size:0.5625rem}
.action-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.action-bathroom{background:#fff8ef}
.care-action.attention-priority{border-color:#e6bd91;box-shadow:0 0 0 2px #f8e8d7;background:#fffaf2}
@keyframes sleepyZ{0%,100%{transform:translateY(0) rotate(10deg);opacity:.65}50%{transform:translateY(-7px) rotate(5deg);opacity:1}}
@media(max-width:720px){.routine-line strong{font-size:0.625rem}.gentle-alert-row{align-items:flex-start}.gentle-alert-row .button{max-width:120px;white-space:nowrap}.action-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.care-action{min-height:83px}.care-action strong{font-size:0.625rem}.care-action small{font-size:0.4375rem}}
@media(max-width:390px){.action-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.care-action strong{font-size:0.5625rem}.care-action small{font-size:0.40625rem}.routine-icon{flex-basis:30px;width:30px;height:30px}.mess-status{margin-left:40px}.sleep-state-pill{padding:5px 7px;font-size:0.5rem}}
@media(prefers-reduced-motion:reduce){.pet-art.is-sleeping:after{animation:none}.routine-track span{transition:none}}

/* Pocket Pals v0.8.1: personal homes, preferences, pantry, and toys */
.home-card{width:100%;max-width:1180px;margin:18px auto 0;padding:clamp(17px,2.2vw,25px);border-color:#e7e7d8;background:linear-gradient(145deg,#fffdfa 0%,#fbfcf5 100%)}
.home-heading{align-items:flex-start}
.home-heading .section-subtitle{margin:6px 0 0;max-width:590px;color:#a09184;font-size:0.625rem;line-height:1.6}
.home-main-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(220px,.95fr);gap:16px;align-items:stretch}
.home-room-preview{--room-tint:#eaf4e6;position:relative;isolation:isolate;min-height:185px;overflow:hidden;border:1px solid #e5e5d6;border-radius:17px;background:linear-gradient(180deg,var(--room-tint) 0%,#fffdf6 70%,#e8dfce 70.5%,#e8dfce 100%);display:flex;align-items:center;justify-content:center;transition:background .2s ease}
.home-room-preview:before{content:"";position:absolute;z-index:-1;left:12%;right:12%;top:16%;height:72px;border:7px solid #fff9;border-radius:11px 11px 6px 6px;background:linear-gradient(135deg,#ffffff80,#ffffff10);box-shadow:0 4px 0 #8d8b7d18}
.home-room-preview:after{content:"";position:absolute;bottom:20%;left:16%;width:68%;height:8px;border-radius:50%;background:#9c927d22;filter:blur(7px)}
.home-room-window{position:absolute;top:15%;right:18%;font-size:1.125rem;color:#fff9}
.home-room-icon{position:relative;z-index:1;display:grid;place-items:center;width:98px;height:98px;border:1px solid #fff9;border-radius:30px;background:#ffffffad;box-shadow:0 8px 20px #75695412;font-size:2.875rem;transform:translateY(-7px)}
.home-decor-icon{position:absolute;z-index:2;right:20%;bottom:24%;display:grid;place-items:center;width:43px;height:43px;border:2px solid white;border-radius:15px;background:#fff8e7;box-shadow:0 5px 12px #6e54351c;font-size:1.4375rem;transform:rotate(8deg)}
.home-room-base{position:absolute;z-index:2;bottom:9px;left:12px;right:12px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 11px;border:1px solid #ffffffb3;border-radius:11px;background:#fffdfaeb;backdrop-filter:blur(5px)}
.home-room-base strong{font-size:0.6875rem;color:#6d6255}.home-room-base small{font-size:0.5625rem;color:#9b8978;text-align:right}
.home-editor{display:flex;flex-direction:column;gap:10px;justify-content:center;padding:4px 0}
.home-select-label{display:flex;flex-direction:column;gap:6px;font-size:0.5625rem;font-weight:850;color:#9a8675}
.home-select-label select{min-width:0;appearance:auto;border:1px solid #e7dbce;border-radius:10px;background:#fffdfa;color:#6c5c50;font-family:inherit;font-size:0.6875rem;padding:10px 11px;outline:none}
.home-select-label select:focus{border-color:#bad0b3;box-shadow:0 0 0 3px #e7f2e4}
.home-editor .button{align-self:flex-start;margin-top:1px}.home-feedback{margin:0;padding:9px 10px;border-radius:9px;background:#f5f7ef;color:#8b9177;font-size:0.5625rem;line-height:1.55}
.pet-preferences{margin:16px 0;padding:11px 13px;border:1px solid #eee6d8;border-radius:12px;background:#fffaf1}
.preference-label{display:block;margin-bottom:8px;color:#b0997d;font-size:0.5rem;letter-spacing:1.1px;font-weight:900}
.preference-chips{display:flex;flex-wrap:wrap;gap:7px}
.preference-chip{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border:1px solid #e8ead9;border-radius:999px;background:#f7f8ee;color:#75816b;font-size:0.5625rem;font-weight:750}
.preference-chip>span:first-child{font-size:0.6875rem}
.home-inventory-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:14px}
.inventory-section{min-width:0;padding:14px;border:1px solid #eee6dc;border-radius:15px;background:#fffdfa}
.inventory-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.inventory-title h3{margin:0 0 4px;color:#6c594a;font-size:0.875rem}.inventory-title p{margin:0;color:#a49485;font-size:0.5625rem;line-height:1.45}
.inventory-stamp{display:grid;place-items:center;flex:0 0 35px;width:35px;height:35px;border-radius:12px;background:#fff2e4;font-size:1.125rem}
.item-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.toy-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.inventory-item{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;min-height:91px;padding:9px 9px 8px;border:1px solid #eee5d9;border-radius:11px;background:#fff;color:#695b4e;text-align:left;font-family:inherit;cursor:pointer;transition:transform .15s,border-color .15s,box-shadow .15s}
.inventory-item:not(:disabled):hover{transform:translateY(-2px);border-color:#c8d7b8;box-shadow:0 5px 13px #71604212}
.inventory-item:disabled{opacity:.53;cursor:not-allowed}
.inventory-item.is-favorite{border-color:#cbdcbd;background:linear-gradient(145deg,#f5faee,#fff)}
.inventory-item.is-favorite:after{content:"♥";position:absolute;top:6px;right:7px;color:#8fb68b;font-size:0.625rem}
.inventory-item.is-disliked{background:#fbf8f4}
.inventory-item-icon{display:grid;place-items:center;width:30px;height:30px;margin-bottom:2px;border-radius:10px;background:#f7f1e9;font-size:1.1875rem}
.food-item.is-favorite .inventory-item-icon,.toy-item.is-favorite .inventory-item-icon{background:#eaf4df}
.inventory-item strong{max-width:100%;color:#6e5b4b;font-size:0.5625rem;line-height:1.35;overflow-wrap:anywhere}
.inventory-item small{max-width:100%;color:#a19183;font-size:0.5rem;line-height:1.4;overflow-wrap:anywhere}
.inventory-note{margin:10px 0 0;color:#a29689;font-size:0.5rem;line-height:1.5}
.home-action-feedback{margin-top:13px}
.inventory-nudge{animation:inventoryNudge .9s ease}
@keyframes inventoryNudge{0%,100%{filter:none}40%{filter:drop-shadow(0 0 9px #acd09b)}}
@media(max-width:760px){.home-card{padding:16px 13px}.home-main-grid,.home-inventory-grid{grid-template-columns:1fr}.home-room-preview{min-height:165px}.home-editor{display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:8px}.home-editor .button{width:100%;grid-column:1/-1;justify-content:center}.home-feedback{grid-column:1/-1}.item-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.toy-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.inventory-item{min-height:84px}}
@media(max-width:430px){.home-heading .section-subtitle{font-size:0.5625rem}.home-editor{grid-template-columns:1fr}.home-editor .button,.home-feedback{grid-column:auto}.item-grid,.toy-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.inventory-item{min-height:78px;padding:8px}.inventory-title h3{font-size:0.8125rem}}
@media(prefers-reduced-motion:reduce){.inventory-nudge{animation:none}.home-room-preview,.inventory-item{transition:none}}

/* Pocket Pals v0.8.2: earned pocket coins, daily quests, outings, shop, and keepsakes */
.economy-card{width:100%;max-width:1180px;margin:18px auto 0;padding:clamp(17px,2.2vw,25px);background:linear-gradient(145deg,#fffdfa 0%,#f9fbf2 100%);border-color:#e5eadb}
.economy-heading{align-items:center;gap:14px}
.coin-purse{display:grid;grid-template-columns:auto auto;align-items:center;gap:1px 8px;min-width:90px;padding:10px 13px;border-radius:15px;border:1px solid #e7d8a9;background:linear-gradient(145deg,#fff9df,#f8edc4);color:#8e6c28;box-shadow:0 4px 12px #79622b0c}
.coin-purse>span{grid-row:span 2;font-size:1.375rem}
.coin-purse strong{font-size:1.25rem;font-variant-numeric:tabular-nums;line-height:1.1}
.coin-purse small{font-size:0.4375rem;font-weight:900;letter-spacing:1.1px;opacity:.75}
.economy-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:13px;margin:16px 0}
.economy-subpanel{min-width:0;padding:14px;border:1px solid #eee6db;border-radius:15px;background:#fffdfa}
.economy-subheading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 11px}
.economy-subheading h3{margin:0;color:#6a584a;font-size:0.75rem;line-height:1.4}
.economy-subheading>span{color:#a08d7d;font-size:0.5rem;font-weight:800;text-align:right}
.economy-hint{margin:-3px 0 10px;color:#9d8c7e;font-size:0.5625rem;line-height:1.55}
.daily-quest-list,.outing-options{display:flex;flex-direction:column;gap:8px}
.daily-quest{padding:10px 11px;border:1px solid #eee4d8;border-radius:11px;background:#fff;transition:background .15s,border-color .15s}
.daily-quest.is-complete{border-color:#d7e9d0;background:#f7fbf4}
.daily-quest.is-claimed{border-color:#dce9d8;background:#f0f7ed}
.quest-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.quest-heading strong{color:#6f5d4e;font-size:0.625rem;line-height:1.45}
.quest-heading span{flex:0 0 auto;color:#8a7545;font-size:0.5rem;font-weight:900}
.daily-quest p{margin:4px 0 7px;color:#a18f80;font-size:0.5rem;line-height:1.5}
.daily-quest>small{display:block;margin-top:5px;color:#9a8b7f;font-size:0.5rem;line-height:1.4}
.quest-track{height:5px;overflow:hidden;border-radius:99px;background:#f0ece5}
.quest-track span{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#a9d2af,#d8cd80);transition:width .25s ease}
.outing-card{display:grid;grid-template-columns:35px minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;padding:9px;border:1px solid #eee4da;border-radius:11px;text-align:left;background:#fff;cursor:pointer;font-family:inherit;transition:transform .15s,border-color .15s,background .15s}
.outing-card:not(:disabled):hover{transform:translateY(-1px);border-color:#cddfc5;background:#fbfff8}
.outing-card:disabled{opacity:.56;cursor:not-allowed}
.outing-icon{display:grid;place-items:center;width:35px;height:35px;border-radius:10px;background:#f3f0e6;font-size:1.125rem}
.outing-copy{display:flex;flex-direction:column;gap:3px;min-width:0}
.outing-copy strong{color:#6a584a;font-size:0.625rem;line-height:1.35}
.outing-copy small{color:#a18e7e;font-size:0.5rem;line-height:1.45}
.outing-reward{color:#96722c;font-size:0.5rem;white-space:nowrap}
.economy-feedback{margin:11px 0 0;padding:9px 11px;border-radius:10px;background:#f8f4eb;color:#948170;font-size:0.5625rem;line-height:1.55}
.shop-panel,.collection-panel{margin-top:13px}
.shop-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.shop-item{display:grid;grid-template-columns:30px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;gap:2px 7px;min-width:0;padding:9px;border:1px solid #eee4da;border-radius:11px;background:#fff;text-align:left;font-family:inherit;cursor:pointer;transition:transform .15s,border-color .15s}
.shop-item:not(:disabled):hover{transform:translateY(-1px);border-color:#d8c69d;background:#fffdf6}
.shop-item:disabled{opacity:.56;cursor:not-allowed}
.shop-item-icon{grid-column:1;grid-row:1 / span 2;display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#f8f2e8;font-size:1.0625rem}
.shop-item-copy{grid-column:2;grid-row:1 / span 2;display:flex;flex-direction:column;gap:3px;min-width:0}
.shop-item-copy strong{font-size:0.5625rem;line-height:1.35;color:#6d5949;overflow-wrap:anywhere}
.shop-item-copy small{font-size:0.5rem;line-height:1.4;color:#a18e7f}
.shop-item>b{grid-column:1 / -1;justify-self:end;margin-top:5px;color:#99752f;font-size:0.5rem;font-weight:900}
.shop-item.is-owned{background:#f7faf3;border-color:#e0ead9}
.shop-item.is-owned>b{color:#7c9b73}
.collection-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.collectible-item{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;padding:10px 5px;border:1px solid #eee5da;border-radius:11px;background:#fff;text-align:center}
.collectible-item>span{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#f7f2e9;font-size:1.1875rem}
.collectible-item strong{font-size:0.5rem;line-height:1.35;color:#6f5d4d;overflow-wrap:anywhere}
.collectible-item small{font-size:0.4375rem;color:#9c8c7e}
.outing-journal{display:flex;flex-direction:column;gap:4px;margin-top:10px}
.outing-memory{margin:0;padding:7px 9px;border-radius:8px;background:#f7f5ee;color:#918071;font-size:0.5rem;line-height:1.5}
@media(max-width:760px){.economy-columns{grid-template-columns:1fr}.shop-options{grid-template-columns:repeat(2,minmax(0,1fr))}.collection-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.economy-card{padding:16px 13px}}
@media(max-width:420px){.coin-purse{min-width:74px;padding:8px 9px}.coin-purse>span{font-size:1.125rem}.coin-purse strong{font-size:1.0625rem}.economy-heading{align-items:flex-start}.shop-item{grid-template-columns:26px minmax(0,1fr);padding:7px;gap:2px 6px}.shop-item-icon{width:26px;height:26px;font-size:0.9375rem}.shop-item-copy strong{font-size:0.5rem}.shop-item-copy small{font-size:0.4375rem}.collection-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Pocket Pals v0.8.3: shared adventures, gifts, relationship levels, and family trees */
.friend-preferences{display:grid;gap:8px;min-width:0}
.breeding-setting{background:#f7f3ff;border-color:#e7def8}
.breeding-setting input{accent-color:#9a83c9}
.round-four-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;margin:14px 0}
.social-play-panel,.gift-panel,.breeding-panel{min-width:0;padding:15px;border:1px solid #eee3d8;border-radius:16px;background:linear-gradient(160deg,#fffdfa,#faf7f1)}
.social-action-form{display:grid;grid-template-columns:1fr;gap:7px}
.social-action-form select,.breeding-form select,.breeding-form input[type=text]{width:100%;min-width:0;border:1px solid #e7d9cd;border-radius:10px;background:#fff;padding:10px 11px;color:#67584c;font:700 0.6875rem/1.35 var(--sans,inherit);outline:none}
.social-action-form select:focus,.breeding-form select:focus,.breeding-form input:focus{border-color:#b4c9b2;box-shadow:0 0 0 3px #eaf4e6}
.social-action-form .field-label{margin:4px 0 -2px}
.social-action-form .button{margin-top:5px}
.friend-activity-log,.gift-inbox-list,.family-history{display:flex;flex-direction:column;gap:7px;margin-top:11px;min-width:0}
.shared-memory-row,.gift-inbox-row,.family-parent-row{display:flex;align-items:center;gap:9px;padding:9px;border:1px solid #f0e8df;border-radius:11px;background:#fff}
.shared-memory-icon,.gift-inbox-icon,.family-parent-icon{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:10px;background:#f2ecfa;font-size:1.0625rem}
.gift-inbox-icon{background:#fff0db}
.family-parent-icon{background:#e8f4e6}
.gift-inbox-copy{display:flex;flex:1;flex-direction:column;gap:3px;min-width:0}
.gift-inbox-copy strong{font-size:0.625rem;color:#6d5849;line-height:1.45}
.gift-inbox-copy small{font-size:0.5rem;color:#a18e7f;line-height:1.5}
.gift-inbox-row .button{flex:0 0 auto}
.gift-inbox-wrap{margin-top:15px;padding-top:12px;border-top:1px solid #eee3d8}
.breeding-panel{margin:0 0 15px;background:linear-gradient(145deg,#faf6ff,#fffdf8);border-color:#e9e0f5}
.breeding-panel .section-heading{margin-bottom:12px}
.breeding-panel .section-heading h3{font:800 1.25rem/1.2 var(--round,inherit);color:#6b5a83;margin:0}
.breeding-form{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.breeding-form-fields{display:grid;grid-template-columns:minmax(170px,1.4fr) minmax(150px,1fr) minmax(130px,.7fr);gap:11px;flex:1;min-width:min(100%,400px)}
.breeding-form-fields>div{min-width:0}
.breeding-form input[type=color]{display:block;width:42px;height:37px;margin-top:6px;padding:2px;border:1px solid #e7d9cd;border-radius:10px;background:#fff;cursor:pointer}
.breeding-form input[type=color]:disabled{opacity:.4;cursor:not-allowed}
.custom-offspring-color{display:flex;align-items:center;gap:6px;margin-top:4px;color:#958477;font-size:0.5625rem;font-weight:700}
.custom-offspring-color input{accent-color:#9a83c9}
.family-generation{margin:3px 0;color:#8a76a9;font-size:0.625rem;font-weight:900;line-height:1.5}
.family-memory{margin:0;padding:9px 10px;border-radius:9px;background:#f5effb;color:#766489;font-size:0.5625rem;line-height:1.6}
@media(max-width:760px){.round-four-grid{grid-template-columns:1fr}.breeding-form{align-items:stretch;flex-direction:column}.breeding-form-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr);min-width:0}.breeding-form-fields>div:first-child{grid-column:1/-1}.breeding-form>#breed-submit{width:100%}}
@media(max-width:390px){.breeding-form-fields{grid-template-columns:1fr}.breeding-form-fields>div:first-child{grid-column:auto}.gift-inbox-row{align-items:flex-start;flex-wrap:wrap}.gift-inbox-row .button{margin-left:43px}}

/* Pocket Pals v0.8.4: unified spacing, typography, surfaces, and responsive layouts */
:root {
  color-scheme: light;
  --ink: #302f2c;
  --muted: #82796f;
  --paper: #f7f3eb;
  --card: #fffdfa;
  --line: #e8e1d8;
  --coral: #e99079;
  --coral-dark: #d87561;
  --shadow: 0 10px 28px rgba(78, 56, 37, .055);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --radius-control: 12px;
  --radius-nested: 14px;
  --radius-panel: 20px;
  --radius-feature: 24px;
  --panel-padding: clamp(16px, 2vw, 22px);
  --text-meta: 10px;
  --text-label: 12px;
}

html { text-size-adjust: 100%; }
body { font-size: 0.875rem; line-height: 1.55; }
.app-shell { width: min(1280px, calc(100% - 32px)); max-width: none; padding: 0; }
.topbar {
  height: 80px;
  padding-inline: max(16px, calc((100vw - 1280px) / 2));
  gap: 16px;
}
.brand { gap: 10px; }
.brand-mark { flex: 0 0 42px; }
.topbar-right { gap: 10px; min-width: 0; }
.pal-switcher { min-height: 40px; border-radius: var(--radius-control); }

.button {
  min-height: 42px;
  padding: 10px 15px;
  border-radius: var(--radius-control);
  font-size: 0.75rem;
  line-height: 1.3;
  white-space: normal;
}
.button-small { min-height: 36px; padding: 8px 11px; font-size: 0.6875rem; }
.button-quiet { border-radius: var(--radius-control); }
.button:disabled { cursor: not-allowed; }
input, select, textarea { accent-color: var(--coral-dark); }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
select, textarea {
  min-height: 42px;
  border-radius: var(--radius-control);
  font:inherit;
}
.field-label { font-size: 0.75rem; line-height: 1.4; margin-bottom: 6px; }
.field-label span { font-size: 0.625rem; }
.eyebrow { font-size: 0.625rem; line-height: 1.4; letter-spacing: .14em; margin-bottom: 8px; }
.intro-copy, .section-subtitle { font-size: 0.75rem; line-height: 1.65; }

.adopt-screen {
  min-height: calc(100svh - 80px);
  padding: clamp(28px, 4vw, 46px) 0 22px;
  gap: clamp(28px, 5vw, 64px);
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
}
.adopt-intro { padding: 0 0 20px; }
.adopt-intro h1 { font-size: clamp(2.375rem, 4.8vw, 3.625rem); line-height: 1.08; letter-spacing: -.045em; margin-bottom: 18px; }
.intro-copy { margin-bottom: 22px; max-width: 44ch; }
.adopt-card { padding: var(--panel-padding); border-radius: var(--radius-feature); }
.card-heading { gap: 14px; margin-bottom: 20px; }
.card-heading h2, .section-heading h2, .modal-card h2 { font-size: clamp(1.1875rem, 1.7vw, 1.375rem); line-height: 1.25; letter-spacing: -.025em; }
.species-grid { gap: 9px; }
.species-option { min-height: 96px; border-radius: var(--radius-control); padding: 10px 7px 9px; }
.species-option strong { font-size: 0.75rem; line-height: 1.3; text-align: center; }
.species-option small { font-size: 0.625rem; line-height: 1.35; text-align: center; white-space: normal; }
.form-row { margin: 20px 0 18px; }
.form-row input, .modal-card input { height: 44px; padding-inline: 13px; border-radius: var(--radius-control); }
.color-fieldset { margin-bottom: 20px; }
.color-fieldset legend, .species-fieldset legend { font-size: 0.75rem; margin-bottom: 10px; }
.color-options { gap: 8px; flex-wrap: wrap; }
.color-swatch { width: 34px; height: 34px; }
.tiny-note { font-size: 0.625rem; line-height: 1.5; margin-top: 12px; }
.import-row { margin-top: 18px; padding-top: 16px; }
.text-button { font-size: 0.75rem; line-height: 1.5; }
.page-footer { font-size: 0.5625rem; letter-spacing: .12em; padding-bottom: 12px; }

.pet-screen { padding: 28px 0 20px; }
.page-intro { align-items: center; gap: 20px; margin-bottom: 20px; }
.page-intro h1 { font-size: clamp(2rem, 4vw, 2.875rem); line-height: 1.08; letter-spacing: -.045em; }
.intro-actions { gap: 8px; padding-bottom: 0; flex-wrap: wrap; justify-content: flex-end; }
.offline-banner { margin-bottom: 16px; padding: 13px 15px; border-radius: var(--radius-nested); }
.pet-layout { grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 16px; align-items: start; }
.care-column { gap: 16px; }
.panel-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow);
}
.pet-world { padding: 20px; }
.world-scene { height: clamp(235px, 24vw, 300px); margin: 8px 0 0; border-radius: 16px; }

.needs-card, .actions-card, .journal-card, .keepsake-card, .egg-care-card, .arcade-card, .evolution-card, .home-card, .economy-card, .friends-card {
  padding: var(--panel-padding);
}
.needs-card, .actions-card, .journal-card, .keepsake-card { min-width: 0; }
.section-heading { align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.section-heading .eyebrow { margin-bottom: 6px; }
.section-heading h2 { margin: 0; }
.section-subtitle { margin: 6px 0 0; max-width: 62ch; color: #897e73; }
.weather-sticker, .journal-mark, .inventory-stamp { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; }
.needs-list { gap: 14px; }
.need-row { gap: 10px; }
.need-icon { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 11px; }
.need-label-row { font-size: 0.75rem; line-height: 1.4; }
.need-label-row strong { font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
.need-track { height: 7px; margin-top: 7px; border-radius: 99px; }
.needs-footnote { font-size: 0.6875rem; line-height: 1.55; margin-top: 16px; }
.action-grid { gap: 9px; }
.care-action { min-height: 100px; padding: 11px 7px 10px; border-radius: var(--radius-control); }
.action-emoji { font-size: 1.4375rem; height: 30px; margin-bottom: 5px; }
.care-action strong { font-size: 0.75rem; line-height: 1.35; text-align: center; }
.care-action small { font-size: 0.625rem; line-height: 1.35; text-align: center; }
.care-feedback { margin: 14px 0 0; padding: 10px 12px; border-radius: 11px; font-size: 0.6875rem; line-height: 1.55; }
.egg-care-card { border-radius: var(--radius-panel); }
.routine-summary { gap: 14px; }
.routine-line { gap: 11px; }
.routine-icon { flex-basis: 36px; width: 36px; height: 36px; border-radius: 11px; }
.routine-line strong { font-size: 0.75rem; line-height: 1.45; }
.routine-line small, .life-alert small { font-size: 0.6875rem; line-height: 1.5; }
.routine-track { margin: 7px 0 6px; }
.mess-status, .life-alert, .social-feedback, .economy-feedback, .home-feedback { font-size: 0.6875rem; line-height: 1.55; }
.life-alert { gap: 10px; padding: 11px 12px; margin-top: 14px; border-radius: 12px; }
.life-alert strong { font-size: 0.75rem; }
.gentle-alert-row { gap: 12px; margin-top: 15px; padding-top: 14px; }
.gentle-alert-row strong { font-size: 0.6875rem; }
.gentle-alert-row small { font-size: 0.625rem; line-height: 1.5; }
.gentle-alert-row .button { padding: 8px 10px; font-size: 0.625rem; }
.hatch-track { height: 10px; margin: 14px 0 16px; }
.egg-care-copy { font-size: 0.75rem; line-height: 1.6; margin-bottom: 14px; }
.egg-ritual-grid { gap: 9px; }
.egg-ritual-grid .care-action { min-height: 98px; }
.egg-ritual-grid .care-action strong { font-size: 0.75rem; }
.egg-ritual-grid .care-action small { font-size: 0.625rem; }
.growth-timer { font-size: 0.6875rem; padding: 10px 12px; border-radius: 11px; margin-bottom: 14px; }

.home-card, .economy-card, .friends-card, .arcade-card { width: 100%; max-width: none; margin: 16px 0 0; }
.home-main-grid, .home-inventory-grid, .economy-columns, .round-four-grid, .friend-content-grid { gap: 16px; }
.home-room-preview { min-height: 200px; border-radius: var(--radius-nested); }
.home-editor { gap: 12px; padding: 0; }
.home-select-label { gap: 7px; font-size: 0.6875rem; }
.home-select-label select { min-height: 44px; padding: 10px 12px; border-radius: var(--radius-control); font-size: 0.75rem; }
.home-feedback { padding: 10px 12px; border-radius: 10px; }
.pet-preferences { margin: 16px 0; padding: 13px 14px; border-radius: var(--radius-nested); }
.preference-label { font-size: 0.625rem; letter-spacing: .1em; margin-bottom: 9px; }
.preference-chips { gap: 8px; }
.preference-chip { padding: 7px 10px; font-size: 0.6875rem; }
.home-inventory-grid { margin-top: 0; }
.inventory-section, .economy-subpanel, .friend-list-section, .visit-history-section,
.social-play-panel, .gift-panel, .breeding-panel { padding: 16px; border-radius: var(--radius-nested); }
.inventory-title { margin-bottom: 13px; }
.inventory-title h3, .friends-subheading h3, .economy-subheading h3 { font-size: 0.875rem; line-height: 1.35; }
.inventory-title p, .inventory-note, .economy-hint { font-size: 0.6875rem; line-height: 1.5; }
.item-grid { gap: 9px; }
.inventory-item { min-height: 104px; padding: 10px; border-radius: 12px; gap: 5px; }
.inventory-item strong { font-size: 0.6875rem; line-height: 1.4; }
.inventory-item small { font-size: 0.625rem; line-height: 1.45; }
.inventory-item-icon { width: 34px; height: 34px; font-size: 1.25rem; }
.inventory-note { margin-top: 12px; }
.home-action-feedback { margin-top: 14px; }

.arcade-card { padding: var(--panel-padding); }
.arcade-games { gap: 12px; }
.game-card { min-height: 78px; padding: 12px; gap: 8px 12px; border-radius: var(--radius-nested); }
.game-card strong { font-size: 0.8125rem; line-height: 1.35; }
.game-card small { font-size: 0.6875rem; line-height: 1.4; }
.game-launch { font-size: 0.625rem; }
.arcade-stats { gap: 16px; margin-top: 16px; padding-top: 14px; font-size: 0.6875rem; }
.arcade-stats strong { font-size: 0.75rem; }

.economy-heading { gap: 16px; }
.coin-purse { min-width: 100px; padding: 11px 14px; border-radius: var(--radius-nested); }
.coin-purse strong { font-size: 1.3125rem; }
.economy-columns { margin: 16px 0; }
.economy-subheading { gap: 12px; margin-bottom: 12px; }
.economy-subheading > span { font-size: 0.625rem; line-height: 1.4; }
.daily-quest-list, .outing-options { gap: 9px; }
.daily-quest { padding: 12px; border-radius: 12px; }
.quest-heading strong { font-size: 0.75rem; line-height: 1.4; }
.quest-heading span { font-size: 0.625rem; }
.daily-quest p, .daily-quest > small { font-size: 0.625rem; line-height: 1.5; }
.outing-card { grid-template-columns: 40px minmax(0,1fr) auto; gap: 10px; padding: 10px; border-radius: 12px; }
.outing-icon { width: 40px; height: 40px; border-radius: 11px; }
.outing-copy strong { font-size: 0.75rem; }
.outing-copy small, .outing-reward { font-size: 0.625rem; line-height: 1.45; }
.economy-feedback { margin-top: 12px; padding: 10px 12px; border-radius: 10px; }
.shop-panel, .collection-panel { margin-top: 16px; }
.shop-options { gap: 10px; }
.shop-item { padding: 11px; border-radius: 12px; gap: 4px 8px; }
.shop-item-copy strong { font-size: 0.6875rem; line-height: 1.4; }
.shop-item-copy small, .shop-item > b { font-size: 0.625rem; line-height: 1.45; }
.collection-grid { gap: 9px; }
.collectible-item { padding: 12px 7px; border-radius: 12px; gap: 6px; }
.collectible-item > span { width: 36px; height: 36px; }
.collectible-item strong { font-size: 0.625rem; line-height: 1.4; }
.collectible-item small { font-size: 0.5625rem; }
.outing-journal { gap: 6px; margin-top: 12px; }
.outing-memory { padding: 9px 10px; border-radius: 9px; font-size: 0.625rem; }

.friends-card { padding: var(--panel-padding); }
.friend-code-row { gap: 12px; margin: 16px 0; padding: 14px 16px; border-radius: var(--radius-nested); }
.friend-code-label { font-size: 0.625rem; letter-spacing: .09em; }
.friend-code-value { font-size: clamp(1.25rem, 2.5vw, 1.625rem); letter-spacing: .09em; }
.friend-tools { gap: 16px; }
.friend-add-form { gap: 8px; }
.friend-add-control { gap: 8px; }
.friend-add-control input { min-height: 42px; padding: 10px 12px; border-radius: var(--radius-control); font-size: 0.75rem; }
.auto-visits-setting { min-height: 52px; padding: 12px 14px; gap: 11px; border-radius: var(--radius-control); }
.auto-visits-setting strong { font-size: 0.75rem; line-height: 1.4; }
.auto-visits-setting small { font-size: 0.6875rem; line-height: 1.5; }
.social-feedback { margin: 14px 0 16px; padding: 11px 13px; border-radius: 11px; }
.friend-content-grid { gap: 16px; }
.friends-subheading { gap: 10px; margin-bottom: 12px; }
.friend-count { font-size: 0.625rem; padding: 6px 8px; }
.friends-list, .visit-history, .friend-activity-log, .gift-inbox-list, .family-history { gap: 8px; }
.social-empty { padding: 16px 10px; font-size: 0.6875rem; line-height: 1.6; }
.friend-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; padding: 10px; border-radius: 12px; }
.friend-avatar, .friend-avatar svg { width: 42px; height: 42px; }
.friend-avatar { border-radius: 12px; }
.friend-info strong { font-size: 0.75rem; line-height: 1.4; }
.friend-info small { font-size: 0.625rem; line-height: 1.45; }
.friend-row-actions { gap: 6px; }
.friend-row-actions .button { min-height: 34px; padding: 7px 9px; font-size: 0.625rem; }
.friend-remove-button { font-size: 0.625rem; }
.visit-row { gap: 10px; padding: 11px; border-radius: 12px; }
.visit-icon { flex-basis: 34px; width: 34px; height: 34px; border-radius: 10px; }
.visit-copy strong { font-size: 0.6875rem; line-height: 1.45; }
.visit-copy small { font-size: 0.625rem; line-height: 1.5; }
.round-four-grid { margin: 16px 0; }
.social-play-panel, .gift-panel, .breeding-panel { border-radius: var(--radius-nested); }
.social-action-form { gap: 9px; }
.social-action-form select, .breeding-form select, .breeding-form input[type="text"] { min-height: 44px; padding: 10px 12px; border-radius: var(--radius-control); font-size: 0.75rem; }
.social-action-form .field-label { margin: 4px 0 -1px; }
.social-action-form .button { margin-top: 5px; }
.shared-memory-row, .gift-inbox-row, .family-parent-row { gap: 10px; padding: 10px; border-radius: 12px; }
.shared-memory-icon, .gift-inbox-icon, .family-parent-icon { flex-basis: 38px; width: 38px; height: 38px; border-radius: 11px; }
.gift-inbox-copy strong { font-size: 0.6875rem; line-height: 1.45; }
.gift-inbox-copy small { font-size: 0.625rem; line-height: 1.5; }
.gift-inbox-wrap { margin-top: 16px; padding-top: 14px; }
.breeding-panel { margin: 0 0 16px; }
.breeding-panel .section-heading { margin-bottom: 14px; }
.breeding-panel .section-heading h3 { font-size: 1.3125rem; line-height: 1.25; }
.breeding-form-fields { gap: 12px; }
.custom-offspring-color { font-size: 0.625rem; gap: 7px; }
.family-generation { font-size: 0.6875rem; }
.family-memory { padding: 10px 12px; border-radius: 10px; font-size: 0.625rem; line-height: 1.55; }

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, .82fr);
  align-items: stretch;
  gap: 16px;
  margin-top: 16px;
}
.journal-card, .evolution-card, .keepsake-card { grid-column: auto; grid-row: auto; min-width: 0; }
.evolution-card { padding: var(--panel-padding); }
.genome-summary { margin: 0 0 12px; gap: 4px; }
.genome-summary strong { font-size: 0.9375rem; line-height: 1.35; }
.genome-summary span { font-size: 0.6875rem; line-height: 1.45; }
.gene-chips { gap: 6px; margin-bottom: 14px; }
.gene-chip { padding: 6px 9px; font-size: 0.625rem; }
.evolution-caption { font-size: 0.6875rem; line-height: 1.55; margin-bottom: 14px; }
.evolution-node-copy strong { font-size: 0.6875rem; }
.evolution-node-copy small { font-size: 0.625rem; line-height: 1.4; }
.journal-item { grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; padding: 12px 0; }
.keepsake-card { min-height: 0; padding: var(--panel-padding); }
.keepsake-card h2 { font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.15; }
.keepsake-card p:not(.eyebrow) { font-size: 0.75rem; line-height: 1.65; }
.pet-footer { gap: 12px; padding: 20px 0 8px; font-size: 0.625rem; line-height: 1.5; letter-spacing: .08em; }
.pet-footer .text-button { font-size: 0.6875rem; }

.modal-card { width: min(460px, calc(100% - 32px)); max-height: min(88svh, 800px); overflow: auto; padding: clamp(18px, 4vw, 26px); border-radius: var(--radius-feature); }
.modal-top { margin-bottom: 14px; }
.modal-card h2 { margin-bottom: 16px; }
.modal-card .field-label { margin-top: 12px; }
.game-modal { width: min(540px, calc(100% - 32px)); }
.game-intro { font-size: 0.75rem; line-height: 1.6; }
.game-prompt { font-size: 0.8125rem; line-height: 1.5; }
.game-tile { border-radius: 12px; }
.game-feedback { font-size: 0.6875rem; line-height: 1.55; padding: 11px 12px; }

@media (max-width: 1100px) {
  .app-shell { width: min(100% - 32px, 900px); }
  .adopt-screen { grid-template-columns: 1fr; min-height: auto; gap: 22px; padding-top: 30px; }
  .adopt-intro { padding: 0; }
  .adopt-intro h1 { font-size: clamp(2.25rem, 5.5vw, 3.125rem); }
  .intro-copy { max-width: 60ch; }
  .pet-layout { grid-template-columns: 1fr; }
  .care-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .care-column > .panel-card { height: 100%; }
  .care-column > #actions-card { grid-column: 1 / -1; height: auto; }
  .care-column > #egg-care-card { grid-column: 1 / -1; height: auto; }
  .arcade-games { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lower-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .keepsake-card { grid-column: 1 / -1; }
  .home-main-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
}
@media (max-width: 760px) {
  .topbar { height: 72px; }
  .app-shell { width: calc(100% - 28px); }
  .brand-copy strong { font-size: 1.125rem; }
  .connection-pill { flex: 0 0 auto; }
  .pet-screen { padding-top: 22px; }
  .page-intro { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 16px; }
  .intro-actions { width: 100%; justify-content: flex-start; }
  .care-column { grid-template-columns: 1fr; }
  .care-column > .panel-card, .care-column > #actions-card, .care-column > #egg-care-card { grid-column: auto; height: auto; }
  .world-scene { height: 270px; }
  .pet-world { padding: 16px; }
  .section-heading { gap: 10px; margin-bottom: 14px; }
  .home-main-grid, .home-inventory-grid, .economy-columns, .friend-tools, .friend-content-grid, .round-four-grid { grid-template-columns: 1fr; }
  .home-editor { display: flex; align-items: stretch; }
  .home-editor .button { align-self: stretch; width: 100%; }
  .arcade-games { grid-template-columns: 1fr; }
  .lower-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .keepsake-card { grid-column: auto; }
  .shop-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .breeding-form { align-items: stretch; flex-direction: column; }
  .breeding-form-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-width: 0; }
  .breeding-form-fields > div:first-child { grid-column: 1 / -1; }
  .friend-code-row { align-items: center; }
}
@media (max-width: 520px) {
  .topbar { padding-inline: 14px; gap: 8px; }
  .brand { gap: 8px; }
  .brand-mark { flex-basis: 36px; width: 36px; height: 36px; }
  .brand-copy strong { font-size: 1.0625rem; }
  .brand-copy small { font-size: 0.4375rem; letter-spacing: .1em; }
  .topbar-right { gap: 6px; }
  .connection-pill { width: 26px; padding: 0; justify-content: center; }
  .pal-switcher { max-width: 112px; padding: 7px 8px; font-size: 0.6875rem; }
  #add-pal-top { padding-inline: 9px; font-size: 0.625rem; }
  .app-shell { width: calc(100% - 24px); }
  .adopt-screen { padding-top: 24px; gap: 18px; }
  .adopt-intro h1 { font-size: clamp(2rem, 8.5vw, 2.625rem); letter-spacing: -.04em; margin-bottom: 13px; }
  .intro-copy { font-size: 0.75rem; margin-bottom: 14px; }
  .promise-line { font-size: 0.625rem; line-height: 1.5; align-items: flex-start; }
  .adopt-card { padding: 16px; border-radius: 20px; }
  .card-heading { margin-bottom: 17px; }
  .tiny-stamp { padding: 6px 7px; }
  .species-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .species-option { min-height: 88px; padding: 8px 5px; }
  .species-option small { font-size: 0.5625rem; }
  .color-options { gap: 6px; }
  .color-swatch { width: 32px; height: 32px; }
  .pet-screen { padding-top: 18px; }
  .page-intro h1 { font-size: 2rem; }
  .intro-actions .button { flex: 1 1 auto; }
  .pet-world, .needs-card, .actions-card, .journal-card, .keepsake-card, .egg-care-card, .arcade-card, .evolution-card, .home-card, .economy-card, .friends-card { padding: 15px; border-radius: 17px; }
  .world-scene { height: 235px; }
  .action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .care-action { min-height: 92px; padding: 8px 4px; }
  .care-action strong { font-size: 0.6875rem; }
  .care-action small { font-size: 0.5625rem; line-height: 1.35; overflow-wrap: anywhere; }
  .egg-ritual-grid { gap: 7px; }
  .egg-ritual-grid .care-action { min-height: 91px; }
  .egg-ritual-grid .care-action small { font-size: 0.5625rem; }
  .friend-add-control { flex-direction: column; }
  .friend-add-control .button { width: 100%; }
  .friend-code-row { align-items: flex-start; flex-direction: column; }
  .friend-row { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; padding: 8px; }
  .friend-avatar, .friend-avatar svg { width: 36px; height: 36px; }
  .friend-row-actions .button { padding: 7px 8px; font-size: 0.5625rem; }
  .shop-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-item { grid-template-columns: 26px minmax(0, 1fr); padding: 8px; gap: 3px 7px; }
  .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .collectible-item { padding: 9px 4px; }
  .breeding-form-fields { grid-template-columns: 1fr; }
  .breeding-form-fields > div:first-child { grid-column: auto; }
  .pet-footer { align-items: flex-start; flex-direction: column; padding-top: 16px; }
  .modal-card { width: calc(100% - 24px); padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Small finishing details for keyboard and safe-area consistency. */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(217, 111, 93, .42);
  outline-offset: 2px;
}
input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; }
@media (max-width: 520px) {
  .topbar {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .app-shell {
    width: auto;
    margin-left: max(12px, env(safe-area-inset-left));
    margin-right: max(12px, env(safe-area-inset-right));
  }
}


/* v0.8.5: task-based navigation keeps the pet world calm and scannable. */
.pet-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  margin: 18px 0 16px;
  border: 1px solid #eee4da;
  border-radius: 18px;
  background: rgba(255, 253, 249, .92);
  box-shadow: 0 5px 18px rgba(93, 69, 48, .045);
  scroll-margin-top: 12px;
}
.pet-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #89796e;
  font:inherit;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pet-tab:hover { background: #fbf5ef; color: #6d5b50; }
.pet-tab.is-active, .pet-tab[aria-selected="true"] {
  color: #765247;
  background: #fff;
  border-color: #f0dfd5;
  box-shadow: 0 2px 7px rgba(93, 69, 48, .08);
}
.pet-tab-icon { display: inline-grid; place-items: center; font-size: 0.9375rem; line-height: 1; color: #d58e7a; }
.tab-panel { min-width: 0; outline: none; }
.tab-panel[hidden] { display: none !important; }
#tab-panel-home > .home-card,
#tab-panel-explore > .arcade-card,
#tab-panel-explore > .economy-card,
#tab-panel-friends > .friends-card { margin-top: 0; }
#tab-panel-explore > .economy-card { margin-top: 14px; }
#tab-panel-memories > .lower-grid { margin-top: 0; }
.pet-tabs:focus-within { outline: 2px solid rgba(217, 111, 93, .18); outline-offset: 3px; }
@media (max-width: 760px) {
  .pet-tabs { gap: 4px; padding: 5px; margin: 14px 0; border-radius: 15px; }
  .pet-tab { flex-direction: column; gap: 4px; min-height: 55px; padding: 7px 2px; font-size: 0.625rem; border-radius: 10px; }
  .pet-tab-icon { font-size: 0.9375rem; }
}
@media (max-width: 390px) {
  .pet-tabs { gap: 3px; padding: 4px; }
  .pet-tab { min-height: 52px; font-size: 0.5625rem; }
  .pet-tab-icon { font-size: 0.875rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pet-tab { transition: none; }
}

/* v0.8.6: one persistent pal scene, with Home customization applied in place. */
.persistent-pet-stage { margin: 0 0 16px; }
.isometric-world-stage { position: relative; isolation: isolate; transform-origin: top left; will-change: transform; }
.park-world-map.isometric-world-stage { overflow: hidden; }

.persistent-pet-stage .pet-world {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  grid-template-areas: "top top" "scene story" "bottom bottom";
  gap: 12px 24px;
  align-items: center;
  padding: 18px 20px 14px;
  overflow: hidden;
}
.persistent-pet-stage .world-scene {
  grid-area: scene;
  height: clamp(190px, 20vw, 250px);
  min-width: 0;
  margin: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--scene-sky, var(--room-sky, #eaf4e6)) 0%, var(--scene-sky, var(--room-sky, #eaf4e6)) 53%, var(--scene-floor, var(--room-floor, #cce4d5)) 53.3%, var(--scene-floor, var(--room-floor, #cce4d5)) 100%);
  transition: background .25s ease;
}
.persistent-pet-stage .world-scene.is-night { --scene-sky: #34395d; --scene-floor: #a9b7c5; }
.persistent-pet-stage .world-scene:after { background: var(--room-floor, #cce4d5); opacity: .72; }
.persistent-pet-stage .world-scene.is-night:after { background: #9fbfae; }
.scene-decor-icon {
  position: absolute;
  z-index: 4;
  right: 13%;
  bottom: 23%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid #fff;
  border-radius: 15px;
  background: #fff9e9ed;
  box-shadow: 0 5px 12px #6e54351c;
  font-size: 1.4375rem;
  transform: rotate(7deg);
}
.scene-decor-icon.has-svg-art { padding: 4px; }
.scene-decor-icon.has-svg-art img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 1px #66514f18); }
.pet-tabs { margin-top: 16px; }
/* Care now focuses on actions and status, never a second copy of the pet. */
.care-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.care-column > #egg-care-card,
.care-column > #actions-card { grid-column: 1 / -1; height: auto; }
/* Home controls the persistent scene instead of drawing a second room preview. */
.home-main-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.home-current-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #e7eadb;
  border-radius: var(--radius-nested, 15px);
  background: linear-gradient(110deg, #f4f8ee, #fff9f1);
}
.home-summary-mark {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #fff;
  border-radius: 13px;
  background: #fffdfa;
  color: #8a9a78;
  font-size: 1.3125rem;
}
.home-current-summary > div { min-width: 0; }
.home-current-summary p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin: 0 0 3px; color: #938273; font-size: 0.6875rem; }
.home-current-summary p strong { color: #675b4e; font-size: 0.75rem; }
.home-current-summary small { display: block; color: #9a8b7c; font-size: 0.625rem; line-height: 1.45; }
.home-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; }
.home-editor .button { grid-column: 1 / -1; width: fit-content; align-self: start; }
.home-feedback { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .persistent-pet-stage .pet-world {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "top" "scene" "story" "bottom";
    gap: 11px;
    padding: 15px;
  }
  .persistent-pet-stage .world-scene { height: clamp(215px, 54vw, 280px); }
  .care-column { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .care-column > #egg-care-card, .care-column > #actions-card { grid-column: auto; }
  .home-editor { grid-template-columns: minmax(0, 1fr); }
  .home-editor .button { grid-column: auto; width: 100%; }
  .home-feedback { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .persistent-pet-stage .world-scene { transition: none; }
}

/* v0.8.9: selection belongs to the creature silhouette, never the whole room tile. */
.room-pals {
  position: absolute;
  z-index: 3;
  inset: 38px 12px 8px;
  display: grid;
  grid-template-columns: repeat(var(--room-pet-columns, 1), minmax(0, 1fr));
  grid-template-rows: repeat(var(--room-pet-rows, 1), minmax(0, 1fr));
  align-items: end;
  justify-items: center;
  gap: 0 6px;
  pointer-events: none;
}
.room-pet-button {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  width: 100%;
  max-width: 200px;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 4px 3px 7px;
  border: 0;
  border-radius: 0;
  color: #64564c;
  background: transparent;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s ease;
}
/* Do not draw a card/selection frame around the button's full hit area. */
.room-pet-button::before { content: none; display: none; }
.room-pet-button::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 24%;
  right: 24%;
  bottom: 44px;
  height: 10px;
  border-radius: 50%;
  background: #667c6540;
  filter: blur(6px);
  transition: background .16s ease, transform .16s ease;
}
.room-pet-button:hover { transform: translateY(-2px); }
.room-pet-button.is-selected::after { background: #dc8b766b; transform: scale(1.14); }
.room-pet-button:focus-visible { outline: 3px solid #d77e6e; outline-offset: -2px; border-radius: 12px; }
.room-pet-visual.pet-art {
  z-index: 1;
  position: relative;
  display: grid;
  flex: 0 1 auto;
  place-items: center;
  width: min(100%, clamp(145px, 15vw, 190px));
  height: auto;
  aspect-ratio: 1 / 1;
  min-height: 0;
  max-height: calc(100% - 38px);
  margin: 0;
  filter: drop-shadow(0 7px 5px #6b5c4410);
  transform-origin: center bottom;
  transition: filter .16s ease, transform .16s ease;
}
.room-pet-visual.pet-art svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* A multi-direction drop-shadow follows the SVG's transparent silhouette, outlining only the pal. */
.room-pet-button.is-selected .room-pet-visual {
  filter: drop-shadow(0 0 1.2px #fffdfa) drop-shadow(1px 0 0 #dc8b76) drop-shadow(-1px 0 0 #dc8b76) drop-shadow(0 1px 0 #dc8b76) drop-shadow(0 -1px 0 #dc8b76) drop-shadow(0 0 2px #dc8b7690) drop-shadow(0 7px 6px #d88c7340);
  transform: scale(1.045);
}
.room-pet-name {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 100%;
  margin-top: 1px;
  padding: 3px 9px;
  overflow: hidden;
  border: 1px solid #ffffffa8;
  border-radius: 999px;
  background: #fffdfaeb;
  color: #746456;
  font-family: var(--round);
  font-size: 0.625rem;
  font-weight: 900;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 2px 6px #5e4a380d;
}
.room-pet-stage {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #9e8a7a;
  font-size: 0.5rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-pet-button.is-selected .room-pet-name { border-color: transparent; background: transparent; color: #a65f51; box-shadow: none; }
.no-room-pet-selected .tab-panel { opacity: .72; }
.no-room-pet-selected .tab-panel[hidden] { opacity: 1; }
.no-room-pet-selected .pet-tabs { margin-bottom: 8px; }
@media (max-width: 760px) {
  .room-pals { inset: 38px 7px 7px; gap: 0 3px; }
  .room-pet-button { padding: 4px 1px 7px; }
  .room-pet-visual.pet-art { width: min(100%, clamp(112px, 28vw, 150px)); max-height: calc(100% - 36px); }
  .room-pet-name { max-width: 98%; padding: 3px 6px; font-size: 0.5625rem; }
  .room-pet-stage { font-size: 0.4375rem; }
  .room-pet-button::after { bottom: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .room-pet-button, .room-pet-visual.pet-art, .room-pet-button::after { transition: none; }
  .room-pet-button:hover { transform: none; }
}

/* Pocket Pals: scrollable isometric rooms and sprite-sized hit targets. */
.world-scene {
  display: block;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--room-sky, #eaf4e6);
  touch-action: pan-y;
}
.world-scene::after { content: none !important; }
.room-scrollport {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #adbea999 transparent;
  -webkit-overflow-scrolling: touch;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.room-scrollport:focus-visible { outline: 3px solid #d77e6e; outline-offset: -4px; }
.room-scrollport::-webkit-scrollbar { height: 7px; }
.room-scrollport::-webkit-scrollbar-track { background: #ffffff36; }
.room-scrollport::-webkit-scrollbar-thumb { border-radius: 99px; background: #adbea999; }
.room-world {
  position: relative;
  isolation: isolate;
  height: 100%;
  min-width: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, var(--scene-sky, var(--room-sky, #eaf4e6)) 0%, var(--scene-sky, var(--room-sky, #eaf4e6)) 53%, var(--scene-floor, var(--room-floor, #cce4d5)) 53.3%, var(--scene-floor, var(--room-floor, #cce4d5)) 100%);
}
.room-world::before,
.room-world::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}
.room-world::before {
  z-index: 0;
  top: 0;
  height: 100%;
  background: radial-gradient(ellipse at 14% 18%, #fffdf766, transparent 30%), radial-gradient(ellipse at 79% 13%, #fffdf744, transparent 27%);
}
.room-world::after {
  z-index: 1;
  bottom: 0;
  height: 44%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--room-floor, #cce4d5) 68%, transparent), var(--room-floor, #cce4d5));
  border-radius: 48% 48% 0 0 / 11% 11% 0 0;
  opacity: .72;
}
.scene-decor-icon {
  z-index: 8;
  left: var(--scene-decor-left, 76%);
  right: auto;
  bottom: 20%;
  pointer-events: none;
}
.room-scroll-hint {
  position: absolute;
  z-index: 9;
  right: 10px;
  bottom: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid #ffffffad;
  border-radius: 99px;
  background: #fffdf0b8;
  color: #77866f;
  font-size: 0.5rem;
  font-weight: 800;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.room-pals {
  position: absolute;
  z-index: 4;
  left: var(--room-pet-left, 12px);
  top: 34px;
  bottom: 0;
  width: var(--room-pet-area-width, 90%);
  display: grid;
  grid-template-columns: repeat(var(--room-pet-columns, 1), minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  justify-items: center;
  gap: 0;
  pointer-events: none;
}
.room-pet-entry {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 0 27px;
  pointer-events: none;
}
.room-pet-button {
  position: relative;
  isolation: isolate;
  display: block;
  flex: 0 0 auto;
  width: min(100%, var(--room-pet-hitbox-size, 160px));
  height: min(100%, var(--room-pet-hitbox-size, 160px));
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: #64564c;
  background: transparent;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s ease;
}
.room-pet-button::before { content: none !important; display: none !important; }
.room-pet-button::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 23%; right: 23%; bottom: 4px;
  height: 10px;
  border-radius: 50%;
  background: #667c6538;
  filter: blur(6px);
  transition: background .16s ease, transform .16s ease;
  pointer-events: none;
}
.room-pet-button:hover { transform: translateY(-2px); }
.room-pet-button.is-selected::after { background: #dc8b766b; transform: scale(1.16); }
.room-pet-button:focus-visible { outline: 2px solid #d77e6e; outline-offset: -5px; border-radius: 38%; }
.room-pet-visual.pet-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  filter: drop-shadow(0 7px 5px #6b5c4410);
  transform-origin: center bottom;
  transition: filter .16s ease, transform .16s ease;
  pointer-events: none;
  animation: float 3.4s ease-in-out infinite;
}
.room-pet-visual.pet-art svg { display: block; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.room-pet-button.is-selected .room-pet-visual {
  filter: drop-shadow(0 0 1.2px #fffdfa) drop-shadow(1px 0 0 #dc8b76) drop-shadow(-1px 0 0 #dc8b76) drop-shadow(0 1px 0 #dc8b76) drop-shadow(0 -1px 0 #dc8b76) drop-shadow(0 0 2px #dc8b7690) drop-shadow(0 7px 6px #d88c7340);
  transform: scale(1.045);
}
.room-pet-name {
  display: block;
  max-width: 100%;
  margin-top: 1px;
  padding: 3px 9px;
  overflow: hidden;
  border: 1px solid #ffffffa8;
  border-radius: 999px;
  background: #fffdfaeb;
  color: #746456;
  font-family: var(--round);
  font-size: 0.625rem;
  font-weight: 900;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 2px 6px #5e4a380d;
  pointer-events: none;
}
.room-pet-stage {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #9e8a7a;
  font-size: 0.5rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.room-pet-button.is-selected + .room-pet-name { border-color: transparent; background: transparent; color: #a65f51; box-shadow: none; }
@media (max-width: 760px) {
  .room-scrollport { scroll-padding-inline: 8px; }
  .room-pals { top: 32px; }
  .room-pet-entry { padding-bottom: 26px; }
  .room-pet-name { padding: 3px 6px; font-size: 0.5625rem; }
  .room-pet-stage { font-size: 0.4375rem; }
  .room-scroll-hint { font-size: 0.4375rem; right: 6px; bottom: 5px; }
  .scene-decor-icon { bottom: 19%; }
}
@media (prefers-reduced-motion: reduce) {
  .room-scrollport { scroll-behavior: auto; }
  .room-pet-button, .room-pet-visual.pet-art, .room-pet-button::after { transition: none; }
  .room-pet-visual.pet-art { animation: none; }
  .room-pet-button:hover { transform: none; }
}


/* Pocket Pals v0.8.11: painted sprite geometry defines the clickable region. */
.room-pet-button {
  pointer-events: none !important;
  outline: none;
}
.room-pet-visual.pet-art,
.room-pet-visual.pet-art svg {
  pointer-events: none !important;
}
.room-pet-visual.pet-art svg * {
  pointer-events: visiblePainted !important;
  cursor: pointer;
}
/* The softly painted floor shadow is scenery, not part of the pet's hit shape. */
.room-pet-visual.pet-art svg > ellipse:first-child {
  pointer-events: none !important;
  cursor: default;
}
/* Keyboard focus gets the same creature-following outline, not a square focus box. */
.room-pet-button:focus-visible .room-pet-visual {
  filter: drop-shadow(0 0 1.2px #fffdfa)
          drop-shadow(1px 0 0 #dc8b76)
          drop-shadow(-1px 0 0 #dc8b76)
          drop-shadow(0 1px 0 #dc8b76)
          drop-shadow(0 -1px 0 #dc8b76)
          drop-shadow(0 0 2px #dc8b7690);
}
.room-pet-button:focus-visible {
  border-radius: 0;
  box-shadow: none;
}

/* Household-wide tab states: useful summaries replace pet-specific controls when no pal is selected. */
.no-room-pet-selected .tab-panel { opacity: 1; }
.no-room-pet-selected .tab-panel[hidden] { opacity: 1; }
.no-room-pet-selected [data-selection-required] { display: none !important; }
.household-overview { padding: clamp(18px, 2.4vw, 26px); min-width: 0; }
.household-overview .section-heading { margin-bottom: 16px; }
.household-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; }
.household-stat { min-width: 0; padding: 13px 14px; border: 1px solid #eee4da; border-radius: 14px; background: linear-gradient(145deg, #fffdfa, #faf4ec); display: flex; flex-direction: column; gap: 4px; }
.household-stat-label { color: #98897b; font-size: 0.625rem; font-weight: 750; }
.household-stat-value { color: #544a42; font-family: var(--round); font-size: clamp(1.1875rem, 2.3vw, 1.5625rem); font-weight: 900; line-height: 1.25; overflow-wrap: anywhere; }
.household-stat small { color: #a69a8e; font-size: 0.5625rem; line-height: 1.45; }
.household-overview-note { padding: 11px 13px; margin: 13px 0; border-radius: 11px; background: #f8f3ec; color: #938375; font-size: 0.625rem; line-height: 1.6; }
.household-pet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 9px; }
.household-pet-link { display: grid; grid-template-columns: 48px minmax(0, 1fr) 18px; gap: 10px; align-items: center; min-width: 0; width: 100%; padding: 10px 12px; border: 1px solid #eee3d8; border-radius: 14px; background: #fffdfa; color: #5d5147; text-align: left; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.household-pet-link:hover { border-color: #e4b9a9; background: #fff9f3; transform: translateY(-1px); }
.household-pet-link:focus-visible { outline: 3px solid #e9a08b; outline-offset: 2px; }
.household-pet-avatar { display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 13px; background: #f4f2e9; }
.household-pet-avatar svg { display: block; width: 44px; height: 44px; overflow: visible; }
.household-pet-link-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.household-pet-link-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--round); font-size: 0.6875rem; font-weight: 900; }
.household-pet-link-copy small { color: #9b8e82; font-size: 0.5625rem; line-height: 1.45; overflow-wrap: anywhere; }
.household-pet-link-arrow { justify-self: end; color: #d58b75; font-size: 0.875rem; font-weight: 900; }
.household-network-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 7px; margin-top: 13px; }
.household-network-row { min-width: 0; display: flex; flex-direction: column; gap: 3px; border-top: 1px solid #f0e8df; padding: 10px 2px 4px; }
.household-network-row strong { color: #67584c; font-size: 0.625rem; }
.household-network-row small { color: #a3988e; font-size: 0.5625rem; line-height: 1.45; }
.household-timeline { display: flex; flex-direction: column; margin: 12px 0 16px; }
.household-timeline-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid #f0e8df; }
.household-timeline-item:first-child { border-top: 0; }
.household-timeline-item .journal-copy { min-width: 0; }
.household-timeline-item .journal-copy small { overflow-wrap: anywhere; line-height: 1.5; }
@media (max-width: 640px) {
  .household-overview { padding: 16px; }
  .household-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .household-stat { padding: 11px; }
  .household-pet-grid { grid-template-columns: 1fr; }
  .household-timeline-item { grid-template-columns: 30px minmax(0, 1fr); }
  .household-timeline-item .journal-time { grid-column: 2; }
}

/* Household tabs never duplicate the persistent room's pet selectors. */
.household-pet-grid { display: none !important; }
.inventory-item.is-household-only { opacity: .72; border-style: dashed; }
.inventory-item.is-favorite { box-shadow: inset 0 0 0 1px rgba(102, 166, 117, .34); }
.inventory-item.is-disliked { box-shadow: inset 0 0 0 1px rgba(226, 131, 116, .42); background: linear-gradient(135deg, rgba(255,235,231,.7), rgba(255,255,255,.8)); }

/* v0.8.14: real-time activities and sleepy creature presentation. */
.pet-activity-banner {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 14px 0 0;
  padding: 13px 15px;
  border: 1px solid #eadfd2;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffaf1, #f6f1fb 68%, #eef7ed);
  box-shadow: 0 6px 20px #8c76660a;
}
.pet-activity-banner[hidden] { display: none !important; }
.pet-activity-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #fff; font-size: 1.4375rem; }
.pet-activity-copy { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.pet-activity-copy strong { color: #5b4d42; font-family: var(--round); font-size: 0.75rem; font-weight: 900; }
.pet-activity-copy small { color: #968577; font-size: 0.625rem; line-height: 1.5; }
.pet-activity-remaining { color: #a96e5c; font-variant-numeric: tabular-nums; font-size: 0.75rem; font-weight: 850; white-space: nowrap; }
.pet-activity-track { height: 5px; margin-top: 5px; overflow: hidden; border-radius: 99px; background: #eae0d6; }
.pet-activity-track span { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e99b83, #d6b4ed, #8cc9a5); transform: scaleX(0); transform-origin: left center; transition: none; will-change: transform; }
.room-pet-entry { position: relative; }
.room-pet-prop {
  position: absolute; z-index: 6; right: -2%; bottom: 22%; width: clamp(27px, 4.2vw, 43px); height: auto;
  filter: drop-shadow(0 3px 4px #66514f22); pointer-events: none; transform-origin: 50% 85%;
  animation: propBob 1.1s ease-in-out infinite;
}
.room-pet-prop-bathroom { right: -4%; bottom: 23%; animation: propToilet 1.45s ease-in-out infinite; }
.room-pet-prop-play { right: -6%; bottom: 29%; animation: propToy 0.7s ease-in-out infinite; }
.room-pet-prop-feed, .room-pet-prop-treat { right: -5%; bottom: 18%; animation: propBowl 1.1s ease-in-out infinite; }
.room-pet-prop-bath { right: 0; bottom: 31%; animation: propBubbles 1.2s ease-in-out infinite; }
.room-pet-prop-clean { right: -3%; bottom: 21%; animation: propSweep 1s ease-in-out infinite; }
.room-pet-prop-sleep { right: 0; bottom: 51%; width: 31px; animation: propBreathe 2.6s ease-in-out infinite; }
.room-pet-prop-cuddle { right: -2%; bottom: 47%; width: 28px; animation: propHeart 1.2s ease-in-out infinite; }
.room-pet-prop-medicine { right: -3%; bottom: 24%; width: 30px; animation: propBowl 1.4s ease-in-out infinite; }
.room-pet-activity-badge { position: absolute; z-index: 3; top: 18%; right: 8%; display: grid; place-items: center; min-width: 27px; height: 27px; padding: 0 5px; border: 1px solid #fff; border-radius: 10px; background: #fffaf0; box-shadow: 0 4px 11px #6b55411c; font-size: 0.9375rem; pointer-events: none; animation: activityBadgeFloat 1.8s ease-in-out infinite; }
.room-pet-visual.is-sleeping .pet-bob { animation: sleepBob 4.4s ease-in-out infinite; }
.room-pet-visual.is-sleeping .eye-blink { animation: none !important; }
.room-pet-visual .sleep-eyes { opacity: 1; }
.room-pet-visual.activity-feed .pet-bob, .room-pet-visual.activity-treat .pet-bob { animation: eatingBob 1.3s ease-in-out infinite; }
.room-pet-visual.activity-play .pet-bob { animation: petBob .72s ease-in-out infinite; }
.room-pet-visual.activity-bathroom .pet-bob { animation: bathroomBob 1.4s ease-in-out infinite; }
.room-pet-visual.activity-clean .pet-bob { animation: propSweep .95s ease-in-out infinite; }
.room-pet-visual.activity-cuddle .pet-bob { animation: cuddleBob 2s ease-in-out infinite; }
.room-pet-visual.activity-bath .pet-bob { animation: bathBob 1.6s ease-in-out infinite; }
.room-pet-visual.activity-medicine .pet-bob { animation: cuddleBob 2.3s ease-in-out infinite; }
@keyframes sleepBob { 0%,100% { transform: translateY(1px) scaleY(.99); } 50% { transform: translateY(3px) scaleY(1.015); } }
@keyframes eatingBob { 0%,100% { transform: translateY(0) scale(1); } 25% { transform: translateY(1px) scaleY(.985); } 55% { transform: translateY(-1px) scale(1.008); } }
@keyframes cuddleBob { 0%,100% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-2px) rotate(-1deg); } 70% { transform: translateY(-1px) rotate(1deg); } }
@keyframes bathBob { 0%,100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-1px) rotate(-1deg); } 75% { transform: translateY(1px) rotate(1deg); } }
@keyframes bathroomBob { 0%,100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-2px) rotate(-1.2deg); } 65% { transform: translateY(1px) rotate(1deg); } }
@keyframes activityBadgeFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes propBob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(2deg); } }
@keyframes propToilet { 0%,100% { transform: translateY(0) scale(1); } 35% { transform: translateY(-2px) scale(1.03); } 70% { transform: translateY(1px) scale(.98); } }
@keyframes propToy { 0%,100% { transform: translate(0,0) rotate(-5deg); } 50% { transform: translate(-4px,-7px) rotate(13deg); } }
@keyframes propBowl { 0%,100% { transform: rotate(0) translateY(0); } 35% { transform: rotate(-4deg) translateY(-2px); } 70% { transform: rotate(4deg); } }
@keyframes propBubbles { 0%,100% { transform: translateY(2px) scale(.96); } 50% { transform: translateY(-6px) scale(1.04); } }
@keyframes propSweep { 0%,100% { transform: rotate(-9deg) translateX(0); } 50% { transform: rotate(9deg) translateX(-3px); } }
@keyframes propBreathe { 0%,100% { transform: translateY(0) scale(1); opacity:.85; } 50% { transform: translateY(-4px) scale(1.06); opacity:1; } }
@keyframes propHeart { 0%,100% { transform: translateY(0) scale(.94); } 50% { transform: translateY(-4px) scale(1.09); } }
@media (max-width: 560px) {
  .pet-activity-banner { grid-template-columns: 34px minmax(0, 1fr); gap: 9px; padding: 11px; }
  .pet-activity-icon { width: 34px; height: 34px; font-size: 1.25rem; }
  .pet-activity-remaining { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .pet-activity-track span { transition: none; }
  .room-pet-activity-badge, .room-pet-prop, .room-pet-visual.is-sleeping .pet-bob,
  .room-pet-visual.activity-feed .pet-bob, .room-pet-visual.activity-play .pet-bob,
  .room-pet-visual.activity-cuddle .pet-bob, .room-pet-visual.activity-bath .pet-bob,
  .room-pet-visual.activity-bathroom .pet-bob, .room-pet-visual.activity-clean .pet-bob, .room-pet-visual.activity-treat .pet-bob,
  .room-pet-visual.activity-medicine .pet-bob { animation: none !important; }
}


/* v0.8.16: actionable VAPID configuration diagnostics for Web Push */
.notification-settings-card{max-width:1180px;margin:16px auto 0;padding:clamp(17px,2.2vw,25px);background:linear-gradient(145deg,#fffdfa,#f8fbf4);border-color:#e2eadb}
.notification-settings-card .section-subtitle{margin:6px 0 0;max-width:620px;color:#9b8c7f;font-size:0.625rem;line-height:1.6}
.notification-preference-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.notification-preference{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:12px;border:1px solid #e9e5d9;border-radius:13px;background:#fffdf9;cursor:pointer;transition:border-color .15s ease,background .15s ease}
.notification-preference:has(input:checked){border-color:#b9d4bd;background:#f2f8f0}
.notification-preference input{flex:0 0 17px;width:17px;height:17px;margin:2px 0 0;accent-color:#6d9e77;cursor:pointer}
.notification-preference span{display:flex;flex-direction:column;gap:4px;min-width:0}
.notification-preference strong{color:#6c5b4e;font-size:0.6875rem;line-height:1.35}
.notification-preference small{color:#9b8d80;font-size:0.5625rem;line-height:1.5}
.notification-device-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:14px}
.notification-device-controls .button{min-height:38px}
.notification-device-controls .button:disabled{opacity:.48;cursor:not-allowed}
.notification-status{margin:12px 0 0;padding:10px 12px;border-radius:11px;background:#f5f2ea;color:#897a6d;font-size:0.625rem;line-height:1.55}
.notification-status.is-success{background:#edf7ed;color:#597c5e}
.notification-status.is-warning{background:#fff4e4;color:#9e7441}
@media(max-width:620px){.notification-settings-card{padding:16px 13px}.notification-preference-grid{grid-template-columns:1fr;gap:7px}.notification-preference{padding:10px}.notification-device-controls{align-items:stretch;flex-direction:column}.notification-device-controls .button{width:100%}}

/* Pocket Pals 0.8.17: granular notification preferences and Apple Watch pairing */
.notification-preference-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));align-items:stretch}
.watch-companion-card{max-width:1180px;margin:24px auto 0;padding:clamp(17px,2.2vw,25px);background:linear-gradient(145deg,#fffdfa,#f4f7fc);border-color:#dfe6ee}
.watch-pairing-controls{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}
.watch-pairing-result{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px 12px;padding:14px;border:1px dashed #a7b9d0;border-radius:14px;background:#f4f8ff;margin:12px 0}
.watch-pairing-result p{grid-column:1/-1;margin:0;font-size:0.75rem;color:#7b899b}
.watch-pairing-result strong{font-size:clamp(1.375rem,4vw,1.875rem);letter-spacing:.14em;color:#476d99;font-variant-numeric:tabular-nums}
.watch-pairing-result small{grid-column:1/-1;color:#8290a0}
.watch-pairing-result .button{grid-column:1/-1;justify-self:start}
@media(max-width:620px){.watch-companion-card{padding:16px 13px}.watch-pairing-controls{flex-direction:column;align-items:stretch}.watch-pairing-controls .button{width:100%}.watch-pairing-result strong{font-size:1.375rem}}

/* v0.8.21 Watch-to-web pairing: code is generated on the wrist and claimed here. */
.watch-pairing-connect{align-items:end}
.watch-code-label{display:grid;gap:7px;flex:1 1 220px;min-width:min(100%,220px);font-size:0.8125rem;font-weight:750;color:var(--ink,#35463c)}
.watch-code-label input{width:100%;min-height:46px;border:1px solid var(--line,#d8e4d8);border-radius:13px;background:var(--surface,#fff);padding:10px 13px;font:700 1.25rem/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.14em;text-transform:uppercase;color:var(--ink,#35463c);box-sizing:border-box}
.watch-code-label input:focus-visible{outline:3px solid #97cba2;outline-offset:2px}
.watch-pairing-help{font-size:0.75rem;line-height:1.55;color:var(--muted,#718075);max-width:70ch;margin:8px 0}
.watch-pairing-result strong{grid-column:1/-1;font-size:1rem;letter-spacing:0;color:var(--ink,#35463c)}
.watch-pairing-result small{grid-column:1/-1;line-height:1.5}
@media(max-width:620px){.watch-pairing-connect{align-items:stretch}.watch-code-label{min-width:100%}}


/* v0.9.6: compact, accessible Pocket Pals help and mutation guide. */
.help-page { display: grid; gap: 14px; }
.help-cheat-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .9fr); align-items: center; gap: 16px; border: 1px dashed #d7c9a8; background: linear-gradient(135deg, #fffaf0, #f8f5ff); }
.help-cheat-card h3 { margin: 2px 0 6px; color: #6d5947; }
.help-cheat-card p { margin: 0; color: #8b7a68; font-size: 0.75rem; line-height: 1.45; }
.help-cheat-form { display: grid; gap: 6px; min-width: 0; }
.help-cheat-form label { color: #7b6755; font-size: 0.6875rem; font-weight: 800; }
.help-cheat-controls { display: flex; gap: 7px; min-width: 0; }
.help-cheat-controls input { flex: 1 1 auto; width: 0; min-width: 0; padding: 9px 10px; border: 1px solid #ded6c5; border-radius: 10px; background: #fff; color: #5f5145; font:inherit; font-size: 0.75rem; }
.help-cheat-controls input:focus-visible { outline: 2px solid #b4c9a5; outline-offset: 2px; }
.help-cheat-controls .button { flex: 0 0 auto; min-height: 38px; padding: 8px 12px; }
.help-cheat-feedback { min-height: 1.4em; font-size: 0.625rem !important; }
@media(max-width:620px) { .help-cheat-card { grid-template-columns: 1fr; gap: 12px; } .help-cheat-controls .button { padding-inline: 9px; } }
.help-intro { padding: clamp(18px, 3vw, 28px); background: linear-gradient(135deg, #fff8ef, #f8f0fb 62%, #edf7f3); }
.help-intro h2 { margin: 2px 0 8px; font-size: clamp(1.375rem, 3.5vw, 1.875rem); }
.help-intro > p:last-child { max-width: 64ch; margin-bottom: 0; color: #72655e; line-height: 1.6; }
.help-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.help-card { padding: 16px; }
.help-card-icon { display: block; margin-bottom: 7px; font-size: 1.5rem; }
.help-card h3 { margin: 0 0 6px; font-size: 0.9375rem; }
.help-card p, .help-feature-list p, .help-section > p, .help-note { margin: 0; color: #75675e; font-size: 0.8125rem; line-height: 1.55; }
.help-section { padding: clamp(16px, 2.5vw, 22px); }
.help-section .section-heading { margin-bottom: 14px; }
.help-section h3 { margin: 0; }
.help-lineage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.help-lineage-grid > div { display: flex; flex-direction: column; gap: 3px; padding: 11px; border-radius: 12px; background: #fff8f2; border: 1px solid #f0e5dc; }
.help-lineage-grid strong { color: #5d5049; font-size: 0.75rem; }
.help-lineage-grid span { color: #8b7a70; font-size: 0.6875rem; }
.help-note { margin-top: 13px !important; padding: 10px 12px; border-left: 3px solid #e6b9a9; background: #fffaf6; border-radius: 0 9px 9px 0; }
.help-feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
.help-feature-list article { padding: 2px 0 8px; }
.help-feature-list h4 { margin: 0 0 4px; font-size: 0.8125rem; color: #5f5048; }
.help-feature-list p { font-size: 0.75rem; }
.help-genetics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.help-genetics-grid article { padding: 13px; background: #faf4ef; border-radius: 12px; }
.help-genetics-grid strong { display: block; margin-bottom: 5px; color: #73564d; font-size: 0.8125rem; }
.help-genetics-grid p { margin: 0; color: #75675e; font-size: 0.75rem; line-height: 1.5; }
.help-foldout { overflow: hidden; padding: 0; }
.help-foldout details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; color: #654f46; font-weight: 800; }
.help-foldout details > summary::-webkit-details-marker { display: none; }
.help-foldout details > summary::after { content: '+'; flex: 0 0 auto; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #f9eee8; color: #9e7264; font-size: 1.0625rem; }
.help-foldout details[open] > summary::after { content: '−'; }
.help-foldout details > summary small { margin-left: auto; color: #9a8a80; font-size: 0.6875rem; font-weight: 600; }
.help-trait-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; padding: 0 20px 18px; list-style: none; }
.help-trait-list li { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-top: 1px solid #f0e8e1; }
.help-trait-list strong { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: #5d5049; font-size: 0.75rem; }
.help-trait-list li > span { color: #7e7067; font-size: 0.75rem; line-height: 1.45; }
.help-dominance { display: inline-block; padding: 2px 6px; border-radius: 20px; background: #e9f3eb; color: #567b62; font-size: 0.5625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.help-dominance.recessive { background: #f1eafa; color: #82699c; }
.help-closing { margin: 0; padding: 4px 8px 12px; text-align: center; color: #8c7a70; font-size: 0.75rem; }
#tab-panel-help { opacity: 1 !important; }
@media (max-width: 600px) {
  .help-card-grid, .help-feature-list, .help-genetics-grid { grid-template-columns: minmax(0, 1fr); }
  .help-lineage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-trait-list { grid-template-columns: minmax(0, 1fr); }
  .help-foldout details > summary { padding: 14px; }
  .help-foldout details > summary small { font-size: 0.625rem; }
}

/* v0.10.9: PWA interaction parity with PoPa Watch. Scene feedback is anchored to the room viewport, not a moving pet card. */

.room-pet-visual.reaction-hello .pet-bob { animation: helloBounce .7s cubic-bezier(.2,.8,.2,1) 2; }
.room-pet-visual.reaction-cuddle .pet-bob { animation: cuddleBob .65s ease-in-out 2; }
.room-pet-visual.reaction-wake .pet-bob { animation: helloBounce .48s cubic-bezier(.2,.8,.2,1) 2; }
.room-pet-visual.reaction-feed .pet-bob, .room-pet-visual.reaction-treat .pet-bob { animation: eatingBob .45s ease-in-out 3; }
.room-pet-visual.reaction-play .pet-bob, .room-pet-visual.reaction-game .pet-bob { animation: petBob .38s ease-in-out 4; }
.room-pet-visual.reaction-bath .pet-bob { animation: bathBob .55s ease-in-out 3; }
.room-pet-visual.reaction-bathroom .pet-bob { animation: bathroomBob .55s ease-in-out 3; }
.room-pet-visual.reaction-medicine .pet-bob { animation: cuddleBob .8s ease-in-out 2; }
to { opacity: 1; translate: 0 0; } }
@keyframes helloBounce { 0%,100% { transform: translateY(0) scale(1); } 38% { transform: translateY(-8px) scale(1.035); } 70% { transform: translateY(-2px) scale(.995); } }
.home-overview-dialog { width: min(820px, calc(100% - 28px)); max-width: 820px; max-height: min(88svh, 850px); overflow: auto; padding: clamp(18px, 3vw, 28px); }
.home-overview-intro { margin: 4px 0 18px; color: #6d7168; font-size: 0.875rem; line-height: 1.6; }
.home-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 12px; }
.home-overview-card { min-width: 0; padding: 14px; border: 1px solid #e8e5d8; border-radius: 15px; background: #fffdf8; box-shadow: 0 2px 8px #75634b0a; }
.home-overview-card-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: #384c40; font-size: 0.875rem; line-height: 1.35; }
.home-overview-card-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 10px; background: #f4eee4; font-size: 1rem; }
.home-overview-rows { display: grid; gap: 7px; margin: 0; }
.home-overview-row { display: grid; grid-template-columns: minmax(85px, .8fr) minmax(0, 1.2fr); align-items: start; gap: 8px; padding-top: 7px; border-top: 1px solid #f0ede5; }
.home-overview-row dt { color: #7a7d73; font-size: 0.6875rem; line-height: 1.45; }
.home-overview-row dd { margin: 0; color: #35463b; font-size: 0.75rem; font-weight: 750; line-height: 1.45; overflow-wrap: anywhere; }
.home-overview-shortcuts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 13px; border-top: 1px solid #ebe6da; }
@media (max-width: 600px) {
  .home-overview-dialog { width: calc(100% - 18px); padding: 17px 13px; }
  .home-overview-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .home-overview-card { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .room-pet-visual[class*="reaction-"] .pet-bob { animation: none !important; }
}
@media (max-width: 720px) {
  .page-intro .intro-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .page-intro .intro-actions > .button { min-width: 0; width: 100%; min-height: 39px; padding: 9px 8px; flex: initial; white-space: normal; text-align: center; }
}

/* Pocket Pals v0.10.10: meaningful, time-based egg incubation and hatch ceremony */
.age-pill-button{font-family:inherit;font-weight:800;cursor:pointer;appearance:none;-webkit-appearance:none;user-select:none;transition:background .18s ease,border-color .18s ease}
.age-pill-button:hover{background:#ffeadc;border-color:#e6c6b7}
.egg-stage-line{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 0;color:#8d776b;font-size:0.625rem}
.egg-stage-line strong{font-family:var(--round);font-size:0.75rem;color:#6f5b50}
.egg-stage-line span{text-align:right;font-variant-numeric:tabular-nums}
.egg-hatch-button{margin-top:12px;min-height:48px}
.egg-hatch-button[hidden]{display:none!important}
.egg-hatch-button:disabled{background:#f0e5da;color:#9d897b;box-shadow:none;opacity:1;cursor:default}
.egg-ritual-grid .care-action.ritual-done:after{content:'↻ cooling down';color:#6d9479}
.egg-ritual-grid .care-action small{line-height:1.35}
.hatch-ceremony-dialog,.hatch-test-dialog{width:min(470px,calc(100% - 28px));max-height:min(90vh,760px);overflow:auto}
.hatch-ceremony-dialog{text-align:center;padding:clamp(18px,4vw,28px)}
.hatch-ceremony-dialog .modal-top{text-align:left}
.hatch-ceremony-scene{position:relative;display:grid;place-items:center;min-height:210px;margin:8px 0 16px;border-radius:22px;overflow:hidden;background:radial-gradient(circle at 50% 53%,#fff9dc 0,#ffeedf 36%,#f5e8f5 78%,#edf3e8 100%);isolation:isolate}
.hatch-ceremony-glow{position:absolute;width:130px;height:130px;border-radius:50%;background:#fff8d6;box-shadow:0 0 45px 24px #fff8d6aa;transform:scale(.8);opacity:.68;transition:transform .8s ease,opacity .8s ease}
.hatch-ceremony-art{position:relative;z-index:2;width:144px;height:144px;display:grid;place-items:center;transform-origin:50% 70%;transition:transform .38s cubic-bezier(.2,.8,.2,1),filter .38s ease}
.hatch-ceremony-art svg{width:100%;height:100%;overflow:visible}
.hatch-ceremony-spark{position:absolute;z-index:3;color:#e1a96a;font-size:1.5rem;opacity:0;transform:scale(.4) rotate(-20deg);transition:opacity .4s ease,transform .6s ease}
.hatch-spark-one{top:24%;left:24%}.hatch-spark-two{top:28%;right:20%;font-size:1.875rem}.hatch-spark-three{bottom:20%;right:28%;font-size:1.125rem}
.hatch-ceremony-scene[data-phase="waiting"] .hatch-ceremony-art{animation:eggWobble 2.6s ease-in-out infinite}
.hatch-ceremony-scene[data-phase="listening"] .hatch-ceremony-art{animation:eggWobble .6s ease-in-out infinite}
.hatch-ceremony-scene[data-phase="cracking"] .hatch-ceremony-art{transform:scale(1.05) rotate(3deg);filter:drop-shadow(0 0 14px #ffe3a8)}
.hatch-ceremony-scene[data-phase="cracking"] .hatch-ceremony-glow,.hatch-ceremony-scene[data-phase="opening"] .hatch-ceremony-glow,.hatch-ceremony-scene[data-phase="hatched"] .hatch-ceremony-glow{transform:scale(1.55);opacity:1}
.hatch-ceremony-scene[data-phase="opening"] .hatch-ceremony-art{transform:scale(1.16) translateY(-5px);filter:drop-shadow(0 0 15px #ffe6b8)}
.hatch-ceremony-scene[data-phase="opening"] .hatch-ceremony-spark,.hatch-ceremony-scene[data-phase="hatched"] .hatch-ceremony-spark{opacity:1;transform:scale(1) rotate(0)}
.hatch-ceremony-scene[data-phase="hatched"] .hatch-ceremony-art{transform:scale(1.08);animation:hatchArrival .7s cubic-bezier(.2,.8,.2,1) both}
.hatch-ceremony-dialog h2{margin:0 auto 8px;max-width:360px}
.hatch-ceremony-copy{color:#8e8076;font-size:0.75rem;line-height:1.75;margin:0 auto 18px;max-width:380px}
.hatch-test-dialog>p:not(.eyebrow){font-size:0.75rem;line-height:1.7;color:#8d8177}
.hatch-test-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:15px 0}
.hatch-test-actions .button{font-size:0.6875rem;padding:10px 8px;min-width:0}
.hatch-test-actions [data-hatch-test="hatch-test-ready"],.hatch-test-actions [data-hatch-test="hatch-test-reset"]{grid-column:1/-1}
@keyframes hatchArrival{0%{transform:scale(.72) translateY(12px);opacity:.25}65%{transform:scale(1.13) translateY(-7px);opacity:1}100%{transform:scale(1.08) translateY(0);opacity:1}}
@media(max-width:480px){.hatch-ceremony-scene{min-height:178px}.hatch-ceremony-art{width:120px;height:120px}.hatch-test-actions{grid-template-columns:1fr}.hatch-test-actions .button{grid-column:1}}
@media(prefers-reduced-motion:reduce){.hatch-ceremony-scene *{animation:none!important;transition:none!important}.hatch-ceremony-scene[data-phase="waiting"] .hatch-ceremony-art{animation:none}}

/* Four gentle egg check-ins: enough room on desktop, two-by-two on phones. */
.egg-ritual-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.hatch-ceremony-scene{background:radial-gradient(circle at 50% 53%,#fff9dc 0,#ffeedf 36%,#f5e8f5 78%,#edf3e8 100%),linear-gradient(160deg,var(--hatch-room-sky,#ffeedf),var(--hatch-room-floor,#f5e8f5))}
.hatch-nest-decoration{position:absolute;z-index:1;left:50%;bottom:21px;transform:translateX(-50%);font-size:3.5rem;opacity:.58;filter:drop-shadow(0 4px 3px #7b5c3220);transition:transform .6s ease,opacity .6s ease}
.hatch-ceremony-scene[data-phase="opening"] .hatch-nest-decoration,.hatch-ceremony-scene[data-phase="hatched"] .hatch-nest-decoration{transform:translateX(-50%) scale(1.08);opacity:.82}
@media(max-width:720px){.egg-ritual-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.egg-ritual-grid .care-action{min-height:82px}}
@media(prefers-reduced-motion:reduce){.hatch-nest-decoration{transition:none}}


/* v0.10.22 / build 72: Household adoption vouchers and monthly fertility limits. */
.quiet-hours-settings button:focus-visible,.household-care-quick-action:focus-visible,.room-layout-editor select:focus-visible{outline:3px solid #66538b;outline-offset:3px}
.quiet-hours-settings,.room-layout-editor{margin-top:15px;padding:14px;border:1px solid #eee4d8;border-radius:14px;background:#fffdf8}.quiet-hours-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:10px 0}.quiet-hour-slot{min-width:0;margin:0;padding:10px;border:1px solid #e8dfd4;border-radius:12px;background:#fff}.quiet-hour-slot legend{padding:0 5px;color:#8f7d6e;font-size:0.5625rem;font-weight:900}.quiet-hour-slot input[type=text],.quiet-hour-slot input[type=time]{width:100%;min-width:0;min-height:36px;padding:8px;border:1px solid #e2d6c9;border-radius:9px;background:#fff;color:#655448;font:700 0.6875rem/1.3 inherit}.quiet-hour-times{display:grid;grid-template-columns:1fr 1fr;gap:8px}.quiet-hour-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}.quiet-hour-enabled{display:flex;align-items:center;gap:5px;color:#786657;font-size:0.5625rem}.quiet-hour-enabled input{accent-color:#7e9b72}.quiet-hour-remove{padding:4px;color:#a85d5b}.quiet-hours-empty{margin:3px 0 10px;color:#968476;font-size:0.625rem;line-height:1.5}.quiet-hours-settings #quiet-hours-add{margin-top:2px}.household-care-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0}.household-care-action-card{min-width:0;padding:11px;border:1px solid #e9e2d8;border-radius:12px;background:#fffdfa}.household-care-action-heading{display:flex;flex-direction:column;gap:2px;margin-bottom:8px}.household-care-action-heading strong{font-size:0.6875rem;color:#665345}.household-care-action-heading small{font-size:0.5rem;color:#998778}.household-care-action-buttons{display:grid;grid-template-columns:1fr;gap:6px}.household-care-quick-action{display:flex;align-items:center;gap:7px;min-width:0;padding:8px;border:1px solid #e8e1d8;border-radius:9px;background:#fbf8f1;color:#6f5b4b;font:800 0.5625rem/1.4 inherit;text-align:left;cursor:pointer}.household-care-quick-action:disabled{opacity:.55;cursor:not-allowed}.household-care-quick-action span:last-child{overflow-wrap:anywhere}.room-decoration-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.room-decoration-slots select{width:100%;min-width:0;min-height:38px;padding:7px;border:1px solid #e5d9cc;border-radius:9px;background:#fff;color:#665447;font-size:0.625rem}.home-decoration-layer{position:absolute;inset:0;pointer-events:none;z-index:3}.placed-room-decor{position:absolute;display:grid;place-items:center;width:clamp(28px,5vw,52px);height:clamp(28px,5vw,52px);transform:translate(-50%,-50%);filter:drop-shadow(0 3px 4px #54433524)}.placed-room-decor img{width:100%;height:100%;object-fit:contain}.room-pet-visual.idle-curious{animation:palIdleCurious 1.5s ease-in-out}.room-pet-visual.idle-playful{animation:palIdlePlayful 1.4s ease-in-out}.room-pet-visual.idle-shy{animation:palIdleShy 1.5s ease-in-out}.room-pet-visual.idle-dreamy{animation:palIdleDreamy 1.6s ease-in-out}.room-pet-visual.idle-proud{animation:palIdleProud 1.5s ease-in-out}
@keyframes palIdleCurious{0%,100%{transform:translateY(0) rotate(0)}30%{transform:translateY(-4px) rotate(-2deg)}55%{transform:translateY(-2px) rotate(2deg)}}@keyframes palIdlePlayful{0%,100%{transform:translateY(0) scale(1)}25%{transform:translateY(-8px) scale(1.03)}50%{transform:translateY(0) scale(.98)}75%{transform:translateY(-3px) scale(1.01)}}@keyframes palIdleShy{0%,100%{transform:translateX(0) scale(1)}30%{transform:translateX(-3px) scale(.96)}55%{transform:translateX(3px) scale(.98)}}@keyframes palIdleDreamy{0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(-3px) rotate(2deg)}70%{transform:translateY(1px) rotate(-2deg)}}@keyframes palIdleProud{0%,100%{transform:translateY(0) scale(1)}40%{transform:translateY(-3px) scale(1.04)}65%{transform:translateY(0) scale(1)}}
@media(max-width:760px){.quiet-hours-list{grid-template-columns:1fr}.room-decoration-slots{grid-template-columns:repeat(2,minmax(0,1fr))}.household-care-actions{grid-template-columns:1fr}.placed-room-decor{width:30px;height:30px}}
@media(prefers-reduced-motion:reduce){.room-pet-visual.idle-curious,.room-pet-visual.idle-playful,.room-pet-visual.idle-shy,.room-pet-visual.idle-dreamy,.room-pet-visual.idle-proud{animation:none!important}}


/* Adoption Center: a soft landing for pals looking for a new household. */
.adoption-center-panel{width:100%;max-width:1180px;margin:16px auto 0;padding:clamp(17px,2.2vw,25px)}
.adoption-owner-controls{display:grid;gap:9px;margin:12px 0 20px;padding:15px;border:1px solid #eadfd2;border-radius:15px;background:linear-gradient(145deg,#fffaf1,#fffdf9)}
.adoption-owner-copy strong{display:block;color:#6b5749;font-size:0.75rem}.adoption-owner-copy p{margin:5px 0 2px;color:#9a8778;font-size:0.625rem;line-height:1.6}
#adoption-blurb{width:100%;resize:vertical;min-height:60px;border:1px solid #e4d7c8;border-radius:10px;padding:10px;font:inherit;font-size:0.6875rem;color:#6a5749;background:#fff}
.adoption-owner-actions{display:flex;flex-wrap:wrap;gap:8px}.adoption-owner-actions button{min-height:38px}
.adoption-center-subheading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.adoption-center-subheading h3{margin:0;font-size:0.8125rem;color:#6a5749}
.adoption-center-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,265px),1fr));gap:11px}
.adoption-listing-card{display:grid;grid-template-columns:65px minmax(0,1fr);gap:10px;padding:12px;border:1px solid #eee3d7;border-radius:15px;background:#fffdfa;box-shadow:0 3px 12px #8d6c4a0a}
.adoption-listing-avatar{width:65px;height:65px;display:grid;place-items:center;overflow:hidden;border-radius:18px;background:#f7efe4}.adoption-listing-avatar svg{width:64px;height:64px;display:block;overflow:visible}
.adoption-listing-copy{min-width:0;display:flex;flex-direction:column;gap:5px}.adoption-listing-copy strong{color:#6b5749;font-size:0.75rem;overflow-wrap:anywhere}.adoption-listing-copy small{color:#a08b7c;font-size:0.5625rem;line-height:1.5}.adoption-listing-copy p{margin:3px 0;color:#806c5d;font-size:0.625rem;line-height:1.5;overflow-wrap:anywhere}
.adoption-listing-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:7px;margin-top:2px}.adoption-listing-actions .button{flex:1 1 110px;min-height:36px;font-size:0.625rem;padding:7px 10px}
.adoption-listing-tag{justify-self:start;border-radius:999px;padding:4px 7px;background:#edf4e9;color:#66825a;font-size:0.5rem;font-weight:800;letter-spacing:.03em}
@media(max-width:760px){.adoption-center-panel{padding:16px 13px}.adoption-listing-card{grid-template-columns:55px minmax(0,1fr);padding:10px}.adoption-listing-avatar,.adoption-listing-avatar svg{width:54px;height:54px}.adoption-owner-actions{flex-direction:column}.adoption-owner-actions button{width:100%}}

/* v0.11.1 / build 74: shared multiplayer park. */
.park-card{width:100%;max-width:1180px;margin:16px auto 0;padding:clamp(16px,2.3vw,26px);color:#6b5749}.park-heading{margin-bottom:13px}.park-intro-strip{display:flex;align-items:center;flex-wrap:wrap;gap:7px 9px;padding:10px 12px;border:1px solid #e2eadc;border-radius:12px;background:#f6faf2;color:#728668;font-size:0.625rem;font-weight:750}.park-live-dot{width:8px;height:8px;border-radius:50%;background:#7eae74;box-shadow:0 0 0 3px #dfeeda;display:inline-block}.park-intro-separator{color:#c4cdbb}.park-controls{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:13px 0 18px;padding:15px;border:1px solid #eee2d4;border-radius:15px;background:linear-gradient(145deg,#fffaf1,#fffdf9)}.park-control-copy{min-width:0}.park-control-copy strong{font-size:0.75rem;color:#705a49}.park-control-copy p,.park-visitor-heading p{margin:5px 0 0;color:#9a8778;font-size:0.625rem;line-height:1.6}.park-control-buttons{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}.park-control-buttons button{min-height:37px}.park-visitor-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:19px 0 7px}.park-visitor-heading h3{margin:0;color:#6b5749;font-size:0.875rem}.park-visitor-heading p{margin-top:4px}.park-visitor-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,285px),1fr));gap:11px;margin-top:10px}.park-pet-card{min-width:0;padding:12px;border:1px solid #eee3d7;border-radius:16px;background:#fffdf9;box-shadow:0 3px 12px #8d6c4a0a;transition:border-color .18s ease,box-shadow .18s ease}.park-pet-card.is-your-household{background:linear-gradient(145deg,#fffdf9,#f9faf3)}.park-pet-main{display:flex;width:100%;align-items:center;gap:12px;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.park-pet-main:focus-visible{outline:3px solid #829b73;outline-offset:3px;border-radius:10px}.park-pet-avatar{flex:0 0 76px;width:76px;height:76px;display:grid;place-items:center;overflow:visible;border-radius:23px;background:#f8f1e6;isolation:isolate}.park-pet-avatar svg{width:76px;height:76px;display:block;overflow:visible;transition:filter .2s ease}.park-pet-avatar.has-seen-outline svg,.park-inspector-avatar.has-seen-outline svg{filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #fff) drop-shadow(0 0 3px rgba(255,255,255,.98)) drop-shadow(0 0 4px rgba(255,255,255,.8))}.park-pet-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:5px}.park-pet-copy strong{color:#6b5749;font-size:0.8125rem;overflow-wrap:anywhere}.park-pet-copy small{color:#a08b7c;font-size:0.5625rem;line-height:1.5}.park-pet-tags{display:flex;flex-wrap:wrap;gap:4px}.park-seen-tag,.park-favourite-tag,.park-own-tag{display:inline-flex;align-items:center;border-radius:999px;padding:4px 7px;font-size:0.5rem;font-weight:850;line-height:1.2}.park-seen-tag{border:1px solid #e7e7e7;background:#fff;color:#7a7a7a}.park-favourite-tag{background:#fff2cf;color:#9a7130}.park-own-tag{background:#eaf3e6;color:#6c8b5b}.park-activity-line{display:flex;align-items:center;gap:7px;min-width:0;margin:11px 0 9px;padding:8px 9px;border-radius:11px;background:#f7f5ee;color:#7d6958}.park-activity-icon{flex:0 0 28px;width:28px;height:28px;display:grid;place-items:center}.park-activity-icon svg{display:block;width:28px;height:28px}.park-activity-label{flex:1;min-width:0;font-size:0.625rem;font-weight:800;line-height:1.35}.park-activity-remaining{flex:0 0 auto;color:#a08b7c;font-size:0.5625rem;font-variant-numeric:tabular-nums;white-space:nowrap}.park-pet-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px}.park-compliment-category{flex:1 1 125px;min-width:0;min-height:34px;padding:7px;border:1px solid #e6dacb;border-radius:9px;background:#fff;color:#806b59;font:700 0.625rem/1.3 inherit}.park-pet-actions .button{min-height:34px}.park-pet-actions .button:disabled{opacity:.5}.park-own-hint{color:#9b8878;font-size:0.5625rem;font-weight:800}.park-inspector{margin-top:18px;padding:16px;border:1px solid #e6ddf0;border-radius:17px;background:linear-gradient(145deg,#fdfaff,#fffdf8)}.park-inspector-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:11px}.park-inspector-top h3{margin:0;color:#695475;font-size:1rem}.park-inspector-top .eyebrow{margin:0 0 4px}.park-inspector-body{display:grid;grid-template-columns:1fr 1fr;gap:12px}.park-inspector-hero{grid-column:1/-1;display:flex;align-items:center;gap:14px;padding:12px;border-radius:13px;background:#fff}.park-inspector-avatar{flex:0 0 92px;width:92px;height:92px;display:grid;place-items:center;border-radius:25px;background:#f7efe4}.park-inspector-avatar svg{width:92px;height:92px;overflow:visible}.park-inspector-intro{min-width:0}.park-inspector-intro h4{margin:0 0 4px;color:#6b5749;font-size:1.125rem;overflow-wrap:anywhere}.park-inspector-intro p{margin:4px 0;color:#8f7c6d;font-size:0.625rem;line-height:1.5}.park-inspector-favourite{font-weight:800;color:#95702d!important}.park-inspector-muted{color:#a08b7c!important}.park-inspector-section{min-width:0;padding:12px;border:1px solid #eee4d9;border-radius:12px;background:#fffdf9}.park-inspector-section-full{grid-column:1/-1}.park-inspector-section h5{margin:0 0 9px;color:#765e4d;font-size:0.6875rem}.park-genetic-tags{display:flex;flex-wrap:wrap;gap:6px}.park-genetic-tags span{display:inline-flex;padding:5px 8px;border:1px solid #e8e0f0;border-radius:999px;background:#f7f2fc;color:#7d668a;font-size:0.5625rem;font-weight:800}.park-genetic-tags p,.park-family-list p{margin:0;color:#a08b7c;font-size:0.625rem;line-height:1.5}.park-genotype-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.park-genotype-row{display:flex;justify-content:space-between;gap:5px;min-width:0;padding:6px 7px;border-radius:8px;background:#f8f4ed;font-size:0.5625rem}.park-genotype-row span{color:#8d7968;overflow-wrap:anywhere}.park-genotype-row strong{color:#6c5848;font-variant-numeric:tabular-nums}.park-full-genome{margin-top:9px;padding-top:8px;border-top:1px solid #eee3d7}.park-full-genome summary{color:#877164;font-size:0.625rem;font-weight:800;cursor:pointer}.park-full-genome .park-genotype-grid{margin-top:8px}.park-family-list{display:grid;gap:7px}.park-family-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px;border-radius:8px;background:#f7f3ed;color:#856f5d;font-size:0.625rem}.park-family-row>span{min-width:0;overflow-wrap:anywhere}.park-footer-note{margin:14px 0 0;color:#a08b7c;font-size:0.625rem;line-height:1.65}.park-visitor-list .social-empty{grid-column:1/-1}.park-card .economy-feedback{margin:10px 0}.park-card [data-park-owner-list]{margin-top:6px}
@media(max-width:760px){.park-card{padding:15px 12px}.park-controls{align-items:stretch;flex-direction:column}.park-control-buttons{justify-content:stretch}.park-control-buttons button{flex:1 1 140px}.park-intro-strip{font-size:0.5625rem}.park-body{grid-template-columns:1fr}.park-inspector-body{grid-template-columns:1fr}.park-inspector-hero{grid-column:1}.park-inspector-avatar,.park-inspector-avatar svg{width:76px;height:76px;flex-basis:76px}.park-genotype-grid{grid-template-columns:1fr}.park-pet-avatar,.park-pet-avatar svg{width:68px;height:68px}.park-pet-avatar{flex-basis:68px}.park-pet-card{padding:10px}.park-visitor-list{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.park-pet-avatar svg{transition:none}.park-pet-card{transition:none}}

/* Multiplayer Phase 2: persistent Park Journal and saved discoveries. */
.park-journal{margin-top:22px;padding-top:5px;border-top:1px solid #eee4d8}.park-journal-heading{margin:16px 0 10px}.park-journal-heading h3{font-size:0.9375rem}.park-journal-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.park-journal-shelf{min-width:0;padding:12px;border:1px solid #ece2d6;border-radius:14px;background:linear-gradient(145deg,#fffdf9,#fbfaf5)}.park-journal-shelf-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:9px}.park-journal-shelf-heading h4{margin:0;color:#735d4d;font-size:0.6875rem}.park-journal-shelf-heading>span{color:#a08b7c;font-size:0.5rem}.park-encounter-list{display:grid;gap:8px}.park-encounter-card{min-width:0;padding:8px;border:1px solid #eee5dc;border-radius:11px;background:#fff;box-shadow:0 2px 8px #8d6c4a08}.park-encounter-main{display:flex;align-items:center;gap:9px;width:100%;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.park-encounter-main:focus-visible{outline:2px solid #829b73;outline-offset:2px;border-radius:8px}.park-encounter-avatar{display:grid;place-items:center;flex:0 0 46px;width:46px;height:46px;border-radius:14px;background:#f7f0e7;isolation:isolate}.park-encounter-avatar svg{width:46px;height:46px;overflow:visible;filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #fff) drop-shadow(0 0 3px rgba(255,255,255,.98))}.park-encounter-copy{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.park-encounter-copy strong{font-size:0.6875rem;color:#6b5749;overflow-wrap:anywhere}.park-encounter-copy small{font-size:0.5rem;line-height:1.4;color:#9a8778}.park-encounter-activity{white-space:normal}.park-encounter-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:7px 0 0 55px}.park-encounter-open{font-size:0.5625rem;font-weight:800;color:#9c8b7c}.park-encounter-actions .button{min-height:29px;padding:5px 8px;font-size:0.5625rem}.park-saved-tag,.park-present-tag{display:inline-flex;align-items:center;border-radius:999px;padding:4px 7px;font-size:0.5rem;font-weight:850;line-height:1.2}.park-saved-tag{background:#f2eafa;color:#80628e}.park-present-tag{background:#e8f5e6;color:#5b8b54}.park-profile-presence{display:inline-flex;margin-top:5px!important;padding:5px 8px;border:1px solid #ece2d6;border-radius:8px;background:#faf7f1;color:#8f7c6d!important}.park-profile-presence.is-present{border-color:#dcebd7;background:#f3faf0;color:#64865c!important}.park-profile-save{margin-top:5px}.park-journal .social-empty{margin:2px 0;font-size:0.5625rem;line-height:1.55}@media(max-width:760px){.park-journal-columns{grid-template-columns:1fr}.park-encounter-card{padding:9px}.park-encounter-avatar,.park-encounter-avatar svg{width:50px;height:50px;flex-basis:50px}.park-encounter-actions{margin-left:59px}}


/* v0.11.2 / build 75: SPP-inspired storybook park vignettes and activity-led character motion. */
.park-pet-card{padding:10px;border-radius:19px;background:linear-gradient(155deg,#fffefa,#fff9f0);box-shadow:0 4px 15px rgba(109,83,58,.07)}
.park-pet-card.is-your-household{background:linear-gradient(155deg,#fffefa,#f4f8ec)}
.park-pet-main{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:9px;border-radius:12px}
.park-pet-scene{--park-sky:#e9f4fa;--park-hill:#c7dfa9;--park-hill-back:#a6cd94;position:relative;isolation:isolate;display:block;width:100%;height:126px;overflow:hidden;border:1px solid rgba(118,96,74,.12);border-radius:13px;background:linear-gradient(180deg,var(--park-sky) 0%,#fff7df 100%);box-shadow:inset 0 -3px 0 rgba(255,255,255,.55)}
.park-pet-scene::before,.park-pet-scene::after{position:absolute;content:"";pointer-events:none;border-radius:50%;z-index:0}
.park-pet-scene::before{width:84%;height:78%;left:-17%;bottom:-48%;background:var(--park-hill)}
.park-pet-scene::after{width:82%;height:85%;right:-21%;bottom:-57%;background:var(--park-hill-back)}
.park-scene-sandbox{--park-sky:#f7e6cd;--park-hill:#e9c58e;--park-hill-back:#d6a76e}
.park-scene-slide{--park-sky:#dff1fb;--park-hill:#bfe2bc;--park-hill-back:#96caa9}
.park-scene-carousel{--park-sky:#f8e2ed;--park-hill:#e9c5cb;--park-hill-back:#d4a9c1}
.park-scene-flowers{--park-sky:#fff0e4;--park-hill:#c6dda4;--park-hill-back:#9fc987}
.park-scene-butterflies{--park-sky:#e8e6fb;--park-hill:#cadcb8;--park-hill-back:#9cc8a9}
.park-scene-fountain{--park-sky:#dff3f5;--park-hill:#b9dfca;--park-hill-back:#8fc8bd}
.park-scene-shade{--park-sky:#e4f0dc;--park-hill:#b7d6a0;--park-hill-back:#8fbd88}
.park-scene-friends{--park-sky:#fbe7dc;--park-hill:#d1dfaa;--park-hill-back:#a9ca91}
.park-scene-sun{position:absolute;z-index:0;top:13px;right:17%;width:24px;height:24px;border-radius:50%;background:#fff1b5;box-shadow:0 0 0 5px rgba(255,241,181,.25)}
.park-scene-cloud{position:absolute;z-index:0;top:25px;left:14%;width:34px;height:12px;border-radius:99px;background:rgba(255,255,255,.82);animation:parkCloudDrift 8s ease-in-out infinite}
.park-scene-cloud::before,.park-scene-cloud::after{position:absolute;content:"";bottom:2px;border-radius:50%;background:inherit}
.park-scene-cloud::before{left:6px;width:15px;height:15px}.park-scene-cloud::after{right:5px;width:11px;height:11px}
.park-scene-sparkle{position:absolute;z-index:1;left:12%;top:49px;color:rgba(255,255,255,.95);font-size:0.8125rem;text-shadow:0 1px 5px rgba(148,132,107,.16);animation:parkSparkle 3.4s ease-in-out infinite}
.park-scene-prop{position:absolute;z-index:2;right:10%;bottom:12px;display:grid;place-items:center;width:57px;height:57px;border:1px solid rgba(255,255,255,.72);border-radius:19px;background:rgba(255,255,255,.56);box-shadow:0 4px 10px rgba(94,87,67,.08);transform-origin:center bottom;animation:parkPropFloat 3.2s ease-in-out infinite}
.park-scene-prop svg{display:block;width:50px;height:50px;filter:drop-shadow(0 2px 1px rgba(102,81,62,.08))}
.park-pet-scene .park-pet-avatar{position:absolute;z-index:3;left:37%;bottom:-5px;display:grid;place-items:center;width:100px;height:100px;flex:none;overflow:visible;border-radius:0;background:transparent;transform-origin:center bottom;isolation:isolate}
.park-pet-scene .park-pet-avatar svg{display:block;width:100px;height:100px;overflow:visible;transform-origin:center bottom;filter:drop-shadow(0 4px 2px rgba(99,76,54,.12));animation:parkIdleFloat 3.2s ease-in-out infinite}
.park-pet-scene .park-pet-avatar.has-seen-outline svg{filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #fff) drop-shadow(0 0 3px rgba(255,255,255,.98)) drop-shadow(0 0 4px rgba(255,255,255,.8)) drop-shadow(0 4px 2px rgba(99,76,54,.12))}
.park-scene-sandbox .park-pet-avatar svg{animation:parkSandboxHop 2.7s ease-in-out infinite}
.park-scene-slide .park-pet-avatar svg{animation:parkSlideRide 2.2s ease-in-out infinite}
.park-scene-carousel .park-pet-avatar svg{animation:parkCarouselSway 3.4s ease-in-out infinite}
.park-scene-flowers .park-pet-avatar svg{animation:parkFlowerNose 3.5s ease-in-out infinite}
.park-scene-butterflies .park-pet-avatar svg{animation:parkButterflyChase 1.9s ease-in-out infinite}
.park-scene-fountain .park-pet-avatar svg{animation:parkFountainSip 2.9s ease-in-out infinite}
.park-scene-shade .park-pet-avatar svg{animation:parkShadeBreathe 4s ease-in-out infinite}
.park-scene-friends .park-pet-avatar svg{animation:parkFriendHello 2.6s ease-in-out infinite}
.park-scene-slide .park-scene-prop{animation:parkSlideProp 2.2s ease-in-out infinite}
.park-scene-carousel .park-scene-prop{animation:parkCarouselProp 5s linear infinite}
.park-scene-butterflies .park-scene-prop{animation:parkButterflyProp 1.2s ease-in-out infinite}
.park-scene-fountain .park-scene-prop{animation:parkFountainProp 2.1s ease-in-out infinite}
.park-scene-friends .park-scene-prop{animation:parkFriendProp 2.6s ease-in-out infinite}
.park-pet-copy{padding:0 3px 2px}
.park-pet-copy strong{font-size:0.875rem;letter-spacing:-.01em}
.park-pet-copy small{font-size:0.625rem}
.park-activity-line{border:1px solid rgba(128,105,80,.07);background:linear-gradient(110deg,#faf4e9,#f5f7ed)}
.park-activity-icon{filter:drop-shadow(0 2px 1px rgba(106,84,62,.09))}
@keyframes parkIdleFloat{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-3px) rotate(.5deg)}}
@keyframes parkSandboxHop{0%,100%{transform:translateY(0) rotate(0) scale(1)}25%{transform:translateY(-3px) rotate(-2deg) scale(1.02)}55%{transform:translateY(0) rotate(1deg) scale(.99)}75%{transform:translateY(-1px) rotate(0) scale(1.01)}}
@keyframes parkSlideRide{0%,100%{transform:translate(0,0) rotate(0)}30%{transform:translate(4px,-3px) rotate(2deg)}68%{transform:translate(-2px,1px) rotate(-1deg)}}
@keyframes parkCarouselSway{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-2px) rotate(1.7deg)}}
@keyframes parkFlowerNose{0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(1px) rotate(-3deg)}68%{transform:translateY(-2px) rotate(2deg)}}
@keyframes parkButterflyChase{0%,100%{transform:translate(0,0) rotate(0)}25%{transform:translate(2px,-4px) rotate(2deg)}55%{transform:translate(-3px,-1px) rotate(-2deg)}80%{transform:translate(1px,-3px) rotate(1deg)}}
@keyframes parkFountainSip{0%,100%{transform:translateY(0) rotate(0)}30%{transform:translateY(1px) rotate(-2deg)}55%{transform:translateY(-1px) rotate(1deg)}75%{transform:translateY(0) rotate(0)}}
@keyframes parkShadeBreathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(1px) scale(.99)}}
@keyframes parkFriendHello{0%,100%{transform:translateY(0) rotate(0)}26%{transform:translateY(-2px) rotate(2deg)}52%{transform:translateY(0) rotate(-1deg)}78%{transform:translateY(-1px) rotate(1deg)}}
@keyframes parkPropFloat{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-3px) rotate(1deg)}}
@keyframes parkSlideProp{0%,100%{transform:translate(0,0) rotate(-1deg)}50%{transform:translate(-2px,-3px) rotate(2deg)}}
@keyframes parkCarouselProp{from{transform:rotate(0)}to{transform:rotate(360deg)}}
@keyframes parkButterflyProp{0%,100%{transform:translate(0,0) rotate(-4deg)}50%{transform:translate(-4px,-7px) rotate(6deg)}}
@keyframes parkFountainProp{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-2px) scale(1.03)}}
@keyframes parkFriendProp{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-2px) rotate(2deg)}}
@keyframes parkCloudDrift{0%,100%{transform:translateX(0)}50%{transform:translateX(7px)}}
@keyframes parkSparkle{0%,100%{opacity:.4;transform:scale(.85) rotate(0)}50%{opacity:1;transform:scale(1.1) rotate(15deg)}}
@media(max-width:760px){.park-pet-scene{height:132px}.park-pet-scene .park-pet-avatar{left:35%;width:98px;height:98px}.park-pet-scene .park-pet-avatar svg{width:98px;height:98px}.park-scene-prop{right:9%;width:54px;height:54px}}
@media(prefers-reduced-motion:reduce){.park-pet-scene .park-pet-avatar svg,.park-scene-prop,.park-scene-cloud,.park-scene-sparkle{animation:none!important}.park-pet-card{transition:none}}


/* v0.11.3 build 76: expressive, persistent household decorating */
.room-layout-editor{background:linear-gradient(145deg,#fffaf4,#f5f8f0);}
.decorator-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 10px;}
.decorator-actions .button{min-height:36px;padding:8px 12px;font-size:0.625rem;}
.decor-editor-feedback{min-height:34px;margin:8px 0 12px;padding:9px 11px;border-radius:11px;background:#f0f5e9;color:#728164;font-size:0.625rem;line-height:1.55;}
.home-decor-catalog{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;}
.home-decor-card{display:flex;min-width:0;min-height:112px;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:10px 7px;border:1px solid #eadfd1;border-radius:14px;background:#fffdfa;color:#705d50;text-align:center;transition:transform .14s ease,border-color .14s ease,background .14s ease,box-shadow .14s ease;}
.home-decor-card:hover:not(:disabled){transform:translateY(-2px);border-color:#c2d8b6;box-shadow:0 6px 16px #70604b12;}
.home-decor-card.is-selected{background:#eff7e9;border-color:#90b87e;box-shadow:0 0 0 2px #90b87e35;}
.home-decor-card img{display:block;width:48px;height:48px;object-fit:contain;filter:drop-shadow(0 3px 3px #66514f13);}
.home-decor-card strong{font-size:0.625rem;line-height:1.25;overflow-wrap:anywhere;}
.home-decor-card small{font-size:0.5rem;color:#a18d7c;line-height:1.3;}
#world-scene.is-decorating .home-decoration-layer{pointer-events:auto;touch-action:none;}
.home-decor-card{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;}
.home-decor-card:active{cursor:grabbing;}
.placed-room-decor{cursor:default;touch-action:none;}
#world-scene.is-decorating .placed-room-decor{cursor:grab;}
#world-scene.is-decorating .placed-room-decor.is-user-dragging{cursor:grabbing;opacity:.88;filter:drop-shadow(0 9px 10px #51463845);}
.home-decor-drag-ghost{position:fixed;z-index:99999;pointer-events:none;padding:9px 13px;border:1px solid #c9d9bd;border-radius:14px;background:#fffdf5ee;box-shadow:0 9px 28px #5146382c;color:#625344;font-size:0.75rem;font-weight:850;white-space:nowrap;transform:translate(-4px,-4px);}
#world-scene.is-decorating #home-decoration-layer{cursor:crosshair;}
#world-scene.is-decorating .home-decoration-layer:empty::after{content:'Drop decorations anywhere on the floor';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:8px 12px;border:1px dashed #8ba777;border-radius:999px;background:#fffdf3a8;color:#7b936a;font-size:0.6875rem;font-weight:800;pointer-events:none;}

#world-scene.is-decorating .placed-room-decor{appearance:none;-webkit-appearance:none;border:1.5px dashed #7b9d6c;background:#fffdf7d9;box-shadow:0 0 0 3px #fffdf766,0 4px 10px #65514020;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;transition:transform .14s ease,background .14s ease,border-color .14s ease;}
#world-scene.is-decorating .placed-room-decor:hover,#world-scene.is-decorating .placed-room-decor:focus-visible{z-index:2;transform:translate(-50%,-50%) scale(1.12);border-color:#d58d79;background:#fffdf7;outline:2px solid #d58d79;outline-offset:2px;}
#world-scene.is-decorating .placed-room-decor.is-empty{border-style:dashed;background:#fffcf3b8;box-shadow:0 0 0 2px #fffdf754;}
.decor-placement-plus{display:grid;place-items:center;color:#8aa279;font-size:1.5rem;font-weight:500;line-height:1;}
.placed-room-decor img{pointer-events:none;}
@media(max-width:760px){.home-isometric-stage .placed-room-decor{width:52px;height:52px;}.home-decor-catalog{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;}.home-decor-card{min-height:100px;padding:8px 5px;}.home-decor-card img{width:41px;height:41px;}.decorator-actions .button{flex:1 1 auto;}}
@media(max-width:420px){.home-decor-catalog{grid-template-columns:repeat(2,minmax(0,1fr));}.home-decor-card{min-height:94px;}}
@media(prefers-reduced-motion:reduce){.home-decor-card,.placed-room-decor{transition:none!important;}}


/* v0.11.4 build 77: Nature & Nurture, trait-led routines and home moments */
.park-scene-climbing .park-scene-prop{animation:parkClimbProp 2.7s ease-in-out infinite;}
.park-scene-climbing .park-pet-avatar svg{animation:parkClimbPal 2.7s ease-in-out infinite;transform-origin:50% 85%;}
.park-scene-moonwatch .park-scene-prop{animation:parkMoonDrift 4.8s ease-in-out infinite;}
.park-scene-moonwatch .park-pet-avatar svg{animation:parkMoonPal 4.8s ease-in-out infinite;transform-origin:50% 86%;}
@keyframes parkClimbPal{0%,100%{transform:translateY(0) rotate(-1deg)}25%{transform:translate(1px,-3px) rotate(2deg)}55%{transform:translate(-1px,-5px) rotate(-1deg)}80%{transform:translate(1px,-2px) rotate(1deg)}}
@keyframes parkClimbProp{0%,100%{transform:translateY(0)}45%{transform:translateY(-3px)}}
@keyframes parkFieldExplore{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-3px) rotate(1deg)}}
@keyframes parkHappyZoomies{0%,100%{transform:translateX(-1px) rotate(-2deg)}50%{transform:translateX(2px) rotate(2deg)}}
@keyframes parkGrassRoll{0%,100%{transform:rotate(-2deg) translateY(0)}50%{transform:rotate(3deg) translateY(2px)}}
@keyframes parkMoonPal{0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(-2px) rotate(1deg)}70%{transform:translateY(1px) rotate(-1deg)}}
@keyframes parkMoonDrift{0%,100%{transform:translate(0,0) rotate(-2deg)}50%{transform:translate(-3px,-4px) rotate(3deg)}}
.park-nature-hints{display:grid;gap:8px;}
.park-nature-hint{display:flex;gap:9px;align-items:flex-start;padding:9px;border-radius:10px;background:#f8f5ef;}
.park-nature-hint-icon{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:10px;background:#fff9eb;font-size:1rem;}
.park-nature-hint-copy{min-width:0;}
.park-nature-hint-copy strong{display:block;color:#78624f;font-size:0.625rem;}
.park-nature-hint-copy p{margin:4px 0 0;color:#978576;font-size:0.5625rem;line-height:1.5;}







.home-moment-copy-wrap h3{margin:0;color:#6c5a48;font-size:0.75rem;line-height:1.4;}


@keyframes homeMomentTwinkle{0%,100%{opacity:.45;transform:scale(.92) rotate(-8deg)}50%{opacity:1;transform:scale(1.06) rotate(8deg)}}
.placed-room-decor.is-home-moment{z-index:1;filter:drop-shadow(0 0 6px #d8ccf7);}
.placed-room-decor.is-home-moment img{animation:homeMomentBob 3.5s ease-in-out infinite;}
@keyframes homeMomentBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
.room-pet-home-moment-badge{position:absolute;z-index:4;top:11px;right:1px;display:grid;place-items:center;min-width:29px;height:29px;padding:2px 4px;border:2px solid #fff;background:#f1f7e8;border-radius:11px;box-shadow:0 3px 9px #66513f25;font-size:0.9375rem;pointer-events:none;}
.room-pet-curiosity-badge{position:absolute;z-index:4;top:44px;right:1px;display:grid;place-items:center;min-width:29px;height:29px;padding:2px 4px;border:2px solid #fff;background:#fff0ca;color:#816c4e;border-radius:11px;box-shadow:0 3px 9px #66513f25;font-size:0.9375rem;pointer-events:none;animation:homeCuriosityPulse 2.2s ease-in-out infinite;}
@keyframes homeCuriosityPulse{0%,100%{transform:translateY(0) rotate(0deg)}50%{transform:translateY(-3px) rotate(3deg)}}
@media (prefers-reduced-motion:reduce){.room-pet-curiosity-badge{animation:none}}
@media(max-width:760px){.park-nature-hint{gap:7px;padding:8px;}}
@media(prefers-reduced-motion:reduce){.park-scene-climbing .park-scene-prop,.park-scene-climbing .park-pet-avatar svg,.park-scene-moonwatch .park-scene-prop,.park-scene-moonwatch .park-pet-avatar svg,.home-moment-spark,.placed-room-decor.is-home-moment img{animation:none!important;}}


/* Help refresh retained from v0.11.5 build 78 */
.help-page { gap: 12px; }
.help-intro h2 { font-size: clamp(1.625rem, 4vw, 2.125rem); line-height: 1.15; }
.help-intro > p:last-child { font-size: 1.0625rem; line-height: 1.55; }
.help-card { padding: 18px; }
.help-card h3 { font-size: 1.125rem; line-height: 1.25; }
.help-card p, .help-feature-list p, .help-note { font-size: 1rem; line-height: 1.6; }
.help-card-icon { font-size: 1.75rem; }
.help-foldout details > summary { min-height: 58px; padding: 18px 20px; font-size: 1rem; line-height: 1.35; }
.help-foldout details > summary small { font-size: 0.8125rem; line-height: 1.35; }
.help-expanded-content { padding: 0 20px 20px; }
.help-expanded-content > p:first-child { margin-top: 0; font-size: 1rem; line-height: 1.65; }
.help-lineage-grid strong { font-size: 0.9375rem; }
.help-lineage-grid span { font-size: 0.875rem; }
.help-feature-list { gap: 14px 24px; }
.help-feature-list h4, .help-nerd-content h4 { margin: 0 0 5px; font-size: 1rem; }
.help-feature-list p { font-size: 0.9375rem; }
.help-genetics-grid strong { font-size: 0.9375rem; }
.help-genetics-grid p { font-size: 0.9375rem; line-height: 1.6; }
.help-trait-list { padding: 0 20px 18px; }
.help-trait-list li { padding: 12px 0; }
.help-trait-list strong { font-size: 0.9375rem; }
.help-trait-list li > span { font-size: 0.9375rem; line-height: 1.55; }
.help-dominance { font-size: 0.6875rem; }
.help-nerd-content { display: grid; gap: 14px; }
.help-nerd-content article { padding-bottom: 12px; border-bottom: 1px solid #f0e8e1; }
.help-nerd-content article:last-child { padding-bottom: 0; border-bottom: 0; }
.help-nerd-content p { margin: 0; color: #75675e; font-size: 0.9375rem; line-height: 1.65; }
.help-closing { font-size: 0.9375rem; line-height: 1.5; }
.help-foldout details > summary:focus-visible { outline: 3px solid #7a9c83; outline-offset: -3px; }
@media (max-width: 720px) {
  .help-card-grid, .help-feature-list, .help-genetics-grid { grid-template-columns: minmax(0, 1fr); }
  .help-foldout details > summary { align-items: flex-start; padding: 17px 16px; }
  .help-foldout details > summary small { max-width: 42%; text-align: right; }
  .help-expanded-content { padding: 0 16px 18px; }
  .help-trait-list { padding: 0 16px 16px; }
}


/* Phase 4 multiplayer moments, discovery garden, and read-only friend homes */
.park-phase4-section{margin-top:18px;padding:15px;border:1px solid #e9dfd3;border-radius:18px;background:linear-gradient(145deg,#fffdf8,#f7faf2)}
.park-phase4-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.park-phase4-heading h3{margin:0;color:#6f5947;font-size:0.9375rem;letter-spacing:-.02em}
.park-phase4-heading p{margin:5px 0 0;color:#998677;font-size:0.6875rem;line-height:1.5}
.park-shared-moments{display:grid;grid-template-columns:repeat(auto-fit,minmax(255px,1fr));gap:10px}
.park-shared-moment-card{display:grid;grid-template-columns:70px 35px minmax(0,1fr);gap:8px;align-items:center;padding:11px;border:1px solid #eadfd1;border-radius:14px;background:#fff;box-shadow:0 3px 11px #8d6c4a0b}
.park-shared-pair{display:flex;align-items:center;justify-content:center;min-width:0}
.park-story-avatar{display:grid;place-items:center;width:45px;height:45px;flex:0 0 45px;border-radius:13px;background:#faf5e9;isolation:isolate}
.park-story-avatar svg{display:block;width:45px;height:45px;overflow:visible;filter:drop-shadow(0 0 2px #fff)}
.park-shared-pair .park-story-avatar+.park-story-avatar{margin-left:-12px;transform:translateY(5px)}
.park-shared-activity-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#f5f0e6}
.park-shared-activity-icon svg{width:29px;height:29px}
.park-shared-moment-copy{min-width:0}
.park-shared-moment-copy strong{display:block;color:#725a47;font-size:0.6875rem}
.park-shared-moment-copy p{margin:4px 0;color:#8c796b;font-size:0.625rem;line-height:1.45}
.park-shared-moment-copy small{color:#b09b88;font-size:0.5625rem}
.park-shared-inspect-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}
.park-shared-inspect-actions .button{min-height:29px;padding:5px 9px;font-size:0.625rem}
.park-shared-tag{display:inline-flex;padding:4px 7px;border-radius:999px;background:#f2eafa;color:#856b9b;font-size:0.5rem;font-weight:800}
.park-social-stories{display:grid;grid-template-columns:repeat(auto-fit,minmax(225px,1fr));gap:8px}
.park-social-story{display:flex;align-items:flex-start;gap:10px;padding:10px;border-radius:12px;background:#fff;border:1px solid #eee5d9}
.park-social-story-icon{display:grid;place-items:center;flex:0 0 33px;width:33px;height:33px;border-radius:11px;background:#f6efe5;font-size:1rem}
.park-social-story-copy{min-width:0}
.park-social-story-copy p{margin:0;color:#746153;font-size:0.6875rem;line-height:1.5}
.park-social-story-copy small{display:block;margin-top:5px;color:#aa9582;font-size:0.5625rem}
.park-discovery-milestones{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:9px}
.park-milestone-card{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:11px;border:1px solid #ece2d7;border-radius:13px;background:#fff}
.park-milestone-card.is-unlocked{border-color:#dcebd6;background:linear-gradient(145deg,#fff,#f5faf1)}
.park-milestone-stamp{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:10px;background:#f4ede4;color:#ac9a87;font-size:1.125rem}
.park-milestone-card.is-unlocked .park-milestone-stamp{background:#e5f2df;color:#67905c}
.park-milestone-copy{min-width:0;flex:1}
.park-milestone-copy strong{display:block;color:#735d4d;font-size:0.6875rem}
.park-milestone-copy p{margin:4px 0 7px;color:#998575;font-size:0.625rem;line-height:1.45}
.park-milestone-progress{height:5px;overflow:hidden;border-radius:99px;background:#f0e9df}
.park-milestone-progress span{display:block;height:100%;border-radius:inherit;background:#b4d1a5;transition:width .25s ease}
.park-milestone-copy small{display:block;margin-top:5px;color:#a38c77;font-size:0.5625rem}
.park-habitat-visit-form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px}
.park-habitat-visit-form .field-label{grid-column:1/-1;margin-bottom:-5px}
.park-habitat-visit-form select{min-width:0;width:100%;min-height:42px;border:1px solid #e4d7c8;border-radius:12px;background:#fff;padding:9px 12px;color:#735e4c;font:inherit;font-size:0.75rem}
.park-habitat-visit-form .button{min-height:42px}
.park-habitat-view{margin-top:12px}
.park-friend-habitat-card{padding:12px;border:1px solid #e9dfd2;border-radius:15px;background:#fff}
.park-friend-habitat-heading{display:flex;flex-direction:column;gap:4px;margin-bottom:10px}
.park-friend-habitat-heading strong{color:#715946;font-size:0.75rem}
.park-friend-habitat-heading small{color:#a18c7b;font-size:0.625rem}
.park-friend-home-scene{--friend-room-tint:#f4eee4;--friend-room-floor:#e5d7c6;position:relative;isolation:isolate;height:220px;overflow:hidden;border:1px solid #eee2d6;border-radius:13px;background:linear-gradient(180deg,var(--friend-room-tint),#fffaf1 62%,var(--friend-room-floor) 62%,var(--friend-room-floor));}
.park-friend-home-scene::before{content:"";position:absolute;z-index:0;left:-4%;right:-4%;bottom:-21%;height:54%;border-radius:50%;background:rgba(255,255,255,.26)}
.park-friend-room-badge{position:absolute;z-index:3;left:10px;top:10px;padding:5px 8px;border:1px solid #ffffffb5;border-radius:8px;background:#ffffffc9;color:#76604f;font-size:0.625rem;font-weight:800}
.park-friend-primary-decor{position:absolute;z-index:2;right:12%;bottom:17%;width:58px;height:58px;object-fit:contain;filter:drop-shadow(0 3px 2px #70513b16)}
.park-friend-home-pal{position:absolute;z-index:3;left:36%;bottom:-7px;width:120px;height:120px;background:transparent}
.park-friend-home-pal svg{width:120px;height:120px;overflow:visible;filter:drop-shadow(0 3px 2px #70513b1c)}
.park-friend-placement-layer{position:absolute;inset:0;z-index:2}
.park-friend-placed-decor{position:absolute;width:38px;height:38px;object-fit:contain;transform:translate(-50%,-50%);filter:drop-shadow(0 2px 2px #70513b15)}
.park-friend-habitat-note{margin:9px 0;color:#978474;font-size:0.625rem;line-height:1.5}
.park-habitat-reactions{display:flex;flex-wrap:wrap;gap:6px}
.park-habitat-reactions .button{min-height:32px;padding:6px 9px;font-size:0.625rem}
@media(max-width:700px){.park-phase4-section{padding:11px}.park-shared-moments,.park-social-stories,.park-discovery-milestones{grid-template-columns:minmax(0,1fr)}.park-shared-moment-card{grid-template-columns:60px 31px minmax(0,1fr);padding:9px}.park-shared-pair .park-story-avatar{width:39px;height:39px;flex-basis:39px}.park-shared-pair .park-story-avatar svg{width:39px;height:39px}.park-habitat-visit-form{grid-template-columns:minmax(0,1fr)}.park-habitat-visit-form .field-label{grid-column:auto}.park-friend-home-scene{height:190px}.park-friend-home-pal,.park-friend-home-pal svg{width:110px;height:110px}}
@media(prefers-reduced-motion:reduce){.park-milestone-progress span{transition:none}}


/* v0.11.8 build 81: collision-aware visitors and a playable open field. */
.park-visitor-heading h3{font-size:1rem;letter-spacing:-.025em}
.park-world-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start;margin-top:10px}
.park-world-layout.has-inspector{grid-template-columns:minmax(0,1.8fr) minmax(280px,.9fr)}
.park-world-layout #park-inspector{margin:0;position:sticky;top:14px;min-width:0}
.park-world-layout #park-inspector[hidden]{display:none!important}
.park-world-layout .park-inspector-body{grid-template-columns:minmax(0,1fr)}
.park-world-layout .park-inspector-hero{align-items:flex-start}
.park-map-zone-filters{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 10px}
.park-map-zone-chip{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 12px;border:1px solid #e7dece;border-radius:999px;background:#fffdf8;color:#887360;font:750 0.6875rem/1.2 inherit;box-shadow:0 2px 7px #8a74500a;cursor:pointer;transition:background .16s,border-color .16s,color .16s,transform .16s}
.park-map-zone-chip:hover{transform:translateY(-1px);border-color:#b8cda8}
.park-map-zone-chip.is-active{border-color:#a8c69b;background:#edf6e7;color:#628358;box-shadow:0 0 0 2px #a8c69b2b}
.park-map-zone-chip>span:first-child{font-size:0.9375rem}
.park-world-viewport{position:relative;overflow:auto;overscroll-behavior:contain;scrollbar-color:#c8d8bd #f5f3ea;scrollbar-width:thin;border:1px solid #cbd9c0;border-radius:22px;background:#eff4e6;box-shadow:0 8px 22px #6f8f5b14;isolation:isolate}
.park-world-map-frame{position:relative;display:block;margin-inline:auto;flex:none}
.park-world-map{position:relative;width:100%;min-width:660px;aspect-ratio:1000/620;overflow:hidden;isolation:isolate;background:#edf3e2;will-change:transform}
.park-map-landscape{position:absolute;inset:0;z-index:0}
.park-isometric-landscape{display:block;width:100%;height:100%;overflow:visible}
.park-map-pet{position:absolute;z-index:3;display:grid;grid-template-columns:1fr;grid-template-rows:62px 19px 15px;justify-items:center;align-items:center;width:88px;height:104px;padding:0;border:0;border-radius:18px;background:transparent;color:#6f5b4a;cursor:pointer;transform:translate(-50%,-58%);transition:left 1.25s cubic-bezier(.22,.72,.2,1),top 1.25s cubic-bezier(.22,.72,.2,1),filter .18s,opacity .18s;filter:drop-shadow(0 4px 3px #6d83541c);touch-action:manipulation}
.park-map-pet::before{content:"";position:absolute;z-index:-1;left:50%;bottom:22px;width:46px;height:11px;border-radius:50%;background:#718a5a30;filter:blur(4px);transform:translateX(-50%)}
.park-map-pet:hover{z-index:8;filter:drop-shadow(0 7px 5px #6d83542d);}
.park-map-pet:focus-visible{z-index:10;outline:3px solid #789b6b;outline-offset:2px;border-radius:16px}
.park-map-pet.is-selected{z-index:9}
.park-map-pet.is-selected .park-map-nameplate{background:#e8f4df;border-color:#a7c99a;box-shadow:0 0 0 2px #a7c99a38}
.park-map-avatar{position:relative;display:grid;place-items:center;grid-row:1;align-self:end;width:62px;height:64px;overflow:visible;filter:drop-shadow(0 3px 2px #4e604122);transition:transform .18s}
.park-map-pet:hover .park-map-avatar{transform:translateY(-3px) scale(1.05)}
.park-map-avatar svg{display:block;width:68px;height:68px;overflow:visible;transform-origin:50% 86%;animation:parkMapIdle 3.5s ease-in-out infinite}
.park-map-pet.has-seen-before .park-map-avatar svg{filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #fff) drop-shadow(0 0 3px #fff) drop-shadow(0 0 4px #fff) drop-shadow(0 4px 2px #64784c30)}
.park-map-pet.is-your-household .park-map-nameplate{background:#eff7e9;border-color:#d6e8cc}
.park-map-activity-badge{position:absolute;z-index:3;top:1px;right:3px;display:grid;place-items:center;width:27px;height:27px;border:2px solid #fffdf8;border-radius:10px;background:#fffaf0;box-shadow:0 2px 7px #8067482a;animation:parkBadgeFloat 3.4s ease-in-out infinite}
.park-map-activity-badge svg{display:block;width:23px;height:23px}
.park-map-nameplate{position:relative;display:block;max-width:82px;overflow:hidden;grid-row:2;padding:3px 8px;border:1px solid #ffffffd9;border-radius:999px;background:#fffdf4eF;color:#725b46;font-size:0.625rem;font-weight:850;line-height:1.2;text-overflow:ellipsis;white-space:nowrap;box-shadow:0 2px 6px #7b704019}
.park-map-activity-caption{display:block;width:max-content;max-width:min(144px,36vw);overflow:visible;grid-row:3;padding:2px 6px;border-radius:6px;background:#fffdf4d9;color:#786f5c;font-size:0.5rem;font-weight:750;line-height:1.25;text-align:center;text-overflow:clip;white-space:normal;overflow-wrap:normal;word-break:normal;opacity:.96}
.park-world-map[data-active-zone="playground"] .park-map-pet:not([data-zone="playground"]),.park-world-map[data-active-zone="field"] .park-map-pet:not([data-zone="field"]),.park-world-map[data-active-zone="garden"] .park-map-pet:not([data-zone="garden"]),.park-world-map[data-active-zone="quiet"] .park-map-pet:not([data-zone="quiet"]){opacity:.28;filter:saturate(.45);}
.park-world-map[data-active-zone="playground"] .park-map-landscape,.park-world-map[data-active-zone="garden"] .park-map-landscape,.park-world-map[data-active-zone="quiet"] .park-map-landscape{transition:filter .2s}
.park-map-empty{position:absolute;z-index:4;left:50%;top:49%;display:grid;justify-items:center;width:min(330px,56%);padding:15px 18px;border:1px solid #ffffffdc;border-radius:20px;background:#fffdf0e8;box-shadow:0 8px 28px #6e865329;backdrop-filter:blur(5px);text-align:center;transform:translate(-50%,-50%)}
.park-map-empty-icon{display:grid;place-items:center;width:46px;height:46px;margin-bottom:7px;border-radius:15px;background:#edf6e6;font-size:1.5625rem}
.park-map-empty strong{color:#6c865c;font-size:0.8125rem}
.park-map-empty p{margin:6px 0 0;color:#907b65;font-size:0.625rem;line-height:1.55}
.park-map-key{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:9px 3px 0;color:#8c7a67;font-size:0.625rem}
.park-map-key .park-live-dot{flex:0 0 8px}
.park-map-tap-hint{margin-left:auto;color:#a18c79}
.park-map-pet[data-activity="sandbox"] .park-map-avatar svg{animation:parkSandboxHop 2.7s ease-in-out infinite}
.park-map-pet[data-activity="slide"] .park-map-avatar svg{animation:parkSlideRide 2.2s ease-in-out infinite}
.park-map-pet[data-activity="carousel"] .park-map-avatar svg{animation:parkCarouselSway 3.4s ease-in-out infinite}
.park-map-pet[data-activity="flowers"] .park-map-avatar svg{animation:parkMeadowExplore 3.5s ease-in-out infinite}
.park-map-pet[data-activity="butterflies"] .park-map-avatar svg{animation:parkButterflyChase 1.9s ease-in-out infinite}
.park-map-pet[data-activity="fountain"] .park-map-avatar svg{animation:parkFountainSip 2.9s ease-in-out infinite}
.park-map-pet[data-activity="shade"] .park-map-avatar svg{animation:parkShadeBreathe 4s ease-in-out infinite}
.park-map-pet[data-activity="friends"] .park-map-avatar svg{animation:parkFriendHello 2.6s ease-in-out infinite}
.park-map-pet[data-activity="climbing"] .park-map-avatar svg{animation:parkClimbPal 2.7s ease-in-out infinite}
.park-map-pet[data-activity="moonwatch"] .park-map-avatar svg{animation:parkMoonPal 4.8s ease-in-out infinite}
.park-map-pet[data-activity="field"] .park-map-avatar svg{animation:parkFieldExplore 3.5s ease-in-out infinite}
.park-map-pet[data-activity="zoomies"] .park-map-avatar svg{animation:parkHappyZoomies 1.15s ease-in-out infinite}
.park-map-pet[data-activity="rolling"] .park-map-avatar svg{animation:parkGrassRoll 2.2s ease-in-out infinite}
.park-inspector-compliment{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:9px}
.park-inspector-compliment select{flex:1 1 125px;min-width:0;min-height:36px;padding:7px 9px;border:1px solid #e5daca;border-radius:10px;background:#fff;color:#806b59;font:inherit;font-size:0.6875rem}
.park-inspector-compliment .button{min-height:36px;padding:8px 11px;font-size:0.625rem}
@keyframes parkMapIdle{0%,100%{transform:translateY(0) rotate(-.4deg)}50%{transform:translateY(-2px) rotate(.5deg)}}
@keyframes parkBadgeFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@media(max-width:980px){.park-world-layout.has-inspector{grid-template-columns:minmax(0,1.35fr) minmax(260px,.9fr)}.park-map-pet{transform:translate(-50%,-58%) scale(.94)}}
@media(max-width:760px){.park-world-layout,.park-world-layout.has-inspector{grid-template-columns:minmax(0,1fr)}.park-world-layout #park-inspector{position:relative;top:auto}.park-map-zone-filters{gap:6px}.park-map-zone-chip{min-height:34px;padding:7px 10px;font-size:0.625rem}.park-world-viewport{border-radius:17px}.park-world-map{min-width:660px}.park-map-tap-hint{flex:1 0 100%;margin-left:16px}.park-map-pet{--park-depth-scale:.9}.park-map-empty{width:310px;max-width:44%;padding:12px}.park-map-empty strong{font-size:0.75rem}.park-map-empty p{font-size:0.5625rem}}
@media(prefers-reduced-motion:reduce){.park-map-pet,.park-map-zone-chip,.park-map-avatar,.park-map-activity-badge{transition:none!important;animation:none!important}.park-map-pet .park-map-avatar svg{animation:none!important}.park-map-pet:hover .park-map-avatar{transform:none}.park-map-pet.has-seen-before .park-map-avatar svg{animation:none!important}}

/* Expandable park map navigation */
.park-map-tools{display:flex;align-items:center;justify-content:flex-end;gap:7px;margin:0 0 9px;flex-wrap:wrap}
.park-map-tools button{min-height:36px;min-width:38px;padding:7px 12px;border:1px solid #d8e2ce;border-radius:12px;background:#fffdf8;color:#637e56;font:750 0.8125rem/1.1 inherit;cursor:pointer;box-shadow:0 2px 7px #6f8f5b10}
.park-map-tools button:hover{background:#edf6e7;border-color:#abc99c}
.park-map-tools button:focus-visible{outline:3px solid #789b6b;outline-offset:2px}
.park-map-zoom-readout{min-width:42px;text-align:center;font-size:0.6875rem;font-weight:750;color:#7b8c6b;font-variant-numeric:tabular-nums}
.park-world-viewport{cursor:grab;touch-action:pan-x pan-y}
.park-world-viewport.is-panning{cursor:grabbing;user-select:none}
.park-map-pet{pointer-events:none}
.park-map-pet .park-map-avatar{pointer-events:none}
.park-map-pet .park-map-avatar svg{pointer-events:visiblePainted;cursor:pointer}
.park-map-pet .park-map-activity-badge,.park-map-pet .park-map-nameplate,.park-map-pet .park-map-activity-caption{pointer-events:none}
@media(max-width:760px){.park-map-tools{justify-content:flex-start}.park-map-tools button{min-height:40px}.park-world-viewport{touch-action:pan-x pan-y}}

.park-map-find-feedback{display:block;min-height:0;color:#71835f;font-size:0.75rem}.park-map-find-feedback:not(:empty){padding:0 0 8px}

/* v0.11.16 build 89: every world uses the shared isometric stage navigation controller. */
.persistent-pet-stage .pet-world {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 18px 20px 14px;
}
.home-map-tools { justify-content: flex-start; margin: 0; }
.home-map-tools button { touch-action: manipulation; }
.persistent-pet-stage .world-scene.is-isometric-home {
  width: 100%;
  /* Let the stage own almost the full viewport while preserving a calm 10% frame. */
  height: 90vh;
  height: 90svh;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dce2ce;
  border-radius: 22px;
  background: radial-gradient(ellipse at 50% 45%, #ffffff66, transparent 57%), #edf2e5;
  box-shadow: 0 12px 32px #53694b12, inset 0 1px 0 #ffffffd9;
  touch-action: auto;
}
.world-scene.is-isometric-home .room-scrollport {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #c8d8bd #f5f3ea;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  background: transparent;
}
.world-scene.is-isometric-home .room-scrollport.is-panning { cursor: grabbing; user-select: none; -webkit-user-select: none; scroll-behavior: auto !important; }
.room-scrollport.is-pinching { cursor: zoom-in; user-select: none; -webkit-user-select: none; overscroll-behavior: contain; }
.home-world-frame { position: relative; display: block; margin-inline: auto; flex: none; }
.shared-isometric-stage {
  --iso-floor: var(--room-floor, #cce4d5);
  position: relative;
  width: 1000px;
  height: 620px;
  min-width: 1000px;
  overflow: hidden;
  isolation: isolate;
  background: transparent !important;
  transform-origin: top left;
  will-change: transform;
}
.shared-isometric-stage::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 5%;
  top: 24%;
  width: 90%;
  height: 75%;
  clip-path: polygon(50% 0, 100% 42%, 50% 100%, 0 42%);
  background: linear-gradient(135deg, color-mix(in srgb, var(--iso-floor) 94%, white), var(--iso-floor) 56%, color-mix(in srgb, var(--iso-floor) 82%, #7e9b7b));
  filter: drop-shadow(0 9px 3px #53694b21);
}
.home-isometric-stage .room-pals {
  /* This wrapper intentionally creates no stacking context: individual Pal entries
     must be depth-sorted alongside the individual placed-room-decor entities. */
  z-index: auto;
  inset: 0;
  width: auto;
  height: auto;
  display: block;
  overflow: visible;
  pointer-events: none;
}
.home-isometric-stage .room-pet-entry {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  min-width: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transform-origin: center bottom;
}
.home-isometric-stage .room-pet-button {
  flex: 0 0 var(--room-pet-hitbox-size, 220px);
  width: var(--room-pet-hitbox-size, 220px);
  height: var(--room-pet-hitbox-size, 220px);
  max-width: none;
  filter: drop-shadow(0 7px 4px #4f634022);
; touch-action: none;}
.home-isometric-stage .room-pet-button::after { bottom: 18px; height: 16px; filter: blur(7px); }
.home-isometric-stage .room-pet-entry.is-egg .room-pet-button::after { left: 27%; right: 27%; bottom: 3px; height: 6px; filter: blur(3px); }
.home-isometric-stage .room-pet-entry.is-egg .room-pet-name { max-width: 108px; padding-inline: 7px; font-size: 0.5625rem; }
.home-isometric-stage .room-pet-entry.is-egg .room-pet-stage { max-width: 108px; font-size: 0.4375rem; }
.home-isometric-stage .room-pet-visual.pet-art { filter: drop-shadow(0 5px 3px #53634a18); }
.home-isometric-stage .scene-decor-icon {
  z-index: 180;
  top: 18%;
  bottom: auto;
  left: 70%;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 5px 3px #534b3524);
}
.home-isometric-stage .scene-decor-icon img { width: 100%; height: 100%; object-fit: contain; }
.home-isometric-stage .home-decoration-layer { z-index: auto; }
.home-isometric-stage .placed-room-decor {
  width: 58px;
  height: 58px;
  transform: translate(-50%, -58%) scale(var(--iso-depth, 1));
  transform-origin: center bottom;
  filter: drop-shadow(0 5px 3px #4e5e421f);
}
.home-isometric-stage .placed-room-decor img { object-fit: contain; }
.world-scene.is-isometric-home .room-scroll-hint { z-index: 8; }
.world-scene.is-isometric-home.is-night { background: #414663; }
.world-scene.is-isometric-home.is-night .home-isometric-stage { --iso-floor: #a4b9b0; }
@media (max-width: 760px) {
  .persistent-pet-stage .pet-world { padding: 14px 12px 12px; }
  .home-map-tools { justify-content: flex-start; }
  .home-map-tools button { min-height: 40px; }
  .home-isometric-stage .placed-room-decor { width: 66px; height: 66px; }
  .home-isometric-stage .scene-decor-icon { width: 82px; height: 82px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-isometric-stage .placed-room-decor,
  .home-isometric-stage .placed-room-decor img { transition: none !important; animation: none !important; }
}

/* Friend habitats use the same diamond floor and zoomable stage as the household room. */
.park-friend-home-scene.home-isometric-stage {
  --iso-floor: var(--friend-room-floor, #e5d7c6);
  min-width: 1000px;
  width: 1000px;
  height: 620px;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: transparent !important;
}
.park-friend-home-scene.shared-isometric-stage::after { left: 5%; top: 24%; width: 90%; height: 75%; }
.park-friend-home-scene .park-friend-room-badge {
  left: 15%; top: 7%; z-index: 7;
  border: 1px solid #ffffffb5; border-radius: 999px;
  background: #ffffffd6; color: #76604f; font-size: 0.8125rem;
}
.park-friend-home-scene .park-friend-primary-decor {
  z-index: 4; right: 22%; top: 17%; bottom: auto; width: 96px; height: 96px;
  filter: drop-shadow(0 5px 3px #70513b24);
}
.park-friend-home-scene .park-friend-home-pal {
  z-index: 5; left: 50%; bottom: 18px; width: 220px; height: 220px;
  transform: translateX(-50%); background: transparent;
}
.park-friend-home-scene .park-friend-home-pal svg { width: 220px; height: 220px; }
.park-friend-home-scene .park-friend-placement-layer { z-index: 6; }
.park-friend-home-scene .park-friend-placed-decor {
  width: 72px; height: 72px; transform: translate(-50%, -58%) scale(var(--iso-depth, 1));
  filter: drop-shadow(0 5px 3px #70513b1c);
}
.park-friend-home-viewport { height: 300px; cursor: grab; }
.park-friend-home-viewport.is-panning { cursor: grabbing; }
.park-friend-home-frame { margin-inline: auto; }
.friend-home-map-tools { margin-bottom: 8px; }
@media (max-width: 700px) {
  .park-friend-home-viewport { height: 260px; }
  .park-friend-home-scene .park-friend-home-pal, .park-friend-home-scene .park-friend-home-pal svg { width: 190px; height: 190px; }
}

/* Preserve each isometric placement's floor-depth scale while arranging. */
#world-scene.is-decorating .home-isometric-stage .placed-room-decor:hover,
#world-scene.is-decorating .home-isometric-stage .placed-room-decor:focus-visible {
  transform: translate(-50%, -58%) scale(var(--iso-depth, 1)) scale(1.12);
}


/* Shared stage geometry: park scenery and visitors occupy the same floor as home and friend habitats. */
/* Park uses the shared floor only; do not render the home wall/backdrop trapezoid. */
.park-isometric-stage::after {
  background: linear-gradient(135deg, #e0edcf 0%, #c9dfb8 56%, #b6d2a5 100%) !important;
  border: 0;
  filter: drop-shadow(0 10px 4px #53694b27);
}
.park-world-viewport { background: #edf2e5; }
.park-map-landscape { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.park-isometric-landscape { display: block; width: 100%; height: 100%; overflow: hidden; }
.park-isometric-landscape .park-environment-prop { pointer-events: none; }
.park-map-pet { transform: translate(-50%, -58%) scale(calc(var(--park-depth-scale, 1) * var(--park-responsive-scale, 1))); transform-origin: center bottom; }
.park-map-pet:hover { z-index: 9999 !important; }
.park-map-pet.is-selected { z-index: 9998 !important; }
@media(max-width:760px) { .park-map-pet { --park-responsive-scale: .9; } }


/* v0.11.22 build 95: Home and Park are alternative scenes in one persistent stage viewport. */
.park-top-zone-filters { margin: 0 0 10px; padding: 0 1px; animation: parkFiltersAppear .18s ease-out; }
.park-top-zone-filters[hidden] { display: none !important; }
.park-stage-find-mine[hidden] { display: none !important; }
.park-stage-content { position:absolute; inset:0; z-index:auto; overflow:visible; pointer-events:none; }
.park-stage-content[hidden] { display:none !important; }
#world-scene.is-park-view { background:#edf2e5 !important; --room-sky:#edf2e5; --room-floor:#c9dfb8; }
#world-scene.is-park-view #room-world { background:transparent !important; }
#world-scene.is-park-view #room-world::before { display:none !important; content:none !important; }
#world-scene.is-park-view #room-world::after { background:linear-gradient(135deg,#e0edcf 0%,#c9dfb8 56%,#b6d2a5 100%) !important; border:0; filter:drop-shadow(0 10px 4px #53694b27); }
/* Home and Park are mutually exclusive scene layers. Keep the shared floor,
   stage viewport, and controls, but never paint Home's own Pals or furniture
   underneath the live Park map. */
#world-scene.is-park-view #pet-art,
#world-scene.is-park-view #home-decor-icon,
#world-scene.is-park-view #home-decoration-layer,

#world-scene.is-park-view .park-stage-content:not([hidden]) { display:block; }
#world-scene.is-park-view .park-map-landscape { position:absolute; inset:0; z-index:2; pointer-events:none; overflow:hidden; }
#world-scene.is-park-view .park-isometric-landscape { display:block; width:100%; height:100%; overflow:hidden; }
#world-scene.is-park-view .park-map-pet { pointer-events:none; }
#world-scene.is-park-view .park-map-pet .park-map-avatar svg { pointer-events:visiblePainted; cursor:pointer; }
#world-scene.is-park-view .park-map-pet .park-map-activity-badge,
#world-scene.is-park-view .park-map-pet .park-map-nameplate,
#world-scene.is-park-view .park-map-pet .park-map-activity-caption { pointer-events:none; }
#world-scene.is-park-view .room-scroll-hint { color:#6e825f; }
#world-scene.is-park-view .room-scroll-hint::after { content:" · Park"; }
#room-world[data-active-zone="playground"] .park-map-pet:not([data-zone="playground"]),
#room-world[data-active-zone="field"] .park-map-pet:not([data-zone="field"]),
#room-world[data-active-zone="garden"] .park-map-pet:not([data-zone="garden"]),
#room-world[data-active-zone="quiet"] .park-map-pet:not([data-zone="quiet"]) { opacity:.28; filter:saturate(.45); }
#room-world[data-active-zone="playground"] .park-map-landscape,
#room-world[data-active-zone="garden"] .park-map-landscape,
#room-world[data-active-zone="quiet"] .park-map-landscape { transition:filter .2s; }
#park-stage-content .park-map-empty { z-index:1200; }
#park-stage-content .park-map-pet:hover { z-index:9999 !important; }
#park-stage-content .park-map-pet.is-selected { z-index:9998 !important; }
#park-stage-find-mine { border-color:#cbdcc0; }
#park-visitor-list.park-visitor-list { grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); }
@keyframes parkFiltersAppear { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:760px) {
  .park-top-zone-filters { gap:6px; }
  .park-top-zone-filters .park-map-zone-chip { min-height:33px; padding:7px 10px; font-size:0.625rem; }
}
@media(prefers-reduced-motion:reduce) { .park-top-zone-filters { animation:none; } }


/* Build 92: give the shared park scene back its tiny, living details. */
@keyframes parkPondShimmer {
  0%, 100% { opacity: .42; }
  48% { opacity: .98; }
  70% { opacity: .68; }
}
@keyframes parkButterflyDrift {
  0%, 100% { transform: translate(0, 0) rotate(-2deg); }
  50% { transform: translate(5px, -7px) rotate(4deg); }
}
@keyframes parkFlowerSway {
  0%, 100% { transform: rotate(-1.3deg); }
  50% { transform: rotate(1.3deg) translateY(-1px); }
}
@keyframes parkButterflyDriftSecond {
  0%, 100% { transform: translate(0, 0) rotate(3deg) scale(.72); }
  50% { transform: translate(-7px, -5px) rotate(-5deg) scale(.72); }
}
.park-isometric-landscape .park-pond-glint {
  animation: parkPondShimmer 4.4s ease-in-out infinite;
}
.park-isometric-landscape .park-butterfly {
  transform-box: fill-box; transform-origin: center;
  animation: parkButterflyDrift 4.8s ease-in-out infinite;
}
.park-isometric-landscape .park-butterfly--second {
  animation: parkButterflyDriftSecond 5.7s ease-in-out infinite;
}
.park-isometric-landscape .park-flower-cluster {
  transform-box: fill-box; transform-origin: center bottom;
  animation: parkFlowerSway 3.7s ease-in-out infinite;
}
#world-scene.is-park-view #room-world::after {
  background: linear-gradient(135deg, #e0edcf 0%, #c9dfb8 56%, #b6d2a5 100%) !important;
  border: 0;
  filter: drop-shadow(0 10px 4px #53694b27);
}
@media (prefers-reduced-motion: reduce) {
  .park-isometric-landscape .park-pond-glint,
  .park-isometric-landscape .park-butterfly,
  .park-isometric-landscape .park-butterfly--second,
  .park-isometric-landscape .park-flower-cluster { animation: none !important; }
}


/* v0.13.9: household Park/Home controls live in the Pal picker. */
.home-stage-away-note { position:absolute; z-index:35; top:50%; left:50%; display:flex; width:min(82%,390px); flex-direction:column; align-items:center; gap:7px; padding:18px 20px; border:1px solid #dbe4ce; border-radius:18px; background:#fffdf0e8; box-shadow:0 8px 24px #687c5420; color:#7b896b; text-align:center; transform:translate(-50%,-50%); pointer-events:none; }
.home-stage-away-note>span:first-child { font-size:1.625rem; }
.home-stage-away-note strong { color:#705742; font-size:0.875rem; }
.home-stage-away-note>span:last-child { font-size:0.6875rem; line-height:1.5; }

/* v0.11.23 build 96: live care progress is animated in place without a full-page repaint. */


/* v0.11.25: keep the delightful details; reduce overwhelm through clearer guidance and hierarchy. */
.panel-card { box-shadow: var(--shadow); }
.help-page { gap: 16px; }
.help-intro { position:relative; overflow:hidden; background:radial-gradient(circle at 94% 16%, #eadcf7 0 52px, transparent 53px), linear-gradient(135deg, #fff7ef 0%, #fffdfa 56%, #f0f7eb 100%); border-color:#e8d8ca; box-shadow:0 12px 32px #8c6a4c12, inset 0 1px #ffffff; }
.help-intro::after { content:"✳"; position:absolute; right:74px; top:13px; color:#e9a48f; font-size:1.6875rem; transform:rotate(12deg); pointer-events:none; }
.help-intro #help-start-tour { margin-top:10px; position:relative; z-index:1; }
.help-card-grid { gap:12px; }
.help-card { position:relative; padding:17px; border-color:#e8ded2; box-shadow:0 5px 15px #7057440b; transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.help-card:nth-child(1) { background:linear-gradient(145deg,#fff8f1,#fffdfa 72%); }
.help-card:nth-child(2) { background:linear-gradient(145deg,#f1f8ec,#fffdfa 72%); }
.help-card:nth-child(3) { background:linear-gradient(145deg,#f5f0fc,#fffdfa 72%); }
.help-card:nth-child(4) { background:linear-gradient(145deg,#fff6df,#fffdfa 72%); }
.help-card:hover { transform:translateY(-3px); border-color:#dfc7b4; box-shadow:0 12px 24px #70574417; }
.help-card-icon { display:grid; place-items:center; width:44px; height:44px; margin:0 0 9px; border-radius:15px; background:#ffffffc9; border:1px solid #ffffff; box-shadow:0 4px 11px #6d57451c, inset 0 -2px #8c6d4c0a; font-size:1.5625rem; }
.help-card h3 { margin:0 0 5px; color:#5f4a3d; font-size:0.8125rem; }
.help-card p { margin:0; color:#8b7868; font-size:0.6875rem; line-height:1.6; }
.help-foldout { border-color:#e7ded2; box-shadow:0 5px 18px #7057440a; }
.help-foldout details > summary { padding:15px 17px; transition:background .16s ease; }
.help-foldout details > summary:hover { background:linear-gradient(90deg,#fff5eb,#f7f5ef); }
.help-feature-list { gap:9px 18px; }
.help-feature-list article { border-bottom:1px solid #efe5d9; padding:0 0 9px; }

/* The passport shares the top-stage row; never collapse the stage's layout box. */
.shared-stage-layout { position:relative; display:grid; grid-template-columns:minmax(0,1fr); gap:14px; align-items:start; min-width:0; width:100%; }
.shared-stage-layout > .world-scene { grid-column:1; display:block; width:100%; min-width:0; min-height:285px; }
.shared-stage-layout.park-scene-active.has-park-inspector { grid-template-columns:minmax(0,1.55fr) minmax(300px,.9fr); }
.shared-stage-layout.park-scene-active.has-park-inspector > .world-scene { grid-column:1; grid-row:1; align-self:start; }
.shared-stage-layout.has-park-inspector > .park-inspector-dock { grid-column:2; grid-row:1; }
.park-inspector-dock { min-width:0; align-self:start; }
.park-inspector-dock #park-inspector { margin:0; max-height:min(740px, calc(100vh - 170px)); overflow:auto; border-color:#e0d3ef; background:radial-gradient(circle at 100% 0%, #eee4fb 0 105px, transparent 106px), linear-gradient(145deg,#fffaff 0%,#fffdf8 76%); box-shadow:0 10px 28px #6b527d18, inset 0 1px #ffffff; scrollbar-color:#d9c9e8 #fbf7fc; }
.shared-stage-layout:not(.has-park-inspector) .park-inspector-dock { display:none !important; }
/* Home care is an independent overlay sibling of the floor surface, so rebuilding a menu can never trigger a room-floor click. */
.shared-stage-layout.park-scene-active > .stage-care-strip, .shared-stage-layout.park-scene-active > .stage-care-dock { display:none !important; }
.park-inspector-top { padding-bottom:8px; border-bottom:1px solid #f0e6f3; }
.park-inspector-top h3 { font-size:1.0625rem; }
.park-inspector-hero { border:1px solid #f1e7f2; background:linear-gradient(135deg,#fff 0%,#fffaf0 100%); box-shadow:0 3px 10px #77604e0b; }
.park-inspector-section { border-color:#e9dfee; background:linear-gradient(145deg,#fffdfc,#faf6ff); }

/* An in-game coachmark highlights real controls without blocking play. */
.gameplay-guide { position:fixed; z-index:1000; right:clamp(12px,2.2vw,28px); bottom:clamp(12px,2.2vw,28px); width:min(390px,calc(100vw - 24px)); padding:17px 18px 14px; border:1px solid #e5cbbd; border-radius:20px; background:radial-gradient(circle at 100% 0%,#efdef7 0 62px,transparent 63px),linear-gradient(145deg,#fffaf1,#fffdfb 62%,#f0f7ec); color:#665042; box-shadow:0 18px 56px #4d392d2d, inset 0 1px #ffffff; animation:guideArrive .22s ease-out; }
.gameplay-guide[hidden] { display:none !important; }
.gameplay-guide-top { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
.gameplay-guide-step { color:#b47a69; font-size:0.5rem; font-weight:950; letter-spacing:1.35px; }
.gameplay-guide-close { width:28px; height:28px; border:0; border-radius:10px; background:#ffffffbf; color:#8b7464; font-size:1.1875rem; line-height:1; }
.gameplay-guide-content { display:grid; grid-template-columns:45px minmax(0,1fr); gap:11px; align-items:start; }
.gameplay-guide-icon { display:grid; place-items:center; width:43px; height:43px; border:1px solid #fff; border-radius:15px; background:linear-gradient(145deg,#fff,#f7e8d9); box-shadow:0 5px 14px #8b6a5120; font-size:1.5rem; }
.gameplay-guide h2 { margin:1px 0 5px; color:#594537; font-size:0.9375rem; line-height:1.35; }
.gameplay-guide p { margin:0; color:#887363; font-size:0.6875rem; line-height:1.6; }
.gameplay-guide-actions { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:14px; padding-top:11px; border-top:1px solid #eddfd2; }
.gameplay-guide-actions .button { min-height:33px; padding:7px 10px; font-size:0.625rem; }
.gameplay-guide-actions #gameplay-guide-skip { background:#fff8f1; }
.is-guide-target { position:relative; z-index:35!important; outline:4px solid #e99b7f!important; outline-offset:4px; border-radius:12px; box-shadow:0 0 0 8px #f8dccd7a, 0 8px 24px #8c593a2b!important; animation:guideTargetPulse 1.4s ease-in-out infinite; scroll-margin-block:100px; }
@keyframes guideArrive { from { opacity:0; transform:translateY(10px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes guideTargetPulse { 0%,100% { outline-color:#e99b7f; } 50% { outline-color:#c7a9e8; } }
@media(max-width:980px) { .shared-stage-layout.park-scene-active.has-park-inspector { grid-template-columns:minmax(0,1.35fr) minmax(260px,.9fr); } }
@media(max-width:760px) {
  .shared-stage-layout.park-scene-active.has-park-inspector { grid-template-columns:minmax(0,1fr); }
  .shared-stage-layout.park-scene-active.has-park-inspector > .world-scene { grid-column:1; grid-row:1; align-self:start; }
  .shared-stage-layout.has-park-inspector > .park-inspector-dock { grid-column:1; grid-row:2; }
  .park-inspector-dock #park-inspector { max-height:none; }
  .gameplay-guide { right:10px; bottom:10px; width:calc(100vw - 20px); padding:14px; border-radius:17px; }
  .gameplay-guide-content { grid-template-columns:38px minmax(0,1fr); gap:9px; }
  .gameplay-guide-icon { width:38px; height:38px; font-size:1.3125rem; border-radius:13px; }
}
@media(prefers-reduced-motion:reduce) { .help-card, .gameplay-guide, .is-guide-target { animation:none!important; transition:none!important; } }


/* Household passports bundle the home and a selectable roster in one private file. */
.household-import-dialog { max-height:min(88svh,820px); overflow:auto; }
.household-import-summary { color:#8a7b6e; font-size:0.75rem; line-height:1.6; margin:-7px 0 15px; }
.household-import-select-all,.household-import-home-row>label { display:flex; align-items:center; gap:11px; padding:12px 13px; border:1px solid #ecdfd3; border-radius:13px; background:linear-gradient(120deg,#fffaf3,#f8f5ff); cursor:pointer; }
.household-import-select-all input,.household-import-home-row input,.household-import-pal input { accent-color:#d98572; width:18px; height:18px; flex-shrink:0; }
.household-import-select-all span,.household-import-home-row span { display:flex; flex-direction:column; gap:2px; min-width:0; }
.household-import-select-all strong,.household-import-home-row strong { color:#6b5546; font-size:0.75rem; }
.household-import-select-all small,.household-import-home-row small { color:#9b897b; font-size:0.625rem; line-height:1.45; }
.household-import-list { display:grid; gap:8px; max-height:40svh; overflow:auto; padding:10px 2px; }
.household-import-pal { display:grid; grid-template-columns:18px 43px minmax(0,1fr) auto; align-items:center; gap:10px; padding:10px; border:1px solid #ede4dc; border-radius:14px; background:#fffefa; cursor:pointer; transition:border-color .15s,background .15s,transform .15s; }
.household-import-pal:has(input:checked) { border-color:#d4bdde; background:linear-gradient(120deg,#fff8ef,#faf5ff); }
.household-import-pal:hover { transform:translateY(-1px); border-color:#d9c9b9; }
.household-import-portrait { width:43px; height:43px; display:grid; place-items:center; border-radius:14px; font-size:1.4375rem; background:color-mix(in srgb,var(--import-pal-color) 36%,white); box-shadow:inset 0 -3px color-mix(in srgb,var(--import-pal-color) 35%,transparent); }
.household-import-pal-copy { display:flex; flex-direction:column; min-width:0; gap:3px; }
.household-import-pal-copy strong { font-family:var(--round); color:#574539; font-size:0.8125rem; line-height:1.25; overflow-wrap:anywhere; }
.household-import-pal-copy small { color:#9c8a7c; font-size:0.625rem; line-height:1.35; }
.household-import-badge { border-radius:99px; padding:4px 7px; background:#f4efe9; color:#95877a; font-size:0.5625rem; white-space:nowrap; }
.household-import-pal:not(.is-existing) .household-import-badge { background:#edf6e9; color:#6c9564; }
.household-import-home-row { margin:7px 0 10px; }
.household-import-home-row[hidden] { display:none; }
.household-import-home-row>label { align-items:flex-start; }
.household-import-home-row input { margin-top:2px; }
.household-import-home-row label:has(input:disabled) { opacity:.62; cursor:not-allowed; }
.household-import-feedback { color:#9b7166; font-size:0.6875rem; line-height:1.55; margin:8px 0; overflow-wrap:anywhere; }
.household-import-feedback:empty { display:none; }
.household-import-actions { display:flex; justify-content:flex-end; align-items:center; gap:9px; margin-top:12px; }
.household-import-actions .button-primary { min-width:155px; }
@media(max-width:520px) { .household-import-dialog { padding:18px 14px; } .household-import-pal { grid-template-columns:18px 38px minmax(0,1fr); gap:8px; } .household-import-portrait { width:38px; height:38px; } .household-import-badge { grid-column:3; justify-self:start; } .household-import-actions { display:grid; grid-template-columns:1fr; } .household-import-actions .button-primary { grid-row:1; } }

/* Welcome flow: three clear paths, with focused subviews and a consistent back action. */
.adopt-screen-flow{display:block;max-width:1040px;margin-inline:auto;min-height:calc(100svh - 88px);padding-top:clamp(30px,5vw,58px)}
.adopt-landing-view{display:grid;grid-template-columns:minmax(0,.9fr) minmax(300px,1.1fr);align-items:center;gap:clamp(26px,5vw,64px)}
.adopt-landing-view .adopt-intro{padding:0 0 20px}
.adopt-entry-actions{display:grid;gap:12px}
.adopt-entry-card{width:100%;display:grid;grid-template-columns:52px minmax(0,1fr) 24px;align-items:center;gap:14px;text-align:left;padding:18px;border:1px solid #eadfd4;border-radius:18px;background:rgba(255,253,250,.94);color:var(--ink);box-shadow:0 12px 35px rgba(89,66,45,.045);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.adopt-entry-card:hover{transform:translateY(-2px);border-color:#e6b6a4;box-shadow:0 16px 38px rgba(89,66,45,.09)}
.adopt-entry-icon{width:50px;height:50px;display:grid;place-items:center;border-radius:16px;background:#fff0e8;font-size:1.5625rem}
.adopt-entry-card:nth-child(2) .adopt-entry-icon{background:#f3edff}
.adopt-entry-card:nth-child(3) .adopt-entry-icon{background:#eaf5ec}
.adopt-entry-card strong{display:block;font-family:var(--round);font-size:1.125rem;font-weight:900;margin-bottom:3px}
.adopt-entry-card small{display:block;font-size:0.6875rem;color:#93877d;line-height:1.5}
.adopt-entry-arrow{font-size:1.25rem;color:#d98d78;justify-self:end}
.adopt-subview{max-width:850px;margin:0 auto}
.adopt-subview .adopt-back-button{margin-bottom:15px}
.adopt-subview .adopt-card{max-width:100%}
.adopt-subview .adoption-center-panel{margin:0}
.adopt-screen-flow .page-footer{margin-top:30px}
.adoption-center-launcher{margin-top:8px}
@media(max-width:720px){.adopt-screen-flow{padding-top:28px}.adopt-landing-view{grid-template-columns:1fr;gap:15px}.adopt-landing-view .adopt-intro{padding:0 4px}.adopt-entry-actions{gap:9px}.adopt-entry-card{grid-template-columns:45px minmax(0,1fr) 20px;padding:13px;border-radius:15px}.adopt-entry-icon{width:43px;height:43px;font-size:1.375rem}.adopt-entry-card strong{font-size:1rem}.adopt-entry-card small{font-size:0.625rem}.adopt-subview .adopt-card{padding:18px}}

/* v0.11.37: make a manually dragged Pal feel picked up, without changing its painted hit shape. */
.home-isometric-stage .room-pet-entry.is-user-dragging { z-index: 9999 !important; filter: drop-shadow(0 9px 8px #4c5b3e35); opacity: .94; cursor: grabbing; }
.home-isometric-stage .room-pet-entry.is-user-dragging .room-pet-button { cursor: grabbing; touch-action: none; }


/* v0.11.39 build 112: dock the decoration inventory inside the stage while arranging. */
.in-stage-decor-inventory {
  position: absolute;
  z-index: 40;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(44%, 168px);
  min-height: 122px;
  padding: 8px 10px 7px;
  border: 1px solid rgba(205, 218, 190, .95);
  border-radius: 16px;
  background: rgba(255, 253, 247, .96);
  box-shadow: 0 8px 24px rgba(75, 88, 63, .2), inset 0 1px 0 #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #705b49;
}
.in-stage-decor-inventory[hidden] { display: none !important; }
.in-stage-decor-inventory-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 0 0 auto; min-height: 25px; }
.in-stage-decor-inventory-header > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex-wrap: wrap; }
.in-stage-decor-inventory-header strong { font-size: 0.75rem; line-height: 1.2; font-weight: 900; white-space: nowrap; }
.in-stage-decor-inventory-header small { color: #958577; font-size: 0.5625rem; line-height: 1.2; }
.in-stage-decor-inventory-header .button { min-height: 27px; flex: 0 0 auto; padding: 5px 9px; font-size: 0.625rem; border-radius: 9px; }
.in-stage-decor-catalog-slot { min-width: 0; min-height: 0; flex: 1 1 auto; overflow: hidden; }
.in-stage-decor-inventory .home-decor-catalog { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 7px; width: 100%; height: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 6px; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: #b6c8a7 transparent; }
.in-stage-decor-inventory .home-decor-card { flex: 0 0 88px; width: 88px; min-width: 0; min-height: 0; height: 100%; gap: 3px; padding: 5px 5px 4px; border-radius: 11px; touch-action: none; }
.in-stage-decor-inventory .home-decor-card img { width: 34px; height: 34px; }
.in-stage-decor-inventory .home-decor-card strong { font-size: 0.5625rem; }
.in-stage-decor-inventory .home-decor-card small { font-size: 0.4375rem; line-height: 1.15; }
.in-stage-decor-inventory .social-empty { align-self: center; margin: auto; font-size: 0.625rem; }
.home-decor-catalog-host.is-docked::after { content: 'Your decoration box is open on the stage while you arrange.'; display: block; padding: 15px; border: 1px dashed #e3d8ca; border-radius: 13px; color: #958577; background: #fffdf8a8; font-size: 0.6875rem; text-align: center; }
#world-scene.is-decorating .in-stage-decor-inventory { pointer-events: auto; }
#world-scene.is-decorating .in-stage-decor-inventory button { pointer-events: auto; }
@media (max-width: 760px) {
  .in-stage-decor-inventory { left: 6px; right: 6px; bottom: 6px; min-height: 108px; max-height: 49%; padding: 6px 7px 5px; border-radius: 13px; gap: 4px; }
  .in-stage-decor-inventory-header { min-height: 22px; }
  .in-stage-decor-inventory-header strong { font-size: 0.625rem; }
  .in-stage-decor-inventory-header small { font-size: 0.5rem; }
  .in-stage-decor-inventory-header .button { min-height: 24px; padding: 4px 7px; font-size: 0.5625rem; }
  .in-stage-decor-inventory .home-decor-catalog { gap: 5px; }
  .in-stage-decor-inventory .home-decor-card { flex-basis: 72px; width: 72px; padding: 4px 3px; }
  .in-stage-decor-inventory .home-decor-card img { width: 27px; height: 27px; }
  .in-stage-decor-inventory .home-decor-card strong { font-size: 0.5rem; }
  .in-stage-decor-inventory .home-decor-card small { display: none; }
}

/* v0.11.40 build 113: put everyday care controls directly into the persistent stage. */
.persistent-pet-stage .world-scene.is-isometric-home { position: relative; isolation: isolate; }
.world-scene.is-isometric-home .home-map-tools {
  position: absolute; z-index: 28; top: 7px; right: 7px; left: auto; max-width: 64%;
  align-items: center; justify-content: flex-end; gap: 4px; padding: 3px; margin: 0;
  flex-wrap: nowrap; overflow-x: auto; border: 1px solid #dce5d1c9; border-radius: 12px;
  background: #fffdf2e8; box-shadow: 0 4px 13px #53694b17; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.world-scene.is-isometric-home .home-map-tools button { min-width: 36px; min-height: 36px; flex: 0 0 auto; padding: 6px 9px; border: 1px solid #dce5d1; border-radius: 10px; background: #fffefa; color: #637e56; font-size: 0.6875rem; font-weight: 800; box-shadow: 0 2px 6px #53694b0b; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.world-scene.is-isometric-home .home-map-tools .park-map-zoom-readout { min-width: 35px; font-size: 0.5625rem; }
.world-scene.is-isometric-home .park-top-zone-filters {
  position: absolute; z-index: 28; top: 47px; left: 8px; right: 8px; display: flex; flex-wrap: nowrap; gap: 6px;
  min-width: 0; overflow-x: auto; padding: 5px; margin: 0; border: 1px solid #dce7d2dd; border-radius: 12px;
  background: #fffdf1e8; box-shadow: 0 4px 13px #53694b12; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  overscroll-behavior-inline: contain; scrollbar-width: thin;
}
.world-scene.is-isometric-home .park-top-zone-filters .park-map-zone-chip { flex: 0 0 auto; min-height: 30px; padding: 6px 9px; font-size: 0.5625rem; }
.stage-care-strip {
  position: absolute; z-index: 26; top: 48px; left: 8px; width: min(67%, 580px); max-width: calc(100% - 16px);
  display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px 9px 7px;
  border: 1px solid #ffffffce; border-radius: 14px; background: #fffdf2d9; color: #705b49;
  box-shadow: 0 5px 16px #53694b15; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: auto;
}
.stage-care-strip[hidden], .stage-care-dock[hidden] { display: none !important; }
.stage-care-meta-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.stage-care-meta-heading strong { overflow: hidden; color: #635440; font-size: 0.6875rem; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.stage-care-meta-heading small { flex: 0 1 auto; overflow: hidden; color: #9b8978; font-size: 0.5rem; font-weight: 700; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.stage-care-needs { display: flex; gap: 5px; min-width: 0; overflow-x: auto; padding: 1px 1px 4px; scrollbar-width: thin; overscroll-behavior-inline: contain; }
.stage-need-chip { flex: 1 0 64px; min-width: 62px; max-width: 94px; padding: 4px 5px 5px; border: 1px solid #e7e4d8; border-radius: 8px; background: #ffffffb8; }
.stage-need-top { display: flex; align-items: center; gap: 3px; min-width: 0; }
.stage-need-icon { flex: 0 0 auto; font-size: 0.625rem; line-height: 1; }
.stage-need-label { flex: 1 1 auto; overflow: hidden; color: #8a7969; font-size: 0.4375rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.stage-need-value { flex: 0 0 auto; color: #6c7f5d; font-size: 0.5rem; font-variant-numeric: tabular-nums; }
.stage-need-track { display: block; height: 4px; margin-top: 4px; overflow: hidden; border-radius: 99px; background: #ece9df; }
.stage-need-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#a8d5b2,#e6d17d); transition: width .3s ease; }
.stage-need-chip.is-low .stage-need-fill { background: linear-gradient(90deg,#e6b77d,#dc877c); }
.stage-need-chip.is-urgent .stage-need-fill { background: linear-gradient(90deg,#e6ba7b,#d97d77); }
/* v0.11.42 build 115: stage care meters reuse the exact Care-tab palette. */
.stage-need-chip[data-stage-need="hunger"] .stage-need-fill { background: #eeb18f; }
.stage-need-chip[data-stage-need="happiness"] .stage-need-fill { background: #e4a3a8; }
.stage-need-chip[data-stage-need="energy"] .stage-need-fill { background: #b9a8de; }
.stage-need-chip[data-stage-need="cleanliness"] .stage-need-fill { background: #8ec5a6; }
.stage-need-chip[data-stage-need="health"] .stage-need-fill { background: #8eb9df; }
.stage-need-chip[data-stage-need="pottyNeed"] .stage-need-fill { background: #d3a4a0; }

.stage-care-dock {
  position: absolute; z-index: 41; left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); bottom: max(8px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px;
  min-width: 0; padding: 7px 8px; border: 1px solid #dfe4d4ef; border-radius: 15px; background: #fffdf2ed;
  box-shadow: 0 7px 22px #5b60491f, inset 0 1px 0 #ffffff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #705b49;
}
/* A second-level inventory becomes a full-width shelf below its heading, not a grid squeezed beside it. */
.stage-care-dock.has-submenu { flex-direction: column; align-items: stretch; gap: 5px; max-height: min(44vh, 320px); }
.stage-care-actions { display: flex; flex: 1 1 auto; align-items: stretch; gap: 5px; min-width: 0; overflow-x: auto; padding: 1px 2px 4px; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.stage-care-actions.is-submenu { display: grid; flex: 0 1 auto; width: 100%; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); grid-auto-rows: minmax(48px, auto); align-content: start; align-items: stretch; gap: 4px; min-height: 0; max-height: clamp(112px, 28vh, 212px); overflow-x: hidden; overflow-y: auto; padding: 1px 3px 4px; overscroll-behavior: contain; scrollbar-width: thin; }
.stage-care-actions.is-submenu .stage-care-action { width: 100%; min-width: 0; flex: none; align-self: stretch; }
.stage-care-actions.is-submenu .stage-care-action-detail { display: block; max-width: 100%; overflow: hidden; color: #9a8977; font-size: 0.375rem; font-weight: 700; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.stage-care-actions.is-submenu .stage-care-menu-choice.is-favorite { border-color: #bbd7ae; background: #eaf6e2; color: #3f7145; }
.stage-care-actions.is-submenu .stage-care-menu-choice.is-favorite .stage-care-action-label { color: #3f7145; }
.stage-care-actions.is-submenu .stage-care-menu-choice.is-disliked { border-color: #e6b0ba; background: #fff0f2; color: #a44b60; }
.stage-care-actions.is-submenu .stage-care-menu-choice.is-disliked .stage-care-action-label { color: #a44b60; }
.stage-care-actions.is-submenu .stage-care-menu-choice.stage-care-food-choice:not(.is-favorite):not(.is-disliked):not(.is-empty) { border-color: #c5dced; background: #edf6fc; }
.stage-care-actions.is-submenu .stage-care-menu-choice.is-empty { opacity: .48; border-style: dashed; background: #f2f0eb; }
.stage-care-actions.is-submenu .stage-care-food-choice { min-height: 54px; }
.stage-care-actions.is-submenu .stage-care-menu-back { border-style: dashed; background: #f9f6ec; }
.stage-care-menu-empty { align-self: center; margin: 0; padding: 8px; color: #8b7968; font-size: 0.5625rem; line-height: 1.4; }
.stage-care-action { display: flex; flex: 0 0 54px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 48px; padding: 4px 4px 3px; border: 1px solid #e5e3d8; border-radius: 10px; background: #ffffffc9; color: #705c4a; cursor: pointer; touch-action: manipulation; transition: background .15s,border-color .15s,transform .15s; }
.stage-care-action:hover:not(:disabled) { transform: translateY(-1px); border-color: #c4d5b7; background: #f1f8eb; }
.stage-care-action:active:not(:disabled) { transform: translateY(0) scale(.98); }
.stage-care-action:focus-visible { outline: 3px solid #89a979; outline-offset: 2px; border-color: #89a979; background: #f1f8eb; }
.stage-care-action:disabled { opacity: .42; cursor: not-allowed; }
.stage-care-action-icon { font-size: 1.0625rem; line-height: 1; }
.stage-care-action-label { max-width: 100%; overflow: hidden; color: #806c58; font-size: 0.5rem; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.stage-care-action.attention-priority { border-color: #e6aa91; background: #fff0e6; }
.stage-care-action.attention-priority .stage-care-action-label { color: #a75d4d; }
.stage-activity-banner { position: absolute; z-index: 58; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom, 0px)); max-width: none; margin: 0; padding: 7px 9px; border-radius: 12px; }
.world-scene.has-stage-care .room-scroll-hint { display: none; }
#world-scene.is-decorating ~ .stage-care-strip, #world-scene.is-decorating ~ .stage-care-dock { display: none !important; }
#world-scene.is-decorating .stage-activity-banner { top: auto; bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
#world-scene.is-park-view ~ .stage-care-strip, #world-scene.is-park-view ~ .stage-care-dock { display: none !important; }
.in-stage-decor-inventory { z-index: 45; }
.in-stage-decor-inventory .home-decor-catalog { scroll-snap-type: x proximity; }
.in-stage-decor-inventory .home-decor-card { scroll-snap-align: start; touch-action: pan-x; user-select: none; -webkit-user-select: none; }
.in-stage-decor-inventory .home-decor-card:active { cursor: grabbing; }
@media(max-width:760px) {
  .world-scene.is-isometric-home .home-map-tools { top: 5px; right: 5px; max-width: 67%; gap: 3px; padding: 2px; }
  .world-scene.is-isometric-home .home-map-tools button { min-height: 27px; min-width: 26px; padding: 4px 6px; font-size: 0.5625rem; }
  .stage-care-strip { top: 42px; left: 6px; width: calc(100% - 12px); padding: 6px 7px; gap: 4px; border-radius: 12px; }
  .stage-care-meta-heading strong { font-size: 0.625rem; }
  .stage-care-meta-heading small { font-size: 0.4375rem; }
  .stage-need-chip { flex-basis: 57px; min-width: 54px; padding: 4px; }
  .stage-need-label { font-size: 0.375rem; }
  .stage-need-value { font-size: 0.4375rem; }
  .stage-care-dock { left: 5px; right: 5px; bottom: 5px; gap: 5px; padding: 5px; border-radius: 12px; }
  .stage-care-dock.has-submenu { gap: 4px; max-height: min(46vh, 300px); }
  .stage-care-actions { gap: 4px; }
  .stage-care-actions.is-submenu { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); grid-auto-rows: minmax(46px, auto); max-height: clamp(104px, 30vh, 194px); gap: 3px; }
  .stage-care-action { flex-basis: 43px; min-height: 42px; gap: 2px; padding: 3px 2px; border-radius: 8px; }
  .stage-care-action-icon { font-size: 0.9375rem; }
  .stage-care-action-label { font-size: 0.4375rem; }
  .stage-care-actions.is-submenu .stage-care-food-choice { min-height: 50px; }
  .stage-activity-banner { left: 5px; right: 5px; bottom: max(5px, env(safe-area-inset-bottom, 0px)); padding: 6px 7px; }
  #world-scene.is-decorating .stage-activity-banner { top: auto; bottom: max(5px, env(safe-area-inset-bottom, 0px)); }
}
@media(prefers-reduced-motion:reduce) { .stage-need-fill, .stage-care-action { transition: none !important; } }

/* Field Guide cheat clues remain folded away until a player goes looking. */
.help-cheat-clues { margin-top: 5px; padding-top: 6px; border-top: 1px dashed #e4d8bd; }
.help-cheat-clues > summary { cursor: pointer; color: #87765e; font-size: 0.625rem; font-weight: 800; list-style-position: inside; }
.help-cheat-clues > summary:hover, .help-cheat-clues > summary:focus-visible { color: #5e8055; }
.help-cheat-clues ol { margin: 8px 0 2px; padding-left: 22px; color: #897965; font-size: 0.625rem; line-height: 1.55; }
.help-cheat-clues li + li { margin-top: 4px; }


/* Stage height is viewport-driven; the roster never writes a competing inline height. */
.persistent-pet-stage .stage-care-strip { padding: 6px 8px 5px; gap: 4px; }
.persistent-pet-stage .stage-need-chip { padding: 3px 4px 4px; }
.persistent-pet-stage .stage-need-track { height: 3px; margin-top: 3px; }
.persistent-pet-stage .stage-care-dock { gap: 6px; padding: 5px 6px; }
.persistent-pet-stage .stage-care-action { min-height: 42px; padding: 3px 4px; gap: 2px; }
.persistent-pet-stage .stage-care-action-icon { font-size: 0.9375rem; }
@media(max-width:760px) {
  .persistent-pet-stage .stage-care-dock { gap: 4px; padding: 4px 5px; }
  .persistent-pet-stage .stage-care-action { min-height: 40px; }
}


/* v0.12.0 build 124: viewport-first stage and friendlier, accessible controls. */
.world-scene.is-isometric-home .home-map-tools button:hover:not(:disabled) { transform: translateY(-1px); background: #edf6e7; border-color: #b9cda9; }
.world-scene.is-isometric-home .home-map-tools button:active:not(:disabled) { transform: translateY(0) scale(.98); }
.world-scene.is-isometric-home .home-map-tools button:focus-visible { outline: 3px solid #89a979; outline-offset: 2px; border-color: #89a979; }
.world-scene.is-isometric-home .home-map-tools .park-map-zoom-readout { min-width: 42px; padding-inline: 2px; font-size: 0.625rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.stage-care-dock { padding-bottom: 7px; }
.stage-care-actions { scroll-behavior: smooth; scrollbar-color: #bdcdb3 transparent; }
.stage-care-actions.is-submenu { scroll-padding-block: 6px; }
@media(max-width:760px) {
  .world-scene.is-isometric-home .home-map-tools { max-width: calc(100% - 12px); }
  .world-scene.is-isometric-home .home-map-tools button { min-width: 40px; min-height: 40px; }
  .persistent-pet-stage .stage-care-dock { left: max(5px, env(safe-area-inset-left)); right: max(5px, env(safe-area-inset-right)); bottom: max(5px, env(safe-area-inset-bottom)); }
}
@media(prefers-reduced-motion:reduce) {
  .world-scene.is-isometric-home .home-map-tools button,
  .stage-care-action { transition: none !important; }
}


/* v0.12.2 build 126: one dynamic top bar for stage navigation and quick care. */
.shared-stage-layout > .stage-top-bar {
  position: absolute;
  z-index: 60;
  grid-column: 1;
  grid-row: 1;
  top: 8px;
  left: 8px;
  right: auto;
  max-width: calc(100% - 16px);
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  padding: 6px;
  border: 1px solid #dce5d1e8;
  border-radius: 16px;
  background: #fffdf0ed;
  box-shadow: 0 5px 18px #53694b19, inset 0 1px 0 #ffffff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
}
.shared-stage-layout > .stage-top-bar.is-decorating > .stage-care-strip,
.shared-stage-layout > .stage-top-bar.is-decorating > .stage-care-dock,
.shared-stage-layout > .stage-top-bar.is-park-view > .stage-care-strip,
.shared-stage-layout > .stage-top-bar.is-park-view > .stage-care-dock,
.shared-stage-layout.park-scene-active > .stage-top-bar > .stage-care-strip,
.shared-stage-layout.park-scene-active > .stage-top-bar > .stage-care-dock {
  display: none !important;
}
.shared-stage-layout > .stage-top-bar > .home-map-tools {
  position: static;
  z-index: auto;
  flex: 0 0 auto;
  align-self: center;
  width: auto;
  max-width: 100%;
  min-width: 0;
  gap: 4px;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.stage-top-bar > .home-map-tools button {
  min-width: 34px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #dce5d1;
  border-radius: 10px;
  background: #fffefa;
  color: #637e56;
  font-size: 0.6875rem;
  font-weight: 850;
  box-shadow: 0 2px 6px #53694b0b;
}
.stage-top-bar > .home-map-tools .park-map-zoom-readout {
  min-width: 38px;
  padding-inline: 2px;
  color: #738566;
  font-size: 0.625rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.stage-top-bar > .stage-care-strip {
  position: static;
  z-index: auto;
  flex: 1 1 255px;
  align-self: center;
  width: auto;
  max-width: none;
  min-width: 0;
  padding: 4px 5px;
  border: 0;
  border-left: 1px solid #e5e5d7;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.stage-top-bar > .stage-care-strip .stage-care-needs { min-width: 0; }
.stage-top-bar > .stage-care-strip .stage-need-chip { flex-basis: 58px; min-width: 54px; max-width: 86px; }
.stage-top-bar > .stage-care-dock {
  position: static;
  z-index: auto;
  flex: 2 1 385px;
  align-self: center;
  width: auto;
  max-width: none;
  min-width: 0;
  left: auto;
  right: auto;
  bottom: auto;
  gap: 6px;
  padding: 2px 3px;
  border: 0;
  border-left: 1px solid #e5e5d7;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.stage-top-bar:not(.has-selected-pal) > .stage-care-dock { flex: 1 1 205px; }
.stage-top-bar > .stage-care-dock.has-submenu {
  flex: 1 1 100%;
  width: 100%;
  align-self: stretch;
  padding: 3px 4px 4px;
  border-left: 0;
  border-top: 1px solid #e5e5d7;
}
.stage-top-bar .stage-care-actions { scrollbar-color: #bdcdb3 transparent; }
.shared-stage-layout.park-scene-active .park-top-zone-filters { top: 60px; }
.shared-stage-layout.park-scene-active > .stage-top-bar > .home-map-tools {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
@media (max-width: 760px) {
  .shared-stage-layout > .stage-top-bar { top: 5px; left: 5px; right: 5px; width: auto; max-width: none; gap: 3px; padding: 5px; border-radius: 13px; }
  .shared-stage-layout > .stage-top-bar > .home-map-tools { flex: 1 1 100%; justify-content: flex-start; gap: 3px; }
  .shared-stage-layout.park-scene-active > .stage-top-bar > .home-map-tools { flex: 1 1 100%; }
  .stage-top-bar > .home-map-tools button { min-width: 31px; min-height: 32px; padding: 4px 7px; font-size: 0.625rem; }
  .stage-top-bar > .home-map-tools .park-map-zoom-readout { min-width: 34px; }
  .stage-top-bar > .stage-care-strip { flex: 1 1 100%; padding: 3px 2px; border-left: 0; border-top: 1px solid #e5e5d7; }
  .stage-top-bar > .stage-care-dock,
  .stage-top-bar:not(.has-selected-pal) > .stage-care-dock { flex: 1 1 100%; padding: 3px 2px; border-left: 0; border-top: 1px solid #e5e5d7; }
  .stage-top-bar > .stage-care-dock.has-submenu { max-height: min(44vh, 280px); padding: 3px 2px; border-top: 1px solid #e5e5d7; }
  .shared-stage-layout.park-scene-active .park-top-zone-filters { top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-top-bar > .home-map-tools button { transition: none !important; }
}

/* v0.12.4 build 128: keep Center in the open stage gutter and the active-action card at the floor's bottom edge. */
.stage-top-bar > .home-map-tools .stage-center-button { min-width: auto; gap: 5px; padding-inline: 10px; white-space: nowrap; }
.stage-top-bar > .home-map-tools .stage-center-button span { display: inline; }
@media (max-width: 760px) {
  .stage-top-bar > .home-map-tools .stage-center-button { padding-inline: 8px; }
  .stage-top-bar > .home-map-tools .stage-center-button span { display: inline; }
}
@media (prefers-reduced-motion: reduce) { .stage-top-bar > .home-map-tools .stage-center-button { transition: none !important; } }

/* v0.12.3: keep the Care tab as a focused status page; day-to-day actions live on stage. */
.care-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.care-column > .panel-card,
.care-column > #egg-care-card {
  grid-column: 1 / -1;
  height: auto;
}
.notification-settings-details > summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  cursor: pointer;
  list-style: none;
  color: #6d5947;
  font-weight: 850;
  outline-offset: 5px;
}
.notification-settings-details > summary::-webkit-details-marker { display: none; }
.notification-settings-details > summary::after {
  content: '+';
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-left: auto;
  border: 1px solid #e2eadb;
  border-radius: 9px;
  background: #fffefa;
  color: #759377;
  font-size: 1.0625rem;
  line-height: 1;
}
.notification-settings-details[open] > summary::after { content: '−'; }
.notification-settings-details > summary small {
  margin-left: auto;
  color: #9b8c7f;
  font-size: 0.625rem;
  font-weight: 600;
}
.notification-settings-details[open] > summary small { margin-left: 0; }
.notification-settings-body { padding-top: 15px; }
@media (max-width: 620px) {
  .notification-settings-details > summary { align-items: flex-start; }
  .notification-settings-details > summary small { margin-left: 0; flex-basis: calc(100% - 40px); }
  .notification-settings-details > summary::after { position: absolute; right: 30px; }
  .notification-settings-details > summary { position: relative; padding-right: 34px; }
  .notification-settings-details > summary::after { right: 0; }
}


/* v0.12.6 build 130: household messes are persistent floor sprites; Tidy acts on the whole home. */
.home-isometric-stage .home-mess-sprite {
  position: absolute; width: clamp(25px, 3.2vw, 39px); height: auto;
  transform: translate(-50%, -58%); object-fit: contain; opacity: .94;
  filter: drop-shadow(0 3px 3px #66514f26); pointer-events: none; user-select: none;
}
.stage-household-tidy {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 56px; min-height: 45px; padding: 4px 6px; border: 1px solid #d9e6d1; border-radius: 10px;
  color: #5e7c53; background: #f6faef; font:850 0.5rem/1.1 var(--round, system-ui); white-space: nowrap;
  cursor: pointer; touch-action: manipulation;
}
.stage-household-tidy[hidden] { display: none !important; }
.stage-household-tidy:hover:not(:disabled) { background: #eaf5e2; border-color: #b7d0aa; }
.stage-household-tidy:focus-visible { outline: 3px solid #89a979; outline-offset: 2px; }
.stage-household-tidy:disabled { opacity: .45; cursor: not-allowed; }
.stage-household-tidy-icon { font-size: 1.0625rem; line-height: 1; }
.stage-care-dock.has-submenu .stage-household-tidy { align-self: flex-start; }
@media (max-width: 760px) {
  .home-isometric-stage .home-mess-sprite { width: 25px; }
  .stage-household-tidy { min-width: 48px; min-height: 38px; padding: 3px 4px; font-size: 0.4375rem; }
  .stage-household-tidy-icon { font-size: 0.9375rem; }
}


/* v0.12.8: friend-home visits live under Friends; sleeping Pals stay still. */
.home-isometric-stage .placed-room-decor-item-flower-rug,
.home-isometric-stage .placed-room-decor-item-moon-rug { width: 142px; height: 88px; }
.home-isometric-stage .placed-room-decor-item-pillow-nest { width: 116px; height: 104px; }
#world-scene.is-decorating .placed-room-decor-item-flower-rug,
#world-scene.is-decorating .placed-room-decor-item-moon-rug,
#world-scene.is-decorating .placed-room-decor-item-pillow-nest { border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
@media(max-width:760px) {
  .home-isometric-stage .placed-room-decor-item-flower-rug,
  .home-isometric-stage .placed-room-decor-item-moon-rug { width: 112px; height: 70px; }
  .home-isometric-stage .placed-room-decor-item-pillow-nest { width: 94px; height: 82px; }
}
.park-stage-refresh { white-space: nowrap; }
.park-controls { min-height: 0; margin-bottom: 12px; padding: 10px 13px; }
.park-control-copy p { margin: 3px 0 0; }
.park-intro-strip { margin-bottom: 12px; }
.park-more-details { margin-top: 14px; border: 1px solid #e8ddd0; border-radius: 16px; background: linear-gradient(145deg,#fffdf8,#f8faf3); overflow: clip; }
.park-more-details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; color: #6f5849; font-weight: 850; }
.park-more-details > summary::-webkit-details-marker { display: none; }
.park-more-details > summary::after { content: '＋'; flex: 0 0 auto; color: #9c806d; font-size: 1.0625rem; }
.park-more-details[open] > summary::after { content: '−'; }
.park-more-details > summary small { display: block; margin-left: auto; color: #9a8878; font-size: 0.625rem; font-weight: 500; text-align: right; }
.park-more-content { padding: 0 13px 13px; }
.keepsake-card { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); align-items: stretch; gap: clamp(22px,4vw,48px); padding: clamp(22px,4vw,36px); }
.keepsake-message { min-width: 0; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.keepsake-message .keepsake-doodle { margin-inline: auto; }
.keepsake-message .eyebrow { margin-top: 13px; }
.keepsake-message h2 { margin-top: 0; }
.keepsake-message .keepsake-main-copy { max-width: 470px; margin: 9px auto 0; text-align: center; color: #85766b; line-height: 1.75; }
.keepsake-passport { border-left: 1px solid #eee1d4; padding: 8px 0 8px clamp(20px,3vw,38px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-width: 0; }
.keepsake-passport-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 17px; background: #f7efe3; font-size: 1.5625rem; margin-bottom: 10px; }
.keepsake-passport h3 { color: #6b5749; margin: 0 0 6px; font:850 0.9375rem/1.35 var(--round); }
.keepsake-passport-copy { max-width: 400px; margin: 0 auto 12px; color: #85766b; font-size: 0.75rem; line-height: 1.7; }
.keepsake-passport .tiny-note { margin-top: 8px; }
@media(max-width:760px) {
  .park-more-details > summary { align-items: flex-start; flex-wrap: wrap; }
  .park-more-details > summary small { order: 2; flex-basis: 100%; text-align: left; margin-left: 0; }
  .keepsake-card { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .keepsake-passport { border-left: 0; border-top: 1px solid #eee1d4; padding: 20px 0 0; }
}

/* v0.12.11 build 135: Park refresh is a first-class stage-navigation option. */
.stage-top-bar > .home-map-tools .park-stage-refresh {
  position: static;
  z-index: auto;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid #dce5d1;
  border-radius: 10px;
  background: #fffefa;
  box-shadow: 0 2px 6px #53694b0b;
  color: #637e56;
  font-size: 0.625rem;
  font-weight: 850;
  white-space: nowrap;
  pointer-events: auto;
}
.stage-top-bar > .home-map-tools .park-stage-refresh:hover:not(:disabled) { background: #edf6e7; border-color: #b9cda9; }
.stage-top-bar > .home-map-tools .park-stage-refresh:focus-visible { outline: 3px solid #89a979; outline-offset: 2px; }
.park-stage-refresh[hidden] { display: none !important; }
@media(prefers-reduced-motion:reduce) { .park-stage-refresh { transition: none !important; } }

/* v0.20.4.2 build 297: Park navigation actions are icon-only to avoid toolbar label collisions. */
.stage-top-bar > .home-map-tools .park-stage-find-mine,
.stage-top-bar > .home-map-tools .park-stage-refresh {
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
}
.stage-top-bar > .home-map-tools .park-stage-find-mine span,
.stage-top-bar > .home-map-tools .park-stage-refresh span { display: block; line-height: 1; }
.park-stage-find-mine[hidden], .park-stage-refresh[hidden] { display: none !important; }


/* v0.12.12 build 136: bind the toolbar to the stage cell and match inspector height to the stage. */
.shared-stage-layout > .stage-top-bar {
  grid-area: 1 / 1 / 2 / 2;
  width: max-content;
  max-width: calc(100% - 16px);
}
.shared-stage-layout.park-scene-active > .stage-top-bar > .home-map-tools {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.park-inspector-dock {
  height: 90vh;
  height: 90svh;
  min-height: 0;
  align-self: stretch;
}
.park-inspector-dock #park-inspector {
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow: auto;
}
@media (max-width: 760px) {
  .shared-stage-layout > .stage-top-bar {
    grid-area: 1 / 1 / 2 / 2;
    width: auto;
    max-width: none;
  }
  .park-inspector-dock { height: 90vh; height: 90svh; }
}

/* v0.12.13 build 137: one full-viewport Pocket Pals stage with an in-stage workspace. */
html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  min-height: 100svh;
}

#app.app-shell {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: 100vw;
  width: 100svw;
  max-width: none;
  height: 100vh;
  height: 100svh;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#app > .topbar {
  position: relative;
  z-index: 80;
  flex: 0 0 66px;
  width: 100%;
  height: 66px;
  min-height: 66px;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid #e7ded3;
  background: #fffdf9ed;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#app > .topbar .brand-mark {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  border-radius: 13px;
}

#app > .topbar .brand-copy strong { font-size: 1.125rem; }
#app > .topbar .brand-copy small { font-size: 0.4375rem; }
#app > .topbar .topbar-right { gap: 8px; }
#app > .topbar .pal-switcher { display: block; width: min(190px, 21vw); max-width: 190px; min-width: 108px; min-height: 38px; }
#app > .topbar .connection-pill { height: 28px; font-size: 0.5625rem; }
#app > .topbar .button-small { min-height: 35px; padding: 7px 10px; font-size: 0.625rem; }

.stage-header-tools { position: relative; flex: 0 0 auto; }
.stage-header-tools > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #e9dfd4;
  border-radius: 11px;
  background: #fffaf4;
  color: #806e5e;
  font-size: 0.6875rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.stage-header-tools > summary::-webkit-details-marker { display: none; }
.stage-header-tools[open] > summary { border-color: #e6b9a8; background: #fff3ec; }
.stage-header-tools-menu {
  position: absolute;
  z-index: 100;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 6px;
  width: min(245px, calc(100vw - 24px));
  padding: 9px;
  border: 1px solid #eadfd5;
  border-radius: 15px;
  background: #fffdfa;
  box-shadow: 0 14px 38px #4b39241f;
}
.stage-header-tools-menu .button { justify-content: flex-start; min-height: 36px; padding: 7px 9px; font-size: 0.625rem; }
.stage-header-tools-menu .support-programs-link { text-decoration: none; color: #7b6342; }
.stage-header-tools-menu .support-programs-link:hover { background: #fff5e8; border-color: #ead8bb; }
.stage-header-tools-menu .support-programs-link span { margin-left: auto; opacity: .7; }

#loading-screen {
  flex: 1 1 auto;
  min-height: 0;
}

#pet-screen.pet-screen {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  height: 0;
  min-height: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

#pet-screen > .page-intro,
#pet-screen > .pet-footer { display: none !important; }

.stage-workbench {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 148px minmax(360px, .98fr) minmax(390px, 1.02fr);
  gap: 11px;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 11px;
  overflow: hidden;
}

.stage-navigation-rail, .stage-world-column {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #e8dfd4;
  border-radius: 18px;
  background: #fffdf9e8;
  box-shadow: 0 5px 22px #6e59400b;
}

.stage-navigation-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 9px 7px;
}

.stage-rail-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 27px;
  color: #a48d7d;
  font-size: 0.5rem;
  font-weight: 950;
  letter-spacing: .12em;
}
.stage-rail-orbit { color: #de987f; font-size: 0.9375rem; }
.stage-household-heading {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 5px 2px;
  border-top: 1px solid #f0e8df;
  color: #968272;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: .09em;
}
.stage-household-heading small { color: #b3a496; font-size: 0.4375rem; font-weight: 600; letter-spacing: 0; }
.stage-household-roster {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  max-height: min(38svh, 320px);
  overflow: auto;
  padding: 1px 1px 5px;
  scrollbar-width: thin;
  scrollbar-color: #ddcfc0 transparent;
}
.stage-pet-choice,
.stage-pet-add {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 4px 5px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #887667;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.stage-pet-choice:hover:not(:disabled) { background: #fff7f0; border-color: #f0dfd2; }
.stage-pet-choice.is-selected,
.stage-pet-choice[aria-pressed="true"] { background: #fff0e8; border-color: #e9baa8; color: #715448; }
.stage-pet-choice:disabled { opacity: .55; cursor: wait; }
.stage-pet-choice-avatar {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #fff;
  border-radius: 10px;
  background: var(--stage-pet-colour, #f2e5d9);
  box-shadow: inset 0 -3px 6px #715b3a0b, 0 1px 3px #6e58400d;
  font-size: 1rem;
}
.stage-pet-choice-name {
  min-width: 0;
  overflow: hidden;
  font-size: 0.5625rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-pet-add {
  justify-content: center;
  min-height: 31px;
  border: 1px dashed #e3d5c6;
  color: #b28a76;
  font-size: 1.0625rem;
}
.stage-pet-add:hover { background: #fff6ee; border-color: #dbad99; }

#pet-tabs.pet-tabs {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  margin: 0;
  padding: 6px 0 0;
  overflow: auto;
  border: 0;
  border-top: 1px solid #f0e8df;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: thin;
}
#pet-tabs .pet-tab {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 5px;
  min-height: 39px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #907f70;
  font-size: 0.5625rem;
  font-weight: 850;
  text-align: left;
  white-space: nowrap;
}
#pet-tabs .pet-tab-icon { font-size: 0.9375rem; }
#pet-tabs .pet-tab.is-active,
#pet-tabs .pet-tab[aria-selected="true"] {
  border-color: #f0d9cb;
  background: linear-gradient(135deg, #fff5ed, #fffdfa);
  color: #725348;
  box-shadow: 0 2px 7px #8e66500b;
}
#pet-tabs .pet-tab:hover { background: #fff8f2; color: #765d50; }

.stage-world-column {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 7px;
  background: linear-gradient(160deg, #f8f5eb, #f5f6ed 55%, #f4f0e9);
}
.stage-world-column #offline-banner {
  position: absolute;
  z-index: 70;
  top: 12px;
  left: 12px;
  right: 12px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  box-shadow: 0 5px 18px #60452a18;
}
#persistent-pet-stage.persistent-pet-stage {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
}
#persistent-pet-stage > .pet-world {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 9px;
  overflow: hidden;
  border-radius: 14px;
  background: #fffdf8;
}
#persistent-pet-stage .shared-stage-layout {
  display: grid;
  flex: 1 1 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  gap: 0;
  align-items: stretch;
}
#persistent-pet-stage .shared-stage-layout > .world-scene {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  border-radius: 14px;
}
#persistent-pet-stage .world-scene.is-isometric-home {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 14px;
}

/* Keep the adoption/hatchery entry screen inside the same viewport shell. */
#adopt-screen.adopt-screen-flow {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-content: center;
  align-items: center;
  gap: clamp(16px, 4vw, 56px);
  width: 100%;
  height: 0;
  min-height: 0;
  margin: 0;
  padding: 22px max(18px, env(safe-area-inset-right)) 22px max(18px, env(safe-area-inset-left));
  overflow: auto;
}
#adopt-screen .page-footer { grid-column: 1 / -1; }

@media (max-width: 1060px) and (min-width: 761px) {
  .stage-workbench { grid-template-columns: 122px minmax(0, .98fr) minmax(0, 1.02fr); gap: 8px; padding: 8px; }
  .stage-navigation-rail { padding: 7px 5px; }
  #pet-tabs .pet-tab { grid-template-columns: 22px minmax(0, 1fr); padding-inline: 5px; font-size: 0.5rem; }
  #persistent-pet-stage > .pet-world { padding: 7px; }
  #persistent-pet-stage .stage-top-bar { max-width: calc(100% - 10px); }
}

@media (max-width: 760px) {
  #app > .topbar {
    flex-basis: 58px;
    height: 58px;
    min-height: 58px;
    padding-inline: max(9px, env(safe-area-inset-left)) max(9px, env(safe-area-inset-right));
  }
  #app > .topbar .brand { gap: 0; }
  #app > .topbar .brand-mark { width: 32px; height: 32px; flex-basis: 32px; border-radius: 11px; }
  #app > .topbar .brand-copy { display: none; }
  #app > .topbar .topbar-right { gap: 5px; }
  #app > .topbar .connection-pill { display: none !important; }
  #app > .topbar .pal-switcher { width: min(145px, 39vw); min-width: 94px; max-width: 145px; min-height: 35px; padding: 6px 8px; font-size: 0.625rem; }
  #app > .topbar #add-pal-top { width: 34px; min-width: 34px; padding: 6px 0; overflow: hidden; font-size: 0; }
  #app > .topbar #add-pal-top::first-letter { font-size: 1rem; }
  .stage-header-tools > summary { min-width: 34px; min-height: 34px; padding: 6px 8px; font-size: 0.9375rem; }
  .stage-header-tools > summary span { display: none; }
  #pet-screen.pet-screen { min-height: 0; }
  .stage-workbench {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(176px, 33svh) minmax(0, 1fr);
    gap: 6px;
    padding: 6px max(6px, env(safe-area-inset-right)) 6px max(6px, env(safe-area-inset-left));
  }
  .stage-navigation-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 5px;
    padding: 5px;
    border-radius: 13px;
  }
  .stage-rail-heading,
  .stage-household-heading { display: none; }
  .stage-household-roster {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    max-height: none;
    min-height: 34px;
    padding: 0 0 2px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .stage-household-roster::-webkit-scrollbar { display: none; }
  .stage-pet-choice {
    flex: 0 0 auto;
    width: auto;
    min-height: 32px;
    gap: 5px;
    padding: 2px 7px 2px 3px;
    border: 1px solid #eee4d9;
    border-radius: 999px;
    background: #fffdfa;
  }
  .stage-pet-choice-avatar { width: 26px; height: 26px; flex-basis: 26px; border-radius: 50%; font-size: 0.8125rem; }
  .stage-pet-choice-name { max-width: 76px; font-size: 0.5625rem; }
  .stage-pet-add { flex: 0 0 31px; width: 31px; min-height: 31px; border-radius: 50%; }
  #pet-tabs.pet-tabs {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    gap: 4px;
    min-height: 48px;
    padding: 4px 0 0;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid #f0e8df;
    scrollbar-width: none;
  }
  #pet-tabs.pet-tabs::-webkit-scrollbar { display: none; }
  #pet-tabs .pet-tab {
    display: flex;
    flex: 0 0 56px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 56px;
    min-height: 43px;
    padding: 3px 2px;
    border-radius: 9px;
    font-size: 0.5rem;
    text-align: center;
  }
  #pet-tabs .pet-tab-icon { font-size: 0.875rem; }
  .stage-world-column { padding: 5px; border-radius: 14px; }
  #persistent-pet-stage > .pet-world { gap: 4px; padding: 5px; border-radius: 11px; }
  #persistent-pet-stage .shared-stage-layout { min-height: 0; }
  #persistent-pet-stage .world-scene.is-isometric-home { border-radius: 11px; }
  #adopt-screen.adopt-screen-flow {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 12px;
    padding: 18px max(12px, env(safe-area-inset-right)) 16px max(12px, env(safe-area-inset-left));
  }
  #adopt-screen .adopt-intro { padding: 0; }
  #adopt-screen .adopt-intro h1 { font-size: clamp(1.875rem, 8vw, 2.625rem); margin-bottom: 9px; }
  #adopt-screen .intro-copy { margin-bottom: 10px; font-size: 0.75rem; }
  #adopt-screen .promise-line { font-size: 0.5625rem; }
}

@media (max-width: 390px) {
  .stage-workbench { grid-template-rows: auto minmax(164px, 31svh) minmax(0, 1fr); }
  .stage-pet-choice-name { max-width: 62px; }
  #pet-tabs .pet-tab { flex-basis: 52px; min-width: 52px; }
}

@media (max-width: 760px) and (orientation: landscape) {
  .stage-workbench {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(150px, 37svh) minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-pet-choice,
  .stage-header-tools > summary { transition: none !important; }
}


/* v0.12.14 build 138: put the full needs dashboard beside the persistent world. */
.care-needs-slot {
  flex: 0 0 auto;
  min-width: 0;
  margin: 0 0 12px;
}
.care-needs-slot[hidden] { display: none !important; }
.care-needs-slot .stage-care-strip {
  position: static;
  z-index: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 15px;
  border: 1px solid #e6e2d7;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffdf7, #f7fbf4 72%, #fffaf7);
  box-shadow: 0 4px 14px #6e59400a;
  color: #705b49;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.care-needs-slot .stage-care-meta-heading { align-items: center; gap: 8px; }
.care-needs-slot .stage-care-meta-heading strong { font-size: 0.875rem; }
.care-needs-slot .stage-care-meta-heading small { font-size: 0.625rem; }
.care-needs-slot .stage-care-needs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 8px;
  overflow: visible;
  padding: 0;
}
.care-needs-slot .stage-need-chip {
  min-width: 0;
  max-width: none;
  padding: 9px 10px 10px;
  border-radius: 11px;
  background: #ffffffd9;
}
.care-needs-slot .stage-need-top { gap: 6px; }
.care-needs-slot .stage-need-icon { font-size: 0.8125rem; }
.care-needs-slot .stage-need-label { font-size: 0.625rem; }
.care-needs-slot .stage-need-value { font-size: 0.6875rem; }
.care-needs-slot .stage-need-track { height: 5px; margin-top: 7px; }
@media (max-width: 1060px) {
  .stage-workbench { grid-template-columns: 122px minmax(0, .98fr) minmax(0, 1.02fr); }
  .care-needs-slot .stage-care-strip { padding: 12px; }
  .care-needs-slot .stage-care-needs { gap: 6px; }
  .care-needs-slot .stage-need-chip { padding: 8px; }
}
@media (max-width: 760px) {
  .stage-workbench { grid-template-columns: minmax(0, 1fr); }
  .stage-navigation-rail { padding: 5px; }
  .care-needs-slot { margin-bottom: 8px; }
  .care-needs-slot .stage-care-strip { padding: 10px; gap: 9px; }
  .care-needs-slot .stage-care-needs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .care-needs-slot .stage-need-chip { padding: 7px 8px; }
  .care-needs-slot .stage-need-label { font-size: 0.5625rem; }
  .care-needs-slot .stage-need-value { font-size: 0.625rem; }
}

/* v0.12.15 build 139: Pocket Pals is one full-screen play surface, not a three-column website. */
html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  height: 100svh;
  min-height: 100svh;
  background: #eae8dc;
}

#app.app-shell {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #e9eadf;
}

#app > .topbar {
  position: absolute;
  z-index: 110;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  width: 100%;
  height: calc(70px + env(safe-area-inset-top, 0px));
  min-height: calc(70px + env(safe-area-inset-top, 0px));
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(8px, env(safe-area-inset-top, 0px)) clamp(12px, 2.2vw, 30px) 7px;
  border: 0;
  background: linear-gradient(180deg, #fffaf4ed 0%, #fffaf4c9 76%, #fffaf400 100%);
  box-shadow: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#app > .topbar .brand { flex: 0 0 auto; gap: 10px; }
#app > .topbar .brand-mark { width: 38px; height: 38px; flex-basis: 38px; border-radius: 13px; }
#app > .topbar .brand-copy strong { font-size: 1.1875rem; }
#app > .topbar .brand-copy small { font-size: 0.4375rem; }
#app > .topbar .topbar-right { gap: 7px; }
#app > .topbar .pal-switcher,
#app > .topbar #add-pal-top,
#app > .topbar .connection-pill { height: 32px; border-color: #ffffffb8; background: #ffffff9e; }
#app > .topbar .stage-header-tools > summary { min-height: 36px; border-color: #ffffffc9; background: #fffdf4dc; }
#app > .topbar .stage-header-tools-menu { z-index: 150; }

#app > .loading-screen,
#app > .adopt-screen {
  position: absolute;
  z-index: 80;
  inset: calc(70px + env(safe-area-inset-top, 0px)) 0 0;
  width: 100%;
  min-height: 0;
  max-width: none;
  margin: 0;
  overflow: auto;
}
#app > #loading-screen[hidden],
#app > #adopt-screen[hidden],
#app > #pet-screen[hidden] { display: none !important; }
#app > .loading-screen { background: #f8f3ec; }
#app > .adopt-screen.adopt-screen-flow {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(300px, 1.15fr);
  align-content: center;
  align-items: center;
  gap: clamp(18px, 4vw, 58px);
  padding: 22px clamp(16px, 4vw, 52px) 18px;
  background: linear-gradient(140deg, #f8f0e6, #f8f6eb 58%, #edf3e9);
}

#pet-screen.pet-screen {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #e8eadf;
}

#pet-screen > .stage-workbench {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
}

#stage-workbench > .stage-world-column {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #f7eade, #eaf1e4 52%, #cfe1d0);
  box-shadow: none;
}

#stage-workbench > .stage-world-column #offline-banner {
  top: calc(76px + env(safe-area-inset-top, 0px));
  left: 16px;
  right: 16px;
  width: auto;
}

#persistent-pet-stage.persistent-pet-stage,
#persistent-pet-stage > .pet-world.panel-card {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#persistent-pet-stage > .pet-world.panel-card { isolation: isolate; }

#persistent-pet-stage .shared-stage-layout {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
#persistent-pet-stage .shared-stage-layout > .world-scene,
#persistent-pet-stage .shared-stage-layout > .world-scene.is-isometric-home {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
#persistent-pet-stage .room-world {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#persistent-pet-stage .stage-top-bar {
  position: absolute;
  z-index: 60;
  top: calc(176px + env(safe-area-inset-top, 0px));
  left: 18px;
  right: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  width: auto;
  max-width: calc(100% - 36px);
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}
#persistent-pet-stage .stage-top-bar > * { pointer-events: auto; }
#persistent-pet-stage .stage-top-bar > .home-map-tools {
  position: static;
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  max-width: min(100%, 360px);
  padding: 4px;
  overflow-x: auto;
  border: 1px solid #ffffffd1;
  border-radius: 15px;
  background: #fffdf2e8;
  box-shadow: 0 5px 18px #53694b17;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#persistent-pet-stage .stage-top-bar > .home-map-tools button { min-width: 38px; min-height: 38px; }
#persistent-pet-stage .stage-top-bar > .stage-care-dock {
  position: static;
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  width: auto;
  max-width: min(56vw, 460px);
  margin: 0;
  padding: 5px;
  border-color: #ffffffdc;
  border-radius: 16px;
  background: #fffdf2e8;
  box-shadow: 0 5px 18px #53694b17;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#stage-workbench > .stage-navigation-rail {
  position: absolute;
  z-index: 95;
  inset: 0;
  display: block;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}
#stage-workbench .stage-rail-heading { display: none; }
#stage-workbench .stage-household-heading {
  position: absolute;
  top: calc(74px + env(safe-area-inset-top, 0px));
  left: 19px;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: #806f5f;
  font-size: 0.5rem;
  letter-spacing: .12em;
  pointer-events: none;
}
#stage-workbench .stage-household-heading small { display: none; }
#stage-workbench .stage-household-roster {
  position: absolute;
  top: calc(91px + env(safe-area-inset-top, 0px));
  left: 15px;
  right: min(450px, 33vw);
  display: flex;
  flex: none;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  width: auto;
  max-width: none;
  max-height: 48px;
  min-height: 0;
  padding: 2px 4px 5px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  background: transparent;
  pointer-events: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: #c9b9a5 transparent;
}
#stage-workbench .stage-pet-choice,
#stage-workbench .stage-pet-add {
  flex: 0 0 auto;
  width: auto;
  min-width: 76px;
  min-height: 44px;
  justify-content: flex-start;
  gap: 7px;
  padding: 4px 9px 4px 5px;
  border: 1px solid #ffffffd9;
  border-radius: 14px;
  background: #fffdf0d9;
  box-shadow: 0 3px 12px #4f614112;
  color: #786859;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  touch-action: manipulation;
}
#stage-workbench .stage-pet-choice.is-selected,
#stage-workbench .stage-pet-choice[aria-pressed="true"] {
  border-color: #e7a78f;
  background: #fff0e5ee;
  box-shadow: 0 4px 14px #d58b7130;
}
#stage-workbench .stage-pet-choice-avatar { width: 30px; height: 30px; flex-basis: 30px; }
#stage-workbench .stage-pet-choice-name { max-width: 92px; font-size: 0.625rem; }
#stage-workbench .stage-pet-add { min-width: 42px; width: 42px; justify-content: center; padding: 0; font-size: 1.125rem; }

#stage-workbench #pet-tabs.pet-tabs {
  position: absolute;
  z-index: 100;
  left: 50%;
  right: auto;
  bottom: max(13px, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex: none;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: max-content;
  max-width: calc(100vw - 28px);
  min-height: 0;
  margin: 0;
  padding: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  transform: translateX(-50%);
  border: 1px solid #ffffffde;
  border-radius: 21px;
  background: #fffdf0e8;
  box-shadow: 0 8px 26px #534c3b24, inset 0 1px #ffffff;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  scrollbar-width: none;
  pointer-events: auto;
  overscroll-behavior-inline: contain;
}
#stage-workbench #pet-tabs.pet-tabs::-webkit-scrollbar { display: none; }
#stage-workbench #pet-tabs .pet-tab {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 61px;
  min-height: 49px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 0.5rem;
  line-height: 1.2;
  text-align: center;
  touch-action: manipulation;
}
#stage-workbench #pet-tabs .pet-tab-icon { font-size: 1.0625rem; line-height: 1.15; }
#stage-workbench #pet-tabs .pet-tab.is-active,
#stage-workbench #pet-tabs .pet-tab[aria-selected="true"] {
  border-color: #edc2ad;
  background: linear-gradient(145deg, #fff1e8, #fffaf3);
  color: #8c5f50;
  box-shadow: 0 2px 8px #ae6a4c16;
}
#stage-workbench #pet-tabs .pet-tab:active { transform: scale(.96); }

#stage-workbench .park-inspector-dock {
  position: absolute;
  z-index: 82;
  top: calc(86px + env(safe-area-inset-top, 0px));
  right: 17px;
  width: min(400px, 32vw);
  height: auto;
  bottom: calc(91px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}
#stage-workbench .park-inspector-dock #park-inspector {
  height: 100%;
  max-height: none;
  overflow: auto;
  pointer-events: auto;
}

@media (max-width: 900px) {
  #stage-workbench .stage-household-roster { right: min(450px, 47vw); max-width: none; }
  #stage-workbench .stage-pet-choice-name { max-width: 72px; }
}

@media (max-width: 760px) {
  #app > .topbar {
    height: calc(57px + env(safe-area-inset-top, 0px));
    min-height: calc(57px + env(safe-area-inset-top, 0px));
    padding: max(6px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) 5px max(10px, env(safe-area-inset-left, 0px));
  }
  #app > .topbar .brand { gap: 8px; }
  #app > .topbar .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
  #app > .topbar .brand-copy { display: flex; }
  #app > .topbar .brand-copy strong { font-size: 1rem; }
  #app > .topbar .brand-copy small { font-size: 0.375rem; letter-spacing: 1px; }
  #app > .topbar .topbar-right { gap: 5px; }
  #app > .topbar .connection-pill { height: 29px; padding-inline: 8px; font-size: 0.5625rem; }
  #app > .topbar .stage-header-tools > summary { min-width: 34px; min-height: 34px; padding: 6px 8px; }
  #app > .topbar .stage-header-tools > summary span { display: none; }
  #stage-workbench .stage-household-heading { display: none; }
  #stage-workbench .stage-household-roster {
    top: calc(61px + env(safe-area-inset-top, 0px));
    left: max(7px, env(safe-area-inset-left, 0px));
    right: max(7px, env(safe-area-inset-right, 0px));
    max-height: 45px;
    gap: 5px;
    padding: 1px 2px 4px;
  }
  #stage-workbench .stage-pet-choice,
  #stage-workbench .stage-pet-add { min-height: 44px; padding: 4px 7px 4px 4px; border-radius: 13px; }
  #stage-workbench .stage-pet-choice { min-width: 67px; }
  #stage-workbench .stage-pet-choice-avatar { width: 29px; height: 29px; flex-basis: 29px; }
  #stage-workbench .stage-pet-choice-name { max-width: 66px; font-size: 0.5625rem; }
  #stage-workbench .stage-pet-add { min-width: 37px; width: 37px; }
  #persistent-pet-stage .stage-top-bar {
    top: calc(143px + env(safe-area-inset-top, 0px));
    left: max(8px, env(safe-area-inset-left, 0px));
    right: auto;
    max-width: calc(100vw - 16px);
    gap: 5px;
  }
  #persistent-pet-stage .stage-top-bar > .home-map-tools { max-width: min(100%, 330px); }
  #persistent-pet-stage .stage-top-bar > .home-map-tools button { min-width: 34px; min-height: 34px; }
  #persistent-pet-stage .stage-top-bar > .home-map-tools .stage-center-button { min-width: 0; padding-inline: 8px; }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock { max-width: calc(100vw - 16px); }
  #persistent-pet-stage .stage-care-actions { gap: 4px; }
  #persistent-pet-stage .stage-care-action { flex-basis: 51px; min-height: 43px; }
  #stage-workbench #pet-tabs.pet-tabs {
    left: max(7px, env(safe-area-inset-left, 0px));
    right: max(7px, env(safe-area-inset-right, 0px));
    bottom: max(7px, env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: none;
    justify-content: flex-start;
    padding: 5px;
    border-radius: 18px;
    transform: none;
  }
  #stage-workbench #pet-tabs .pet-tab { min-width: 53px; min-height: 47px; padding: 4px 5px; font-size: 0.4375rem; }
  #stage-workbench #pet-tabs .pet-tab-icon { font-size: 1rem; }
  #stage-workbench .park-inspector-dock {
    top: auto;
    right: 7px;
    left: 7px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    width: auto;
    height: min(48svh, 440px);
    max-height: 54svh;
  }
  #stage-workbench .park-inspector-dock #park-inspector { border-radius: 18px; }
  #app > .adopt-screen.adopt-screen-flow {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 14px;
    padding: 22px 12px 14px;
  }
  #app > .adopt-screen .adopt-intro { padding: 0 4px 4px; }
  #app > .adopt-screen .adopt-intro h1 { font-size: clamp(2rem, 9vw, 2.8125rem); margin-bottom: 10px; }
  #app > .adopt-screen .intro-copy { margin-bottom: 12px; font-size: 0.75rem; }
  #app > .adopt-screen .adopt-entry-actions { gap: 8px; }
  #app > .adopt-screen .adopt-entry-card { padding: 12px; }
}

@media (max-width: 390px) {
  #app > .topbar .brand-copy { display: none; }
  #app > .topbar .connection-pill span { display: none; }
  #persistent-pet-stage .stage-top-bar { top: calc(139px + env(safe-area-inset-top, 0px)); }
  #stage-workbench #pet-tabs .pet-tab { min-width: 49px; }
}

@media (max-height: 600px) and (orientation: landscape) {
  #app > .topbar { height: 55px; min-height: 55px; padding-block: 4px; }
  #stage-workbench .stage-household-heading { top: 57px; }
  #stage-workbench .stage-household-roster { top: 72px; }
  #persistent-pet-stage .stage-top-bar { top: 145px; }
  #stage-workbench .park-inspector-dock { top: 68px; bottom: 75px; height: auto; max-height: none; }
  #stage-workbench #pet-tabs.pet-tabs { bottom: 5px; }
}

/* v0.12.16 build 140: tidy the floating stage chrome without changing the world-first layout. */
#stage-workbench .stage-household-heading {
  top: calc(74px + env(safe-area-inset-top, 0px));
  left: 18px;
  z-index: 101;
  font-size: 0.5rem;
  letter-spacing: .14em;
}
#stage-workbench .stage-household-roster {
  top: calc(91px + env(safe-area-inset-top, 0px));
  left: 14px;
  right: 14px;
  max-width: none;
  max-height: 49px;
  gap: 7px;
  padding: 2px 4px 5px;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 0%, #000 94%, #0000 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 94%, #0000 100%);
}
#stage-workbench .stage-household-roster::-webkit-scrollbar { display: none; }
#stage-workbench .stage-pet-choice,
#stage-workbench .stage-pet-add {
  min-height: 44px;
  border-radius: 15px;
  box-shadow: 0 3px 12px #4f61410d, inset 0 1px #ffffff;
}
#stage-workbench .stage-pet-choice-name { max-width: 112px; font-size: 0.625rem; }
#persistent-pet-stage .stage-top-bar {
  top: calc(176px + env(safe-area-inset-top, 0px));
  right: 18px;
  left: 18px;
  display: block;
  width: auto;
  max-width: none;
  height: 0;
  overflow: visible;
}
#persistent-pet-stage .stage-top-bar > .home-map-tools {
  position: absolute;
  top: 0;
  right: auto;
  bottom: auto;
  left: 0;
  width: max-content;
  max-width: min(360px, calc(46vw - 20px));
  padding: 4px;
  border-radius: 15px;
  background: #fffdf2e8;
  box-shadow: 0 5px 18px #53694b17, inset 0 1px #ffffff;
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock {
  position: absolute;
  top: 0;
  right: 0;
  bottom: auto;
  left: auto;
  width: min(420px, calc(52vw - 24px));
  max-width: none;
  margin: 0;
  padding: 5px;
  border-radius: 15px;
  background: #fffdf2e8;
  box-shadow: 0 5px 18px #53694b17, inset 0 1px #ffffff;
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock .stage-care-actions { gap: 5px; }
#persistent-pet-stage .stage-top-bar > .stage-care-dock .stage-care-action {
  flex-basis: 52px;
  min-height: 46px;
  border-radius: 11px;
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock .stage-care-action-icon { font-size: 1rem; }
#persistent-pet-stage .stage-top-bar > .stage-care-dock .stage-care-action-label { font-size: 0.5rem; }
#persistent-pet-stage 
#persistent-pet-stage 
#persistent-pet-stage 
#persistent-pet-stage 
#persistent-pet-stage .home-moment-copy-wrap h3 { display: -webkit-box; margin: 0; overflow: hidden; font-size: 0.75rem; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
#persistent-pet-stage .home-moment-copy-wrap > p:last-child { display: -webkit-box; margin: 3px 0 0; overflow: hidden; font-size: 0.5625rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
#persistent-pet-stage 

@media (max-width: 900px) {
  #stage-workbench .stage-household-roster { right: 14px; }
  #stage-workbench .stage-pet-choice-name { max-width: 112px; }
  #persistent-pet-stage .stage-top-bar > .home-map-tools { max-width: min(350px, calc(46vw - 20px)); }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock { width: min(405px, calc(52vw - 24px)); }
}

@media (max-width: 760px) {
  #stage-workbench .stage-household-heading { display: none; }
  #stage-workbench .stage-household-roster {
    top: calc(61px + env(safe-area-inset-top, 0px));
    left: max(7px, env(safe-area-inset-left, 0px));
    right: max(7px, env(safe-area-inset-right, 0px));
    max-height: 47px;
    gap: 5px;
    padding: 1px 2px 4px;
  }
  #persistent-pet-stage .stage-top-bar {
    top: calc(143px + env(safe-area-inset-top, 0px));
    left: max(8px, env(safe-area-inset-left, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    width: auto;
    height: 0;
  }
  #persistent-pet-stage .stage-top-bar > .home-map-tools {
    top: 0;
    left: 0;
    right: auto;
    width: max-content;
    max-width: min(100%, 330px);
  }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock {
    position: fixed;
    top: auto;
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: calc(188px + env(safe-area-inset-bottom, 0px));
    left: max(8px, env(safe-area-inset-left, 0px));
    width: auto;
    max-width: none;
    padding: 5px;
  }
}

@media (max-width: 390px) {
  #persistent-pet-stage .stage-top-bar > .stage-care-dock { bottom: calc(184px + env(safe-area-inset-bottom, 0px)); }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock .stage-care-action { flex-basis: 49px; min-height: 44px; }
}

@media (max-height: 600px) and (orientation: landscape) {
  #stage-workbench .stage-household-heading { top: 57px; }
  #stage-workbench .stage-household-roster { top: 72px; }
  #persistent-pet-stage .stage-top-bar { top: 145px; }
}


/* v0.12.20 build 144: a single full-width stage dock owns household and map controls. */
#persistent-pet-stage .stage-top-bar {
  position: absolute;
  z-index: 112;
  top: max(10px, env(safe-area-inset-top, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  overflow: visible;
  pointer-events: none;
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock {
  position: relative;
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #ffffffdf;
  border-radius: 18px;
  background: #fffdf2ed;
  box-shadow: 0 6px 20px #53694b18, inset 0 1px #ffffff;
  backdrop-filter: blur(13px) saturate(1.08);
  -webkit-backdrop-filter: blur(13px) saturate(1.08);
  pointer-events: auto;
}
#persistent-pet-stage .stage-care-dock[hidden] { display: none !important; }
.stage-household-picker {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  min-width: 0;
  pointer-events: auto;
}
.stage-household-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: min(245px, 34vw);
  min-height: 40px;
  padding: 5px 10px 5px 6px;
  border: 1px solid #e8e0d1;
  border-radius: 13px;
  background: #fffefa;
  color: #715e4d;
  box-shadow: 0 2px 7px #62533b0b;
  font-size: 0.6875rem;
  font-weight: 850;
  touch-action: manipulation;
}
.stage-household-toggle:hover,
.stage-household-toggle.is-open { border-color: #e4b29e; background: #fff6ef; }
.stage-household-current-avatar {
  display: grid;
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid #ffffff;
  border-radius: 10px;
  background: var(--stage-pet-colour, #f2eadc);
  font-size: 1rem;
}
.stage-household-toggle-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-household-count {
  flex: 0 0 auto;
  color: #a18e7b;
  font-size: 0.5625rem;
  font-weight: 750;
}
.stage-household-chevron {
  flex: 0 0 auto;
  margin-left: auto;
  color: #9b8876;
  font-size: 0.9375rem;
  line-height: 1;
  transition: transform .16s ease;
}
.stage-household-toggle.is-open .stage-household-chevron { transform: rotate(180deg); }
.stage-household-menu {
  position: absolute;
  z-index: 130;
  top: calc(100% + 8px);
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(290px, calc(100vw - 28px));
  max-height: min(46svh, 390px);
  padding: 9px;
  border: 1px solid #e7ded1;
  border-radius: 17px;
  background: #fffdfa;
  box-shadow: 0 14px 38px #453a2b2a, inset 0 1px #ffffff;
  pointer-events: auto;
}
.stage-household-menu[hidden] { display: none !important; }
.stage-household-menu-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 3px 6px;
  border-bottom: 1px solid #f0e8de;
  color: #a28c7a;
  font-size: 0.5rem;
  font-weight: 950;
  letter-spacing: .12em;
}
.stage-household-menu-heading span {
  color: #b09e8d;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0;
}
#stage-workbench .stage-household-menu .stage-household-roster {
  position: static;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  max-width: none;
  max-height: min(38svh, 320px);
  min-height: 0;
  padding: 1px 2px 3px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  background: transparent;
  mask-image: none;
  -webkit-mask-image: none;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d4c6b6 transparent;
}
#stage-workbench .stage-household-menu .stage-pet-choice,
#stage-workbench .stage-household-menu .stage-pet-add {
  flex: 0 0 auto;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  color: #786859;
  text-align: left;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#stage-workbench .stage-household-menu .stage-pet-choice:hover,
#stage-workbench .stage-household-menu .stage-pet-choice.is-selected,
#stage-workbench .stage-household-menu .stage-pet-choice[aria-pressed="true"] {
  border-color: #e7c5b5;
  background: #fff2ea;
}
#stage-workbench .stage-household-menu .stage-pet-choice-name { max-width: none; font-size: 0.625rem; }
#stage-workbench .stage-household-menu .stage-pet-add {
  justify-content: center;
  min-height: 38px;
  border: 1px dashed #e6d9ca;
  color: #9b7d6b;
  font-size: 0.625rem;
  font-weight: 800;
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock .home-map-tools {
  position: static;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  width: auto;
  max-width: none;
  min-width: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  scrollbar-width: thin;
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock .home-map-tools button {
  flex: 0 0 auto;
  min-width: 38px;
  min-height: 38px;
  padding: 5px 9px;
  border: 1px solid #dce5d1;
  border-radius: 11px;
  background: #fffefa;
  color: #637e56;
  font-size: 0.6875rem;
  font-weight: 850;
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock .home-map-tools .park-map-zoom-readout {
  flex: 0 0 auto;
  min-width: 42px;
  padding-inline: 2px;
  color: #738566;
  font-size: 0.625rem;
  font-weight: 900;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.stage-care-action-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding-top: 6px;
  border-top: 1px solid #eee8dc;
}
.stage-care-action-row[hidden] { display: none !important; }
#persistent-pet-stage .stage-care-action-row .stage-care-actions {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 2px 4px;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}
#persistent-pet-stage .stage-care-action-row .stage-care-action {
  flex: 0 0 62px;
  min-height: 46px;
  border-radius: 12px;
}
#persistent-pet-stage .stage-care-action-row .stage-household-tidy {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid #e7dfd1;
  border-radius: 12px;
  background: #fffefa;
  color: #7c6c59;
  font-size: 0.5625rem;
  font-weight: 850;
}
#persistent-pet-stage .stage-care-action-row .stage-household-tidy[hidden] { display: none !important; }
#persistent-pet-stage .stage-top-bar > .stage-care-dock.has-submenu {
  align-items: stretch;
  max-height: min(58svh, 480px);
  overflow: visible;
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock.has-submenu .stage-care-actions.is-submenu {
  max-height: min(30svh, 230px);
}
#persistent-pet-stage .shared-stage-layout.park-scene-active > .stage-top-bar > .stage-care-dock,
#persistent-pet-stage .stage-top-bar.is-park-view > .stage-care-dock,
#persistent-pet-stage .stage-top-bar.is-decorating > .stage-care-dock {
  display: flex !important;
}
#persistent-pet-stage .stage-top-bar.is-park-view .stage-care-action-row,
#persistent-pet-stage .stage-top-bar.is-decorating .stage-care-action-row { display: none !important; }
#persistent-pet-stage .stage-top-bar.is-park-view .park-top-zone-filters { top: 112px; }

@media (max-width: 760px) {
  #persistent-pet-stage .stage-top-bar {
    top: max(7px, env(safe-area-inset-top, 0px));
    left: max(7px, env(safe-area-inset-left, 0px));
    right: max(7px, env(safe-area-inset-right, 0px));
  }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock { gap: 5px; padding: 6px; border-radius: 15px; }
  .stage-household-toggle { max-width: min(150px, 40vw); min-height: 38px; gap: 5px; padding: 4px 7px 4px 4px; }
  .stage-household-current-avatar { flex-basis: 28px; width: 28px; height: 28px; }
  .stage-household-toggle-label { max-width: 7ch; font-size: 0.625rem; }
  .stage-household-count { display: none; }
  .stage-household-chevron { font-size: 0.8125rem; }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock .home-map-tools { justify-content: flex-start; gap: 3px; }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock .home-map-tools button { min-width: 33px; min-height: 36px; padding-inline: 6px; }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock .home-map-tools .stage-center-button { min-width: 0; padding-inline: 7px; }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock .home-map-tools .stage-center-button span { font-size: 0.5rem; }
  #persistent-pet-stage .stage-care-action-row { gap: 4px; padding-top: 5px; }
  #persistent-pet-stage .stage-care-action-row .stage-care-actions { gap: 4px; }
  #persistent-pet-stage .stage-care-action-row .stage-care-action { flex-basis: 53px; min-height: 42px; }
  #persistent-pet-stage .stage-care-action-row .stage-household-tidy { padding: 5px 7px; font-size: 0.5rem; }
  .stage-household-menu { width: min(270px, calc(100vw - 24px)); max-height: min(44svh, 340px); }
  #stage-workbench .stage-household-menu .stage-household-roster { max-height: min(36svh, 280px); }
}
@media (max-width: 390px) {
  .stage-household-toggle { max-width: 122px; }
  .stage-household-toggle-label { max-width: 5ch; }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock .home-map-tools .stage-center-button span { display: none; }
  #persistent-pet-stage .stage-care-action-row .stage-care-action { flex-basis: 49px; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-household-chevron { transition: none !important; }
}

/* Park zone chips clear the unified dock while preserving a compact filter row. */
#persistent-pet-stage .shared-stage-layout.park-scene-active .park-top-zone-filters { top: 112px; }

/* v0.12.20 build 144: contextual chins, forehead keepsakes, aside Journal, and true full-screen destinations. */
.stage-tab-sources { display: none !important; }
#stage-workbench .stage-navigation-rail { z-index: 122; }
#stage-workbench .stage-world-column { z-index: 1; }

#persistent-pet-stage .stage-top-bar {
  z-index: 132;
  display: block;
  height: auto;
  overflow: visible;
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock {
  display: flex !important;
  width: 100%;
  max-width: none;
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock[hidden] { display: none !important; }
.stage-feature-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 0;
  margin-top: 7px;
  pointer-events: auto;
}
.stage-feature-controls:empty { display: none; }
.stage-feature-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #ffffffdf;
  border-radius: 13px;
  background: #fffdf2f2;
  color: #786957;
  box-shadow: 0 5px 15px #53694b19, inset 0 1px #fff;
  font-size: 0.625rem;
  font-weight: 850;
  line-height: 1.1;
  touch-action: manipulation;
  backdrop-filter: blur(13px) saturate(1.08);
  -webkit-backdrop-filter: blur(13px) saturate(1.08);
}
.stage-feature-toggle[aria-expanded="true"] {
  border-color: #eac4b0;
  background: linear-gradient(140deg,#fff0e6,#fffaf1);
  color: #8c5e4c;
}
.stage-feature-toggle:active { transform: scale(.97); }
.stage-feature-toggle[hidden] { display: none !important; }
.stage-chin-layer {
  position: absolute;
  z-index: 150;
  top: 100%;
  left: 0;
  right: 0;
  display: block;
  width: 100%;
  margin-top: 8px;
  pointer-events: none;
}
.stage-chin-panel {
  width: min(760px, 100%);
  max-height: min(56svh, 510px);
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #ffffffed;
  border-radius: 19px;
  background: #fffdf5f5;
  box-shadow: 0 15px 42px #3d46322b, inset 0 1px #ffffff;
  backdrop-filter: blur(20px) saturate(1.14);
  -webkit-backdrop-filter: blur(20px) saturate(1.14);
  pointer-events: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d7cbb9 transparent;
}
.stage-chin-panel[hidden] { display: none !important; }
.stage-chin-panel-heading,
.stage-popover-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  margin: 0 0 9px;
  color: #776754;
  font-size: 0.6875rem;
  font-weight: 900;
}
.stage-popover-close {
  display: grid;
  flex: 0 0 31px;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid #e9dfd1;
  border-radius: 10px;
  background: #fffaf2;
  color: #806f5f;
  font-size: 1.1875rem;
  line-height: 1;
}
.stage-chin-content { min-width: 0; }
#stage-care-chin .stage-care-strip {
  display: grid;
  grid-template-columns: minmax(105px, .36fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 8px 2px 2px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#stage-care-chin .stage-care-meta-heading { display: grid; gap: 3px; }
#stage-care-chin .stage-care-meta-heading strong { color: #665b4e; font-size: 0.75rem; }
#stage-care-chin .stage-care-meta-heading small { color: #968878; font-size: 0.5625rem; }
#stage-care-chin .stage-care-needs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
#stage-care-chin .stage-need-chip { min-width: 0; padding: 8px 9px; border-radius: 11px; }
#stage-care-chin .egg-care-card { margin: 0; }
#stage-arcade-chin-body .arcade-card,
#stage-arcade-chin-body > .arcade-card { margin: 0; border: 0; padding: 2px; background: transparent; box-shadow: none; }
#stage-arcade-chin-body .section-heading { margin-bottom: 10px; }
#stage-arcade-chin-body .section-heading h2 { font-size: 1.0625rem; }
#stage-arcade-chin-body .section-subtitle { font-size: 0.625rem; }
#stage-arcade-chin-body .arcade-games { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
#stage-arcade-chin-body .game-card { min-height: 120px; padding: 10px; }
#stage-adventures-chin-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: 10px; }
#stage-adventures-chin-body > .economy-subpanel { min-width: 0; margin: 0; padding: 10px; border: 1px solid #eee4d7; border-radius: 13px; background: #fffefa; }
#stage-adventures-chin-body .economy-subheading { flex-wrap: wrap; gap: 4px 8px; }
#stage-adventures-chin-body .outing-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
#stage-keepsake-control { position: absolute; z-index: 140; left: 50%; bottom: calc(13px + env(safe-area-inset-bottom,0px) + 65px); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 24px); pointer-events: auto; }
.stage-keepsakes-toggle { min-height: 34px; border-radius: 12px 12px 10px 10px; }
.stage-keepsakes-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  width: min(390px,calc(100vw - 24px));
  max-height: min(54svh,440px);
  padding: 12px;
  overflow: auto;
  transform: translateX(-50%);
  border: 1px solid #ffffffed;
  border-radius: 18px;
  background: #fffdf5f7;
  box-shadow: 0 14px 40px #3d46322b, inset 0 1px #fff;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.stage-keepsakes-popover[hidden] { display:none !important; }
#stage-keepsakes-mount .collection-panel { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
#stage-keepsakes-mount .collection-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }

/* Dedicated screens replace the workspace card. They cover the stage, not the browser page. */
.stage-fullscreen-view {
  position: absolute;
  z-index: 180;
  inset: 0;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(145deg,#f8f1e7 0%,#f7f7ed 54%,#edf4e9 100%);
}
.stage-fullscreen-view[hidden] { display: none !important; }
.stage-fullscreen-head {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 66px;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 9px clamp(12px,3vw,28px);
  border-bottom: 1px solid #e9dfd2;
  background: #fffdf3ed;
  box-shadow: 0 4px 15px #5b513e0a;
}
.stage-fullscreen-head h2 { flex: 1 1 auto; min-width: 0; margin: 0; color: #5e564b; font-family: var(--round); font-size: clamp(1.0625rem,2.4vw,1.5rem); font-weight: 900; }
.stage-fullscreen-mark { color: #d89d82; font-size: 1.375rem; }
.stage-fullscreen-back {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 142px;
  min-height: 46px;
  padding: 9px 15px 9px 11px;
  border: 1px solid #c9d6bd;
  border-radius: 14px;
  background: linear-gradient(180deg,#ffffff 0%,#f2f7eb 100%);
  box-shadow: 0 3px 10px #52634414, inset 0 1px #fff;
  color: #496047;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.stage-fullscreen-back:hover { background: #edf5e5; box-shadow: 0 5px 14px #52634420, inset 0 1px #fff; transform: translateY(-1px); }
.stage-fullscreen-back:active { transform: scale(.97); }
.stage-fullscreen-back:focus-visible { outline: 3px solid #89a979; outline-offset: 3px; }
.stage-fullscreen-back-arrow { display: grid; flex: 0 0 25px; width: 25px; height: 25px; place-items: center; border-radius: 9px; background: #e4eedb; font-size: 1.0625rem; line-height: 1; }
.stage-screen-host {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: clamp(12px,2.2vw,25px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.stage-screen-host > .tab-panel {
  display: block;
  width: min(1180px,100%);
  min-height: 100%;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.stage-screen-host > .tab-panel[hidden] { display:none !important; }
.stage-screen-host > #tab-panel-shop > #shop-card,
.stage-screen-host > #tab-panel-friends > #friends-card,
.stage-screen-host > #tab-panel-adoption > #adoption-center-panel {
  width: 100%;
  margin: 0 auto;
  padding: clamp(16px,2.5vw,28px);
  border: 1px solid #e9dfd5;
  border-radius: 22px;
  background: #fffefaed;
  box-shadow: 0 8px 30px #6c604912;
}
.stage-screen-host > #tab-panel-friends > .household-overview { width: 100%; margin: 0 0 14px; }
.stage-screen-host > #tab-panel-help .help-page { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; max-width: 1160px; margin: 0 auto; }
.stage-screen-host > #tab-panel-help .help-intro { grid-column: 1/-1; }
.stage-screen-host > #tab-panel-help .help-closing { grid-column: 1/-1; }


/* Toy play is an ordinary care choice until the Pal's needs make it useful.
   The Explore destination keeps its own steady play accent. */
#pet-tabs [data-tab-target="explore"] { --play-accent: #78966d; }
#stage-care-actions [data-stage-care-action="play"].is-recommended { border-color: #cfddc4; background: #f1f7ed; }
#stage-care-actions [data-stage-care-action="play"].is-recommended .stage-care-action-label { color: #4f704a; }
#stage-care-actions [data-stage-care-action="play"].is-recommended:hover:not(:disabled) { border-color: #a9c39a; background: #e7f2df; }
#pet-tabs [data-tab-target="explore"] .pet-tab-icon { color: #78966d; }
#pet-tabs [data-tab-target="explore"][aria-selected="true"] { border-color: #bfd2b2; background: #edf5e8; color: #456347; }

/* Journal is an inspector, not a screen. Keep the stage visible behind it. */
.stage-journal-inspector {
  position: absolute;
  z-index: 155;
  top: max(12px,env(safe-area-inset-top,0px));
  right: max(12px,env(safe-area-inset-right,0px));
  bottom: calc(91px + env(safe-area-inset-bottom,0px));
  display: flex;
  width: min(430px,42vw);
  min-width: 300px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #ffffffec;
  border-radius: 21px;
  background: #fffdf5f7;
  box-shadow: 0 15px 44px #3d46322b, inset 0 1px #fff;
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}
.stage-journal-inspector[hidden] { display:none !important; }
.stage-inspector-head { display:flex; flex:0 0 59px; align-items:center; justify-content:space-between; gap:10px; padding:8px 12px 8px 16px; border-bottom:1px solid #ece3d8; }
.stage-inspector-head .eyebrow { margin:0 0 1px; font-size:0.4375rem; }
.stage-inspector-head h2 { margin:0; color:#655b50; font-family:var(--round); font-size:1.0625rem; }
.stage-inspector-close { width:38px; height:38px; border:1px solid #e9dfd1; border-radius:11px; background:#fffaf2; color:#806f5f; font-size:1.3125rem; }
.stage-journal-mount { flex:1 1 auto; min-height:0; overflow:auto; padding:11px; overscroll-behavior:contain; }
.stage-journal-mount > #tab-panel-memories { display:block; width:100%; padding:0; border:0; background:transparent; overflow:visible; }
.stage-journal-mount .lower-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; margin:0; }
.stage-journal-mount .journal-card,
.stage-journal-mount .evolution-card,
.stage-journal-mount .keepsake-card,
.stage-journal-mount .household-overview { margin:0 0 10px; padding:12px; border:1px solid #ece3d8; border-radius:14px; background:#fffefa; box-shadow:none; }
.stage-journal-mount .section-heading { gap:7px; margin-bottom:8px; }
.stage-journal-mount .section-heading h2 { font-size:0.9375rem; }
.stage-journal-mount .section-subtitle,
.stage-journal-mount .keepsake-main-copy,
.stage-journal-mount .keepsake-passport-copy { font-size:0.5625rem; line-height:1.55; }
.stage-journal-mount .journal-list { gap:7px; }
.stage-journal-mount .keepsake-card { display:block; }
.stage-journal-mount .keepsake-message { padding:0; }
.stage-journal-mount .keepsake-passport { margin-top:10px; }

/* The existing visitor passport uses the same contained side-inspector treatment. */
#stage-workbench .park-inspector-dock { z-index:160; pointer-events:none; }
#stage-workbench .park-inspector { max-width:min(430px,42vw); }
#stage-workbench .park-inspector-dock #park-inspector { pointer-events:auto; }

@media (max-width:760px) {
  .stage-feature-controls { gap:5px; margin-top:5px; }
  .stage-feature-toggle { min-height:33px; padding:6px 9px; font-size:0.5625rem; }
  .stage-chin-layer { margin-top:5px; }
  .stage-chin-panel { width:100%; max-height:min(54svh,450px); padding:9px; border-radius:15px; }
  #stage-care-chin .stage-care-strip { grid-template-columns:minmax(0,1fr); gap:7px; }
  #stage-care-chin .stage-care-needs { grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
  #stage-adventures-chin-body { grid-template-columns:minmax(0,1fr); }
  #stage-adventures-chin-body .outing-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #stage-arcade-chin-body .arcade-games { grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; }
  #stage-arcade-chin-body .game-card { min-height:104px; padding:6px; }
  #stage-keepsake-control { bottom:calc(13px + env(safe-area-inset-bottom,0px) + 62px); }
  .stage-keepsakes-toggle { min-height:31px; padding:5px 9px; font-size:0.5625rem; }
  .stage-fullscreen-head { flex-basis:57px; gap:8px; padding-inline:9px; }
  .stage-fullscreen-back { min-width:112px; min-height:42px; gap:6px; padding:7px 9px 7px 7px; font-size:0.625rem; }
  .stage-fullscreen-back-arrow { flex-basis:23px; width:23px; height:23px; }
  .stage-screen-host { padding:9px; }
  .stage-screen-host > #tab-panel-help .help-page { grid-template-columns:minmax(0,1fr); gap:9px; }
  .stage-journal-inspector { top:max(7px,env(safe-area-inset-top,0px)); right:7px; left:7px; bottom:calc(82px + env(safe-area-inset-bottom,0px)); width:auto; min-width:0; border-radius:17px; }
  .stage-journal-mount { padding:8px; }
}
@media (max-width:390px) {
  #stage-arcade-chin-body .game-card { min-height:94px; }
  #stage-arcade-chin-body .game-card small { font-size:0.4375rem; }
  .stage-feature-toggle { gap:5px; padding-inline:7px; }
}
@media (prefers-reduced-motion:reduce) {
  .stage-chin-panel,.stage-keepsakes-popover,.stage-journal-inspector,.stage-fullscreen-view { transition:none !important; }
}


/* v0.12.23 build 147: chins grow from their bars instead of floating over the world. */
#persistent-pet-stage .stage-top-bar {
  height: auto;
  overflow: visible;
  pointer-events: none;
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock {
  position: relative;
  inset: auto;
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  overflow: visible;
  padding: 8px 10px;
  border: 1px solid #ffffffdf;
  border-radius: 18px;
  background: #fffdf2ed;
  box-shadow: 0 6px 20px #53694b18, inset 0 1px #ffffff;
  backdrop-filter: blur(13px) saturate(1.08);
  -webkit-backdrop-filter: blur(13px) saturate(1.08);
  pointer-events: auto;
}
#persistent-pet-stage .stage-care-dock > .stage-care-action-row,
#persistent-pet-stage .stage-care-dock > .stage-care-meta,
#persistent-pet-stage .stage-care-dock > .stage-care-needs,
#persistent-pet-stage .stage-care-dock > .stage-care-egg-body,
#persistent-pet-stage .stage-care-action-row .stage-feature-controls,
#persistent-pet-stage .stage-care-dock > .stage-chin-layer {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
}
#persistent-pet-stage .stage-care-dock > .stage-care-action-row { margin: 0; }
#persistent-pet-stage .stage-care-dock > .stage-care-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  padding: 7px 2px 0;
  border-top: 1px solid #e9e3d7;
}
#persistent-pet-stage .stage-care-meta .stage-care-meta-heading { flex: 1 1 auto; }
#persistent-pet-stage .stage-care-meta .stage-popover-close { flex-basis: 28px; width: 28px; height: 28px; }
#persistent-pet-stage .stage-care-dock > .stage-care-needs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
  padding: 0 1px 2px;
  overflow: visible;
}
#persistent-pet-stage .stage-care-dock > .stage-care-needs[hidden],
#persistent-pet-stage .stage-care-dock > .stage-care-meta[hidden],
#persistent-pet-stage .stage-care-dock > .stage-care-egg-body[hidden],
#persistent-pet-stage .stage-chin-panel[hidden] { display: none !important; }
#persistent-pet-stage .stage-care-dock > .stage-care-egg-body { max-height: min(32svh, 260px); overflow: auto; }
#persistent-pet-stage .stage-care-action-row .stage-feature-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding-top: 1px;
}
#persistent-pet-stage .stage-care-action-row .stage-feature-controls:empty { display: none; }
#persistent-pet-stage .stage-chin-layer {
  position: static;
  inset: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  margin: 0;
  pointer-events: auto;
}
#persistent-pet-stage .stage-chin-panel {
  position: relative;
  width: 100%;
  max-width: none;
  max-height: min(44svh, 390px);
  margin: 0;
  border-radius: 14px;
  box-shadow: inset 0 1px #ffffff, 0 3px 12px #3d46320d;
  animation: stage-chin-grow .18s ease-out both;
}
@keyframes stage-chin-grow {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
#persistent-pet-stage .stage-care-dock.has-chin { gap: 7px; }
#persistent-pet-stage .stage-care-dock.has-chin > .stage-feature-controls { margin-top: 0; }

/* The lower dock stays separate from contextual room controls. */
#stage-workbench .stage-bottom-dock {
  position: absolute;
  z-index: 100;
  left: 50%;
  right: auto;
  bottom: max(13px, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: max-content;
  max-width: calc(100vw - 20px);
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  pointer-events: none;
}
#stage-workbench .stage-bottom-dock > * { pointer-events: auto; }
#stage-workbench #pet-tabs.pet-tabs {
  position: relative;
  z-index: 1;
  inset: auto;
  display: flex;
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  min-height: 0;
  margin: 0;
  transform: none;
  overflow-x: auto;
  overflow-y: visible;
}
#stage-workbench .stage-keepsake-control {
  position: relative;
  z-index: 2;
  inset: auto;
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 0 -1px;
  transform: none;
  pointer-events: auto;
}
#stage-workbench .stage-keepsake-control[hidden] { display: none !important; }
#stage-workbench .stage-keepsakes-toggle {
  min-height: 31px;
  padding: 5px 13px;
  border-radius: 12px 12px 8px 8px;
  box-shadow: 0 -3px 12px #534c3b12, inset 0 1px #fff;
}
#stage-workbench .stage-keepsakes-popover {
  position: absolute;
  z-index: 3;
  left: 50%;
  right: auto;
  bottom: calc(100% + 7px);
  width: min(390px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: min(54svh, 440px);
  margin: 0;
  transform: translateX(-50%);
  overflow: auto;
}
#stage-workbench .stage-keepsakes-popover[hidden] { display: none !important; }
@media (max-width: 760px) {
  #persistent-pet-stage .stage-care-dock > .stage-care-needs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock { width: 100%; max-width: none; }
  #stage-workbench .stage-bottom-dock { left: max(7px, env(safe-area-inset-left, 0px)); right: max(7px, env(safe-area-inset-right, 0px)); bottom: max(7px, env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; transform: none; }
  #stage-workbench #pet-tabs.pet-tabs { width: 100%; max-width: none; }
  #stage-workbench .stage-keepsake-control { align-self: center; }
  #persistent-pet-stage .stage-chin-panel { max-height: min(42svh, 330px); padding: 8px; }
}
@media (max-width: 390px) {
  #stage-workbench #pet-tabs .pet-tab { min-width: 45px; }
  #stage-workbench .stage-keepsake-control { max-width: calc(100vw - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  #persistent-pet-stage .stage-chin-panel { animation: none !important; }
}

/* Keep the navigation dock above the stage content. */
#stage-workbench > .stage-navigation-rail { z-index: 155; }
#stage-workbench .stage-bottom-dock { z-index: 160; }


/* v0.12.23 build 147: one merged top control row, below the app header. */
#persistent-pet-stage .stage-top-bar {
  top: calc(78px + env(safe-area-inset-top, 0px));
}
#persistent-pet-stage .stage-care-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding-top: 0;
  border-top: 0;
}
#persistent-pet-stage .stage-care-action-row[hidden] { display: none !important; }
#persistent-pet-stage .stage-care-action-row > .stage-household-picker {
  order: 0;
  flex: 0 1 auto;
  min-width: 0;
}
#persistent-pet-stage .stage-care-action-row .home-map-tools {
  order: 1;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
}
#persistent-pet-stage .stage-care-action-row > .stage-care-actions {
  order: 2;
  flex: 1 1 190px;
  min-width: 0;
}
#persistent-pet-stage .stage-care-action-row > .stage-household-tidy {
  order: 3;
}
#persistent-pet-stage .stage-care-action-row > .stage-care-actions[hidden] { display: none !important; }
#persistent-pet-stage .stage-top-bar.is-park-view .stage-care-action-row > .stage-care-actions,
#persistent-pet-stage .stage-top-bar.is-decorating .stage-care-action-row > .stage-care-actions { display: none !important; }
#persistent-pet-stage .stage-top-bar.is-park-view .stage-care-action-row,
#persistent-pet-stage .stage-top-bar.is-decorating .stage-care-action-row {
  display: flex !important;
  padding-top: 0;
  border-top: 0;
}
#persistent-pet-stage .stage-care-action-row > .stage-care-actions:not([hidden]) { display: flex; }
@media (max-width: 760px) {
  #persistent-pet-stage .stage-top-bar {
    top: calc(64px + env(safe-area-inset-top, 0px));
  }
  #persistent-pet-stage .stage-care-action-row { gap: 5px; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker { flex: 0 1 auto; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools { flex: 1 1 auto; margin-left: auto; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions { flex: 1 1 100%; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy { margin-left: auto; }
}
@media (max-width: 390px) {
  #persistent-pet-stage .stage-top-bar { top: calc(64px + env(safe-area-inset-top, 0px)); }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button span { display: none; }
}
@media (max-height: 600px) and (orientation: landscape) {
  #persistent-pet-stage .stage-top-bar { top: calc(62px + env(safe-area-inset-top, 0px)); }
}

/* Legacy stage-control positioning; superseded by the v0.13.27 upper-toolbar layout below. */
#stage-workbench #stage-bottom-dock { align-items:center; }
#stage-workbench #stage-keepsake-control,
#stage-workbench #stage-park-map-control { position:relative; z-index:2; display:block; width:max-content; max-width:100%; margin:0 0 -1px; transform:none; pointer-events:auto; }
#stage-workbench #stage-park-map-control[hidden] { display:none !important; }
#stage-workbench #stage-park-map-toggle { min-height:31px; padding:5px 13px; border-radius:12px 12px 8px 8px; box-shadow:0 -3px 12px #534c3b12,inset 0 1px #fff; }
#stage-park-map-mount .park-map-zone-filters { display:flex; flex-wrap:wrap; gap:7px; margin:0; }
#stage-park-map-popover { width:min(420px,calc(100vw - 24px)); }
#stage-park-map-popover[hidden] { display:none !important; }
#stage-park-map-mount .park-map-zone-chip { min-height:34px; }

/* Legacy bottom-control layout; superseded by the v0.13.27 upper-toolbar layout below. */
#stage-workbench .stage-bottom-forehead {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  width: max-content;
  max-width: calc(100vw - 24px);
  margin: 0 0 -1px;
  pointer-events: auto;
}
#stage-workbench .stage-bottom-forehead > .stage-feature-control {
  position: static;
  inset: auto;
  display: block;
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  margin: 0;
  transform: none;
  pointer-events: auto;
}
#stage-workbench .stage-bottom-forehead > .stage-feature-control[hidden] { display: none !important; }
#stage-workbench .stage-bottom-forehead .stage-keepsakes-popover {
  position: absolute;
  z-index: 5;
  left: 50%;
  right: auto;
  bottom: calc(100% + 7px);
  width: min(420px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: min(54svh, 440px);
  margin: 0;
  transform: translateX(-50%);
  overflow: auto;
}
#stage-workbench .stage-bottom-forehead .stage-keepsakes-popover[hidden] { display: none !important; }
#stage-workbench .stage-bottom-forehead .stage-feature-toggle {
  min-height: 31px;
  padding: 5px 13px;
  border-radius: 12px 12px 8px 8px;
  white-space: nowrap;
}
@media (max-width: 390px) {
  #stage-workbench .stage-bottom-forehead { gap: 5px; max-width: calc(100vw - 16px); }
  #stage-workbench .stage-bottom-forehead .stage-feature-toggle { padding-inline: 9px; font-size: 0.78rem; }
}


/* v0.12.27 build 151: remove the oversized header popup, compact the stage HUD,
   and keep activity feedback clear of the bottom navigation. */
#persistent-pet-stage .stage-top-bar {
  position: absolute;
  z-index: 132;
  top: max(10px, env(safe-area-inset-top, 0px));
  left: 50%;
  right: auto;
  width: min(1180px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: translateX(-50%);
  pointer-events: none;
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock {
  position: relative !important;
  inset: auto !important;
  display: flex !important;
  flex: 0 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}
#persistent-pet-stage .stage-care-action-row {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 5px;
  border: 1px solid #ffffffed;
  border-radius: 17px;
  background: #fffdf2ed;
  box-shadow: 0 5px 17px #53694b15, inset 0 1px #ffffff;
  backdrop-filter: blur(11px) saturate(1.05);
  -webkit-backdrop-filter: blur(11px) saturate(1.05);
  pointer-events: auto;
}
#persistent-pet-stage .stage-care-action-row > .stage-household-picker { flex: 0 1 245px; }
#persistent-pet-stage .stage-care-action-row .home-map-tools { flex: 0 1 auto; margin-left: 0; }
#persistent-pet-stage .stage-care-action-row > .stage-care-actions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  max-width: 430px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
#persistent-pet-stage .stage-care-action-row > .stage-care-actions::-webkit-scrollbar { display: none; }
#persistent-pet-stage .stage-care-action-row > .stage-household-tidy { flex: 0 0 auto; }
#persistent-pet-stage .stage-care-meta { display: none !important; }
#persistent-pet-stage .stage-care-dock > .stage-care-needs:not([hidden]) {
  display: flex !important;
  flex: 0 1 auto;
  align-self: flex-start;
  gap: 5px;
  width: min(100%, 760px);
  max-width: 100%;
  min-width: 0;
  margin: 0 0 0 7px;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
}
#persistent-pet-stage .stage-care-dock > .stage-care-needs::-webkit-scrollbar { display: none; }
#persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip {
  flex: 0 0 116px;
  width: 116px;
  min-width: 116px;
  max-width: 116px;
  min-height: 38px;
  padding: 4px 7px;
  border: 1px solid #e8e3d8;
  border-radius: 11px;
  background: #fffdf2e9;
  box-shadow: 0 2px 8px #53694b0b;
}
#persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-label,
#persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-value { font-size: 0.5625rem; }
#persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-track { height: 3px; margin-top: 3px; }
#persistent-pet-stage .stage-care-dock > .stage-care-needs[hidden],
#persistent-pet-stage .stage-care-dock > .stage-care-meta[hidden] { display: none !important; }
#persistent-pet-stage .stage-care-dock.has-chin { gap: 5px; }
#persistent-pet-stage .stage-care-action-row .stage-feature-controls { margin: 0 0 0 7px; padding: 0; }
#persistent-pet-stage .stage-care-dock > .stage-chin-layer { margin: 0 0 0 7px; width: min(100%, 760px); max-width: 100%; }
#persistent-pet-stage .stage-care-dock > .stage-chin-layer .stage-chin-panel { width: 100%; max-width: 100%; }

/* The activity card floats above the measured bottom dock instead of underneath it. */
#persistent-pet-stage .stage-activity-banner {
  position: absolute;
  z-index: 58;
  left: 50%;
  right: auto;
  bottom: var(--stage-activity-bottom-clearance, 126px);
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: min(560px, calc(100% - 28px));
  max-width: calc(100% - 28px);
  max-height: 76px;
  margin: 0;
  padding: 8px 10px;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 7px 20px #64513c15;
  transform: translateX(-50%);
  pointer-events: none;
}
#persistent-pet-stage .stage-activity-banner .pet-activity-icon { width: 34px; height: 34px; font-size: 1.1875rem; }
#persistent-pet-stage .stage-activity-banner .pet-activity-copy { min-width: 0; gap: 2px; }
#persistent-pet-stage .stage-activity-banner .pet-activity-copy strong,
#persistent-pet-stage .stage-activity-banner .pet-activity-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#persistent-pet-stage .stage-activity-banner .pet-activity-copy strong { font-size: 0.625rem; }
#persistent-pet-stage .stage-activity-banner .pet-activity-copy small { font-size: 0.5rem; }
#persistent-pet-stage .stage-activity-banner .pet-activity-track { height: 4px; margin-top: 2px; }
#persistent-pet-stage .stage-activity-banner .pet-activity-remaining { grid-column: auto; justify-self: end; font-size: 0.6875rem; }

@media (max-width: 760px) {
  #persistent-pet-stage .stage-top-bar {
    top: max(7px, env(safe-area-inset-top, 0px));
    left: max(7px, env(safe-area-inset-left, 0px));
    right: max(7px, env(safe-area-inset-right, 0px));
    width: auto;
    max-width: none;
    transform: none;
  }
  #persistent-pet-stage .stage-care-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    width: 100%;
    padding: 5px;
    border-radius: 14px;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker { flex: 0 1 38%; min-width: 108px; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools { flex: 1 1 55%; min-width: 0; margin-left: auto; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions { flex: 1 1 100%; max-width: 100%; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy { margin-left: auto; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs:not([hidden]) {
    width: 100%;
    max-width: 100%;
    margin: 0;
    gap: 5px;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip { flex-basis: 104px; width: 104px; min-width: 104px; max-width: 104px; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls,
  #persistent-pet-stage .stage-care-dock > .stage-chin-layer { margin-left: 0; }
  #persistent-pet-stage .stage-activity-banner {
    bottom: var(--stage-activity-bottom-clearance, 116px);
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 7px 8px;
  }
  #persistent-pet-stage .stage-activity-banner .pet-activity-icon { width: 29px; height: 29px; font-size: 1.0625rem; }
  #persistent-pet-stage .stage-activity-banner .pet-activity-copy strong { font-size: 0.5625rem; }
  #persistent-pet-stage .stage-activity-banner .pet-activity-copy small { font-size: 0.4375rem; }
  #persistent-pet-stage .stage-activity-banner .pet-activity-remaining { font-size: 0.625rem; }
}
@media (max-width: 390px) {
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker { flex-basis: 36%; min-width: 98px; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools { flex-basis: 56%; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip { flex-basis: 96px; width: 96px; min-width: 96px; max-width: 96px; }
}
@media (max-height: 600px) and (orientation: landscape) {
  #persistent-pet-stage .stage-top-bar { top: max(5px, env(safe-area-inset-top, 0px)); }
  #persistent-pet-stage .stage-activity-banner { bottom: max(86px, var(--stage-activity-bottom-clearance, 96px)); }
}
@media (prefers-reduced-motion: reduce) {
  #persistent-pet-stage .stage-activity-banner { transition: none !important; }
}


/* v0.12.28 build 152: place the compact stage HUD below the measured brand header. */
#persistent-pet-stage .stage-top-bar {
  top: var(--stage-top-offset, 78px);
}
@media (max-width: 760px) {
}

/* v0.12.28 build 152: final touch-layout refinements. */
@media (min-width: 761px) {
  #persistent-pet-stage .stage-top-bar > .stage-care-dock > .stage-care-needs:not([hidden]) {
    display: flex !important;
    flex: 0 0 100%;
    width: 100%;
    max-width: none;
    justify-content: space-between;
    gap: clamp(6px, .8vw, 12px);
    padding: 0 6px 2px;
    overflow: visible;
  }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock > .stage-care-needs .stage-need-chip {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
  }
}
@media (max-width: 420px) {
  #stage-workbench #pet-tabs.pet-tabs {
    gap: 2px;
    overflow-x: hidden;
    justify-content: stretch;
  }
  #stage-workbench #pet-tabs .pet-tab {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    padding: 3px 1px;
    font-size: 0.425rem;
    white-space: nowrap;
  }
  #stage-workbench #pet-tabs .pet-tab-icon { font-size: 0.875rem; }
  #stage-workbench #pet-tabs .pet-tab > span:last-child {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
  }
}
@media (max-width: 350px) {
  #stage-workbench #pet-tabs.pet-tabs { gap: 1px; padding: 4px; }
  #stage-workbench #pet-tabs .pet-tab { font-size: 0.375rem; }
  #stage-workbench #pet-tabs .pet-tab-icon { font-size: 0.8125rem; }
}


/* v0.12.29 build 153: stable stage dock, no-wrap map controls, and connected Care chin. */
#persistent-pet-stage .stage-top-bar {
  top: var(--stage-top-offset, 78px);
  left: 50%;
  right: auto;
  width: min(1180px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  height: auto;
  max-height: none;
  overflow: visible;
  transform: translateX(-50%);
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock {
  position: relative !important;
  inset: auto !important;
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: none;
  margin: 0;
  padding: 9px 10px;
  overflow: visible;
  border: 1px solid #ffffffdf;
  border-radius: 18px;
  background: #fffdf2ed;
  box-shadow: 0 7px 22px #53694b1b, inset 0 1px #ffffff;
  backdrop-filter: blur(12px) saturate(1.06);
  -webkit-backdrop-filter: blur(12px) saturate(1.06);
  pointer-events: auto;
}
#persistent-pet-stage .stage-care-action-row {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: center;
  gap: 9px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#persistent-pet-stage .stage-care-action-row > .stage-household-picker {
  flex: 0 0 clamp(170px, 18vw, 225px);
  width: auto;
  min-width: 0;
}
#persistent-pet-stage .stage-care-action-row .home-map-tools {
  position: static !important;
  display: flex !important;
  flex: 0 0 auto !important;
  flex-flow: row nowrap !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 6px;
  width: max-content !important;
  max-width: none !important;
  min-width: max-content !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#persistent-pet-stage .stage-care-action-row .home-map-tools > * {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}
#persistent-pet-stage .stage-care-action-row .home-map-tools > button {
  min-height: 42px;
  min-width: 38px;
  padding-inline: 9px;
}
#persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 138px;
  white-space: nowrap !important;
}
#persistent-pet-stage .stage-care-action-row > .stage-care-actions {
  display: flex;
  flex: 1 1 0;
  flex-flow: row nowrap;
  align-items: stretch;
  gap: 5px;
  width: auto;
  max-width: none;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  justify-content: flex-start;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}
#persistent-pet-stage .stage-care-action-row > .stage-household-tidy {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}
#persistent-pet-stage .stage-top-bar.is-park-view .stage-care-action-row,
#persistent-pet-stage .stage-top-bar.is-decorating .stage-care-action-row {
  display: flex !important;
  flex-wrap: nowrap !important;
}
#persistent-pet-stage .stage-top-bar.is-park-view .stage-care-action-row > .stage-care-actions,
#persistent-pet-stage .stage-top-bar.is-park-view .stage-care-action-row > .stage-household-tidy,
#persistent-pet-stage .stage-top-bar.is-decorating .stage-care-action-row > .stage-care-actions,
#persistent-pet-stage .stage-top-bar.is-decorating .stage-care-action-row > .stage-household-tidy {
  display: none !important;
}
#persistent-pet-stage .stage-care-dock > .stage-care-needs:not([hidden]) {
  position: relative !important;
  display: grid !important;
  flex: 0 0 auto;
  align-self: stretch !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  margin: 0 !important;
  padding: 8px 0 0 !important;
  border: 0;
  border-top: 1px solid #e9e3d7;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
}
#persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip {
  width: auto;
  min-width: 0;
  max-width: none;
}
@media (max-width: 1100px) and (min-width: 761px) {
  #persistent-pet-stage .stage-top-bar { width: calc(100vw - 28px); max-width: 980px; }
  #persistent-pet-stage .stage-care-action-row {
    display: grid !important;
    grid-template-columns: minmax(160px, 205px) minmax(0, 1fr);
    grid-template-areas: "household map" "actions actions" "tidy tidy";
    gap: 7px;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker { grid-area: household; width: 100%; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools {
    grid-area: map;
    justify-self: end;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions { grid-area: actions; width: 100%; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy { grid-area: tidy; justify-self: end; margin: 0; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs:not([hidden]) { gap: 6px; }
}
@media (max-width: 760px) {
  #persistent-pet-stage .stage-top-bar {
    top: var(--stage-top-offset, calc(64px + env(safe-area-inset-top, 0px)));
    left: max(7px, env(safe-area-inset-left, 0px));
    right: max(7px, env(safe-area-inset-right, 0px));
    width: auto;
    max-width: none;
    transform: none;
  }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock { gap: 6px; padding: 6px; border-radius: 15px; }
  #persistent-pet-stage .stage-care-action-row {
    display: grid !important;
    grid-template-columns: minmax(104px, .85fr) minmax(0, 1.15fr);
    grid-template-areas: "household map" "actions actions" "tidy tidy";
    gap: 6px;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker { grid-area: household; width: 100%; max-width: none; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools {
    grid-area: map;
    justify-self: stretch;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 3px;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools::-webkit-scrollbar { display: none; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools > button { min-width: 32px; min-height: 36px; padding: 4px 6px; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button { min-width: 40px; padding-inline: 7px; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button span { display: inline; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions {
    grid-area: actions;
    width: 100%;
    max-width: 100%;
    gap: 4px;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy { grid-area: tidy; justify-self: end; margin: 0; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs:not([hidden]) {
    display: flex !important;
    gap: 6px;
    padding-top: 6px !important;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    overscroll-behavior-inline: contain;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip {
    flex: 0 0 112px;
    width: 112px;
    min-width: 112px;
    max-width: 112px;
  }
}
@media (max-width: 420px) {
  #persistent-pet-stage .stage-care-action-row { grid-template-columns: minmax(96px, .78fr) minmax(0, 1.22fr); gap: 4px; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker .stage-household-count { display: none; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools { gap: 2px; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools > button { min-width: 29px; min-height: 34px; padding-inline: 4px; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button { min-width: 32px; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button span { display: none; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions { gap: 3px; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action { flex-basis: 52px; min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  #persistent-pet-stage .stage-care-action-row,
  #persistent-pet-stage .stage-care-dock > .stage-care-needs { transition: none !important; }
}

/* v0.12.30 build 154: one compact top control rail, a distinct Care chin, and a topmost Pal picker. */
#persistent-pet-stage .stage-top-bar {
  z-index: 3000;
  top: var(--stage-top-offset, 78px);
  left: 50%;
  right: auto;
  width: min(1360px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  height: auto;
  max-height: none;
  overflow: visible;
  transform: translateX(-50%);
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock {
  position: relative !important;
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: none;
  margin: 0;
  padding: 8px 9px 7px;
  overflow: visible;
  border: 1px solid #ffffffdf;
  border-radius: 18px;
  background: #fffdf2ed;
  box-shadow: 0 7px 22px #53694b1b, inset 0 1px #ffffff;
  backdrop-filter: blur(12px) saturate(1.06);
  -webkit-backdrop-filter: blur(12px) saturate(1.06);
  isolation: visible;
  pointer-events: auto;
}
#persistent-pet-stage .stage-care-action-row {
  display: flex !important;
  flex: 0 0 auto;
  flex-flow: row nowrap !important;
  align-items: center;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 45px;
  margin: 0;
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid #e9e3d7;
}
#persistent-pet-stage .stage-care-action-row > .stage-household-picker {
  position: relative;
  z-index: 9000;
  flex: 0 0 clamp(168px, 17vw, 208px);
  width: auto;
  min-width: 0;
}
#persistent-pet-stage .stage-care-action-row > .stage-household-picker > .stage-household-toggle {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 5px 8px;
}
#persistent-pet-stage .stage-household-menu {
  z-index: 9001;
  top: calc(100% + 7px);
  max-height: min(58svh, 480px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  box-shadow: 0 18px 48px #453a2b38, 0 0 0 1px #ffffff;
}
#persistent-pet-stage .stage-household-menu .stage-household-roster {
  max-height: min(49svh, 400px);
  overscroll-behavior: contain;
}
#persistent-pet-stage .stage-care-action-row .home-map-tools {
  position: static !important;
  display: flex !important;
  flex: 0 0 auto !important;
  flex-flow: row nowrap !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 4px;
  width: max-content !important;
  max-width: none !important;
  min-width: max-content !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#persistent-pet-stage .stage-care-action-row .home-map-tools > * {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}
#persistent-pet-stage .stage-care-action-row .home-map-tools > button {
  min-width: 34px;
  min-height: 39px;
  padding: 4px 7px;
}
#persistent-pet-stage .stage-care-action-row .home-map-tools .park-map-zoom-readout {
  min-width: 35px;
  font-size: 0.5625rem;
}
#persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  padding-inline: 8px;
  white-space: nowrap !important;
  font-size: 0.625rem;
}
#persistent-pet-stage .stage-care-action-row > .stage-care-actions {
  display: flex !important;
  flex: 1 1 auto;
  flex-flow: row nowrap;
  align-items: stretch;
  gap: 4px;
  width: auto;
  max-width: none;
  min-width: 54px;
  max-height: 48px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 2px;
  justify-content: flex-start;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}
#persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action {
  flex: 0 0 47px;
  width: 47px;
  min-width: 47px;
  min-height: 40px;
  padding: 4px 3px;
  border-radius: 11px;
}
#persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action-icon { font-size: 0.9375rem; }
#persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action-label {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.4375rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#persistent-pet-stage .stage-care-action-row .stage-feature-controls {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  flex-flow: row nowrap;
  align-items: center;
  gap: 4px;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
}
#persistent-pet-stage .stage-care-action-row .stage-feature-controls .stage-feature-toggle {
  min-height: 38px;
  padding: 6px 8px;
  gap: 4px;
  font-size: 0.5rem;
  white-space: nowrap;
}
#persistent-pet-stage .stage-care-action-row > .stage-household-tidy {
  flex: 0 0 auto;
  min-width: 38px;
  min-height: 38px;
  margin: 0;
  padding: 5px 8px;
  white-space: nowrap;
}
#persistent-pet-stage .stage-care-dock > .stage-care-needs:not([hidden]) {
  position: relative !important;
  z-index: 0;
  display: grid !important;
  flex: 0 0 auto;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 7px;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  margin: 0 !important;
  padding: 7px 1px 0 !important;
  border: 0;
  border-top: 1px solid #e9e3d7;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
}
#persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 5px 6px;
}
#persistent-pet-stage .stage-care-dock > .stage-care-meta { display: none !important; }
#persistent-pet-stage .stage-chin-layer {
  z-index: 140;
  top: 100%;
  margin-top: 7px;
}
#persistent-pet-stage .stage-chin-panel {
  width: min(980px, calc(100% - 12px));
  max-width: calc(100% - 12px);
  max-height: min(48svh, 430px);
  margin-left: 6px;
  border-radius: 17px;
}
#persistent-pet-stage .stage-household-picker:focus-within { z-index: 9000; }
#persistent-pet-stage .stage-household-menu :is(button, a):focus-visible,
#persistent-pet-stage .stage-household-toggle:focus-visible {
  outline: 3px solid #89a979;
  outline-offset: 2px;
}
@media (max-width: 1100px) and (min-width: 761px) {
  #persistent-pet-stage .stage-top-bar { width: calc(100vw - 22px); max-width: 1080px; }
  #persistent-pet-stage .stage-care-action-row { gap: 4px; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker { flex-basis: 175px; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools { gap: 3px; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button { min-width: 98px; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action { flex-basis: 43px; width: 43px; min-width: 43px; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls .stage-feature-toggle { padding-inline: 6px; }
}
@media (max-width: 760px) {
  #persistent-pet-stage .stage-top-bar {
    top: var(--stage-top-offset, calc(64px + env(safe-area-inset-top, 0px)));
    left: max(7px, env(safe-area-inset-left, 0px));
    right: max(7px, env(safe-area-inset-right, 0px));
    width: auto;
    max-width: none;
    transform: none;
  }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock { gap: 5px; padding: 6px; border-radius: 14px; }
  #persistent-pet-stage .stage-care-action-row {
    gap: 3px;
    min-height: 40px;
    padding-bottom: 5px;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker { flex: 0 0 clamp(112px, 30vw, 160px); }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker > .stage-household-toggle { min-height: 36px; padding: 4px 5px; gap: 4px; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker .stage-household-current-avatar { width: 25px; height: 25px; flex-basis: 25px; font-size: 0.875rem; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker .stage-household-toggle-label { font-size: 0.5625rem; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker .stage-household-count { display: none; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools { gap: 2px; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools > button { min-width: 29px; min-height: 34px; padding: 3px 4px; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .park-map-zoom-readout { min-width: 27px; font-size: 0.5rem; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button { min-width: 30px; padding-inline: 4px; font-size: 0; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button span { display: none; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions { min-width: 0; gap: 3px; max-height: 40px; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action { flex-basis: 40px; width: 40px; min-width: 40px; min-height: 36px; padding: 3px 2px; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action-icon { font-size: 0.8125rem; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action-label { font-size: 0.375rem; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls { gap: 2px; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls .stage-feature-toggle { min-height: 34px; padding: 4px 5px; font-size: 0.4375rem; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy { min-width: 32px; min-height: 34px; padding: 3px 5px; font-size: 0.5rem; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs:not([hidden]) {
    display: flex !important;
    gap: 5px;
    padding-top: 5px !important;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    overscroll-behavior-inline: contain;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip {
    flex: 0 0 105px;
    width: 105px;
    min-width: 105px;
    max-width: 105px;
  }
  #persistent-pet-stage .stage-chin-panel { width: calc(100% - 4px); max-width: calc(100% - 4px); max-height: min(42svh, 360px); margin-left: 2px; padding: 9px; }
}
@media (max-width: 420px) {
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker { flex-basis: 104px; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button { min-width: 27px; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action { flex-basis: 37px; width: 37px; min-width: 37px; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls .stage-feature-toggle { padding-inline: 3px; }
}

/* Help's interface map uses the same concise, touch-friendly card language as the stage. */
.help-controls-card { display: grid; gap: 11px; }
.help-controls-card > h3 { margin: -4px 0 0; color: #665444; font-size: clamp(1.0625rem, 2vw, 1.375rem); }
.help-controls-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.help-controls-grid > article {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #eee5d8;
  border-radius: 13px;
  background: #fffdf8;
}
.help-controls-grid > article > span {
  display: grid;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 10px;
  background: #f8eee4;
  color: #c98470;
  font-size: 1rem;
}
.help-controls-grid > article > div { min-width: 0; }
.help-controls-grid strong { display: block; margin: 1px 0 4px; color: #6e5948; font-size: 0.6875rem; font-weight: 900; }
.help-controls-grid p { margin: 0; color: #998777; font-size: 0.625rem; line-height: 1.5; }
@media (max-width: 600px) {
  .help-controls-grid { grid-template-columns: minmax(0, 1fr); }
  .help-controls-grid > article { padding: 9px; }
}


/* v0.12.31 build 155: restore the full Welcome another Pal landing surface.
   The screen is absolutely positioned below the global header, so height must
   be resolved from its top/bottom insets rather than collapsed to zero. */
#app > #adopt-screen.adopt-screen-flow {
  display: block;
  height: auto;
  min-height: 0;
  max-width: none;
  padding: 18px clamp(16px, 4vw, 54px) 22px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(140deg, #f8f0e6 0%, #f8f6eb 58%, #edf3e9 100%);
}
#adopt-screen .adopt-screen-toolbar {
  position: sticky;
  z-index: 8;
  top: 0;
  display: flex;
  width: min(1180px, 100%);
  min-height: 42px;
  align-items: center;
  margin: 0 auto 4px;
  pointer-events: none;
}
#adopt-screen .adopt-screen-toolbar > button { pointer-events: auto; }
#adopt-screen .adopt-landing-view {
  width: min(1180px, 100%);
  min-height: calc(100% - 48px);
  margin: 0 auto;
  grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr);
  align-content: center;
  gap: clamp(24px, 5vw, 68px);
}
#adopt-screen .adopt-landing-view .adopt-intro { min-width: 0; }
#adopt-screen .adopt-landing-view .adopt-entry-actions { min-width: 0; }
#adopt-screen .page-footer { width: min(1180px, 100%); margin: 12px auto 0; }
#adopt-screen .adopt-subview { width: min(900px, 100%); }
@media (max-width: 760px) {
  #app > #adopt-screen.adopt-screen-flow { padding: 12px max(12px, env(safe-area-inset-right)) 18px max(12px, env(safe-area-inset-left)); }
  #adopt-screen .adopt-screen-toolbar { min-height: 40px; margin-bottom: 8px; }
  #adopt-screen .adopt-landing-view { min-height: 0; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 14px; }
  #adopt-screen .adopt-landing-view .adopt-intro { padding: 0 4px; }
  #adopt-screen .adopt-landing-view .adopt-entry-actions { gap: 9px; }
  #adopt-screen .page-footer { margin-top: 18px; }
}


/* v0.12.32 build 156: Tidy home stays discoverable in the Home/Care dock. */
#persistent-pet-stage .stage-care-action-row > .stage-household-tidy:not([hidden]) {
  display: flex;
}
#persistent-pet-stage .stage-care-action-row > .stage-household-tidy:disabled {
  opacity: .58;
  color: #8b927d;
  border-color: #e5e5d9;
  background: #f7f8f1;
  cursor: not-allowed;
  filter: saturate(.68);
}
#persistent-pet-stage .stage-care-action-row > .stage-household-tidy:disabled .stage-household-tidy-icon { opacity: .78; }


/* v0.12.33 build 157: make save state, household signals, tips and undo discoverable. */
#app > .topbar .connection-pill {
  cursor: pointer;
  user-select: none;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(220px, 32vw);
  gap: 8px;
  color: #7e766e;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
#app > .topbar .connection-pill > span {
  display: inline-block !important;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#app > .topbar .connection-pill:focus-visible {
  outline: 3px solid rgba(217,111,93,.42);
  outline-offset: 3px;
}
#app > .topbar .connection-pill[data-state="saving"] { color: #8a785d; border-color: #ead8b2; background: #fff9e9; }
#app > .topbar .connection-pill[data-state="saving"] i { background: #d8ac59; box-shadow: 0 0 0 3px #d8ac5926; animation: sync-pulse 1.1s ease-in-out infinite; }
#app > .topbar .connection-pill[data-state="saved"] { color: #648a73; border-color: #d5e8d9; background: #f5fbf4; }
#app > .topbar .connection-pill[data-state="draft"] { color: #92734e; border-color: #ead9b8; background: #fff9ed; }
#app > .topbar .connection-pill[data-state="draft"] i { background: #d6a75d; box-shadow: 0 0 0 3px #d6a75d26; }
#app > .topbar .connection-pill[data-state="attention"] { color: #a55f52; border-color: #edc7bd; background: #fff3ef; }
#app > .topbar .connection-pill[data-state="attention"] i { background: #d87562; box-shadow: 0 0 0 3px #d8756226; }
#app > .topbar .connection-pill[data-state="offline"] { color: #98744b; border-color: #ead7b8; background: #fff8eb; }
#app > .topbar .connection-pill[data-state="checking"] i { background: #a9a39b; box-shadow: 0 0 0 3px #a9a39b26; }
@keyframes sync-pulse { 50% { box-shadow: 0 0 0 6px #d8ac5914; opacity: .72; } }

#stage-workbench .stage-household-menu .stage-pet-choice { position: relative; }
#stage-workbench .stage-household-menu .stage-pet-choice-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 17px;
  min-height: 17px;
  margin-left: auto;
  padding: 0 4px;
  border: 1px solid #eadfce;
  border-radius: 99px;
  background: #fff9ed;
  color: #a17b4e;
  font-size: 0.5625rem;
  font-weight: 900;
}
#stage-workbench .stage-household-menu .stage-pet-choice-status.is-critical { border-color: #e8b4a9; background: #fff0ed; color: #b95d51; }
#stage-workbench .stage-household-menu .stage-pet-choice-status.is-attention { border-color: #ead1a8; background: #fff7e7; color: #9e7947; }

.contextual-feature-tip {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
  width: 100%;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #eadfce;
  border-radius: 15px;
  background: linear-gradient(115deg, #fff9ef, #f8f5fc 72%, #f2f8f1);
  box-shadow: 0 5px 18px #70553b0a;
}
.contextual-feature-tip-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: #fff;
  color: #d99079;
  font-size: 1.125rem;
}
.contextual-feature-tip-copy { min-width: 0; }
.contextual-feature-tip-copy strong { display: block; color: #6c5949; font-size: 0.75rem; font-weight: 900; }
.contextual-feature-tip-copy p { margin: 3px 0 0; color: #988777; font-size: 0.625rem; line-height: 1.55; }
.contextual-feature-tip-dismiss {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #e9ddd0;
  border-radius: 10px;
  background: #fffdfa;
  color: #887768;
  font-size: 0.625rem;
  font-weight: 800;
}
.contextual-feature-tip-dismiss:hover { border-color: #e3b8a7; background: #fff5ee; }







@media (max-width: 720px) {
  #app > .topbar .connection-pill { max-width: 104px; min-width: 0; padding-inline: 7px; gap: 6px; font-size: 0.5625rem; }
  #app > .topbar .connection-pill > span { display: inline-block !important; }
  #app > .topbar .connection-pill i { flex: 0 0 6px; }
  .contextual-feature-tip { grid-template-columns: 29px minmax(0, 1fr) auto; gap: 8px; padding: 10px; }
  .contextual-feature-tip-icon { width: 29px; height: 29px; }
  .contextual-feature-tip-copy p { font-size: 0.5625rem; }
  .contextual-feature-tip-dismiss { padding-inline: 8px; }
}
@media (max-width: 390px) {
  #app > .topbar .connection-pill { max-width: 88px; font-size: 0.5rem; }
  #app > .topbar .connection-pill > span { display: inline-block !important; }
}
@media (prefers-reduced-motion: reduce) {
  #app > .topbar .connection-pill[data-state="saving"] i { animation: none; }
}

/* v0.12.35: shared one-at-a-time household bathroom on the Home isometric stage. */
.home-isometric-stage .home-bathroom-station {
  position: absolute;
  left: 81%;
  top: 53%;
  z-index: 548;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 124px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 5px 5px #52664a20);
}
.home-bathroom-booth {
  position: relative;
  display: grid;
  place-items: center;
  width: 80px;
  height: 72px;
  border: 3px solid #8b7565;
  border-radius: 17px 17px 8px 8px;
  background: linear-gradient(145deg, #fffdf5 0 22%, #f1d9b9 23% 100%);
  box-shadow: inset 0 -7px #d8b895, 0 4px 0 #a18a72;
  transform: skewY(-5deg);
}
.home-bathroom-door {
  position: absolute;
  inset: 8px 17px 0 16px;
  display: grid;
  place-items: center;
  border: 2px solid #9e7d69;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(160deg, #f8e8d5, #e7c8a8);
  font-size: 1.9375rem;
  line-height: 1;
}
.home-bathroom-toilet {
  position: absolute;
  right: -13px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #fffdf8;
  border-radius: 11px;
  background: #eef5ed;
  font-size: 1.125rem;
  transform: skewY(5deg);
}
.home-bathroom-lamp {
  position: absolute;
  top: -12px;
  right: 8px;
  color: #e8bf65;
  font-size: 1rem;
}
.home-bathroom-queue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 104px;
  max-width: 154px;
  padding: 5px 8px;
  border: 1px solid #dce8d5;
  border-radius: 10px;
  background: #fafff3ed;
  color: #738965;
  text-align: center;
  box-shadow: 0 2px 6px #52664a10;
}
.home-bathroom-queue-current { color: #665747; font-size: 0.5rem; font-weight: 900; }
.home-bathroom-queue-next { color: #8d9a78; font-size: 0.4375rem; font-weight: 800; }
.home-bathroom-station[data-occupied="true"] .home-bathroom-booth { background: linear-gradient(145deg, #fff6dc, #edc99d); }
#world-scene.is-park-view #home-bathroom-station { display: none !important; }
.bathroom-field-guide { display:flex; align-items:flex-start; gap:12px; margin-top:14px; padding:15px; border:1px solid #e5e4cf; border-radius:15px; background:linear-gradient(135deg,#fbfff1,#fffaf1); color:#715d4d; }
.bathroom-field-guide>span { flex:0 0 42px; display:grid; place-items:center; width:42px; height:42px; border-radius:13px; background:#edf5e7; font-size:1.4375rem; }
.bathroom-field-guide h3 { margin:0 0 5px; font-size:0.8125rem; }
.bathroom-field-guide p { margin:0; color:#8b796a; font-size:0.6875rem; line-height:1.6; }
@media(max-width:760px) {
  .home-isometric-stage .home-bathroom-station { left:78%; top:55%; transform:translate(-50%,-50%) scale(.88); transform-origin:center; }
}


/* v0.12.37 build 161: Arrange lives in the top dock's contextual chin. */
#persistent-pet-stage .stage-care-action-row .stage-feature-controls .arrange-feature-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 6px 9px;
  white-space: nowrap;
}
#persistent-pet-stage .stage-care-action-row .stage-feature-controls .arrange-feature-toggle[aria-pressed="true"] {
  border-color: #e7b59f;
  background: linear-gradient(140deg,#fff0e6,#fffaf1);
  color: #8c5e4c;
}
#stage-chin-layer > #in-stage-decor-inventory {
  position: relative;
  inset: auto;
  z-index: 160;
  display: flex;
  flex: 0 1 auto;
  width: 100%;
  max-width: none;
  max-height: min(46svh, 430px);
  min-height: 0;
  margin: 0;
  padding: 11px 12px 10px;
  overflow: hidden;
  gap: 7px;
  pointer-events: auto;
}
#stage-chin-layer > #in-stage-decor-inventory[hidden] { display: none !important; }
#stage-chin-layer > #in-stage-decor-inventory .stage-home-settings { flex: 0 0 auto; }
#stage-chin-layer > #in-stage-decor-inventory .in-stage-decor-catalog-slot { flex: 1 1 118px; min-height: 94px; height: 118px; max-height: 130px; }
#stage-chin-layer > #in-stage-decor-inventory .home-decor-catalog { height: 100%; }
#stage-chin-layer > #in-stage-decor-inventory .decorator-actions,
#stage-chin-layer > #in-stage-decor-inventory .home-feedback,
#stage-chin-layer > #in-stage-decor-inventory .decor-editor-feedback { flex: 0 0 auto; }
#stage-chin-layer > #in-stage-decor-inventory .home-decor-card { min-height: 80px; }
#stage-chin-layer > #in-stage-decor-inventory button,
#stage-chin-layer > #in-stage-decor-inventory select { pointer-events: auto; }
#world-scene.is-decorating .in-stage-decor-inventory { pointer-events: auto; }
.home-isometric-stage .home-bathroom-station { left: 24%; top: 34%; }
.home-bathroom-station { transform: translate(-50%,-50%) scale(.94); transform-origin:center; }
@media(max-width:760px) {
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls .arrange-feature-toggle { min-height:34px; padding:4px 5px; font-size:0.4375rem; }
  #stage-chin-layer > #in-stage-decor-inventory { max-height:min(54svh,500px); padding:8px; }
  #stage-chin-layer > #in-stage-decor-inventory .in-stage-decor-catalog-slot { height:100px; }
  .home-isometric-stage .home-bathroom-station { left:22%; top:36%; transform:translate(-50%,-50%) scale(.84); }
}


@media (max-width: 760px) {
  #persistent-pet-stage .stage-household-menu { max-height: min(66svh, 520px); }
  #persistent-pet-stage .stage-household-menu .stage-household-roster { max-height: min(40svh, 300px); }
}

/* v0.12.39 build 163: Home and Park have separate, mutually exclusive roots. */
#room-world > #home-scene-content {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  isolation: isolate;
  pointer-events: none;
}
#room-world > #home-scene-content[hidden],
#world-scene.is-park-view #home-scene-content {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
#room-world > #park-stage-content {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: visible;
}
#room-world > #park-stage-content[hidden] { display: none !important; }


/* v0.12.40 build 164: Home is a single isometric scene; compact Park inspector fits between live stage bars. */
#stage-workbench .park-inspector-dock {
  position: absolute;
  z-index: 140;
  top: var(--park-inspector-top, 142px);
  right: 17px;
  bottom: var(--park-inspector-bottom, 116px);
  left: auto;
  width: min(380px, 32vw);
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  pointer-events: none;
}
#stage-workbench .park-inspector-dock #park-inspector {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 9px;
  overflow: hidden;
  pointer-events: auto;
  border-radius: 16px;
}
#stage-workbench .park-inspector-top {
  flex: 0 0 auto;
  gap: 8px;
  margin: 0;
  padding: 0 0 6px;
}
#stage-workbench .park-inspector-top .eyebrow { margin: 0 0 2px; font-size: 0.4375rem; letter-spacing: 1.2px; }
#stage-workbench .park-inspector-top h3 { font-size: 0.8125rem; line-height: 1.15; }
#stage-workbench .park-inspector-top .button { min-height: 29px; padding: 5px 8px; font-size: 0.5625rem; }
#stage-workbench .park-inspector-body {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 7px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 0 2px 2px 0;
}
#stage-workbench .park-inspector-hero {
  grid-column: 1;
  align-items: flex-start;
  gap: 9px;
  padding: 8px;
  border-radius: 12px;
}
#stage-workbench .park-inspector-avatar,
#stage-workbench .park-inspector-avatar svg {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 16px;
}
#stage-workbench .park-inspector-intro { min-width: 0; }
#stage-workbench .park-inspector-intro h4 { margin: 0 0 3px; font-size: 0.9375rem; line-height: 1.1; }
#stage-workbench .park-inspector-intro p { margin: 2px 0; font-size: 0.5rem; line-height: 1.3; }
#stage-workbench .park-inspector-intro .button { min-height: 28px; padding: 5px 8px; font-size: 0.5rem; }
#stage-workbench .park-inspector-compliment { gap: 5px; margin-top: 5px; }
#stage-workbench .park-inspector-compliment select { flex: 1 1 100px; min-height: 29px; padding: 5px 7px; font-size: 0.5rem; }
#stage-workbench .park-inspector-compliment .button { min-height: 29px; padding: 5px 7px; font-size: 0.5rem; }
#stage-workbench .park-inspector-details {
  grid-column: 1;
  min-width: 0;
  flex: 0 0 auto;
  padding: 0 8px;
  border: 1px solid #e9dfee;
  border-radius: 11px;
  background: linear-gradient(145deg,#fffdfc,#faf6ff);
}
#stage-workbench .park-inspector-details > summary {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #765e7c;
  font-size: 0.5625rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}
#stage-workbench .park-inspector-details > summary::-webkit-details-marker { display: none; }
#stage-workbench .park-inspector-details > summary::after { content: '⌄'; color: #a18ab1; font-size: 0.875rem; transition: transform .16s ease; }
#stage-workbench .park-inspector-details[open] > summary::after { transform: rotate(180deg); }
#stage-workbench .park-inspector-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 6px;
  padding: 0 0 8px;
}
#stage-workbench .park-inspector-details-grid .park-inspector-section {
  min-width: 0;
  padding: 7px;
  border-radius: 9px;
}
#stage-workbench .park-inspector-details-grid .park-inspector-section-full { grid-column: 1 / -1; }
#stage-workbench .park-inspector-details-grid .park-inspector-section h5 { margin: 0 0 5px; font-size: 0.5rem; }
#stage-workbench .park-inspector-details-grid .park-genetic-tags { gap: 4px; }
#stage-workbench .park-inspector-details-grid .park-genetic-tags span { padding: 3px 6px; font-size: 0.4375rem; }
#stage-workbench .park-inspector-details-grid .park-genetic-tags p,
#stage-workbench .park-inspector-details-grid .park-family-list p { font-size: 0.5rem; }
#stage-workbench .park-inspector-details-grid .park-nature-hints { gap: 5px; }
#stage-workbench .park-inspector-details-grid .park-nature-hint { gap: 6px; padding: 6px; }
#stage-workbench .park-inspector-details-grid .park-nature-hint-icon { width: 23px; height: 23px; flex-basis: 23px; font-size: 0.75rem; }
#stage-workbench .park-inspector-details-grid .park-nature-hint-copy strong { font-size: 0.5rem; }
#stage-workbench .park-inspector-details-grid .park-nature-hint-copy p { font-size: 0.4375rem; line-height: 1.3; }
#stage-workbench .park-inspector-details-grid .park-family-row { gap: 5px; padding: 5px; font-size: 0.5rem; }
#stage-workbench .park-inspector-details-grid .park-family-row .button { min-height: 25px; padding: 4px 6px; font-size: 0.4375rem; }
#stage-workbench .park-inspector-details-grid .park-genotype-row { padding: 4px 5px; font-size: 0.4375rem; }
#stage-workbench .park-inspector-details-grid .park-full-genome { margin-top: 6px; padding-top: 6px; }
#stage-workbench .park-inspector-details-grid .park-full-genome summary { font-size: 0.5rem; }
@media (max-width: 760px) {
  #stage-workbench .park-inspector-dock {
    top: var(--park-inspector-top, 145px);
    right: 8px;
    bottom: var(--park-inspector-bottom, 112px);
    left: 8px;
    width: auto;
    height: auto;
    max-height: none;
  }
  #stage-workbench .park-inspector-dock #park-inspector { padding: 8px; border-radius: 15px; }
  #stage-workbench .park-inspector-avatar,
  #stage-workbench .park-inspector-avatar svg { flex-basis: 50px; width: 50px; height: 50px; }
  #stage-workbench .park-inspector-details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-height: 680px) {
  #stage-workbench .park-inspector-dock #park-inspector { padding: 7px; gap: 5px; }
  #stage-workbench .park-inspector-hero { padding: 6px; }
  #stage-workbench .park-inspector-avatar,
  #stage-workbench .park-inspector-avatar svg { flex-basis: 46px; width: 46px; height: 46px; }
  #stage-workbench .park-inspector-intro h4 { font-size: 0.8125rem; }
  #stage-workbench .park-inspector-top { padding-bottom: 4px; }
  #stage-workbench .park-inspector-details > summary { min-height: 30px; }
}

/* v0.12.41 build 165: the Pal disappears once inside, and the bathroom door is a full two-storey doorway. */
.home-isometric-stage .room-pet-entry[hidden] { display: none !important; }
.home-isometric-stage .home-bathroom-station {
  top: 34%;
  transform: translate(-50%, 0) scale(.94);
  transform-origin: top center;
  gap: 5px;
}
.home-isometric-stage .home-bathroom-booth {
  width: 80px;
  height: 144px;
  margin-top: -144px;
  transform: skewY(-5deg);
  transform-origin: center bottom;
}
.home-isometric-stage .home-bathroom-door {
  inset: 8px 16px 0;
  overflow: hidden;
  border: 2px solid #9e7d69;
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
  background: linear-gradient(160deg, #f8e8d5, #e7c8a8);
  font-size: 0;
}
.home-isometric-stage .home-bathroom-door::before {
  content: "";
  position: absolute;
  inset: 10px 6px 7px;
  border: 1px solid #c7a88d;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #f4ddc5, #e6c5a4);
  box-shadow: inset 0 0 0 2px #f9ecdb80;
}
.home-isometric-stage .home-bathroom-door::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 54%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #af8150;
  box-shadow: 0 0 0 1px #f8e9d4;
}
@media (max-width: 760px) {
  .home-isometric-stage .home-bathroom-station {
    top: 36%;
    transform: translate(-50%, 0) scale(.84);
    transform-origin: top center;
  }
  .home-isometric-stage .home-bathroom-booth { height: 144px; margin-top: -144px; }
}


/* v0.13.0 build 168: adoption visitor selection and strict Home/Park idle separation. */
.adoption-visitor-picker {
  display: grid;
  grid-template-columns: minmax(110px, 155px) minmax(0, 1fr);
  align-items: center;
  gap: 5px 12px;
  margin: 8px 0 12px;
  padding: 11px 13px;
  border: 1px solid #e9e2d8;
  border-radius: 12px;
  background: #fffdf8;
}
.adoption-visitor-picker .field-label { margin: 0; }
.adoption-visitor-select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #e2d7ca;
  border-radius: 9px;
  background: #fff;
  color: #665447;
  font:800 0.6875rem/1.3 inherit;
}
.adoption-visitor-picker .economy-hint { grid-column: 1 / -1; margin: 0; }
.adoption-listing-actions .button:disabled { opacity: .68; }
.home-bathroom-station { gap: 7px; }
.home-bathroom-queue { position: absolute; left: 50%; top: -182px; transform: translateX(-50%); z-index: 3; margin: 0; }
.home-bathroom-booth { order: 0; }
.park-map-pet[data-idle-domain="park"] .park-map-avatar svg { transform-origin: 50% 86%; }
.park-map-pet[data-activity="flowers"] .park-map-avatar svg { animation-name: parkMeadowExplore; }
@keyframes parkMeadowExplore {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  22% { transform: translateY(-2px) rotate(-2deg) scale(1.01); }
  48% { transform: translateY(0) rotate(1deg) scale(1); }
  72% { transform: translateY(-1px) rotate(2deg) scale(1.005); }
}
@media (max-width: 620px) {
  .adoption-visitor-picker { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .adoption-visitor-picker .economy-hint { grid-column: 1; }
}

/* v0.13.1 build 169: separate wall anchors keep windows and hanging decor off the floor. */
.home-isometric-stage .placed-room-decor.is-wall-mounted {
  width: clamp(46px, 7.5vw, 76px);
  height: clamp(46px, 7.5vw, 76px);
  transform: translate(-50%, -50%) scale(.92);
  transform-origin: center;
  filter: drop-shadow(0 4px 5px #54433520);
}
.home-isometric-stage .placed-room-decor-item-rainbow-window.is-wall-mounted {
  width: clamp(72px, 11vw, 112px);
  height: clamp(62px, 9vw, 92px);
}
#world-scene.is-decorating .placed-room-decor.is-wall-mounted {
  border-radius: 12px;
}
#world-scene.is-decorating .placed-room-decor.is-invalid-placement {
  border-color: #c96f6a;
  background: #fff3f0e8;
  outline: 2px solid #c96f6a;
}
.park-friend-placed-decor.is-wall-mounted {
  width: 10%;
  height: auto;
  transform: translate(-50%, -50%);
}


/* v0.13.2 build 170: slimmer stage chrome and a scrollable floating Arrange panel. */
#app > .topbar {
  height: 64px;
  min-height: 64px;
  padding-block: 0;
  gap: 12px;
}
#app > .topbar .brand { gap: 8px; }
#app > .topbar .brand-mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 12px;
}
#app > .topbar .brand-mark span { font-size: 1.1875rem; }
#app > .topbar .brand-copy { gap: 2px; }
#app > .topbar .brand-copy strong { font-size: 1.125rem; letter-spacing: -.55px; }
#app > .topbar .brand-copy small { font-size: 0.4375rem; letter-spacing: 1.2px; }
#app > .topbar .connection-pill { height: 27px; padding-inline: 9px; }
#app > .topbar .button-small { min-height: 30px; padding: 6px 9px; }
#app > .topbar .pal-switcher { min-height: 32px; padding-block: 4px; }
#app > .topbar .stage-header-tools > summary { min-height: 31px; padding: 5px 9px; }

#persistent-pet-stage .stage-top-bar > .stage-care-dock {
  gap: 5px;
  padding: 6px 8px;
  border-radius: 15px;
}
#persistent-pet-stage .stage-care-action-row { gap: 6px; }
#persistent-pet-stage .stage-care-action-row > .stage-household-toggle,
#persistent-pet-stage .stage-care-action-row .stage-feature-controls .stage-feature-toggle,
#persistent-pet-stage .stage-care-action-row > .stage-household-tidy {
  min-height: 32px;
  padding-block: 4px;
}
#persistent-pet-stage .stage-care-needs:not([hidden]) { margin-top: 2px; }
#persistent-pet-stage .stage-care-needs .stage-need-chip { padding-block: 4px; }
#persistent-pet-stage .stage-care-dock.has-chin { gap: 5px; }
#stage-workbench #pet-tabs .pet-tab {
  min-height: 33px;
  padding: 3px 6px;
  gap: 4px;
}
#stage-workbench #pet-tabs .pet-tab-icon { font-size: 0.875rem; }
#stage-workbench .stage-keepsakes-toggle {
  min-height: 26px;
  padding: 3px 11px;
  font-size: 0.5625rem;
}
#stage-workbench .stage-bottom-dock { bottom: max(8px, env(safe-area-inset-bottom, 0px)); }

#stage-workbench .room-arrange-dock {
  position: absolute;
  z-index: 170;
  top: var(--room-arrange-top, 142px);
  right: 17px;
  bottom: var(--room-arrange-bottom, 116px);
  left: auto;
  width: min(440px, 38vw);
  min-width: 310px;
  max-width: calc(100% - 34px);
  min-height: 0;
  max-height: none;
  overflow: hidden;
  pointer-events: none;
}
#stage-workbench .room-arrange-dock[hidden] { display: none !important; }
#stage-workbench .room-arrange-panel {
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 11px;
  overflow: hidden;
  border: 1px solid #ffffffed;
  border-radius: 18px;
  background: #fffdf5f5;
  box-shadow: 0 16px 44px #3d463230, inset 0 1px #ffffff;
  backdrop-filter: blur(20px) saturate(1.14);
  -webkit-backdrop-filter: blur(20px) saturate(1.14);
  color: #705b49;
  pointer-events: auto;
}
#stage-workbench .room-arrange-panel[hidden] { display: none !important; }
#stage-workbench .room-arrange-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 8px;
  border-bottom: 1px solid #eee5d9;
}
#stage-workbench .room-arrange-header > div { min-width: 0; }
#stage-workbench .room-arrange-header .eyebrow { margin: 0 0 2px; font-size: 0.4375rem; letter-spacing: 1.3px; }
#stage-workbench .room-arrange-header h3 { margin: 0; color: #6e5848; font-family: var(--round); font-size: 1rem; font-weight: 900; line-height: 1.2; }
#stage-workbench .room-arrange-header small { display: block; margin-top: 3px; color: #958577; font-size: 0.5625rem; line-height: 1.35; }
#stage-workbench .room-arrange-header .button { min-height: 30px; flex: 0 0 auto; padding: 5px 9px; font-size: 0.5625rem; }
#stage-workbench .room-arrange-scroll {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  padding: 1px 3px 4px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d7cbb9 transparent;
}
#stage-workbench .room-arrange-scroll .stage-home-settings {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
  padding: 0;
}
#stage-workbench .room-arrange-scroll .home-current-summary { padding: 8px; border-radius: 11px; }
#stage-workbench .room-arrange-scroll .home-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#stage-workbench .room-arrange-scroll .home-select-label { gap: 4px; font-size: 0.5625rem; }
#stage-workbench .room-arrange-scroll .home-select-label select { min-height: 35px; padding: 6px 8px; font-size: 0.625rem; }
#stage-workbench .room-arrange-scroll #save-home-button { align-self: flex-start; min-height: 31px; padding: 6px 10px; font-size: 0.625rem; }
#stage-workbench .room-arrange-scroll .home-feedback { margin: 0; padding: 8px 9px; font-size: 0.5625rem; }
#stage-workbench .room-arrange-scroll .decorator-actions { display: flex; align-items: center; gap: 6px; margin: 0; }
#stage-workbench .room-arrange-scroll .decorator-actions .button { min-height: 30px; padding: 5px 8px; font-size: 0.5625rem; }
#stage-workbench .room-arrange-scroll .decor-placement-count { flex: 0 0 auto; font-size: 0.5625rem; }
#stage-workbench .room-arrange-scroll .decor-editor-feedback { flex: 0 0 auto; min-height: 0; margin: 0; padding: 8px 9px; font-size: 0.5625rem; line-height: 1.5; }
#stage-workbench .room-arrange-scroll .in-stage-decor-catalog-slot { flex: 0 0 auto; height: auto; min-height: 0; max-height: none; margin-top: 8px; overflow: visible; }
#stage-workbench .room-arrange-scroll .home-decor-catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 7px;
  width: 100%;
  height: auto;
  min-width: 0;
  overflow: visible;
  padding: 0 1px 3px;
}
#stage-workbench .room-arrange-scroll .home-decor-card {
  display: flex;
  width: auto;
  min-width: 0;
  min-height: 88px;
  height: auto;
  gap: 4px;
  padding: 7px 5px;
  border-radius: 11px;
  touch-action: pan-y;
}
#stage-workbench .room-arrange-scroll .home-decor-card img { width: 38px; height: 38px; }
#stage-workbench .room-arrange-scroll .home-decor-card strong { font-size: 0.5625rem; }
#stage-workbench .room-arrange-scroll .home-decor-card small { font-size: 0.4375rem; line-height: 1.25; }
#stage-workbench .room-arrange-scroll .social-empty { margin: 8px 0; font-size: 0.625rem; }

@media (max-width: 760px) {
  #app > .topbar { height: 58px; min-height: 58px; padding-inline: max(12px, env(safe-area-inset-left, 0px)); }
  #app > .topbar .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }
  #app > .topbar .brand-copy strong { font-size: 1rem; }
  #app > .topbar .topbar-right { gap: 6px; }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock { padding: 5px 6px; gap: 4px; }
  #persistent-pet-stage .stage-care-action-row { gap: 4px; }
  #stage-workbench #pet-tabs .pet-tab { min-height: 30px; padding: 2px 4px; }
  #stage-workbench #pet-tabs .pet-tab-icon { font-size: 0.8125rem; }
  #stage-workbench .stage-keepsakes-toggle { min-height: 24px; padding: 2px 9px; }
  #stage-workbench .stage-bottom-dock { bottom: max(5px, env(safe-area-inset-bottom, 0px)); }
  #stage-workbench .room-arrange-dock {
    top: var(--room-arrange-top, 120px);
    right: 8px;
    bottom: var(--room-arrange-bottom, 84px);
    left: 8px;
    width: auto;
    min-width: 0;
    max-width: none;
  }
  #stage-workbench .room-arrange-panel { padding: 9px; border-radius: 16px; }
  #stage-workbench .room-arrange-header { gap: 8px; padding-bottom: 6px; }
  #stage-workbench .room-arrange-header h3 { font-size: 0.875rem; }
  #stage-workbench .room-arrange-scroll { gap: 7px; }
  #stage-workbench .room-arrange-scroll .home-editor { grid-template-columns: minmax(0, 1fr); }
  #stage-workbench .room-arrange-scroll .decorator-actions { flex-wrap: wrap; }
  #stage-workbench .room-arrange-scroll .home-decor-catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  #stage-workbench .room-arrange-scroll .home-decor-card { min-height: 78px; padding: 5px 3px; }
  #stage-workbench .room-arrange-scroll .home-decor-card img { width: 31px; height: 31px; }
  #stage-workbench .room-arrange-scroll .home-decor-card small { display: none; }
}
@media (max-width: 390px) {
  #stage-workbench .room-arrange-scroll .home-decor-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-height: 680px) and (min-width: 761px) {
  #stage-workbench .room-arrange-dock { width: min(390px, 34vw); }
  #stage-workbench .room-arrange-panel { padding: 8px; gap: 6px; }
  #stage-workbench .room-arrange-scroll { gap: 6px; }
  #stage-workbench .room-arrange-scroll .home-decor-card { min-height: 72px; }
}


/* v0.13.3 build 171: keep Arrange instructions fully visible above the decor cards. */


/* v0.13.9 build 177: Park/Home switches sit at the right edge of each Pal row. */
#stage-workbench .stage-household-menu .stage-pet-choice-row {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  min-height: 43px;
}
#stage-workbench .stage-household-menu .stage-pet-choice-row > .stage-pet-choice {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  min-height: 41px;
  padding: 4px 5px;
  gap: 6px;
}
#stage-workbench .stage-household-menu .stage-pet-choice-row > .stage-pet-choice .stage-pet-choice-name {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}
#stage-workbench .stage-household-menu .stage-pet-presence-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid #ece3d6;
  border-radius: 10px;
  background: #f8f5ee;
}
#stage-workbench .stage-household-menu .stage-pet-presence-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 27px;
  padding: 3px 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #918371;
  font:inherit;
  font-size: 0.5rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease, opacity .14s ease;
}
#stage-workbench .stage-household-menu .stage-pet-presence-button:hover:not(:disabled) {
  border-color: #dfd4c3;
  background: #fffdfa;
  color: #665b4c;
}
#stage-workbench .stage-household-menu .stage-pet-presence-button.is-active,
#stage-workbench .stage-household-menu .stage-pet-presence-button[aria-pressed="true"] {
  border-color: #cfe0c5;
  background: #eaf4e5;
  color: #55764d;
  box-shadow: inset 0 1px #ffffff;
}
#stage-workbench .stage-household-menu .stage-pet-presence-home.is-active,
#stage-workbench .stage-household-menu .stage-pet-presence-home[aria-pressed="true"] {
  border-color: #e8d8c8;
  background: #f6eee5;
  color: #8b6d55;
}
#stage-workbench .stage-household-menu .stage-pet-presence-button:disabled {
  opacity: .68;
  cursor: default;
}
#stage-workbench .stage-household-menu .stage-pet-choice-row.is-at-park > .stage-pet-choice {
  background: #f4f8ef;
}
#stage-workbench .stage-household-menu .stage-pet-choice-row.is-selected > .stage-pet-choice,
#stage-workbench .stage-household-menu .stage-pet-choice-row > .stage-pet-choice[aria-pressed="true"] {
  border-color: #e7c5b5;
  background: #fff2ea;
}
#stage-workbench .stage-household-menu .stage-pet-choice:focus-visible,
#stage-workbench .stage-household-menu .stage-pet-presence-button:focus-visible {
  outline: 2px solid #d58e78;
  outline-offset: 1px;
}
@media (max-width: 390px) {
  #stage-workbench .stage-household-menu .stage-pet-choice-row { gap: 3px; }
  #stage-workbench .stage-household-menu .stage-pet-presence-button { min-width: 31px; padding-inline: 4px; font-size: 0.4375rem; }
  #stage-workbench .stage-household-menu .stage-pet-choice-avatar { width: 27px; height: 27px; flex-basis: 27px; }
}

/* v0.13.13 build 181: portrait stage HUD is three deliberate rows. */
#persistent-pet-stage .stage-care-action-row .stage-room-functions {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
#stage-workbench .room-arrange-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}
#stage-workbench #minimize-room-arrange { display: none; }

@media (max-width: 760px) and (orientation: portrait) {
  #persistent-pet-stage .stage-top-bar {
    top: calc(64px + env(safe-area-inset-top, 0px));
    left: max(6px, env(safe-area-inset-left, 0px));
    right: max(6px, env(safe-area-inset-right, 0px));
  }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: 6px 7px 7px;
    border-radius: 15px;
  }
  #persistent-pet-stage .stage-care-action-row {
    display: grid !important;
    grid-template-columns: minmax(100px, .84fr) minmax(0, 1.5fr);
    grid-template-areas: "household functions" "actions tidy";
    align-items: center;
    column-gap: 6px;
    row-gap: 5px;
    width: 100%;
    min-width: 0;
    padding: 0;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker {
    grid-area: household;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker > .stage-household-toggle {
    width: 100%;
    min-height: 36px;
    max-width: none;
    gap: 4px;
    padding: 4px 6px 4px 4px;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker .stage-household-current-avatar {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
    font-size: 0.8125rem;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker .stage-household-toggle-label {
    max-width: 8ch;
    font-size: 0.5625rem;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker .stage-household-count { display: none; }

  #persistent-pet-stage .stage-care-action-row .stage-room-functions {
    grid-area: functions;
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }
  #persistent-pet-stage .stage-care-action-row .stage-room-functions::-webkit-scrollbar { display: none; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools {
    display: flex !important;
    flex: 0 0 auto !important;
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    align-items: center;
    gap: 2px;
    margin: 0 !important;
    overflow: visible !important;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools > button {
    min-width: 29px;
    min-height: 34px;
    padding: 3px 4px;
    font-size: 0.6875rem;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .park-map-zoom-readout {
    min-width: 26px;
    font-size: 0.5rem;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button {
    display: inline-flex !important;
    min-width: 29px;
    padding-inline: 4px;
    font-size: 0;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button span { display: none; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
    width: max-content;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls .stage-feature-toggle {
    min-height: 33px;
    padding: 4px 6px;
    gap: 2px;
    font-size: 0.5rem;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions {
    grid-area: actions;
    display: flex !important;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: 42px;
    align-items: stretch;
    gap: 3px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions::-webkit-scrollbar { display: none; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action {
    flex: 0 0 39px;
    width: 39px;
    min-width: 39px;
    min-height: 37px;
    padding: 3px 2px;
    border-radius: 10px;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action-icon { font-size: 0.8125rem; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action-label { font-size: 0.375rem; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy {
    grid-area: tidy;
    justify-self: end;
    align-self: stretch;
    min-width: 65px;
    min-height: 37px;
    max-width: 88px;
    margin: 0;
    padding: 4px 6px;
    font-size: 0.5rem;
    line-height: 1.1;
    white-space: normal;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy .stage-household-tidy-icon { font-size: 0.8125rem; }

  /* Six small vertical meters echo the Watch companion's pastel fill capsules. */
  #persistent-pet-stage .stage-care-dock > .stage-care-needs:not([hidden]) {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: stretch;
    gap: 4px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    margin: 0 !important;
    padding: 6px 0 0 !important;
    border-top: 1px solid #e9e3d7;
    overflow: visible;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7px;
    grid-template-rows: 1fr;
    align-items: stretch;
    gap: 3px;
    width: auto;
    min-width: 0;
    max-width: none;
    min-height: 43px;
    padding: 4px 4px 4px 5px;
    border: 1px solid #ffffffd9;
    border-radius: 9px;
    background: #ffffffad;
    box-shadow: 0 2px 6px #5b61430c, inset 0 1px #ffffff;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 15px 12px;
    align-content: center;
    align-items: center;
    gap: 0 2px;
    min-width: 0;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-icon {
    grid-column: 1;
    grid-row: 1;
    font-size: 0.625rem;
    text-align: left;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-value {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.40625rem;
    color: #756957;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-label {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: start;
    font-size: 0.375rem;
    line-height: 1.1;
    letter-spacing: -.02em;
    text-overflow: clip;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-track {
    grid-column: 2;
    grid-row: 1 / 3;
    position: relative;
    align-self: center;
    width: 7px;
    height: 34px;
    margin: 0;
    overflow: hidden;
    border-radius: 99px;
    background: #ece9df;
    box-shadow: inset 0 1px 2px #6d604015;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-fill {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100% !important;
    height: var(--need-fill-level, 0%);
    border-radius: inherit;
    transition: height .3s ease;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip[data-stage-need="hunger"] { background: #fff4ee; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip[data-stage-need="happiness"] { background: #fff1f3; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip[data-stage-need="energy"] { background: #f5f1ff; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip[data-stage-need="cleanliness"] { background: #eff8f1; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip[data-stage-need="health"] { background: #eff6fc; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip[data-stage-need="pottyNeed"] { background: #fff3ef; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip.is-low { border-color: #edc9b7; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip.is-urgent { border-color: #e1a39a; }

  /* The mobile Arrange surface is a compact tray, not a floor-covering chin. */
  #stage-workbench #minimize-room-arrange { display: inline-flex; }
  #stage-workbench .room-arrange-dock {
    top: auto;
    right: 6px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    left: 6px;
    width: auto;
    height: min(36svh, 310px);
    max-height: min(40svh, 340px);
    min-height: 0;
    max-width: none;
    overflow: hidden;
  }
  #stage-workbench .room-arrange-panel {
    height: 100%;
    max-height: 100%;
    padding: 8px;
    gap: 6px;
    border-radius: 15px;
    background: #fffdf5f7;
  }
  #stage-workbench .room-arrange-header { gap: 6px; padding-bottom: 5px; }
  #stage-workbench .room-arrange-header .eyebrow { font-size: 0.375rem; }
  #stage-workbench .room-arrange-header h3 { font-size: 0.8125rem; }
  #stage-workbench .room-arrange-header small { margin-top: 2px; font-size: 0.5rem; }
  #stage-workbench .room-arrange-header-actions { gap: 4px; }
  #stage-workbench .room-arrange-header-actions .button { min-height: 28px; padding: 4px 7px; font-size: 0.5rem; }
  #stage-workbench .room-arrange-scroll { gap: 6px; padding-right: 2px; }
  #stage-workbench .room-arrange-scroll .stage-home-settings { gap: 5px; }
  #stage-workbench .room-arrange-scroll .home-current-summary { padding: 6px 7px; }
  #stage-workbench .room-arrange-scroll .home-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  #stage-workbench .room-arrange-scroll .home-select-label { font-size: 0.5rem; }
  #stage-workbench .room-arrange-scroll .home-select-label select { min-height: 31px; padding: 4px 6px; font-size: 0.5625rem; }
  #stage-workbench .room-arrange-scroll #save-home-button { min-height: 28px; padding: 4px 8px; font-size: 0.5625rem; }
  #stage-workbench .room-arrange-scroll .home-feedback,
  #stage-workbench .room-arrange-scroll .decor-editor-feedback { padding: 6px 7px; font-size: 0.5rem; line-height: 1.35; }
  #stage-workbench .room-arrange-scroll .decorator-actions { gap: 4px; }
  #stage-workbench .room-arrange-scroll .decorator-actions .button { min-height: 27px; padding: 4px 6px; font-size: 0.5rem; }
  #stage-workbench .room-arrange-scroll .in-stage-decor-catalog-slot { margin-top: 2px; }
  #stage-workbench .room-arrange-scroll .home-decor-catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  #stage-workbench .room-arrange-scroll .home-decor-card { min-height: 70px; padding: 4px 3px; border-radius: 9px; }
  #stage-workbench .room-arrange-scroll .home-decor-card img { width: 28px; height: 28px; }
  #stage-workbench .room-arrange-scroll .home-decor-card strong { font-size: 0.5rem; }
  #stage-workbench .room-arrange-scroll .home-decor-card small { display: none; }
}

@media (max-width: 390px) and (orientation: portrait) {
  #persistent-pet-stage .stage-care-action-row { grid-template-columns: minmax(94px, .78fr) minmax(0, 1.55fr); column-gap: 4px; }
  #persistent-pet-stage .stage-care-action-row .stage-room-functions { gap: 3px; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls { gap: 2px; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls .stage-feature-toggle { padding-inline: 4px; font-size: 0.4375rem; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs:not([hidden]) { gap: 3px; padding-top: 3px !important; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip { padding-inline: 3px; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-label { font-size: 0.34375rem; }
}

/* v0.13.13 build 181: mobile portrait HUD and non-blocking room placement. */
@media (max-width: 760px) and (orientation: portrait) {
  /* Keep the small first row available during Arrange so Show tray and Done remain reachable. */
  #persistent-pet-stage .stage-top-bar.is-decorating .stage-care-action-row {
    display: grid !important;
    grid-template-columns: minmax(100px, .84fr) minmax(0, 1.5fr);
    grid-template-areas: "household functions";
    grid-template-rows: auto;
    row-gap: 0;
  }
  #persistent-pet-stage .stage-top-bar.is-decorating .stage-care-dock > .stage-care-needs,
  #persistent-pet-stage .stage-top-bar.is-decorating .stage-care-dock > .stage-care-meta {
    display: none !important;
  }
  #persistent-pet-stage .stage-top-bar.is-decorating .stage-care-action-row > .stage-care-actions,
  #persistent-pet-stage .stage-top-bar.is-decorating .stage-care-action-row > .stage-household-tidy {
    display: none !important;
  }
  #persistent-pet-stage .stage-top-bar.is-decorating .stage-care-action-row .stage-room-functions {
    justify-content: flex-end;
  }
  #persistent-pet-stage .stage-top-bar.is-decorating .stage-feature-controls .arrange-feature-toggle {
    min-width: 76px;
    min-height: 34px;
    font-size: 0.5rem;
  }

  /* The inventory is a short sheet; selecting a piece collapses it entirely. */
  #stage-workbench .room-arrange-dock {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    height: min(34svh, 286px);
    max-height: min(38svh, 310px);
  }
  #stage-workbench .room-arrange-panel {
    padding: 7px;
    gap: 5px;
  }
  #stage-workbench .room-arrange-header {
    align-items: center;
    min-height: 31px;
  }
  #stage-workbench .room-arrange-header > div:first-child {
    min-width: 0;
  }
  #stage-workbench .room-arrange-header h3 {
    font-size: 0.75rem;
  }
  #stage-workbench .room-arrange-header small {
    max-width: 30ch;
    font-size: 0.4375rem;
  }
  #stage-workbench .room-arrange-header-actions .button {
    min-height: 30px;
    white-space: nowrap;
  }
  #stage-workbench .room-arrange-scroll {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  #stage-workbench .room-arrange-scroll .home-decor-catalog {
    touch-action: pan-x;
  }
  #stage-workbench .room-arrange-scroll .home-decor-card {
    touch-action: pan-x;
    -webkit-tap-highlight-color: transparent;
  }
  #stage-workbench #minimize-room-arrange {
    display: inline-flex;
  }
  #world-scene.is-decorating .home-decoration-layer {
    pointer-events: auto;
    touch-action: none;
  }
}


@media (max-width: 760px) and (orientation: portrait) {
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip { min-height: 36px; grid-template-columns: minmax(0, 1fr) 7px; padding-block: 2px; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-top { grid-template-rows: 13px 11px; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-icon { font-size: 0.625rem; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-value { font-size: 0.4375rem; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-label { font-size: 0.40625rem; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-track { width: 7px; height: 26px; }
}
@media (max-width: 390px) and (orientation: portrait) {
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-label { font-size: 0.375rem; }
}

/* v0.13.15 build 183: let mobile care actions scroll all the way to Tidy home. */
@media (max-width: 760px) and (orientation: portrait) {
  #persistent-pet-stage .stage-care-action-row {
    --stage-tidy-action-width: 66px;
    --stage-action-tidy-gap: 6px;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    width: auto;
    max-width: none;
    margin-right: calc(var(--stage-tidy-action-width) + var(--stage-action-tidy-gap));
    justify-self: stretch;
    align-self: stretch;
    position: relative;
    z-index: 0;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy {
    grid-column: 2;
    grid-row: 2;
    width: var(--stage-tidy-action-width);
    min-width: var(--stage-tidy-action-width);
    max-width: var(--stage-tidy-action-width);
    justify-self: end;
    z-index: 1;
  }
  #persistent-pet-stage .stage-care-action-row:has(> .stage-household-tidy[hidden]) > .stage-care-actions {
    margin-right: 0;
  }
}


/* v0.13.16 build 184: Help is organized as a practical Quick Start and a reference User Manual. */
.help-quick-start { padding: clamp(16px, 2.5vw, 24px); background: linear-gradient(145deg, #fffdf7, #f1f7ef 58%, #f8f1fb); }
.help-manual-kicker { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.help-manual-kicker .eyebrow { margin: 0; }
.help-manual-kicker > span { color: #a08f7c; font-size: 0.5625rem; font-weight: 800; letter-spacing: .12em; }
.help-quick-start > h3, .help-manual-intro h3 { margin: 3px 0 5px; color: #5f5048; font-size: clamp(1.1875rem, 2.5vw, 1.4375rem); }
.help-quick-start-lede, .help-manual-intro > p:last-of-type { margin: 0; color: #7c6c60; font-size: 0.75rem; line-height: 1.55; }
.help-step-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 16px 0 0; padding: 0; list-style: none; counter-reset: help-step; }
.help-step-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 9px; min-width: 0; }
.help-step-number { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #e9d4c2; border-radius: 10px; background: #fff9f1; color: #a77964; font-size: 0.75rem; font-weight: 900; }
.help-step-list h4 { margin: 1px 0 3px; color: #67554a; font-size: 0.75rem; }
.help-step-list p { margin: 0; color: #806f63; font-size: 0.6875rem; line-height: 1.52; }
.help-notification-nudge { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 12px 13px; border: 1px solid #e7ddd0; border-radius: 13px; background: rgba(255,255,255,.72); }
.help-notification-nudge strong { display: block; color: #665449; font-size: 0.75rem; }
.help-notification-nudge p { margin: 3px 0 0; color: #8b796d; font-size: 0.625rem; line-height: 1.45; }
.help-notification-nudge .button { flex: 0 0 auto; white-space: nowrap; }
.help-manual { display: grid; gap: 12px; }
.help-manual-intro { padding: 15px 17px; border: 1px solid #e7e0d6; border-radius: 16px; background: linear-gradient(120deg, #fffaf3, #f7f4fb); }
.help-manual-intro .eyebrow { margin: 0; }
.help-manual-index { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.help-manual-index a { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 10px; border: 1px solid #e9dfd4; border-radius: 999px; background: #fffdfa; color: #79675a; font-size: 0.625rem; font-weight: 800; text-decoration: none; }
.help-manual-index a:hover, .help-manual-index a:focus-visible { border-color: #c3d6bf; background: #f3f8f1; outline: none; }
.help-notification-guide-copy { padding-top: 3px; }
.help-notification-guide-copy article { padding-bottom: 10px; }
#notification-settings-card { scroll-margin-top: 18px; }
@media (max-width: 600px) {
  .help-step-list { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .help-notification-nudge { align-items: stretch; flex-direction: column; }
  .help-notification-nudge .button { width: 100%; }
}


/* v0.13.17 build 185: reserve the desktop room controls before sizing the care scroller. */
@media (min-width: 1101px) {
  #persistent-pet-stage .stage-care-action-row .stage-room-functions {
    flex: 0 0 auto !important;
    width: max-content;
    min-width: max-content;
    max-width: none;
    overflow: visible;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions {
    flex: 1 1 0 !important;
    width: 0;
    min-width: 54px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    z-index: 0;
  }
}


/* v0.13.17.1 build 186: recompose the Field Guide into a readable full-width guide. */
.stage-screen-host > #tab-panel-help .help-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}
.stage-screen-host > #tab-panel-help .help-page > * { min-width: 0; width: 100%; }
#tab-panel-help .help-intro {
  display: grid;
  gap: 8px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid #e8d9cc;
  border-radius: 22px;
  background: linear-gradient(118deg, #fff7ef 0%, #fffdfa 52%, #eff7ed 100%);
  box-shadow: 0 10px 28px #765b4410, inset 0 1px #fff;
}
#tab-panel-help .help-intro > .eyebrow { margin: 0; }
#tab-panel-help .help-intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
  align-items: center;
  gap: 20px 28px;
}
#tab-panel-help .help-intro-copy { min-width: 0; }
#tab-panel-help .help-intro h2 {
  margin: 0 0 9px;
  color: #493e37;
  font-size: clamp(1.6875rem, 4vw, 2.4375rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}
#tab-panel-help .help-intro-lede {
  max-width: 68ch;
  margin: 0;
  color: #76685f;
  font-size: 0.9375rem;
  line-height: 1.6;
}
#tab-panel-help .help-intro-actions {
  display: grid;
  justify-items: stretch;
  gap: 8px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #ffffffd9;
  border-radius: 17px;
  background: #ffffffa8;
  box-shadow: 0 4px 14px #735e4810;
}
#tab-panel-help .help-intro-actions .button { width: 100%; min-height: 42px; }
#tab-panel-help .help-quick-start {
  padding: clamp(17px, 2.5vw, 25px);
  border: 1px solid #e4e4d8;
  border-radius: 21px;
  background: linear-gradient(145deg, #fffdf7, #f1f7ef 58%, #f8f1fb);
}
#tab-panel-help .help-step-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-top: 17px;
}
#tab-panel-help .help-step-list li {
  min-height: 100%;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  padding: 13px;
  border: 1px solid #e9e3d9;
  border-radius: 15px;
  background: #fffefa;
  box-shadow: 0 3px 11px #77634b0a;
}
#tab-panel-help .help-step-list li:nth-child(3n + 1) { background: linear-gradient(145deg, #fff8f1, #fffefa 75%); }
#tab-panel-help .help-step-list li:nth-child(3n + 2) { background: linear-gradient(145deg, #f2f8ef, #fffefa 75%); }
#tab-panel-help .help-step-list li:nth-child(3n) { background: linear-gradient(145deg, #f6f1fb, #fffefa 75%); }
#tab-panel-help .help-step-number { width: 31px; height: 31px; border-radius: 11px; font-size: 0.8125rem; }
#tab-panel-help .help-step-list h4 { margin: 1px 0 5px; font-size: 0.8125rem; }
#tab-panel-help .help-step-list p { font-size: 0.75rem; line-height: 1.58; }
#tab-panel-help .help-notification-nudge { margin-top: 13px; }
#tab-panel-help .notification-settings-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid #e6dfd3;
  border-radius: 19px;
  background: #fffefa;
}
#tab-panel-help .notification-settings-details > summary {
  min-height: 61px;
  padding: 15px 19px;
  background: linear-gradient(100deg, #fff7ed, #f1f7ed);
  color: #655247;
  font-size: 0.9375rem;
  font-weight: 850;
}
#tab-panel-help .notification-settings-body { padding: clamp(14px, 2.2vw, 22px); }
#tab-panel-help .help-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}
#tab-panel-help .help-manual-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, .9fr);
  align-items: center;
  gap: 2px 24px;
  padding: 19px 21px;
  border: 1px solid #e7e0d6;
  border-radius: 18px;
  background: linear-gradient(115deg, #fffaf3, #f7f4fb);
}
#tab-panel-help .help-manual-intro > .eyebrow { grid-column: 1; grid-row: 1; }
#tab-panel-help .help-manual-intro h3 { grid-column: 1; grid-row: 2; margin: 2px 0 5px; }
#tab-panel-help .help-manual-intro > p:not(.eyebrow) { grid-column: 1; grid-row: 3; margin: 0; color: #7c6c60; font-size: 0.75rem; line-height: 1.55; }
#tab-panel-help .help-manual-index {
  grid-column: 2;
  grid-row: 1 / 4;
  justify-content: flex-end;
  align-content: center;
  margin: 0;
  padding-left: 12px;
}
#tab-panel-help .help-manual-index a { min-height: 35px; padding: 6px 12px; font-size: 0.6875rem; }
#tab-panel-help .help-manual-tools {
  display: grid;
  grid-template-columns: minmax(255px, .78fr) minmax(0, 1.22fr);
  align-items: start;
  gap: 14px;
  min-width: 0;
}
#tab-panel-help .help-cheat-card,
#tab-panel-help .help-controls-card { min-width: 0; height: 100%; border-radius: 18px; }
#tab-panel-help .help-cheat-card { align-content: start; padding: 19px; }
#tab-panel-help .help-cheat-card > div,
#tab-panel-help .help-cheat-form { min-width: 0; }
#tab-panel-help .help-controls-card { padding: 18px; }
#tab-panel-help .help-controls-grid { gap: 8px; }
#tab-panel-help .help-controls-grid > article { padding: 10px; background: #fffefa; }
#tab-panel-help .help-controls-grid p { font-size: 0.6875rem; line-height: 1.55; }
#tab-panel-help .help-reference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  min-width: 0;
}
#tab-panel-help .help-reference-grid > .help-foldout { min-width: 0; height: fit-content; border-radius: 17px; }
#tab-panel-help .help-reference-grid > .help-nerd-foldout { grid-column: 1 / -1; }
#tab-panel-help .help-reference-grid .help-foldout details > summary { min-height: 58px; }
#tab-panel-help .help-closing { padding: 7px 12px 18px; }
@media (max-width: 900px) {
  #tab-panel-help .help-step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #tab-panel-help .help-manual-tools { grid-template-columns: minmax(0, 1fr); }
  #tab-panel-help .help-cheat-card,
  #tab-panel-help .help-controls-card { height: auto; }
}
@media (max-width: 720px) {
  .stage-screen-host > #tab-panel-help .help-page { gap: 11px; }
  #tab-panel-help .help-intro { padding: 17px; border-radius: 17px; }
  #tab-panel-help .help-intro-layout { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  #tab-panel-help .help-intro h2 { font-size: clamp(1.5625rem, 7vw, 2rem); }
  #tab-panel-help .help-intro-lede { font-size: 0.8125rem; }
  #tab-panel-help .help-intro-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; }
  #tab-panel-help .help-intro-actions .button { min-height: 39px; padding-inline: 9px; font-size: 0.6875rem; }
  #tab-panel-help .help-quick-start { padding: 14px; border-radius: 17px; }
  #tab-panel-help .help-step-list { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 12px; }
  #tab-panel-help .help-step-list li { padding: 11px; }
  #tab-panel-help .help-step-list p { font-size: 0.75rem; }
  #tab-panel-help .help-notification-nudge { gap: 9px; padding: 11px; }
  #tab-panel-help .notification-settings-body { padding: 12px; }
  #tab-panel-help .help-manual-intro { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 15px; }
  #tab-panel-help .help-manual-intro > .eyebrow,
  #tab-panel-help .help-manual-intro h3,
  #tab-panel-help .help-manual-intro > p:not(.eyebrow) { grid-column: 1; grid-row: auto; }
  #tab-panel-help .help-manual-index { grid-column: 1; grid-row: auto; justify-content: flex-start; padding: 4px 0 0; }
  #tab-panel-help .help-reference-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  #tab-panel-help .help-reference-grid > .help-nerd-foldout { grid-column: 1; }
  #tab-panel-help .help-controls-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 721px) and (max-width: 1100px) {
  #tab-panel-help .help-reference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Existing-household recovery is deliberately distinct from first-time onboarding.
   It prevents an update or passport-authentication hiccup from looking like a new account. */
.existing-household-recovery {
  grid-column: 1 / -1;
  width: min(760px, 100%);
  justify-self: center;
  padding: clamp(14px, 3vw, 34px) 0;
}
.existing-household-recovery-card {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid #e9dfd5;
  border-radius: 26px;
  background: rgba(255, 253, 250, .96);
  box-shadow: 0 24px 80px rgba(89, 66, 45, .07);
}
.existing-household-recovery-card::after {
  content: "♡";
  position: absolute;
  right: 24px;
  top: 8px;
  color: #f4e7df;
  font:900 clamp(4.5rem, 12vw, 8.25rem)/1 var(--round);
  transform: rotate(12deg);
  pointer-events: none;
}
.existing-household-recovery-card h1 {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 0 14px;
  color: #373230;
  font:900 clamp(2rem, 5vw, 3rem)/1.08 var(--round);
  letter-spacing: -1.5px;
}
.existing-household-recovery-copy,
.existing-household-recovery-count,
.existing-household-recovery-note {
  position: relative;
  z-index: 1;
  max-width: 620px;
  color: #837970;
  font-size: 0.8125rem;
  line-height: 1.75;
}
.existing-household-recovery-count { margin: 18px 0 10px; color: #71675f; font-weight: 750; }
.existing-household-recovery-pals { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 22px; }
.existing-household-recovery-pal { padding: 6px 11px; border: 1px solid #e7ded3; border-radius: 99px; background: #fff9f2; color: #796d63; font-size: 0.6875rem; font-weight: 750; }
.existing-household-recovery-actions { position: relative; z-index: 1; display: grid; gap: 10px; width: min(380px, 100%); margin-top: 22px; }
.existing-household-new-button { border: 1px solid #e4d9cf; background: rgba(255,255,255,.58); color: #74675e; font-weight: 750; }
.existing-household-new-button:hover { background: #fff8f1; border-color: #d8c7b8; }
.existing-household-recovery-note { margin: 14px 0 0; font-size: 0.625rem; color: #a2978d; }
@media (max-width: 760px) {
  .existing-household-recovery { padding: 10px 0 22px; }
  .existing-household-recovery-card { border-radius: 20px; }
  .existing-household-recovery-card h1 { letter-spacing: -1px; }
}

/* v0.13.20 build 189: fixed desktop columns keep Center Room out of the care scroller. */
@media (min-width: 1101px) {
  #persistent-pet-stage .stage-care-action-row {
    display: grid !important;
    grid-template-columns: minmax(200px, 285px) minmax(210px, 330px) minmax(120px, 1fr) max-content;
    align-items: center;
    column-gap: 7px;
    row-gap: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: none !important;
  }
  #persistent-pet-stage .stage-care-action-row .stage-room-functions {
    grid-column: 2;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: none !important;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    contain: inline-size;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button {
    min-width: 96px;
    padding-inline: 5px;
    font-size: 0.5rem;
  }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls { flex: 0 0 auto; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls .stage-feature-toggle {
    min-height: 36px;
    padding: 5px 7px;
    font-size: 0.5625rem;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions {
    grid-column: 3;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: none !important;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    z-index: 0;
    contain: inline-size;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy {
    grid-column: 4;
    justify-self: end;
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* v0.13.20 build 189: preserve the bathroom threshold alignment from the prior release. */
.home-isometric-stage .home-bathroom-station { top: 44.5%; }
.home-isometric-stage .home-bathroom-booth {
  transform: skewY(-10deg);
  transform-origin: center bottom;
}
.home-isometric-stage .home-bathroom-door {
  inset: 8px 16px -2px;
  border-bottom: 2px solid #9e7d69;
}
@media (max-width: 760px) {
  .home-isometric-stage .home-bathroom-station { top: 46%; }
  .home-isometric-stage .home-bathroom-booth { transform: skewY(-10deg); }
}

/* v0.13.24 build 193: keep compact landscape toolbars from colliding. */
@media (max-width: 1100px) and (orientation: landscape) {
  #persistent-pet-stage .stage-top-bar > .stage-care-dock {
    display: flex !important;
    flex: 0 1 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 6px 7px 7px;
  }
  #persistent-pet-stage .stage-care-action-row {
    display: grid !important;
    grid-template-columns: minmax(112px, .78fr) minmax(0, 1.22fr);
    grid-template-rows: auto auto;
    --stage-tidy-action-width: 82px;
    --stage-action-tidy-gap: 7px;
    align-items: center;
    column-gap: 6px;
    row-gap: 5px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker > .stage-household-toggle {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    gap: 5px;
    padding: 4px 7px;
  }
  #persistent-pet-stage .stage-care-action-row .stage-room-functions {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-flow: row nowrap !important;
    align-items: center;
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools > * {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button {
    min-width: 82px;
    padding-inline: 6px;
    font-size: 0.5rem;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button span { display: inline; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls {
    display: flex;
    flex: 0 0 auto;
    flex-flow: row nowrap;
    align-items: center;
    gap: 4px;
    width: max-content;
    min-width: max-content;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex !important;
    flex: none !important;
    align-self: stretch;
    justify-self: stretch;
    width: auto;
    min-width: 0;
    max-width: none;
    max-height: 42px;
    margin-right: calc(var(--stage-tidy-action-width) + var(--stage-action-tidy-gap));
    padding: 0 2px 2px;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    z-index: 0;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    min-height: 38px;
    padding: 3px 2px;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action-icon { font-size: 0.875rem; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action-label { font-size: 0.40625rem; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: stretch;
    flex: 0 0 var(--stage-tidy-action-width, 82px);
    width: var(--stage-tidy-action-width, 82px);
    min-width: var(--stage-tidy-action-width, 82px);
    max-width: var(--stage-tidy-action-width, 82px);
    min-height: 38px;
    margin: 0;
    padding: 4px 5px;
    font-size: 0.5rem;
    line-height: 1.1;
    white-space: normal;
    position: relative;
    z-index: 1;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy .stage-household-tidy-icon { font-size: 0.8125rem; }
  #persistent-pet-stage .stage-care-action-row:has(> .stage-household-tidy[hidden]) > .stage-care-actions { margin-right: 0; }
}


/* v0.13.25 build 194: compact landscape HUD uses one control row. */
@media (min-width: 761px) and (max-width: 1100px) and (orientation: landscape) {
  #persistent-pet-stage .stage-top-bar > .stage-care-dock {
    gap: 4px !important;
    padding: 6px 8px 6px !important;
  }
  #persistent-pet-stage .stage-care-action-row {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    gap: 5px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    padding: 0 0 4px !important;
    border-bottom: 1px solid #e9e3d7;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker {
    flex: 0 0 clamp(150px, 18vw, 190px) !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker > .stage-household-toggle {
    min-height: 36px !important;
    padding: 4px 7px !important;
    gap: 5px !important;
  }
  #persistent-pet-stage .stage-care-action-row .stage-room-functions {
    display: flex !important;
    flex: 0 1 auto !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 310px !important;
    margin: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }
  #persistent-pet-stage .stage-care-action-row .stage-room-functions::-webkit-scrollbar { display: none; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    gap: 3px !important;
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools > button {
    min-width: 30px !important;
    min-height: 34px !important;
    padding: 3px 6px !important;
    font-size: 0.5625rem !important;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .park-map-zoom-readout {
    min-width: 30px !important;
    font-size: 0.5rem !important;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button {
    min-width: 68px !important;
    padding-inline: 5px !important;
    font-size: 0.5rem !important;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button span { display: inline !important; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    gap: 3px !important;
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls .stage-feature-toggle {
    min-height: 34px !important;
    padding: 4px 6px !important;
    gap: 3px !important;
    font-size: 0.5rem !important;
    white-space: nowrap !important;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions {
    display: flex !important;
    flex: 1 1 0 !important;
    flex-flow: row nowrap !important;
    align-items: stretch !important;
    gap: 3px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: 38px !important;
    margin: 0 !important;
    padding: 0 1px 1px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    position: relative;
    z-index: 0;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions::-webkit-scrollbar { display: none; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action {
    flex: 0 0 39px !important;
    width: 39px !important;
    min-width: 39px !important;
    min-height: 34px !important;
    padding: 2px 2px !important;
    border-radius: 9px !important;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action-icon { font-size: 0.8125rem !important; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action-label { font-size: 0.375rem !important; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy {
    display: inline-flex !important;
    flex: 0 0 68px !important;
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 3px 5px !important;
    gap: 3px !important;
    font-size: 0.4375rem !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy .stage-household-tidy-icon { font-size: 0.8125rem !important; }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs:not([hidden]) {
    gap: 5px !important;
    padding-top: 5px !important;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip {
    min-height: 38px;
    padding: 4px 6px !important;
  }
}

/* v0.13.27 build 196: open the room up, flatten the bottom dock, and group destinations. */
#stage-workbench .stage-bottom-dock {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: max-content;
  max-width: calc(100vw - 20px);
}
#stage-workbench #pet-tabs.pet-tabs {
  flex: 0 1 auto;
  width: auto;
  max-width: min(calc(100vw - 78px), 520px);
  gap: 4px;
  padding: 5px;
  border-radius: 17px;
  background: #fffdf0e5;
  box-shadow: 0 5px 19px #534c3b18, inset 0 1px #fff;
  backdrop-filter: blur(12px) saturate(1.08);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
}
#stage-workbench #pet-tabs .pet-tab {
  min-width: 67px;
  min-height: 45px;
  padding: 4px 9px;
  border-radius: 12px;
  font-size: 0.5625rem;
}
#stage-workbench #pet-tabs .pet-tab-icon { font-size: 1rem; }
#stage-workbench #pet-tabs .pet-tab.is-group-active,
#stage-workbench #pet-tabs .pet-tab[aria-current="page"] {
  border-color: #edc2ad;
  background: linear-gradient(145deg, #fff1e8, #fffaf3);
  color: #8c5f50;
  box-shadow: 0 2px 8px #ae6a4c16;
}
#stage-workbench .stage-nav-more {
  position: relative;
  z-index: 210;
  flex: 0 0 auto;
  pointer-events: auto;
}
#stage-workbench .stage-nav-more > summary {
  display: flex;
  min-width: 57px;
  min-height: 55px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 4px 8px;
  border: 1px solid #ffffffde;
  border-radius: 15px;
  background: #fffdf0e8;
  box-shadow: 0 5px 19px #534c3b18, inset 0 1px #fff;
  color: #887768;
  cursor: pointer;
  list-style: none;
  backdrop-filter: blur(12px) saturate(1.08);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
}
#stage-workbench .stage-nav-more > summary::-webkit-details-marker { display: none; }
#stage-workbench .stage-nav-more > summary > span { font-size: 1.125rem; line-height: 1.1; }
#stage-workbench .stage-nav-more > summary > small { font-size: 0.5rem; font-weight: 850; }
#stage-workbench .stage-nav-more[open] > summary,
#stage-workbench .stage-nav-more > summary.is-active {
  border-color: #edc2ad;
  background: #fff1e8;
  color: #8c5f50;
}
#stage-workbench .stage-nav-more-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  width: min(245px, calc(100vw - 24px));
  max-height: min(60svh, 430px);
  padding: 12px;
  overflow: auto;
  border: 1px solid #ffffffeb;
  border-radius: 17px;
  background: #fffdf7f5;
  box-shadow: 0 13px 38px #5145362b, inset 0 1px #fff;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
#stage-workbench .stage-nav-more-group { display: grid; gap: 4px; }
#stage-workbench .stage-nav-more-group > span {
  padding: 2px 5px 3px;
  color: #ac9884;
  font-size: 0.5rem;
  font-weight: 950;
  letter-spacing: .13em;
}
#stage-workbench .stage-nav-subitem {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 37px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #796858;
  font-size: 0.625rem;
  font-weight: 800;
  text-align: left;
}
#stage-workbench .stage-nav-subitem:hover,
#stage-workbench .stage-nav-subitem.is-active,
#stage-workbench .stage-nav-subitem[aria-selected="true"] {
  border-color: #efddd0;
  background: #fff2e9;
  color: #855d4d;
}
#stage-workbench .stage-nav-subitem > span { flex: 1 1 auto; }

/* Keepsakes and Park filters live with the upper room tools, separate from navigation. */
#stage-workbench .stage-feature-controls > .stage-feature-control {
  position: relative;
  inset: auto;
  display: block;
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  margin: 0;
  transform: none;
  pointer-events: auto;
}
#stage-workbench .stage-feature-controls > .stage-feature-control[hidden] { display: none !important; }
#stage-workbench .stage-feature-controls .stage-keepsakes-popover {
  position: fixed;
  z-index: 240;
  top: calc(145px + env(safe-area-inset-top, 0px));
  right: auto;
  bottom: auto;
  left: max(12px, env(safe-area-inset-left, 0px));
  width: min(420px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: min(54svh, 440px);
  margin: 0;
  transform: none;
}
#stage-workbench .stage-feature-controls .stage-keepsakes-popover[hidden] { display: none !important; }
#stage-workbench .stage-feature-controls .stage-feature-toggle {
  min-height: 32px;
  padding: 5px 9px;
  border-radius: 11px;
  font-size: 0.5625rem;
}
#stage-workbench .stage-bottom-forehead { display: none !important; }

/* Master notification switches pause a whole group but retain all category-level choices. */
.notification-groups { display: grid; gap: 12px; }
.notification-group {
  min-width: 0;
  padding: 12px;
  border: 1px solid #ece3d8;
  border-radius: 14px;
  background: #fffefa;
  transition: opacity .15s ease, background .15s ease;
}
.notification-group.is-paused { background: #faf7f1; }
.notification-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.notification-group-heading h3 { margin: 0; color: #6e5949; font-size: 0.75rem; font-weight: 900; }
.notification-group-heading p { margin: 2px 0 0; color: #9a8b7c; font-size: 0.5625rem; line-height: 1.4; }
.notification-group-master {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid #e8dfd4;
  border-radius: 999px;
  background: #fff;
  color: #806f60;
  font-size: 0.5625rem;
  font-weight: 850;
  cursor: pointer;
}
.notification-group-master input { width: 15px; height: 15px; margin: 0; accent-color: #8ba77b; }
.notification-group .notification-preference-grid { margin-top: 0; }
.notification-group.is-paused .notification-group-master { border-color: #e8d8ca; background: #f5eee5; color: #987f6b; }

@media (max-width: 760px) {
  #stage-workbench .stage-bottom-dock {
    left: max(7px, env(safe-area-inset-left, 0px));
    right: max(7px, env(safe-area-inset-right, 0px));
    bottom: max(7px, env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: none;
    justify-content: stretch;
    gap: 5px;
    transform: none;
  }
  #stage-workbench #pet-tabs.pet-tabs {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    justify-content: space-around;
    gap: 2px;
    padding: 4px;
    border-radius: 15px;
  }
  #stage-workbench #pet-tabs .pet-tab {
    flex: 1 1 0;
    min-width: 0;
    min-height: 43px;
    padding: 3px 2px;
    font-size: 0.5rem;
  }
  #stage-workbench #pet-tabs .pet-tab-icon { font-size: 0.9375rem; }
  #stage-workbench .stage-nav-more > summary {
    min-width: 49px;
    min-height: 51px;
    padding: 3px 5px;
    border-radius: 13px;
  }
  #stage-workbench .stage-nav-more-menu { right: 0; width: min(245px, calc(100vw - 18px)); }
  #stage-workbench .stage-feature-controls > .stage-feature-control { max-width: none; }
  #stage-workbench .stage-feature-controls .stage-keepsakes-popover {
    top: calc(142px + env(safe-area-inset-top, 0px));
    left: max(8px, env(safe-area-inset-left, 0px));
  }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls {
    position: relative;
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 4px;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls .stage-feature-toggle {
    min-width: 0;
    min-height: 31px;
    padding: 4px 7px;
    font-size: 0.5rem;
  }
  #persistent-pet-stage .stage-care-action-row .stage-room-functions {
    overflow: visible;
  }
}
@media (max-width: 390px) {
  #stage-workbench #pet-tabs .pet-tab { min-width: 0; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls { gap: 2px; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls .stage-feature-toggle { padding-inline: 4px; font-size: 0.4375rem; }
  .notification-group { padding: 9px; }
  .notification-group-heading { align-items: flex-start; }
  .notification-group-master { padding: 5px 7px; }
}

/* v0.13.29 build 198: contextual navigation is hidden by state, not CSS-only selectors. */
#app > .topbar #add-pal-top:not([hidden]) {
  display: inline-flex !important;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 11px;
  font-size: 0.625rem;
  white-space: nowrap;
}

/* Four destinations stay visible; related destinations appear as a small context rail. */
#stage-workbench .stage-bottom-dock {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: max-content;
  max-width: calc(100vw - 24px);
}
#stage-workbench .stage-context-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
#stage-workbench .stage-context-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  margin-left: 2px;
  padding-left: 8px;
  border-left: 1px solid #e7ddd0;
}
#stage-workbench .stage-context-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 4px 9px;
  border: 1px solid #eee4d9;
  border-radius: 10px;
  background: #fffdf7e8;
  box-shadow: inset 0 1px #fff;
  color: #8b7968;
  font-size: 0.5625rem;
  font-weight: 850;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
#stage-workbench .stage-context-button:hover,
#stage-workbench .stage-context-button.is-active {
  border-color: #efddd0;
  background: #fff2e9;
  color: #855d4d;
}
#stage-workbench .stage-context-button:focus-visible {
  outline: 2px solid #d77e6e;
  outline-offset: 2px;
}

/* The stage HUD is a compact toolbar, not a sheet laid over the room. */
#persistent-pet-stage .stage-top-bar {
  top: var(--stage-top-offset, 12px);
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  width: auto;
  max-width: none;
  transform: none;
  pointer-events: none;
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock {
  display: flex !important;
  flex: 0 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: max-content;
  max-width: min(100%, 1240px);
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}
#persistent-pet-stage .stage-care-dock > .stage-care-action-row {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: max-content;
  max-width: min(100%, 1240px);
  min-width: 0;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #ffffffdf;
  border-radius: 15px;
  background: #fffdf2ed;
  box-shadow: 0 5px 18px #53694b17, inset 0 1px #ffffff;
  backdrop-filter: blur(12px) saturate(1.08);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
  pointer-events: auto;
}
#persistent-pet-stage .stage-care-action-row > .stage-household-picker {
  flex: 0 1 205px;
  min-width: 150px;
  max-width: 240px;
}
#persistent-pet-stage .stage-care-action-row .stage-room-functions {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}
#persistent-pet-stage .stage-care-action-row .home-map-tools {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  max-width: none;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#persistent-pet-stage .stage-care-action-row .home-map-tools button {
  min-width: 29px;
  min-height: 31px;
  padding: 4px 7px;
  border-radius: 9px;
  font-size: 0.5625rem;
}
#persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button {
  min-width: 0;
  padding-inline: 8px;
}
#persistent-pet-stage .stage-care-action-row .home-map-tools .stage-center-button span { display: inline; }
#persistent-pet-stage .stage-care-action-row .stage-feature-controls {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
}
#persistent-pet-stage .stage-care-action-row .stage-feature-controls .stage-feature-toggle {
  min-height: 31px;
  padding: 4px 8px;
  border-radius: 9px;
  font-size: 0.5rem;
  white-space: nowrap;
}
#persistent-pet-stage .stage-care-action-row > .stage-care-actions {
  display: flex;
  flex: 1 1 240px;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  width: auto;
  min-width: 180px;
  max-width: min(390px, 34vw);
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 1px 2px;
  scrollbar-width: thin;
}
#persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action {
  flex: 0 0 48px;
  min-height: 39px;
  padding: 3px 3px 2px;
  border-radius: 9px;
}
#persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action-icon { font-size: 0.875rem; }
#persistent-pet-stage .stage-care-action-row > .stage-care-actions .stage-care-action-label { font-size: 0.4375rem; }
#persistent-pet-stage .stage-care-action-row > .stage-household-tidy {
  flex: 0 0 auto;
  min-height: 31px;
  margin-left: auto;
  padding: 4px 9px;
  border-radius: 9px;
  font-size: 0.5rem;
}
#persistent-pet-stage .stage-care-dock > .stage-care-meta {
  display: none !important;
}
#persistent-pet-stage .stage-care-dock > .stage-care-needs:not([hidden]) {
  display: flex !important;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: max-content;
  max-width: min(100%, 780px);
  margin: 0;
  padding: 3px 6px 4px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #ffffffd6;
  border-radius: 0 0 11px 11px;
  background: #fffdf0e6;
  box-shadow: 0 3px 10px #53694b12;
  pointer-events: auto;
  scrollbar-width: thin;
}
#persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip {
  flex: 0 0 72px;
  width: 72px;
  min-width: 72px;
  min-height: 32px;
  padding: 3px 5px;
  border-radius: 8px;
}
#persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-label,
#persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-value { font-size: 0.4375rem; }
#persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-track { height: 3px; margin-top: 2px; }
#persistent-pet-stage .stage-care-dock > .stage-care-egg-body:not([hidden]) {
  display: block !important;
  flex: 0 1 auto;
  width: max-content;
  max-width: min(100%, 650px);
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  pointer-events: auto;
}
#persistent-pet-stage #stage-care-egg-body .egg-care-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  min-height: 30px;
  margin: 0;
  padding: 4px 9px;
  border: 1px solid #ffffffd6;
  border-radius: 10px;
  background: #fffdf0e8;
  box-shadow: 0 3px 10px #53694b12;
}
#persistent-pet-stage #stage-care-egg-body .egg-care-card::before {
  content: "🥚 Egg";
  flex: 0 0 auto;
  color: #8b7968;
  font-size: 0.5rem;
  font-weight: 900;
}
#persistent-pet-stage #stage-care-egg-body .egg-care-card .section-heading,
#persistent-pet-stage #stage-care-egg-body .egg-care-copy { display: none !important; }
#persistent-pet-stage #stage-care-egg-body .egg-stage-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #8b7968;
  font-size: 0.5rem;
  white-space: nowrap;
}
#persistent-pet-stage #stage-care-egg-body .egg-stage-line strong { font-size: 0.5rem; }
#persistent-pet-stage #stage-care-egg-body .hatch-track {
  flex: 0 1 130px;
  width: 130px;
  min-width: 70px;
  height: 4px;
  margin: 0;
  border-radius: 99px;
}

@media (max-width: 900px) {
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions {
    max-width: min(340px, 46vw);
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker {
    flex-basis: 170px;
  }
}
@media (max-width: 760px) {
  #stage-workbench .stage-bottom-dock {
    left: max(7px, env(safe-area-inset-left, 0px));
    right: max(7px, env(safe-area-inset-right, 0px));
    bottom: max(7px, env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: auto;
    max-width: none;
    transform: none;
  }
  #stage-workbench .stage-context-navigation { justify-content: center; max-width: 100%; }
  #stage-workbench .stage-context-nav { padding-left: 0; border-left: 0; }
  #stage-workbench .stage-context-button { min-height: 30px; padding: 4px 10px; font-size: 0.5rem; }
  #persistent-pet-stage .stage-top-bar {
    top: var(--stage-top-offset, 8px);
    left: max(6px, env(safe-area-inset-left, 0px));
    right: max(6px, env(safe-area-inset-right, 0px));
  }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    gap: 3px;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-action-row {
    width: 100%;
    max-width: 100%;
    gap: 4px;
    padding: 5px;
    border-radius: 12px;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker {
    flex: 1 1 130px;
    min-width: 112px;
    max-width: 190px;
  }
  #persistent-pet-stage .stage-care-action-row .stage-room-functions {
    flex: 1 1 100%;
    order: 3;
    flex-wrap: wrap;
    gap: 3px;
  }
  #persistent-pet-stage .stage-care-action-row .home-map-tools { gap: 2px; }
  #persistent-pet-stage .stage-care-action-row .home-map-tools button {
    min-width: 27px;
    min-height: 27px;
    padding: 3px 5px;
    font-size: 0.5rem;
  }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls { gap: 3px; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls .stage-feature-toggle {
    min-height: 27px;
    padding: 3px 6px;
    font-size: 0.4375rem;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions {
    flex: 1 1 100%;
    order: 4;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 3px;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy {
    flex: 0 0 auto;
    margin-left: auto;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs:not([hidden]) {
    max-width: 100%;
    padding-inline: 4px;
  }
  #persistent-pet-stage .stage-care-dock > .stage-care-needs .stage-need-chip {
    flex-basis: 65px;
    width: 65px;
    min-width: 65px;
  }
  #persistent-pet-stage #stage-care-egg-body .egg-care-card { gap: 7px; padding: 3px 7px; }
  #persistent-pet-stage #stage-care-egg-body .hatch-track { width: 80px; }
  #app > .topbar #add-pal-top:not([hidden]) { padding-inline: 8px; font-size: 0.5625rem; }
}
@media (max-width: 420px) {
  #stage-workbench .stage-context-button { padding-inline: 8px; }
  #persistent-pet-stage .stage-care-action-row .stage-feature-controls .stage-feature-toggle { font-size: 0.40625rem; }
}


/* v0.13.30 build 199: prior workbench-relative inspector sizing, superseded by viewport anchoring in build 200. */
#stage-workbench .stage-journal-inspector {
  top: var(--journal-inspector-top, calc(82px + env(safe-area-inset-top, 0px)));
  bottom: var(--journal-inspector-bottom, calc(103px + env(safe-area-inset-bottom, 0px)));
  max-height: none;
}
#stage-workbench .stage-journal-mount {
  flex: 1 1 0;
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
@media (max-width: 760px) {
  #stage-workbench .stage-journal-inspector {
    top: var(--journal-inspector-top, calc(67px + env(safe-area-inset-top, 0px)));
    right: max(7px, env(safe-area-inset-right, 0px));
    bottom: var(--journal-inspector-bottom, calc(88px + env(safe-area-inset-bottom, 0px)));
    left: max(7px, env(safe-area-inset-left, 0px));
    width: auto;
    min-width: 0;
    border-radius: 17px;
  }
}


/* v0.13.31 build 200: Memories is fixed to the viewport edges, not the workbench box. */
#stage-workbench .stage-journal-inspector {
  position: fixed;
  z-index: 105;
  top: var(--journal-inspector-top, calc(82px + env(safe-area-inset-top, 0px)));
  bottom: var(--journal-inspector-bottom, calc(103px + env(safe-area-inset-bottom, 0px)));
  min-height: 0;
  max-height: none;
}
@media (max-width: 760px) {
  #stage-workbench .stage-journal-inspector {
    top: var(--journal-inspector-top, calc(67px + env(safe-area-inset-top, 0px)));
    right: max(7px, env(safe-area-inset-right, 0px));
    bottom: var(--journal-inspector-bottom, calc(88px + env(safe-area-inset-bottom, 0px)));
    left: max(7px, env(safe-area-inset-left, 0px));
    width: auto;
    min-width: 0;
    border-radius: 17px;
  }
}


/* v0.13.32 build 201: calmer toolbar, one joined navigation dock, compact Memories. */
#app > header.topbar .topbar-right > #add-pal-top:not([hidden]) {
  border: 1px solid #d57968 !important;
  background-color: #df806e !important;
  background-image: linear-gradient(135deg, #efa78f 0%, #df806e 100%) !important;
  color: #fffdf8 !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: 0 5px 14px #d77e6e45, inset 0 1px #ffffff66 !important;
  text-shadow: 0 1px 1px #a85f5240;
}
#app > header.topbar .topbar-right > #add-pal-top:not([hidden]):hover {
  background-color: #d97767 !important;
  background-image: linear-gradient(135deg, #f2b29b 0%, #d97767 100%) !important;
  box-shadow: 0 7px 17px #d77e6e55, inset 0 1px #ffffff75 !important;
}
#app > header.topbar .topbar-right > #add-pal-top:not([hidden]):disabled {
  opacity: 1 !important;
  filter: saturate(.82) !important;
}
#app > .topbar #add-pal-top:not([hidden]):focus-visible {
  outline: 3px solid #e99a86 !important;
  outline-offset: 3px;
}

/* Context destinations are tabs inside one shell, not a separate satellite dock. */
#stage-workbench .stage-bottom-dock {
  gap: 0;
  width: max-content;
  max-width: calc(100vw - 20px);
}
#stage-workbench #pet-tabs.pet-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 4px;
  width: max-content;
  max-width: calc(100vw - 20px);
  min-width: 0;
}
#stage-workbench #pet-tabs .pet-tab {
  flex: 0 0 auto;
  min-width: 66px;
}
#stage-workbench #pet-tabs .pet-tab-context {
  min-width: 68px;
  min-height: 38px;
  padding: 4px 10px;
  border: 1px solid #e9dfd4;
  border-radius: 11px;
  background: #fff8ef;
  color: #8c7463;
  font-size: 0.5rem;
  box-shadow: inset 0 1px #fff;
}
#stage-workbench #pet-tabs .pet-tab-context .pet-tab-icon { font-size: 0.875rem; }
#stage-workbench #pet-tabs .pet-tab-context[aria-selected="true"],
#stage-workbench #pet-tabs .pet-tab-context.is-active {
  border-color: #e8bba8;
  background: #fff0e6;
  color: #865a4b;
}
#stage-workbench #pet-tabs .pet-tab-context:hover { background: #fff0e6; }

/* Put eight care actions behind one contextual control to free the room toolbar. */
#persistent-pet-stage .stage-care-action-row > .stage-care-actions-menu {
  position: relative;
  z-index: 185;
  flex: 0 0 auto;
  min-width: 0;
  pointer-events: auto;
}
#persistent-pet-stage .stage-care-actions-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid #ead8ce;
  border-radius: 9px;
  background: linear-gradient(145deg, #fff7ef, #fffdf7);
  color: #8c6657;
  font-size: 0.5625rem;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 1px #fff;
}
#persistent-pet-stage .stage-care-actions-menu > summary::-webkit-details-marker { display: none; }
#persistent-pet-stage .stage-care-actions-menu > summary > span:first-child { color: #d98574; font-size: 0.875rem; }
#persistent-pet-stage .stage-care-actions-menu > summary .stage-care-actions-chevron { color: #b18e7d; transition: transform .16s ease; }
#persistent-pet-stage .stage-care-actions-menu[open] > summary {
  border-color: #e4af9b;
  background: #fff0e7;
  color: #80564a;
}
#persistent-pet-stage .stage-care-actions-menu[open] > summary .stage-care-actions-chevron { transform: rotate(180deg); }
#persistent-pet-stage .stage-care-action-row .stage-care-actions-menu > #stage-care-actions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 210;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
  width: min(280px, calc(100vw - 24px));
  min-width: min(248px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: min(360px, 58vh);
  min-height: 0;
  padding: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #eadfd3;
  border-radius: 15px;
  background: #fffdf7f7;
  box-shadow: 0 12px 30px #4d3d2f26, inset 0 1px #fff;
  backdrop-filter: blur(15px) saturate(1.08);
  -webkit-backdrop-filter: blur(15px) saturate(1.08);
  scrollbar-width: thin;
}
#persistent-pet-stage .stage-care-action-row .stage-care-actions-menu > #stage-care-actions[hidden] { display: none !important; }
#persistent-pet-stage .stage-care-action-row .stage-care-actions-menu > #stage-care-actions .stage-care-action {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 6px 4px;
  border-radius: 10px;
}
#persistent-pet-stage .stage-care-action-row .stage-care-actions-menu > #stage-care-actions .stage-care-action-icon { font-size: 1.125rem; }
#persistent-pet-stage .stage-care-action-row .stage-care-actions-menu > #stage-care-actions .stage-care-action-label { font-size: 0.5rem; }
#persistent-pet-stage .stage-care-action-row .stage-care-actions-menu > #stage-care-actions.is-submenu {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(330px, calc(100vw - 24px));
}
#persistent-pet-stage .stage-care-action-row .stage-care-actions-menu > #stage-care-actions.is-submenu .stage-care-action { min-height: 58px; }
#persistent-pet-stage .stage-care-action-row .stage-care-actions-menu > #stage-care-actions .stage-care-menu-empty { grid-column: 1 / -1; }

/* Memories remains a scrollable inspector, but never expands to the whole free stage. */
#stage-workbench .stage-journal-inspector {
  position: fixed;
  z-index: 165;
  top: var(--journal-inspector-top, calc(82px + env(safe-area-inset-top, 0px)));
  bottom: var(--journal-inspector-bottom, 120px);
  height: auto;
  max-height: var(--journal-inspector-max-height, 360px);
  min-height: 0;
}
#stage-workbench .stage-journal-mount {
  flex: 1 1 0;
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
@media (max-width: 760px) {
  #stage-workbench #pet-tabs.pet-tabs { justify-content: space-between; width: 100%; max-width: 100%; gap: 2px; }
  #stage-workbench #pet-tabs .pet-tab { flex: 1 1 0; min-width: 0; padding-inline: 3px; }
  #stage-workbench #pet-tabs .pet-tab-context { flex: 0 0 auto; min-width: 54px; padding-inline: 7px; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions-menu { order: 4; }
  #persistent-pet-stage .stage-care-actions-menu > summary { min-height: 29px; padding-inline: 8px; font-size: 0.5rem; }
  #persistent-pet-stage .stage-care-action-row .stage-care-actions-menu > #stage-care-actions { right: 0; width: min(272px, calc(100vw - 20px)); min-width: min(236px, calc(100vw - 20px)); }
  #stage-workbench .stage-journal-inspector {
    top: var(--journal-inspector-top, calc(67px + env(safe-area-inset-top, 0px)));
    right: max(7px, env(safe-area-inset-right, 0px));
    bottom: var(--journal-inspector-bottom, calc(88px + env(safe-area-inset-bottom, 0px)));
    left: max(7px, env(safe-area-inset-left, 0px));
    width: auto;
    min-width: 0;
    max-height: var(--journal-inspector-max-height, 360px);
    border-radius: 17px;
  }
}
@media (max-width: 420px) {
  #stage-workbench #pet-tabs .pet-tab-context { min-width: 49px; font-size: 0.4375rem; }
  #persistent-pet-stage .stage-care-action-row .stage-care-actions-menu > #stage-care-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


/* v0.13.34 build 203: room controls live in a compact menu; anchored panels
   clear the complete HUD; the navigation dock eases between contextual widths. */
#persistent-pet-stage .stage-care-action-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: min(1240px, calc(100vw - 28px));
  padding: 7px 9px;
}
#persistent-pet-stage .stage-care-action-row > .stage-household-picker {
  flex: 0 1 250px;
  min-width: 165px;
  max-width: 260px;
}
#persistent-pet-stage .stage-care-action-row .stage-room-functions {
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
  overflow: visible;
}
#persistent-pet-stage .stage-room-tools-menu {
  position: relative;
  z-index: 290;
  flex: 0 0 auto;
}
#persistent-pet-stage .stage-room-tools-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid #e8d9ca;
  border-radius: 11px;
  background: linear-gradient(145deg, #fffaf1, #fffdf7);
  color: #806b58;
  font-size: 0.625rem;
  font-weight: 900;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px #fff;
}
#persistent-pet-stage .stage-room-tools-menu > summary::-webkit-details-marker { display: none; }
#persistent-pet-stage .stage-room-tools-menu > summary > span:first-child { font-size: 0.875rem; }
#persistent-pet-stage .stage-room-tools-chevron { color: #a78b75; transition: transform .18s ease; }
#persistent-pet-stage .stage-room-tools-menu[open] > summary { border-color: #e6b39e; background: #fff0e7; color: #80594c; }
#persistent-pet-stage .stage-room-tools-menu[open] .stage-room-tools-chevron { transform: rotate(180deg); }
#persistent-pet-stage .stage-room-tools-popover {
  position: fixed;
  z-index: 520;
  top: var(--stage-popover-top, 220px);
  left: var(--stage-popover-left, 12px);
  right: auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
  width: var(--stage-popover-width, min(460px, calc(100vw - 24px)));
  max-width: calc(100vw - 24px);
  max-height: var(--stage-popover-max-height, 380px);
  padding: 13px;
  overflow: auto;
  border: 1px solid #e8ded2;
  border-radius: 16px;
  background: #fffdf7f7;
  box-shadow: 0 14px 34px #4b403026, inset 0 1px #fff;
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  scrollbar-width: thin;
}
#persistent-pet-stage .stage-room-tools-menu:not([open]) > .stage-room-tools-popover { display: none; }
#persistent-pet-stage .stage-room-tools-group { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
#persistent-pet-stage .stage-room-tools-label { color: #ad9887; font-size: 0.5rem; font-weight: 950; letter-spacing: .13em; }
#persistent-pet-stage .stage-room-tools-popover .home-map-tools {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 7px;
  max-width: 100%; padding: 0; border: 0; background: transparent; box-shadow: none;
}
#persistent-pet-stage .stage-room-tools-popover .home-map-tools button { min-height: 34px; min-width: 36px; border-radius: 10px; font-size: 0.625rem; }
#persistent-pet-stage .stage-room-tools-popover .stage-feature-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0; padding: 0;
}
#persistent-pet-stage .stage-room-tools-popover .stage-feature-toggle { min-height: 34px; padding: 6px 10px; border-radius: 10px; font-size: 0.5625rem; }
#persistent-pet-stage .stage-room-tools-popover .stage-feature-control { position: relative; }
#persistent-pet-stage .stage-care-actions-menu { z-index: 300; }
#persistent-pet-stage .stage-care-actions-menu > summary { min-height: 36px; padding: 5px 12px; font-size: 0.625rem; }
#persistent-pet-stage .stage-care-actions-menu > #stage-care-actions {
  position: fixed !important;
  z-index: 540 !important;
  top: var(--stage-popover-top, 220px) !important;
  left: var(--stage-popover-left, 12px) !important;
  right: auto !important;
  width: var(--stage-popover-width, min(340px, calc(100vw - 24px))) !important;
  min-width: 0 !important;
  max-width: calc(100vw - 24px) !important;
  max-height: var(--stage-popover-max-height, 360px) !important;
  overflow-y: auto !important;
  background: #fffdf8fc !important;
  box-shadow: 0 14px 34px #4b403026, inset 0 1px #fff !important;
}
#persistent-pet-stage .stage-care-dock > .stage-care-needs:not([hidden]) {
  position: relative;
  z-index: 180;
}
#stage-workbench .stage-bottom-dock {
  transition: width .34s cubic-bezier(.22,.72,.25,1), max-width .24s ease;
}
#stage-workbench #pet-tabs.pet-tabs.is-width-animating { overflow: hidden !important; will-change: width; }
#stage-workbench #pet-tabs .pet-tab { transition: background .18s ease, border-color .18s ease, color .18s ease; }
#stage-workbench .stage-journal-inspector {
  position: fixed;
  z-index: 165;
  top: var(--journal-inspector-top, 220px);
  right: var(--journal-inspector-right, 12px);
  bottom: auto;
  left: auto;
  width: min(430px, 42vw);
  min-width: 280px;
  height: var(--journal-inspector-height, 300px);
  max-height: var(--journal-inspector-height, 300px);
  min-height: 0;
}
#stage-workbench .stage-journal-mount {
  flex: 1 1 0; min-height: 0; max-height: 100%;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
@media (max-width: 900px) {
  #persistent-pet-stage .stage-care-action-row { gap: 6px; max-width: calc(100vw - 20px); }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker { flex-basis: 190px; min-width: 140px; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy { min-height: 34px; padding-inline: 8px; }
  #persistent-pet-stage .stage-room-tools-menu > summary,
  #persistent-pet-stage .stage-care-actions-menu > summary { min-height: 34px; padding-inline: 9px; }
  #stage-workbench .stage-journal-inspector { width: min(410px, calc(100vw - 24px)); min-width: 0; }
}
@media (max-width: 760px) {
  #persistent-pet-stage .stage-care-action-row { flex-wrap: wrap !important; width: 100%; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker { flex: 1 1 145px; max-width: none; }
  #persistent-pet-stage .stage-care-action-row .stage-room-functions { flex: 0 0 auto; order: 2; }
  #persistent-pet-stage .stage-care-action-row > .stage-care-actions-menu { order: 3; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy { order: 4; margin-left: auto; }
  #persistent-pet-stage .stage-room-tools-popover { width: min(440px, calc(100vw - 20px)); padding: 11px; }
  #persistent-pet-stage .stage-care-actions-menu > #stage-care-actions { width: min(340px, calc(100vw - 20px)) !important; }
  #stage-workbench .stage-journal-inspector {
    top: var(--journal-inspector-top, 190px); right: max(8px, env(safe-area-inset-right, 0px));
    left: max(8px, env(safe-area-inset-left, 0px)); width: auto; min-width: 0;
    height: var(--journal-inspector-height, 280px); max-height: var(--journal-inspector-height, 280px);
    border-radius: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #stage-workbench .stage-bottom-dock, #stage-workbench #pet-tabs .pet-tab { transition: none !important; }
}


/* v0.13.34 build 203: true viewport overlays and reliable dock motion. */
body > #stage-journal-inspector {
  position: fixed !important;
  z-index: 260 !important;
  top: var(--journal-inspector-top, 220px) !important;
  right: var(--journal-inspector-right, 12px) !important;
  bottom: auto !important;
  left: auto !important;
  width: min(var(--journal-inspector-max-width, 420px), calc(100vw - 24px)) !important;
  min-width: 0 !important;
  height: var(--journal-inspector-height, 300px) !important;
  max-height: var(--journal-inspector-height, 300px) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
body > #stage-journal-inspector[hidden] { display: none !important; }
body > #stage-journal-inspector .stage-journal-mount {
  min-height: 0; max-height: 100%; overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-gutter: stable;
}
body > #stage-care-actions {
  position: fixed !important;
  z-index: 560 !important;
  top: var(--stage-popover-top, 300px) !important;
  left: var(--stage-popover-left, 12px) !important;
  right: auto !important;
  width: min(var(--stage-popover-width, 380px), calc(100vw - 24px)) !important;
  min-width: 0 !important;
  max-width: calc(100vw - 24px) !important;
  max-height: var(--stage-popover-max-height, 360px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-content: start !important;
  gap: 9px !important;
  padding: 13px !important;
  border: 1px solid #e8ded2 !important;
  border-radius: 18px !important;
  background: #fffdf8fc !important;
  box-shadow: 0 16px 38px #4b40302e, inset 0 1px #fff !important;
  backdrop-filter: blur(18px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.12) !important;
}
body > #stage-care-actions[hidden], body > #stage-room-tools-popover[hidden] { display: none !important; }
body > #stage-room-tools-popover .stage-room-tools-group { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
body > #stage-room-tools-popover .stage-room-tools-label { color: #ad9887; font-size: 0.5rem; font-weight: 950; letter-spacing: .13em; }
body > #stage-room-tools-popover .home-map-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 7px; max-width: 100%; padding: 0; border: 0; background: transparent; box-shadow: none; }
body > #stage-room-tools-popover .home-map-tools button { min-height: 34px; min-width: 36px; border-radius: 10px; font-size: 0.625rem; }
body > #stage-room-tools-popover .stage-feature-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0; padding: 0; }
body > #stage-room-tools-popover .stage-feature-toggle { min-height: 34px; padding: 6px 10px; border-radius: 10px; font-size: 0.5625rem; }
body > #stage-room-tools-popover .stage-feature-control { position: relative; }
body > #stage-care-actions .stage-care-action { min-width: 0; width: 100%; min-height: 62px; border-radius: 13px; }
body > #stage-care-actions .stage-care-action-icon { font-size: 1.25rem; }
body > #stage-care-actions .stage-care-action-label { font-size: 0.5625rem; }
body > #stage-room-tools-popover {
  position: fixed !important;
  z-index: 550 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 11px !important;
  top: var(--stage-popover-top, 300px) !important;
  left: var(--stage-popover-left, 12px) !important;
  right: auto !important;
  width: min(var(--stage-popover-width, 460px), calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  max-height: var(--stage-popover-max-height, 380px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 14px !important;
  border: 1px solid #e8ded2 !important;
  border-radius: 18px !important;
  background: #fffdf8fc !important;
  box-shadow: 0 16px 38px #4b40302e, inset 0 1px #fff !important;
  backdrop-filter: blur(18px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.12) !important;
}
#stage-workbench .stage-bottom-dock { transition: none !important; }
#stage-workbench #pet-tabs.pet-tabs.is-width-animating { overflow: hidden !important; will-change: width; }
@media (max-width: 760px) {
  body > #stage-journal-inspector {
    top: var(--journal-inspector-top, 220px) !important;
    right: max(8px, env(safe-area-inset-right, 0px)) !important;
    left: max(8px, env(safe-area-inset-left, 0px)) !important;
    width: auto !important;
    border-radius: 17px !important;
  }
  body > #stage-care-actions { width: min(380px, calc(100vw - 20px)) !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 7px !important; padding: 10px !important; }
  body > #stage-care-actions .stage-care-action { min-height: 58px; }
  body > #stage-room-tools-popover { width: min(440px, calc(100vw - 20px)) !important; }
}


/* v0.13.35 build 204: intentional layouts for the portaled Room and Care menus. */
body > #stage-room-tools-popover,
body > #stage-care-actions {
  position: fixed !important;
  top: var(--stage-popover-top, 220px) !important;
  left: var(--stage-popover-left, 12px) !important;
  right: auto !important;
  bottom: auto !important;
  width: min(var(--stage-popover-width, 380px), calc(100vw - 24px)) !important;
  height: auto !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  min-width: 0 !important;
  max-width: calc(100vw - 24px) !important;
  max-height: var(--stage-popover-max-height, 360px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  transform: none !important;
  isolation: isolate;
}
body > #stage-room-tools-popover {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px !important;
  padding: 13px !important;
  border: 1px solid #e8ded2 !important;
  border-radius: 19px !important;
  background: rgba(255,253,248,.985) !important;
  box-shadow: 0 18px 42px rgba(75,64,48,.18), inset 0 1px #fff !important;
  backdrop-filter: blur(18px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.12) !important;
}
body > #stage-room-tools-popover[hidden] { display: none !important; }
body > #stage-room-tools-popover .stage-overlay-popover-heading {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 1px 1px 10px;
  border-bottom: 1px solid #eee4d8;
}
body > #stage-room-tools-popover .stage-overlay-popover-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
body > #stage-room-tools-popover .stage-overlay-popover-heading > div > span {
  color: #ad9a89;
  font-size: 0.5rem;
  font-weight: 950;
  letter-spacing: .16em;
}
body > #stage-room-tools-popover .stage-overlay-popover-heading strong {
  color: #66594d;
  font-size: 1rem;
  line-height: 1.15;
}
body > #stage-room-tools-popover .stage-overlay-popover-close {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #eadfd3;
  border-radius: 11px;
  background: #fffaf2;
  color: #8b7664;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
}
body > #stage-room-tools-popover .stage-room-tools-group {
  display: flex !important;
  flex: 0 0 auto;
  flex-direction: column !important;
  align-items: stretch;
  gap: 9px !important;
  min-width: 0;
  margin: 0;
  padding: 11px;
  border: 1px solid #eee5d9;
  border-radius: 14px;
  background: #fffefa;
}
body > #stage-room-tools-popover .stage-room-tools-label {
  display: block;
  margin: 0;
  color: #a18e7c;
  font-size: 0.5rem;
  font-weight: 950;
  letter-spacing: .14em;
}
body > #stage-room-tools-popover .home-map-tools {
  position: static !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  gap: 7px !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body > #stage-room-tools-popover .home-map-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0 !important;
  min-height: 40px !important;
  padding: 7px 6px !important;
  border: 1px solid #dfe7d7 !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: #637d59 !important;
  font-size: 0.6875rem !important;
  font-weight: 850 !important;
  white-space: nowrap;
  box-shadow: none !important;
}
body > #stage-room-tools-popover .home-map-tools .park-map-zoom-readout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0 !important;
  padding: 0 4px;
  color: #718464;
  font-size: 0.6875rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}
body > #stage-room-tools-popover .home-map-tools .stage-center-button {
  grid-column: span 1;
  width: 100%;
  white-space: normal;
}
body > #stage-room-tools-popover .stage-feature-controls {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch;
  gap: 7px !important;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
}
body > #stage-room-tools-popover .stage-feature-control {
  position: relative !important;
  min-width: 0;
  width: 100%;
}
body > #stage-room-tools-popover .stage-feature-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 40px !important;
  padding: 7px 8px !important;
  border: 1px solid #e7dfd3 !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: #806a58 !important;
  font-size: 0.625rem !important;
  font-weight: 850 !important;
  line-height: 1.2;
  white-space: normal;
  box-shadow: none !important;
}
body > #stage-room-tools-popover .stage-feature-toggle[aria-expanded="true"] {
  border-color: #e5b49f !important;
  background: #fff1e9 !important;
  color: #855b4d !important;
}
body > #stage-room-tools-popover .stage-keepsakes-popover,
body > #stage-room-tools-popover .stage-park-map-popover {
  position: static !important;
  display: block;
  width: 100% !important;
  max-width: none !important;
  max-height: min(32vh, 220px) !important;
  margin: 7px 0 0 !important;
  padding: 9px !important;
  overflow: auto !important;
  transform: none !important;
  border: 1px solid #eee3d6 !important;
  border-radius: 12px !important;
  background: #fffdf8 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body > #stage-room-tools-popover .stage-keepsakes-popover[hidden],
body > #stage-room-tools-popover .stage-park-map-popover[hidden] { display: none !important; }
body > #stage-room-tools-popover .stage-popover-heading {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 7px;
}

body > #stage-care-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-content: start !important;
  align-items: stretch !important;
  gap: 8px !important;
  padding: 12px !important;
  border: 1px solid #e8ded2 !important;
  border-radius: 18px !important;
  background: rgba(255,253,248,.985) !important;
  box-shadow: 0 18px 42px rgba(75,64,48,.18), inset 0 1px #fff !important;
  backdrop-filter: blur(18px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.12) !important;
}
body > #stage-care-actions[hidden] { display: none !important; }
body > #stage-care-actions::before {
  content: "QUICK CARE";
  display: block;
  grid-column: 1 / -1;
  padding: 1px 2px 5px;
  border-bottom: 1px solid #eee5d9;
  color: #a18e7c;
  font-size: 0.5rem;
  font-weight: 950;
  letter-spacing: .15em;
}
body > #stage-care-actions.is-submenu::before { content: "CHOOSE AN ITEM"; }
body > #stage-care-actions .stage-care-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  min-height: 68px;
  padding: 8px 5px;
  border: 1px solid #e9e2d8;
  border-radius: 13px;
  background: #fffefa;
  color: #766453;
  box-shadow: none;
}
body > #stage-care-actions .stage-care-action:hover:not(:disabled) {
  border-color: #e5c1ad;
  background: #fff4ec;
}
body > #stage-care-actions .stage-care-action-icon { font-size: 1.4375rem; line-height: 1; }
body > #stage-care-actions .stage-care-action-label { font-size: 0.5625rem; font-weight: 900; }
body > #stage-care-actions .stage-care-action-detail { max-width: 100%; font-size: 0.4375rem; }
body > #stage-care-actions.is-submenu {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
body > #stage-care-actions.is-submenu .stage-care-action { min-height: 66px; }
body > #stage-care-actions .stage-care-menu-empty { grid-column: 1 / -1; }
@media (max-width: 520px) {
  body > #stage-room-tools-popover { gap: 9px !important; padding: 10px !important; }
  body > #stage-room-tools-popover .stage-room-tools-group { padding: 9px; }
  body > #stage-room-tools-popover .stage-feature-controls { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body > #stage-care-actions { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 7px !important; padding: 10px !important; }
  body > #stage-care-actions.is-submenu { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body > #stage-care-actions .stage-care-action { min-height: 62px; }
}
@media (max-width: 360px) {
  body > #stage-room-tools-popover .home-map-tools { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body > #stage-room-tools-popover .home-map-tools .stage-center-button { grid-column: 1 / -1; }
}


/* v0.13.37 build 206 · Stage-native section popovers and explicit room-tool layout. */
body > #stage-fullscreen-view {
  position: fixed !important;
  z-index: 420 !important;
  top: var(--stage-section-top, 140px) !important;
  left: var(--stage-section-left, 12px) !important;
  right: auto !important;
  bottom: auto !important;
  width: var(--stage-section-width, calc(100vw - 24px)) !important;
  height: var(--stage-section-height, 60vh) !important;
  max-height: var(--stage-section-height, 60vh) !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid #eadfd1 !important;
  border-radius: 24px !important;
  background: rgba(255,253,247,.975) !important;
  box-shadow: 0 22px 64px rgba(70,61,48,.23), inset 0 1px rgba(255,255,255,.96) !important;
  backdrop-filter: blur(20px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.08) !important;
}
body > #stage-fullscreen-view[hidden] { display: none !important; }
body > #stage-fullscreen-view .stage-fullscreen-head {
  flex: 0 0 auto !important;
  min-height: 68px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px 18px !important;
  border-bottom: 1px solid #eee4d8 !important;
  background: rgba(255,253,247,.92) !important;
  box-shadow: none !important;
}
body > #stage-fullscreen-view .stage-section-popover-title { display: grid; gap: 3px; min-width: 0; }
body > #stage-fullscreen-view .stage-section-popover-title > span { color: #a69483; font-size: 0.5rem; font-weight: 950; letter-spacing: .16em; }
body > #stage-fullscreen-view .stage-fullscreen-head h2 { margin: 0 !important; font-size: clamp(1.1875rem, 2vw, 1.5625rem) !important; }
body > #stage-fullscreen-view .stage-section-popover-close {
  flex: 0 0 42px !important;
  width: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border: 1px solid #eadfd1 !important;
  border-radius: 13px !important;
  background: #fffaf2 !important;
  color: #826e5b !important;
  font-size: 1.5625rem !important;
  line-height: 1 !important;
}
body > #stage-fullscreen-view .stage-screen-host {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: clamp(10px, 1.6vw, 20px) !important;
  overflow: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable;
}
body > #stage-fullscreen-view .stage-screen-host > .tab-panel {
  width: min(100%, 1060px) !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: visible !important;
}
body > #stage-fullscreen-view .stage-screen-host > .tab-panel[hidden] { display: none !important; }
body > #stage-fullscreen-view .stage-screen-host > #tab-panel-shop > #shop-card,
body > #stage-fullscreen-view .stage-screen-host > #tab-panel-friends > #friends-card,
body > #stage-fullscreen-view .stage-screen-host > #tab-panel-adoption > #adoption-center-panel {
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: clamp(12px, 2vw, 22px) !important;
  border: 1px solid #ece2d7 !important;
  border-radius: 18px !important;
  background: rgba(255,255,251,.88) !important;
  box-shadow: 0 5px 22px rgba(91,79,60,.07) !important;
}
body > #stage-fullscreen-view .stage-screen-host > #tab-panel-help .help-page {
  display: grid !important;
  /* Keep Quick Start and User Manual on separate full-width rows. A two-column
     outer grid squeezes the nested manual tools and causes text/form overlap. */
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
}
body > #stage-fullscreen-view .stage-screen-host > #tab-panel-help .help-intro,
body > #stage-fullscreen-view .stage-screen-host > #tab-panel-help .help-closing { grid-column: 1 / -1; }
body > #stage-room-tools-popover .stage-room-tools-group { position: relative !important; display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 11px !important; align-content: start !important; }
body > #stage-room-tools-popover #home-map-tools {
  display: grid !important;
  grid-template-columns: minmax(44px, .75fr) minmax(52px, .72fr) minmax(44px, .75fr) minmax(118px, 1.45fr) !important;
  align-items: stretch !important;
  gap: 8px !important;
}
body > #stage-room-tools-popover #stage-feature-controls {
  position: relative !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  align-items: stretch !important;
  gap: 9px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}
body > #stage-room-tools-popover #stage-keepsake-control,
body > #stage-room-tools-popover #stage-park-map-control,
body > #stage-room-tools-popover #toggle-decorate-mode,
body > #stage-room-tools-popover #stage-arcade-toggle,
body > #stage-room-tools-popover #stage-adventures-toggle {
  position: static !important;
  inset: auto !important;
  float: none !important;
  transform: none !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  grid-area: auto !important;
}
body > #stage-room-tools-popover #stage-keepsake-control:has(#stage-keepsakes-toggle[aria-expanded="true"]),
body > #stage-room-tools-popover #stage-park-map-control:has(#stage-park-map-toggle[aria-expanded="true"]) { grid-column: 1 / -1 !important; }
body > #stage-room-tools-popover #stage-keepsakes-toggle,
body > #stage-room-tools-popover #stage-park-map-toggle,
body > #stage-room-tools-popover #toggle-decorate-mode,
body > #stage-room-tools-popover #stage-arcade-toggle,
body > #stage-room-tools-popover #stage-adventures-toggle {
  position: static !important;
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
  transform: none !important;
  white-space: normal !important;
}
@media (max-width: 620px) {
  body > #stage-fullscreen-view { border-radius: 18px !important; }
  body > #stage-fullscreen-view .stage-screen-host { padding: 9px !important; }
  body > #stage-fullscreen-view .stage-screen-host > #tab-panel-help .help-page { grid-template-columns: minmax(0, 1fr) !important; gap: 9px !important; }
  body > #stage-fullscreen-view .stage-screen-host > #tab-panel-help .help-intro,
  body > #stage-fullscreen-view .stage-screen-host > #tab-panel-help .help-closing { grid-column: auto; }
  body > #stage-room-tools-popover #home-map-tools { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body > #stage-room-tools-popover #home-map-center-button { grid-column: 1 / -1; }
}


/* v0.13.37 build 206: Room controls have distinct, non-overlapping sections. */
body > #stage-room-tools-popover .stage-room-tools-group {
  display: flex !important;
  flex: 0 0 auto !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 9px !important;
  min-width: 0 !important;
  margin: 0 !important;
}
body > #stage-room-tools-popover #stage-feature-controls {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  gap: 8px !important;
  align-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body > #stage-room-tools-popover #stage-feature-controls > * {
  position: static !important;
  inset: auto !important;
  float: none !important;
  transform: none !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  grid-area: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}
body > #stage-room-tools-popover #stage-keepsakes-group {
  display: flex !important;
}
body > #stage-room-tools-popover #stage-keepsakes-group[hidden] { display: none !important; }
body > #stage-room-tools-popover #stage-keepsake-control {
  position: static !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}
body > #stage-room-tools-popover #stage-keepsakes-toggle {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  min-height: 44px !important;
  padding: 8px 13px !important;
  margin: 0 !important;
  white-space: normal !important;
}
body > #stage-room-tools-popover #stage-keepsakes-popover {
  position: static !important;
  width: 100% !important;
  max-width: none !important;
  max-height: min(30vh, 210px) !important;
  margin: 8px 0 0 !important;
  overflow: auto !important;
  transform: none !important;
}
body > #stage-room-tools-popover #stage-keepsakes-popover[hidden] { display: none !important; }
body > #stage-room-tools-popover #stage-park-map-control,
body > #stage-room-tools-popover #stage-arcade-toggle,
body > #stage-room-tools-popover #stage-adventures-toggle,
body > #stage-room-tools-popover #toggle-decorate-mode {
  display: flex !important;
  justify-content: center !important;
  min-height: 44px !important;
  padding: 8px 10px !important;
  white-space: normal !important;
}
body > #stage-fullscreen-view {
  width: min(var(--stage-section-width, 760px), calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  border-radius: 22px !important;
  transform-origin: center top;
  animation: stage-section-popover-in .18s ease-out both;
}
body > #stage-fullscreen-view .stage-screen-host {
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
body > #stage-fullscreen-view .stage-screen-host > .tab-panel {
  width: 100% !important;
  max-width: none !important;
}
body > #stage-fullscreen-view .stage-screen-host > #tab-panel-help .help-page {
  max-width: 100% !important;
}
@keyframes stage-section-popover-in {
  from { opacity: 0; transform: translateY(7px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 620px) {
  body > #stage-room-tools-popover #stage-feature-controls { grid-template-columns: minmax(0, 1fr) !important; }
  body > #stage-room-tools-popover #home-map-tools { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body > #stage-room-tools-popover #home-map-center-button { grid-column: 1 / -1; }
  body > #stage-fullscreen-view { border-radius: 18px !important; }
  body > #stage-fullscreen-view .stage-screen-host { padding: 10px !important; }
  body > #stage-fullscreen-view .stage-screen-host > #tab-panel-help .help-page { grid-template-columns: minmax(0, 1fr) !important; gap: 9px !important; }
  body > #stage-fullscreen-view .stage-screen-host > #tab-panel-help .help-intro,
  body > #stage-fullscreen-view .stage-screen-host > #tab-panel-help .help-closing { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  body > #stage-fullscreen-view { animation: none !important; }
}


/* v0.13.38 build 207: direct care controls and device accessibility preferences. */
#persistent-pet-stage .stage-care-action-row > #stage-care-actions {
  position: static !important;
  inset: auto !important;
  display: flex !important;
  flex: 1 1 410px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 5px !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: min(560px, 48vw) !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  scrollbar-width: thin;
}
#persistent-pet-stage .stage-care-action-row > #stage-care-actions[hidden] { display: none !important; }
#persistent-pet-stage .stage-care-action-row > #stage-care-actions .stage-care-action {
  flex: 0 0 48px !important;
  width: 48px !important;
  min-width: 48px !important;
  min-height: 43px !important;
  padding: 4px 3px !important;
  gap: 3px !important;
  border-radius: 10px !important;
}
#persistent-pet-stage .stage-care-action-row > #stage-care-actions .stage-care-action-icon { font-size: 1.0625rem !important; }
#persistent-pet-stage .stage-care-action-row > #stage-care-actions .stage-care-action-label { font-size: 0.5rem !important; line-height: 1.1 !important; }
#persistent-pet-stage .stage-care-action-row > #stage-care-actions.is-submenu { max-width: min(560px, 48vw) !important; }
#persistent-pet-stage .stage-care-action-row > #stage-care-actions.is-submenu .stage-care-action { flex-basis: 64px !important; width: 64px !important; min-width: 64px !important; }
@media (max-width: 980px) {
  #persistent-pet-stage .stage-care-action-row { flex-wrap: wrap !important; width: min(100%, calc(100vw - 18px)) !important; }
  #persistent-pet-stage .stage-care-action-row > #stage-care-actions {
    order: 5 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 3px 1px 2px !important;
    border-top: 1px solid #eee5d9 !important;
  }
}
@media (max-width: 520px) {
  #persistent-pet-stage .stage-care-action-row > #stage-care-actions { gap: 4px !important; }
  #persistent-pet-stage .stage-care-action-row > #stage-care-actions .stage-care-action {
    flex-basis: 54px !important; width: 54px !important; min-width: 54px !important; min-height: 48px !important;
  }
  #persistent-pet-stage .stage-care-action-row > #stage-care-actions .stage-care-action-icon { font-size: 1.1875rem !important; }
  #persistent-pet-stage .stage-care-action-row > #stage-care-actions .stage-care-action-label { font-size: 0.5rem !important; }
}

/* Help settings are full-width accordions at the beginning of the guide. */
body > #stage-fullscreen-view .stage-screen-host > #tab-panel-help #notification-settings-card,
body > #stage-fullscreen-view .stage-screen-host > #tab-panel-help #accessibility-settings-card {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
}
.notification-settings-details > summary,
.accessibility-settings-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 52px;
  padding: 13px 16px;
  border-radius: 15px;
  color: #67584b;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}
.notification-settings-details > summary::-webkit-details-marker,
.accessibility-settings-details > summary::-webkit-details-marker { display: none; }
.notification-settings-details > summary::after,
.accessibility-settings-details > summary::after { content: '＋'; margin-left: auto; color: #bd806d; font-size: 1.125rem; }
.notification-settings-details[open] > summary::after,
.accessibility-settings-details[open] > summary::after { content: '−'; }
.notification-settings-details > summary:focus-visible,
.accessibility-settings-details > summary:focus-visible { outline: 3px solid #b55e4e; outline-offset: 3px; }
.accessibility-settings-body { display: grid; gap: 14px; padding: 8px 16px 16px; }
.accessibility-preference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.accessibility-preference {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 64px;
  padding: 11px 13px;
  border: 1px solid #e9dfd5;
  border-radius: 13px;
  background: #fffefa;
  color: #66584e;
  cursor: pointer;
}
.accessibility-preference > span { display: grid; gap: 3px; min-width: 0; }
.accessibility-preference strong { color: #5f5148; font-size: 0.75rem; }
.accessibility-preference small { color: #83756a; font-size: 0.625rem; line-height: 1.4; }
.accessibility-preference input[type="checkbox"] { flex: 0 0 20px; width: 20px; height: 20px; accent-color: #bd806d; }
.accessibility-text-size { justify-content: space-between; flex-wrap: wrap; }
.accessibility-text-size select { flex: 0 1 150px; min-height: 40px; padding: 7px 10px; border: 1px solid #d9c9bb; border-radius: 9px; background: #fff; color: #5d5147; font:inherit; font-size: 0.75rem; }
.accessibility-preference-status { margin: 0; color: #7c7065; font-size: 0.625rem; }
.skip-link {
  position: fixed; z-index: 10000; top: 8px; left: 8px;
  transform: translateY(-160%); padding: 11px 15px; border-radius: 10px;
  background: #2c2723; color: #fff; font-weight: 850; text-decoration: none;
}
.skip-link:focus { transform: translateY(0); outline: 3px solid #e9a18a; outline-offset: 3px; }
html[data-a11y-contrast="high"] body { color: #211a16 !important; }
html[data-a11y-contrast="high"] :is(.panel-card, .stage-care-action-row, .stage-care-actions, .notification-group, .accessibility-preference, .notification-settings-card, .accessibility-settings-card) { border-color: #66584d !important; }
html[data-a11y-contrast="high"] :is(p, small, .eyebrow, .section-subtitle, .economy-hint, .accessibility-preference-status, .notification-preference small) { color: #443a33 !important; }
html[data-a11y-contrast="high"] :is(button, input, select, textarea, summary, a):focus-visible { outline: 3px solid #005fcc !important; outline-offset: 3px !important; }
html[data-a11y-motion="reduced"] *,
html[data-a11y-motion="reduced"] *::before,
html[data-a11y-motion="reduced"] *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
  scroll-behavior: auto !important;
  scroll-snap-type: none !important;
}
html[data-a11y-targets="large"] :is(button, summary, select, input, textarea, a[role="button"], [role="tab"]) { min-height: 44px !important; }
html[data-a11y-targets="large"] :is(button, summary, select, input, textarea, a[role="button"], [role="tab"]) { scroll-margin: 8px; }
html[data-a11y-targets="large"] input[type="checkbox"],
html[data-a11y-targets="large"] input[type="radio"] { width: 24px !important; height: 24px !important; min-width: 24px !important; }
@media (max-width: 620px) {
  .accessibility-preference-grid { grid-template-columns: minmax(0, 1fr); }
  .notification-settings-details > summary,
  .accessibility-settings-details > summary { align-items: flex-start; }
}


/* v0.13.39 build 208: centered intrinsic toolbar, symmetric width motion,
   and a pinned Back slot beside the horizontally scrolling pantry/toy shelf. */
#persistent-pet-stage .stage-top-bar {
  left: 50% !important;
  right: auto !important;
  width: max-content;
  max-width: min(1240px, calc(100% - 24px));
  transform: translateX(-50%);
  transform-origin: center top;
  will-change: width;
}
#persistent-pet-stage .stage-top-bar > .stage-care-dock {
  width: max-content !important;
  max-width: 100% !important;
  align-items: center !important;
}
#persistent-pet-stage .stage-care-action-row {
  display: grid !important;
  grid-template-columns: max-content max-content max-content;
  grid-template-areas: "picker room tidy" "care care care";
  justify-content: center !important;
  align-items: center !important;
  gap: 6px 8px !important;
  width: max-content !important;
  max-width: min(1240px, calc(100vw - 28px)) !important;
  padding: 7px 9px !important;
}
#persistent-pet-stage .stage-care-action-row > .stage-household-picker {
  grid-area: picker;
  flex: 0 1 250px !important;
  min-width: 0 !important;
  max-width: 260px;
}
#persistent-pet-stage .stage-care-action-row .stage-room-functions {
  grid-area: room;
  flex: 0 0 auto !important;
  min-width: 0;
}
#persistent-pet-stage .stage-care-action-row > .stage-household-tidy {
  grid-area: tidy;
  justify-self: end;
  flex: 0 0 auto !important;
  margin-left: 0 !important;
}
#persistent-pet-stage .stage-care-actions-shell {
  grid-area: care;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  justify-self: center;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
#persistent-pet-stage .stage-care-actions-shell[hidden] { display: none !important; }
#persistent-pet-stage .stage-care-actions-shell.is-submenu {
  justify-content: flex-start;
  width: min(760px, calc(100vw - 48px));
  max-width: 100%;
}
#persistent-pet-stage .stage-care-actions-shell > .stage-care-menu-back {
  display: inline-flex;
  flex: 0 0 70px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 70px;
  min-width: 70px;
  min-height: 54px;
  padding: 6px 5px;
  border: 1px dashed #d9cbbb;
  border-radius: 12px;
  background: #f9f6ec;
  color: #755e4d;
  font:inherit;
  font-size: 0.5625rem;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
}
#persistent-pet-stage .stage-care-actions-shell > .stage-care-menu-back > span:first-child { font-size: 1.1875rem; line-height: 1; }
#persistent-pet-stage .stage-care-actions-shell > .stage-care-menu-back:hover { border-color: #c6b39e; background: #f3eee2; }
#persistent-pet-stage .stage-care-actions-shell > .stage-care-menu-back:focus-visible { outline: 3px solid #89a979; outline-offset: 2px; }
#persistent-pet-stage .stage-care-actions-shell > .stage-care-menu-back[hidden] { display: none !important; }
#persistent-pet-stage .stage-care-actions-shell > #stage-care-actions {
  position: static !important;
  inset: auto !important;
  display: flex !important;
  flex: 0 1 auto !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: min(560px, calc(100vw - 48px)) !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}
#persistent-pet-stage .stage-care-actions-shell > #stage-care-actions[hidden] { display: none !important; }
#persistent-pet-stage .stage-care-actions-shell > #stage-care-actions.is-submenu {
  display: flex !important;
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 3px 2px 5px !important;
  grid-template-columns: none !important;
  grid-auto-rows: auto !important;
  align-content: center !important;
}
#persistent-pet-stage .stage-care-actions-shell > #stage-care-actions.is-submenu .stage-care-action {
  flex: 0 0 94px !important;
  width: 94px !important;
  min-width: 94px !important;
  min-height: 62px !important;
  max-width: 94px !important;
  padding: 7px 5px !important;
}
#persistent-pet-stage .stage-care-actions-shell > #stage-care-actions.is-submenu .stage-care-action-detail {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#persistent-pet-stage .stage-care-actions-shell > #stage-care-actions.is-submenu .stage-care-menu-empty {
  flex: 0 0 auto;
  min-width: 180px;
}
#persistent-pet-stage .stage-care-dock > .stage-care-needs:not([hidden]) {
  align-self: center !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 !important;
}
@media (max-width: 760px) {
  #persistent-pet-stage .stage-top-bar {
    left: 50% !important;
    right: auto !important;
    width: max-content;
    max-width: calc(100vw - max(16px, env(safe-area-inset-left, 0px) + env(safe-area-inset-right, 0px)));
    transform: translateX(-50%);
  }
  #persistent-pet-stage .stage-top-bar > .stage-care-dock {
    width: max-content !important;
    max-width: 100% !important;
  }
  #persistent-pet-stage .stage-care-action-row {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas: "picker room" "tidy tidy" "care care";
    width: max-content !important;
    max-width: calc(100vw - 20px) !important;
    gap: 5px 7px !important;
    justify-content: center !important;
    padding: 6px !important;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  #persistent-pet-stage .stage-care-action-row .stage-room-functions { justify-self: end; }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy { justify-self: end; }
  #persistent-pet-stage .stage-care-actions-shell {
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }
  #persistent-pet-stage .stage-care-actions-shell.is-submenu {
    width: min(760px, calc(100vw - 34px));
    justify-content: flex-start;
  }
  #persistent-pet-stage .stage-care-actions-shell > #stage-care-actions {
    max-width: 100% !important;
  }
  #persistent-pet-stage .stage-care-actions-shell > #stage-care-actions.is-submenu {
    max-width: 100% !important;
  }
}
@media (max-width: 420px) {
  #persistent-pet-stage .stage-care-action-row {
    grid-template-columns: minmax(0, 1fr) max-content;
    max-width: calc(100vw - 14px) !important;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker { min-width: 0; }
  #persistent-pet-stage .stage-room-tools-menu > summary { padding-inline: 9px; }
  #persistent-pet-stage .stage-care-actions-shell > .stage-care-menu-back {
    flex-basis: 62px;
    width: 62px;
    min-width: 62px;
  }
  #persistent-pet-stage .stage-care-actions-shell > #stage-care-actions.is-submenu .stage-care-action {
    flex-basis: 86px !important;
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  #persistent-pet-stage .stage-top-bar { will-change: auto; }
}


/* v0.14.0.3 build 212: tiny vertical need meters in the navigation-dock forehead. */
#stage-workbench #stage-bottom-dock {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-end !important;
  gap: 0 !important;
  width: max-content;
  max-width: calc(100vw - 20px);
}
#stage-workbench #stage-bottom-dock > #stage-care-needs.stage-dock-need-bars:not([hidden]) {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  justify-items: center;
  gap: clamp(7px, 1.6vw, 15px);
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 31px;
  margin: 0;
  padding: 4px 18px 3px;
  border: 1px solid #e8dfd3;
  border-bottom: 0;
  border-radius: 15px 15px 0 0;
  background: linear-gradient(180deg, #fffdf7f2, #fbf8eeeF);
  box-shadow: 0 -4px 12px #6b59400b, inset 0 1px #fff;
  pointer-events: auto;
}
#stage-workbench #stage-bottom-dock > #stage-care-needs[hidden] { display: none !important; }
#stage-workbench #stage-bottom-dock > #stage-care-needs .stage-need-chip {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  width: 15px;
  min-width: 0;
  max-width: none;
  min-height: 23px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}
#stage-workbench #stage-bottom-dock > #stage-care-needs .stage-need-top {
  display: flex;
  flex: 0 0 9px;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 9px;
  margin: 0;
  padding: 0;
}
#stage-workbench #stage-bottom-dock > #stage-care-needs .stage-need-icon {
  display: block;
  font-size: 0.5rem;
  line-height: 1;
}
#stage-workbench #stage-bottom-dock > #stage-care-needs .stage-need-label,
#stage-workbench #stage-bottom-dock > #stage-care-needs .stage-need-value {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
#stage-workbench #stage-bottom-dock > #stage-care-needs .stage-need-track {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 5px;
  height: 16px;
  margin: 0;
  overflow: hidden;
  border-radius: 99px;
  background: #e8e4da;
  box-shadow: inset 0 1px 2px #6d604018;
}
#stage-workbench #stage-bottom-dock > #stage-care-needs .stage-need-fill {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 100% !important;
  height: var(--need-fill-level, 0%);
  border-radius: inherit;
  transition: height .28s ease;
}
#stage-workbench #stage-bottom-dock > #stage-care-needs[data-need-count="1"] {
  grid-template-columns: minmax(0, 1fr);
}
#stage-workbench #stage-bottom-dock > #stage-care-needs[data-need-count="1"] .stage-need-chip {
  justify-self: center;
}
#stage-workbench #stage-bottom-dock:has(> #stage-care-needs:not([hidden])) #pet-tabs.pet-tabs {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}
#stage-workbench #stage-bottom-dock:not(:has(> #stage-care-needs:not([hidden]))) #pet-tabs.pet-tabs {
  border-radius: 17px !important;
}
@media (max-width: 760px) {
  #stage-workbench #stage-bottom-dock > #stage-care-needs.stage-dock-need-bars:not([hidden]) {
    min-height: 29px;
    padding: 3px 14px 2px;
    gap: 7px;
  }
  #stage-workbench #stage-bottom-dock > #stage-care-needs .stage-need-track { height: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  #stage-workbench #stage-bottom-dock > #stage-care-needs .stage-need-fill { transition: none !important; }
}

/* User Manual: explanation first, full-width topic chips beneath it at every size. */
#tab-panel-help .help-manual-intro {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0 !important;
  padding: 19px 21px !important;
}
#tab-panel-help .help-manual-intro > .eyebrow,
#tab-panel-help .help-manual-intro h3,
#tab-panel-help .help-manual-intro > p:not(.eyebrow) {
  display: block;
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-inline: 0 !important;
}
#tab-panel-help .help-manual-intro > p:not(.eyebrow) {
  overflow-wrap: break-word;
  text-wrap: pretty;
}
#tab-panel-help .help-manual-index {
  display: flex !important;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start !important;
  align-content: flex-start;
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 9px 0 0 !important;
  padding: 11px 0 0 !important;
  border-top: 1px solid #e9dfd5;
}
#tab-panel-help .help-manual-index a { flex: 0 0 auto; }
@media (max-width: 720px) {
  #tab-panel-help .help-manual-intro { padding: 15px !important; }
  #tab-panel-help .help-manual-index { gap: 6px; }
  #tab-panel-help .help-manual-index a { min-height: 34px; }
}


/* v0.14.1 build 214: integrate the care-meter forehead ABOVE the nav row. */
#stage-workbench #stage-bottom-dock {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-end !important;
  gap: 0 !important;
}
#stage-workbench #stage-bottom-dock > #stage-care-needs.stage-dock-need-bars:not([hidden]) {
  order: 0 !important;
  align-self: stretch !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  border: 1px solid #e8dfd3 !important;
  border-bottom: 0 !important;
  border-radius: 15px 15px 0 0 !important;
}
#stage-workbench #stage-bottom-dock > #pet-tabs.pet-tabs {
  order: 1 !important;
  align-self: stretch !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: -1px 0 0 !important;
  border-top: 0 !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 17px !important;
  border-bottom-right-radius: 17px !important;
}
#stage-workbench #stage-bottom-dock:not(:has(> #stage-care-needs:not([hidden]))) > #pet-tabs.pet-tabs {
  width: max-content !important;
  margin: 0 !important;
  border-top: 1px solid #fff !important;
  border-radius: 17px !important;
}
@media (max-width: 760px) {
  #stage-workbench #stage-bottom-dock > #stage-care-needs.stage-dock-need-bars:not([hidden]) {
    min-height: 27px;
    padding-top: 2px;
    padding-bottom: 2px;
  }
}


/* Park activity magnets */
.park-activity-magnets{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}
.park-activity-magnet{position:absolute;display:flex;flex-direction:column;align-items:center;gap:3px;transform:translate(-50%,-50%);opacity:.92;filter:drop-shadow(0 3px 2px #667c5120);animation:park-magnet-float 4.8s ease-in-out infinite}
.park-activity-magnet:nth-child(2){animation-delay:-1.2s}.park-activity-magnet:nth-child(3){animation-delay:-2.3s}.park-activity-magnet:nth-child(4){animation-delay:-.8s}.park-activity-magnet:nth-child(5){animation-delay:-3s}.park-activity-magnet:nth-child(6){animation-delay:-1.7s}
.park-activity-magnet-icon{display:grid;place-items:center;width:36px;height:32px;border:1px solid #fffdf4;border-radius:13px;background:linear-gradient(145deg,#fffdf6ed,#f7f0d9e8);box-shadow:0 3px 0 #d9c9a8,0 5px 10px #788d6020;font-size:1.25rem;line-height:1}
.park-activity-magnet-label{max-width:112px;padding:3px 7px;border:1px solid #fffdf2;border-radius:999px;background:#fffdf0e8;color:#718366;font-size:0.5625rem;font-weight:800;letter-spacing:.02em;white-space:nowrap;box-shadow:0 2px 5px #61784b14}
.park-activity-magnet[data-zone="playground"] .park-activity-magnet-icon{background:linear-gradient(145deg,#fff6df,#f7e2c0)}.park-activity-magnet[data-zone="garden"] .park-activity-magnet-icon{background:linear-gradient(145deg,#fff2f6,#f6e2ed)}.park-activity-magnet[data-zone="quiet"] .park-activity-magnet-icon{background:linear-gradient(145deg,#f3f8e9,#dcebd0)}
#room-world[data-active-zone="playground"] .park-activity-magnet:not([data-zone="playground"]),#room-world[data-active-zone="field"] .park-activity-magnet:not([data-zone="field"]),#room-world[data-active-zone="garden"] .park-activity-magnet:not([data-zone="garden"]),#room-world[data-active-zone="quiet"] .park-activity-magnet:not([data-zone="quiet"]){opacity:.14}
@keyframes park-magnet-float{0%,100%{margin-top:0}50%{margin-top:-4px}}
@media(prefers-reduced-motion:reduce){.park-activity-magnet{animation:none}}



/* v0.14.1 build 215: redesigned park neighbourhoods and landmark-anchored magnets. */
#world-scene.is-park-view .park-map-landscape { z-index: 1; }
#world-scene.is-park-view .park-isometric-landscape { overflow: visible; }
.park-activity-magnets { position:absolute; inset:0; z-index:4; pointer-events:none; overflow:visible; }
.park-activity-magnet { position:absolute; display:flex; flex-direction:column; align-items:center; gap:3px; transform:translate(-50%,-100%); opacity:1; filter:drop-shadow(0 3px 3px #667c5130); animation:park-magnet-float-215 4.6s ease-in-out infinite; }
.park-activity-magnet::after { content:""; position:absolute; left:50%; bottom:-7px; width:8px; height:8px; background:#fffdf4; border-right:1px solid #e9ddc8; border-bottom:1px solid #e9ddc8; transform:translateX(-50%) rotate(45deg); }
.park-activity-magnet-icon { position:relative; z-index:1; display:grid; place-items:center; width:35px; height:32px; border:1px solid #fffdf4; border-radius:13px; background:linear-gradient(145deg,#fffdf8,#f2ecd9); box-shadow:0 3px 0 #d9c9a8,0 5px 10px #788d6020; font-size:1.25rem; line-height:1; }
.park-activity-magnet-label { position:relative; z-index:1; max-width:122px; padding:3px 8px; border:1px solid #fffdf4; border-radius:999px; background:#fffdf2; color:#687f5e; font-size:0.5625rem; font-weight:850; letter-spacing:.01em; line-height:1.2; white-space:nowrap; box-shadow:0 2px 6px #61784b1f; }
.park-activity-magnet[data-zone="playground"] .park-activity-magnet-icon { background:linear-gradient(145deg,#fff5dd,#f4dfb9); }
.park-activity-magnet[data-zone="field"] .park-activity-magnet-icon { background:linear-gradient(145deg,#f2f8e9,#dcebcf); }
.park-activity-magnet[data-zone="garden"] .park-activity-magnet-icon { background:linear-gradient(145deg,#fff0f5,#f4deeb); }
.park-activity-magnet[data-zone="quiet"] .park-activity-magnet-icon { background:linear-gradient(145deg,#eff7e8,#d9e9cf); }
.park-activity-magnet:nth-child(2){animation-delay:-.8s}.park-activity-magnet:nth-child(3){animation-delay:-1.5s}.park-activity-magnet:nth-child(4){animation-delay:-2.2s}.park-activity-magnet:nth-child(5){animation-delay:-2.9s}.park-activity-magnet:nth-child(6){animation-delay:-3.6s}
#room-world[data-active-zone="playground"] .park-activity-magnet:not([data-zone="playground"]),#room-world[data-active-zone="field"] .park-activity-magnet:not([data-zone="field"]),#room-world[data-active-zone="garden"] .park-activity-magnet:not([data-zone="garden"]),#room-world[data-active-zone="quiet"] .park-activity-magnet:not([data-zone="quiet"]){opacity:.2;filter:saturate(.45);}
@keyframes park-magnet-float-215{0%,100%{margin-top:0}50%{margin-top:-3px}}
@media(prefers-reduced-motion:reduce){.park-activity-magnet{animation:none!important}}

/* v0.14.4 build 218: refined 25-degree bathroom booth skew and 20px upward station adjustment. */
.home-isometric-stage .home-bathroom-station {
  left: calc(24% - 62px);
  top: calc(44.5% - 20px);
  width: 124px;
  transform: none;
  filter: none;
  z-index: auto;
  isolation: auto;
}
.home-isometric-stage .home-bathroom-booth {
  position: relative;
  z-index: 2;
  width: 80px;
  height: 144px;
  margin-top: -144px;
  transform: skewY(-25deg);
  transform-origin: center bottom;
  filter: drop-shadow(0 5px 5px #52664a20);
}
.home-isometric-stage .home-bathroom-door {
  inset: 8px 16px 0;
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
}
.home-isometric-stage .home-bathroom-door::before {
  inset: 10px 6px 0;
  border-radius: 8px 8px 0 0;
}
.home-isometric-stage .home-bathroom-toilet {
  transform: skewY(25deg);
}
.home-isometric-stage .home-bathroom-queue {
  z-index: 1100;
}
@media (max-width: 760px) {
  .home-isometric-stage .home-bathroom-station {
    left: calc(22% - 62px);
    top: calc(46% - 20px);
    width: 124px;
    transform: none;
    filter: none;
  }
  .home-isometric-stage .home-bathroom-booth {
    transform: skewY(-25deg);
  }
}


/* v0.14.6 build 219: wall decorations align to the matching isometric wall plane. */
.home-isometric-stage .placed-room-decor.is-wall-mounted {
  transform: translate(-50%, -50%) skewY(var(--wall-skew, 0deg)) scale(.92);
  transform-origin: center;
}
.park-friend-placed-decor.is-wall-mounted {
  transform: translate(-50%, -50%) skewY(var(--wall-skew, 0deg));
  transform-origin: center;
}


/* v0.14.7 build 221: curated Shop collections. */
.shop-options { display: flex; flex-direction: column; gap: 18px; }
.shop-category-group { min-width: 0; }
.shop-category-title { margin: 0 0 9px; padding: 0 0 7px; border-bottom: 1px solid #eee5d8; color: #887565; font-size: 0.75rem; font-weight: 900; letter-spacing: .045em; }
.shop-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.shop-category-grid .shop-item { min-height: 78px; }
.shop-item.shop-decor { border-color: #e9e2d8; background: linear-gradient(145deg, #fffdfa, #f8faf2); }
.shop-item.shop-toy { border-color: #e6e9dc; background: linear-gradient(145deg, #fffdfa, #f5f9ee); }
@media (max-width: 760px) { .shop-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; } }
@media (max-width: 390px) { .shop-category-grid { grid-template-columns: minmax(0, 1fr); } .shop-category-grid .shop-item { min-height: 70px; } }


/* Community park filters live in the navigation dock, never in the room toolbar. */
#stage-workbench .community-filter-dock {
  position: relative; z-index: 8; display: flex; flex-direction: column; align-items: center;
  width: max-content; max-width: min(92vw, 620px); margin: 0 auto 6px;
}
#stage-workbench .community-filter-dock[hidden] { display:none !important; }
#stage-workbench .community-filter-dock > summary {
  list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:center;
  min-height:30px; padding:5px 18px; border:1px solid #e8ddcf; border-radius:999px;
  background:#fffdf8ed; color:#806d5a; font:800 0.6875rem/1 inherit; box-shadow:0 3px 12px #7e98701c;
}
#stage-workbench .community-filter-dock > summary::-webkit-details-marker { display:none; }
#stage-workbench .community-filter-dock[open] > summary { border-color:#b8cda8; background:#edf6e7; color:#628358; }
#stage-workbench .community-filter-mount {
  width:min(92vw, 620px); max-height:min(34vh, 220px); overflow:auto; margin-top:6px;
  padding:9px; border:1px solid #e8ddcf; border-radius:18px; background:#fffdf8f5;
  box-shadow:0 8px 24px #526b4a22;
}
#stage-workbench .community-filter-mount .park-map-zone-filters { display:flex; flex-wrap:wrap; justify-content:center; gap:7px; margin:0; }
#stage-workbench .community-filter-mount .park-map-zone-chip { min-height:32px; }
@media(max-width:760px) {
  #stage-workbench .community-filter-dock { max-width:96vw; margin-bottom:4px; }
  #stage-workbench .community-filter-mount { width:min(94vw, 520px); max-height:28vh; padding:7px; }
}

#stage-workbench .room-arrange-dock { height:auto; }
#stage-workbench .room-arrange-dock .room-arrange-panel { height:100%; max-height:100%; min-height:0; display:flex; flex-direction:column; }
#stage-workbench .room-arrange-dock .room-arrange-scroll { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; }


/* v0.14.8.1 build 223: Community filters float above the centered dock. */
#stage-workbench #stage-bottom-dock > .community-filter-dock {
  position: absolute !important;
  z-index: 12 !important;
  left: 50% !important;
  right: auto !important;
  bottom: calc(100% + 9px) !important;
  top: auto !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: max-content !important;
  max-width: calc(100vw - 24px) !important;
  margin: 0 !important;
  pointer-events: auto;
}
#stage-workbench #stage-bottom-dock > .community-filter-dock > summary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 32px !important;
  padding: 6px 17px !important;
  white-space: nowrap;
  font-size: 0.75rem !important;
}
#stage-workbench .community-filter-arrow {
  display: inline-block;
  min-width: 1em;
  text-align: center;
  transition: transform .16s ease;
}
#stage-workbench .community-filter-dock[open] .community-filter-arrow { transform: translateY(1px); }
#stage-workbench #stage-bottom-dock > .community-filter-dock > .community-filter-mount {
  width: min(900px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  margin-top: 6px !important;
  padding: 8px 10px !important;
  border-radius: 16px !important;
  scrollbar-width: none;
}
#stage-workbench .community-filter-mount::-webkit-scrollbar { display: none; }
#stage-workbench .community-filter-mount .park-map-zone-filters {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: center;
  justify-content: center !important;
  width: max-content !important;
  min-width: 100%;
  gap: 8px !important;
  margin: 0 !important;
}
#stage-workbench .community-filter-mount .park-map-zone-chip {
  flex: 0 0 auto !important;
  min-height: 38px !important;
  padding: 7px 13px !important;
  gap: 6px !important;
  font-size: 0.75rem !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}
#stage-workbench .community-filter-mount .park-map-zone-chip > span:first-child { font-size: 0.875rem !important; }
@media (max-width: 760px) {
  #stage-workbench #stage-bottom-dock > .community-filter-dock { max-width: calc(100vw - 16px) !important; }
  #stage-workbench #stage-bottom-dock > .community-filter-dock > .community-filter-mount { width: calc(100vw - 20px) !important; max-width: calc(100vw - 20px) !important; }
  #stage-workbench .community-filter-mount .park-map-zone-filters { justify-content: flex-start !important; gap: 6px !important; }
  #stage-workbench .community-filter-mount .park-map-zone-chip { min-height: 34px !important; padding: 6px 10px !important; font-size: 0.6875rem !important; }
}
@media (prefers-reduced-motion: reduce) {
  #stage-workbench .community-filter-arrow { transition: none !important; }
}


/* v0.14.8.2 build 224: the Community Filters pill morphs into its own menu. */
#stage-workbench #stage-bottom-dock > .community-filter-dock {
  position: absolute !important;
  z-index: 24 !important;
  left: 50% !important;
  right: auto !important;
  bottom: calc(100% + 9px) !important;
  top: auto !important;
  transform: translateX(-50%) !important;
  display: block !important;
  box-sizing: border-box !important;
  width: 142px !important;
  max-width: calc(100vw - 28px) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: width 420ms ease, max-width 420ms ease, border-radius 420ms ease,
    border-color 420ms ease, background-color 420ms ease, box-shadow 420ms ease !important;
}
#stage-workbench #stage-bottom-dock > .community-filter-dock[open] {
  width: min(560px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 28px) !important;
  border-color: #e7ddcf !important;
  border-radius: 24px !important;
  background: linear-gradient(145deg, #fffdf9f8, #faf8eff7) !important;
  box-shadow: 0 14px 34px #53634827, inset 0 1px #fff !important;
}
#stage-workbench #stage-bottom-dock > .community-filter-dock > summary {
  display: flex !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 40px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  padding: 7px 17px !important;
  border: 1px solid #dfead7 !important;
  border-radius: 999px !important;
  background: #edf6e7 !important;
  color: #628358 !important;
  font-size: 0.75rem !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
  cursor: pointer;
  transition: min-height 420ms ease, border-radius 420ms ease, background-color 420ms ease,
    color 420ms ease, border-color 420ms ease !important;
}
#stage-workbench #stage-bottom-dock > .community-filter-dock[open] > summary {
  min-height: 43px !important;
  border: 0 !important;
  border-bottom: 1px solid #e9e0d4 !important;
  border-radius: 23px 23px 0 0 !important;
  background: transparent !important;
  color: #66845c !important;
}
#stage-workbench .community-filter-arrow {
  display: inline-block !important;
  min-width: 1em !important;
  text-align: center !important;
  transform: none !important;
  transition: transform 420ms ease !important;
}
#stage-workbench .community-filter-dock[open] .community-filter-arrow { transform: translateY(1px) !important; }
#stage-workbench #stage-bottom-dock > .community-filter-dock > .community-filter-mount {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: 0;
  margin: 0 !important;
  padding: 0 10px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0;
  transform: translateY(-7px);
  transition: max-height 420ms ease, padding 420ms ease, opacity 300ms ease,
    transform 420ms ease !important;
}
#stage-workbench #stage-bottom-dock > .community-filter-dock[open] > .community-filter-mount {
  max-height: 86px;
  padding: 7px 9px 9px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  opacity: 1;
  transform: translateY(0);
  scrollbar-width: none;
}
#stage-workbench .community-filter-mount::-webkit-scrollbar { display: none; }
#stage-workbench .community-filter-mount .park-map-zone-filters {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  min-width: 100% !important;
  gap: 6px !important;
  margin: 0 !important;
}
#stage-workbench .community-filter-mount .park-map-zone-chip {
  flex: 0 0 auto !important;
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 0.625rem !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}
#stage-workbench .community-filter-mount .park-map-zone-chip > span:first-child { font-size: 0.8125rem !important; }
@media (max-width: 760px) {
  #stage-workbench #stage-bottom-dock > .community-filter-dock[open] { width: min(420px, calc(100vw - 32px)) !important; max-width: min(420px, calc(100vw - 32px)) !important; }
  #stage-workbench #stage-bottom-dock > .community-filter-dock > summary { min-height: 37px !important; padding: 6px 14px !important; }
  #stage-workbench #stage-bottom-dock > .community-filter-dock[open] > .community-filter-mount { max-height: 78px !important; padding: 6px 7px 7px !important; }
  #stage-workbench .community-filter-mount .park-map-zone-filters { justify-content: flex-start !important; gap: 6px !important; }
  #stage-workbench .community-filter-mount .park-map-zone-chip { min-height: 30px !important; padding: 5px 8px !important; font-size: 0.5625rem !important; }
}
@media (prefers-reduced-motion: reduce) {
  #stage-workbench #stage-bottom-dock > .community-filter-dock,
  #stage-workbench #stage-bottom-dock > .community-filter-dock > summary,
  #stage-workbench #stage-bottom-dock > .community-filter-dock > .community-filter-mount,
  #stage-workbench .community-filter-arrow { transition: none !important; }
}


/* v0.15.0 build 226: the Community Filters morph is strictly Park-only. */
#stage-workbench #stage-bottom-dock > .community-filter-dock[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


/* v0.15.0 build 228: keep the mobile save state legible and give Add Pal its own full-width row. */
@media (max-width: 760px) {
  #app > header.topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    justify-content: stretch;
    gap: 7px;
    height: auto !important;
    min-height: 0 !important;
    padding: max(7px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 9px max(12px, env(safe-area-inset-left, 0px));
  }
  #app > header.topbar .brand { min-width: 0; }
  #app > header.topbar .topbar-right {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 6px 8px;
    width: 100%;
    min-width: 0;
  }
  #app > header.topbar .connection-pill {
    grid-column: 1;
    grid-row: 1;
    width: max-content;
    max-width: none !important;
    min-width: 0;
    min-height: 32px;
    height: 32px;
    padding-inline: 10px;
    gap: 7px;
    font-size: 0.625rem;
  }
  #app > header.topbar .connection-pill > span { display: inline-block !important; }
  #app > header.topbar .connection-pill i { flex: 0 0 6px; }
  #app > header.topbar .stage-header-tools { grid-column: 2; grid-row: 1; justify-self: end; }
  #app > header.topbar .stage-header-tools > summary { min-height: 32px; }
  #app > header.topbar #add-pal-top:not([hidden]) {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  #stage-workbench .stage-household-roster {
    top: calc(132px + env(safe-area-inset-top, 0px));
  }
  #persistent-pet-stage .stage-top-bar {
    top: calc(214px + env(safe-area-inset-top, 0px));
  }
}

@media (max-width: 390px) {
  #app > header.topbar .brand-copy { display: flex; }
  #app > header.topbar .brand-copy strong { font-size: 1rem; }
  #app > header.topbar .connection-pill { max-width: none !important; font-size: 0.625rem; }
  #app > header.topbar .connection-pill > span { display: inline-block !important; }
}
.park-map-home-moment-badge {
  position: absolute;
  z-index: 4;
  top: 2px;
  left: 3px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 2px solid #fffdf8;
  border-radius: 9px;
  background: #fff2e8;
  box-shadow: 0 2px 7px #8067482a;
  color: #b87969;
  font-size: 0.875rem;
  line-height: 1;
}


/* v0.16.6 build 237: compact mobile header action, centered navigation dock,
   and a single-row household selector with Tidy kept beside Room. */
@media (max-width: 760px) {
  #app > header.topbar #add-pal-top:not([hidden]) {
    grid-column: 1 / -1;
    justify-self: start;
    width: max-content;
    min-width: 0;
    max-width: 100%;
    padding: 8px 18px;
  }

  #stage-workbench .stage-bottom-dock {
    left: 50% !important;
    right: auto !important;
    width: max-content !important;
    max-width: calc(100vw - 20px) !important;
    align-items: center !important;
    transform: translateX(-50%) !important;
  }

  #persistent-pet-stage .stage-care-action-row {
    grid-template-columns: minmax(0, 1fr) max-content max-content !important;
    grid-template-areas: "picker room tidy" "care care care" !important;
    width: max-content !important;
    max-width: calc(100vw - 20px) !important;
    justify-content: center !important;
    gap: 5px 6px !important;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-picker {
    grid-area: picker !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  #persistent-pet-stage .stage-care-action-row .stage-room-functions {
    grid-area: room !important;
    justify-self: end !important;
  }
  #persistent-pet-stage .stage-care-action-row > .stage-household-tidy {
    grid-area: tidy !important;
    justify-self: end !important;
    margin: 0 !important;
  }
}


/* v0.16.7 build 238: keep Add Pal in the compact mobile brand header
   and dock the household toolbar directly beneath it. */
@media (max-width: 760px) {
  #app > header.topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content max-content !important;
    grid-template-rows: auto !important;
    align-items: center !important;
    justify-content: stretch !important;
    column-gap: 8px !important;
    row-gap: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: max(8px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px)) !important;
  }
  #app > header.topbar > .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  #app > header.topbar > .topbar-right {
    display: contents !important;
  }
  #app > header.topbar .connection-pill,
  #app > header.topbar .pal-switcher {
    display: none !important;
  }
  #app > header.topbar #add-pal-top:not([hidden]) {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: center !important;
    display: inline-flex !important;
    width: max-content !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 8px 11px !important;
    font-size: 0.625rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    border-radius: 12px !important;
  }
  #app > header.topbar .stage-header-tools {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: center !important;
  }
  #app > header.topbar .stage-header-tools > summary {
    min-width: 38px;
    min-height: 38px;
    padding: 7px 9px;
  }
  #persistent-pet-stage .stage-top-bar {
    top: calc(56px + env(safe-area-inset-top, 0px)) !important;
  }
}
@media (max-width: 390px) {
  #app > header.topbar { column-gap: 6px !important; }
  #app > header.topbar .brand-copy strong { font-size: 0.9375rem; }
  #app > header.topbar .brand-copy small { font-size: 0.375rem; letter-spacing: .9px; }
  #app > header.topbar #add-pal-top:not([hidden]) { padding-inline: 8px !important; font-size: 0.5625rem !important; }
}


/* v0.16.8 build 239: reserve a real left-hand Pal slot in the compact Park toolbar.
   The previous 1fr track collapsed during max-content sizing on narrow screens. */
@media (max-width: 760px) {
  #persistent-pet-stage .stage-top-bar.is-park-view {
    left: 50% !important;
    right: auto !important;
    width: max-content !important;
    max-width: calc(100vw - 20px) !important;
    transform: translateX(-50%) !important;
  }
  #persistent-pet-stage .stage-top-bar.is-park-view > .stage-care-dock {
    width: max-content !important;
    max-width: 100% !important;
    min-width: 0 !important;
    align-items: stretch !important;
  }
  #persistent-pet-stage .stage-top-bar.is-park-view .stage-care-action-row {
    display: grid !important;
    grid-template-columns: minmax(140px, 1fr) max-content !important;
    grid-template-areas: "picker room" !important;
    align-items: center !important;
    justify-content: start !important;
    gap: 6px !important;
    width: max-content !important;
    max-width: calc(100vw - 36px) !important;
    min-width: 0 !important;
    padding: 0 !important;
  }
  #persistent-pet-stage .stage-top-bar.is-park-view .stage-household-picker {
    grid-area: picker !important;
    display: block !important;
    width: 100% !important;
    min-width: 140px !important;
    max-width: none !important;
  }
  #persistent-pet-stage .stage-top-bar.is-park-view #stage-household-toggle {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    justify-content: flex-start !important;
  }
  #persistent-pet-stage .stage-top-bar.is-park-view .stage-household-toggle-label {
    display: inline-block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 8ch !important;
  }
  #persistent-pet-stage .stage-top-bar.is-park-view .stage-room-functions {
    grid-area: room !important;
    display: flex !important;
    flex: 0 0 auto !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    justify-self: end !important;
    overflow: visible !important;
  }
  #persistent-pet-stage .stage-top-bar.is-park-view .stage-care-action-row > .stage-household-tidy,
  #persistent-pet-stage .stage-top-bar.is-park-view .stage-care-action-row > .stage-care-actions,
  #persistent-pet-stage .stage-top-bar.is-park-view .stage-care-action-row > .stage-care-actions-shell {
    display: none !important;
  }
}
@media (max-width: 390px) {
  #persistent-pet-stage .stage-top-bar.is-park-view .stage-care-action-row {
    grid-template-columns: minmax(132px, 1fr) max-content !important;
    max-width: calc(100vw - 32px) !important;
  }
  #persistent-pet-stage .stage-top-bar.is-park-view .stage-household-picker {
    min-width: 132px !important;
  }
}

/* Set Out: an intentionally quiet, event-driven Friends collection. */
.independent-pals-card { margin-block-end: 1rem; }
.set-out-action { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; margin-block: .75rem; border: 1px solid var(--line, #e9ddcb); border-radius: 1.1rem; background: rgba(255,255,255,.58); }
.set-out-action > div { display: grid; gap: .25rem; min-width: 0; }
.set-out-action strong { color: var(--ink, #5d4d43); }
.set-out-action small { color: var(--muted, #8b7b6e); line-height: 1.45; }
.set-out-action .button { flex: 0 0 auto; white-space: nowrap; }
.independent-pals-list { display: grid; gap: .7rem; }
.independent-pal-row { display: grid; grid-template-columns: 3.25rem minmax(0,1fr) auto; align-items: center; gap: .8rem; padding: .75rem; border: 1px solid var(--line, #e9ddcb); border-radius: 1rem; background: rgba(255,255,255,.55); }
.independent-pal-avatar { width: 3.25rem; height: 3.25rem; display: grid; place-items: center; overflow: hidden; border-radius: 1rem; background: var(--pal-colour, #f4e4c5); font-size: 1.65rem; }
.independent-pal-avatar svg { width: 100%; height: 100%; }
.independent-pal-copy { display: grid; gap: .2rem; min-width: 0; }
.independent-pal-copy strong { color: var(--ink, #5d4d43); }
.independent-pal-copy small { color: var(--muted, #8b7b6e); line-height: 1.4; }
.independent-pal-story { color: var(--ink-soft, #756456); font-size: .88rem; }
.independent-pal-row .button { white-space: nowrap; }
.independent-pals-more { justify-self: center; margin-top: .75rem; }
@media (max-width: 540px) {
  .set-out-action { align-items: stretch; flex-direction: column; }
  .set-out-action .button { align-self: flex-start; }
  .independent-pal-row { grid-template-columns: 2.8rem minmax(0,1fr); }
  .independent-pal-avatar { width: 2.8rem; height: 2.8rem; }
  .independent-pal-row > .button { grid-column: 2; justify-self: start; }
}


/* v0.17.1.2 build 243: system-wide scalable type and layouts that grow with it.
/* v0.17.1.3 build 244: Help uses the full header-to-navigation vertical lane. */
   Every authored font size is expressed in rem, preserving the standard-size
   baseline while allowing the accessibility preference to scale all screens. */
html[data-a11y-text-size="large"] {
  font-size: 112.5%;
  --panel-padding: clamp(18px, 2.1vw, 25px);
}
html[data-a11y-text-size="extra-large"] {
  font-size: 125%;
  --panel-padding: clamp(20px, 2.3vw, 28px);
}

html[data-a11y-text-size="large"] body,
html[data-a11y-text-size="extra-large"] body {
  line-height: 1.6;
  overflow-wrap: break-word;
}

html[data-a11y-text-size="large"] :is(button, [role="button"], summary, input, select, textarea),
html[data-a11y-text-size="extra-large"] :is(button, [role="button"], summary, input, select, textarea) {
  line-height: 1.3;
  max-width: 100%;
}

html[data-a11y-text-size="large"] :is(.topbar, .topbar-right, .page-intro, .intro-actions, .card-heading, .section-heading, .economy-heading, .friends-subheading, .set-out-action),
html[data-a11y-text-size="extra-large"] :is(.topbar, .topbar-right, .page-intro, .intro-actions, .card-heading, .section-heading, .economy-heading, .friends-subheading, .set-out-action) {
  flex-wrap: wrap;
  min-width: 0;
}

html[data-a11y-text-size="large"] :is(.page-intro > *, .card-heading > *, .section-heading > *, .topbar > *, .topbar-right > *),
html[data-a11y-text-size="extra-large"] :is(.page-intro > *, .card-heading > *, .section-heading > *, .topbar > *, .topbar-right > *) {
  min-width: 0;
  max-width: 100%;
}

html[data-a11y-text-size="large"] :is(.button, .button-small, .button-quiet, .pet-tab, .stage-care-action, .stage-care-menu-back, .stage-household-tidy, .stage-household-toggle, .stage-room-tools-menu > summary, .help-manual-index a, .preference-chip, .park-map-zone-chip, .independent-pal-row .button, .set-out-action .button),
html[data-a11y-text-size="extra-large"] :is(.button, .button-small, .button-quiet, .pet-tab, .stage-care-action, .stage-care-menu-back, .stage-household-tidy, .stage-household-toggle, .stage-room-tools-menu > summary, .help-manual-index a, .preference-chip, .park-map-zone-chip, .independent-pal-row .button, .set-out-action .button) {
  height: auto;
  min-height: 44px;
  white-space: normal !important;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

html[data-a11y-text-size="large"] :is(.help-page, .help-page *, .modal-card, .panel-card, .independent-pal-row, .set-out-action),
html[data-a11y-text-size="extra-large"] :is(.help-page, .help-page *, .modal-card, .panel-card, .independent-pal-row, .set-out-action) {
  min-width: 0;
}

html[data-a11y-text-size="large"] :is(.help-page p, .help-page li, .help-page a, .help-page strong, .help-page small, .help-page label),
html[data-a11y-text-size="extra-large"] :is(.help-page p, .help-page li, .help-page a, .help-page strong, .help-page small, .help-page label) {
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

html[data-a11y-text-size="large"] .modal-card,
html[data-a11y-text-size="extra-large"] .modal-card {
  height: auto;
  max-height: min(88svh, 960px);
  overflow-y: auto;
}

html[data-a11y-text-size="large"] #app > header.topbar,
html[data-a11y-text-size="extra-large"] #app > header.topbar {
  height: auto !important;
  min-height: 80px;
  padding-block: .65rem;
  align-items: center;
  row-gap: .5rem;
}

html[data-a11y-text-size="large"] #app > header.topbar .topbar-right,
html[data-a11y-text-size="extra-large"] #app > header.topbar .topbar-right {
  flex-wrap: wrap;
  min-width: 0;
}

html[data-a11y-text-size="large"] #stage-workbench #pet-tabs .pet-tab,
html[data-a11y-text-size="extra-large"] #stage-workbench #pet-tabs .pet-tab {
  min-height: 48px;
  height: auto !important;
  padding-block: .5rem;
  line-height: 1.2;
  white-space: normal !important;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

html[data-a11y-text-size="large"] #stage-workbench #stage-care-needs,
html[data-a11y-text-size="extra-large"] #stage-workbench #stage-care-needs {
  min-height: 0 !important;
  height: auto !important;
  padding-block: .4rem !important;
  align-items: stretch;
}

html[data-a11y-text-size="large"] #persistent-pet-stage .stage-care-action-row > #stage-care-actions .stage-care-action,
html[data-a11y-text-size="large"] #persistent-pet-stage .stage-care-actions-shell > #stage-care-actions .stage-care-action {
  flex-basis: 60px !important;
  width: 60px !important;
  min-width: 60px !important;
  min-height: 54px !important;
  height: auto !important;
  padding: 6px 4px !important;
}

html[data-a11y-text-size="extra-large"] #persistent-pet-stage .stage-care-action-row > #stage-care-actions .stage-care-action,
html[data-a11y-text-size="extra-large"] #persistent-pet-stage .stage-care-actions-shell > #stage-care-actions .stage-care-action {
  flex-basis: 68px !important;
  width: 68px !important;
  min-width: 68px !important;
  min-height: 60px !important;
  height: auto !important;
  padding: 7px 5px !important;
}

html[data-a11y-text-size="large"] #persistent-pet-stage :is(.stage-care-action-label, .stage-care-action-detail),
html[data-a11y-text-size="extra-large"] #persistent-pet-stage :is(.stage-care-action-label, .stage-care-action-detail) {
  white-space: normal !important;
  overflow-wrap: anywhere;
  line-height: 1.2 !important;
  text-overflow: clip !important;
}

@media (max-width: 980px) {
  html[data-a11y-text-size="extra-large"] #tab-panel-help .help-step-list,
  html[data-a11y-text-size="extra-large"] #tab-panel-help .help-reference-grid,
  html[data-a11y-text-size="extra-large"] #tab-panel-help .help-manual-tools {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  html[data-a11y-text-size="extra-large"] .adopt-screen,
  html[data-a11y-text-size="extra-large"] .pet-layout,
  html[data-a11y-text-size="extra-large"] .home-main-grid,
  html[data-a11y-text-size="extra-large"] .home-inventory-grid,
  html[data-a11y-text-size="extra-large"] .economy-columns,
  html[data-a11y-text-size="extra-large"] .friend-content-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 760px) {
  html[data-a11y-text-size="large"] #app > header.topbar,
  html[data-a11y-text-size="extra-large"] #app > header.topbar {
    grid-template-columns: minmax(0, 1fr) max-content max-content !important;
    row-gap: 4px;
  }
  html[data-a11y-text-size="large"] #app > header.topbar #add-pal-top:not([hidden]),
  html[data-a11y-text-size="extra-large"] #app > header.topbar #add-pal-top:not([hidden]) {
    min-height: 44px !important;
    height: auto !important;
    max-width: min(30vw, 132px);
    padding: .45rem .55rem !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    text-align: center;
    overflow-wrap: anywhere;
  }
  html[data-a11y-text-size="large"] #persistent-pet-stage .stage-care-action-row,
  html[data-a11y-text-size="extra-large"] #persistent-pet-stage .stage-care-action-row {
    max-width: calc(100vw - 16px) !important;
  }
  html[data-a11y-text-size="extra-large"] #persistent-pet-stage .stage-top-bar.is-park-view .stage-care-action-row {
    grid-template-columns: minmax(150px, 1fr) max-content !important;
    max-width: calc(100vw - 20px) !important;
  }
  html[data-a11y-text-size="extra-large"] #persistent-pet-stage .stage-top-bar.is-park-view .stage-household-picker {
    min-width: 150px !important;
  }
  html[data-a11y-text-size="large"] #stage-workbench #pet-tabs .pet-tab,
  html[data-a11y-text-size="extra-large"] #stage-workbench #pet-tabs .pet-tab {
    padding-inline: .35rem;
  }
}

@media (max-width: 540px) {
  html[data-a11y-text-size="extra-large"] .species-grid,
  html[data-a11y-text-size="extra-large"] .action-grid,
  html[data-a11y-text-size="extra-large"] .arcade-games {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 420px) {
  html[data-a11y-text-size="extra-large"] #app > header.topbar {
    grid-template-columns: minmax(0, 1fr) max-content !important;
    grid-template-rows: auto auto !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar > .brand {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar #add-pal-top:not([hidden]) {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: start !important;
    max-width: 100%;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools {
    grid-column: 2 !important;
    grid-row: 2 !important;
    justify-self: end !important;
  }
  html[data-a11y-text-size="extra-large"] #persistent-pet-stage .stage-top-bar {
    top: calc(112px + env(safe-area-inset-top, 0px)) !important;
  }
}


/* v0.17.2.2 build 247: Cheat code is the one Help section without a breadcrumb. */
#tab-panel-help .help-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
  min-width: 0;
  margin: 0 0 .55rem;
  color: #71816c;
  font-size: .78rem;
  line-height: 1.35;
  font-weight: 700;
}
#tab-panel-help .help-breadcrumb > span:not(.help-breadcrumb-separator),
#tab-panel-help .help-breadcrumb > strong {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  padding: .16rem .48rem;
  border: 1px solid #e6ecdf;
  border-radius: 999px;
  background: #f3f6ef;
  overflow-wrap: anywhere;
}
#tab-panel-help .help-breadcrumb > strong {
  color: #526a4e;
  border-color: #dce8d5;
  background: #eaf2e5;
  font-weight: 800;
}
#tab-panel-help .help-breadcrumb-separator {
  flex: 0 0 auto;
  color: #b19d88;
  padding-inline: .02rem;
}
#tab-panel-help .help-controls-grid article,
#tab-panel-help .help-feature-list article,
#tab-panel-help .help-step-list li > div {
  min-width: 0;
}
#tab-panel-help .help-controls-grid article > div > strong,
#tab-panel-help .help-feature-list article h4,
#tab-panel-help .help-step-list h4 {
  display: block;
  margin-top: .12rem;
}
@media (max-width: 720px) {
  #tab-panel-help .help-breadcrumb { gap: .22rem; font-size: .75rem; }
  #tab-panel-help .help-breadcrumb > span:not(.help-breadcrumb-separator),
  #tab-panel-help .help-breadcrumb > strong { padding: .14rem .4rem; }
}


/* v0.17.3 build 248: Community toolbar context, allele lab and bathroom queue popovers. */
.home-bathroom-station { pointer-events: none; }
.home-bathroom-door {
  appearance: none; -webkit-appearance: none; pointer-events: auto; cursor: pointer;
  padding: 0; color: inherit; text-align: center; outline-offset: 4px;
  box-shadow: inset 0 0 0 1px #ffffff45;
}
.home-bathroom-door:hover { filter: brightness(1.035); }
.home-bathroom-door:focus-visible { outline: 3px solid #8fae83; outline-offset: 3px; }
.home-bathroom-dialog { width: min(440px, calc(100vw - 28px)); max-height: min(82dvh, 660px); overflow: auto; }
.home-bathroom-dialog .modal-top { align-items: center; }
.home-bathroom-dialog .modal-top h2, .allele-lab-dialog .modal-top h2 { margin: 2px 0 0; }
.bathroom-dialog-actions { display: flex; align-items: center; gap: 8px; }
.bathroom-dialog-actions .modal-close { flex: 0 0 auto; }
.home-bathroom-dialog-summary { margin: 0 0 12px; color: #847365; font-size: .75rem; line-height: 1.5; }
.home-bathroom-dialog-list { display: grid; gap: 8px; }
.bathroom-queue-person { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid #eadfd2; border-radius: 14px; background: #fffdf8; min-width: 0; }
.bathroom-queue-person.is-active { border-color: #ecc9a4; background: linear-gradient(120deg,#fff8e8,#fffdf8); }
.bathroom-queue-person-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: #f2eee4; font-size: 1.2rem; }
.bathroom-queue-person-copy { display: grid; gap: 3px; min-width: 0; }
.bathroom-queue-person-copy strong { color: #655649; font-size: .75rem; overflow-wrap: anywhere; }
.bathroom-queue-person-copy small { color: #9c8d7e; font-size: .625rem; line-height: 1.4; }
.bathroom-queue-person-wait { color: #748e6b; font-size: .75rem; font-weight: 900; white-space: nowrap; }
.bathroom-queue-empty, .allele-lab-empty { margin: 0; padding: 16px; border-radius: 13px; background: #f5f8ef; color: #778c70; font-size: .72rem; line-height: 1.55; }
.home-bathroom-dialog-note { margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed #e7d8c5; color: #9c8d7e; font-size: .6rem; line-height: 1.55; }
.allele-lab-open { white-space: nowrap; }
.allele-lab-dialog { width: min(820px, calc(100vw - 28px)); max-height: min(88dvh, 850px); overflow: auto; }
.allele-lab-content { display: grid; gap: 16px; }
.allele-lab-intro { margin: 0; color: #887969; font-size: .72rem; line-height: 1.55; }
.allele-lab-pedigree { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; align-items: stretch; }
.allele-lab-generation { padding: 11px; min-width: 0; border: 1px solid #e9e1d5; border-radius: 15px; background: linear-gradient(150deg,#fbfaf3,#f8f4fb); }
.allele-lab-generation h3, .allele-lab-transmission-section h3 { margin: 0 0 9px; color: #776656; font-size: .7rem; }
.allele-lab-generation-cards { display: grid; gap: 7px; }
.allele-lab-pal-card { display: grid; gap: 3px; min-width: 0; padding: 9px; border-radius: 11px; background: #fffdf9; border: 1px solid #eee5db; }
.allele-lab-pal-card > small { color: #a68f7d; font-size: .5rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.allele-lab-pal-card > strong { color: #5f5349; font-size: .68rem; overflow-wrap: anywhere; }
.allele-lab-pal-card > span { color: #9a8c80; font-size: .56rem; }
.allele-lab-mini-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.allele-lab-mini-chips span { padding: 3px 5px; border-radius: 8px; background: #f0f4e9; color: #718667; font-size: .48rem; font-weight: 800; }
.allele-lab-generation.is-current-generation { border-color: #e8c0ae; background: linear-gradient(145deg,#fff5ed,#f7f2fb); }
.allele-lab-transmission-section { padding-top: 13px; border-top: 1px solid #eee4d8; }
.allele-lab-transmission-section > p { margin: -2px 0 12px; color: #9a8b7e; font-size: .6rem; line-height: 1.55; }
.allele-lab-locus-list { display: grid; gap: 7px; }
.allele-lab-locus-row { display: grid; grid-template-columns: 130px minmax(0,1fr); align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: #faf8f2; min-width: 0; }
.allele-lab-locus-row > strong { color: #6d5a4a; font-size: .65rem; }
.allele-lab-flow { display: grid; grid-template-columns: minmax(74px,1fr) 16px minmax(74px,1fr) 18px minmax(74px,1fr); align-items: center; gap: 5px; min-width: 0; }
.allele-lab-pair { display: grid; gap: 4px; justify-items: center; min-width: 0; }
.allele-lab-pair > small { max-width: 100%; color: #a09183; font-size: .48rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.allele-lab-pair-values { display: flex; gap: 4px; justify-content: center; }
.allele-lab-allele { display: grid; place-items: center; min-width: 24px; height: 26px; padding: 0 5px; border-radius: 8px; background: #eaf2e5; color: #587650; font-family: var(--round); font-size: .72rem; font-weight: 900; }
.allele-lab-pair.is-offspring .allele-lab-allele { background: #f8e7df; color: #a86652; }
.allele-lab-flow-symbol { color: #b69a82; font-size: .85rem; font-weight: 900; text-align: center; }
.allele-lab-more { margin-top: 10px; padding: 10px 12px; border: 1px dashed #e4d7c8; border-radius: 12px; color: #8a7867; font-size: .62rem; }
.allele-lab-all-loci { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px 12px; margin-top: 10px; }
.allele-lab-all-loci > div { display: flex; justify-content: space-between; gap: 6px; padding: 5px 0; border-bottom: 1px solid #eee8df; min-width: 0; }
.allele-lab-all-loci strong { color: #756354; font-size: .55rem; }
.allele-lab-all-loci span { color: #829576; font-family: var(--round); font-size: .58rem; font-weight: 800; }
@media (max-width: 640px) {
  .allele-lab-pedigree { grid-template-columns: 1fr; }
  .allele-lab-generation-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .allele-lab-locus-row { grid-template-columns: 1fr; gap: 8px; }
  .allele-lab-flow { grid-template-columns: minmax(0,1fr) 12px minmax(0,1fr) 14px minmax(0,1fr); gap: 2px; }
  .allele-lab-allele { min-width: 21px; height: 24px; }
  .allele-lab-all-loci { grid-template-columns: 1fr; }
  .home-bathroom-dialog { padding: 18px; }
}

/* v0.17.3.1 build 249: generation-spanning Allele Lab chart. */
.allele-lab-dialog { width: min(1120px, calc(100vw - 28px)); }
.allele-lab-content { min-width: 0; gap: 12px; }
.allele-lab-chart-scroll { max-width: 100%; max-height: min(62dvh, 690px); overflow: auto; overscroll-behavior: contain; border: 1px solid #eee4d8; border-radius: 14px; background: linear-gradient(180deg,#fffdf9,#fbf8f1); }
.allele-lab-chart { display: block; max-width: none; }
.allele-lab-generation-label { fill: #8e7b69; font: 800 .625rem system-ui,sans-serif; letter-spacing: .08em; }
.allele-lab-generation-label.is-current { fill: #b36f59; }
.allele-lab-generation-rule { stroke: #e5dbcf; stroke-width: 1.5; stroke-linecap: round; }
.allele-lab-generation-rule.is-current { stroke: #dca991; }
.allele-lab-node-name { fill: #887969; font: 700 .5rem system-ui,sans-serif; }
.allele-lab-row-band { fill: #f3efe7; opacity: .46; }
.allele-lab-locus-label { fill: #756354; font: 700 .5625rem system-ui,sans-serif; }
.allele-lab-tendril { fill: none; stroke-width: 1.7; stroke-linecap: round; opacity: .72; }
.allele-lab-tendril.is-dominant { stroke: #d88a52; }
.allele-lab-tendril.is-recessive { stroke: #7196c5; }
.allele-lab-tendril.is-unknown, .allele-lab-tendril.is-unresolved { stroke: #c5b7a5; stroke-dasharray: 2 3; opacity: .36; }
.allele-lab-tendril.is-ambiguous { opacity: .22; stroke-dasharray: 2.5 3; }
.allele-lab-allele-node circle { stroke: #fffdf9; stroke-width: 1.25; }
.allele-lab-allele-node text { fill: #fff; font: 800 .4375rem system-ui,sans-serif; pointer-events: none; }
.allele-lab-allele-node.is-dominant circle { fill: #d88a52; }
.allele-lab-allele-node.is-recessive circle { fill: #7196c5; }
.allele-lab-allele-node.is-unknown circle { fill: #a99c8d; }
.allele-lab-legend { display: flex; flex-wrap: wrap; gap: 7px 14px; color: #887969; font-size: .62rem; }
.allele-lab-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.allele-lab-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #a99c8d; }
.allele-lab-legend i.is-dominant { background: #d88a52; }
.allele-lab-legend i.is-recessive { background: #7196c5; }
.allele-lab-legend i.is-ambiguous { width: 16px; height: 2px; border-radius: 0; background: repeating-linear-gradient(90deg,#b69a82 0 3px,transparent 3px 5px); }
.allele-lab-chart-note { margin: 0; color: #998979; font-size: .62rem; line-height: 1.5; }
@media (max-width: 600px) { .allele-lab-chart-scroll { max-height: 58dvh; } .allele-lab-chart-note { font-size: .68rem; } }

/* v0.17.3.2 build 250: genuine XYZ Allele Lab volume with a rotatable shallow-angle camera. */
.allele-lab-camera-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.allele-lab-camera-label { margin-right: auto; color: #897866; font-size: .66rem; font-weight: 850; }
.allele-lab-camera-button { min-width: 35px; min-height: 34px; padding: 5px 10px; border: 1px solid #e6daca; border-radius: 10px; background: #fffdf8; color: #776554; font: 800 .68rem var(--round); cursor: pointer; touch-action: manipulation; }
.allele-lab-camera-button:hover { border-color: #d9ad96; background: #fff6ef; }
.allele-lab-camera-button:focus-visible { outline: 3px solid #d9ad96; outline-offset: 2px; }
.allele-lab-chart-scroll-3d { max-height: min(66dvh, 760px); background: radial-gradient(ellipse at 48% 8%, #fffefa 0%, #fbf8f1 64%, #f6f1e8 100%); perspective: 1400px; }
.allele-lab-chart-3d { display: block; max-width: none; overflow: visible; }
.allele-lab-row-plane { fill: #e8e4d9; opacity: .38; stroke: #e8ded0; stroke-width: .7; }
.allele-lab-generation-label { fill: #887663; font: 900 .72rem system-ui,sans-serif; letter-spacing: .1em; }
.allele-lab-generation-label.is-current { fill: #b66f57; }
.allele-lab-generation-rule { stroke: #d8cabb; stroke-width: 2; stroke-linecap: round; }
.allele-lab-generation-rule.is-current { stroke: #d99c81; stroke-width: 2.5; }
.allele-lab-node-name { fill: #776757; font: 800 .62rem system-ui,sans-serif; paint-order: stroke; stroke: #fffdf8; stroke-width: 2.5px; stroke-linejoin: round; }
.allele-lab-locus-label { fill: #74604f; font: 750 .58rem system-ui,sans-serif; }
.allele-lab-tendril { stroke-width: 2.1; stroke-linecap: round; opacity: .7; }
.allele-lab-tendril.is-dominant { stroke: #d88a52; }
.allele-lab-tendril.is-recessive { stroke: #7196c5; }
.allele-lab-tendril.is-unknown, .allele-lab-tendril.is-unresolved { stroke: #b7a997; stroke-dasharray: 4 5; opacity: .36; }
.allele-lab-tendril.is-ambiguous { opacity: .2; stroke-dasharray: 3 5; }
.allele-lab-allele-node circle { stroke: #fffdf9; stroke-width: 1.6; }
.allele-lab-allele-node.is-selected-generation circle { filter: drop-shadow(0 1.5px 1.5px #65533b35); }
.allele-lab-allele-node text { fill: #fff; font: 900 .52rem system-ui,sans-serif; pointer-events: none; }
@media (max-width: 600px) {
  .allele-lab-dialog { width: calc(100vw - 14px); max-width: none; }
  .allele-lab-chart-scroll-3d { max-height: 60dvh; }
  .allele-lab-camera-tools { gap: 5px; }
  .allele-lab-camera-label { flex-basis: 100%; }
  .allele-lab-camera-button { flex: 1 1 auto; min-height: 40px; }
}

/* v0.17.3.3 build 251: give the 3D Allele Lab more chart space and breathing room. */
.allele-lab-dialog {
  width: min(1340px, calc(100vw - 24px));
  height: min(96dvh, 1040px);
  max-height: 96dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(12px, 2vw, 20px);
}
.allele-lab-dialog > .modal-top { flex: 0 0 auto; margin-bottom: 2px; }
.allele-lab-dialog .modal-top .eyebrow { margin-bottom: 4px; }
.allele-lab-dialog .modal-top h2 { line-height: 1.12; }
.allele-lab-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 8px;
  overflow: hidden;
}
.allele-lab-intro { flex: 0 0 auto; margin: 0; font-size: .64rem; line-height: 1.3; }
.allele-lab-camera-tools { flex: 0 0 auto; gap: 6px; }
.allele-lab-camera-label { font-size: .6rem; }
.allele-lab-chart-scroll-3d {
  flex: 1 1 auto;
  min-height: 220px;
  max-height: none;
  height: auto;
  overscroll-behavior: contain;
}
.allele-lab-legend { flex: 0 0 auto; gap: 6px 12px; }
.allele-lab-chart-note { flex: 0 0 auto; font-size: .56rem; line-height: 1.3; }
@media (max-width: 600px) {
  .allele-lab-dialog { width: calc(100vw - 12px); height: 96dvh; max-height: 96dvh; padding: 12px; }
  .allele-lab-content { gap: 7px; }
  .allele-lab-intro { font-size: .62rem; line-height: 1.25; }
  .allele-lab-camera-tools { gap: 4px; }
  .allele-lab-camera-label { flex-basis: auto; }
  .allele-lab-camera-button { min-height: 36px; padding: 4px 8px; }
  .allele-lab-chart-scroll-3d { min-height: 180px; }
  .allele-lab-chart-note { font-size: .58rem; }
}


/* v0.17.3.4 build 252: restore the unlabeled 3D axis direction arrows. */
.allele-lab-axis-arrow {
  fill: none;
  stroke: #b5a18c;
  stroke-width: 2.1;
  stroke-linecap: round;
  opacity: .82;
}
.allele-lab-axis-arrow.is-x { stroke: #c58e74; }
.allele-lab-axis-arrow.is-y { stroke: #91a687; }
.allele-lab-axis-arrow.is-z { stroke: #83a1c1; }
.allele-lab-axis-arrowhead { fill: #a9947f; stroke: none; }

/* v0.18.1.1 build 262: Godmode uses an orbitable translucent 3D needs surface. */
.household-godmode-dialog {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(1120px, calc(100vw - 24px));
  max-width: 1120px;
  height: min(94dvh, 980px);
  max-height: 94dvh;
  overflow: hidden;
  padding: clamp(14px, 2.5vw, 24px);
  background: #fffdf8;
  color: #28372f;
}
.household-godmode-toolbar { display: flex; align-items: center; gap: 7px; }
.household-godmode-summary { flex: 0 0 auto; margin: 0; color: #4e5b52; font-size: .82rem; line-height: 1.4; font-weight: 650; }
.household-godmode-chart-viewport {
  display: block;
  flex: 1 1 auto;
  min-height: 240px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #e5e0d4;
  border-radius: 15px;
  background: linear-gradient(180deg, #fffefa 0%, #f8f6ef 100%);
  padding: 8px 8px 4px;
  scrollbar-width: thin;
  scrollbar-color: #b9b2a5 transparent;
}
.household-godmode-chart-viewport:focus-visible { outline: 3px solid rgba(123, 155, 135, .65); outline-offset: 2px; }
.household-godmode-chart { display: block; max-width: none; overflow: visible; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.household-godmode-chart-viewport.is-orbiting .household-godmode-chart { cursor: grabbing; }
.godmode-grid-plane { fill: rgba(219, 225, 215, .10); stroke: #dddcd2; stroke-width: 1; vector-effect: non-scaling-stroke; }
.godmode-grid-plane-base { fill: rgba(229, 235, 225, .30); stroke: #c9cfc4; }
.godmode-y-tick { fill: #38483e; font: 700 .6875rem var(--round); font-variant-numeric: tabular-nums; }
.godmode-need-label { fill: #34443a; font: 750 .6875rem var(--round); }
.godmode-pal-label { fill: #29382f; font: 750 .6875rem var(--round); }
.godmode-axis { fill: none; stroke-width: 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.godmode-axis-x { stroke: #c58e74; }
.godmode-axis-y { stroke: #86a783; }
.godmode-axis-z { stroke: #83a1c1; }
.godmode-axis-arrowhead-z { fill: #83a1c1; stroke: #fffefa; stroke-width: .7; vector-effect: non-scaling-stroke; }
.godmode-axis-title { fill: #34443a; font: 850 .6875rem var(--round); letter-spacing: .07em; }
.godmode-surface-cell { fill-opacity: .38; stroke-width: .8; vector-effect: non-scaling-stroke; }
.godmode-surface-single-slice { stroke: rgba(52, 68, 58, .26); stroke-width: .8; vector-effect: non-scaling-stroke; }
.godmode-surface-ridge { fill: none; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; stroke-opacity: .82; vector-effect: non-scaling-stroke; }
.godmode-surface-depth { stroke-width: 1.1; stroke-linecap: round; stroke-opacity: .78; vector-effect: non-scaling-stroke; }
.godmode-surface-point { cursor: help; stroke: #fffdf8; stroke-width: 1.35; fill-opacity: .96; vector-effect: non-scaling-stroke; }
.godmode-surface-point:focus, .godmode-surface-point:hover { stroke: #26382e; stroke-width: 2.2; r: 5.2; }
.godmode-egg-mark { fill: #b7b2a6; stroke: #76776f; stroke-width: .7; stroke-dasharray: 2 1; }
.household-godmode-chart-caption { margin: 4px 2px 1px; color: #536055; font-size: .7rem; font-weight: 600; line-height: 1.4; }
.household-godmode-empty { margin: 0; padding: 24px 12px; color: #39483e; font-weight: 650; text-align: center; }
.household-godmode-note { flex: 0 0 auto; margin: 0; padding-top: 9px; border-top: 1px solid #e4dfd3; color: #536055; font-size: .7rem; line-height: 1.5; }
.household-godmode-note strong { color: #34443a; font-weight: 850; }
.household-godmode-note kbd, .stage-header-tools-menu kbd { padding: 2px 5px; border: 1px solid #cfc8b9; border-radius: 5px; background: #f8f4ec; color: #3f4a40; font: 750 .66rem var(--round); }
.household-godmode-dialog > .modal-top { flex: 0 0 auto; margin-bottom: 0; }
.household-godmode-dialog > h2 { margin: 0; color: #29382f; }
@media (max-width: 700px) {
  .household-godmode-dialog { width: calc(100vw - 12px); height: 94dvh; max-height: 94dvh; padding: 12px; }
  .household-godmode-chart-viewport { min-height: 230px; padding: 5px 4px 3px; }
  .household-godmode-chart-caption, .household-godmode-note { font-size: .66rem; }
  .household-godmode-summary { font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) { .household-godmode-chart * { transition: none !important; } }
/* Native dialogs must remain hidden when closed despite the panel's flex layout. */
.household-godmode-dialog:not([open]) { display: none; }

/* v0.19.0 build 264: household needs history and evolving home-life preferences. */
.godmode-history-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin:8px 0 10px; color:#526156; font-size:.78rem; font-weight:700; }
.godmode-history-toolbar select { border:1px solid #cbd4c9; border-radius:9px; background:#fffdf8; color:#34443a; padding:7px 10px; font:inherit; }
#household-godmode-history-status { color:#718076; font-weight:550; }
.household-godmode-history { background:rgba(255,255,255,.62); border:1px solid rgba(190,199,186,.7); border-radius:13px; padding:10px 12px; margin:8px 0 4px; }
.household-godmode-history svg { display:block; width:100%; height:auto; min-height:125px; overflow:visible; }
.godmode-history-grid { stroke:#dfe4dc; stroke-width:1; }
.godmode-history-tick { fill:#637166; font:600 .625rem var(--round); }
.godmode-history-line { vector-effect:non-scaling-stroke; }
.godmode-history-legend { display:flex; flex-wrap:wrap; gap:7px 13px; padding:5px 3px 1px; }
.godmode-history-legend span { display:inline-flex; align-items:center; gap:5px; color:#435247; font-size:.68rem; font-weight:700; }
.godmode-history-legend span::before { content:""; width:9px; height:9px; border-radius:50%; background:var(--history-color); }
.household-godmode-history-empty { margin:0; padding:18px 8px; color:#69776c; text-align:center; font-size:.8rem; }


/* v0.19.1 build 265: local seasonal park atmosphere and interactive event spots. */
#room-world[data-park-season="spring"] .park-map-landscape { filter: saturate(1.12) hue-rotate(-3deg); }
#room-world[data-park-season="summer"] .park-map-landscape { filter: saturate(1.16) sepia(.08) brightness(1.025); }
#room-world[data-park-season="autumn"] .park-map-landscape { filter: saturate(.9) sepia(.2) hue-rotate(-8deg); }
#room-world[data-park-season="winter"] .park-map-landscape { filter: saturate(.72) hue-rotate(7deg) brightness(1.055); }
.park-seasonal-overlay { position:absolute; inset:0; z-index:2; pointer-events:none; overflow:visible; }
.park-seasonal-overlay-svg { display:block; width:100%; height:100%; overflow:visible; }
.park-season-banner { position:absolute; top:clamp(8px,2.4%,18px); left:clamp(8px,2.4%,18px); display:flex; align-items:center; gap:7px; padding:6px 11px; border:1px solid #fffdf0d9; border-radius:999px; background:#fffdf0e8; color:#435a45; box-shadow:0 3px 12px #526b3b20; font-size:clamp(.62rem,1.7vw,.78rem); font-weight:800; line-height:1.2; backdrop-filter:blur(7px); }
.park-season-banner > span { font-size:1.05em; }
.park-season-banner small { color:#71806b; font-size:.85em; font-weight:700; text-transform:capitalize; }
.park-activity-magnet[data-seasonal] { pointer-events:auto; cursor:pointer; padding:0; border:0; background:transparent; color:inherit; font:inherit; }
.park-activity-magnet[data-seasonal]:focus-visible { outline:3px solid #557eaa; outline-offset:4px; border-radius:14px; }
.park-activity-magnet[data-seasonal] .park-activity-magnet-icon { transition:transform .16s ease, box-shadow .16s ease; box-shadow:0 3px 0 #d9c9a8,0 6px 14px #788d6040; }
.park-activity-magnet[data-seasonal]:not(:disabled):hover .park-activity-magnet-icon { transform:translateY(-3px) scale(1.08); box-shadow:0 5px 0 #d9c9a8,0 9px 17px #788d6050; }
.park-activity-magnet[data-seasonal] .park-activity-magnet-label { color:#405a47; border-color:#f7efd9; }
.park-activity-magnet[data-seasonal]:disabled { opacity:.55; cursor:not-allowed; animation:none; }
#room-world[data-park-season="winter"] .park-activity-magnet[data-seasonal] .park-activity-magnet-icon { background:linear-gradient(145deg,#f7fdff,#dceef3); }
#room-world[data-park-season="autumn"] .park-activity-magnet[data-seasonal] .park-activity-magnet-icon { background:linear-gradient(145deg,#fff4df,#f0d1a6); }
#room-world[data-park-season="summer"] .park-activity-magnet[data-seasonal] .park-activity-magnet-icon { background:linear-gradient(145deg,#fff8da,#f5e0a1); }
@media(prefers-reduced-motion:reduce){.park-activity-magnet[data-seasonal] .park-activity-magnet-icon{transition:none}}

/* v0.19.3 build 267: make household arrival visible and keep an empty Park actionable. */
.park-map-empty{pointer-events:auto}
.park-map-fallback-face{display:grid;place-items:center;width:62px;height:64px;font-size:2.4rem;line-height:1;filter:drop-shadow(0 3px 2px #4e604122)}
.park-map-pet.is-park-fallback{display:grid;grid-template-rows:62px 19px 15px;justify-items:center;align-items:center}


/* v0.19.4 build 268: isolate Park scenery and visitor sprites into explicit depth layers. */
#room-world > #park-stage-content { z-index: 30 !important; isolation: isolate; }
#world-scene.is-park-view .park-map-landscape { z-index: 0 !important; }
#world-scene.is-park-view .park-seasonal-overlay { z-index: 1 !important; }
#world-scene.is-park-view .park-visitors-layer {
  position: absolute; inset: 0; z-index: 3; isolation: isolate;
  overflow: visible; pointer-events: none; visibility: visible;
}
#world-scene.is-park-view .park-visitors-layer > .park-map-pet {
  position: absolute; display: grid; visibility: visible; pointer-events: none;
}
#world-scene.is-park-view .park-visitors-layer > .park-map-pet .park-map-avatar,
#world-scene.is-park-view .park-visitors-layer > .park-map-pet .park-map-nameplate,
#world-scene.is-park-view .park-visitors-layer > .park-map-pet .park-map-activity-caption { visibility: visible; }
#world-scene.is-park-view .park-activity-magnets { z-index: 4 !important; }
  position: absolute; z-index: 7; top: 58px; right: 14px; min-height: 36px;
  padding: 8px 12px; border: 1px solid #fffdf4; border-radius: 999px;
  box-shadow: 0 4px 14px #536b4026; font-size: .68rem; pointer-events: auto;
}
@media(max-width:620px) {
}


/* v0.19.8 build 272: seasonal activity busy state is explicitly initialized. */
#room-world > #park-stage-content.is-render-recovery {
  display: block !important;
  visibility: visible !important;
  overflow: visible !important;
}
#park-stage-content .park-visitors-recovery-layer {
  position: absolute !important;
  inset: 0 !important;
  z-index: 80 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  pointer-events: none !important;
  isolation: isolate !important;
}
#park-stage-content .park-visitors-recovery-layer > .park-map-pet {
  position: absolute !important;
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}


/* v0.19.10 build 274: compact Park diagnostics popover and interactive household Godmode. */
#world-scene.is-park-view .park-map-activity-caption,
#world-scene.is-park-view .park-activity-magnet-label,
#world-scene.is-park-view .park-season-banner { display: none !important; }
#world-scene.is-park-view .park-map-pet { grid-template-rows: 62px 19px !important; height: 86px !important; }
#world-scene.is-park-view .park-activity-magnet { gap: 0 !important; }
.park-diagnostics-control { position: relative; min-width: 0; }
.stage-header-tools-menu #park-diagnostics-toggle { width: 100%; min-height: 36px; justify-content: flex-start; }
.park-diagnostics-popover[hidden] { display: none !important; }
.park-diagnostics-popover { position: absolute; z-index: 220; top: calc(100% + 7px); right: 0; display: grid; gap: 7px; width: min(290px, calc(100vw - 42px)); padding: 11px 12px; border: 1px solid #e4ddcf; border-radius: 13px; background: #fffefa; color: #35443a; box-shadow: 0 14px 34px rgba(50, 45, 35, .18); }
.park-diagnostics-count { margin: 0; padding: 7px 9px; border: 1px solid #dce8d2; border-radius: 9px; background: #f5f8ed; color: #405a45; font: 850 .72rem/1.35 var(--round); font-variant-numeric: tabular-nums; }
.park-diagnostics-error { margin: 0; color: #697267; font: 600 .66rem/1.45 var(--round); overflow-wrap: anywhere; }
.park-diagnostics-error[data-state="error"] { padding: 7px 8px; border: 1px solid #edc5b9; border-radius: 8px; background: #fff3ef; color: #9b493a; }
.household-godmode-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 10px; border: 1px solid #e6e2d7; border-radius: 12px; background: #faf9f3; color: #4c5d50; font-size: .75rem; font-weight: 700; }
.household-godmode-controls label { display: inline-flex; align-items: center; gap: 7px; }
.household-godmode-controls select { min-height: 32px; padding: 5px 9px; border: 1px solid #cbd4c9; border-radius: 9px; background: #fffdf8; color: #34443a; font: inherit; }
.household-godmode-controls > span { margin-left: auto; color: #68776a; font-size: .68rem; font-weight: 650; }
.household-godmode-controls button:disabled { opacity: .48; cursor: not-allowed; }
.household-godmode-autofriend { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:4px 12px; padding:9px 11px; border:1px solid #ded8eb; border-radius:13px; background:linear-gradient(120deg,#fbf8ff,#fffaf3); }
.household-godmode-autofriend-copy h3 { margin:0; color:#55456f; font-size:.78rem; }
.household-godmode-autofriend-copy p { margin:3px 0 0; color:#6b6574; font-size:.68rem; line-height:1.4; }
.household-godmode-autofriend-status { grid-column:1 / -1; margin:0; color:#718076; font-size:.66rem; line-height:1.35; }
.household-godmode-autofriend button:disabled { opacity:.48; cursor:not-allowed; }
@media (max-width: 700px) { .household-godmode-controls { gap: 6px; } .household-godmode-controls > span { flex-basis: 100%; margin-left: 0; } }
@media (max-width: 520px) { .household-godmode-autofriend { grid-template-columns:1fr; } .household-godmode-autofriend button { justify-self:start; } }


/* v0.19.13 build 277: one shared right-side card notification system. */
.toast-stack {
  position: fixed;
  z-index: 20000;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: var(--toast-bottom-clearance, calc(100px + env(safe-area-inset-bottom, 0px)));
  display: grid;
  justify-items: end;
  align-content: end;
  gap: 8px;
  width: min(340px, calc(100vw - 28px));
  max-height: min(52vh, 430px);
  overflow: visible;
  pointer-events: none;
}
.toast-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #e9e4d2;
  border-radius: 15px;
  background: linear-gradient(125deg, #fffdf2, #f1f8ee 70%, #f9f3ff);
  box-shadow: 0 8px 24px #5b614326, inset 0 1px #ffffff;
  color: #514a40;
  opacity: 0;
  transform: translateX(12px) scale(.985);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: auto;
  backdrop-filter: blur(13px) saturate(1.1);
  -webkit-backdrop-filter: blur(13px) saturate(1.1);
}
.toast-card.is-visible { opacity: 1; transform: translateX(0) scale(1); }
.toast-card.is-leaving { opacity: 0; transform: translateX(8px) scale(.985); pointer-events: none; }
.toast-card[data-tone="error"] { border-color: #edc7bd; background: linear-gradient(125deg, #fff8f4, #fff0ec); }
.toast-card[data-tone="success"] { border-color: #d7e7d7; background: linear-gradient(125deg, #fbfff8, #edf7ed); }
.toast-card-art { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fff9ee; box-shadow: inset 0 0 0 1px #efe7d8; color: #836b5a; font-size: 1.25rem; }
.toast-card-art img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 3px 5px #71604a15); }
.toast-card-art-badge { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 1px 3px; border: 2px solid #fffdf8; border-radius: 8px; background: #edf5e6; font-size: .6875rem; }
.toast-card-copy { min-width: 0; }
.toast-card-kicker { margin: 0 0 2px; color: #8d9b73; font-size: .4375rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.toast-card-title { display: block; overflow-wrap: anywhere; color: #6c5a48; font-size: .6875rem; font-weight: 900; line-height: 1.3; }
.toast-card-description { display: -webkit-box; margin: 3px 0 0; overflow: hidden; color: #958474; font-size: .5rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.toast-card-action { flex: 0 0 auto; min-height: 30px; padding: 5px 10px; border: 1px solid #e7cdbd; border-radius: 9px; background: #fffaf4; color: #8d6455; font-size: .5625rem; font-weight: 900; }
.toast-card-action:hover:not(:disabled) { background: #fff; border-color: #d9ad9a; }
.toast-card-action:focus-visible { outline: 2px solid #c88370; outline-offset: 2px; }
@media (max-width: 760px) {
  .toast-stack { right: max(9px, env(safe-area-inset-right, 0px)); width: min(290px, calc(100vw - 18px)); max-height: 45vh; }
  .toast-card { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 7px; padding: 8px 9px; border-radius: 13px; }
  .toast-card-art { width: 35px; height: 35px; border-radius: 10px; }
  .toast-card-art img { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) { .toast-card { transition: none; } }

/* v0.19.14 build 278: Home and Park physical-location reconciliation. */


/* v0.20.0.2 build 285: persistent Park attendance and bedtime returns. */
.room-pet-companion-badge { position:absolute; z-index:5; top:44px; left:1px; display:grid; place-items:center; min-width:29px; height:29px; padding:2px 4px; border:2px solid #fff; border-radius:11px; background:#fce9f1; color:#9b5e7c; box-shadow:0 3px 9px #66513f25; font-size:.9375rem; pointer-events:none; animation:homeCompanionFloat 2.3s ease-in-out infinite; }
@keyframes homeCompanionFloat { 0%,100% { transform:translateY(0) scale(1); } 50% { transform:translateY(-3px) scale(1.04); } }
.room-pet-visual.home-activity-reading .pet-bob { transform-origin:center bottom; animation:homePalReading 2.6s ease-in-out infinite; }
.room-pet-visual.home-activity-listening .pet-bob { transform-origin:center bottom; animation:homePalListening 2.1s ease-in-out infinite; }
.room-pet-visual.home-activity-watching .pet-bob { transform-origin:center bottom; animation:homePalWatching 2.3s ease-in-out infinite; }
.room-pet-visual.home-activity-sniffing .pet-bob { transform-origin:center bottom; animation:homePalSniffing 1.45s ease-in-out infinite; }
.room-pet-visual.home-activity-playing .pet-bob { transform-origin:center bottom; animation:homePalPlaying .82s ease-in-out infinite; }
.room-pet-visual.home-activity-basking .pet-bob,.room-pet-visual.home-activity-lounging .pet-bob { transform-origin:center bottom; animation:homePalBasking 3.1s ease-in-out infinite; }
.room-pet-visual.home-activity-perching .pet-bob { transform-origin:center bottom; animation:homePalPerching 2s ease-in-out infinite; }
.room-pet-visual.home-activity-tea .pet-bob { transform-origin:center bottom; animation:homePalTea 2.4s ease-in-out infinite; }
.room-pet-visual.home-activity-dreaming .pet-bob { transform-origin:center bottom; animation:homePalDreaming 3s ease-in-out infinite; }
.room-pet-visual.home-companion-besties .pet-bob { transform-origin:center bottom; animation:homePalPlaying 1.15s ease-in-out infinite; }
.room-pet-visual.home-companion-close .pet-bob { transform-origin:center bottom; animation:homePalTea 2.1s ease-in-out infinite; }
@keyframes homePalReading { 0%,100% { transform:translateY(0) rotate(0); } 32% { transform:translateY(1px) rotate(-2deg); } 68% { transform:translateY(-1px) rotate(1deg); } }
@keyframes homePalListening { 0%,100% { transform:rotate(0); } 25% { transform:rotate(-2deg); } 75% { transform:rotate(2deg); } }
@keyframes homePalWatching { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-2px); } }
@keyframes homePalSniffing { 0%,100% { transform:translateY(0) rotate(0); } 45% { transform:translateY(1px) rotate(-3deg); } 70% { transform:translateY(-1px) rotate(1deg); } }
@keyframes homePalPlaying { 0%,100% { transform:translateY(0) scale(1); } 35% { transform:translateY(-4px) scale(1.015); } 65% { transform:translateY(0) scale(.995); } }
@keyframes homePalBasking { 0%,100% { transform:translateY(0) scale(1); } 50% { transform:translateY(-1px) scale(1.012); } }
@keyframes homePalPerching { 0%,100% { transform:translateY(0) rotate(0); } 50% { transform:translateY(-2px) rotate(1deg); } }
@keyframes homePalTea { 0%,100% { transform:translateY(0) rotate(0); } 45% { transform:translateY(-1px) rotate(-1deg); } 75% { transform:translateY(0) rotate(1deg); } }
@keyframes homePalDreaming { 0%,100% { transform:translateY(0) rotate(0); } 50% { transform:translateY(-2px) rotate(-.8deg); } }
.placed-room-decor.is-home-moment[data-home-activity="watching"] img { animation:homeDecorWatching 2.4s ease-in-out infinite; }
.placed-room-decor.is-home-moment[data-home-activity="listening"] img { animation:homeDecorListening 1.8s ease-in-out infinite; }
.placed-room-decor.is-home-moment[data-home-activity="playing"] img { animation:homeDecorPlaying 1.1s ease-in-out infinite; }
.placed-room-decor.is-home-moment[data-home-activity="reading"] img { animation:homeDecorReading 2.8s ease-in-out infinite; }
.placed-room-decor.is-home-moment[data-home-activity="sniffing"] img { animation:homeDecorSniffing 2s ease-in-out infinite; }
.placed-room-decor.is-home-moment[data-home-activity="dreaming"] img { animation:homeDecorDreaming 3s ease-in-out infinite; }
.placed-room-decor.is-home-moment[data-home-activity="basking"] img,.placed-room-decor.is-home-moment[data-home-activity="lounging"] img { animation:homeDecorBasking 3.1s ease-in-out infinite; }
.placed-room-decor.is-home-moment[data-home-activity="perching"] img { animation:homeDecorPerching 2s ease-in-out infinite; }
.placed-room-decor.is-home-moment[data-home-activity="tea"] img { animation:homeDecorTea 2.4s ease-in-out infinite; }
@keyframes homeDecorWatching { 0%,100% { transform:translateY(0) scale(1); } 50% { transform:translateY(-3px) scale(1.035); } }
@keyframes homeDecorListening { 0%,100% { transform:rotate(-2deg); } 50% { transform:rotate(2deg); } }
@keyframes homeDecorPlaying { 0%,100% { transform:translateY(0) rotate(0); } 50% { transform:translateY(-4px) rotate(2deg); } }
@keyframes homeDecorReading { 0%,100% { transform:rotate(0); } 50% { transform:rotate(-1.5deg); } }
@keyframes homeDecorSniffing { 0%,100% { transform:scale(1); } 50% { transform:scale(1.035); } }
@keyframes homeDecorDreaming { 0%,100% { transform:translateY(0); opacity:.92; } 50% { transform:translateY(-3px); opacity:1; } }
@keyframes homeDecorBasking { 0%,100% { transform:translateY(0) scale(1); } 50% { transform:translateY(-2px) scale(1.025); } }
@keyframes homeDecorPerching { 0%,100% { transform:translateY(0) rotate(0); } 50% { transform:translateY(-2px) rotate(1deg); } }
@keyframes homeDecorTea { 0%,100% { transform:translateY(0) rotate(0); } 45% { transform:translateY(-2px) rotate(-1deg); } 75% { transform:translateY(0) rotate(1deg); } }
@media(prefers-reduced-motion:reduce) {
  .room-pet-companion-badge,.room-pet-visual[class*="home-activity-"] .pet-bob,.room-pet-visual.home-companion-besties .pet-bob,.room-pet-visual.home-companion-close .pet-bob,.placed-room-decor.is-home-moment[data-home-activity] img { animation:none!important; }
}
.household-godmode-forecast { flex:0 0 auto; min-width:0; margin:0 0 7px; padding:9px 11px; border:1px solid #dfe6db; border-radius:13px; background:linear-gradient(145deg,#fbfcf7,#f4f7ef); }
.household-godmode-forecast-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.household-godmode-forecast-heading h3 { margin:0; color:#34443a; font-size:.76rem; }
.household-godmode-forecast-heading span { color:#718076; font-size:.63rem; font-weight:750; }
.household-godmode-forecast-note { margin:3px 0 7px; color:#718076; font-size:.62rem; line-height:1.35; }
.household-godmode-forecast-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; max-height:112px; overflow:auto; }
.godmode-forecast-item { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; padding:7px 9px; border:1px solid #e1e5db; border-radius:10px; background:#fffefa; color:#425046; text-align:left; cursor:pointer; }
.godmode-forecast-item:hover { border-color:#b7c9b4; background:#f9fcf5; }
.godmode-forecast-main { display:flex; flex-direction:column; min-width:0; gap:2px; }
.godmode-forecast-main strong { overflow:hidden; color:#39483e; font-size:.65rem; text-overflow:ellipsis; white-space:nowrap; }
.godmode-forecast-main small { color:#7a887e; font-size:.56rem; }
.godmode-forecast-time { flex:0 0 auto; color:#8a6749; font-size:.73rem; font-weight:850; font-variant-numeric:tabular-nums; }
.godmode-forecast-empty { grid-column:1/-1; margin:0; padding:7px 3px; color:#6c7b70; font-size:.65rem; }
@media(max-width:700px) { .household-godmode-forecast-list { grid-template-columns:1fr; max-height:105px; } .household-godmode-forecast { padding:8px; } }

/* PWA installation entry point */
.pwa-install-button { white-space: nowrap; }
.pwa-install-button[hidden] { display: none !important; }
.pwa-install-help-dialog { max-width: 430px; }
.pwa-install-help-copy { color: #81786f; line-height: 1.7; }
.pwa-install-steps { padding-left: 22px; color: #756c64; line-height: 1.9; }
.pwa-install-steps li + li { margin-top: 6px; }
@media (max-width: 720px) {
  #app > .topbar .pwa-install-button { min-height: 34px; padding: 6px 9px; font-size: 0.625rem; }
}


/* iOS PWA keyboard: constrain the app to the visual viewport and keep the
   document itself immovable. Form controls scroll only inside their own panel. */
html, body { width:100%; height:100%; overflow:hidden; overscroll-behavior:none; }
body { position:fixed; inset:0; min-height:0; }
#app.app-shell {
  top:var(--pwa-viewport-offset-top, 0px);
  height:var(--pwa-viewport-height, 100svh) !important;
  max-height:var(--pwa-viewport-height, 100svh);
  min-height:0 !important;
  overflow:hidden !important;
  overscroll-behavior:none;
}
#pet-screen.pet-screen,
#pet-screen > .stage-workbench,
#stage-workbench > .stage-world-column,
#persistent-pet-stage.persistent-pet-stage,
#persistent-pet-stage .shared-stage-layout,
#persistent-pet-stage .shared-stage-layout > .world-scene {
  max-height:var(--pwa-viewport-height, 100svh);
  overscroll-behavior:none;
}
body.keyboard-open #app.app-shell { transform:translateY(0); }
body.keyboard-open #pet-screen.pet-screen { overflow:hidden !important; }
body.keyboard-open dialog[open] {
  max-height:calc(var(--pwa-viewport-height, 100svh) - 20px);
  overscroll-behavior:contain;
}
body.keyboard-open :is(.modal-card, .stage-screen-host, .stage-journal-mount, .new-life-content) {
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  scroll-padding-block:18px;
}

/* v0.20.3.3 build 294: compact the Install action so the header remains one line. */
#app > .topbar .pwa-install-button:not([hidden]) {
  display: inline-flex;
  flex: 0 0 56px;
  width: 56px;
  min-width: 56px;
  min-height: 32px;
  justify-content: center;
  gap: 3px;
  padding: 5px 5px;
  border-radius: 10px;
  font-size: 0.5625rem;
  line-height: 1;
  white-space: nowrap;
}
@media (max-width: 760px) {
  #app > header.topbar {
    grid-template-columns: minmax(0, 1fr) max-content max-content max-content !important;
  }
  #app > header.topbar .pwa-install-button:not([hidden]) {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: center !important;
    flex-basis: 52px;
    width: 52px;
    min-width: 52px;
    min-height: 36px;
    padding: 5px 4px;
  }
  #app > header.topbar #add-pal-top:not([hidden]) { grid-column: 3 !important; }
  #app > header.topbar .stage-header-tools { grid-column: 4 !important; }
}
@media (max-width: 390px) {
  #app > header.topbar .pwa-install-button:not([hidden]) {
    flex-basis: 48px;
    width: 48px;
    min-width: 48px;
    padding-inline: 3px;
    gap: 2px;
    font-size: 0.5rem;
  }
}
@media (max-width: 340px) {
  #app > header.topbar .brand-copy { display: none; }
}


/* v0.20.4 build 295: Friend Habitat is a first-class scene in the shared
   isometric room engine, not a second scaled room layered over the Stage. */
#room-world > #friend-home-scene-content {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  isolation: isolate;
  pointer-events: none;
}
#room-world > #friend-home-scene-content[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
#world-scene.is-friend-habitat {
  border: 4px solid #a995d5;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--room-sky, #eeebfa), color-mix(in srgb, var(--room-sky, #eeebfa) 65%, white)) !important;
  box-shadow: inset 0 0 0 2px #fff9, 0 0 0 2px #a995d533;
}
#world-scene.is-friend-habitat #room-world {
  background: transparent !important;
  --iso-floor: var(--room-floor, #c6c9e2);
}
#world-scene.is-friend-habitat #room-world::before {
  display: none !important;
  content: none !important;
}
#world-scene.is-friend-habitat .room-scroll-hint {
  color: #76619c;
  border-color: #d9cdea;
  background: #fbf8ffdb;
}
#room-world > #friend-home-scene-content .park-friend-room-badge {
  position: absolute;
  z-index: 7;
  left: 15%;
  top: 7%;
  padding: 6px 10px;
  border: 1px solid #ffffffc9;
  border-radius: 999px;
  background: #ffffffdf;
  color: #76604f;
  font-size: .75rem;
  font-weight: 850;
  box-shadow: 0 2px 8px #64534616;
}
#room-world > #friend-home-scene-content .scene-decor-icon {
  z-index: 4;
  left: 70%;
  right: auto;
  top: 17%;
  bottom: auto;
  width: 96px;
  height: 96px;
}
#room-world > #friend-home-scene-content .home-decoration-layer {
  z-index: auto;
}
#room-world > #friend-home-scene-content .room-pals {
  z-index: auto;
}
#room-world > #friend-home-scene-content .friend-home-pal-entry {
  pointer-events: none;
}
#room-world > #friend-home-scene-content .friend-home-pal-entry .room-pet-button {
  pointer-events: none !important;
}
#room-world > #friend-home-scene-content .friend-home-bathroom-station {
  pointer-events: none;
}
#persistent-pet-stage .stage-household-picker.is-habitat-return .stage-household-toggle {
  max-width: min(190px, 34vw);
  min-height: 38px;
  padding-inline: 10px 13px;
  border-color: #d9cdea;
  background: linear-gradient(135deg, #fbf8ff, #f1ebfb);
  color: #6f5a91;
  box-shadow: 0 2px 8px #77629714;
}
#persistent-pet-stage .stage-household-picker.is-habitat-return .stage-household-current-avatar {
  flex-basis: 25px;
  width: 25px;
  height: 25px;
  border-color: #e9e1f5;
  background: #eee8f8;
  color: #78629b;
  font-size: 1rem;
}
#persistent-pet-stage .stage-household-picker.is-habitat-return .stage-household-toggle:hover {
  border-color: #bfaedc;
  background: #f6f1ff;
}
#stage-workbench #stage-bottom-dock > #friend-habitat-reaction-dock {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: max-content;
  max-width: calc(100vw - 20px);
  margin: 0;
  padding: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #e7def0;
  border-radius: 18px;
  background: #fffdf2ed;
  box-shadow: 0 6px 20px #53694b18, inset 0 1px #ffffff;
  -webkit-backdrop-filter: blur(13px) saturate(1.08);
  backdrop-filter: blur(13px) saturate(1.08);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}
#stage-workbench #stage-bottom-dock > #friend-habitat-reaction-dock::-webkit-scrollbar { display: none; }
#stage-workbench #stage-bottom-dock > #friend-habitat-reaction-dock[hidden] { display: none !important; }
.friend-habitat-reaction {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 98px;
  min-height: 49px;
  padding: 9px 13px;
  border: 1px solid #e8dfd3;
  border-radius: 13px;
  background: #fffdfa;
  color: #756858;
  font: inherit;
  font-size: .6875rem;
  font-weight: 850;
  white-space: nowrap;
  touch-action: manipulation;
}
.friend-habitat-reaction:hover:not(:disabled) {
  border-color: #d9cdea;
  background: #fbf8ff;
  color: #6f5a91;
}
.friend-habitat-reaction:disabled { opacity: .52; cursor: not-allowed; }
@media (max-width: 760px) {
  #stage-workbench #stage-bottom-dock > #friend-habitat-reaction-dock {
    gap: 5px;
    padding: 6px;
    max-width: calc(100vw - 14px);
  }
  .friend-habitat-reaction {
    min-width: 86px;
    min-height: 43px;
    padding: 7px 9px;
    font-size: .59375rem;
  }
  #room-world > #friend-home-scene-content .park-friend-room-badge {
    left: 10%;
    top: 6%;
    padding: 5px 8px;
    font-size: .625rem;
  }
  #room-world > #friend-home-scene-content .scene-decor-icon {
    width: 82px;
    height: 82px;
  }
}
@media (max-width: 420px) {
  #persistent-pet-stage .stage-household-picker.is-habitat-return .stage-household-toggle {
    max-width: 142px;
    padding-inline: 7px;
    gap: 5px;
    font-size: .59375rem;
  }
  .friend-habitat-reaction {
    min-width: 78px;
    padding-inline: 7px;
    font-size: .5625rem;
  }
}

/* v0.20.4.1 build 296: Friends is action-first, with shared stories grouped at the end. */
#tab-panel-friends > #friends-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}
#tab-panel-friends .friends-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: stretch;
  gap: 14px;
  margin: 14px 0;
}
#tab-panel-friends .friends-roster-section,
#tab-panel-friends .friend-habitat-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid #eee5dc;
  border-radius: 16px;
  background: linear-gradient(155deg, #fffefa, #faf7f1);
}
#tab-panel-friends .friends-roster-section .friend-list-section,
#tab-panel-friends .friends-action-grid .park-phase4-section {
  margin: 0;
}
#tab-panel-friends .friend-habitat-section .park-phase4-heading {
  margin-bottom: 12px;
}
#tab-panel-friends .friend-habitat-section .park-phase4-heading h3 {
  margin: 0;
  color: #6b584b;
  font-size: .875rem;
}
#tab-panel-friends .friend-habitat-section .park-phase4-heading p {
  margin: 4px 0 0;
  color: #988575;
  font-size: .625rem;
  line-height: 1.55;
}
#tab-panel-friends .park-habitat-visit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}
#tab-panel-friends .park-habitat-visit-form .field-label {
  grid-column: 1 / -1;
  margin: 0 0 -3px;
}
#tab-panel-friends .park-habitat-visit-form select {
  min-width: 0;
  width: 100%;
}
#tab-panel-friends .park-habitat-visit-form .button {
  min-height: 42px;
  white-space: nowrap;
}
#tab-panel-friends .friends-action-grid .friends-list { max-height: 250px; overflow: auto; }
#tab-panel-friends .friends-memories-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eee5dc;
}
#tab-panel-friends .friends-memories-panel > .friends-subheading {
  align-items: baseline;
  margin-bottom: 12px;
}
#tab-panel-friends .friends-memories-panel > .friends-subheading h3 {
  margin: 0;
  color: #715f80;
  font: 850 1rem/1.25 var(--round, inherit);
}
#tab-panel-friends .friend-memory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}
#tab-panel-friends .friend-memory-card {
  min-width: 0;
  min-height: 100%;
  padding: 12px;
  border: 1px solid #eae2ef;
  border-radius: 14px;
  background: linear-gradient(155deg, #fffefa, #faf7fc);
}
#tab-panel-friends .friend-memory-card .friends-subheading { margin-bottom: 8px; }
#tab-panel-friends .friend-memory-card .friends-subheading h4 {
  margin: 0;
  color: #715f80;
  font-size: .75rem;
}
#tab-panel-friends .friend-memory-card .friend-activity-log,
#tab-panel-friends .friend-memory-card .visit-history,
#tab-panel-friends .friend-memory-card .family-history {
  max-height: 260px;
  margin-top: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
@media (max-width: 820px) {
  #tab-panel-friends .friends-action-grid { grid-template-columns: minmax(0, 1fr); }
  #tab-panel-friends .friend-memory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #tab-panel-friends .friend-memory-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  #tab-panel-friends .friend-memory-grid { grid-template-columns: minmax(0, 1fr); }
  #tab-panel-friends .friend-memory-card:last-child { grid-column: auto; }
  #tab-panel-friends .park-habitat-visit-form { grid-template-columns: minmax(0, 1fr); }
  #tab-panel-friends .park-habitat-visit-form .field-label { grid-column: auto; }
  #tab-panel-friends .park-habitat-visit-form .button { width: 100%; }
}

/* v0.20.5.2 build 301: Extra Large text keeps the mobile brand and all header
   actions on one accessible row. Hidden controls are removed from the grid's
   auto-flow, so installed and first-run headers both stay naturally compact. */
@media (max-width: 760px) {
  html[data-a11y-text-size="extra-large"] #app > header.topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-columns: 40px !important;
    grid-auto-flow: column !important;
    grid-template-rows: 42px !important;
    align-items: center !important;
    align-content: center !important;
    column-gap: 4px !important;
    row-gap: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: max(5px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) 5px max(10px, env(safe-area-inset-left, 0px)) !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar > .brand {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    gap: 6px !important;
    overflow: hidden;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .brand-mark {
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px !important;
    border-radius: 11px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .brand-copy {
    display: flex !important;
    min-width: 0 !important;
    overflow: hidden;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .brand-copy strong {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap !important;
    font-size: clamp(.72rem, 3.5vw, .9rem) !important;
    line-height: 1.15 !important;
    letter-spacing: -.3px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .brand-copy small { display: none !important; }
  html[data-a11y-text-size="extra-large"] #app > header.topbar > .topbar-right { display: contents !important; }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .topbar-right > * {
    grid-row: 1 !important;
    grid-column: auto !important;
    justify-self: end !important;
    align-self: center !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .connection-pill,
  html[data-a11y-text-size="extra-large"] #app > header.topbar .pal-switcher { display: none !important; }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .pwa-install-button:not([hidden]) {
    display: inline-flex !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    gap: 0 !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .pwa-install-button > span,
  html[data-a11y-text-size="extra-large"] #app > header.topbar #add-pal-top > span,
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools > summary > span { display: none !important; }
  html[data-a11y-text-size="extra-large"] #app > header.topbar #add-pal-top:not([hidden]) {
    grid-column: auto !important;
    grid-row: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools {
    width: 40px !important;
    min-width: 40px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools > summary {
    display: inline-flex !important;
    justify-content: center !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    font-size: 1rem !important;
  }
}
@media (max-width: 360px) {
  html[data-a11y-text-size="extra-large"] #app > header.topbar {
    grid-auto-columns: 38px !important;
    column-gap: 3px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .brand-mark {
    width: 30px !important;
    height: 30px !important;
    flex-basis: 30px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .pwa-install-button:not([hidden]),
  html[data-a11y-text-size="extra-large"] #app > header.topbar #add-pal-top:not([hidden]),
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools,
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools > summary {
    flex-basis: 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .brand-copy strong { font-size: .7rem !important; }
}

/* v0.20.5.2 build 301: passport-first migration instructions in the Install flow. */
.pwa-install-help-dialog {
  width: min(540px, calc(100% - 24px));
  max-width: 540px;
  max-height: min(88svh, 820px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.pwa-install-help-dialog h2 { margin: 0 0 8px; }
.pwa-install-help-copy { margin: 0 0 12px; color: #81786f; font-size: .78rem; line-height: 1.6; }
.pwa-install-help-dialog h3 { margin: 0 0 7px; color: #6b5749; font: 850 .9rem/1.3 var(--round); }
.pwa-install-passport-panel,
.pwa-install-import-steps {
  margin: 12px 0;
  padding: 13px 14px;
  border: 1px solid #ead9cb;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff8ef, #fffdf8);
}
.pwa-install-passport-panel > p:not(.pwa-install-export-status) { margin: 0 0 10px; color: #796d62; font-size: .72rem; line-height: 1.6; }
.pwa-install-passport-panel .button { min-height: 42px; font-size: .75rem; }
.pwa-install-export-status,
.pwa-install-no-passport,
.pwa-install-complete-status { margin: 9px 0 0; color: #786e62; font-size: .68rem; line-height: 1.55; }
.pwa-install-no-passport { padding: 10px 12px; border-radius: 11px; background: #f3f7ef; }
.pwa-install-platform-steps { margin-top: 12px; }
.pwa-install-platform-steps h3 { margin-bottom: 5px; }
.pwa-install-steps { margin: 5px 0 9px; padding-left: 22px; color: #756c64; font-size: .74rem; line-height: 1.65; }
.pwa-install-steps li + li { margin-top: 3px; }
.pwa-install-import-steps { background: #f7f3fb; border-color: #e6dcef; }
.pwa-install-dialog-actions { margin-top: 14px; }
.pwa-install-dialog-actions .button { min-height: 44px; }
.pwa-install-complete-status { padding: 11px 12px; border-radius: 11px; background: #edf7f0; color: #547b63; font-weight: 700; }
@media (max-width: 420px) {
  .pwa-install-help-dialog { padding: 19px; border-radius: 18px; }
  .pwa-install-passport-panel, .pwa-install-import-steps { padding: 11px; }
}


/* v0.20.6 build 304: compact Godmode observatory and evolving Best Friend slots. */
.household-godmode-dialog { gap: 7px; padding: clamp(12px, 2vw, 20px); }
.household-godmode-dialog > .household-godmode-summary { font-size: .76rem; }
.household-godmode-controls { display:flex; align-items:center; gap:8px 12px; flex-wrap:wrap; padding:8px 10px; border:1px solid #e6e1d6; border-radius:12px; background:#faf9f4; }
.household-godmode-autofriend { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:3px 12px; padding:9px 11px; border:1px solid #e3e5d8; border-radius:12px; background:linear-gradient(110deg,#f7faf3,#f9f6ef); }
.household-godmode-autofriend-copy h3 { margin:0 0 2px; font-size:.82rem; }
.household-godmode-autofriend-copy p,.household-godmode-autofriend-status { margin:0; font-size:.68rem; line-height:1.35; }
.household-godmode-autofriend-status { grid-column:1/-1; }
.household-godmode-forecast { padding:9px 11px; border-radius:12px; background:#f8f7f1; }
.household-godmode-forecast-heading { margin-bottom:4px; }
.household-godmode-chart-viewport { min-height:210px; }
.household-godmode-history-section { flex:0 0 auto; display:grid; gap:5px; min-height:0; }
.household-godmode-history-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.household-godmode-history-heading h3 { margin:0; font-size:.82rem; color:#34443a; }
.godmode-history-toolbar { margin:0; gap:7px; }
.godmode-history-toolbar select { padding:5px 8px; }
.household-godmode-history { margin:0; padding:7px 10px; }
.household-godmode-history svg { min-height:88px; max-height:112px; }
.household-godmode-history-status { color:#718076; font-size:.66rem; }
.household-godmode-note { padding-top:6px; font-size:.65rem; }
.best-friends-panel { margin:8px 0 12px; padding:11px; border:1px solid #e7dfcb; border-radius:14px; background:linear-gradient(145deg,#fffaf0,#f8f7f1); }
.best-friends-panel > .friends-subheading { margin-bottom:3px; }
.best-friends-note { margin:0 0 9px; color:#788277; font-size:.65rem; line-height:1.35; }
.best-friends-list { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
.best-friend-slot { display:flex; min-width:0; min-height:112px; flex-direction:column; align-items:center; justify-content:center; gap:4px; padding:8px 5px; border:1px solid #e8dfcc; border-radius:11px; background:#fffdf8; text-align:center; }
.best-friend-slot.is-open { border-style:dashed; background:rgba(255,255,255,.48); }
.best-friend-rank { color:#9b8150; font-size:.62rem; font-weight:850; }
.best-friend-avatar { display:grid; width:44px; height:44px; place-items:center; overflow:hidden; border-radius:50%; background:#f2eee3; }
.best-friend-avatar svg { display:block; width:100%; height:100%; }
.best-friend-slot strong { max-width:100%; overflow:hidden; color:#38483d; font-size:.68rem; text-overflow:ellipsis; white-space:nowrap; }
.best-friend-slot small { color:#788277; font-size:.58rem; }
.friend-row.is-best-friend { border-color:#e5d7b7; background:linear-gradient(100deg,#fffaf0,#fffdf8); }
.best-friend-badge { display:inline-flex; width:max-content; margin-top:3px; padding:2px 6px; border:1px solid #e4d3a8; border-radius:999px; background:#fff5d9; color:#876a32; font-size:.58rem; font-weight:800; }
@media(max-width:700px) {
  .household-godmode-dialog { gap:6px; }
  .household-godmode-chart-viewport { min-height:185px; }
  .household-godmode-history svg { min-height:76px; }
  .household-godmode-autofriend { grid-template-columns:minmax(0,1fr); }
  .household-godmode-autofriend-status { grid-column:auto; }
  .best-friends-list { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:380px) { .best-friends-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }


/* v0.20.6.1 build 305: give Add Pal a real mobile label slot, and anchor the
   Stage HUD to the measured header instead of the obsolete 112px XL offset. */
.stage-header-tools-footer {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 8px 4px 2px;
  border-top: 1px solid #eee6dc;
  color: #a39487;
  font-size: .55rem;
  font-weight: 750;
  letter-spacing: .045em;
  line-height: 1.35;
  text-align: center;
}
@media (max-width: 760px) {
  #app > header.topbar {
    grid-template-columns: minmax(0, 1fr) 82px 42px !important;
    grid-template-rows: 46px !important;
    grid-auto-flow: row !important;
    grid-auto-columns: initial !important;
    align-items: center !important;
    align-content: center !important;
    column-gap: 6px !important;
    row-gap: 0 !important;
    height: auto !important;
    min-height: 54px !important;
    padding: max(5px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) 5px max(10px, env(safe-area-inset-left, 0px)) !important;
  }
  #app > header.topbar > .brand { grid-column: 1 !important; grid-row: 1 !important; min-width: 0 !important; max-width: 100% !important; }
  #app > header.topbar > .topbar-right { display: contents !important; }
  #app > header.topbar .connection-pill,
  #app > header.topbar .pal-switcher { display: none !important; }
  #app > header.topbar #add-pal-top:not([hidden]) {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: stretch !important;
    align-self: center !important;
    display: inline-flex !important;
    flex: 0 0 82px !important;
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 6px 7px !important;
    gap: 4px !important;
    font-size: clamp(.78rem, 3.4vw, .9rem) !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  #app > header.topbar #add-pal-top:not([hidden]) > span {
    display: inline !important;
    min-width: 0 !important;
    font-size: inherit !important;
    line-height: inherit !important;
    white-space: nowrap !important;
  }
  #app > header.topbar .stage-header-tools { grid-column: 3 !important; grid-row: 1 !important; width: 42px !important; min-width: 42px !important; justify-self: end !important; }
  #app > header.topbar .stage-header-tools > summary {
    display: inline-flex !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    justify-content: center !important;
    font-size: 1.15rem !important;
  }
  #app > header.topbar:has(.pwa-install-button:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) 48px 82px 42px !important;
  }
  #app > header.topbar .pwa-install-button:not([hidden]) {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: center !important;
    flex: 0 0 48px !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 3px !important;
    font-size: .7rem !important;
  }
  #app > header.topbar:has(.pwa-install-button:not([hidden])) #add-pal-top:not([hidden]) { grid-column: 3 !important; }
  #app > header.topbar:has(.pwa-install-button:not([hidden])) .stage-header-tools { grid-column: 4 !important; }
  #persistent-pet-stage .stage-top-bar {
    top: var(--stage-top-offset, calc(62px + env(safe-area-inset-top, 0px))) !important;
  }
}
@media (max-width: 420px) {
  #app > header.topbar { column-gap: 5px !important; }
  #app > header.topbar #add-pal-top:not([hidden]) {
    width: 78px !important; min-width: 78px !important; max-width: 78px !important; flex-basis: 78px !important;
    padding-inline: 6px !important;
    font-size: clamp(.75rem, 3.5vw, .86rem) !important;
  }
  #app > header.topbar:has(.pwa-install-button:not([hidden])) { grid-template-columns: minmax(0, 1fr) 44px 78px 40px !important; }
  #app > header.topbar .pwa-install-button:not([hidden]) { width: 44px !important; min-width: 44px !important; max-width: 44px !important; flex-basis: 44px !important; }
  #app > header.topbar .stage-header-tools,
  #app > header.topbar .stage-header-tools > summary { width: 40px !important; min-width: 40px !important; max-width: 40px !important; }
  #app > header.topbar:has(.pwa-install-button:not([hidden])) #add-pal-top:not([hidden]) { grid-column: 3 !important; }
  #app > header.topbar:has(.pwa-install-button:not([hidden])) .stage-header-tools { grid-column: 4 !important; }
}
@media (max-width: 360px) {
  #app > header.topbar { grid-template-columns: minmax(0, 1fr) 74px 38px !important; column-gap: 4px !important; }
  #app > header.topbar #add-pal-top:not([hidden]) { width: 74px !important; min-width: 74px !important; max-width: 74px !important; flex-basis: 74px !important; font-size: .72rem !important; }
  #app > header.topbar:has(.pwa-install-button:not([hidden])) { grid-template-columns: minmax(0, 1fr) 40px 74px 38px !important; }
  #app > header.topbar .pwa-install-button:not([hidden]) { width: 40px !important; min-width: 40px !important; max-width: 40px !important; flex-basis: 40px !important; }
  #app > header.topbar .stage-header-tools,
  #app > header.topbar .stage-header-tools > summary { width: 38px !important; min-width: 38px !important; max-width: 38px !important; }
}
html[data-a11y-text-size="extra-large"] #app > header.topbar #add-pal-top:not([hidden]) > span { display: inline !important; }

/* v0.20.6.1 build 305: final high-specificity mobile corrections for XL text.
   Add Pal gets a real label-sized slot, and the Stage rail uses the measured
   header offset rather than the legacy 112px accessibility fallback. */
@media (max-width: 760px) {
  html[data-a11y-text-size="extra-large"] #app > header.topbar {
    grid-template-columns: minmax(0, 1fr) 82px 42px !important;
    grid-template-rows: 46px !important;
    grid-auto-columns: initial !important;
    grid-auto-flow: row !important;
    align-items: center !important;
    align-content: center !important;
    column-gap: 6px !important;
    row-gap: 0 !important;
    height: auto !important;
    min-height: 54px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar:has(.pwa-install-button:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) 44px 82px 42px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar > .brand {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar #add-pal-top:not([hidden]) {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: stretch !important;
    align-self: center !important;
    flex: 0 0 82px !important;
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 5px 6px !important;
    gap: 3px !important;
    font-size: clamp(.58rem, 3.4vw, .72rem) !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar #add-pal-top:not([hidden]) > span {
    display: inline !important;
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: inherit !important;
    line-height: inherit !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar:has(.pwa-install-button:not([hidden])) #add-pal-top:not([hidden]) {
    grid-column: 3 !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .pwa-install-button:not([hidden]) {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    flex: 0 0 44px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools {
    grid-column: 3 !important;
    grid-row: 1 !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools > summary {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar:has(.pwa-install-button:not([hidden])) .stage-header-tools {
    grid-column: 4 !important;
  }
  html[data-a11y-text-size="extra-large"] #persistent-pet-stage .stage-top-bar {
    top: var(--stage-top-offset, calc(8px + env(safe-area-inset-top, 0px))) !important;
  }
}
@media (max-width: 420px) {
  html[data-a11y-text-size="extra-large"] #app > header.topbar {
    grid-template-columns: minmax(0, 1fr) 78px 40px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar:has(.pwa-install-button:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) 42px 78px 40px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar #add-pal-top:not([hidden]) {
    flex-basis: 78px !important;
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .pwa-install-button:not([hidden]) {
    flex-basis: 42px !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools,
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools > summary {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
  }
}
@media (max-width: 360px) {
  html[data-a11y-text-size="extra-large"] #app > header.topbar {
    grid-template-columns: minmax(0, 1fr) 72px 38px !important;
    column-gap: 4px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar:has(.pwa-install-button:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) 40px 72px 38px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar #add-pal-top:not([hidden]) {
    flex-basis: 72px !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .pwa-install-button:not([hidden]) {
    flex-basis: 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools,
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools > summary {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
  }
}

/* v0.20.6.1 build 305: accessibility-specific overrides must outrank the
   earlier compact-icon rules, so Add Pal remains a legible, usable control. */
@media (max-width: 760px) {
  html[data-a11y-text-size="extra-large"] #app > header.topbar {
    grid-template-columns: minmax(0, 1fr) 82px 42px !important;
    grid-template-rows: 46px !important;
    grid-auto-flow: row !important;
    grid-auto-columns: initial !important;
    align-items: center !important;
    align-content: center !important;
    column-gap: 6px !important;
    row-gap: 0 !important;
    min-height: 54px !important;
    height: auto !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar:has(.pwa-install-button:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) 44px 82px 42px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar #add-pal-top:not([hidden]) {
    grid-column: 2 !important;
    grid-row: 1 !important;
    flex: 0 0 82px !important;
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 5px 6px !important;
    gap: 3px !important;
    font-size: clamp(.58rem, 3.4vw, .72rem) !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar #add-pal-top:not([hidden]) > span {
    display: inline !important;
    font-size: inherit !important;
    line-height: inherit !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar:has(.pwa-install-button:not([hidden])) #add-pal-top:not([hidden]) {
    grid-column: 3 !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .pwa-install-button:not([hidden]) {
    grid-column: 2 !important;
    grid-row: 1 !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools {
    grid-column: 3 !important;
    grid-row: 1 !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools > summary {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar:has(.pwa-install-button:not([hidden])) .stage-header-tools {
    grid-column: 4 !important;
  }
  html[data-a11y-text-size="extra-large"] #persistent-pet-stage .stage-top-bar {
    top: var(--stage-top-offset, calc(8px + env(safe-area-inset-top, 0px))) !important;
  }
}
@media (max-width: 420px) {
  html[data-a11y-text-size="extra-large"] #app > header.topbar {
    grid-template-columns: minmax(0, 1fr) 78px 40px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar:has(.pwa-install-button:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) 42px 78px 40px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar #add-pal-top:not([hidden]) {
    flex-basis: 78px !important;
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .pwa-install-button:not([hidden]) {
    flex-basis: 42px !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools,
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools > summary {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
  }
}
@media (max-width: 360px) {
  html[data-a11y-text-size="extra-large"] #app > header.topbar {
    grid-template-columns: minmax(0, 1fr) 72px 38px !important;
    column-gap: 4px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar:has(.pwa-install-button:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) 40px 72px 38px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar #add-pal-top:not([hidden]) {
    flex-basis: 72px !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .pwa-install-button:not([hidden]) {
    flex-basis: 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
  }
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools,
  html[data-a11y-text-size="extra-large"] #app > header.topbar .stage-header-tools > summary {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
  }
}

/* v0.20.6.2 build 306: custom Arrange Room pointer dragging must never be
   replaced by WebKit's native image drag operation. */
#world-scene.is-decorating .home-decor-card,
#world-scene.is-decorating .home-decor-card *,
#world-scene.is-decorating .placed-room-decor,
#world-scene.is-decorating .placed-room-decor * {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Super Nanny: a household-wide service, not a replacement for player bonding. */
.super-nanny-card { margin: 0 0 16px; padding: clamp(18px, 2.4vw, 26px); border: 1px solid #e7d8c9; border-radius: 20px; background: linear-gradient(135deg, #fffaf1 0%, #f7f0e7 100%); color: var(--ink); }
.super-nanny-card .section-heading { margin-bottom: 14px; }
.nanny-stamp { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 16px; background: #f2e4d5; font-size: 1.5rem; }
.nanny-status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border-radius: 13px; background: #fffdf9; }
.nanny-status-row > div, .nanny-schedule-toggle > span { display: grid; gap: 3px; min-width: 0; }
.nanny-status-row strong { font-size: 0.8125rem; }
.nanny-status-row small, .nanny-schedule-toggle small { color: #897a6e; font-size: 0.625rem; line-height: 1.5; }
.nanny-balance { flex: 0 0 auto; color: #7d6748; font-size: 0.75rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.nanny-controls-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.nanny-field { display: grid; gap: 6px; color: #76685d; font-size: 0.625rem; font-weight: 750; }
.nanny-field input, .nanny-field select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #e3d5c7; border-radius: 10px; background: #fffdfa; color: var(--ink); font: inherit; font-size: 0.75rem; }
.nanny-schedule-toggle { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #eadfd3; border-radius: 12px; background: #fffdf9; cursor: pointer; }
.nanny-schedule-toggle input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #8b987b; }
.nanny-schedule-toggle strong { font-size: 0.75rem; line-height: 1.4; }
.nanny-action-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.nanny-action-row .button { flex: 1 1 170px; min-height: 42px; }
.nanny-feedback { margin: 11px 0 0; color: #857769; font-size: 0.625rem; line-height: 1.55; }
@media (max-width: 480px) { .nanny-controls-grid { grid-template-columns: 1fr; } .nanny-status-row { align-items: flex-start; } }


/* v0.21.6.3 build 317: Invite Back uses a current household anchor when a released Pal passport is known stale. */
.nanny-management-dialog { width: min(540px, calc(100% - 28px)); max-height: min(88svh, 760px); overflow: auto; padding: clamp(16px, 3vw, 24px); }
.nanny-management-dialog .modal-top { margin-bottom: 10px; }
.nanny-management-dialog .super-nanny-card { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.nanny-management-dialog .super-nanny-card .section-heading { margin-bottom: 13px; }
.nanny-management-dialog .nanny-feedback { min-height: 2.8em; }
.stage-nanny-toggle { white-space: nowrap; }
@media (max-width: 480px) {
  .nanny-management-dialog { width: calc(100% - 20px); max-height: min(90svh, 760px); padding: 15px; }
  .nanny-management-dialog .nanny-action-row { flex-direction: column; }
  .nanny-management-dialog .nanny-action-row .button { flex-basis: auto; width: 100%; }
}


/* Pre-beta tester programme: compact, readable and visually separate from gameplay. */
.beta-programme-card { max-width: 1180px; margin: 16px auto 0; padding: clamp(17px, 2.2vw, 25px); background: linear-gradient(145deg, #fffdfa, #f7faf4); border-color: #e2eadb; }
.beta-programme-status { margin: 12px 0; padding: 10px 12px; border-radius: 12px; background: rgba(105, 137, 91, .09); color: #52694a; font-size: .82rem; line-height: 1.5; }
.beta-programme-controls, .beta-feedback-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.beta-inbox-section, .beta-feedback-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid #e5eadf; }
.beta-announcements { display: grid; gap: 10px; }
.beta-announcement { padding: 13px 14px; border: 1px solid #e4eadf; border-radius: 13px; background: rgba(255,255,255,.75); }
.beta-announcement h4 { margin: 0 0 6px; color: #344a35; font-size: .95rem; }
.beta-announcement p { margin: 0 0 8px; white-space: pre-wrap; line-height: 1.55; font-size: .85rem; }
.beta-announcement small, .beta-push-controls small { color: #817a70; font-size: .72rem; }
.beta-announcement .text-button { display: block; margin-top: 7px; }
.beta-feedback-updates-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid #e5eadf; }
.beta-feedback-updates { display: grid; gap: 10px; }
.beta-feedback-update.is-unread { border-color: #b9cfae; box-shadow: inset 3px 0 #88ac78; }
.beta-feedback-update .beta-read-state { display: inline-block; margin-top: 7px; color: #8a8579; }

.beta-read-state { display: inline-block; margin-top: 5px; color: #66805d !important; }
.beta-push-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 13px; padding: 12px; border-radius: 12px; background: #f3f6ee; }
.beta-push-controls > span { display: grid; gap: 3px; }
.beta-push-controls > div { display: flex; flex-wrap: wrap; gap: 7px; }
.beta-feedback-form { display: grid; gap: 9px; }
.beta-feedback-form label { margin-top: 4px; color: #514d43; font-size: .78rem; font-weight: 700; }
.beta-feedback-form select, .beta-feedback-form textarea { width: 100%; max-width: 100%; border: 1px solid #d8dfd1; border-radius: 11px; padding: 10px 12px; background: #fff; color: #393a32; font: inherit; font-size: .86rem; }
.beta-feedback-form textarea { min-height: 105px; resize: vertical; line-height: 1.5; }
.beta-feedback-actions { justify-content: space-between; }
.beta-feedback-actions small { color: #8b8378; font-size: .72rem; }
@media(max-width:620px) { .beta-programme-card { padding: 16px 13px; } .beta-push-controls { align-items: stretch; flex-direction: column; } .beta-push-controls .button { width: 100%; } .beta-programme-controls .button { flex: 1 1 100%; } }

/* v0.22.6 build 329: Beta is a first-class destination in the world dock. */
#stage-workbench #pet-tabs .beta-dock-tab {
  border-color: #d9d0e8;
  background: linear-gradient(145deg, #fbf8ff, #f5f0fc);
  color: #66537d;
}
#stage-workbench #pet-tabs .beta-dock-tab .pet-tab-icon { color: #8870a7; }
#stage-workbench #pet-tabs .beta-dock-tab[aria-selected="true"],
#stage-workbench #pet-tabs .beta-dock-tab.is-active {
  border-color: #bca9d5;
  background: #eee7f7;
  color: #503d69;
}
.beta-dock-label { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.beta-dock-unread:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #d97866;
  color: white;
  font-size: .48rem;
  font-weight: 900;
  line-height: 1;
}
body > #stage-fullscreen-view .stage-screen-host > #tab-panel-beta {
  width: min(100%, 980px) !important;
  max-width: 980px !important;
  margin: 0 auto !important;
}
#tab-panel-beta .beta-programme-card {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: clamp(16px, 2vw, 24px);
}
#tab-panel-beta .beta-programme-heading { align-items: flex-start; margin-bottom: 12px; }
#tab-panel-beta .beta-programme-status { margin: 10px 0 9px; }
#tab-panel-beta .beta-programme-head-actions { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
#tab-panel-beta .beta-state-panel,
#tab-panel-beta .beta-member-settings,
#tab-panel-beta .beta-feedback-section {
  margin-top: 14px;
  padding: clamp(13px, 1.7vw, 19px);
  border: 1px solid #e6e1d8;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
}
#tab-panel-beta .beta-state-panel[hidden],
#tab-panel-beta .beta-member-section[hidden],
#tab-panel-beta .beta-inbox-section[hidden] { display: none !important; }
#tab-panel-beta .beta-state-heading { display: flex; align-items: flex-start; gap: 12px; }
#tab-panel-beta .beta-state-heading h3 { margin: 0 0 5px; color: #4b5144; font-size: .98rem; }
#tab-panel-beta .beta-state-heading p { margin: 0; color: #79776c; font-size: .8rem; line-height: 1.55; }
#tab-panel-beta .beta-state-icon {
  display: inline-flex; flex: 0 0 38px; width: 38px; height: 38px;
  align-items: center; justify-content: center; border-radius: 12px;
  background: #f0ebf7; color: #78628f; font-size: 1.05rem;
}
#tab-panel-beta .beta-optin-section .beta-programme-controls { margin-top: 13px; }
#tab-panel-beta .beta-optin-section .button:disabled { opacity: .72; cursor: not-allowed; }
#tab-panel-beta .beta-setting-note { margin: 10px 0 0; color: #898477; font-size: .72rem; line-height: 1.5; }
#tab-panel-beta .beta-member-section { display: grid; gap: 12px; margin-top: 14px; }
#tab-panel-beta .beta-member-welcome { padding: 14px 15px; border: 1px solid #dce9d8; border-radius: 15px; background: #f6faf2; }
#tab-panel-beta .beta-inbox-section { margin-top: 0; padding-top: 12px; border-top: 1px solid #e8e4dc; }
#tab-panel-beta .beta-inbox-section .economy-subheading { margin-bottom: 10px; }
#tab-panel-beta .beta-announcements { display: grid; gap: 10px; }
#tab-panel-beta .beta-announcement { padding: 13px 14px; border: 1px solid #e5e7dd; border-radius: 13px; background: #fffefa; }
#tab-panel-beta .beta-announcement h4 { margin: 0 0 6px; font-size: .9rem; color: #45513f; }
#tab-panel-beta .beta-announcement p { margin: 0 0 8px; white-space: pre-wrap; font-size: .82rem; line-height: 1.55; }
#tab-panel-beta .beta-announcement small { color: #8a8579; font-size: .69rem; }
#tab-panel-beta .beta-feedback-updates-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e8e4dc; }
#tab-panel-beta .beta-feedback-updates { display: grid; gap: 9px; }
#tab-panel-beta .beta-feedback-update.is-unread { border-color: #c2d4b5; box-shadow: inset 3px 0 #91ad7b; }

#tab-panel-beta .beta-member-settings { margin-top: 0; }
#tab-panel-beta .beta-member-settings .economy-subheading { margin-bottom: 10px; }
#tab-panel-beta .beta-push-controls { margin-top: 0; }
#tab-panel-beta .beta-withdraw-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 13px; border-top: 1px solid #ece7de;
}
#tab-panel-beta .beta-withdraw-row > div { display: grid; gap: 3px; min-width: 0; }
#tab-panel-beta .beta-withdraw-row strong { color: #625b50; font-size: .78rem; }
#tab-panel-beta .beta-withdraw-row small { color: #8a8478; font-size: .7rem; line-height: 1.45; }
#tab-panel-beta .beta-feedback-section { margin-top: 14px; }
#tab-panel-beta .beta-feedback-form { margin: 0; padding: 0; border: 0; }
#tab-panel-beta .beta-feedback-form .economy-subheading { margin-bottom: 2px; }
#tab-panel-beta .beta-feedback-form .economy-hint { margin: 0 0 2px; }
@media (max-width: 620px) {
  #tab-panel-beta .beta-programme-card { padding: 13px 11px; }
  #tab-panel-beta .beta-state-heading { gap: 9px; }
  #tab-panel-beta .beta-withdraw-row { align-items: stretch; flex-direction: column; }
  #tab-panel-beta .beta-withdraw-row .button { width: 100%; }
  #tab-panel-beta .beta-programme-controls .button { flex: 1 1 100%; width: 100%; }
}

/* v0.22.7.2 build 334: a small Programs by Josh maker modal with the existing household tools kept close at hand. */
dialog.programs-by-josh-dialog {
  width: min(980px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: min(92vh, 820px);
  max-height: min(92svh, 820px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 30px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
dialog.programs-by-josh-dialog::backdrop {
  background: rgba(49, 42, 38, .58);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.pbj-maker-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(245px, .48fr);
  align-items: center;
  gap: clamp(22px, 4vw, 52px);
  min-height: 270px;
  padding: clamp(30px, 5vw, 58px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 30px;
  background: linear-gradient(120deg, #fbe8dc 0%, #ece6f8 58%, #e5f1e8 100%);
  box-shadow: 0 22px 70px rgba(69, 51, 38, .12);
  color: #332e2b;
}
.pbj-maker-copy { position: relative; z-index: 1; max-width: 660px; }
.pbj-maker-eyebrow {
  margin: 0 0 .75rem;
  color: #796f68;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .18em;
  line-height: 1.4;
}
.pbj-maker-copy h2 {
  margin: 0;
  color: #332e2b;
  font-family: var(--round);
  font-size: clamp(2rem, 4.3vw, 3.05rem);
  font-weight: 950;
  letter-spacing: -.065em;
  line-height: 1.04;
}
.pbj-maker-copy > p:last-child {
  max-width: 48rem;
  margin: 1.1rem 0 0;
  color: #756b64;
  font-size: clamp(.98rem, 1.65vw, 1.18rem);
  font-weight: 600;
  line-height: 1.6;
}
.pbj-maker-actions {
  position: relative;
  z-index: 1;
  display: grid;
  justify-self: end;
  gap: 12px;
  width: min(100%, 320px);
  padding-top: 10px;
}
.pbj-maker-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 13px 20px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
  background: #fffdf8;
  color: #65584e;
  box-shadow: 0 7px 22px rgba(71, 52, 38, .09);
  font-family: var(--round);
  font-size: clamp(.9rem, 1.35vw, 1.05rem);
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, color .16s ease;
}
.pbj-maker-action span { flex: 0 0 auto; font-size: 1.15em; }
.pbj-maker-action:hover { transform: translateY(-2px); color: #c86f5b; box-shadow: 0 11px 27px rgba(71, 52, 38, .13); }
.pbj-maker-support { background: rgba(255, 253, 248, .78); border-color: rgba(255, 255, 255, .76); }
.pbj-maker-support span { color: #d98278; }
.pbj-maker-close {
  position: absolute;
  z-index: 3;
  top: 13px;
  right: 13px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(112, 91, 79, .12);
  border-radius: 50%;
  background: rgba(255, 253, 248, .78);
  color: #786c64;
  font-size: 1.35rem;
  box-shadow: 0 3px 10px rgba(71, 52, 38, .07);
}
.pbj-maker-close:hover { background: #fffdf8; color: #c86f5b; }
.pbj-household-tools {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #eadfd5;
  border-radius: 16px;
  background: rgba(255, 253, 250, .97);
  box-shadow: 0 8px 24px rgba(69, 51, 38, .07);
}
.pbj-household-tools > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 11px 16px;
  color: #71645b;
  font-family: var(--round);
  font-size: .78rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}
.pbj-household-tools > summary::-webkit-details-marker { display: none; }
.pbj-household-tools > summary::after { content: "＋"; color: #9a887d; font-size: 1rem; }
.pbj-household-tools[open] > summary::after { content: "−"; }
.pbj-household-tools > summary small { margin-left: auto; color: #a2978e; font-family: var(--sans); font-size: .65rem; font-weight: 600; }
.programs-by-josh-dialog .stage-header-tools-menu {
  position: static;
  z-index: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: auto;
  padding: 12px;
  border: 0;
  border-top: 1px solid #f0e8df;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.programs-by-josh-dialog .stage-header-tools-menu .button {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: .68rem;
}
.programs-by-josh-dialog .stage-header-tools-menu .park-diagnostics-control { grid-column: 1 / -1; }
.programs-by-josh-dialog .stage-header-tools-menu .park-diagnostics-popover { z-index: 5; }
.programs-by-josh-dialog .stage-header-tools-footer { padding-top: 10px; }
@media (max-width: 680px) {
  dialog.programs-by-josh-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); border-radius: 23px; }
  .pbj-maker-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    min-height: 0;
    padding: 34px 22px 24px;
    border-radius: 23px;
  }
  .pbj-maker-copy h2 { max-width: 14ch; font-size: clamp(2rem, 9vw, 2.75rem); }
  .pbj-maker-copy > p:last-child { margin-top: .8rem; font-size: .96rem; }
  .pbj-maker-actions { justify-self: stretch; width: 100%; padding-top: 0; }
  .pbj-maker-action { min-height: 54px; padding: 12px 17px; font-size: .95rem; }
  .pbj-household-tools > summary { align-items: flex-start; flex-wrap: wrap; }
  .pbj-household-tools > summary small { order: 2; flex-basis: 100%; margin: -5px 0 0; }
  .programs-by-josh-dialog .stage-header-tools-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .programs-by-josh-dialog .stage-header-tools-menu { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .pbj-maker-action { transition: none; }
  .pbj-maker-action:hover { transform: none; }
}

/* v0.22.9.2 build 338: feedback privacy guard refinement. */
.stage-header-tools-menu .support-programs-menu-button {
  margin-top: 3px; padding-top: 10px; border-top: 1px solid #eee5dc; color: #87634e; font-weight: 850;
}
.stage-header-tools-menu .support-programs-menu-button:hover { background: #fff5ec; border-color: #ead7c8; color: #b56d5a; }


/* v0.22.9.4 build 340: first-time guidance and readable beta-ready help. */
.help-first-steps { padding: clamp(16px, 2.5vw, 24px); background: linear-gradient(145deg, #fffdf7, #f1f7ef 58%, #f8f1fb); }
.help-first-steps > h3 { margin: 3px 0 5px; color: #5f5048; font-size: clamp(1.1875rem, 2.5vw, 1.4375rem); }
.help-first-steps .help-step-list { margin-top: 14px; }
.help-first-steps .help-step-list p { font-size: 0.875rem; line-height: 1.6; }
.help-first-steps .help-step-list h4 { font-size: 0.9375rem; }
.help-first-steps .help-note { margin-top: 14px !important; font-size: 0.875rem; line-height: 1.6; }
#tab-panel-help .help-step-list p { font-size: 0.875rem; line-height: 1.6; }
#tab-panel-help .help-step-list h4 { font-size: 0.9375rem; }
#tab-panel-help .help-controls-grid strong { font-size: 0.8125rem; }
#tab-panel-help .help-controls-grid p,
#tab-panel-help .help-feature-list p,
#tab-panel-help .help-genetics-grid p,
#tab-panel-help .help-trait-list li > span { font-size: 0.8125rem; line-height: 1.6; }
#tab-panel-help .help-lineage-grid span { font-size: 0.8125rem; }
#tab-panel-help .help-notification-nudge p { font-size: 0.75rem; line-height: 1.55; }
#tab-panel-help .help-first-steps .help-step-number { width: 32px; height: 32px; font-size: 0.875rem; }
.gameplay-guide-progress { height: 5px; margin: 0 0 11px; overflow: hidden; border-radius: 999px; background: #eadfd5; }
.gameplay-guide-progress > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e9a18b, #a9c8a2); transition: width .18s ease; }
.gameplay-guide-step { font-size: 0.6875rem; letter-spacing: .08em; }
.gameplay-guide h2 { font-size: 1.0625rem; }
.gameplay-guide p { font-size: 0.875rem; line-height: 1.55; }
.gameplay-guide-actions .button { font-size: 0.75rem; min-height: 38px; }
.egg-grid .species-option { min-height: 104px; }
.egg-grid .species-option small { font-size: 0.6875rem; line-height: 1.3; min-height: 2.6em; color: #76695f; }
@media (max-width: 720px) {
  .egg-grid .species-option { min-height: 108px; }
  .egg-grid .species-option small { font-size: 0.625rem; }
  #tab-panel-help .help-first-steps .help-step-list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .gameplay-guide-progress > span { transition: none; }
}


/* B01 build 347: restore the cloud save indicator on mobile without squeezing
   the brand, Install, Add Pal, or Tools controls. It occupies a slim second
   header row aligned to the right; stage HUD placement measures the taller
   header automatically. */
@media (max-width: 760px) {
  #app > header.topbar {
    grid-template-rows: 46px 27px !important;
    row-gap: 2px !important;
    padding-bottom: 6px !important;
  }
  #app > header.topbar .connection-pill {
    display: inline-flex !important;
    position: static !important;
    grid-column: 2 / -1 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    align-self: center !important;
    width: max-content !important;
    max-width: min(100%, 154px) !important;
    min-width: 0 !important;
    min-height: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 2px 8px !important;
    gap: 6px !important;
    font-size: .625rem !important;
    line-height: 1 !important;
  }
  #app > header.topbar .connection-pill > span {
    display: inline-block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  #app > header.topbar .connection-pill > i { flex: 0 0 6px !important; }
}
@media (max-width: 420px) {
  #app > header.topbar .connection-pill {
    max-width: min(100%, 142px) !important;
    font-size: .6rem !important;
  }
}
html[data-a11y-text-size="extra-large"] #app > header.topbar {
  grid-template-rows: 46px 27px !important;
  row-gap: 2px !important;
  padding-bottom: 6px !important;
}
html[data-a11y-text-size="extra-large"] #app > header.topbar .connection-pill {
  display: inline-flex !important;
  grid-column: 2 / -1 !important;
  grid-row: 2 !important;
  justify-self: end !important;
  align-self: center !important;
  width: max-content !important;
  max-width: min(100%, 154px) !important;
  min-width: 0 !important;
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px 8px !important;
  font-size: .625rem !important;
}

/* Beta-only public invitation injected by the beta Worker after the app header. */
.beta-discovery-banner{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:0 auto 1rem;padding:.7rem 1rem;max-width:1480px;border:1px solid rgba(201,125,101,.28);border-radius:15px;background:linear-gradient(110deg,rgba(255,244,231,.96),rgba(239,232,251,.92));color:#665248;font-size:.9rem;line-height:1.4;box-shadow:0 5px 18px rgba(92,64,47,.05)}
.beta-discovery-banner p{margin:0;min-width:0}.beta-discovery-banner strong{color:#a85d4d;font-weight:850}.beta-discovery-banner a{display:inline-flex;align-items:center;gap:.35rem;flex:none;color:#965849;font-weight:800;text-decoration:none}.beta-discovery-banner a:hover{text-decoration:underline;text-underline-offset:3px}
@media(max-width:640px){.beta-discovery-banner{align-items:flex-start;flex-direction:column;gap:.25rem;margin:0 .65rem .75rem;padding:.65rem .8rem;font-size:.82rem}}

#tab-panel-beta .beta-feedback-updates-section[hidden] { display: none !important; }

#tab-panel-beta .beta-feedback-context { display: block; color: var(--muted, #7a887b); font-size: .78rem; line-height: 1.35; margin-top: 6px; overflow-wrap: anywhere; }

/* v0.24.0.9 build 375: resilient iOS queue event reconnection. */
.advibes-toast-region {
  position: fixed;
  z-index: 19990;
  left: max(16px, env(safe-area-inset-left, 0px));
  bottom: var(--toast-bottom-clearance, calc(100px + env(safe-area-inset-bottom, 0px)));
  width: min(390px, calc(100vw - 32px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.advibes-toast-region[hidden] { display: none !important; }
.advibes-toast-region.is-visible { opacity: 1; transform: translateY(0); }
.advibes-toast-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 10px 13px;
  overflow: hidden;
  border: 1px solid #e5dece;
  border-radius: 15px;
  background: linear-gradient(125deg, #fffefa, #f5f8ed 72%, #f8f2ff);
  box-shadow: 0 9px 28px #45483b2b, inset 0 1px #ffffff;
  color: #514a40;
  pointer-events: auto;
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}
.advibes-toast-art {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid #eee6d8;
  border-radius: 11px;
  background: #fff9ee;
  color: #836b5a;
  font-size: 1.2rem;
}
.advibes-toast-art img { width: 100%; height: 100%; object-fit: cover; }
.advibes-toast-copy { min-width: 0; }
.advibes-toast-attribution { margin: 0 0 3px; color: #78875f; font-size: .48rem; font-weight: 900; letter-spacing: .09em; }
.advibes-toast-title { display: block; overflow: hidden; color: #594e43; font-size: .72rem; font-weight: 850; line-height: 1.25; text-overflow: ellipsis; }
.advibes-toast-description { display: -webkit-box; margin: 3px 0 0; overflow: hidden; color: #807669; font-size: .59rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.advibes-toast-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 6px 9px;
  border: 1px solid #d9d0e8;
  border-radius: 9px;
  background: #f7f1ff;
  color: #685482;
  font-size: .57rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}
.advibes-toast-action:hover { background: #fff; border-color: #c9b7e2; }
.advibes-toast-action:focus-visible,
.advibes-toast-dismiss:focus-visible { outline: 2px solid #8a71ae; outline-offset: 2px; }
.advibes-toast-dismiss {
  display: grid;
  place-items: center;
  align-self: start;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f0ece4;
  color: #6f665a;
  font: 700 1.15rem/1 var(--round);
  cursor: pointer;
}
.advibes-toast-dismiss:hover { background: #e7e0d4; color: #3f392f; }
.advibes-toast-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #e9e5ef;
}
.advibes-toast-progress::after {
  display: block;
  width: 100%;
  height: 100%;
  background: #a995c4;
  content: '';
  transform-origin: left center;
  animation: advibes-toast-countdown 15s linear forwards;
}
@keyframes advibes-toast-countdown { to { transform: scaleX(0); } }
@media (max-width: 560px) {
  .advibes-toast-region { right: max(9px, env(safe-area-inset-right, 0px)); left: max(9px, env(safe-area-inset-left, 0px)); width: auto; }
  .advibes-toast-card { grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 7px; padding: 8px 8px 11px; border-radius: 13px; }
  .advibes-toast-art { width: 40px; height: 40px; border-radius: 9px; }
  .advibes-toast-title { font-size: .66rem; }
  .advibes-toast-description { font-size: .54rem; }
  .advibes-toast-action { min-height: 29px; padding: 5px 7px; font-size: .52rem; }
  .advibes-toast-dismiss { width: 25px; height: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .advibes-toast-region { transition: none; }
  .advibes-toast-progress::after { animation: none; }
}
