: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:14px;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:23px;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:21px;font-weight:900;letter-spacing:-.8px}.brand-copy small{font-size:8px;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:11px;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:12px}.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:12px}.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:13px}.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:20px}.loading-orbit span:nth-child(2){color:#bfacd9}.loading-orbit span:nth-child(3){font-size:30px;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:9px;font-weight:800;letter-spacing:1.85px;color:#a69a90;margin:0 0 12px;text-transform:uppercase}.eyebrow-star{color:#e9947d;font-size:15px;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(40px,5vw,62px);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:14px;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:11px;background:#fffbf5aa}.promise-line span{color:#e18d80;font-size:17px}.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:22px;font-weight:900;letter-spacing:-.45px;margin:0;line-height:1.3}.tiny-stamp{font-family:var(--round);font-size:9px;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:11px;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:23px;height:35px;display:grid;place-items:center;margin-bottom:2px;filter:saturate(.8)}.species-option strong{font-family:var(--round);font-size:12px;font-weight:900;color:#403a37}.species-option small{font-size:8px;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:11px;color:#6d655e;margin-bottom:8px}.field-label span{font-size:9px;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:11px;color:#bd5747;background:#fff0eb;border-radius:8px;padding:9px 11px;margin:0 0 10px}.tiny-note{text-align:center;font-size:9px;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:11px;font-weight:600}.text-button:hover{color:#d47664}.page-footer{text-align:center;grid-column:1/-1;font-size:8px;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(34px,4.2vw,46px);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:20px}.offline-banner strong{font-size:12px}.offline-banner p{margin:0;font-size:10px}.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-topline{display:flex;align-items:center;justify-content:space-between;gap:10px}.world-label{font-size:9px;font-weight:800;letter-spacing:1.5px;color:#9e9489;display:flex;align-items:center;gap:8px}.age-pill{font-size:10px;color:#9d8176;border:1px solid #f0ddd1;background:#fff4eb;padding:5px 9px;border-radius:99px;white-space:nowrap}.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:22px;animation:twinkle 3s ease-in-out infinite}.sparkle-one{left:22%;top:22%;animation-delay:.4s}.sparkle-two{right:21%;top:26%;font-size:18px;color:#d2a7cc;animation-delay:1.3s}.sparkle-three{right:28%;top:49%;font-size:35px;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:21px;color:#f5d5dd}.flower-left{left:9%}.flower-right{right:10%;font-size:16px;color:#fff1af}.pet-intro-row{padding:17px 5px 13px;display:flex;align-items:center;justify-content:space-between;gap:14px}.pet-stage-label{font-size:8px;color:#b6a198;font-weight:800;letter-spacing:1.5px;margin:0 0 2px}.pet-intro-row h2{font-family:var(--round);font-size:30px;line-height:1.15;letter-spacing:-.9px;margin:0;font-weight:900}.pet-caption{font-size:11px;color:#a1988f;margin:4px 0 0}.bond-badge{width:57px;height:57px;border-radius:19px;background:#fff0ed;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#d98276;flex-shrink:0}.bond-heart{font-size:15px;line-height:14px}.bond-badge strong{font-family:var(--round);font-size:15px;line-height:17px}.bond-badge small{font-size:7px;letter-spacing:1px;font-weight:800}.mood-note{background:#faf4ed;border:1px solid #f2e9de;border-radius:11px;display:flex;align-items:center;gap:10px;padding:9px 12px;margin:0 0 14px;color:#7e7268}.mood-icon{width:26px;height:26px;border-radius:9px;background:#fff;color:#d98f78;display:grid;place-items:center;font-size:15px;flex-shrink:0}.mood-note p{font-size:11px;margin:0}.world-bottomline{border-top:1px solid #f0e8df;margin:0 -20px;padding:12px 21px;display:flex;justify-content:space-between;gap:12px;color:#a49a91;font-size:8px;letter-spacing:.4px}.world-bottomline strong{color:#777067;font-size:9px}.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:8px;letter-spacing:1.5px;margin-bottom:4px}.section-heading h2{font-size:20px}.weather-sticker{width:39px;height:39px;border-radius:13px;background:#f5ebfb;color:#b7a3cf;display:grid;place-items:center;font-size:21px}.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:15px}.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:10px;color:#938980;margin-bottom:5px}.need-label-row strong{font-size:10px;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:9px;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:9px;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:22px;height:31px;margin-bottom:3px;filter:saturate(.87)}.care-action strong{font-family:var(--round);font-size:11px;line-height:1.2;font-weight:900}.care-action small{font-size:8px;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:10px;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:17px}.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:15px}.journal-copy strong{display:block;font-size:10px;color:#696057;margin-bottom:2px}.journal-copy small{font-size:9px;color:#a69a90;display:block}.journal-time{font-size:8px;color:#b9aea4;white-space:nowrap}.empty-journal{margin:0;color:#a79c91;font-size:11px;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:8px}.keepsake-card h2{font-family:var(--round);font-weight:900;font-size:27px;letter-spacing:-.8px;line-height:1.05;margin:0 0 12px;position:relative;z-index:1}.keepsake-card>p:not(.eyebrow){font-size:10px;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:93px;line-height:1;color:#e4d7f1;transform:rotate(-18deg);font-family:var(--round)}.keepsake-doodle span{position:absolute;font-size:28px;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:8px;letter-spacing:1.45px}.footer-star{color:#e09b86;margin:0 4px}.pet-footer .text-button{letter-spacing:0;font-size:10px}.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:21px;line-height:1}.modal-card .color-fieldset{margin:17px 0 20px}.toast{position:fixed;z-index:40;left:50%;bottom:28px;transform:translate(-50%,18px);background:#34302f;color:#fffaf5;padding:12px 16px;border-radius:12px;font-size:11px;box-shadow:0 10px 30px #30231e27;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;max-width:calc(100% - 32px);text-align:center}.toast.show{opacity:1;transform:translate(-50%,0)}
/* 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:18px}.brand-copy small{font-size:7px}.connection-pill{padding:0 8px;height:28px}.connection-pill span{display:none}.topbar-right{gap:7px}.pal-switcher{max-width:100px;font-size:10px;padding:7px 5px}.button-small{font-size:10px;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:43px;margin-bottom:13px}.intro-copy{font-size:12px;line-height:1.7;margin-bottom:13px}.promise-line{font-size:10px}.adopt-card{padding:22px 18px;border-radius:20px}.card-heading h2{font-size:21px}.species-grid{gap:6px}.species-option{padding:8px 1px 7px;border-radius:10px}.species-face{font-size:21px;height:30px}.species-option strong{font-size:11px}.species-option small{font-size:7px}.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:37px}.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}.world-bottomline{margin:0 -15px;padding:12px 15px}.world-bottomline>span:last-child{display:none}.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:19px}.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:20px;height:27px}.care-action strong{font-size:10px}.care-action small{font-size:7px;letter-spacing:-.1px}.lower-grid{grid-template-columns:1fr;gap:13px;margin-top:13px}.keepsake-card{min-height:200px}.keepsake-card h2{font-size:26px}.pet-footer{align-items:flex-start;flex-direction:column;padding:17px 0}.modal-card{padding:22px}.toast{bottom:18px}}
@media (max-width:390px){.species-option small{font-size:6.5px}.species-face{font-size:19px}.action-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.care-action strong{font-size:9px}.care-action small{font-size:6.5px}.pet-art{width:170px;height:190px}.world-scene{height:245px}.world-topline{align-items:flex-start;flex-direction:column;gap:6px}.world-label{font-size:8px}.age-pill{padding:4px 8px}}
@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:18px;letter-spacing:-4px;width:100%;height:31px}.egg-grid .species-option strong{font-size:10px}.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:11px;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:10px}.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:8px;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:10px;color:#a1958a;margin:4px 0 0}.arcade-stamp{font-size:8px;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:27px;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:12px;line-height:1.25;grid-column:2;grid-row:1}.game-card small{font-size:9px;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:9px;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:9px}.arcade-stats span{display:flex;gap:6px;align-items:center}.arcade-stats strong{color:#74655b;font-size:11px}.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:14px;color:#574c60}.genome-summary span{font-size:9px;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:8px;font-weight:800;letter-spacing:.2px}.evolution-caption{font-size:9px;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:11px;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:10px;line-height:1.3;color:#8e8379}.evolution-node-copy small{font-size:8px;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:10px;color:#9a8b80;margin:0 0 16px;line-height:1.6}.game-prompt{font-size:12px;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:24px;transition:transform .12s ease,background .12s ease,border-color .12s ease}.star-tile{min-height:71px;font-size:25px;background:#faf5ff;border-color:#e7dcf2}.memory-tile{font-size:21px;min-height:62px;background:#f2f8ef;border-color:#dcebdc}.snack-tile{font-size:12px;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:22px;letter-spacing:1px;margin-bottom:10px}.game-feedback{font-size:10px;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:10px;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:7px}.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:7px}.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:24px}.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:18px}.game-modal{padding:20px}.game-prompt{font-size:11px}}
@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:9px;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:10px;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:9px;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:10px;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:8px;font-weight:900;letter-spacing:1.1px;color:#a18b78}
.friend-code-value{font-size:clamp(18px,3vw,25px);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:11px;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:10px;color:#69584c;line-height:1.35}
.auto-visits-setting small{font-size:9px;line-height:1.45;color:#a09185}
.social-feedback{margin:12px 0 17px;padding:10px 12px;border-radius:10px;background:#faf5ef;color:#978577;font-size:10px;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:12px;color:#6a5749}
.friend-count{font-size:8px;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:10px;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:11px;line-height:1.35;color:#6b5749;overflow-wrap:anywhere}
.friend-info small{font-size:8px;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:9px}
.friend-remove-button{border:0;background:transparent;padding:5px 7px;color:#ae9388;font-size:8px;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:15px}
.visit-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.visit-copy strong{font-size:10px;line-height:1.45;color:#705c4e}
.visit-copy small{font-size:8px;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:7px}}

/* 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}
.world-scene.is-night .scene-sparkle{color:#fff0bb}
.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:24px;font-weight:900;letter-spacing:3px;transform:rotate(10deg);animation:sleepyZ 3.8s ease-in-out infinite;pointer-events:none}
.life-card{padding:20px;min-width:0;background:linear-gradient(145deg,#fffdfa,#f8fbf4);border-color:#e2eadb}
.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:9px;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:17px}
.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:10px;line-height:1.5}
.routine-line small{display:block;color:#9b8d80;font-size:9px;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:9px;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:9px;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:15px}
.life-alert>span:last-child{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}
.life-alert strong{font-size:10px;color:#78614f}
.life-alert small{font-size:9px;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:9px;color:#776b5c}
.gentle-alert-row small{font-size:8px;line-height:1.45;color:#a39688}
.gentle-alert-row .button{flex:0 0 auto;padding:7px 9px;font-size:9px}
.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:1000px){.life-card{padding:18px}}
@media(max-width:720px){.life-card{padding:17px 15px;border-radius:17px}.routine-line strong{font-size:10px}.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:10px}.care-action small{font-size:7px}}
@media(max-width:390px){.action-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.care-action strong{font-size:9px}.care-action small{font-size:6.5px}.routine-icon{flex-basis:30px;width:30px;height:30px}.mess-status{margin-left:40px}.sleep-state-pill{padding:5px 7px;font-size:8px}}
@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:10px;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:18px;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:46px;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:23px;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:11px;color:#6d6255}.home-room-base small{font-size:9px;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:9px;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:11px;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:9px;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:8px;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:9px;font-weight:750}
.preference-chip>span:first-child{font-size:11px}
.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:14px}.inventory-title p{margin:0;color:#a49485;font-size:9px;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:18px}
.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:10px}
.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:19px}
.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:9px;line-height:1.35;overflow-wrap:anywhere}
.inventory-item small{max-width:100%;color:#a19183;font-size:8px;line-height:1.4;overflow-wrap:anywhere}
.inventory-note{margin:10px 0 0;color:#a29689;font-size:8px;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:9px}.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:13px}}
@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:22px}
.coin-purse strong{font-size:20px;font-variant-numeric:tabular-nums;line-height:1.1}
.coin-purse small{font-size:7px;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:12px;line-height:1.4}
.economy-subheading>span{color:#a08d7d;font-size:8px;font-weight:800;text-align:right}
.economy-hint{margin:-3px 0 10px;color:#9d8c7e;font-size:9px;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:10px;line-height:1.45}
.quest-heading span{flex:0 0 auto;color:#8a7545;font-size:8px;font-weight:900}
.daily-quest p{margin:4px 0 7px;color:#a18f80;font-size:8px;line-height:1.5}
.daily-quest>small{display:block;margin-top:5px;color:#9a8b7f;font-size:8px;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:18px}
.outing-copy{display:flex;flex-direction:column;gap:3px;min-width:0}
.outing-copy strong{color:#6a584a;font-size:10px;line-height:1.35}
.outing-copy small{color:#a18e7e;font-size:8px;line-height:1.45}
.outing-reward{color:#96722c;font-size:8px;white-space:nowrap}
.economy-feedback{margin:11px 0 0;padding:9px 11px;border-radius:10px;background:#f8f4eb;color:#948170;font-size:9px;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:17px}
.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:9px;line-height:1.35;color:#6d5949;overflow-wrap:anywhere}
.shop-item-copy small{font-size:8px;line-height:1.4;color:#a18e7f}
.shop-item>b{grid-column:1 / -1;justify-self:end;margin-top:5px;color:#99752f;font-size:8px;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:19px}
.collectible-item strong{font-size:8px;line-height:1.35;color:#6f5d4d;overflow-wrap:anywhere}
.collectible-item small{font-size:7px;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:8px;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:18px}.coin-purse strong{font-size:17px}.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:15px}.shop-item-copy strong{font-size:8px}.shop-item-copy small{font-size:7px}.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 11px/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:17px}
.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:10px;color:#6d5849;line-height:1.45}
.gift-inbox-copy small{font-size:8px;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 20px/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:9px;font-weight:700}
.custom-offspring-color input{accent-color:#9a83c9}
.family-generation{margin:3px 0;color:#8a76a9;font-size:10px;font-weight:900;line-height:1.5}
.family-memory{margin:0;padding:9px 10px;border-radius:9px;background:#f5effb;color:#766489;font-size:9px;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: 14px; 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: 12px;
  line-height: 1.3;
  white-space: normal;
}
.button-small { min-height: 36px; padding: 8px 11px; font-size: 11px; }
.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: 12px; line-height: 1.4; margin-bottom: 6px; }
.field-label span { font-size: 10px; }
.eyebrow { font-size: 10px; line-height: 1.4; letter-spacing: .14em; margin-bottom: 8px; }
.intro-copy, .section-subtitle { font-size: 12px; 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(38px, 4.8vw, 58px); 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(19px, 1.7vw, 22px); 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: 12px; line-height: 1.3; text-align: center; }
.species-option small { font-size: 10px; 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: 12px; margin-bottom: 10px; }
.color-options { gap: 8px; flex-wrap: wrap; }
.color-swatch { width: 34px; height: 34px; }
.tiny-note { font-size: 10px; line-height: 1.5; margin-top: 12px; }
.import-row { margin-top: 18px; padding-top: 16px; }
.text-button { font-size: 12px; line-height: 1.5; }
.page-footer { font-size: 9px; 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(32px, 4vw, 46px); 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-topline { min-height: 24px; gap: 10px; }
.world-label { font-size: 10px; letter-spacing: .12em; }
.age-pill { font-size: 11px; padding: 5px 10px; }
.world-scene { height: clamp(235px, 24vw, 300px); margin: 8px 0 0; border-radius: 16px; }
.pet-intro-row { padding: 16px 0 13px; gap: 12px; }
.pet-stage-label { font-size: 10px; letter-spacing: .12em; margin-bottom: 5px; }
.pet-intro-row h2 { font-size: clamp(22px, 2.5vw, 29px); line-height: 1.15; letter-spacing: -.035em; }
.pet-caption { font-size: 12px; line-height: 1.5; margin-top: 5px; }
.bond-badge { flex: 0 0 62px; }
.mood-note { gap: 10px; padding: 11px 12px; margin-bottom: 14px; border-radius: 12px; }
.mood-note p { font-size: 12px; line-height: 1.5; }
.world-bottomline { margin: 0 -20px; padding: 13px 20px 2px; gap: 10px; flex-wrap: wrap; font-size: 10px; line-height: 1.5; letter-spacing: .025em; }

.needs-card, .actions-card, .journal-card, .keepsake-card, .life-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: 12px; line-height: 1.4; }
.need-label-row strong { font-size: 11px; font-variant-numeric: tabular-nums; }
.need-track { height: 7px; margin-top: 7px; border-radius: 99px; }
.needs-footnote { font-size: 11px; 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: 23px; height: 30px; margin-bottom: 5px; }
.care-action strong { font-size: 12px; line-height: 1.35; text-align: center; }
.care-action small { font-size: 10px; line-height: 1.35; text-align: center; }
.care-feedback { margin: 14px 0 0; padding: 10px 12px; border-radius: 11px; font-size: 11px; line-height: 1.55; }
.life-card, .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: 12px; line-height: 1.45; }
.routine-line small, .life-alert small { font-size: 11px; line-height: 1.5; }
.routine-track { margin: 7px 0 6px; }
.mess-status, .life-alert, .social-feedback, .economy-feedback, .home-feedback { font-size: 11px; line-height: 1.55; }
.life-alert { gap: 10px; padding: 11px 12px; margin-top: 14px; border-radius: 12px; }
.life-alert strong { font-size: 12px; }
.gentle-alert-row { gap: 12px; margin-top: 15px; padding-top: 14px; }
.gentle-alert-row strong { font-size: 11px; }
.gentle-alert-row small { font-size: 10px; line-height: 1.5; }
.gentle-alert-row .button { padding: 8px 10px; font-size: 10px; }
.hatch-track { height: 10px; margin: 14px 0 16px; }
.egg-care-copy { font-size: 12px; 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: 12px; }
.egg-ritual-grid .care-action small { font-size: 10px; }
.growth-timer { font-size: 11px; 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: 11px; }
.home-select-label select { min-height: 44px; padding: 10px 12px; border-radius: var(--radius-control); font-size: 12px; }
.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: 10px; letter-spacing: .1em; margin-bottom: 9px; }
.preference-chips { gap: 8px; }
.preference-chip { padding: 7px 10px; font-size: 11px; }
.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: 14px; line-height: 1.35; }
.inventory-title p, .inventory-note, .economy-hint { font-size: 11px; 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: 11px; line-height: 1.4; }
.inventory-item small { font-size: 10px; line-height: 1.45; }
.inventory-item-icon { width: 34px; height: 34px; font-size: 20px; }
.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: 13px; line-height: 1.35; }
.game-card small { font-size: 11px; line-height: 1.4; }
.game-launch { font-size: 10px; }
.arcade-stats { gap: 16px; margin-top: 16px; padding-top: 14px; font-size: 11px; }
.arcade-stats strong { font-size: 12px; }

.economy-heading { gap: 16px; }
.coin-purse { min-width: 100px; padding: 11px 14px; border-radius: var(--radius-nested); }
.coin-purse strong { font-size: 21px; }
.economy-columns { margin: 16px 0; }
.economy-subheading { gap: 12px; margin-bottom: 12px; }
.economy-subheading > span { font-size: 10px; line-height: 1.4; }
.daily-quest-list, .outing-options { gap: 9px; }
.daily-quest { padding: 12px; border-radius: 12px; }
.quest-heading strong { font-size: 12px; line-height: 1.4; }
.quest-heading span { font-size: 10px; }
.daily-quest p, .daily-quest > small { font-size: 10px; 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: 12px; }
.outing-copy small, .outing-reward { font-size: 10px; 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: 11px; line-height: 1.4; }
.shop-item-copy small, .shop-item > b { font-size: 10px; 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: 10px; line-height: 1.4; }
.collectible-item small { font-size: 9px; }
.outing-journal { gap: 6px; margin-top: 12px; }
.outing-memory { padding: 9px 10px; border-radius: 9px; font-size: 10px; }

.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: 10px; letter-spacing: .09em; }
.friend-code-value { font-size: clamp(20px, 2.5vw, 26px); 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: 12px; }
.auto-visits-setting { min-height: 52px; padding: 12px 14px; gap: 11px; border-radius: var(--radius-control); }
.auto-visits-setting strong { font-size: 12px; line-height: 1.4; }
.auto-visits-setting small { font-size: 11px; 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: 10px; padding: 6px 8px; }
.friends-list, .visit-history, .friend-activity-log, .gift-inbox-list, .family-history { gap: 8px; }
.social-empty { padding: 16px 10px; font-size: 11px; 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: 12px; line-height: 1.4; }
.friend-info small { font-size: 10px; line-height: 1.45; }
.friend-row-actions { gap: 6px; }
.friend-row-actions .button { min-height: 34px; padding: 7px 9px; font-size: 10px; }
.friend-remove-button { font-size: 10px; }
.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: 11px; line-height: 1.45; }
.visit-copy small { font-size: 10px; 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: 12px; }
.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: 11px; line-height: 1.45; }
.gift-inbox-copy small { font-size: 10px; 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: 21px; line-height: 1.25; }
.breeding-form-fields { gap: 12px; }
.custom-offspring-color { font-size: 10px; gap: 7px; }
.family-generation { font-size: 11px; }
.family-memory { padding: 10px 12px; border-radius: 10px; font-size: 10px; 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: 15px; line-height: 1.35; }
.genome-summary span { font-size: 11px; line-height: 1.45; }
.gene-chips { gap: 6px; margin-bottom: 14px; }
.gene-chip { padding: 6px 9px; font-size: 10px; }
.evolution-caption { font-size: 11px; line-height: 1.55; margin-bottom: 14px; }
.evolution-node-copy strong { font-size: 11px; }
.evolution-node-copy small { font-size: 10px; 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(22px, 2vw, 28px); line-height: 1.15; }
.keepsake-card p:not(.eyebrow) { font-size: 12px; line-height: 1.65; }
.pet-footer { gap: 12px; padding: 20px 0 8px; font-size: 10px; line-height: 1.5; letter-spacing: .08em; }
.pet-footer .text-button { font-size: 11px; }

.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: 12px; line-height: 1.6; }
.game-prompt { font-size: 13px; line-height: 1.5; }
.game-tile { border-radius: 12px; }
.game-feedback { font-size: 11px; line-height: 1.55; padding: 11px 12px; }
.toast { bottom: max(20px, env(safe-area-inset-bottom)); padding: 12px 16px; border-radius: 14px; font-size: 12px; line-height: 1.5; max-width: min(480px, calc(100% - 32px)); }

@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(36px, 5.5vw, 50px); }
  .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: 18px; }
  .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; }
  .world-bottomline { margin-inline: -16px; padding: 12px 16px 0; }
  .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: 17px; }
  .brand-copy small { font-size: 7px; 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: 11px; }
  #add-pal-top { padding-inline: 9px; font-size: 10px; }
  .app-shell { width: calc(100% - 24px); }
  .adopt-screen { padding-top: 24px; gap: 18px; }
  .adopt-intro h1 { font-size: clamp(32px, 8.5vw, 42px); letter-spacing: -.04em; margin-bottom: 13px; }
  .intro-copy { font-size: 12px; margin-bottom: 14px; }
  .promise-line { font-size: 10px; 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: 9px; }
  .color-options { gap: 6px; }
  .color-swatch { width: 32px; height: 32px; }
  .pet-screen { padding-top: 18px; }
  .page-intro h1 { font-size: 32px; }
  .intro-actions .button { flex: 1 1 auto; }
  .pet-world, .needs-card, .actions-card, .journal-card, .keepsake-card, .life-card, .egg-care-card,
  .arcade-card, .evolution-card, .home-card, .economy-card, .friends-card { padding: 15px; border-radius: 17px; }
  .world-scene { height: 235px; }
  .world-bottomline { margin-inline: -15px; padding: 12px 15px 0; }
  .pet-intro-row { align-items: flex-start; }
  .mood-note { padding: 10px; }
  .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: 11px; }
  .care-action small { font-size: 9px; 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: 9px; }
  .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: 9px; }
  .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(5, 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: 12px;
  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: 15px; 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: 10px; border-radius: 10px; }
  .pet-tab-icon { font-size: 15px; }
}
@media (max-width: 390px) {
  .pet-tabs { gap: 3px; padding: 4px; }
  .pet-tab { min-height: 52px; font-size: 9px; }
  .pet-tab-icon { font-size: 14px; }
}
@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; }
.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-topline { grid-area: top; min-width: 0; }
.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-room-tag {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 75px);
  padding: 6px 9px;
  border: 1px solid #ffffffb8;
  border-radius: 999px;
  background: #fffdfaD9;
  color: #746958;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 3px 12px #5043310c;
  backdrop-filter: blur(6px);
}
.scene-room-tag > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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: 23px;
  transform: rotate(7deg);
}
.persistent-pet-stage .pet-story {
  grid-area: story;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 8px 0;
}
.persistent-pet-stage .pet-intro-row { align-items: center; gap: 12px; padding: 0; border: 0; }
.persistent-pet-stage .pet-intro-row > div:first-child { min-width: 0; }
.persistent-pet-stage .pet-caption { max-width: 48ch; }
.persistent-pet-stage .mood-note { margin: 0; }
.persistent-pet-stage .world-bottomline {
  grid-area: bottom;
  margin: 0;
  padding: 11px 0 0;
  border-top: 1px solid #f0e8df;
  gap: 12px;
}
.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: 21px;
}
.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: 11px; }
.home-current-summary p strong { color: #675b4e; font-size: 12px; }
.home-current-summary small { display: block; color: #9a8b7c; font-size: 10px; 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); }
  .persistent-pet-stage .pet-story { gap: 10px; padding: 0; }
  .persistent-pet-stage .pet-intro-row { padding: 0; }
  .persistent-pet-stage .world-bottomline { margin: 0; padding: 10px 0 0; }
  .persistent-pet-stage .world-bottomline > span:last-child { display: none; }
  .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: 10px;
  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: 8px;
  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; }
.room-no-selection {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 100px;
  padding: 15px 16px;
  border: 1px dashed #e6cfc0;
  border-radius: 15px;
  background: linear-gradient(110deg, #fff8f1, #f5f0fb);
}
.room-no-selection-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: #fffdfa;
  color: #e28f7b;
  font-size: 24px;
}
.room-no-selection strong { display: block; color: #6e5b4f; font-family: var(--round); font-size: 14px; }
.room-no-selection p { margin: 4px 0 0; color: #9c897b; font-size: 10px; line-height: 1.6; }
.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: 9px; }
  .room-pet-stage { font-size: 7px; }
  .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 v0.8.10: scrollable rooms, layered parallax, 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-x: contain;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #adbea999 transparent;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}
.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;
}
.room-parallax-layer {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  will-change: transform;
}
.room-parallax-far { z-index: 2; }
.room-parallax-far::before,
.room-parallax-far::after,
.room-parallax-mid::before,
.room-parallax-mid::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.room-parallax-far::before {
  left: -3%; bottom: 27%; width: 112%; height: 40%;
  background: var(--parallax-far, #b9d7bd);
  opacity: .52;
  clip-path: polygon(0 69%, 7% 57%, 15% 26%, 24% 57%, 34% 44%, 45% 66%, 56% 24%, 68% 53%, 79% 35%, 91% 60%, 100% 39%, 100% 100%, 0 100%);
}
.room-parallax-far::after {
  left: 20%; bottom: 28%; width: 98%; height: 33%;
  background: var(--parallax-far-2, #d0e3c8);
  opacity: .65;
  clip-path: polygon(0 60%, 12% 34%, 25% 61%, 37% 26%, 51% 55%, 65% 33%, 78% 59%, 91% 24%, 100% 49%, 100% 100%, 0 100%);
}
.room-parallax-mid { z-index: 3; }
.room-parallax-mid::before {
  left: -6%; bottom: 7%; width: 122%; height: 35%;
  background: var(--parallax-mid, #a8d0af);
  opacity: .48;
  clip-path: polygon(0 32%, 9% 50%, 20% 23%, 33% 54%, 45% 31%, 57% 60%, 70% 21%, 84% 49%, 100% 29%, 100% 100%, 0 100%);
}
.room-parallax-mid::after {
  left: 38%; bottom: 4%; width: 100%; height: 29%;
  background: var(--parallax-mid-2, #8fc19d);
  opacity: .4;
  clip-path: polygon(0 55%, 14% 24%, 29% 54%, 41% 33%, 55% 59%, 71% 20%, 86% 52%, 100% 36%, 100% 100%, 0 100%);
}
.room-parallax-near { z-index: 5; }
.room-parallax-near .scene-grass,
.room-parallax-near .tiny-flower { pointer-events: none; }
.room-parallax-near .scene-grass { bottom: 26px; }
.room-parallax-near .tiny-flower { bottom: 27px; }
.room-parallax-near .flower-left { left: 8%; }
.room-parallax-near .flower-right { left: 82%; right: auto; }
#world-scene[data-room="garden"] { --parallax-far:#b7d7bb; --parallax-far-2:#d5e7ca; --parallax-mid:#a1cfae; --parallax-mid-2:#8fc29f; }
#world-scene[data-room="sunroom"] { --parallax-far:#e9d59c; --parallax-far-2:#fff0c5; --parallax-mid:#d9ca8e; --parallax-mid-2:#c8ba7c; }
#world-scene[data-room="pond-nook"] { --parallax-far:#a4d9d9; --parallax-far-2:#d0eeee; --parallax-mid:#8ec9c6; --parallax-mid-2:#78b7b1; }
#world-scene[data-room="moon-loft"] { --parallax-far:#a8a7cf; --parallax-far-2:#d8d2f0; --parallax-mid:#969bc7; --parallax-mid-2:#858bb9; }
#world-scene[data-room="flower-cottage"] { --parallax-far:#edc3d0; --parallax-far-2:#f8dce5; --parallax-mid:#dfaebf; --parallax-mid-2:#d59eb4; }
#world-scene[data-room="cloud-den"] { --parallax-far:#b8d3ed; --parallax-far-2:#e0ecfa; --parallax-mid:#a4c4e6; --parallax-mid-2:#8fb2dc; }
#world-scene[data-room="prism-cove"] { --parallax-far:#c7b8ed; --parallax-far-2:#eadff8; --parallax-mid:#b9c5e8; --parallax-mid-2:#a9b1dc; }
.world-scene.is-night .room-world { --parallax-far:#686b91; --parallax-far-2:#777aa0; --parallax-mid:#74799b; --parallax-mid-2:#626c8a; }
.world-scene.is-night .room-parallax-far::before,
.world-scene.is-night .room-parallax-far::after,
.world-scene.is-night .room-parallax-mid::before,
.world-scene.is-night .room-parallax-mid::after { opacity: .52; }
.scene-room-tag { z-index: 8; pointer-events: none; }
.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: 8px;
  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: 10px;
  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: 8px;
  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: 9px; }
  .room-pet-stage { font-size: 7px; }
  .room-scroll-hint { font-size: 7px; right: 6px; bottom: 5px; }
  .scene-decor-icon { bottom: 19%; }
}
@media (prefers-reduced-motion: reduce) {
  .room-scrollport { scroll-behavior: auto; }
  .room-parallax-layer { will-change: 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: 10px; font-weight: 750; }
.household-stat-value { color: #544a42; font-family: var(--round); font-size: clamp(19px, 2.3vw, 25px); font-weight: 900; line-height: 1.25; overflow-wrap: anywhere; }
.household-stat small { color: #a69a8e; font-size: 9px; line-height: 1.45; }
.household-overview-note { padding: 11px 13px; margin: 13px 0; border-radius: 11px; background: #f8f3ec; color: #938375; font-size: 10px; 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: 11px; font-weight: 900; }
.household-pet-link-copy small { color: #9b8e82; font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.household-pet-link-arrow { justify-self: end; color: #d58b75; font-size: 14px; 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: 10px; }
.household-network-row small { color: #a3988e; font-size: 9px; 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; }
}
