:root {
  --bg-50: oklch(1 0 100);
  --bg-100: oklch(0.985 0.003 96);
  --bg-200: oklch(0.965 0.004 92);
  --bg-300: oklch(0.94 0.005 88);
  --bg-400: oklch(0.90 0.006 85);

  --primary-50: oklch(0.97 0.02 150);
  --primary-100: oklch(0.92 0.04 150);
  --primary-300: oklch(0.78 0.09 150);
  --primary-400: oklch(0.72 0.11 150);
  --primary-500: oklch(0.66 0.12 150);
  --primary-600: oklch(0.56 0.10 150);
  --primary-700: oklch(0.46 0.08 150);

  --accent-50: oklch(0.98 0.02 35);
  --accent-100: oklch(0.94 0.04 35);
  --accent-200: oklch(0.88 0.08 35);
  --accent-300: oklch(0.80 0.12 35);
  --accent-500: oklch(0.64 0.18 35);
  --accent-600: oklch(0.54 0.15 35);
  --accent-700: oklch(0.44 0.12 35);

  --secondary-100: oklch(0.94 0.008 82);
  --secondary-200: oklch(0.88 0.012 80);
  --secondary-300: oklch(0.80 0.016 78);
  --secondary-700: oklch(0.44 0.016 70);

  --fg-300: oklch(0.70 0.005 72);
  --fg-400: oklch(0.58 0.006 68);
  --fg-500: oklch(0.46 0.006 65);
  --fg-600: oklch(0.36 0.006 62);
  --fg-700: oklch(0.28 0.005 58);
  --fg-800: oklch(0.20 0.004 55);
  --fg-900: oklch(0.14 0.003 52);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-50);
  color: var(--fg-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}

button { font-family: inherit; }

.hidden { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--secondary-300); border-radius: 9999px; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slide-in-from-bottom {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in { animation: fade-in 0.5s both; }
.spin { display: inline-block; animation: spin 1s linear infinite; }

/* ---------- 페이지 공통 ---------- */

.page { max-width: 512px; margin: 0 auto; padding: 32px 20px 16px; }

.page-header { margin-bottom: 32px; }
.page-header.compact { margin-bottom: 20px; }
.page-header h1 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.025em; color: var(--fg-900);
}
.page-header p { font-size: 14px; color: var(--fg-500); margin-top: 6px; line-height: 1.625; }
.page-header p b { font-weight: 600; color: var(--fg-800); }

.pick-section { margin-bottom: 24px; }
.pick-section.wide { margin-bottom: 32px; }
.pick-section h2 { font-size: 14px; font-weight: 600; color: var(--fg-800); margin-bottom: 12px; }

/* ---------- 칩 ---------- */

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 12px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  background: var(--bg-100); color: var(--fg-600);
  border: 1px solid var(--bg-200);
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--bg-300); }
.chip.on { background: var(--primary-50); color: var(--primary-600); border-color: var(--primary-300); }
.chip.accent:hover { border-color: var(--accent-200); }
.chip.accent.on { background: var(--accent-50); color: var(--accent-600); border-color: var(--accent-300); }
.chip .chip-icon { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }
.chip .chip-icon i { font-size: 14px; }
.chip .chip-range { font-size: 12px; opacity: 0.5; margin-left: 2px; }

/* ---------- 기본 단추·입력 ---------- */

.btn-submit {
  width: 100%; padding: 14px 0; border-radius: 12px; border: none;
  font-size: 14px; font-weight: 600; letter-spacing: 0.025em; white-space: nowrap;
  background: var(--primary-500); color: #fff; cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}
.btn-submit:hover { background: var(--primary-600); }
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled {
  background: var(--bg-100); color: var(--fg-400);
  cursor: not-allowed; transform: none;
}
.btn-loading { display: flex; align-items: center; justify-content: center; gap: 8px; }

.btn-ghost-danger {
  padding: 14px 20px; border-radius: 12px;
  background: var(--accent-50); color: var(--accent-600);
  border: 1px solid var(--accent-200);
  font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background-color 0.2s;
}
.btn-ghost-danger:hover { background: var(--accent-100); }

.btn-ghost {
  padding: 14px 20px; border-radius: 12px;
  background: var(--bg-100); color: var(--fg-600);
  border: 1px solid var(--bg-200);
  font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: border-color 0.2s;
}
.btn-ghost:hover { border-color: var(--bg-300); }

.text-input {
  width: 100%; padding: 12px 16px; border-radius: 12px;
  background: var(--bg-100); border: 1px solid var(--bg-200);
  font-size: 14px; font-weight: 500; color: var(--fg-900);
  font-family: inherit; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.text-input::placeholder { color: var(--fg-400); }
.text-input:focus { border-color: var(--primary-400); box-shadow: 0 0 0 1px var(--primary-100); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 9999px;
  background: var(--secondary-200); outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary-500); cursor: pointer;
  border: 2px solid var(--bg-50);
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary-500); cursor: pointer;
  border: 2px solid var(--bg-50);
}

