:root {
  --bg: #f3f1ea;
  --card: #ffffff;
  --ink: #1d1b18;
  --ink-soft: #5a564e;
  --ink-mute: #98928689;
  --ink-mute2: #8f897c;
  --accent: #2f6e5b;
  --accent-dark: #245646;
  --accent-soft: #e7efe9;
  --line: #e4e0d5;
  --warm: #c2693f;
  --radius: 16px;
  --shadow: 0 14px 40px -22px rgba(40, 35, 25, .55);
  --shadow-sm: 0 2px 10px -6px rgba(40, 35, 25, .35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.serif { font-family: "Fraunces", "Noto Serif KR", Georgia, serif; }

/* ---------- topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; gap: 20px;
  padding: 18px clamp(18px, 5vw, 44px);
}
.brand { display: flex; align-items: baseline; gap: 8px; flex: none; }
.brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); align-self: center; }
.brand-name { font-weight: 600; letter-spacing: .14em; font-size: 14px; }
.brand-sub { font-size: 11px; letter-spacing: .12em; color: var(--ink-mute2); text-transform: uppercase; }
.progress { flex: 1; height: 3px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress-bar { display: block; height: 100%; width: 0%; background: var(--accent);
  transition: width .5s cubic-bezier(.65, 0, .35, 1); }

/* ---------- stage / screens ---------- */
.stage {
  max-width: 580px; margin: 0 auto; padding: 0 clamp(20px, 6vw, 28px);
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
}
.screen { display: none; padding: 104px 0 60px; }
.screen.is-active { display: block; }

/* slide-in animation */
@keyframes slideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes qIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes qInBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
#intro.is-active, #done.is-active { animation: slideIn .55s cubic-bezier(.22, 1, .36, 1); }
#qInner.anim { animation: qIn .42s cubic-bezier(.22, 1, .36, 1); }
#qInner.anim-back { animation: qInBack .42s cubic-bezier(.22, 1, .36, 1); }

/* ---------- intro ---------- */
.kicker { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--accent); border: 1px solid var(--accent-soft); background: var(--accent-soft);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 26px; }
.intro-title { font-family: "Fraunces", "Noto Serif KR", serif; font-weight: 500;
  font-size: clamp(34px, 8vw, 56px); line-height: 1.1; letter-spacing: -0.015em; }
.intro-sub { color: var(--ink-soft); font-size: 16.5px; margin-top: 22px; max-width: 480px; }
.intro-steps { margin: 34px 0 36px; display: grid; gap: 2px; }
.intro-steps > div { display: flex; align-items: center; gap: 16px; padding: 15px 2px; border-bottom: 1px solid var(--line); }
.intro-steps > div:first-child { border-top: 1px solid var(--line); }
.intro-steps span { font-family: "Fraunces", serif; font-size: 15px; color: var(--accent); font-weight: 600; min-width: 22px; }
.intro-steps p { font-size: 15px; color: var(--ink-soft); }
.intro-note { font-size: 12.5px; color: var(--ink-mute2); margin-top: 18px; }

/* ---------- buttons ---------- */
.btn { display: inline-block; padding: 14px 28px; border-radius: 12px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background .2s, border-color .2s, color .2s, transform .08s, opacity .2s; }
.btn-lg { padding: 17px 40px; font-size: 16px; }
.btn-primary { color: #fff; background: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { color: var(--ink-soft); background: transparent; border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink-soft); color: var(--ink); }

/* ---------- question ---------- */
.q-step { font-family: "Fraunces", serif; font-size: 14px; color: var(--accent); font-weight: 600; margin-bottom: 16px; }
.q-step i { display: inline-block; width: 18px; height: 1px; background: var(--line); margin: 0 8px 4px; }
.q-title { font-family: "Fraunces", "Noto Serif KR", serif; font-weight: 500;
  font-size: clamp(23px, 5vw, 31px); line-height: 1.32; letter-spacing: -0.01em; }
.q-hint { color: var(--ink-mute2); font-size: 14px; margin-top: 11px; }
.q-body { margin-top: 28px; }

/* options */
.opts { display: grid; gap: 9px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px 18px; border-radius: 13px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 15.5px; font-weight: 500;
  font-family: inherit; cursor: pointer; text-align: left;
  transition: border-color .16s, background .16s, transform .12s; box-shadow: var(--shadow-sm);
}
.opt:hover { border-color: var(--accent); transform: translateX(3px); }
.opt .tick { width: 21px; height: 21px; flex: none; border: 1.5px solid var(--line);
  display: grid; place-items: center; color: transparent; font-size: 12px; transition: all .16s; }
.opt:not(.multi) .tick { border-radius: 50%; }
.opt.multi .tick { border-radius: 6px; }
.opt.selected { border-color: var(--accent); background: var(--accent-soft); }
.opt.selected .tick { background: var(--accent); border-color: var(--accent); color: #fff; }

/* scale */
.scale { display: flex; flex-direction: column; gap: 14px; }
.scale-ends { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-soft); }
.scale-dots { display: flex; gap: 8px; }
.scale-dots .sdot { flex: 1; height: 56px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-family: "Fraunces", serif; font-size: 16px; font-weight: 600;
  color: var(--ink-mute2); transition: all .15s; box-shadow: var(--shadow-sm); }
.scale-dots .sdot:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.scale-dots .sdot.selected { background: var(--accent); border-color: var(--accent); color: #fff; }

/* text input */
.q-input { width: 100%; padding: 15px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 16px; font-family: inherit; box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s; }
.q-input::placeholder { color: var(--ink-mute2); }
.q-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.q-input + .q-input { margin-top: 9px; }
.q-suffix { display: flex; align-items: center; gap: 12px; }
.q-suffix .q-input { max-width: 160px; }
.q-suffix span { font-size: 16px; color: var(--ink-soft); }

/* consent */
.q-consent { display: flex; gap: 11px; align-items: flex-start; margin-top: 20px; font-size: 13px;
  color: var(--ink-soft); line-height: 1.55; cursor: pointer; }
.q-consent input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }

/* datetime — date cards with per-date time slots */
.dt-list { display: grid; gap: 10px; }
.dt-card { border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  overflow: hidden; box-shadow: var(--shadow-sm); }
.dt-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 15px 18px;
  background: none; border: none; cursor: pointer; font-family: inherit; font-size: 15.5px; font-weight: 600;
  color: var(--ink); text-align: left; transition: background .15s; }
.dt-head:hover { background: var(--accent-soft); }
.dt-head.has .dt-h-date { color: var(--accent); }
.dt-h-date { flex: 1; }
.dt-h-meta { font-size: 13px; font-weight: 600; color: var(--accent); }
.dt-chev { color: var(--ink-mute2); font-size: 14px; transition: transform .2s; }
.dt-head.open .dt-chev { transform: rotate(180deg); }
.dt-slots { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; padding: 4px 16px 16px; }
.dt-time { padding: 11px 6px; border-radius: 11px; border: 1px solid var(--line); background: var(--card);
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-soft); transition: all .15s; box-shadow: var(--shadow-sm); }
.dt-time:hover { border-color: var(--accent); color: var(--accent); }
.dt-time.selected { background: var(--accent); border-color: var(--accent); color: #fff; }

.q-error { color: var(--warm); font-size: 13.5px; min-height: 18px; margin-top: 16px; }
.q-nav { display: flex; gap: 10px; margin-top: 26px; }
.q-nav #nextBtn { flex: 1; }
.q-nav #backBtn { flex: 0 0 auto; }

/* ---------- done ---------- */
#done { text-align: center; }
.done-mark { display: inline-grid; place-items: center; width: 62px; height: 62px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 28px; margin-bottom: 24px; }
.done-title { font-family: "Fraunces", "Noto Serif KR", serif; font-weight: 500; font-size: clamp(26px, 5.5vw, 36px); letter-spacing: -0.01em; }
.done-sub { color: var(--ink-soft); font-size: 16px; margin-top: 14px; }

/* ---------- phone group ---------- */
.phone-group { display: flex; align-items: center; gap: 8px; }
.phone-prefix { display: grid; place-items: center; min-width: 64px; padding: 15px 0; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 16px; flex: none; }
.phone-sep { color: var(--ink-mute2); font-weight: 600; }
.phone-box { flex: 1; min-width: 0; text-align: center; letter-spacing: .12em; padding: 15px 8px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-size: 16px; font-family: inherit; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.phone-box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- centered praise popup ---------- */
.praise {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: rgba(29, 27, 24, 0); pointer-events: none;
  opacity: 0; transition: opacity .28s ease, background .28s ease;
}
.praise.show { opacity: 1; background: rgba(29, 27, 24, .34); backdrop-filter: blur(2px); }
.praise-card {
  background: var(--card); border-radius: 22px; padding: 38px 40px; text-align: center;
  max-width: 360px; width: calc(100% - 64px); box-shadow: 0 30px 70px -24px rgba(20, 18, 14, .5);
  transform: scale(.86) translateY(10px); transition: transform .34s cubic-bezier(.34, 1.56, .64, 1);
}
.praise.show .praise-card { transform: scale(1) translateY(0); }
.praise-emoji { font-size: 44px; display: block; line-height: 1; margin-bottom: 16px; }
.praise-msg { font-family: "Fraunces", "Noto Serif KR", serif; font-weight: 500;
  font-size: 19px; line-height: 1.5; color: var(--ink); letter-spacing: -0.01em; }

@media (prefers-reduced-motion: reduce) {
  #intro.is-active, #done.is-active, #qInner.anim, #qInner.anim-back { animation: none; }
  .praise-card { transition: none; }
  html { scroll-behavior: auto; }
}
