/* K-BEAUTY AI 테마 — 원본 styles.css 위에 덮어쓰는 "색·글꼴" 전용 파일 (기능/레이아웃 로직과 무관).
 * 방향: 화이트·아이보리 바탕 + 차분한 코랄/연한 로즈 포인트. 어두운 와인·보라, 과한 그라데이션, 이탤릭 없음.
 * 글꼴: 한국어 가독성이 좋은 산세리프(Pretendard가 있으면 우선, 없으면 기기 기본 한글 고딕). 제목 굵게, 설명은 가볍게. */
:root {
  --ink: #2b2528;
  --muted: #7b6f73;
  --wine: #c25b4c;        /* 기존 짙은 와인 → 차분한 코랄(버튼·강조 글자) */
  --rose: #c0626a;        /* 라벨/소제목 포인트 */
  --blush: #fbe6e3;
  --cream: #fffaf6;
  --paper: #ffffff;
  --line: #f0e3df;
  --shadow: 0 14px 36px rgba(194, 91, 76, .08);
  --coral: #c25b4c;
  --coral-soft: #fdeeea;
  --ivory: #fffaf6;
  --sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
}

/* ── 글꼴 통일 · 이탤릭 금지 ── */
html, body, button, input, label, select, textarea, h1, h2, h3, h4, p, span, b, small, em, i, th, td, summary, figcaption, dt, dd { font-family: var(--sans) !important; }
*, *::before, *::after { font-style: normal !important; }
body { font-weight: 400; background: var(--ivory); letter-spacing: -.01em; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.035em; word-break: keep-all; color: var(--ink); }
p, small, .hero-description, .upload-copy p, .mode-card p, .insight-grid p, .stage-copy small, .identity-guard span { font-weight: 400; color: var(--muted); }
b, strong { font-weight: 700; }
.overline, .section-number, .upload-label, .mode-card span, .insight-grid span { font-weight: 700; letter-spacing: .06em; color: var(--rose); }

/* ── 간판(첫 화면 상단) ── */
.page-shell { padding-top: 10px; }
.kb-brandbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 6px 14px; }
.kb-wordmark { display: inline-flex; align-items: baseline; gap: 6px; color: var(--ink); font-weight: 800; font-size: 17px; letter-spacing: .08em; }
.kb-wordmark em { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--coral-soft); color: var(--coral); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.kb-tagline { color: var(--muted); font-size: 12px; font-weight: 400; }

