/* ============================================
   MODI HAIR PLANT — 예진표 Design System
   ============================================ */

:root {
  /* Brand */
  --modi-green: #1F6B3A;
  --modi-green-deep: #134526;
  --modi-green-soft: #E8F1EB;
  --modi-green-tint: #F4F8F5;

  /* Neutrals — warm off-white */
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --surface-2: #F5F4EF;
  --border: #E5E3DB;
  --border-strong: #D0CDC2;

  /* Text */
  --text: #1A1F1C;
  --text-2: #4A524C;
  --text-3: #7A8079;
  --text-on-green: #FFFFFF;

  /* Status */
  --error: #B53A2A;
  --error-bg: #FBEEEC;

  /* Spacing & radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Type scale (large-friendly) */
  --fs-xs: 14px;
  --fs-sm: 16px;
  --fs-base: 17px;
  --fs-md: 18px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --fs-2xl: 28px;
  --fs-3xl: 34px;

  --shadow-sm: 0 1px 2px rgba(20, 30, 25, 0.04), 0 1px 1px rgba(20, 30, 25, 0.03);
  --shadow-md: 0 4px 16px rgba(20, 30, 25, 0.06), 0 2px 4px rgba(20, 30, 25, 0.04);
  --shadow-lg: 0 12px 40px rgba(20, 30, 25, 0.08), 0 4px 12px rgba(20, 30, 25, 0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "SF Pro Korean", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

/* ===== App layout ===== */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--modi-green);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.brand-text {
  display: flex; flex-direction: column;
  line-height: 1.2;
}
.brand-text .name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--modi-green-deep);
}
.brand-text .sub {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.topbar-meta {
  font-size: var(--fs-xs);
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.save-indicator {
  display: inline-flex; align-items: center; gap: 6px;
}
.save-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--modi-green);
}

/* ===== Language switcher ===== */
.lang-switch {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 999px;
  padding: 2px;
  gap: 0;
}
.lang-btn {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.lang-btn:hover {
  color: var(--text);
}
.lang-btn.active {
  background: var(--modi-green);
  color: #fff;
}
.lang-btn-flag {
  font-size: 14px;
  line-height: 1;
}

/* ===== Consent translation note ===== */
.consent-detail-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.consent-translation-note {
  font-size: 11px;
  color: var(--text-3);
  font-style: italic;
  padding: 0 2px;
}
.consent-detail-translation {
  opacity: 0.85;
  border-top: 1px dashed var(--border);
  padding-top: 8px;
}

/* ===== Progress ===== */
.progress-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}
.progress-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 10px;
  font-size: var(--fs-xs);
  color: var(--text-2);
}
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--modi-green);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Main / step container ===== */
.main {
  flex: 1;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 120px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px 36px 36px;
  box-shadow: var(--shadow-sm);
}

.step-eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--modi-green);
  font-weight: 600;
  margin-bottom: 10px;
}

.step-title {
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.3;
}
.step-desc {
  font-size: var(--fs-md);
  color: var(--text-2);
  margin: 0 0 32px;
  line-height: 1.6;
}

/* ===== Form fields ===== */
.field { margin-bottom: 24px; }
.field:last-child { margin-bottom: 0; }

.field-label {
  display: block;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.5;
}
.field-required {
  color: var(--error);
  margin-left: 4px;
  font-weight: 600;
}
.field-hint {
  font-size: var(--fs-sm);
  color: var(--text-3);
  margin-top: 6px;
  display: block;
}
.field-error {
  font-size: var(--fs-sm);
  color: var(--error);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.input, .textarea, .select {
  width: 100%;
  padding: 14px 16px;
  font-size: var(--fs-md);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--modi-green);
  box-shadow: 0 0 0 4px rgba(31, 107, 58, 0.12);
}
.input.error, .textarea.error, .select.error {
  border-color: var(--error);
  background: var(--error-bg);
}
.textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
.select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><path d='M3 5l4 4 4-4' stroke='%234A524C' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .input-row { grid-template-columns: 1fr; }
}

/* Radio / checkbox cards */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.choice-list.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 520px) {
  .choice-list.grid-2 { grid-template-columns: 1fr; }
}

