/* The pet is the focus. Small controls live around the edge of its grove. */
.pet-game{min-height:520px;height:100svh;--sage:#487459;--ink:#365862;--ease-out:cubic-bezier(.23,1,.32,1)}
.pet-game .quest{top:105px;max-width:510px}
.pet-game .quest-tag{font-size:9px;letter-spacing:1.9px}
.pet-game .quest h1{font-size:31px;margin:6px 0 3px}
.pet-game .quest p{font-size:12px}
.pet-game .stage{inset:193px 0 204px}
.pet-game .hud{z-index:7}
.pet-game .profile-chip{max-width:45%;min-width:0}
.pet-game .profile-chip>span{min-width:0}
.pet-game .profile-chip strong{max-width:180px}
.home-growth{position:absolute;left:50%;top:179px;transform:translateX(-50%);width:min(250px,72%);padding:0;background:none;border:0;color:#567350;z-index:5;text-align:left;min-height:32px}
.home-growth>span:first-child{display:flex;align-items:center;gap:7px;margin-bottom:6px}
.home-growth strong{font-size:11px;font-weight:800;margin-right:auto}.home-growth small{font-size:11px;font-weight:800;font-variant-numeric:tabular-nums}
.home-growth svg{width:12px;height:12px;fill:#e8b84f;stroke:#b68e39;stroke-width:1.5}
.grow-track{display:block;height:8px;background:#ffffffad;box-shadow:0 1px 0 #70985a20;overflow:hidden;border:1px solid #ffffffde;border-radius:7px}
.grow-track i{display:block;width:100%;height:100%;background:linear-gradient(90deg,#94b87b,#ddc375);transform:scaleX(0);transform-origin:left;transition:transform 240ms var(--ease-out)}
.home-growth:active{transform:translateX(-50%) scale(.98)}
.pet-nameplate{bottom:214px;display:flex;align-items:center;justify-content:center;gap:8px;max-width:90%;white-space:nowrap;padding:7px 12px;border:1px solid #ffffff99;border-radius:17px;background:#fffff2a8;backdrop-filter:blur(6px)}
.pet-nameplate #mood-chip{font-size:13px;color:#4e7059;margin:0;font-weight:800;text-shadow:none}
.pet-nameplate #pet-health{font-size:10px;color:#688071;margin:0;text-shadow:none}
.pet-nameplate[data-mood=mad],.pet-nameplate[data-mood=annoyed]{background:#fff1e4e6}.pet-nameplate[data-mood=sleepy]{background:#eeeaf8df}
.pet-game #care-dock{bottom:99px;width:min(94%,400px)}
.care-actions{display:flex;align-items:center;justify-content:center;gap:10px}
.care-actions #care-button{height:64px;flex:1;max-width:225px;min-width:0;border-radius:24px;font-size:23px;padding:0 20px;gap:8px}
.pet-button{height:62px;min-width:80px;display:flex;align-items:center;justify-content:center;gap:7px;flex-direction:column;background:#f9f9e7;color:#5f8768;border:2px solid #fff;border-radius:23px;box-shadow:0 4px 0 #91aa805e;padding:6px 14px;font-size:12px;font-weight:800}
.pet-button svg{width:25px;height:25px;stroke-width:1.6}.pet-button.is-inviting{background:#dceacb;border-color:#91b37a;color:#416d4b}
.treat-button{border:1px solid #ffffffb8;background:#f7f8e57d;min-width:54px;height:61px;border-radius:20px;color:#69805e;font-size:10px;font-weight:750;display:flex;align-items:center;justify-content:center;gap:4px;flex-direction:column;padding:5px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.treat-berry{position:relative;display:block;width:27px;height:28px;border-radius:45% 45% 46% 46%;background:radial-gradient(ellipse at 37% 33%,#ffd2c466,transparent 38%),radial-gradient(ellipse at 35% 60%,#ffeac2 1px,transparent 1.5px),radial-gradient(ellipse at 66% 36%,#ffeac2 1px,transparent 1.5px),radial-gradient(ellipse at 70% 70%,#ffeac2 1px,transparent 1.5px),linear-gradient(130deg,#f7a19a,#db747e);box-shadow:inset -2px -3px 3px #ae5b672c,0 2px 0 #ab6b5326;transform:rotate(-8deg)}
.treat-berry:before,.treat-berry:after{content:'';position:absolute;top:-3px;background:#8bad6c;width:12px;height:6px;border-radius:100% 0;left:4px;transform:rotate(12deg)}.treat-berry:after{left:12px;transform:rotate(-30deg)}
#treat-drag{position:fixed;top:0;left:0;z-index:40;width:38px;height:38px;pointer-events:none;filter:drop-shadow(0 6px 3px #425b4926)}
.pet-game .gesture-tip{font-size:11px;line-height:1.4;margin:14px 0 0;min-height:16px;color:#496c54;text-shadow:0 1px 2px #ffffeabd}
.care-trail{position:fixed;left:0;top:0;opacity:0;z-index:6;pointer-events:none;transition:opacity 150ms ease}.care-trail svg{width:22px;height:22px;color:#e4a2a4;fill:#f7d1c5;stroke-width:1.5}.care-trail.active{opacity:.9}
.sleep-letters{position:absolute;right:31%;top:20%;font-size:21px;letter-spacing:8px;color:#879ab2;opacity:0;pointer-events:none;transition:opacity 250ms ease}
.pet-game.is-sleepy .sleep-letters{opacity:.8}
.pet-game #scene-fallback{inset:5% 0 0}.fallback-body{height:100%;position:relative;display:inline-block;transition:transform 280ms var(--ease-out)}
#scene-fallback img{height:90%;object-fit:contain}.fallback-feeling{display:block;color:#52765f;font-size:13px;font-weight:800}.is-mad .fallback-body{transform:rotate(9deg) scaleX(.9)}.is-sleepy .fallback-body{transform:scaleY(.92)}
.pet-game .floating-reward{font-size:22px;top:26%}.pet-game .combo-callout{font-size:19px;top:12%;color:#bd8351}
.pet-game.battle-ready .quest{top:111px}.pet-game.battle-ready .quest h1{font-size:29px}.pet-game.battle-ready .quest>p{font-size:13px}
.pet-game.battle-ready .stage{top:173px;bottom:231px}
.pet-game.battle-ready #battle-dock{bottom:105px;max-width:340px}
.pet-game.battle-mode:not(.battle-ready) .stage{top:213px;bottom:219px}
.pet-game.battle-mode .quest{top:106px}.pet-game.battle-mode:not(.battle-ready) .quest h1{font-size:27px}
.pet-game.battle-mode .quest>p{padding:0;border:0;background:none}
.hug-score{position:absolute;top:181px;left:50%;transform:translateX(-50%);width:min(75%,355px);z-index:4;color:#628370}
.hug-score>div:first-child{display:flex;align-items:center;justify-content:space-between;font-size:11px;font-weight:750;margin-bottom:6px}.hug-score strong{color:#839282;font-variant-numeric:tabular-nums}
.hug-progress{height:11px;overflow:hidden;border:2px solid #fff;border-radius:15px;background:#fffff19e}.hug-progress i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#b8d5b0,#eeb5bd);transform-origin:left;transition:transform 180ms linear;transform:scaleX(0)}
.hug-score p{font-size:10px;margin:6px 0 0;text-align:center;color:#748778}
.hug-hearts{position:absolute;inset:12% 32% auto;display:flex;justify-content:space-around;color:#e394a0;font-size:37px;pointer-events:none;opacity:0;transform:translateY(8px);transition:opacity 220ms ease,transform 300ms var(--ease-out)}
.hug-hearts span:nth-child(2){margin-top:-18px;font-size:28px}.hug-hearts.show{opacity:1;transform:translateY(-6px)}
.pet-game .battle-touch{background:#b7d9d0;box-shadow:0 5px 0 #7fae9e;border-radius:27px;color:#416a64;border-color:#f7ffff}
.pet-game .battle-touch svg{fill:#e4f1d9;stroke:#789d84}.pet-game .battle-touch.charging{background:#cfddbf}
.pet-game .touch-footer{font-size:11px}.pet-game #battle-dock{width:min(90%,410px)}
.pet-game .friends-panel{max-width:620px;top:108px;bottom:102px;border-radius:28px;padding:23px}
.pet-game .friends-heading h2{font-size:22px;max-width:none}.pet-game .friends-heading p{font-size:12px;line-height:1.6;margin:5px 0 0}
.pet-game .friend-card{display:grid;grid-template-columns:65px minmax(0,1fr);gap:5px 8px;align-items:center;box-shadow:none;padding:13px}
.pet-game .friend-card img{float:none;margin:0;width:65px;height:56px;grid-row:1/3}.pet-game .friend-card h3{font-size:16px;margin:0;align-self:end}.pet-game .friend-card p{font-size:11px;margin:0;align-self:start}
.pet-game .friend-card .actions{grid-column:1/-1;display:flex;gap:8px;padding-top:8px;clear:none}.pet-game .friend-card button{min-height:44px;line-height:1.2;font-size:11px;padding:8px 7px;border-color:#fff}
.social-status{font-size:12px;color:#63856b;line-height:1.5;margin-top:12px}.social-status:empty{display:none}
.pet-game .friend-empty{padding:8px 0 0}.pet-game .friend-empty img{height:77px;width:100px}.pet-game .friend-empty h3{font-size:17px}.pet-game .friend-empty p{font-size:12px;margin:6px 0 0}
.pet-game #join-form{margin-top:23px}.pet-game .friends-panel>.big-button{height:55px;font-size:17px}
#buddy-dialog .buddy-list{margin-top:8px}#buddy-dialog .motion-icon{font-size:22px}.result-pair{display:flex;align-items:center;justify-content:center;gap:0;margin:18px 0}.result-pair img{width:43%;max-width:145px;height:105px;object-fit:contain}.result-pair>span{font-size:36px;color:#e198a4;font-weight:800}
#result-dialog .dialog-header h2{font-size:27px;margin:0}#result-dialog .result-reward{font-size:21px}
.pet-game button,dialog button{transition:transform 140ms var(--ease-out, cubic-bezier(.23,1,.32,1));}
.pet-game button:active,dialog button:active{transform:scale(.97)}.pet-game .home-growth:active{transform:translateX(-50%) scale(.97)}
dialog{animation:dialog-enter 200ms cubic-bezier(.23,1,.32,1);overscroll-behavior:contain;scrollbar-width:thin}
@keyframes dialog-enter{from{opacity:0;transform:translateY(6px) scale(.975)}to{opacity:1;transform:translateY(0) scale(1)}}
.keyboard-input dialog{animation:none}.keyboard-input button:active{transform:none!important}
dialog .dialog-header h2{font-size:25px}dialog .text-button{min-height:44px;margin-top:10px}dialog .big-button{min-width:0}
#growth-dialog,#dress-dialog{width:min(480px,calc(100% - 28px));padding:19px 22px 24px}.scrapbook-looks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:22px 0 8px}
.scrapbook-look{position:relative;padding:13px 5px 12px;border:2px solid #e3e9d8;border-radius:23px;background:#f1f4e5;text-align:center;color:#58705d}.scrapbook-look.current{background:#e9f1d9;border-color:#adc48f}.scrapbook-look.locked{background:#f2f0e8;border-color:#e8e4d7;color:#9c9c8e}
.scrapbook-look img{width:100%;height:93px;object-fit:contain}.scrapbook-look.locked img{filter:grayscale(1);opacity:.28}.scrapbook-look strong{display:block;font-size:11px;line-height:1.4;margin-top:5px}.scrapbook-look small{display:block;font-size:10px;margin-top:5px;color:#8a997d}.scrapbook-look .look-mark{position:absolute;left:50%;top:5px;transform:translateX(-50%);width:22px;height:22px;color:#95b26d}
.scrapbook-look[data-stage="2"] .look-mark{color:#d4b761;transform:translateX(-50%) scaleY(.42);top:1px}
.dress-preview{height:115px;position:relative;margin:0 auto 6px;width:170px}.dress-preview img{height:115px;width:170px;object-fit:contain}.dress-preview>span{position:absolute;left:50%;top:2px;width:38px;height:30px;transform:translateX(-50%)}
.filling-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px}.filling-choice{border:2px solid #e0e5d3;border-radius:19px;min-height:79px;padding:9px 6px;background:#f5f5e9;color:#648164;font-size:13px;font-weight:800}.filling-choice svg{display:block;margin:0 auto 7px;width:25px;height:25px;stroke-width:1.6}.filling-choice small{display:block;font-size:9px;line-height:1.4;margin-top:5px;font-weight:650}.filling-choice[aria-pressed=true]{background:#e5efda;border-color:#92b07a}.filling-choice[data-filling=sparkle]{color:#a17b91}.filling-choice[data-filling=brave]{color:#a77e5d}
.unlock-note{font-size:12px!important;margin:0}.section-caption{font-size:12px;font-weight:800;margin:23px 0 10px;color:#7b8d75;letter-spacing:.2px}
.hat-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.hat-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 5px;min-height:80px;border:2px solid #e5e9da;border-radius:19px;background:#f4f6e8;color:#667f67;font-size:10px;font-weight:800}.hat-choice svg{width:34px;height:30px;stroke-width:1.3}.hat-choice[aria-pressed=true]{background:#e5efd8;border-color:#95b279}.hat-choice:disabled{opacity:.45}.hat-choice small{font-size:8px;line-height:1.4;font-weight:650;max-width:100px}.hat-choice .hat-lock{font-size:8px;color:#7d8877}
.dress-footer{display:flex;align-items:center;justify-content:space-between;margin-top:9px}.dress-footer .text-button{margin:0;padding-left:3px}.icon-button{display:grid;place-items:center;width:44px;height:44px;border-radius:15px;background:#edf2e7;color:#6e876e;border:1px solid #e0e7d5}.icon-button svg{width:21px;height:21px;stroke-width:1.5}
#color-choices{margin-top:13px}.color-choice{min-width:0;min-height:44px;border:2px solid #e3e9da;border-radius:14px;background:#f2f5e8;padding:2px}.color-choice img{width:100%;height:38px;object-fit:contain;border:0;background:none}.color-choice[aria-pressed=true]{border-color:#d89f99;background:#f7e5db}
.manage-friend{display:flex;align-items:center;gap:10px;margin:8px 0;padding:7px 0}.manage-friend img{width:54px;height:42px;object-fit:contain}.manage-friend strong{font-size:14px;margin-right:auto;text-align:left;overflow-wrap:anywhere}.manage-friend button{min-width:44px;min-height:44px;border-radius:14px;border:1px solid #dfdfd3;background:#f6e9df;color:#9a7367;font-size:12px}
#offline-status{font-size:11px;color:#7d8d72}.playtest-open{position:absolute;right:19px;bottom:28px;font-size:11px;min-height:44px;padding:8px 13px;background:#fffff0bf;color:#708169;border:1px solid white;border-radius:17px;z-index:9}
#playtest-dialog .scenario-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:16px 0}.scenario-grid button{min-height:60px;border:2px solid #dce6d0;border-radius:17px;background:#edf3e2;font-size:13px;font-weight:750;color:#5e775e}#playtest-dialog p{font-size:12px}.pet-game.is-scenario .playtest-open{background:#f9e1ad;color:#7c663c}
.pet-game[data-sky-phase=night] .home-growth,.pet-game[data-sky-phase=night] .hug-score,.pet-game[data-sky-phase=night] .hug-score p{color:#fff8e8;text-shadow:0 1px 2px #3e4c75}
.pet-game[data-sky-phase=night] .pet-nameplate{background:#f7f4e5da}.pet-game[data-sky-phase=night] .quest>p{color:#fff8e8;text-shadow:0 1px 2px #3e4c75}
@media(hover:hover) and (pointer:fine){.pet-button:hover{background:#eaf2db}.treat-button:hover{background:#fbfae8}.hat-choice:not(:disabled):hover,.filling-choice:not(:disabled):hover{border-color:#adbf95}.pet-game .home-growth:hover{filter:brightness(1.05)}}
@media(max-width:700px){
 .pet-game .hud{left:12px;right:12px;gap:7px}.pet-game .profile-chip strong{max-width:110px}.pet-game .profile-chip{max-width:calc(100% - 139px)}
 .pet-game .quest{top:90px}.pet-game .quest h1{font-size:26px}.pet-game .quest p{font-size:11px;padding:0 6px}.pet-game .quest-tag{font-size:8px}
 .home-growth{top:158px;width:225px}.home-growth strong,.home-growth small{font-size:10px}
 .pet-game .stage{inset:180px -22px 205px}.pet-nameplate{bottom:211px;padding:6px 11px}
 .pet-game #care-dock{bottom:99px;width:calc(100% - 28px)}.care-actions{gap:8px}.care-actions #care-button{height:61px;font-size:22px;padding:0 13px;max-width:200px}.care-actions #care-button svg{width:21px;height:21px}.pet-button{min-width:74px;height:59px;padding:6px 10px;border-radius:21px}.treat-button{min-width:51px;height:57px}
 .pet-game .gesture-tip{font-size:10px;margin-top:13px}.pet-game .game-nav{padding:5px;gap:3px;bottom:max(16px,env(safe-area-inset-bottom));border-radius:25px}.pet-game .game-nav button{font-size:12px;min-width:72px;padding:6px 10px;gap:5px;height:44px}.pet-game .game-nav button svg{width:19px;height:19px}
 .pet-game .world-weather{left:10px;bottom:19px;width:44px;height:48px;min-width:0;padding:7px}.pet-game .world-weather>span{display:none}.pet-game .world-weather svg{width:27px;height:27px}.pet-game .game-nav{left:auto;right:10px;transform:none}.playtest-open{right:12px;bottom:77px;min-height:30px;padding:5px 9px;font-size:9px}
 .pet-game.battle-ready .quest{top:94px}.pet-game.battle-ready .quest h1{font-size:26px}.pet-game.battle-ready .stage{top:164px;bottom:226px}.pet-game.battle-ready #battle-dock{bottom:100px;max-width:310px}
 .pet-game.battle-mode:not(.battle-ready) .quest{top:90px}.pet-game.battle-mode:not(.battle-ready) .quest h1{font-size:24px}.pet-game.battle-mode:not(.battle-ready) .stage{top:204px;bottom:232px}.hug-score{top:161px;width:70%}.hug-score p{font-size:9px}.pet-game .battle-touch{height:68px}.pet-game .battle-touch strong{font-size:23px}.pet-game .touch-footer{font-size:10px}
 .pet-game .friends-panel{top:92px;bottom:96px;width:calc(100% - 25px);padding:18px 16px}.pet-game .friends-heading h2{font-size:20px;max-width:220px}.pet-game .friends-heading p{font-size:11px;max-width:220px}.pet-game .friend-list{grid-template-columns:1fr;margin:14px 0}.pet-game .friend-card{grid-template-columns:60px 1fr}.pet-game .friend-card .actions{grid-column:2;grid-row:2/4;padding:4px 0 0}.pet-game .friend-card p{display:none}
 #growth-dialog,#dress-dialog{padding:15px 16px 19px}.scrapbook-look img{height:77px}.scrapbook-look strong{font-size:10px}.scrapbook-looks{gap:6px}.scrapbook-look{border-radius:18px}.filling-choice{font-size:12px}.filling-choice small{font-size:9px}.hat-choice{min-height:75px}dialog{padding:19px 20px}dialog h2,.dialog-header h2{font-size:24px}
}
@media(max-height:700px){
 .pet-game .hud{top:11px;height:51px}.pet-game .profile-chip{min-height:51px}.pet-game .profile-chip img{width:48px;height:40px}.pet-game .profile-chip small{font-size:9px}.pet-game .sound-button{height:47px}.pet-game .growth-chip{min-height:47px}
 .pet-game .quest{top:82px}.pet-game .quest h1{font-size:24px}.pet-game .quest-tag{font-size:8px}.pet-game .quest p{font-size:11px}.home-growth{top:143px;min-height:32px;width:215px}
 .pet-game .stage{top:165px;bottom:193px}.pet-nameplate{bottom:199px;padding:6px 10px}.pet-nameplate #mood-chip{font-size:12px}.pet-nameplate #pet-health{font-size:9px}
 .pet-game #care-dock{bottom:91px}.care-actions #care-button{height:57px;font-size:21px}.pet-button{height:56px}.treat-button{height:54px}.pet-game .gesture-tip{margin-top:12px}
 .pet-game.battle-ready .quest{top:85px}.pet-game.battle-ready .quest h1{font-size:25px}.pet-game.battle-ready .stage{top:148px;bottom:209px}.pet-game.battle-ready #battle-dock{bottom:94px}.pet-game.battle-mode:not(.battle-ready) .quest{top:79px}.pet-game.battle-mode:not(.battle-ready) .stage{top:192px;bottom:215px}.hug-score{top:143px}.hug-score p{margin-top:5px}.pet-game #battle-dock{bottom:90px}.pet-game .battle-touch{height:61px}.pet-game .touch-footer{margin-top:9px}.pet-game .game-nav{bottom:12px}.pet-game .world-weather{bottom:15px}
}
@media(max-width:350px){.pet-game .hud{left:9px;right:9px}.pet-game .profile-chip{padding-right:9px}.pet-game .profile-chip strong{max-width:80px;font-size:12px}.pet-game .profile-chip small{font-size:8px}.pet-game .profile-chip img{width:43px}.pet-game .growth-chip{min-width:61px;padding:8px;gap:4px}.pet-game .growth-chip strong{font-size:18px}.pet-game .growth-chip>svg{width:19px}.pet-game .sound-button{width:44px}.care-actions{gap:7px}.care-actions #care-button{font-size:20px}.care-actions #care-button svg{width:19px}.pet-button{min-width:66px}.treat-button{min-width:47px}.pet-game .game-nav{right:7px;gap:0}.pet-game .game-nav button{padding:6px 8px;min-width:69px}.pet-game .world-weather{left:7px}.pet-game .gesture-tip{font-size:9px}.pet-game .friends-panel{padding:15px 13px}.pet-game .friends-heading h2{font-size:18px}.pet-game .friends-heading p{font-size:10px}}
@media(prefers-reduced-motion:reduce){dialog{animation:none}.pet-game *,dialog *{transition:none!important}.pet-game button:active,dialog button:active{transform:none}.pet-game .home-growth:active{transform:translateX(-50%)}.care-trail{display:none}.hug-hearts.show{transform:none}.is-mad .fallback-body,.is-sleepy .fallback-body{transform:none}}
/* Keep the playable instructions readable on small phones. */
.pet-game .gesture-tip{font-size:12px;min-height:32px;max-width:330px;margin:12px auto 0;}
.pet-button{font-size:14px}.treat-button{font-size:11px}
.hat-choice{font-size:12px}.hat-choice small{font-size:10px}
.hat-choice:disabled{opacity:1;color:#818875;background:#f8f7ee;border-color:#ececdd}
.hat-choice:disabled svg{opacity:.5}
.filling-choice small{font-size:10px}
@media(max-width:350px){.pet-game .gesture-tip{font-size:11px;max-width:270px}.hat-choice{font-size:11px}.hat-choice small{font-size:9px}}
/* Portrait details stay beneath the sticky close row while a dialog scrolls. */
.dress-preview{isolation:isolate}
dialog .dialog-header{z-index:10}
