/* =========================================================================
   Lead Form — 2문항 설문 모달 (버터 벚꽃 테마)
   ========================================================================= */

.lf-root {
  /* ── 테마 토큰 ── */
  --lf-surface: #FFFFFF;
  --lf-text: #473829;
  --lf-text-dim: #8A7A68;
  --lf-line: rgba(71, 56, 41, .13);
  --lf-line-strong: rgba(71, 56, 41, .28);
  --lf-accent: #E07A5F;
  --lf-accent-soft: rgba(252, 213, 206, .40);
  --lf-accent-grad: linear-gradient(120deg, #E9B94B 0%, #E07A5F 60%, #D2654C 100%);
  --lf-accent-glow: rgba(210, 101, 76, .32);
  --lf-on-accent: #FFFFFF;
  --lf-warn: #D2654C;
  --lf-veil: rgba(71, 56, 41, .55);
  --lf-radius: 22px;
  --lf-shadow: 0 30px 70px rgba(120, 84, 40, .30);
  --lf-font: 'Nanum Gothic', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── 레이어 ─────────────────────────────────────────────────────────────── */
.lf-root {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  font-family: var(--lf-font);
  opacity: 0;
  visibility: hidden;
  transition: opacity .26s ease, visibility .26s ease;
}
.lf-root.is-open { opacity: 1; visibility: visible; }

.lf-veil {
  position: absolute;
  inset: 0;
  background: var(--lf-veil);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.lf-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(24px, 5vw, 34px);
  background: var(--lf-surface);
  color: var(--lf-text);
  border: 1px solid var(--lf-line);
  border-radius: var(--lf-radius);
  box-shadow: var(--lf-shadow);
  text-align: left;
  transform: translateY(20px) scale(.96);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1);
}
.lf-root.is-open .lf-panel { transform: none; }
.lf-panel:focus { outline: none; }

.lf-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--lf-text-dim);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lf-x:hover { background: var(--lf-accent-soft); color: var(--lf-text); }

/* ── 스텝 ───────────────────────────────────────────────────────────────── */
.lf-step { display: none; }
.lf-step.is-active { display: block; animation: lf-in .32s ease both; }
@keyframes lf-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.lf-eyebrow {
  margin: 0 0 8px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--lf-accent);
}
.lf-title {
  margin: 0 0 6px;
  font-size: clamp(1.25rem, 4.6vw, 1.5rem);
  font-weight: 800;
  line-height: 1.32;
  color: var(--lf-text);
}
.lf-sub {
  margin: 0 0 20px;
  font-size: .85rem;
  line-height: 1.6;
  color: var(--lf-text-dim);
}

/* ── 문항 ───────────────────────────────────────────────────────────────── */
.lf-q { margin: 0 0 18px; padding: 0; border: 0; }
.lf-q legend {
  padding: 0;
  margin: 0 0 10px;
  font-size: .94rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--lf-text);
  word-break: keep-all;
}
.lf-opts { display: flex; flex-direction: column; gap: 8px; }

.lf-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1.5px solid var(--lf-line);
  border-radius: 13px;
  background: transparent;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .12s;
}
.lf-opt:hover { border-color: var(--lf-line-strong); }
.lf-opt:active { transform: scale(.99); }
.lf-opt input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.lf-opt input:focus-visible ~ .lf-dot { outline: 2px solid var(--lf-accent); outline-offset: 2px; }

.lf-dot {
  flex: none;
  position: relative;
  width: 19px;
  height: 19px;
  border: 2px solid var(--lf-line-strong);
  border-radius: 50%;
  transition: border-color .2s;
}
.lf-dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--lf-accent);
  transform: scale(0);
  transition: transform .2s cubic-bezier(.3, 1.4, .5, 1);
}
.lf-optext { font-size: .92rem; font-weight: 600; line-height: 1.4; word-break: keep-all; }

.lf-opt.is-picked { border-color: var(--lf-accent); background: var(--lf-accent-soft); }
.lf-opt.is-picked .lf-dot { border-color: var(--lf-accent); }
.lf-opt.is-picked .lf-dot::after { transform: scale(1); }

.lf-q.is-missing .lf-opts { animation: lf-shake .4s; }
.lf-q.is-missing .lf-opt { border-color: var(--lf-warn); }
@keyframes lf-shake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ── 액션 ───────────────────────────────────────────────────────────────── */
.lf-privacy {
  margin: 16px 0 14px;
  font-size: .74rem;
  line-height: 1.55;
  color: var(--lf-text-dim);
  text-align: center;
}

.lf-submit,
.lf-cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 18px;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-size: .98rem;
  font-weight: 800;
  color: var(--lf-on-accent);
  background: var(--lf-accent-grad);
  box-shadow: 0 10px 26px var(--lf-accent-glow);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}
.lf-submit:hover,
.lf-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 34px var(--lf-accent-glow); }
.lf-submit:active,
.lf-cta:active { transform: translateY(0); }

.lf-cta { padding: 16px; font-size: .9rem; line-height: 1.45; text-align: center; }
.lf-cta-text { word-break: keep-all; }
.lf-cta-ic { flex: none; width: 22px; height: 22px; object-fit: contain; }

/* ── 완료 화면 ──────────────────────────────────────────────────────────── */
.lf-done { text-align: center; }
.lf-check {
  width: 64px;
  height: 64px;
  margin: 2px auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--lf-on-accent);
  background: var(--lf-accent-grad);
  box-shadow: 0 12px 30px var(--lf-accent-glow);
  animation: lf-pop .45s cubic-bezier(.3, 1.5, .5, 1) both;
}
@keyframes lf-pop {
  from { opacity: 0; transform: scale(.4); }
  to   { opacity: 1; transform: scale(1); }
}
.lf-thanks { margin: 0 0 18px; font-size: .9rem; color: var(--lf-text-dim); }
.lf-lead {
  margin: 0 0 20px;
  padding: 15px 16px;
  border-radius: 13px;
  background: var(--lf-accent-soft);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.65;
  color: var(--lf-text);
  word-break: keep-all;
}
.lf-note { margin: 12px 0 0; font-size: .74rem; color: var(--lf-text-dim); }

body.lf-locked { overflow: hidden; }

@media (max-width: 420px) {
  .lf-panel { padding: 24px 18px; }
  .lf-cta { font-size: .84rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lf-root, .lf-panel, .lf-step, .lf-check, .lf-submit, .lf-cta { transition: none; animation: none; }
}
