.pet-companion-sheet{position:absolute;right:10px;bottom:calc(10px + env(safe-area-inset-bottom));left:10px;max-height:min(78dvh,630px);padding:16px;border-radius:23px 23px 18px 18px;background:#fffdf8;box-shadow:0 18px 50px rgba(37,28,20,.3);overflow:auto}.pet-companion-sheet header{display:grid;grid-template-columns:38px minmax(0,1fr) 38px;align-items:center;gap:10px}.pet-companion-sheet header small{color:#6f8769;font-size:10px}.pet-companion-sheet h2{margin:2px 0 0;font-size:21px}.pet-companion-sheet header>button{display:grid;width:38px;height:38px;place-items:center;border:0;border-radius:50%;color:#647260;background:#edf2e9;font-size:24px}.pet-companion-empty{display:grid;min-height:180px;place-content:center;color:var(--muted);font-size:11px;text-align:center}
.pet-companion-list{display:grid;gap:8px;margin-top:13px}.pet-companion-card{display:grid;grid-template-columns:58px minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px;border:1px solid rgba(79,117,78,.16);border-radius:15px;background:#f7f9f4}.pet-companion-art{width:56px;height:62px;border:2px solid #fff;border-radius:12px}.pet-companion-card small,.pet-companion-card strong,.pet-companion-card em{display:block}.pet-companion-card small{color:var(--muted);font-size:9px}.pet-companion-card strong{margin-top:2px;font-size:14px}.pet-companion-card em{margin-top:2px;color:#6f8769;font-size:9px;font-style:normal}.pet-companion-card>.pet-companion-primary{padding:5px 7px;border-radius:99px;color:var(--green);background:#e8f0e3;font-size:9px;font-weight:850}.pet-companion-add,.pet-companion-confirm,.pet-companion-name-form button{width:100%;min-height:44px;margin-top:10px;border:0;border-radius:13px;color:#fff;background:var(--green);font-size:12px;font-weight:850}.pet-companion-confirm:disabled{color:#999187;background:#e1ddd5}.pet-companion-note,.pet-companion-full{margin:10px 3px 0;color:var(--muted);font-size:9px;line-height:1.5;text-align:center}.pet-companion-full{padding:10px;border-radius:12px;background:#f1eee7;color:#6f675d}
.pet-companion-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:13px}.pet-companion-choice{min-width:0;padding:6px;border:2px solid transparent;border-radius:13px;color:inherit;background:#f2f5ee}.pet-companion-choice.is-selected{border-color:var(--green);background:#eaf2e5}.pet-companion-choice .pet-art{display:block;width:100%;aspect-ratio:1/1.08;border-radius:10px}.pet-companion-choice strong,.pet-companion-choice small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pet-companion-choice strong{margin-top:4px;font-size:11px}.pet-companion-choice small{margin-top:1px;color:var(--muted);font-size:8px}.pet-companion-naming{display:grid;place-items:center;margin-top:13px;padding:13px;border-radius:16px;background:#eef3e8;text-align:center}.pet-companion-naming .pet-companion-art{width:112px;height:124px}.pet-companion-naming strong{margin-top:7px;font-size:16px}.pet-companion-naming small{margin-top:3px;color:var(--muted);font-size:9px}.pet-companion-name-form{margin-top:10px}.pet-companion-name-form label{display:block;margin-bottom:5px;font-size:10px;font-weight:850}.pet-companion-name-form input{width:100%;height:43px;padding:0 12px;border:1px solid var(--line);border-radius:12px;background:#fff;font:inherit}.pet-companion-name-form button{margin-top:8px}
@media(max-width:360px){.pet-companion-sheet{right:7px;left:7px;padding:13px}.pet-companion-choices{gap:5px}.pet-companion-card{grid-template-columns:52px minmax(0,1fr) auto}.pet-companion-art{width:50px;height:56px}}
.pet-companion-card>button{padding:6px 8px;border:0;border-radius:99px;color:var(--green);background:#e8f0e3;font-size:9px;font-weight:850}.pet-companion-care-head{display:grid;grid-template-columns:74px minmax(0,1fr);align-items:center;gap:11px;margin-top:12px;padding:10px;border-radius:15px;background:#eef3e8}.pet-companion-care-head .pet-companion-art{width:72px;height:80px}.pet-companion-care-head small,.pet-companion-care-head strong,.pet-companion-care-head em{display:block}.pet-companion-care-head small{color:var(--muted);font-size:9px}.pet-companion-care-head strong{margin-top:2px;font-size:17px}.pet-companion-care-head em{margin-top:3px;color:#6f8769;font-size:9px;font-style:normal}.pet-companion-care-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:8px}.pet-companion-care-stats span{padding:8px 3px;border-radius:11px;background:#f1eee7;text-align:center}.pet-companion-care-stats b,.pet-companion-care-stats small{display:block}.pet-companion-care-stats b{font-size:12px}.pet-companion-care-stats small{margin-top:2px;color:var(--muted);font-size:8px}.pet-companion-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:9px}.pet-companion-action{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:6px;padding:7px;border:1px solid var(--line);border-radius:12px;background:#fff}.pet-companion-action>span{font-size:18px}.pet-companion-action strong,.pet-companion-action small{display:block}.pet-companion-action strong{font-size:10px}.pet-companion-action small{margin-top:1px;color:var(--muted);font-size:7px}.pet-companion-action button{min-width:48px;min-height:31px;padding:0 5px;border:0;border-radius:9px;color:#fff;background:var(--green);font-size:8px;font-weight:800}.pet-companion-action button:disabled{color:#999187;background:#e1ddd5}.pet-companion-attributes{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:41px;margin-top:9px;padding:0 11px;border:0;border-radius:12px;color:var(--green);background:#edf3e8;font-size:10px}.pet-companion-records{margin-top:11px}.pet-companion-records>strong{font-size:11px}.pet-companion-records ul{display:grid;gap:5px;margin:6px 0 0;padding:0;list-style:none}.pet-companion-records li{display:grid;grid-template-columns:25px minmax(0,1fr);align-items:center;gap:6px;padding:6px 8px;border-radius:10px;background:#f6f3ed}.pet-companion-records li span{font-size:15px}.pet-companion-records li strong,.pet-companion-records li small{display:block}.pet-companion-records li strong{font-size:9px}.pet-companion-records li small,.pet-companion-records p{color:var(--muted);font-size:8px}.pet-companion-records p{margin:6px 0 0;padding:9px;border-radius:10px;background:#f6f3ed;text-align:center}
.pet-companion-lineup-open{width:100%;min-height:42px;margin-top:10px;border:1px solid rgba(79,117,78,.2);border-radius:13px;color:var(--green);background:#edf3e8;font-size:11px;font-weight:850}.pet-lineup-list{display:grid;gap:7px;margin-top:13px}.pet-lineup-row{display:grid;grid-template-columns:38px 48px minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px;border:1px solid rgba(79,117,78,.16);border-radius:14px;background:#f7f9f4}.pet-lineup-row>b{color:var(--green);font-size:10px;text-align:center}.pet-lineup-row .pet-companion-art{width:46px;height:52px}.pet-lineup-row strong,.pet-lineup-row small{display:block}.pet-lineup-row strong{font-size:12px}.pet-lineup-row small{margin-top:2px;color:var(--muted);font-size:8px}.pet-lineup-row>span{display:flex;gap:4px}.pet-lineup-row button{display:grid;width:31px;height:31px;place-items:center;border:0;border-radius:9px;color:var(--green);background:#e5eee0;font-size:14px;font-weight:900}.pet-lineup-row button:disabled{color:#aaa49d;background:#ebe8e2}
@media(max-width:360px){.pet-companion-actions{grid-template-columns:1fr}.pet-companion-action{padding:6px}.pet-companion-care-head{grid-template-columns:66px minmax(0,1fr)}.pet-companion-care-head .pet-companion-art{width:64px;height:72px}}

/* 三宠伙伴主页：统一首位与后续伙伴的展示、照料和属性入口。 */
.pet-companion-sheet{right:max(10px,calc((100% - 720px)/2 + 10px));left:max(10px,calc((100% - 720px)/2 + 10px));max-height:min(88dvh,760px);padding:18px}.pet-companion-sheet header{grid-template-columns:46px minmax(0,1fr) 46px}.pet-companion-sheet header>button{width:46px;height:46px;font-size:26px}.pet-companion-sheet header small{font-size:13px;line-height:1.4}.pet-companion-sheet h2{font-size:25px}.pet-companion-roster-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:18px 2px 10px}.pet-companion-roster-head strong{font-size:18px}.pet-companion-roster-head span{color:var(--muted);font-size:13px;text-align:right}.pet-companion-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.pet-companion-gallery .pet-companion-card{position:relative;display:flex;min-width:0;min-height:238px;padding:9px 8px 11px;align-items:center;flex-direction:column;border:1px solid rgba(79,117,78,.2);border-radius:17px;color:inherit;background:#f7f9f4;text-align:center}.pet-companion-gallery button.pet-companion-card{cursor:pointer}.pet-companion-gallery .pet-companion-card:focus-visible{outline:3px solid rgba(79,117,78,.35);outline-offset:2px}.pet-companion-gallery .pet-companion-art{width:100%;height:auto;aspect-ratio:1/1.08;border-radius:13px}.pet-companion-position{position:absolute;top:14px;left:13px;padding:4px 7px;border-radius:99px;color:#fff;background:rgba(54,82,52,.84);font-size:12px;font-weight:850}.pet-companion-gallery .pet-companion-card strong{display:block;max-width:100%;margin-top:8px;overflow:hidden;font-size:16px;text-overflow:ellipsis;white-space:nowrap}.pet-companion-gallery .pet-companion-card small{display:block;margin-top:3px;color:var(--muted);font-size:13px}.pet-companion-gallery .pet-companion-card em{display:block;margin-top:4px;color:#5f7a5b;font-size:13px;font-style:normal}.pet-companion-gallery .pet-companion-card>b{margin-top:auto;padding-top:8px;color:var(--green);font-size:13px}.pet-companion-gallery .pet-companion-card.is-empty{justify-content:center;border-style:dashed;background:#f4f0e8}.pet-companion-gallery .pet-companion-card.is-empty>span{display:grid;width:54px;height:54px;place-items:center;border-radius:50%;color:#6f8769;background:#e5ecdf;font-size:32px}.pet-companion-gallery .pet-companion-card.is-empty strong{white-space:normal}.pet-companion-gallery .pet-companion-card.is-empty small{line-height:1.45}.pet-companion-add,.pet-companion-confirm,.pet-companion-name-form button{min-height:50px;font-size:16px}.pet-companion-lineup-open{min-height:48px;font-size:15px}.pet-companion-note,.pet-companion-full{font-size:13px;line-height:1.6}.pet-companion-care-head{grid-template-columns:96px minmax(0,1fr);gap:14px;margin-top:16px;padding:13px}.pet-companion-care-head .pet-companion-art{width:94px;height:104px}.pet-companion-care-head small{font-size:13px}.pet-companion-care-head strong{font-size:22px}.pet-companion-care-head em{font-size:13px}.pet-companion-care-stats{gap:8px;margin-top:10px}.pet-companion-care-stats span{padding:11px 5px}.pet-companion-care-stats b{font-size:16px}.pet-companion-care-stats small{font-size:13px}.pet-companion-actions{gap:8px;margin-top:11px}.pet-companion-action{grid-template-columns:34px minmax(0,1fr) auto;gap:8px;min-height:70px;padding:10px}.pet-companion-action>span{font-size:23px}.pet-companion-action strong{font-size:14px}.pet-companion-action small{font-size:12px;line-height:1.35}.pet-companion-action button{min-width:58px;min-height:44px;font-size:12px}.pet-companion-attributes{min-height:50px;padding:0 14px;font-size:14px;font-weight:800}.pet-companion-records{margin-top:15px}.pet-companion-records>strong{font-size:16px}.pet-companion-records ul{gap:7px;margin-top:9px}.pet-companion-records li{grid-template-columns:32px minmax(0,1fr);gap:8px;padding:9px 10px}.pet-companion-records li span{font-size:20px}.pet-companion-records li strong{font-size:13px}.pet-companion-records li small,.pet-companion-records p{font-size:12px;line-height:1.45}.pet-lineup-row>b{font-size:13px}.pet-lineup-row strong{font-size:15px}.pet-lineup-row small{font-size:12px}.pet-lineup-row button{width:42px;height:42px}.pet-companion-choice strong{font-size:14px}.pet-companion-choice small{font-size:12px}.pet-companion-naming strong{font-size:19px}.pet-companion-naming small,.pet-companion-name-form label{font-size:13px}
@media(max-width:520px){.pet-companion-sheet{right:8px;left:8px;padding:15px}.pet-companion-roster-head{align-items:flex-start;flex-direction:column;gap:3px}.pet-companion-roster-head span{text-align:left}.pet-companion-gallery{gap:6px}.pet-companion-gallery .pet-companion-card{min-height:218px;padding:7px 5px 9px}.pet-companion-gallery .pet-companion-card strong{font-size:14px}.pet-companion-gallery .pet-companion-card small,.pet-companion-gallery .pet-companion-card em,.pet-companion-gallery .pet-companion-card>b{font-size:12px}.pet-companion-position{top:10px;left:9px;font-size:11px}.pet-companion-actions{grid-template-columns:1fr}.pet-companion-action{min-height:66px}}