.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.15s;
  font-size: var(--fs-md);
  color: var(--text);
  user-select: none;
}
.choice:hover { border-color: var(--text-3); background: var(--surface-2); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-mark {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface);
  transition: all 0.15s;
}
.choice-mark.box { border-radius: 6px; }
.choice-mark::after {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--modi-green);
  transform: scale(0);
  transition: transform 0.15s;
}
.choice-mark.box::after {
  border-radius: 2px;
  width: 12px; height: 12px;
  background: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8l3.5 3.5L13 5' stroke='white' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.choice.selected {
  border-color: var(--modi-green);
  background: var(--modi-green-tint);
}
.choice.selected .choice-mark {
  border-color: var(--modi-green);
}
.choice.selected .choice-mark.box {
  background: var(--modi-green);
}
.choice.selected .choice-mark::after {
  transform: scale(1);
}
.choice-label-text {
  flex: 1;
  line-height: 1.5;
}
.choice-sub {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-3);
  font-weight: 400;
  margin-top: 2px;
}

/* Pill chips */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 10px 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--fs-sm);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--text-3); }
.chip.selected {
  background: var(--modi-green);
  color: var(--text-on-green);
  border-color: var(--modi-green);
}

/* Slider scale (e.g. 1-10) */
.scale-row {
  display: flex; gap: 6px;
  flex-wrap: wrap;
}
.scale-btn {
  flex: 1;
  min-width: 44px;
  aspect-ratio: 1;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--r-md);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
}
.scale-btn:hover { border-color: var(--text-3); }
.scale-btn.selected {
  background: var(--modi-green);
  border-color: var(--modi-green);
  color: white;
}
.scale-ends {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-size: var(--fs-xs);
  color: var(--text-3);
}

/* Norwood illustration images */
.norwood-img {
  width: 100%;
  max-width: 110px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  user-select: none;
  -webkit-user-drag: none;
}
.scale-legend {
  list-style: none;
  margin: 10px 0 0;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-size: var(--fs-xs);
  color: var(--text-2);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 4px 14px;
}
.scale-legend li {
  display: flex; gap: 6px; align-items: baseline;
  line-height: 1.45;
}
.scale-legend li b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--modi-green);
  color: white;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Buttons */
.btn-row {
  display: flex; gap: 12px;
  justify-content: flex-end;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.btn-row.split { justify-content: space-between; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-md);
  font-size: var(--fs-md);
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 52px;
  letter-spacing: -0.01em;
}
.btn-primary {
  background: var(--modi-green);
  color: var(--text-on-green);
  border-color: var(--modi-green);
}
.btn-primary:hover { background: var(--modi-green-deep); border-color: var(--modi-green-deep); }
.btn-primary:disabled {
  background: var(--border-strong);
  border-color: var(--border-strong);
  color: var(--text-3);
  cursor: not-allowed;
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--text-2); background: var(--surface-2); }
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
  padding: 14px 16px;
}
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }

/* Welcome / version select */
.welcome {
  text-align: center;
  padding: 24px 0 8px;
}
.welcome-mark {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--modi-green);
  display: grid; place-items: center;
  overflow: hidden;
}
.welcome-mark img { width: 100%; height: 100%; object-fit: cover; }

.welcome-title {
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--text);
}
.welcome-desc {
  font-size: var(--fs-md);
  color: var(--text-2);
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.version-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
@media (max-width: 600px) {
  .version-cards { grid-template-columns: 1fr; }
}

.version-card {
  text-align: left;
  padding: 28px 24px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.version-card:hover {
  border-color: var(--modi-green);
  background: var(--modi-green-tint);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.version-card-header {
  display: flex; align-items: center; justify-content: space-between;
}
.version-card-name {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--text);
}
.version-card-time {
  font-size: var(--fs-xs);
  color: var(--text-3);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 999px;
}
.version-card-desc {
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.6;
}
.version-card-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.version-card-list li {
  padding: 4px 0;
  display: flex; align-items: flex-start; gap: 8px;
}
.version-card-list li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--modi-green);
  margin-top: 10px;
  flex-shrink: 0;
}

.resume-banner {
  background: var(--modi-green-tint);
  border: 1px solid var(--modi-green-soft);
  border-left: 4px solid var(--modi-green);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.resume-banner-text { font-size: var(--fs-sm); color: var(--text); }
.resume-banner strong { color: var(--modi-green-deep); }

/* Summary */
.summary-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.summary-section:last-child { border-bottom: none; }

.summary-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.summary-section-title {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--modi-green-deep);
  margin: 0;
}
.summary-edit-btn {
  font-size: var(--fs-sm);
  color: var(--modi-green);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.summary-edit-btn:hover { background: var(--modi-green-soft); }

.summary-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 8px 0;
  font-size: var(--fs-sm);
}
@media (max-width: 520px) {
  .summary-row { grid-template-columns: 1fr; gap: 4px; padding: 10px 0; }
}
.summary-key { color: var(--text-3); }
.summary-val { color: var(--text); white-space: pre-wrap; word-break: break-word; }
.summary-val.empty { color: var(--text-3); font-style: italic; }

