/* =====================================================================
   assets/css/album.css - 우리집 아이 사진 · 성장앨범 · 건강 기록 · 가족  [통합 v1.2.0]
   (모바일 먼저, 넓은 화면은 맨 아래 @media)
   ===================================================================== */

.pw-label-sm { font-size: 13px; color: var(--pw-text-2); margin-top: 6px; }
.pw-select-sm { max-width: 220px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
.pw-plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pw-chip-row { list-style: none; margin: 10px 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pw-moment { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--pw-brand-soft); color: var(--pw-brand-strong);
             font-size: 12.5px; font-weight: 700; white-space: nowrap; }

/* ---------- 프로필: 메뉴 · 사진 모음 ---------- */
.pw-pet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pw-btn-memorial { background: #f1edf6; border-color: #ded6ea; color: #6c5a8a; }   /* 통합 v1.3.0 */
.pw-pet-photos { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pw-pet-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--pw-radius-sm); display: block; background: var(--pw-surface-2); }
.pw-pet-photo-tools { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; margin-top: 3px; }
.pw-pet-photo-tools form { margin: 0; }
.pw-pet-photo-add { display: grid; gap: 6px; max-width: 520px; }
.pw-health-upcoming { margin: 0 0 12px; }
.pw-due { margin-left: 4px; color: var(--pw-health); font-size: 13.5px; }
.pw-due.is-late { color: var(--pw-danger); }

/* ---------- 성장앨범 사진 칸 ---------- */
.pw-growth-tiles { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pw-growth-tile a { display: block; color: var(--pw-text); text-decoration: none; background: var(--pw-surface);
                    border: 1px solid var(--pw-border); border-radius: var(--pw-radius); overflow: hidden; }
.pw-growth-tile img, .pw-growth-text { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--pw-surface-2); }
.pw-growth-text { padding: 14px; font-size: 14px; line-height: 1.6; color: var(--pw-text-2); overflow: hidden; }
.pw-growth-cap { display: grid; gap: 2px; padding: 6px 8px 8px; }
.pw-growth-cap .pw-meta { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.pw-feature-row { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pw-feature-row li { background: var(--pw-surface); border: 1px solid var(--pw-border); border-radius: var(--pw-radius); padding: 10px 12px;
                     display: grid; gap: 2px; font-size: 13.5px; color: var(--pw-text-2); }
.pw-feature-row strong { color: var(--pw-text); font-size: 14.5px; }

/* ---------- 한 아이의 앨범 ---------- */
.pw-album-head { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-items: center; margin: 4px 0 14px; }
.pw-album-head h1 { font-size: 24px; margin: 2px 0 4px; }
.pw-album-head p { margin: 0 0 6px; }
.pw-album-cover img, .pw-album-cover .pw-pet-noimg { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; display: flex;
                     align-items: center; justify-content: center; background: var(--pw-surface-2); font-size: 36px; }
.pw-album-head.is-rainbow h1 { color: #6c5a8a; }
.pw-album-vis { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.pw-album-vis .pw-select { width: auto; }
.pw-album-vis .pw-help { flex-basis: 100%; margin: 0; }
.pw-album-head, .pw-album-vis, .pw-anniv, .pw-timeline { max-width: var(--pw-read-width); }
.pw-anniv { margin-bottom: 14px; background: var(--pw-warn-soft); border-color: #f1e1b0; }
.pw-timeline { list-style: none; margin: 0 0 14px; padding: 0 0 0 14px; border-left: 3px solid var(--pw-border); display: grid; gap: 16px; }
.pw-tl-item { position: relative; scroll-margin-top: calc(var(--pw-header-h) + 12px); }
.pw-tl-item::before { content: ""; position: absolute; left: -22px; top: 6px; width: 13px; height: 13px; border-radius: 50%;
                      background: var(--pw-brand); border: 3px solid var(--pw-bg); }
.pw-tl-item:target .pw-tl-body { box-shadow: 0 0 0 3px var(--pw-brand-soft); }
.pw-tl-date { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; font-weight: 700; }
.pw-tl-body { padding: 10px; }
.pw-tl-photo { display: block; width: 100%; max-height: 520px; object-fit: contain; border-radius: var(--pw-radius-sm); background: var(--pw-surface-2); }
.pw-tl-text { margin: 10px 2px 4px; line-height: 1.75; white-space: normal; overflow-wrap: anywhere; }
.pw-tl-meta { margin: 6px 2px 0; }

/* ---------- 건강 기록 ---------- */
.pw-health-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.pw-weight-chart { display: block; width: 100%; height: auto; max-height: 150px; color: var(--pw-health); }
.pw-health-grid .pw-photo-meta-grid > *, .pw-health-grid .pw-input { min-width: 0; }
.pw-health-grid .pw-input { width: 100%; max-width: 100%; }
.pw-health-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.pw-health-list li { padding: 12px 14px; }
.pw-health-row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.pw-health-type { font-size: 13px; font-weight: 700; color: var(--pw-health); }
.pw-health-list .pw-meta { margin: 2px 0; }
.pw-health-memo { margin: 6px 0; font-size: 14.5px; color: var(--pw-text-2); }

/* ---------- 가족 ---------- */
.pw-family-invite { margin-bottom: 16px; }
.pw-copy-row { display: flex; gap: 8px; margin: 6px 0 10px; }
.pw-copy-row .pw-input { min-width: 0; flex: 1; font-size: 13.5px; }
.pw-family-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pw-family-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; }
.pw-family-list p { margin: 2px 0 0; }
.pw-family-join { max-width: 520px; margin: 18px auto; text-align: center; padding: 22px 18px; }
.pw-family-join h1 { font-size: 22px; margin: 10px 0 6px; }
.pw-family-join-photo, .pw-family-join .pw-pet-noimg { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin: 0 auto;
                         display: flex; align-items: center; justify-content: center; background: var(--pw-surface-2); font-size: 46px; }
.pw-family-join-list { text-align: left; margin: 12px 0 16px; padding-left: 20px; display: grid; gap: 4px; }

@media (min-width: 720px) {
    .pw-pet-photos { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .pw-growth-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .pw-feature-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .pw-album-head { grid-template-columns: 110px minmax(0, 1fr); }
    .pw-album-cover img, .pw-album-cover .pw-pet-noimg { width: 110px; height: 110px; }
    .pw-timeline { padding-left: 22px; }
    .pw-tl-item::before { left: -30px; }
    .pw-tl-body { padding: 14px; }
    .pw-health-grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
}
@media (min-width: 1024px) {
    .pw-growth-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* 성장앨범 추가 사진 (Forever Pet 에서 옮겨 온 여러 장, v2.1.0) */
.pw-growth-extra { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.pw-growth-extra img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--pw-radius-sm); background: var(--pw-surface-2); }
.pw-growth-extra-edit { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pw-growth-extra-edit img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--pw-radius-sm); }