/* ---------- 코디 결과 룩북 ---------- */

.look-card {
  max-width: 420px; margin: 16px auto 32px;
  background: var(--bg-100); border-radius: 24px;
  border: 1px solid var(--bg-200); overflow: hidden;
}
.look-inner { aspect-ratio: 4 / 5; display: flex; flex-direction: column; }

.look-head { padding: 20px 20px 8px; flex-shrink: 0; }
.look-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 0.2em;
  color: var(--fg-400); text-transform: uppercase;
}
.look-title-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.look-title-row h3 { font-size: 18px; font-weight: 700; color: var(--fg-900); }
.look-pills { display: flex; gap: 6px; }
.pill { padding: 2px 8px; border-radius: 9999px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.pill.temp { background: var(--primary-100); color: var(--primary-700); }
.pill.occ { background: var(--accent-100); color: var(--accent-700); }
.pill.mood { background: var(--secondary-100); color: var(--secondary-700); }

.look-body {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0 12px;
}
.look-inner.expanded { aspect-ratio: auto; }
.look-inner.expanded .look-body {
  display: block; flex: none;
  padding: 4px 16px 12px;
}
.look-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  padding: 4px 0;
}
.look-gcard {
  display: flex; flex-direction: column;
  background: var(--bg-100);
  border: 1px solid var(--bg-200);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.04);
}
.look-gcard .gc-img {
  width: 100%; aspect-ratio: 1 / 1;
  background: var(--bg-50);
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
}
.look-gcard .gc-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.look-gcard .gc-name {
  font-size: 11px; font-weight: 500; line-height: 1.3;
  color: var(--fg-600); text-align: center;
  padding: 8px 8px 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.look-foot {
  padding: 4px 20px 20px; flex-shrink: 0;
  position: relative; z-index: 20; background: var(--bg-100);
}
.look-tip { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.look-tip .tip-ico {
  width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
}
.look-tip .tip-ico i { color: var(--primary-500); font-size: 12px; }
.look-tip p { font-size: 11px; color: var(--fg-600); line-height: 1.625; }

.look-actions {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid oklch(0.965 0.004 92 / 0.6);
}
.look-actions .grp { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 9999px; border: none;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--fg-400); cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.icon-btn i { font-size: 14px; }
.icon-btn.heart:hover { color: var(--accent-500); }
.icon-btn.heart.on { background: var(--accent-50); color: var(--accent-500); }
.icon-btn.refresh:hover { color: var(--primary-500); }

.look-empty { text-align: center; color: var(--fg-400); font-size: 14px; padding: 32px 0; }

/* ---------- 코디 결과: 입혀보기 / 펼쳐보기 전환 ---------- */

.look-toggle {
  display: flex; justify-content: center; gap: 6px;
  padding: 10px 20px 0; flex-shrink: 0;
  position: relative; z-index: 20;
}
.tg-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 9999px;
  border: 1px solid var(--bg-300); background: var(--bg-100);
  font-family: inherit; font-size: 11px; font-weight: 600;
  color: var(--fg-400); cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.tg-btn i { font-size: 12px; }
.tg-btn:hover { border-color: var(--bg-400); color: var(--fg-600); }
.tg-btn.on { background: var(--primary-50); border-color: var(--primary-300); color: var(--primary-600); }

/* ---------- 화보 무대 (마네킹 없이 옷만 자연 배치) ---------- */

.doll-stage {
  position: relative;
  height: 100%; max-height: 100%; max-width: 100%;
  aspect-ratio: 3 / 4; margin: 0 auto;
  background: oklch(1 0 100);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px oklch(0.94 0.005 88 / 0.8);
}
.doll-piece { position: absolute; }
.doll-piece img, .doll-piece canvas {
  width: 100%; height: 100%; object-fit: contain; display: block;
  filter: drop-shadow(0 4px 10px oklch(0.14 0.003 52 / 0.16));
}
/* 자켓(아우터) 왼쪽 위 · 상의는 그 뒤 오른쪽 · 하의 오른쪽 세로 · 신발 왼쪽 아래 · 가방 가운데 아래 */
.dp-outer  { left: 5%;  top: 5%;  width: 52%; height: 38%; z-index: 3; }
.dp-top    { left: 34%; top: 11%; width: 42%; height: 34%; z-index: 2; }
.no-outer .dp-top { left: 7%; top: 5%; width: 50%; height: 38%; z-index: 3; }
.dp-dress  { left: 12%; top: 5%;  width: 52%; height: 62%; z-index: 2; }
.no-outer .dp-dress { left: 7%; }
.dp-bottom { left: 44%; top: 28%; width: 36%; height: 58%; z-index: 1; }
.dp-shoes  { left: 7%;  top: 80%; width: 26%; height: 13%; z-index: 4; }
.dp-bag    { left: 26%; top: 55%; width: 30%; height: 27%; z-index: 4; }
.dp-hat    { left: 66%; top: 2%;  width: 24%; height: 14%; z-index: 4; }
.dp-acc    { left: 63%; top: 18%; width: 15%; height: 11%; z-index: 5; }

/* 붙는 기준점 — 하의는 허리단이 위, 신발은 바닥에 */
.dp-outer canvas, .dp-outer img,
.dp-top canvas, .dp-top img,
.dp-dress canvas, .dp-dress img,
.dp-bottom canvas, .dp-bottom img { object-position: center top; }
.dp-shoes canvas, .dp-shoes img { object-position: center bottom; }

/* ---------- 화보 이름표 (점 + 지시선 + 이름) ---------- */

.dp-callout {
  position: absolute; z-index: 10; pointer-events: none;
  display: flex; align-items: center; gap: 5px;
}
.dp-callout::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--fg-600); flex: none;
}
.co-line { flex: none; background: oklch(0.14 0.003 52 / 0.3); }
.co-text {
  font-size: 9px; font-weight: 300; letter-spacing: 0.14em;
  color: var(--fg-600); white-space: nowrap;
  font-feature-settings: "case";
}