/* Step indicator dots (for stepper) */
.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
  color: var(--text-3);
}

/* Done screen */
.done-screen {
  text-align: center;
  padding: 40px 20px;
}
.done-icon {
  width: 80px; height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--modi-green-soft);
  display: grid; place-items: center;
}
.done-icon svg { width: 40px; height: 40px; color: var(--modi-green); }

/* Privacy box (legacy, unused after consent refactor) */
.privacy-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ===== Consent (welcome) ===== */
.consent-box {
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-bottom: 24px;
}
.consent-heading {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.consent-heading .consent-sub {
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--text-3);
}
.consent-item {
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.consent-item:last-child { margin-bottom: 0; }
.consent-item.checked {
  border-color: var(--modi-green);
  background: var(--modi-green-tint);
}
.consent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.consent-row input { position: absolute; opacity: 0; pointer-events: none; }
.consent-mark {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  display: grid; place-items: center;
  transition: all 0.15s;
}
.consent-item.checked .consent-mark {
  background: var(--modi-green);
  border-color: var(--modi-green);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8l3.5 3.5L13 5' stroke='white' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: 16px 16px;
  background-position: center;
  background-repeat: no-repeat;
}
.consent-title {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}
.consent-required {
  color: var(--error);
  font-weight: 600;
  margin-left: 2px;
}
.consent-toggle {
  margin-top: 8px;
  margin-left: 34px;
  font-size: var(--fs-xs);
  background: none;
  border: none;
  color: var(--modi-green);
  padding: 4px 0;
  cursor: pointer;
  font-weight: 600;
}
.consent-toggle:hover { text-decoration: underline; }
.consent-detail {
  margin: 8px 0 4px 34px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  font-size: var(--fs-xs);
  color: var(--text-2);
  font-family: inherit;
  white-space: pre-wrap;
  line-height: 1.7;
}
.consent-warning {
  margin: 12px 0 0;
  font-size: var(--fs-sm);
  color: var(--text-3);
  text-align: center;
}

.version-card[disabled],
.version-card[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== Done screen — Kakao CTA / Visit info ===== */
.kakao-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 520px;
  margin: 0 auto 20px;
  padding: 18px 22px;
  background: #FEF5C7;
  border: 1px solid #F7DD7B;
  border-radius: var(--r-md);
  text-align: left;
}
.kakao-cta-text { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); }
.kakao-cta-text strong { color: var(--text); font-size: var(--fs-md); }
.kakao-cta-text span { color: var(--text-2); }
.btn-kakao {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: #FEE500;
  color: #3C1E1E;
  border: 1.5px solid #E6CE00;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: var(--fs-sm);
  text-decoration: none;
  min-height: 48px;
  transition: background 0.15s;
}
.btn-kakao:hover { background: #FAD800; }
.kakao-mark {
  display: inline-grid;
  place-items: center;
  background: #3C1E1E;
  color: #FEE500;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  width: 28px;
  height: 22px;
  letter-spacing: 0.02em;
}
.kakao-cta-placeholder {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  padding: 10px 14px;
  border-radius: var(--r-md);
}
.visit-info {
  background: var(--surface-2);
  padding: 20px 24px;
  border-radius: var(--r-md);
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.7;
}

/* Mobile */
@media (max-width: 600px) {
  .main { padding: 20px 16px 100px; }
  .step { padding: 28px 22px 28px; border-radius: var(--r-lg); }
  .step-title { font-size: var(--fs-xl); }
  .step-desc { font-size: var(--fs-sm); margin-bottom: 24px; }
  .topbar-inner { padding: 12px 16px; gap: 8px; }
  .progress-wrap { padding: 0 16px; }
  .welcome-title { font-size: 26px; }
  .welcome-desc { font-size: var(--fs-sm); }
  .btn-row { gap: 8px; margin-top: 28px; padding-top: 20px; }
  .btn { padding: 14px 20px; flex: 1; }
  .btn-ghost { flex: 0; }
  .brand-text .sub { display: none; }
  .topbar-meta { display: none; }
  .lang-btn { padding: 4px 7px; font-size: 11px; gap: 3px; }
  .lang-btn-flag { font-size: 12px; }
  .lang-btn-label { display: none; }
  .lang-btn.active .lang-btn-label { display: inline; }
}

/* Body lock when modal */
.has-modal { overflow: hidden; }

/* Scalp / Norwood selectable images */
.scalp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.scalp-card {
  position: relative;
  border: 2px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 14px 10px 10px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.scalp-card:hover { border-color: var(--text-3); }
.scalp-card.selected {
  border-color: var(--modi-green);
  background: var(--modi-green-tint);
}
.scalp-card svg {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 8px;
}
.scalp-card-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}
.scalp-card-sub {
  font-size: var(--fs-xs);
  color: var(--text-3);
  margin-top: 2px;
}

/* Head map (clickable areas) */
.headmap-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 12px;
}
@media (max-width: 600px) {
  .headmap-wrap { grid-template-columns: 1fr; gap: 20px; }
}
.headmap-view {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 12px;
  text-align: center;
}
.headmap-view-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 10px;
}
.headmap-svg { width: 100%; max-width: 200px; height: auto; cursor: pointer; overflow: visible; }
.headmap-region {
  fill: rgba(31, 107, 58, 0.0);
  stroke: rgba(31, 107, 58, 0.35);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  cursor: pointer;
  transition: fill 0.15s, stroke 0.15s;
}
.headmap-region:hover { fill: rgba(31, 107, 58, 0.15); stroke: var(--modi-green); }
.headmap-region.selected { fill: rgba(31, 107, 58, 0.45); stroke: var(--modi-green); stroke-dasharray: none; }
/* 사용자가 아직 아무것도 선택하지 않았을 때: 연두색으로 깜빡이며 터치 유도 */
.headmap-region.pulse {
  fill: rgba(163, 230, 53, 0.35);
  stroke: #65a30d;
  stroke-width: 2;
  stroke-dasharray: 3 2;
  animation: headmapPulse 1.4s ease-in-out infinite;
}
.headmap-region.pulse:hover { fill: rgba(31, 107, 58, 0.35); stroke: var(--modi-green); }
@keyframes headmapPulse {
  0%, 100% {
    fill: rgba(190, 242, 100, 0.25);
    stroke: #84cc16;
    stroke-dashoffset: 0;
  }
  50% {
    fill: rgba(132, 204, 22, 0.55);
    stroke: #4d7c0f;
    stroke-dashoffset: 5;
  }
}
.headmap-hint {
  font-size: var(--fs-xs);
  color: var(--text-3);
  text-align: center;
  margin-top: 4px;
}

