/* v5(토스형) 화면별 규칙: 옷장 · 옷 상세 · 옷 추가 · 코디 · 살까 말까. 색·크기 토큰과 공통 부품(.say, .cta-dock, .stat)은 style.css. style.css · nav.css 뒤에 읽는다. */

/* ---- 옷장 머리: 윗줄(내 옷장) + 둥근 흰 검색·필터 단추, 분절, 큰 제목 ---- */
#app > .closet-head { margin-bottom: 10px; min-height: 48px; }
.closet-head .say-eye { margin: 0; }
#app .closet-head .icon-btn, #app .closet-head .icon-btn:hover { width: 48px; min-height: 48px; background: var(--card); color: var(--ink); box-shadow: none; }
#app .closet-head .icon-btn[aria-expanded="true"] { background: var(--brand); color: var(--on-brand); }
/* 화면 들어올 때 .enter > * 의 rise(fill both)가 고정 단추의 translateX(-50%)를 지워 오른쪽으로 밀렸다 */
#app > .cta-dock { animation: none; }
.closet-seg { margin: 0 0 18px; }
.closet-seg a:not([aria-current="page"]) { color: var(--sub); }
#app > .say { margin: 0 0 18px; }
/* 옛 .stat(홈 숫자판, style.css 177줄)의 세로 정렬·패딩·hover 를 되돌린다 */
#app > .stat { flex-direction: row; padding: 0; }
#app > .stat:hover { transform: none; box-shadow: none; }
#app > .stat span { color: var(--faint); }
#app > .stat b small { color: var(--faint); }
#app > .stat b.rose small { color: var(--brand); }

/* 가진 옷 / AI 추천: 흰 알약 */
body:is([data-route="closet"]) .tabs { margin: 0 0 12px; -webkit-mask-image: none; mask-image: none; }
body:is([data-route="closet"]) .tabs button:not([aria-selected="true"]) { background: var(--card); color: var(--sub); }
.seg-hint { margin: -6px 0 14px; }

/* ---- 종류 칩: 흰 알약 + 색 아이콘, 고른 칩은 로즈 ---- */
.cat-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px 14px; padding: 2px 20px; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip, .cat-chip:hover { flex: none; min-height: 44px; padding: 0 16px 0 10px; border-radius: var(--pill); background: var(--card); color: var(--ink); box-shadow: none; font-size: 15px; font-weight: 700; gap: 6px; }
.cat-chip.all { padding-left: 16px; }
.cat-chip i { font-style: normal; font-weight: 600; color: var(--faint); }
.cat-chip[aria-pressed="true"], .cat-chip[aria-pressed="true"]:hover { background: var(--brand); color: var(--on-brand); }
.cat-chip[aria-pressed="true"] i { color: #FFE4F0; }
.cat-art { width: 26px; height: 26px; flex: none; }
.cf .cf-line { margin-bottom: 12px; }
.cf-panel { box-shadow: none; }
.cf-panel .cf-chip:not([aria-pressed="true"]) { background: var(--soft); }
.cf-summary { margin-bottom: 10px; }

/* ---- 옷 카드: 2열 흰 카드 안에 회색 사진 칸 + 이름 + 종류 ---- */
#app #closet-list .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#closet-list .cards .card.item { background: var(--card); border-radius: 22px; padding: 10px 10px 12px; overflow: visible; }
#closet-list .cards .card.item .thumb { border-radius: 16px; background: var(--well); }
#closet-list .cards .card.item:hover .thumb { transform: none; box-shadow: none; }
#closet-list .cards .card.item .thumb > a.fill > img { padding: 8%; object-fit: contain; }
#closet-list .cards .card.item .body { padding: 10px 4px 0; }
#closet-list .cards .card.item h3 { font-size: 15px; font-weight: 700; }
#closet-list .cards .card.item .meta { font-size: 13px; color: var(--faint); }
#closet-list .cards > :nth-child(odd) .kebab-menu { right: auto; left: 0; }
#closet-list .cards > :nth-child(even) .kebab-menu { right: 0; left: auto; }
.cf-head { margin: 20px 0 10px; }
#closet-list .empty { background: var(--card); border-radius: var(--r-xl); padding: 28px 20px; }

/* ---- 옷 상세: 큰 제목(이름) 아래 흰 카드 두 장(사진·색·옮기기 / 정보 수정), 주 단추는 아래 고정 ---- */
/* style.css 1213~1219줄(카드 틀을 풀어 순서를 다시 놓던 v4 규칙)을 되돌린다 */
body[data-route="item"] #app { display: block; }
body[data-route="item"] #app > .split { display: grid; gap: 12px; }
body[data-route="item"] #app .split > .card { display: block; margin: 0; padding: 20px; border: 0; border-radius: var(--r-xl); background: var(--card); }
body[data-route="item"] #app .split > .card > * { margin-block: 0 12px; }
body[data-route="item"] #app .split > .card > :last-child { margin-bottom: 0; }
body[data-route="item"] #app .split > .card > .cutout { margin: -10px -10px 16px; min-height: 280px; border-radius: 16px; background: var(--well); }
body[data-route="item"] #app > .say-eye { display: flex; align-items: center; gap: 8px; }
body[data-route="item"] #app > .say-eye .badge { background: var(--card); }
body[data-route="item"] .details-actions { margin-top: 4px; }
body[data-route="item"] .details-actions > button { width: 100%; min-height: 52px; }
body[data-route="item"] .item-edit > summary { min-height: 48px; }

/* ---- 코디 탭: 옷 카드와 같은 2열 흰 카드, 사진 위 하트(시안 A) ---- */
body[data-route="outfits"] .looks-bar { padding: 12px 12px 12px 18px; border-radius: var(--r-xl); background: var(--card); }
body[data-route="outfits"] .looks-bar .btn { min-height: 44px; }
body[data-route="outfits"] #app .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
body[data-route="outfits"] .cards .card.outfit { background: var(--card); border-radius: 22px; padding: 10px 10px 12px; }
body[data-route="outfits"] .cards .card.outfit .thumb { border-radius: 16px; }
body[data-route="outfits"] .cards .card.outfit:hover .thumb { transform: none; box-shadow: none; }
body[data-route="outfits"] .cards .card.outfit .body { padding: 10px 4px 0; }
body[data-route="outfits"] .cards > :nth-child(odd) .kebab-menu { right: auto; left: 0; }
body[data-route="outfits"] #app > .empty { margin: 0 0 12px; padding: 28px 20px; border-radius: var(--r-xl); background: var(--card); }
body[data-route="outfits"] #app > .empty + :is(.btn, .row) { margin-top: 0; }
/* 하트: 흰 원 위 선 하트, 켜면 로즈로 채우고 한 번 튄다 */
.ov .heart.ov-btn { width: 44px; height: 44px; min-height: 44px; background: rgba(255, 255, 255, .92); color: var(--sub); box-shadow: 0 1px 4px rgba(25, 31, 40, .12); }
.ov .heart[aria-pressed="true"] { background: var(--card); color: var(--brand); }
.ov .heart[aria-pressed="true"] .ic { fill: currentColor; }
.ov .heart:active { transform: scale(.92); }
.heart.pop .ic { animation: heart-pop 380ms var(--spring); }
@keyframes heart-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 70% { transform: scale(.92); } 100% { transform: scale(1); } }

