/* FINDE — 차분한 베이지 + 모카무스(PANTONE 17-1230, #A47864). 장식 효과 없이 평면으로 */
:root {
  --bg: #f4efe8;
  --bg-2: #ece4d9;
  --card: #fbf8f3;
  --text: #2e2622;
  --muted: #74665a;
  --line: #e5dccf;
  --line-2: #d6cabb;
  --mocha: #a47864;          /* 모카무스: 로고 · 테두리 · 막대 */
  --accent: #8f6654;         /* 흰 글자를 올리는 면 (버튼 · 장르 카드), 대비 5:1 */
  --accent-ink: #7a5644;     /* 강조 글자 */
  --accent-soft: #efe4da;
  --peach-soft: #f3ebe2;
  --ok: #6f8f6a;
  --warn: #c49a52;
  --bar: #ebe3d8;
  --bar-fill: #d2b6a5;
  --bar-fill-high: #c4a491;
  --on-accent: #ffffff;
  --radius: 12px;
  --radius-s: 8px;
  --shadow: none;
  --shadow-lift: 0 4px 14px rgba(60, 45, 35, 0.12);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1815; --bg-2: #24201c; --card: #26211d; --text: #f0e8df; --muted: #ab9c8e; --line: #3a332d; --line-2: #4a4139;
    --mocha: #c49a85; --accent: #c49a85; --accent-ink: #dcb8a5; --accent-soft: #3a2d26; --peach-soft: #2f2722; --on-accent: #1c1815;
    --bar: #2f2924; --bar-fill: #6e5446; --bar-fill-high: #80604f;
    --shadow: none;
    --shadow-lift: 0 4px 14px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text); line-height: 1.6; font-size: 15.5px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; word-break: keep-all;
  overflow-wrap: break-word;
  /* 마지막 줄에 단어 하나만 남지 않게 줄을 고르게 나눈다 (지원하지 않는 브라우저는 그대로) */
  text-wrap: pretty;
}
/* 짧은 제목 · 장르 카드 · 용어 설명은 줄 길이를 고르게 */
h1, h2, h3, .headline, .genre strong, .genre span, .trend small, .order-genre b, .attr .def { text-wrap: balance; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
button, select { font: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 10px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 32px 20px 72px; }

/* ── 헤더 */
header.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.brand { min-width: 0; }
header.top h1 { margin: 0; font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
header.top p { margin: 4px 0 0; color: var(--muted); font-size: 0.93rem; max-width: 52ch; }

.status {
  display: inline-flex; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--muted);
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px;
  max-width: 100%;
}
.status #statusText { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status.error #statusText { white-space: normal; overflow-wrap: anywhere; }
.status .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); }
.status.ready .dot { background: var(--ok); }
.status.error .dot { background: #c0504d; }
.progress { flex: none; height: 5px; background: var(--line); border-radius: 999px; overflow: hidden; width: 90px; }
.status.ready .progress { display: none; }
.progress > i { display: block; height: 100%; width: 0; background: var(--mocha); border-radius: inherit; transition: width .35s var(--ease); }

/* ── 레이아웃 · 카드 */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: minmax(0, 1fr); } }   /* 1fr 은 안쪽 긴 내용만큼 넓어져 휴대폰에서 옆으로 넘친다 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; position: relative; }
@media (min-width: 901px) { #inputCard { position: sticky; top: 18px; } }
.card h2 { margin: 0 0 14px; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.card h3 { margin: 22px 0 10px; font-size: 0.86rem; color: var(--muted); font-weight: 600; letter-spacing: 0.01em; }

/* ── 사진 올리기 */
.drop {
  border: 1px dashed var(--line-2); border-radius: 10px; padding: 18px; text-align: center; cursor: pointer;
  background: var(--card);
  transition: border-color .2s, background .2s, box-shadow .2s; position: relative; min-height: 230px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; overflow: hidden;
}
.drop:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line-2)); }
.drop.over { border-color: var(--mocha); background: var(--accent-soft); }
.drop img { max-width: 100%; max-height: 420px; border-radius: 6px; object-fit: contain; }
.drop .hint { color: var(--muted); font-size: 0.9rem; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.drop .hint strong { color: var(--text); font-weight: 600; font-size: 0.98rem; }
.drop .hint small { font-size: 0.82rem; }
.drop input { display: none; }
.upload-row { margin-top: 12px; }
.upload-row .primary, .upload-row .ghost { flex: 1 1 auto; }

/* 예시 사진: 카테고리 탭 + 격자 */
.seg.sample-tabs { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 4px; display: inline-flex; flex-wrap: wrap; margin-top: 0; }
.seg.sample-tabs button { border: 0; background: transparent; color: var(--muted); padding: 5px 12px; border-radius: 7px; font-size: 0.86rem; font-weight: 600; transition: background .2s, color .2s, box-shadow .2s; }
.seg.sample-tabs button:hover { color: var(--text); }
.seg.sample-tabs button.active { background: var(--card); color: var(--accent-ink); border: 0; box-shadow: 0 0 0 1px var(--line); }
.samples {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; margin-top: 12px;
  max-height: 226px; overflow-y: auto; padding: 3px 3px 14px; scrollbar-width: thin;
}
.samples button[hidden] { display: none; }
.samples button {
  padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--bg-2); cursor: pointer; aspect-ratio: 1;
  box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s, opacity .15s;
}
.samples button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.samples button:hover { box-shadow: 0 0 0 1.5px var(--line-2); opacity: .9; }
.samples button.active { box-shadow: 0 0 0 2.5px var(--mocha); }