/* 터치 안내 콜아웃 (탈모 부위 선택 전에만 표시) */
.headmap-callout {
  display: none;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f7fee7 0%, #ecfccb 100%);
  border: 1.5px dashed #84cc16;
  color: #3f6212;
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  position: relative;
  animation: calloutBob 1.6s ease-in-out infinite;
}
.headmap-callout.show { display: flex; }
.headmap-callout-finger {
  font-size: 22px;
  display: inline-block;
  animation: calloutTap 1.1s ease-in-out infinite;
  transform-origin: 70% 70%;
}
.headmap-callout-text { flex: 1; line-height: 1.5; }
.headmap-callout-text b { color: #1F6B3A; }
.headmap-callout-arrow {
  width: 0; height: 0;
  position: absolute;
  bottom: -10px;
  left: 28px;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 10px solid #ecfccb;
  filter: drop-shadow(0 1px 0 #84cc16);
}
@keyframes calloutBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes calloutTap {
  0%, 60%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-1px, 2px) rotate(-8deg); }
  40% { transform: translate(0, 0) rotate(0deg); }
}

/* Section divider inside step */
.subsection {
  padding-top: 24px;
  margin-top: 28px;
  border-top: 1px dashed var(--border);
}
.subsection-title {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--modi-green-deep);
  margin: 0 0 16px;
}

.fade-in { animation: fadeIn 0.35s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.foot {
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-3);
  padding: 24px;
  max-width: 760px;
  margin: 0 auto;
}

/* 안내 항목(동의 아님 — D-3 2026-09-15 시행): 확인 체크 + 본문 목록 */
.consent-item.notice { border-color: #d9c48a; background: #fffdf5; }
.consent-item.notice .notice-badge { color: #7a5a00; background: #fbf3d9; }
.notice-body { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.6; color: var(--text-2, #444); }
.notice-body li { margin: 4px 0; }
.notice-link { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--modi-green, #1f6f5f); text-decoration: underline; }
.notice-extra { margin: 10px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--text-3, #666); }