/* 세로형(점 위·선 아래·이름 밑) — 아우터·원피스·하의·모자·(아우터 없을 때) 상의 */
.co-outer, .co-dress, .co-bottom, .co-hat, .no-outer .co-top {
  flex-direction: column; transform: translateX(-50%);
}
.co-outer .co-line, .co-dress .co-line, .co-bottom .co-line, .co-hat .co-line,
.no-outer .co-top .co-line { width: 1px; height: 16px; }

/* 가로형(점·선·이름 옆) — 신발 */
.co-shoes { transform: translateY(-50%); }
.co-shoes .co-line { width: 18px; height: 1px; }

/* 오른쪽 세로 글씨형 — (아우터 있을 때) 상의·악세사리 */
.co-top, .co-acc { align-items: flex-start; }
.co-top::before, .co-acc::before { margin-top: 6px; }
.co-top .co-line, .co-acc .co-line { width: 14px; height: 1px; margin-top: 7px; }
.co-top .co-text, .co-acc .co-text {
  writing-mode: vertical-rl; letter-spacing: 0.2em;
}
.no-outer .co-top { align-items: center; }
.no-outer .co-top::before { margin-top: 0; }
.no-outer .co-top .co-line { margin-top: 0; }
.no-outer .co-top .co-text { writing-mode: horizontal-tb; letter-spacing: 0.14em; }

/* 가방 — 아래로 내려 이름 */
.co-bag { flex-direction: column; transform: translateX(-50%); }
.co-bag .co-line { width: 1px; height: 14px; }