/* 분석 설정 (접기) */
.settings { margin-top: 20px; border-top: 1px solid var(--line); padding: 0; }
.settings > summary {
  list-style: none; cursor: pointer; padding: 13px 0; font-weight: 600; font-size: 0.93rem; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.settings > summary::-webkit-details-marker { display: none; }
.settings > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.settings[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.settings > summary small { color: var(--muted); font-weight: 500; font-size: 0.8rem; }
.settings[open] { padding-bottom: 6px; }
.settings h3:first-of-type { margin-top: 4px; }

.seg { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.seg button {
  border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 6px 12px; border-radius: 8px; cursor: pointer;
  font-size: 0.88rem; transition: background .15s, border-color .15s, color .15s;
}
.seg button:hover { border-color: var(--line-2); }
.seg button.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.primary {
  background: var(--accent); color: var(--on-accent); border: 0; padding: 12px 18px; border-radius: 8px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.primary:disabled { opacity: .5; cursor: not-allowed; }
.ghost {
  background: var(--card); color: var(--text); border: 1px solid var(--line-2); padding: 11px 16px; border-radius: 8px; cursor: pointer;
  font-weight: 600; transition: border-color .15s, color .15s;
}
.ghost:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 50%, var(--line-2)); color: var(--accent-ink); }
.ghost:disabled { opacity: .5; cursor: not-allowed; }
.ghost.small { padding: 5px 11px; font-size: 0.84rem; border-radius: 7px; font-weight: 500; }
.primary.small { padding: 6px 13px; font-size: 0.86rem; border-radius: 7px; }
/* 보조 동작 (사진 고르기 · 올리기처럼 화면 안에서 한 번 더 누르는 버튼) */
.soft { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); padding: 11px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.soft:hover:not(:disabled) { border-color: var(--accent); }
.soft:disabled { opacity: .5; cursor: not-allowed; }
.soft.small { padding: 6px 13px; font-size: 0.86rem; border-radius: 7px; }
/* 누를 때 살짝 들어가는 느낌 */
.primary, .ghost, .soft { -webkit-tap-highlight-color: transparent; }
.primary:active:not(:disabled), .ghost:active:not(:disabled), .soft:active:not(:disabled) { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { .primary:active, .ghost:active, .soft:active { transform: none; } }

.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 0.93rem; }
.toggle input { appearance: none; -webkit-appearance: none; width: 40px; height: 23px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
.toggle input:checked { background: var(--mocha); }
.toggle input:checked::after { transform: translateX(17px); }
.note { color: var(--muted); font-size: 0.83rem; margin: 8px 0 0; line-height: 1.55; }

/* ── 결과 */
.result-empty { color: var(--muted); text-align: center; padding: 64px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.result-empty strong { color: var(--text); font-weight: 600; font-size: 1.02rem; }
.result-empty small { font-size: 0.86rem; }
/* 분석 중: 결과가 은은하게 깜빡인다 */
#resultCard.busy #result { opacity: .55; transition: opacity .2s; }
#resultCard.busy #result { animation: breathe 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }

/* 결과가 나타날 때 차례로 떠오르기 */
#result.enter > * { animation: fadeUp .5s var(--ease) both; }
#result.enter > *:nth-child(2) { animation-delay: .04s; } #result.enter > *:nth-child(3) { animation-delay: .08s; }
#result.enter > *:nth-child(4) { animation-delay: .12s; } #result.enter > *:nth-child(5) { animation-delay: .16s; }
#result.enter > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes fadeUp { from { opacity: 0; } to { opacity: 1; } }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--accent-soft); color: var(--accent-ink); border-radius: 6px; padding: 3px 9px; font-size: 0.84rem; font-weight: 600; line-height: 1.4; }
.chip.muted { background: var(--bg-2); color: var(--muted); font-weight: 500; }
.chip.warn { background: #fff4dc; color: #8a5a00; }
@media (prefers-color-scheme: dark) { .chip.warn { background: #3a2e12; color: #ffd27a; } }

.genre-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px; margin: 16px 0 14px; }
@media (max-width: 560px) { .genre-row { grid-template-columns: 1fr; } }
.genre {
  background: var(--accent); color: var(--on-accent); border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 5px;
}
.genre small { opacity: .88; font-size: 0.78rem; font-weight: 500; }
.genre strong { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.genre span { font-size: 0.83rem; opacity: .92; line-height: 1.45; }
.genre-trends { border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.genre-trends > small { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.trends { display: flex; gap: 8px; flex-wrap: wrap; }
.trend { display: inline-flex; flex-direction: column; gap: 2px; padding: 7px 11px; border-radius: 7px; background: var(--card); border: 1px solid var(--line); }
.trend b { color: var(--accent-ink); font-size: 0.94rem; font-weight: 700; }
.trend small { color: var(--muted); font-size: 0.76rem; }

.headline { font-size: 1.25rem; font-weight: 800; margin: 12px 0 6px; letter-spacing: -0.01em; }
.desc { font-size: 1.02rem; line-height: 1.8; margin: 0; letter-spacing: -0.005em; }
.desc p { margin: 0; }
.desc p + p { margin-top: 0.75em; }
/* 문장 단위 줄바꿈: 한 줄에 다 들어가지 않는 문장은 통째로 다음 줄로, 한 줄보다 긴 문장은 고르게 나눈다 */
.desc .s { display: inline-block; text-wrap: balance; }
.desc .hedge { color: var(--muted); }

#result > h3 { margin: 26px 0 10px; font-size: 0.86rem; color: var(--muted); font-weight: 600; }
.attrs { display: grid; gap: 12px; margin-top: 4px; }
.attr { display: grid; grid-template-columns: 88px 1fr auto; gap: 6px 10px; align-items: center; }
.attr .g { color: var(--muted); font-size: 0.86rem; display: flex; flex-direction: column; gap: 1px; }
.attr .reg { font-size: 0.68rem; color: var(--accent-ink); background: var(--accent-soft); border-radius: 4px; padding: 0 5px; width: fit-content; line-height: 1.5; }
.attr .bar { position: relative; height: 28px; background: var(--bar); border-radius: 5px; overflow: hidden; }
.attr .bar > i {
  position: absolute; inset: 0 auto 0 0; background: var(--bar-fill);
  border-radius: inherit; transform-origin: left; animation: grow .7s var(--ease) both;
}
.attr.high .bar > i { background: var(--bar-fill-high); }
.attr.low .bar > i { background: color-mix(in srgb, var(--muted) 30%, transparent); }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.attr .bar > b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; font-weight: 700; font-size: 0.9rem; }
.attr .bar > b small { font-weight: 600; color: color-mix(in srgb, var(--text) 72%, transparent); font-variant-numeric: tabular-nums; }
.attr .alts { grid-column: 2 / 4; color: var(--muted); font-size: 0.8rem; margin-top: -3px; }
.attr .fam { grid-column: 2 / 4; font-size: 0.8rem; margin-top: -3px; color: var(--accent-ink); }
.attr .fam b { font-weight: 700; }
.attr .motif { grid-column: 2 / 4; font-size: 0.82rem; margin-top: -2px; color: var(--accent-ink); }
.attr .motif b { font-weight: 700; }
.attr .fix {
  height: 28px; border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 6px; cursor: pointer;
  font-size: 0.78rem; padding: 0 8px; transition: color .15s, border-color .15s;
}
.attr .fix:hover { color: var(--text); border-color: var(--line-2); }
.attr select.fix-sel { grid-column: 2 / 4; font-size: 0.88rem; padding: 7px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); animation: fadeUp .25s var(--ease); }
.attr .fixed { grid-column: 2 / 4; font-size: 0.8rem; color: var(--accent-ink); font-weight: 600; margin-top: -3px; }
@media (max-width: 560px) { .attr { grid-template-columns: 70px 1fr auto; } }

.feedback { margin-top: 16px; padding: 12px 14px; border-radius: 8px; display: grid; gap: 8px; font-size: 0.86rem; background: var(--bg-2); border: 1px solid var(--line); }
.feedback .fb-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.feedback small { color: var(--muted); }
.feedback .fb-cat { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.feedback select { font-size: 0.85rem; padding: 5px 8px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); }
.feedback .fb-actions { display: inline-flex; gap: 6px; }

.secondary { margin-top: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--peach-soft); }
.secondary summary { color: var(--text); font-weight: 600; font-size: 0.92rem; }
.secondary summary small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.secondary .desc { font-size: 0.95rem; margin: 8px 0; }

/* ── 용어 설명 */
.genre .def { font-size: 0.82rem; opacity: .85; }
.genre .def:empty { display: none; }
.attr .def { grid-column: 2 / 4; color: var(--text); font-size: 0.82rem; line-height: 1.5; margin-top: -3px; }

/* ── 이런 분께 잘 어울려요 */
.suits h3 { margin: 26px 0 10px; font-size: 0.86rem; color: var(--muted); font-weight: 600; }
.suits-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .suits-grid { grid-template-columns: 1fr; } }
.suit { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.suit b { font-size: 0.8rem; font-weight: 700; color: var(--accent-ink); }
.suit p { margin: 0; font-size: 0.9rem; line-height: 1.6; }
.suit small { font-size: 0.74rem; color: var(--muted); }
.suits .note { margin-top: 8px; font-size: 0.78rem; }

/* ── 사진 속 색 */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); min-width: 0; }
.sw i { width: 34px; height: 34px; border-radius: 6px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.sw span { display: flex; flex-direction: column; font-size: 0.88rem; line-height: 1.35; }
.sw small { color: var(--muted); font-size: 0.76rem; font-variant-numeric: tabular-nums; }
.sw .pal { display: flex; align-items: center; gap: 4px; font-style: normal; color: var(--muted); font-size: 0.74rem; margin-top: 3px; font-variant-numeric: tabular-nums; }
.sw .pal i { width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.sw .pal i:not(:first-child) { margin-left: 4px; }
.colors .note { margin-top: 6px; font-size: 0.78rem; }

/* ── 시술 요청서 */
.order { margin-top: 22px; border: 1px solid var(--line-2); border-radius: 10px; padding: 16px 18px; background: var(--card); scroll-margin-top: 16px; transition: box-shadow .6s var(--ease); }
.order.flash { box-shadow: 0 0 0 3px var(--mocha); transition: none; }
.jump-row { margin: 0 0 14px; }
.order-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.order-head h3 { margin: 0; font-size: 1.02rem; font-weight: 700; color: var(--text); }
.order-head small { color: var(--muted); font-size: 0.8rem; }
.order-genre { margin: 10px 0 4px; display: flex; flex-direction: column; gap: 1px; }
.order-genre:empty { display: none; }
.order-genre small { color: var(--accent-ink); font-size: 0.76rem; font-weight: 600; }
.order-genre b { font-size: 1.12rem; }
.order-rows { margin: 8px 0 0; display: grid; }
.order-rows > div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.order-rows dt { color: var(--muted); font-size: 0.86rem; }
.order-rows dd { margin: 0; font-weight: 600; font-size: 0.94rem; line-height: 1.45; }
.order-rows dd small { color: var(--muted); font-weight: 500; font-size: 0.8rem; }
.order-rows .mini { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-weight: 500; font-size: 0.8rem; }
.order-rows .mini i { width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.order-sub { font-size: 0.86rem; margin-top: 10px; }
.order-sub:empty { display: none; }
.order-sub ul { margin: 4px 0 0; padding-left: 18px; line-height: 1.6; }
.order-sub li::marker { color: var(--muted); }
.order-actions { margin-top: 14px; }

/* ── 비슷한 스타일 */
.similar { display: grid; grid-template-columns: repeat(3, minmax(0, 96px)); gap: 8px; }
.similar button { aspect-ratio: 1; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--bg-2); }
.similar button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.similar button:hover { box-shadow: 0 0 0 1.5px var(--line-2); opacity: .9; }
.similar-block h3 small, .colors h3 small { font-weight: 400; margin-left: 4px; }

.vlm { white-space: pre-wrap; background: var(--bg-2); border-radius: 8px; padding: 14px 16px; min-height: 60px; font-size: 0.98rem; line-height: 1.75; }
.vlm.thinking::after { content: "▍"; animation: blink 1s infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.en-box { margin-top: 8px; }
.en-box summary { font-size: 0.84rem; }
.vlm.en { margin-top: 6px; font-size: 0.9rem; color: var(--muted); }

pre.json { background: #2b2420; color: #eadfd4; padding: 14px; border-radius: 8px; overflow: auto; font-size: 0.78rem; max-height: 360px; }
details summary { cursor: pointer; color: var(--muted); }
#result > details { margin-top: 10px; }

/* ── 모바일 '다른 사진' 버튼 · 알림 */
.fab {
  /* 가운데 대신 오른쪽 아래 작은 알약 모양 — 읽는 글을 덜 가리게 */
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  border: 0; border-radius: 999px; padding: 10px 16px; font-size: .88rem; font-weight: 600; color: var(--on-accent); background: var(--accent);
  box-shadow: var(--shadow-lift); cursor: pointer; animation: fadeUp .3s var(--ease);
}
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); z-index: 30; opacity: 0; pointer-events: none;
  background: #2e2622; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 0.9rem; box-shadow: var(--shadow-lift);
  transition: opacity .25s, transform .25s var(--ease);
  margin-bottom: env(safe-area-inset-bottom, 0px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

footer { margin-top: 34px; color: var(--muted); font-size: 0.8rem; text-align: center; line-height: 1.7; }
footer .ai-notice { margin: 0 0 6px; color: var(--text); }
footer code { font-family: inherit; background: var(--bg-2); padding: 1px 6px; border-radius: 6px; }
.hidden { display: none !important; }

@media (max-width: 560px) {
  .wrap { padding: 20px 14px 90px; }
  header.top h1 { font-size: 1.35rem; }
  header.top p { font-size: 0.86rem; }
  .card { padding: 18px 16px; }
  .status { width: 100%; }
  .drop { min-height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── 분석 종류 탭 (스타일 사진 / 내 얼굴) */
.mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; scroll-margin-top: 12px; }
.mode-tabs button {
  border: 0; background: transparent; color: var(--muted); border-radius: 9px; padding: 10px 14px; cursor: pointer; text-align: left;
  font-weight: 700; font-size: 0.98rem; display: flex; flex-direction: column; gap: 1px; transition: background .2s, color .2s, box-shadow .2s;
}
.mode-tabs button small { font-weight: 500; font-size: 0.78rem; opacity: .9; }
.mode-tabs button:hover { color: var(--text); }
.mode-tabs button.active { background: var(--card); color: var(--accent-ink); box-shadow: 0 0 0 1px var(--line); }

/* 스타일 결과 → 내 얼굴 분석 안내 */
.face-cta { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line); background: var(--peach-soft); border-radius: 10px; padding: 12px 14px; }
.face-cta > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 240px; }
.face-cta b { font-size: 0.95rem; }
.face-cta small { color: var(--muted); font-size: 0.82rem; line-height: 1.5; }

/* ── 내 얼굴 분석 */
.face-drop img { max-height: 360px; }
.face-guide { width: 84px; height: 98px; color: var(--mocha); }
#faceUseStyle { margin-top: 10px; }
.guide-fold .guide { margin-top: 8px; }
.guide { margin: 0; padding-left: 1.25em; display: grid; gap: 6px; font-size: 0.9rem; line-height: 1.55; }
.guide b { color: var(--accent-ink); font-weight: 700; }
.face-status { padding: 48px 12px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.face-status small { font-size: 0.82rem; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--mocha); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.face-canvas { display: block; width: 100%; height: auto; border-radius: 10px; background: var(--bg-2); }
.face-fig { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.face-layer { align-self: flex-start; }
.face-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); }
.face-legend span { display: inline-flex; align-items: center; gap: 5px; }
.face-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.face-head { margin-top: 16px; background: var(--accent); color: var(--on-accent); border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.face-head small { opacity: .88; font-size: 0.78rem; font-weight: 500; }
.face-head strong { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.face-head .desc { font-size: 0.92rem; line-height: 1.65; opacity: .95; }
.shape-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin-top: 12px; }
@media (max-width: 560px) { .shape-bars { grid-template-columns: 1fr; } }
.sb { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) 3em; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--muted); }
.sb i { height: 7px; background: var(--bar); border-radius: 999px; overflow: hidden; display: block; }
.sb i b { display: block; height: 100%; background: var(--bar-fill); border-radius: inherit; }
.sb.top { color: var(--text); font-weight: 700; }
.sb.top i b { background: var(--mocha); }
.sb em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.face-warn { margin: 12px 0 0; padding: 10px 14px 10px 30px; background: #fff4dc; color: #6b4a00; border-radius: 10px; font-size: 0.85rem; display: grid; gap: 4px; }
@media (prefers-color-scheme: dark) { .face-warn { background: #3a2e12; color: #ffd27a; } }
.face-match { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--peach-soft); display: flex; flex-direction: column; gap: 3px; }
.face-match small { color: var(--muted); font-size: 0.8rem; }
.face-match b { font-size: 1.02rem; }
.face-match b.good { color: var(--ok); }
.face-match b.meh { color: var(--accent-ink); }
.face-match .fit-score { font-size: .85rem; font-weight: 600; color: var(--muted); margin-left: 4px; }
.face-match .fit-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 4px 0 2px; }
.face-match .fit-bar i { display: block; height: 100%; background: var(--accent); }
.face-match .fit-why { margin: 4px 0 0; padding-left: 0; list-style: none; font-size: .88rem; line-height: 1.55; }
.face-match .fit-why li::before { content: '✓ '; color: var(--ok); font-weight: 700; }
.face-match .fit-why li.minus { color: var(--muted); }
.face-match .fit-why li.minus::before { content: '△ '; color: var(--accent-ink); }
.face-match p { margin: 4px 0 0; font-size: .88rem; line-height: 1.55; }
.style-fit { margin-top: 16px; }
.style-fit > button { align-self: flex-start; margin-top: 6px; }
.face-rank { margin-top: 14px; border: 1px dashed var(--line-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.face-rank .fr-head { display: flex; flex-direction: column; gap: 2px; }
.face-rank .fr-head small { color: var(--muted); font-size: .82rem; line-height: 1.5; }
.fr-status { font-size: .88rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.fr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fr-list li { display: grid; grid-template-columns: 30px 64px 1fr; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--surface, transparent); }
.fr-list li.best { border-color: var(--accent); background: var(--peach-soft); }
.fr-list .rk { font-weight: 800; font-size: 1.1rem; text-align: center; padding-top: 4px; }
.fr-list img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.fr-list .nm { font-weight: 700; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.fr-list .nm em { font-style: normal; font-size: .78rem; color: var(--on-accent, #fff); background: var(--accent); border-radius: 999px; padding: 1px 8px; }
.fr-list .nm small { font-weight: 500; color: var(--muted); font-size: .8rem; }
.fr-list .bar { height: 6px; border-radius: 3px; background: var(--line); margin: 5px 0 4px; overflow: hidden; }
.fr-list .bar b { display: block; height: 100%; background: var(--accent); }
.fr-list ul { margin: 2px 0 0; padding-left: 16px; font-size: .84rem; line-height: 1.5; }
.fr-list ul li { display: list-item; border: 0; padding: 0; background: none; }
.fr-list ul li.minus { color: var(--muted); }
.fr-skip { margin: 0; padding-left: 18px; font-size: .82rem; color: var(--muted); }
.fr-note { font-size: .78rem; color: var(--muted); margin: 0; }
.face-match p { margin: 0; font-size: 0.9rem; line-height: 1.6; }
.card h3 small { font-weight: 500; color: var(--muted); opacity: .85; margin-left: 4px; }
.table-wrap { overflow-x: auto; }
.measure { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.measure th, .measure td { text-align: left; padding: 8px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.measure thead th { border-top: 0; color: var(--muted); font-weight: 600; font-size: 0.78rem; }
.measure tbody th { font-weight: 600; color: var(--muted); width: 28%; }
.measure td:nth-child(2) { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.measure td:nth-child(3) { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.measure tr.hl td:last-child { color: var(--accent-ink); font-weight: 600; }
/* 모바일: 표 대신 항목마다 한 장의 카드처럼 (이름 · 값 한 줄, 풀이는 아래 줄) */
@media (max-width: 560px) {
  .measure thead { display: none; }
  .measure tbody tr { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; row-gap: 2px; padding: 10px 2px; border-top: 1px solid var(--line); }
  .measure tbody th, .measure tbody td { border: 0; padding: 0; width: auto; }
  .measure tbody th { grid-column: 1; color: var(--text); }
  .measure td:nth-child(2) { grid-column: 2; text-align: right; }
  .measure td:nth-child(3) { grid-column: 1 / -1; font-size: .78rem; }
  .measure td:nth-child(3)::before { content: '평균 '; }
  .measure td:nth-child(4) { grid-column: 1 / -1; font-size: .84rem; }
}
.advice { display: grid; gap: 10px; }
.adv { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--card); }
.adv > b { display: flex; align-items: center; gap: 7px; font-size: 0.92rem; }
.adv p { margin: 5px 0 0; font-size: 0.9rem; line-height: 1.65; }
.adv ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.adv li { font-size: 0.88rem; line-height: 1.55; }
.adv li span { font-weight: 700; color: var(--accent-ink); }
.adv li small { color: var(--muted); font-size: 0.84rem; }
.adv.avoid li span { color: var(--text); font-weight: 600; }
.adv .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.adv.z-shade .dot { background: rgba(120, 78, 55, .85); }
.adv.z-light .dot { background: #fff; box-shadow: 0 0 0 1px var(--line-2); }
.adv.z-blush .dot { background: rgba(236, 110, 130, .85); }
.face-retake { display: flex; flex-direction: column; gap: 12px; }
.retake-head { display: flex; flex-direction: column; gap: 3px; }
.retake-head b { font-size: 1.15rem; color: var(--accent-ink); }
.retake-head small { color: var(--muted); font-size: 0.86rem; }
.issues { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.issues li { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 0.88rem; line-height: 1.55; }
.issues li.warn { border-left-color: var(--warn); }
.issues li span { color: var(--muted); }
#faceResult.enter > * { animation: fadeUp .5s var(--ease) both; }
/* 결과를 한 번에 쏟지 않고 사진 → 얼굴형 → 알아챈 것 → 나머지 순으로 */
#faceResult.enter > *:nth-child(2) { animation-delay: .25s; } #faceResult.enter > *:nth-child(3) { animation-delay: .5s; }
#faceResult.enter > *:nth-child(4) { animation-delay: .75s; } #faceResult.enter > *:nth-child(n+5) { animation-delay: 1s; }
@media (prefers-reduced-motion: reduce) { #faceResult.enter > * { animation: none; } }
/* 분석 중 스캔 */
.scan { position: relative; overflow: hidden; border-radius: 14px; background: var(--bg-2); max-width: 360px; aspect-ratio: 4 / 5; margin: 4px 0 10px; }
.scan img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.85) brightness(.92); }
.scan-line { position: absolute; left: 0; right: 0; top: 0; height: 22%; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 35%, transparent) 70%, color-mix(in srgb, #fff 85%, var(--accent)) 98%, transparent); animation: scanY 1.6s ease-in-out infinite alternate; }
.scan-grid { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.5) 1px, transparent 1.4px); background-size: 14px 14px; opacity: .35; mix-blend-mode: overlay; }
@keyframes scanY { from { transform: translateY(-30%); } to { transform: translateY(380%); } }
.scan-steps { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; font-size: .9rem; }
.scan-steps li { color: var(--muted); opacity: .45; padding-left: 22px; position: relative; transition: opacity .3s, color .3s; }
.scan-steps li::before { content: ''; position: absolute; left: 4px; top: .45em; width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; box-sizing: border-box; }
.scan-steps li.now { opacity: 1; color: var(--text); font-weight: 600; }
.scan-steps li.now::before { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.scan-steps li.done { opacity: .85; }
.scan-steps li.done::before { content: '✓'; border: 0; color: var(--ok); font-size: .8rem; top: .05em; left: 3px; width: auto; height: auto; }
@media (prefers-reduced-motion: reduce) { .scan-line { animation: none; top: 40%; } .scan-steps li.now::before { animation: none; } }

/* PC 웹캠 */
.cam { border: 0; border-radius: 14px; padding: 16px; background: var(--card); color: var(--text); width: min(560px, calc(100vw - 32px)); }
.cam::backdrop { background: rgba(20, 14, 10, .6); }
.cam-view { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; margin: 0 auto; max-width: 100%; }
.cam-view video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.cam-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cam-guide path { fill: none; stroke: rgba(255, 255, 255, .9); stroke-width: 3; stroke-dasharray: 10 8; vector-effect: non-scaling-stroke; transition: stroke .2s; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .6)); }
.cam-view.aligned .cam-guide path { stroke: #22c55e; stroke-width: 4; stroke-dasharray: none; }
.cam-guide .g-ear { stroke-width: 2.5; stroke-dasharray: 6 6; }
.cam-view.aligned .cam-guide .g-ear { stroke-width: 3; }
.cam-box { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); max-width: calc(100% - 20px); width: max-content; padding: 8px 14px; border-radius: 12px;
  background: rgba(20, 14, 10, .72); color: #fff; text-align: center; line-height: 1.35; pointer-events: none; }
.cam-box b { display: block; font-size: 1.05rem; }
.cam-box small { display: block; opacity: .85; font-size: .8rem; }
.cam-box.adjust { background: rgba(194, 65, 12, .85); }
.cam-box.good { background: rgba(21, 128, 61, .88); }
.cam-ok { position: absolute; right: 12px; bottom: 12px; width: 52px; height: 52px; pointer-events: none; }
.cam-ok svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cam-ok circle { fill: rgba(0, 0, 0, .35); stroke: rgba(255, 255, 255, .35); stroke-width: 4; }
.cam-ok circle.p { fill: none; stroke: #4ade80; stroke-dasharray: 106.8; stroke-dashoffset: 106.8; }
.seg.seg-sm { align-items: center; margin-top: 8px; }
.seg.seg-sm .seg-label { font-size: .82rem; color: var(--muted); margin-right: 2px; }
.seg.seg-sm button { padding: 4px 11px; font-size: .84rem; }
.respect { margin: 2px 0 10px; padding: 8px 12px; border-radius: 8px; background: var(--bg-2); color: var(--muted); font-size: .86rem; line-height: 1.45; }
.analyzing { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 6px 0 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.analyzing b { display: block; }
.analyzing small { display: block; color: var(--muted); font-size: .82rem; }
.subject-note { margin: 0 0 10px; padding: 10px 14px; border-radius: 10px; background: #fff4e5; border: 1px solid #f5c98b; color: #7a4a12; font-size: .95rem; }
.subject-note b { margin-right: 4px; }
.result-empty.many strong { color: #9a3412; }
.result-empty.many small { line-height: 1.6; }
.quip { margin: 10px 0 4px; padding: 10px 14px; border-left: 3px solid var(--mocha, #8b5e4a); background: var(--bg-2); border-radius: 0 10px 10px 0; font-size: .93rem; line-height: 1.55; }
.quip b { display: block; font-size: .78rem; letter-spacing: .02em; color: var(--muted); margin-bottom: 2px; }
.face-quip { display: block; margin-top: 6px; font-style: italic; opacity: .92; }
/* 궁합 평가 · 얼굴형 기억 */
.fit-vote { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: .84rem; color: var(--muted); }
.fit-vote button { padding: 4px 12px; }
.remember { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-top: 12px; font-size: .9rem; cursor: pointer; }
.remember small { flex-basis: 100%; color: var(--muted); font-size: .8rem; line-height: 1.5; padding-left: 22px; }
.fit-export { margin: 6px 0 0; font-size: .84rem; }
.fit-export small { color: var(--muted); }
button.link { background: none; border: 0; padding: 0; color: var(--accent-ink); text-decoration: underline; cursor: pointer; font: inherit; }

/* 내 얼굴형 베스트 스타일 갤러리 */
.face-gallery .fr-head { display: flex; flex-direction: column; gap: 2px; }
.face-gallery .fr-head small { color: var(--muted); font-size: .82rem; line-height: 1.5; }
.face-gallery { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--peach-soft); }
.fg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fg-grid button { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fg-grid button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.fg-grid .ph { position: relative; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--line); }
.fg-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.fg-grid button:hover img { transform: scale(1.04); }
.fg-grid .rk { position: absolute; left: 6px; top: 6px; background: rgba(46,38,34,.72); color: #fff; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.fg-grid button:first-child .rk { background: var(--accent); }
.fg-grid .nm { font-size: .85rem; font-weight: 700; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-grid .sc { font-size: .78rem; color: var(--accent-ink); font-weight: 700; }
.fg-grid .why { font-size: .74rem; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 친구 · 커플 케미 */
.couple-result { display: flex; flex-direction: column; gap: 6px; }
.couple-result .pair { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.couple-result .pair img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.couple-result .pair b { font-size: 1.05rem; }
.couple-result .chem { font-size: 1.3rem; font-weight: 800; color: var(--accent-ink); }
.couple-result p { margin: 0; font-size: .9rem; line-height: 1.55; }
.couple-result small { color: var(--muted); }

/* 반려동물 닮은꼴 헤어 */
.pet-match { margin-top: 10px; }
.pet-match .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pet-match .chips span { background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 2px 10px; font-size: .82rem; font-weight: 600; }
.pet-match > button { align-self: flex-start; margin-top: 6px; }

/* 시술 전후 비교 */
.ba-result .pair img { width: 72px; height: 90px; border-radius: 10px; }
.ba-result .pair figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .78rem; color: var(--muted); }
.ba-result ul { margin: 2px 0 0; padding-left: 0; list-style: none; font-size: .9rem; line-height: 1.6; }
.ba-result li.good::before { content: '✓ '; color: var(--ok); font-weight: 700; }
.ba-result li.bad::before { content: '△ '; color: var(--accent-ink); font-weight: 700; }
.ba-result li.flat::before { content: '· '; color: var(--muted); font-weight: 700; }

/* 얼굴 분석 결과 탭 */
.face-tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; margin: 16px -4px 4px; padding: 6px 4px; background: var(--card); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.face-tabs::-webkit-scrollbar { display: none; }
.face-tabs button { flex: 1 0 auto; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: .9rem; padding: 8px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.face-tabs button:hover { color: var(--text); }
.face-tabs button.active, .face-tabs button[aria-selected="true"] { background: var(--accent); color: var(--on-accent, #fff); }
.ftab > :first-child { margin-top: 10px; }

footer .tech { margin-top: 6px; font-size: .78rem; }
footer .tech summary { cursor: pointer; color: var(--muted); display: inline; }
footer p { margin: 4px 0; }

/* 모바일에서 화면 아래 떠 있는 '다른 사진 고르기' 버튼이 마지막 내용을 가리지 않게 */
@media (max-width: 899px) { body:not([data-mode="face"]) #resultCard { padding-bottom: 84px; } }
/* 긴 카드 목록 접기 */
.suits-grid.collapsed .suit:nth-child(n+4) { display: none; }
.more-btn { margin-top: 8px; }

/* 분석 중 자리 표시 (스켈레톤) */
.skel { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.skel i { display: block; border-radius: 10px; background: linear-gradient(90deg, var(--line) 0%, var(--bg-2) 50%, var(--line) 100%); background-size: 200% 100%; animation: sk 1.3s ease-in-out infinite; }
.skel .sk-img { aspect-ratio: 1 / 1; max-height: 320px; width: 100%; border-radius: 14px; }
.skel .sk-line { height: 16px; } .skel .sk-bar { height: 10px; }
.skel .w40 { width: 40%; } .skel .w50 { width: 50%; } .skel .w70 { width: 70%; } .skel .w90 { width: 90%; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel i { animation: none; } }
.st { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 접근성: 키보드 포커스가 모든 버튼 · 링크에서 보이게, 작은 회색 글씨는 조금 더 진하게 */
button:focus-visible, a:focus-visible, summary:focus-visible, [role="tab"]:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.fr-head small, .fg-grid .why, .fit-export small, .remember small { color: color-mix(in srgb, var(--muted) 85%, var(--text)); }

/* 첫 방문 안내 (3단계) */
.onboard { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--peach-soft); border: 1px solid var(--line); }
.ob-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.ob-close { border: 0; background: none; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; padding: 4px 6px; }
.ob-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .ob-steps { grid-template-columns: 1fr; gap: 6px; } }
.ob-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--card); transition: opacity .2s; }
.ob-steps li > i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: .82rem; background: var(--line); color: var(--text); }
.ob-steps li.now > i { background: var(--accent); color: var(--on-accent); }
.ob-steps li.done > i { background: var(--ok); color: #fff; font-size: 0; }
.ob-steps li.done > i::after { content: '✓'; font-size: .82rem; }
.ob-steps li.done { opacity: .7; }
.ob-steps li.done .ob-act, .ob-steps li:not(.now) .ob-act { display: none; }
.ob-steps li div { display: grid; gap: 2px; min-width: 0; }
.ob-steps small { color: var(--muted); font-size: .78rem; }
.ob-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ob-done { margin: 10px 0 0; font-size: .9rem; }

/* 휴대폰: 안내 문구가 떠 있는 '다른 사진 고르기' 버튼을 가리지 않게 위로 */
@media (max-width: 899px) { .toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); margin-bottom: 0; } }

/* 앱 이름 옆 한글 읽기 */
.brand h1 .brand-ko { font-size: .5em; font-weight: 600; color: var(--muted); margin-left: 6px; letter-spacing: 0; vertical-align: middle; }
.brand h1.logo { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; line-height: 1; }
.brand h1.logo img { display: block; height: 46px; width: auto; }
.brand h1.logo .brand-ko { font-size: .95rem; margin: 6px 0 0; }
@media (max-width: 600px) { .brand h1.logo img { height: 38px; } }

/* ---- 내 손톱 분석 ---- */
.nail-q { display: grid; gap: 4px; margin-bottom: 6px; }
.nail-q .seg { margin-top: 2px; }
.nail-shapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 10px; }
.nail-shape { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--bg-2); display: flex; flex-direction: column; gap: 6px; }
.nail-shape.top { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.nail-shape svg { width: 46px; height: 64px; color: var(--accent-ink); }
.nail-shape b { font-size: 1rem; }
.nail-shape .sc { font-size: 0.78rem; color: var(--muted); }
.nail-shape p { margin: 0; font-size: 0.84rem; line-height: 1.45; }
.nail-avoid { font-size: 0.86rem; color: var(--muted); margin: 0 0 8px; }
.nail-avoid b { color: var(--text); }
.nail-card { white-space: pre-wrap; font: inherit; font-size: 0.88rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 6px 0; }
@media (max-width: 640px) { .nail-shapes { grid-template-columns: 1fr; } .nail-shape { flex-direction: row; align-items: flex-start; } .nail-shape svg { flex: none; } }
@media (max-width: 600px) { .mode-tabs { gap: 4px; } .mode-tabs button { padding: 8px 8px; font-size: 0.9rem; } .mode-tabs button small { font-size: 0.72rem; } }
.lab-badge { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: .02em; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); vertical-align: middle; }
.lab-note { font-size: 0.84rem; color: var(--muted); margin: -4px 0 10px; }
.nail-vote { border: 1px dashed var(--line-2); border-radius: 12px; padding: 10px 12px; margin: 14px 0; display: grid; gap: 6px; font-size: 0.88rem; }
.nail-vote .nv-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nail-vote .nv-row span { flex: 1 1 200px; }
.nail-vote .nv-row button { padding: 4px 12px; }
.nail-vote .nv-row button.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.nail-vote small { color: var(--muted); }
.linklike { background: none; border: 0; padding: 0; color: var(--accent-ink); text-decoration: underline; cursor: pointer; font: inherit; }
.measure tr.muted { color: var(--muted); }
.brand h1.logo .lab-site { margin-left: 8px; font-size: 0.72rem; align-self: center; }
/* 내 머리카락 질문 (선택) */
.hair-q { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.hair-q summary { cursor: pointer; font-size: .88rem; font-weight: 600; }
.hair-q summary small { color: var(--muted); font-weight: 400; }
.hair-q .seg-label { min-width: 4.6em; }
.hair-q p.small { font-size: .78rem; margin: 6px 0 2px; color: var(--muted); }
/* 추천 커트 예시 사진 */
.adv li.has-ex { display: grid; grid-template-columns: 52px 1fr; column-gap: 10px; align-items: start; }
.adv li.has-ex > span, .adv li.has-ex > small { grid-column: 2; }
.cut-ex { grid-row: span 2; width: 52px; height: 52px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); cursor: zoom-in; }
.cut-ex img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cut-ex-dlg { border: none; border-radius: 14px; padding: 14px; max-width: min(560px, calc(100vw - 32px)); background: var(--card); color: var(--text); }
.cut-ex-dlg::backdrop { background: rgba(0, 0, 0, .55); }
.cut-ex-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.cut-ex-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.cut-ex-body figure { margin: 0; }
.cut-ex-body img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 10px; background: var(--bg, #000); }
.cut-ex-body figcaption, .cut-ex-note { font-size: .78rem; color: var(--muted); margin-top: 4px; }
/* 추천 카드 (사진 · 이름 · 맞춤 점수 · 이유) */
.rc-grid { display: grid; gap: 8px; margin-top: 8px; }
.rc { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.rc.top { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.rc-focus { cursor: pointer; transition: border-color .15s, background .15s; }
.rc-focus:hover { border-color: var(--accent); }
.rc-focus.on { background: var(--accent-soft); border-color: var(--accent); }
.rc-focus:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rc-hint { margin: 4px 0 0; font-size: .74rem; color: var(--accent-ink); font-weight: 600; }
.face-legend .focus-cap { display: block; line-height: 1.55; font-size: .84rem; color: var(--text); }
.face-legend .focus-cap .linklike { margin-left: 6px; }
.rc-photo { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); padding: 0; background: var(--card); cursor: zoom-in; }
.rc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-none { display: grid; place-items: center; cursor: default; color: var(--muted); font-weight: 700; font-size: 1.05rem; background: var(--soft, var(--card)); }
.rc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rc-head > b { font-size: 0.98rem; color: var(--accent-ink); }
.rc-fit { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted); }
.rc-fit i { width: 64px; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; display: inline-block; }
.rc-fit i b { display: block; height: 100%; background: var(--accent); }
.rc-fit em { font-style: normal; font-weight: 700; color: var(--text); min-width: 2ch; text-align: right; }
.rc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rc-tags span { font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; background: var(--soft, var(--card)); border: 1px solid var(--line); color: var(--accent-ink); }
.rc-why { margin: 5px 0 0; font-size: 0.86rem; line-height: 1.5; }
.rc-more { margin: 2px 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--muted); }
/* 근거 그림 */
.basis { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--card); margin-bottom: 10px; }
.basis > b { font-size: 0.92rem; }
.basis p.small { font-size: 0.8rem; margin: 3px 0 8px; }
.bs-rows { display: grid; gap: 8px; }
.bs-row { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.bs-arrow { color: var(--muted); font-weight: 700; }
.bs-mi { display: grid; grid-template-columns: 1fr; font-size: 0.8rem; gap: 2px; }
.bs-mi span { font-weight: 600; }
.bs-mi small { color: var(--muted); font-size: 0.74rem; }
.zb { position: relative; display: block; height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.zb::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--muted); opacity: .6; }
.zb b { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 4px; }
.bs-need { font-size: 0.84rem; display: grid; gap: 4px; }
.bs-need span { font-weight: 700; color: var(--accent-ink); }
.bs-need i { display: block; height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bs-need i b { display: block; height: 100%; background: var(--accent); }
.bs-cuts { display: flex; flex-wrap: wrap; gap: 4px; }
.bs-cuts span { font-size: 0.76rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent-ink); }
@media (max-width: 560px) { .bs-row { grid-template-columns: 1fr; } .bs-arrow { transform: rotate(90deg); justify-self: center; } }
/* 시술 지시서 · 안경/귀걸이 · 퍼스널 컬러 · 헤어 컬러 팔레트 · 네일 입혀 보기 */
.spec-box, .acc-box, .season-box { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--card); margin-top: 10px; }
.spec-box > b, .acc-box > b, .season-box > b { font-size: 0.92rem; }
.spec-box p.small, .acc-box p.small, .season-box p.small { font-size: 0.8rem; margin: 3px 0 8px; }
table.spec { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
table.spec th { text-align: left; width: 6.5em; padding: 6px 8px 6px 0; vertical-align: top; color: var(--accent-ink); font-weight: 700; border-bottom: 1px solid var(--line); }
table.spec td { padding: 6px 0; vertical-align: top; line-height: 1.5; border-bottom: 1px solid var(--line); }
table.spec tr:last-child th, table.spec tr:last-child td { border-bottom: none; }
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acc-col > b { font-size: 0.86rem; }
.acc-items { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.acc-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--accent-ink); font-size: 0.8rem; }
.acc-item em { font-style: normal; font-weight: 600; }
.acc-tip { font-size: 0.82rem; line-height: 1.5; margin: 4px 0 0; }
.acc-avoid { font-size: 0.78rem; color: var(--muted); margin: 4px 0 0; }
.season-head { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.season-head strong { font-size: 1.05rem; color: var(--accent-ink); }
.season-conf { font-size: 0.74rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.season-conf.hi { color: var(--ok, #4f7f4a); border-color: var(--ok, #4f7f4a); }
.season-conf.lo { color: #a65a2a; border-color: #a65a2a; }
.season-why { margin: 4px 0 8px; padding-left: 18px; font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.sw-row { display: flex; align-items: center; gap: 10px; margin: 4px 0; font-size: 0.8rem; }
.sw-row > span { min-width: 5em; color: var(--muted); }
.sw { display: flex; gap: 5px; flex-wrap: wrap; }
.sw i { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); display: inline-block; }
.drapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0; }
.drape { margin: 0; border-radius: 10px; padding: 10px 10px 4px; text-align: center; }
.drape img { width: 100%; border-radius: 6px; display: block; }
.drape figcaption { font-size: 0.72rem; color: rgba(0,0,0,.7); margin-top: 3px; font-weight: 600; mix-blend-mode: multiply; }
.hair-palette { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hair-palette button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; position: relative; padding: 0; }
.hair-palette button.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.hair-palette button span { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); font-size: 0.62rem; white-space: nowrap; color: var(--muted); margin-top: 2px; }
.hair-palette { padding-bottom: 14px; }
.tryon { display: grid; gap: 8px; }
.tryon-split { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.tryon-split input { flex: 1; accent-color: var(--accent); }
.tryon-row { display: grid; grid-template-columns: 52px 1fr; align-items: start; gap: 6px; }
.tryon-row > span { font-size: .82rem; font-weight: 600; padding-top: 8px; }
.tryon .hair-palette { margin-top: 0; }
.tryon .hair-palette button.rec { border-width: 3px; border-color: color-mix(in srgb, var(--accent) 70%, #fff); }
.tryon .hair-palette button.none { background: repeating-linear-gradient(45deg, var(--card) 0 5px, var(--line) 5px 7px); }
.nail-try { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: var(--card); }
.nail-try > b { font-size: 0.88rem; }
.nail-try > b small { color: var(--muted); font-weight: 400; }
.nail-colors { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.nail-colors button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.nail-colors button.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
@media (max-width: 560px) { .acc-grid { grid-template-columns: 1fr; } .drapes { grid-template-columns: repeat(2, 1fr); } }
/* 핵심 칸: 한 줄 포인트 · 전문가 한마디 · 메모 */
.adv.idea .idea-points { margin: 6px 0 2px; font-size: 0.92rem; }
.adv.idea .idea-points strong { color: var(--accent-ink); }
.adv.idea .idea-quip { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 0 8px 8px 0; font-size: 0.86rem; font-style: italic; color: var(--text); }
.adv.idea .idea-notes { margin: 8px 0 0; padding-left: 18px; font-size: 0.82rem; color: var(--muted); line-height: 1.55; display: grid; gap: 3px; }
/* 내 기록 · 디자이너 모드 */
.mode-tabs { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) { .mode-tabs { grid-template-columns: repeat(2, 1fr); } }
.designer-badge { background: var(--accent); color: var(--on-accent); margin-left: 6px; }
body[data-designer] .idea-quip { display: none; }
.hist-card h2 small { font-weight: 400; color: var(--muted); font-size: 0.8rem; margin-left: 6px; }
.hist-memo { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); margin: 8px 0; font-size: 0.88rem; }
.hist-memo b { color: var(--accent-ink); }
.hist-memo small { grid-column: 1 / -1; color: var(--muted); font-size: 0.78rem; }
.hist-memo.muted span { color: var(--muted); }
.hist-filter { margin: 10px 0; }
.hist-list { display: grid; gap: 8px; }
.hist-item { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.hist-head { display: grid; grid-template-columns: 64px 1fr; gap: 12px; width: 100%; text-align: left; padding: 10px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; align-items: center; }
.hist-head img, .hist-ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; display: grid; place-items: center; background: var(--bg); color: var(--muted); font-style: normal; font-weight: 700; }
.hist-head div { display: grid; gap: 2px; min-width: 0; }
.hist-cat { font-size: 0.72rem; color: var(--accent-ink); font-weight: 600; }
.hist-head b { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-head small { color: var(--muted); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-head time { font-size: 0.74rem; color: var(--muted); }
.hist-body { display: none; padding: 0 12px 12px; }
.hist-item.open .hist-body { display: block; }
.hist-body pre { white-space: pre-wrap; font: inherit; font-size: 0.84rem; line-height: 1.55; margin: 0 0 8px; padding: 10px; border-radius: 8px; background: var(--bg); max-height: 320px; overflow: auto; }
.hist-empty { color: var(--muted); font-size: 0.88rem; padding: 14px 4px; }
.hist-actions { margin-top: 12px; }

/* 얼굴 세로 비율 (상안부 · 중안부 · 하안부) */
.thirds { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.thirds h4 { margin: 0 0 8px; font-size: 0.92rem; font-weight: 700; }
.thirds h4 small { color: var(--muted); font-weight: 500; font-size: 0.78rem; margin-left: 6px; }
.th-bar { display: flex; gap: 2px; border-radius: 8px; overflow: hidden; }
.th-bar.mine span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 6px 2px; background: var(--bar-fill); color: var(--text); font-size: 0.8rem; line-height: 1.2; }
.th-bar.mine span b { font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.th-bar.mine span small { font-size: 0.7rem; opacity: 0.9; white-space: nowrap; }
.th-bar.mine span.long { background: var(--accent); color: var(--on-accent); }
.th-bar.mine span.short { background: var(--bar-fill); opacity: 0.7; }
.th-bar.avg { margin-top: 3px; position: relative; }
.th-bar.avg span { display: flex; justify-content: center; min-width: 0; padding: 2px 0; background: var(--bar); color: var(--muted); font-size: 0.7rem; font-variant-numeric: tabular-nums; }
.th-bar.avg i { position: absolute; right: 6px; top: 1px; font-style: normal; font-size: 0.68rem; color: var(--muted); }
.th-legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.th-legend li { display: grid; grid-template-columns: 5em 1fr auto; gap: 8px; font-size: 0.82rem; align-items: baseline; }
.th-legend li span { color: var(--muted); }
.th-legend li em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.th-legend li em small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.th-note { margin: 10px 0 0; font-size: 0.86rem; line-height: 1.55; }
.th-note span { color: var(--muted); }
.th-warn { margin: 6px 0 0; font-size: 0.8rem; color: var(--muted); }
@media (max-width: 560px) { .th-legend li { grid-template-columns: 4.2em 1fr auto; } .th-bar.mine span small { font-size: 0.64rem; } }

/* 타투 상담 카드 */
.tc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.tc-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tc-box small { color: var(--accent-ink); font-size: 0.74rem; font-weight: 600; }
.tc-box b { font-size: 1.02rem; line-height: 1.3; }
.tc-box b em { font-style: normal; font-size: 0.72rem; color: var(--muted); font-weight: 500; margin-left: 2px; }
.tc-box span { color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.tc-pain { color: var(--accent); letter-spacing: 1px; font-size: 0.78rem; }
.tc-why { margin: 8px 0 0; }
.tc-pro { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft, var(--bg)); font-size: 0.86rem; }
.tc-pro b { display: block; margin-bottom: 4px; color: var(--accent-ink); }
.tc-pro ul { margin: 0; padding-left: 18px; line-height: 1.6; }
.tc-sec { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 0.86rem; }
.tc-sec summary { cursor: pointer; font-weight: 600; }
.tc-sec summary small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.tc-sec ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.6; }
.tc-check li::marker { content: "☐ "; color: var(--accent); }

/* AI 가 알아챈 것 (얼굴 분석 맨 위) */
.noticed { margin-top: 12px; padding: 12px 14px 8px; border-radius: 14px; background: var(--accent-soft, var(--bg)); border: 1px solid var(--line); }
.noticed h4 { margin: 0 0 6px; font-size: 0.95rem; font-weight: 700; }
.noticed h4 small { color: var(--muted); font-weight: 500; font-size: 0.76rem; margin-left: 6px; }
.noticed ol { list-style: none; margin: 0; padding: 0; counter-reset: nt; }
.noticed li { counter-increment: nt; position: relative; padding: 8px 0 8px 30px; border-top: 1px dashed var(--line); display: grid; gap: 2px; opacity: 0; animation: nt-in .5s var(--ease, ease) forwards; }
.noticed li:first-child { border-top: 0; }
.noticed li::before { content: counter(nt); position: absolute; left: 0; top: 9px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 0.78rem; font-weight: 700; display: grid; place-items: center; }
.noticed li b { font-size: 0.98rem; }
.noticed li b em { font-style: normal; font-size: 0.74rem; color: var(--muted); font-weight: 500; margin-left: 4px; }
.noticed .nt-num { font-size: 0.84rem; color: var(--text); font-variant-numeric: tabular-nums; }
.noticed .nt-num small { color: var(--muted); }
.noticed .nt-num strong { color: var(--accent-ink); }
.noticed .nt-mirror { font-size: 0.82rem; color: var(--muted); }
.noticed .nt-so { font-size: 0.84rem; color: var(--accent-ink); }
@keyframes nt-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.noticed .combo { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); display: grid; gap: 3px; opacity: 0; animation: nt-in .6s var(--ease, ease) forwards; }
.noticed .combo small { color: var(--accent-ink); font-weight: 700; font-size: .78rem; }
.noticed .combo b { font-size: 1rem; } .noticed .combo b i { font-style: normal; color: var(--muted); font-weight: 500; margin: 0 2px; }
.noticed .combo strong { font-size: 1.35rem; color: var(--accent-ink); letter-spacing: -.01em; }
.noticed .combo span { font-size: .88rem; } .noticed .combo em { font-style: normal; font-size: .74rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .noticed .combo { animation: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .noticed li { animation: none; opacity: 1; } }
.measure td.pct { white-space: nowrap; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
/* 스타일 분석: 눈여겨본 디테일 · 가장 헷갈린 것 */
.style-noticed { margin: 8px 0 0; display: grid; gap: 4px; font-size: 0.86rem; line-height: 1.5; }
.style-noticed b { color: var(--accent-ink); margin-right: 6px; }
.style-noticed strong { font-weight: 600; }
.style-noticed small { color: var(--muted); }
.style-noticed .unsure { color: var(--muted); }

/* 새로 고침 뒤 복구 안내 */
.recover { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft, var(--bg)); border: 1px solid var(--line); font-size: 0.86rem; }
.recover span { flex: 1 1 220px; }

/* 분석 진행 막대 (예상) */
.analyzing .prog { display: block; height: 5px; margin-top: 8px; border-radius: 999px; background: var(--bar); overflow: hidden; }
.analyzing .prog b { display: block; height: 100%; width: 2%; background: var(--accent); border-radius: inherit; transition: width .25s linear; }
/* 전문가용 칸 접기 (근거 그림 · 시술 지시서) */
details.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "▸"; color: var(--muted); font-size: 0.8rem; }
details.fold[open] > summary::before { content: "▾"; }
details.fold > summary small { color: var(--muted); font-size: 0.76rem; }

/* AI 가 본 곳 (스타일 사진) */
.style-look { margin: 10px 0 4px; display: grid; gap: 8px; }
.style-look figcaption { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.style-look figcaption small { color: var(--muted); font-size: .78rem; }
.style-look canvas { width: 100%; max-width: 420px; height: auto; border-radius: 12px; display: block; }
.style-look ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .86rem; }
.style-look li i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.style-look li small { color: var(--muted); }

/* 손가락별 손톱 카드 */
.nail-find { margin: 4px 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: .9rem; line-height: 1.55; }
.nail-find b { color: var(--accent-ink); margin-right: 6px; }
.nail-fingers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 8px; }
.nail-fingers .nf { margin: 0; display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: start; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.nail-fingers .nf.thumb { opacity: .8; }
.nail-fingers img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; display: block; }
.nail-fingers figcaption { display: grid; gap: 1px; font-size: .8rem; line-height: 1.4; }
.nail-fingers figcaption b { font-size: .9rem; }
.nail-fingers figcaption small { color: var(--muted); font-size: .72rem; }