/* ---- 옷 추가·등록 ---- */
body[data-route="add"] #app > .say { margin-bottom: 18px; }
body[data-route="add"] #app > .card, body[data-route="add"] #app > form.card { margin-bottom: 12px; border-radius: var(--r-xl); }
body[data-route="add"] .steps { margin: -6px 0 16px; }
body[data-route="add"] .card .names-bar { background: var(--card); border-top: 0; }
body[data-route="add"] .steps li:not([aria-current]):not(.done) { background: var(--card); }

/* 맨 위 '← 옷장' 알약: 회색 바탕 위에서 보이게 흰 알약(맡은 화면만) */
body:is([data-route="item"], [data-route="add"], [data-route="outfit"], [data-route="compare"]) #app > p:first-child > a[href^="#/"]:first-child { background: var(--card); }

/* 넓은 화면에서는 카드가 너무 커지지 않게 칸 수를 늘린다 */
@media (min-width: 700px) {
  #app #closet-list .cards, body[data-route="outfits"] #app .cards { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .cat-chip, .cat-chip:active, .ov .heart:active { transition: none; transform: none; }
  .heart.pop .ic { animation: none; }
}

/* 옷 추가 › 이름으로: 고른 칩이 ✓ 한 글자 말고는 안 고른 칩과 같은 회색이라 무엇을 골랐는지 안 보였다 */
.name-group button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }

/* ---------- 이 옷으로 코디 받기(#/studio): 보드 틀이 바탕과 같은 회색이라 옷 한 벌이 허공에 떠 보였고, 도우미 말풍선(--panel 흰색)이 흰 카드에 묻혔다 ---------- */
body[data-route="studio"] .stage { padding: 10px; background: var(--card); } /* 룩북 사진 카드(.wk-card)처럼 흰 틀 안에 회색 보드 */
body[data-route="studio"] .stage .board { border-radius: 20px; }
body[data-route="studio"] .stage .board.empty { background: none; }
body[data-route="studio"] .card .msg.assistant { background: var(--bg); }
/* 실패 안내의 '다시 시도'가 바로 아래 '입은 사진 만들기'와 그라데이션 두 개로 겹쳐 보였다 → 흰 보조 단추 */
body[data-route="studio"] .alert .primary { background: var(--card); color: var(--ink); box-shadow: none; }