/* 하의는 선을 길게 내려 신발 이름과 줄을 달리함 */
.co-bottom .co-line { height: 26px; }

/* 자리 배치 */
.co-outer  { left: 18%; top: 39%; }
.co-top    { left: 69%; top: 30%; }
.no-outer .co-top { left: 20%; top: 37%; }
.co-dress  { left: 22%; top: 64%; }
.co-bottom { left: 73%; top: 79%; }
.co-shoes  { left: 30%; top: 87%; }
.co-bag    { left: 42%; top: 79%; }
.co-hat    { left: 78%; top: 14%; }
.co-acc    { left: 76%; top: 20%; }

/* ---------- 옷장 ---------- */

.sub-tabs {
  display: flex; gap: 8px;
  overflow-x: auto; padding-bottom: 12px; margin-bottom: 20px;
}
.sub-tabs .chip { flex-shrink: 0; }

.closet-box {
  border-radius: 24px; border: 4px solid var(--bg-300);
  background: var(--bg-100); padding: 16px; min-height: 400px;
}
.closet-box.drawer { min-height: 0; }
.closet-rail { display: flex; align-items: center; gap: 4px; margin: 0 8px 16px; }
.closet-rail .rail-side { height: 4px; flex: 1; border-radius: 9999px; background: var(--bg-300); }
.closet-rail .rail-mid { height: 4px; width: 32px; border-radius: 9999px; background: var(--bg-400); }