.hero { position: relative; min-height: 0; padding: clamp(30px, 6vw, 60px); border: 1px solid var(--line); border-radius: 28px; color: var(--ink); background: #fff; box-shadow: var(--shadow); grid-template-columns: 1fr; }
.hero::before { content: ""; position: absolute; top: -64px; right: -44px; width: 170px; height: 170px; border-radius: 50%; background: var(--blush); opacity: .6; }
.hero::after { display: none; }
.hero .overline { color: var(--coral); font-weight: 800; }
.hero h1 { font-size: clamp(30px, 8.4vw, 54px); line-height: 1.2; letter-spacing: -.045em; font-weight: 800; color: var(--ink); word-break: keep-all; }
.hero h1 em { color: var(--coral); font-weight: 800; }
.hero-description { margin-top: 18px; max-width: 560px; font-size: 16px; line-height: 1.7; font-weight: 400; color: var(--muted); word-break: keep-all; }
.trust-row { margin-top: 22px; gap: 6px; }
.trust-row span { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--ivory); color: #8a625c; font-size: 12px; font-weight: 500; }

/* ── 기능 카드 ── */
.mode-card { border: 1px solid var(--line); background: #fff; box-shadow: none; }
.mode-card:hover, .mode-card.active { border-color: #e3a79e; box-shadow: 0 10px 26px rgba(194, 91, 76, .1); }
.mode-card.active { background: var(--ivory); }
.mode-card h3 { font-weight: 800; letter-spacing: -.03em; }
.mode-card b { color: var(--coral); font-weight: 700; }

/* ── 입력 카드 · 버튼 ── */
.upload-card { background: #fff; box-shadow: 0 8px 24px rgba(194, 91, 76, .06); }
.preview-placeholder, .preview-placeholder.reference { background: var(--coral-soft); }
.preview-placeholder i { color: var(--coral); }
.file-button { background: var(--coral); color: #fff; font-weight: 700; }
.file-button.secondary { background: var(--coral-soft); color: var(--coral); }
.translate-button { background: var(--coral); color: #fff; font-weight: 800; box-shadow: 0 12px 26px rgba(194, 91, 76, .22); }
.ghost-button { color: var(--coral); border-color: var(--line); box-shadow: none; }
.identity-guard { border-left-color: var(--coral); background: var(--ivory); }
.identity-guard b, footer b, .sample-lab b, .json-panel summary, .analysis-data-details > summary, .qa-details > summary, .comparison-table td b, .preview-grid figcaption { color: var(--coral); }
.sample-lab > div { background: #fff; }
.sample-lab button.active { background: var(--coral); border-color: var(--coral); color: #fff; }
.processing { background: #fff; }
.processing-orbit { border-color: #f2cfc9; }
.processing-orbit i { background: var(--coral); }
.identity-badge, .method-badge, .experimental-badge { background: var(--coral-soft); color: #b04a3c; font-weight: 700; letter-spacing: .04em; }

/* ── 결과 화면: 어두운 와인 패널 → 밝은 아이보리 ── */
.before-after-hero { background: var(--ivory); border: 1px solid var(--line); box-shadow: var(--shadow); }
.before-after-hero figure.after { box-shadow: 0 0 0 2px #e7a59b, 0 14px 30px rgba(194, 91, 76, .14); }
.compare-arrow { color: var(--coral); font-family: var(--sans) !important; font-size: 24px; }
.before-after-hero figcaption, .reference-pair figcaption, .stage-grid figcaption { color: var(--ink); background: rgba(255, 255, 255, .9); backdrop-filter: blur(6px); }
.before-after-hero figcaption b, .reference-pair figcaption b, .stage-grid figcaption b { letter-spacing: .02em; font-weight: 800; }
.before-after-hero figcaption span, .reference-pair figcaption span, .stage-grid figcaption span { color: var(--muted); opacity: 1; }
.stage-grid figcaption { background: #fff; border-top: 1px solid var(--line); }
.stage-number { background: var(--coral); color: #fff; border-color: #fff; box-shadow: 0 4px 12px rgba(194, 91, 76, .28); font-family: var(--sans) !important; }
.reference-pair figure, .stage-grid figure { box-shadow: 0 10px 24px rgba(194, 91, 76, .08); }
.reference-proof figcaption, .reference-mini span { color: var(--ink); background: rgba(255, 255, 255, .9); }
.insight-grid article { background: #fff; box-shadow: 0 8px 22px rgba(194, 91, 76, .06); }
.comparison-table thead th { color: #9a4439; background: var(--coral-soft); letter-spacing: .02em; font-weight: 800; }
.audit-strip { border-color: var(--line); background: var(--ivory); }
.audit-strip span { color: var(--rose); font-weight: 700; letter-spacing: .04em; }
.audit-strip b { color: var(--ink); }
.look-summary, .top-changes article { color: var(--ink); background: var(--ivory); border: 1px solid var(--line); }
.stage-image > span { color: var(--ink); background: rgba(255, 255, 255, .9); font-family: var(--sans) !important; }

/* ── 작은 화면 ── */
@media (max-width: 520px) {
  .kb-brandbar { padding: 10px 4px 12px; }
  .kb-tagline { display: none; }
  .hero { padding: 28px 22px 30px; border-radius: 24px; }
  .hero h1 { font-size: clamp(29px, 8.8vw, 40px); }
  .hero-description { font-size: 15px; }
}

/* 결과 제목 옆 배지가 좁은 화면에서 세로로 깨지지 않게 */
.results-heading { align-items: flex-start; flex-wrap: wrap; }
.identity-badge { white-space: nowrap; }

/* 모바일 터치 영역 44px 이상 */
.file-button { min-height: 46px; }
.sample-lab button { min-height: 44px; padding: 8px 14px; }
.compare-tabs button, .ghost-button { min-height: 44px; }

/* ── 첫 화면: 꽉 찬 인물 사진 + 큰 굵은 자막 ── */
.kb-photo-hero { padding: 0; min-height: min(86svh, 760px); display: flex; align-items: flex-end; overflow: hidden; border: 0; border-radius: 28px; background: #3a1f26; }
.kb-photo-hero::before { display: none; }
.kb-hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.kb-photo-hero::after { content: ""; display: block; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(24,10,16,.5) 0%, rgba(24,10,16,0) 38%, rgba(24,10,16,.78) 100%); }
.kb-hero-copy { position: relative; z-index: 1; width: 100%; padding: clamp(24px, 6vw, 56px); color: #fff; }
.kb-photo-hero h1 { color: #fff; font-size: clamp(34px, 9.5vw, 60px); line-height: 1.18; font-weight: 800; text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.kb-photo-hero .hero-description { color: rgba(255,255,255,.92); text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.kb-hero-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; margin-top: 20px; padding: 0 28px; border-radius: 999px; background: #fff; color: var(--coral); font-weight: 800; font-size: 16px; text-decoration: none; box-shadow: 0 12px 26px rgba(0,0,0,.25); }
.kb-photo-hero .trust-row span { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4); color: #fff; backdrop-filter: blur(6px); }

/* 얼굴이 잘 보이도록: 사진을 위쪽 기준으로 두고 글씨는 아래 가장자리에만 */
.kb-photo-hero { min-height: min(94svh, 840px); }
.kb-hero-photo { object-position: 50% 6%; }
.kb-photo-hero::after { background: linear-gradient(180deg, rgba(24,10,16,0) 0%, rgba(24,10,16,0) 52%, rgba(24,10,16,.82) 100%); }
.kb-hero-copy { padding: 0 clamp(22px, 6vw, 56px) clamp(22px, 5vw, 44px); }
.kb-photo-hero h1 { font-size: clamp(28px, 8vw, 52px); }
.kb-photo-hero .hero-description, .kb-photo-hero .trust-row { display: none; }
.kb-hero-cta { margin-top: 16px; }

/* 글씨는 사진 맨 아래에 붙여서 얼굴을 가리지 않게 */
.kb-hero-copy { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; }
.kb-photo-hero h1 { font-size: clamp(24px, 7vw, 44px); }
.kb-photo-hero::after { background: linear-gradient(180deg, rgba(24,10,16,0) 0%, rgba(24,10,16,0) 70%, rgba(24,10,16,.72) 100%); }

/* 얼굴 전체가 보이도록: 사진을 위쪽부터 보여주고, 글씨는 가슴 아래 맨 밑에만 */
.kb-photo-hero { min-height: min(100svh, 880px); }
.kb-hero-photo { object-position: 50% 0%; }

/* 사진 전체(머리~어깨)가 잘리지 않게: 사진 비율 그대로, 글씨는 맨 아래 */
.kb-photo-hero { min-height: 0; aspect-ratio: 941 / 1672; max-height: 86svh; width: 100%; margin-inline: auto; }
.kb-hero-photo { object-position: 50% 0%; }
.kb-photo-hero h1 { font-size: clamp(22px, 6.4vw, 40px); }
.kb-hero-cta { min-height: 46px; margin-top: 12px; }
.kb-hero-copy { padding-bottom: 20px; }

/* 최종: 검정 박스 없음 — 사진을 크게 보여 목까지 보이게 하고, 글씨는 사진 맨 아래에 투명하게 얹는다 */
.kb-photo-hero { display: block; position: relative; aspect-ratio: auto; max-height: none; min-height: 0; background: #2a1a20; }
.kb-photo-hero::after { display: none; }
.kb-hero-photo { position: static; display: block; width: 100%; height: auto; max-height: 92svh; object-fit: cover; object-position: 50% 8%; }
.kb-photo-hero > .kb-hero-copy { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 clamp(22px, 6vw, 56px) 22px; background: transparent; }
.kb-photo-hero h1 { font-size: clamp(24px, 6.4vw, 40px); text-shadow: 0 1px 3px rgba(0,0,0,.6), 0 2px 16px rgba(0,0,0,.65); }
