/* Pet information sheets and shared cosmetic milestone presentation. */
.pet-analysis-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:4px}
.pet-analysis-actions button{min-height:44px;padding:10px 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.pet-analysis-actions a{display:inline-flex;min-height:44px;align-items:center}
.pet-sheet{width:min(480px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;overflow:hidden;box-shadow:0 18px 60px #0003}
.pet-sheet::backdrop{background:rgba(31,29,26,.48)}
.pet-sheet-layout{display:flex;flex-direction:column;max-height:calc(100dvh - 26px)}
.pet-sheet-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px;border-bottom:1px solid var(--line);flex:none}
.pet-sheet-header h2{font-size:22px;line-height:1.2;margin:0;min-width:0}
.pet-sheet-header .button{flex:none;min-width:64px}
.pet-sheet-content{padding:20px 20px max(24px,env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;min-height:0}
.breed-guess{margin:24px 0}.breed-guess h3{font-size:16px;margin:0}.breed-guess .bar{margin:8px 0}.breed-guess p{margin:10px 0}
@media(max-width:600px){.pet-sheet{margin:auto auto 0;width:100%;max-width:100%;max-height:calc(100dvh - 16px);border-radius:24px 24px 0 0!important}.pet-sheet-layout{max-height:calc(100dvh - 18px)}}
#details-view>section{margin-top:28px}
#details-view h3{font-size:17px;line-height:1.3;margin:24px 0 12px}
.virtual-play{padding:20px 16px;border:1px solid var(--line);border-radius:24px;background:var(--surface)}
.virtual-play>h2,.impact-section>h2{margin:0 0 12px}
.virtual-play>.privacy-note{margin:0 0 20px}
.virtual-play .cc-actions{padding:20px 0 0;margin:24px 0 0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent}
.virtual-play .cc-action{flex-wrap:wrap}.virtual-play .cc-action small{flex:1 1 100%}
.impact-section{padding-top:28px;border-top:1px solid var(--line)}
.impact-section a.button{display:inline-flex;align-items:center;text-decoration:none}
.visit-actions{display:flex;flex-wrap:wrap;align-items:stretch;gap:12px;margin-top:12px}
.visit-actions .button{flex:1 1 0;min-width:0;max-width:100%;overflow-wrap:anywhere}
.care-progress{min-width:0;text-align:left}
.care-progress .care-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;align-items:baseline;margin-top:20px}
.care-summary>span:first-child{grid-column:1/-1;font-weight:600}
.care-summary strong{font-size:16px;line-height:1.4;color:var(--ink)}
.care-percent{font-size:12px;text-align:right}
.care-milestones{list-style:none;padding:0;margin:16px 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.care-milestone{display:flex;align-items:flex-start;gap:9px;padding:12px 10px;border:1px solid var(--line);border-radius:12px;min-width:0;background:var(--paper)}
.care-status-icon{width:20px;height:20px;border:1.5px solid var(--muted);border-radius:50%;flex:none;display:grid;place-items:center;margin-top:1px;font-size:13px;font-weight:700}
.care-milestone strong{font-size:13px;line-height:1.4;display:block;overflow-wrap:anywhere}
.care-milestone small{display:block;font-size:11px;color:var(--muted);margin-top:4px}
.care-milestone.is-complete{background:#eaf4ed;border-color:#a5c6ae}
.care-milestone.is-complete .care-status-icon{background:#236d3f;border-color:#236d3f;color:white}
.care-milestone.is-complete small{color:#235736}
.care-milestone-action{width:100%;height:100%;min-height:76px;text-align:left;font:inherit;font-weight:600;color:var(--ink)}
.care-milestone-action:hover{border-color:var(--ink)}
.care-milestone-action:focus-visible{outline:3px solid var(--rust);outline-offset:3px}
.care-progress>.privacy-note{display:block;margin-top:16px}
.care-grid>.care-complete{background:#eaf4ed}
@media(max-width:340px){.care-milestones{grid-template-columns:1fr}.virtual-play{padding:16px 12px}.care-progress .care-summary{grid-template-columns:1fr}.care-percent{text-align:left}}

/* Pet-care tabs keep a single activity/status surface in each panel. */
#details-view .pet-care-tabs{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:0;margin-top:24px;padding:0;background:transparent;border-radius:0;border-bottom:1px solid var(--line)}
#details-view .pet-care-tabs [role=tab]{min-width:0;min-height:60px;border:0;border-bottom:3px solid transparent;border-radius:0;padding:8px 4px;background:transparent;color:var(--ink);font:700 20px/1.3 Archivo,sans-serif;cursor:pointer;text-align:center;transition:color .15s}
#details-view .pet-care-tabs [role=tab] span{display:block;overflow-wrap:anywhere}
#details-view .pet-care-tabs [role=tab] small{display:block;margin-top:5px;color:var(--muted);font:500 11px/1.4 Inter,sans-serif}
#details-view .pet-care-tabs [aria-selected=true]{border-bottom-color:var(--rust);color:#b90000}
#details-view .pet-care-tabs [role=tab]:hover{color:#b90000}
#details-view .pet-care-tabs [role=tab]:focus-visible,#details-view .pet-care-panel:focus-visible{outline:3px solid var(--rust);outline-offset:3px}
#details-view>.pet-care-panel{margin:0;padding:20px 0 0;border:0;border-radius:0;background:transparent}
#details-view>.pet-care-panel[hidden]{display:none!important}
#details-view .pet-care-panel>h2{margin:0 0 16px}
#details-view .pet-play-summary,#details-view .pet-collection-summary{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:8px;font-size:14px;margin:20px 0 8px}
#details-view .pet-play-summary span,#details-view .pet-collection-summary span{font-size:12px;color:var(--muted)}
#details-view .care-action-panel>h3{margin-top:22px}
#details-view .care-action-panel .care-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#details-view .care-action-panel .care-grid button{min-height:64px;border:0;font-size:16px;display:flex;align-items:center;justify-content:space-between;gap:10px}
#details-view .care-action-panel .care-complete{color:#235736;background:#eaf4ed}
#details-view .care-action-panel .care-complete::before{content:none}
#details-view .pet-collection-summary{margin-top:32px;padding-top:24px;border-top:1px solid var(--line)}
#details-view .impact-section .cc-actions{margin-top:12px;padding:0;border:0;background:transparent}
#details-view .impact-section .cc-actions>.eyebrow{display:none}
@media(max-width:420px){#details-view .pet-care-tabs [role=tab]{font-size:18px}#details-view .pet-care-tabs [role=tab] small{font-size:10px}.visit-actions .button{flex-basis:100%}}

/* Saved cumulative progress, not a daily score or an invented streak. */
#details-view .pet-progress-steps{display:flex;justify-content:center;align-items:center;gap:5px;min-height:24px}
#details-view .pet-care-tabs [role=tab] .pet-progress-steps,#details-view .pet-care-tabs [role=tab] .pet-stamp-preview{display:flex}
#details-view .pet-progress-steps i{display:block;width:13px;height:13px;border:1.5px dashed #8f887a;border-radius:50%;background:#fff6}
#details-view .pet-progress-steps i.is-earned{border-style:solid;border-color:#8c651b;background:#e5b547}
#details-view .pet-progress-steps svg{display:block;width:100%;height:100%;fill:none;stroke:#503600;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
#details-view .pet-care-tabs [role=tab] small{margin-top:6px}
#details-view .pet-stamp-preview{display:flex;align-items:center;justify-content:center;gap:3px;min-height:24px}
#details-view .pet-stamp-preview .cc-art{width:23px;height:23px;max-width:none;filter:none}
#details-view .pet-stamp-preview [data-tier=locked]{opacity:.48}
#details-view .pet-collection-summary{display:block}
#details-view .pet-stamp-tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px;max-width:320px}
#details-view .pet-stamp-progress{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:0;min-height:44px;padding:12px 8px;border:0;border-radius:14px;background:var(--paper);color:var(--ink);font:500 12px/1.4 Inter,sans-serif;cursor:pointer}
#details-view .pet-stamp-progress:hover{background:#eee6d7}
#details-view .pet-stamp-progress:focus-visible{outline:3px solid var(--rust);outline-offset:3px}
#details-view .pet-stamp-progress .cc-art{width:48px;height:48px;max-width:none}
#details-view .pet-stamp-progress[data-tier=locked] .cc-art{opacity:.55;filter:none}
#details-view .pet-stamp-meter{display:block;width:100%;height:5px;overflow:hidden;border-radius:5px;background:#d8d2c7}
#details-view .pet-stamp-meter i{display:block;height:100%;background:#a87929;transition:width .2s ease}
#details-view [data-tier=silver] .pet-stamp-meter i{background:#69778c}
#details-view [data-tier=gold] .pet-stamp-meter i{background:#bd8d1d}
#details-view .pet-game-state{display:grid;place-items:center;flex:none;width:22px;height:22px;border:1.5px solid #8f887a;border-radius:50%}
#details-view .care-complete .pet-game-state{border-style:solid;border-color:#236d3f;background:#236d3f}
#details-view .pet-game-state svg{width:19px;height:19px;fill:none;stroke:white;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#details-view #pet-play-meter{height:12px;position:relative}
#details-view #pet-play-meter::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent calc(25% - 2px),white calc(25% - 2px),white 25%,transparent 25%,transparent calc(50% - 2px),white calc(50% - 2px),white 50%,transparent 50%,transparent calc(75% - 2px),white calc(75% - 2px),white 75%,transparent 75%);pointer-events:none}
.pet-biography{line-height:1.65;overflow-wrap:anywhere;margin-top:20px}
.pet-biography p,.pet-biography .pet-bio-source div{margin:0 0 .65em}
.pet-biography .pet-bio-source>:last-child{margin-bottom:0}
.pet-biography ul,.pet-biography ol{padding-left:24px;margin:1em 0}
.pet-biography li{margin:.3em 0}
.pet-biography blockquote{margin:1em 0;padding-left:16px;border-left:3px solid var(--line)}
.pet-biography a{text-decoration:underline;text-underline-offset:3px}
#details-view .impact-section .cc-actions{margin:0;padding:0;border:0;background:transparent}
#details-view .impact-section .cc-action-grid{grid-template-columns:1fr;margin:0;gap:14px}
#details-view .support-action-card{display:grid;grid-template-columns:64px minmax(0,1fr);gap:8px 14px;padding:14px;border-radius:16px;background:var(--f-bg,#f6f4ef)}
#details-view .support-action-art{grid-row:1 / span 2;align-self:center;width:64px;height:64px;object-fit:contain}
#details-view .support-action-card h3{grid-column:2;margin:0;font-size:18px;line-height:1.25}
#details-view .support-action-card .cc-action{grid-column:2;justify-content:center;width:fit-content;max-width:100%;min-width:0;min-height:44px;margin:0;padding:8px 14px}
#details-view .support-action-card a.cc-action{display:inline-flex;align-items:center;text-decoration:none}
@media(min-width:900px){
  #details-view .impact-section .cc-action-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  #details-view .support-action-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px}
  #details-view .support-action-card h3{min-height:45px}
  #details-view .support-action-card .cc-action{width:100%;margin-top:auto}
}
#details-view .virtual-play .care-grid{grid-template-columns:1fr;gap:12px;margin-top:18px}
#details-view .virtual-play .care-grid button{position:relative;display:grid;grid-template-columns:64px minmax(0,1fr) 28px;align-items:center;gap:14px;padding:12px 14px;min-height:88px;border-radius:16px;text-align:left;background:var(--f-white,#fff);color:var(--f-ink,#26231f)}
#details-view .virtual-play .virtual-action-art{width:64px;height:64px;object-fit:contain}
#details-view .virtual-play .virtual-action-name{min-width:0;white-space:nowrap;font-family:var(--f-head,inherit);font-size:18px;font-weight:700}
#details-view .virtual-play .pet-game-state{position:absolute;top:14px;right:14px;width:24px;height:24px;border-width:1.25px;justify-self:end}
#details-view .virtual-play .pet-game-state svg{width:16px;height:16px}
#details-view .virtual-play .care-grid button.care-complete{color:#235736;background:#eaf4ed}
@media(min-width:700px){#details-view .virtual-play .care-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Detail-only hierarchy: shared gallery cards and badges are unchanged. */
#details-view .detail-coin .coin-stage{padding:0 0 20px;background:transparent}
#details-view .detail-coin .pet-coin{width:min(200px,60vw)}
#details-view .pet-detail-header{text-align:center;overflow-wrap:anywhere}
#details-view .pet-detail-badges,#details-view .pet-personality{display:flex;flex-wrap:wrap;gap:8px}
#details-view .pet-detail-badges{justify-content:center;margin:14px 0}
#details-view .pet-detail-badges .pet-personality{display:contents}
#details-view .pill{padding:5px 10px;background:#e9e5de;color:var(--ink);font-size:12px;max-width:100%;overflow-wrap:anywhere}
#details-view .pet-detail-summary{font-size:14px;line-height:1.65;text-align:left}
#details-view .pet-facts{margin:16px 0 20px}
#details-view .pet-facts dt{font-size:14px;font-weight:700;color:var(--ink)}
#details-view .pet-facts dd{font-size:14px;font-weight:400}
#details-view .pet-text-control{display:inline-flex;align-items:center;min-height:44px;padding:8px 0;border:0;background:transparent;color:#b90000;font:600 14px/1.5 var(--sans);text-align:left}
#details-view .pet-text-control:hover{text-decoration:underline;text-underline-offset:3px}
#details-view .breed-analysis{margin-top:16px}
#details-view .pet-play-locked{margin:0;line-height:1.65}
#details-view .pet-biography{margin-top:0}
#details-view #pet-panel-play{background:transparent}
#details-view #pet-panel-play .cp-check:not(.is-done),
#details-view #pet-panel-play .cp-meter{background:var(--f-white,#fff)}
#details-view #pet-panel-play .cp-summary{margin-top:0}
#details-view #pet-panel-play .cp-chip{border:0;background:transparent;color:#4c463e}
#details-view #pet-panel-play .cp-meter{height:16px;border:0;box-sizing:border-box}
#details-view #pet-panel-play .cp-meter i{background:#8a6000}
#details-view #pet-panel-play .pet-game-state{border-width:2px;border-color:#766f65}
#details-view #pet-panel-play .care-complete .pet-game-state{border:0;background:#236d3f}
.cp-toast-care{box-sizing:border-box;width:max-content;max-width:min(520px,calc(100vw - 32px));padding:16px 20px;border:0;border-radius:16px;line-height:1.5;box-shadow:0 8px 32px #0003;background:#26231f;color:#fff;bottom:max(24px,env(safe-area-inset-bottom))}

/* Support grid: no clipping at 320px, tablet, desktop or enlarged text. */
#details-view .impact-section .cc-action-grid{display:grid;min-width:0}
#details-view .support-action-card{box-sizing:border-box;min-width:0;max-width:100%;overflow-wrap:anywhere}
#details-view .support-action-card h3{min-width:0;overflow-wrap:anywhere;hyphens:auto}
#details-view .support-action-card .cc-action,#details-view .support-action-card .button{box-sizing:border-box;max-width:100%;white-space:normal;text-align:center;overflow-wrap:anywhere}
#details-view .support-action-card .cc-support-action-controls{grid-column:2;display:flex;flex-wrap:wrap;gap:8px;min-width:0;max-width:100%}
@media(max-width:360px){#details-view .support-action-card{grid-template-columns:44px minmax(0,1fr);padding:12px}#details-view .support-action-art{width:44px;height:44px}}
@media(min-width:600px) and (max-width:899px){#details-view .impact-section .cc-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#details-view .support-action-card{grid-template-columns:48px minmax(0,1fr)}#details-view .support-action-art{width:48px;height:48px}}
@media(min-width:900px){#details-view .impact-section .cc-action-grid{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}#details-view .support-action-card .cc-support-action-controls{width:100%;margin-top:auto}#details-view .support-action-card .cc-support-action-controls .button{width:100%}#details-view .support-action-card h3{min-height:0}}