.closet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .closet-grid { grid-template-columns: repeat(3, 1fr); } }
.drawer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.hang-card {
  background: none; border: none; padding: 0; width: 100%;
  cursor: pointer; text-align: left; display: block;
}
.hang-hook { display: flex; justify-content: center; margin-bottom: 4px; }
.hang-hook span { width: 12px; height: 8px; border-radius: 4px 4px 0 0; background: var(--bg-400); display: block; }
.hang-body {
  background: var(--bg-200); border-radius: 16px;
  border: 2px solid var(--bg-300); overflow: hidden;
  transition: border-color 0.2s;
}
.hang-card:hover .hang-body { border-color: var(--bg-400); }
.hang-img { aspect-ratio: 3 / 4; overflow: hidden; background: var(--bg-300); }
.hang-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s;
}
.hang-card:hover .hang-img img { transform: scale(1.05); }
.hang-meta { padding: 10px; }
.hang-meta .h-name {
  font-size: 11px; font-weight: 500; color: var(--fg-800);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hang-meta .h-color { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.hang-meta .c-name { font-size: 10px; color: var(--fg-500); }

.dot {
  width: 6px; height: 6px; border-radius: 9999px;
  border: 1px solid var(--bg-300); flex-shrink: 0; display: inline-block;
}
.dot.pattern { background: repeating-linear-gradient(45deg, #bbb 0 2px, #eee 2px 4px); }

.drawer-card { background: none; border: none; padding: 0; width: 100%; cursor: pointer; display: block; }
.drawer-body {
  background: var(--bg-200); border-radius: 12px;
  border: 2px solid var(--bg-300); padding: 8px 8px 12px;
  transition: border-color 0.2s;
}
.drawer-card:hover .drawer-body { border-color: var(--bg-400); }
.drawer-handle { display: flex; justify-content: center; margin-bottom: 8px; }
.drawer-handle span { width: 32px; height: 4px; border-radius: 9999px; background: var(--bg-400); display: block; }
.drawer-img { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--bg-300); }
.drawer-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drawer-card .d-name {
  font-size: 10px; font-weight: 500; color: var(--fg-600);
  text-align: center; margin-top: 6px; padding: 0 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 0; color: var(--fg-400);
}
.empty-state .es-ico {
  width: 56px; height: 56px; margin-bottom: 16px; border-radius: 16px;
  background: var(--bg-100);
  display: flex; align-items: center; justify-content: center;
}
.empty-state .es-ico i { font-size: 24px; color: var(--fg-300); }
.empty-state .es-main { font-size: 14px; font-weight: 500; }
.empty-state .es-sub { font-size: 12px; color: var(--fg-400); margin-top: 4px; }

/* ---------- 북마크 ---------- */

.bm-list { display: flex; flex-direction: column; gap: 16px; }
.bm-card {
  background: var(--bg-100); border-radius: 16px;
  border: 1px solid var(--bg-200); padding: 16px;
}
.bm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bm-labels { display: flex; align-items: center; gap: 8px; }
.bm-labels .lb { font-size: 12px; font-weight: 500; color: var(--fg-700); }
.bm-labels .sep { color: var(--fg-300); }
.bm-del {
  width: 28px; height: 28px; border-radius: 9999px;
  background: var(--accent-50); color: var(--accent-500);
  border: 1px solid var(--accent-200); cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.2s;
}
.bm-del:hover { background: var(--accent-100); }
.bm-del i { font-size: 12px; }
.bm-body { display: flex; align-items: flex-start; justify-content: center; gap: 16px; }
.bm-side { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.bm-main { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bm-thumb {
  overflow: hidden; background: var(--bg-200); border: 1px solid var(--bg-300);
}
.bm-side .bm-thumb { width: 40px; height: 40px; border-radius: 8px; }
.bm-main .bm-thumb { width: 48px; height: 48px; border-radius: 12px; }
.bm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- 상세 시트 ---------- */

.sheet {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 640px) { .sheet { align-items: center; } }
.sheet-backdrop {
  position: absolute; inset: 0;
  background: oklch(0.14 0.003 52 / 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sheet-body {
  position: relative; width: 100%; max-width: 512px; margin: 0 auto;
  background: var(--bg-100);
  border-radius: 24px 24px 0 0;
  padding: 24px; max-height: 88vh; overflow-y: auto;
  animation: slide-in-from-bottom 0.3s both;
}
@media (min-width: 640px) { .sheet-body { border-radius: 24px; } }
.sheet-x {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 9999px; border: none;
  background: var(--bg-100); color: var(--fg-500); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.2s;
}
.sheet-x:hover { background: var(--bg-200); }

.detail-img {
  aspect-ratio: 3 / 4; width: 192px; margin: 0 auto 20px;
  border-radius: 16px; overflow: hidden;
  background: var(--bg-100); border: 1px solid var(--bg-200);
}
.detail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-name { font-size: 18px; font-weight: 600; color: var(--fg-900); text-align: center; }
.detail-cat { font-size: 14px; color: var(--fg-500); text-align: center; margin-top: 4px; }
.detail-color { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.detail-color .dot { width: 16px; height: 16px; border: 1px solid oklch(0.70 0.005 72 / 0.4); }
.detail-color .c-name { font-size: 14px; font-weight: 500; color: var(--fg-700); }

.stat-grid { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-card {
  background: var(--bg-50); border-radius: 12px; padding: 16px;
  border: 1px solid var(--bg-200);
}
.stat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.stat-head .st-label { font-size: 12px; font-weight: 500; color: var(--fg-500); }
.stat-head .st-val { font-size: 12px; font-weight: 600; }
.stat-head .st-val.warm { color: var(--primary-600); }
.stat-head .st-val.formal { color: var(--fg-800); }
.stat-bars { display: flex; gap: 4px; }
.stat-bars span { height: 6px; flex: 1; border-radius: 9999px; background: var(--bg-300); }
.stat-bars span.fill-warm { background: var(--primary-400); }
.stat-bars span.fill-formal { background: var(--fg-600); }

.tag-row { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 500; }
.tag.style { background: var(--primary-50); color: var(--primary-600); }
.tag.season { background: var(--secondary-100); color: var(--secondary-700); }

.detail-actions { display: flex; gap: 10px; margin-top: 24px; }
.detail-actions .btn-submit { flex: 1; }

.sheet-form { display: flex; flex-direction: column; gap: 20px; margin-top: 8px; }
.sheet-form .form-label { margin-bottom: 8px; }

/* ---------- 등록 ---------- */

.reg-form { display: flex; flex-direction: column; gap: 28px; }
.form-label {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--fg-800); margin-bottom: 12px;
}

.photo-empty {
  width: 100%; max-width: 220px; aspect-ratio: 3 / 4; margin: 0 auto;
  border-radius: 16px; border: 2px dashed var(--bg-300);
  background: var(--bg-50);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  cursor: pointer; transition: border-color 0.2s;
}
.photo-empty:hover { border-color: var(--primary-300); }
.photo-empty .cam {
  width: 48px; height: 48px; border-radius: 16px; background: var(--primary-50);
  display: flex; align-items: center; justify-content: center;
}
.photo-empty .cam i { color: var(--primary-500); font-size: 20px; }
.photo-empty .pe-main { font-size: 14px; font-weight: 500; color: var(--fg-700); text-align: center; }
.photo-empty .pe-sub { font-size: 12px; color: var(--fg-400); margin-top: 2px; text-align: center; }

.photo-preview { position: relative; }
.photo-preview .pp-img {
  position: relative;
  aspect-ratio: 3 / 4; max-width: 220px; margin: 0 auto;
  border-radius: 16px; overflow: hidden;
  background: var(--bg-100); border: 1px solid var(--bg-200);
}
.pp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-preview.cut .pp-img {
  background-color: var(--bg-50);
  background-image:
    linear-gradient(45deg, var(--bg-200) 25%, transparent 25%),
    linear-gradient(-45deg, var(--bg-200) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--bg-200) 75%),
    linear-gradient(-45deg, transparent 75%, var(--bg-200) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.photo-preview.cut .pp-img img { object-fit: contain; padding: 10px; }
.pp-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: oklch(1 0 0 / 0.72); backdrop-filter: blur(1px);
  color: var(--fg-600); font-size: 12px; font-weight: 500;
}
.pp-loading i { font-size: 22px; color: var(--primary-500); }
.pp-x {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 9999px; border: none;
  background: rgba(0, 0, 0, 0.5); color: #fff; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.2s;
}
.pp-x:hover { background: rgba(0, 0, 0, 0.7); }
.pp-x i { font-size: 14px; }
.pp-change {
  display: block; margin: 12px auto 0;
  background: none; border: none;
  font-size: 12px; font-weight: 500; color: var(--primary-500);
  cursor: pointer; white-space: nowrap;
  transition: color 0.2s;
}
.pp-change:hover { color: var(--primary-600); }
.pp-change i { margin-right: 4px; }

.slider-card {
  background: var(--bg-50); border-radius: 16px; padding: 20px;
  border: 1px solid var(--bg-200);
}
.slider-card .sl-block + .sl-block { margin-top: 20px; }
.sl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sl-head label { font-size: 14px; font-weight: 500; color: var(--fg-700); }
.sl-head .sl-val { font-size: 14px; font-weight: 600; }
.sl-head .sl-val b { font-weight: 600; }
.sl-val.warm { color: var(--primary-600); }
.sl-val.formal { color: var(--fg-800); }
.sl-row { display: flex; align-items: center; gap: 12px; }
.sl-row .sl-ico { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }
.sl-row .sl-ico i { font-size: 14px; }
.ico-fg { color: var(--fg-400); }
.ico-fg6 { color: var(--fg-600); }
.ico-warm { color: var(--primary-400); }
.sl-row input[type="range"] { flex: 1; }

.status-line {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 500;
}
.status-line.ok { color: var(--primary-600); }
.status-line.err { color: #ef4444; }
.status-line .st-ico { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }

/* ---------- 토스트 ---------- */

.toast {
  position: fixed; bottom: 90px; left: 50%;
  transform: translateX(-50%);
  background: oklch(0.20 0.004 55 / 0.92);
  color: #fff; padding: 10px 18px; border-radius: 12px;
  font-size: 14px; z-index: 99; max-width: 86vw; text-align: center;
}

/* ---------- 하단 탭 ---------- */

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: var(--bg-100); border-top: 1px solid var(--bg-200);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabbar-inner {
  max-width: 512px; margin: 0 auto; height: 56px;
  display: flex; align-items: center; justify-content: space-around;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-width: 0; padding: 4px 20px;
  background: none; border: none; cursor: pointer; white-space: nowrap;
  transition: color 0.15s;
}
.tab .tab-ico { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.tab .tab-ico i { font-size: 18px; color: var(--fg-400); }
.tab .lbl { font-size: 11px; font-weight: 500; color: var(--fg-400); }
.tab.active .tab-ico i, .tab.active .lbl { color: var(--primary-500); }
