/* =========================================================================
   styles-new.css — 프라움 비뇨의학과 리드 수집 랜딩페이지
   블루 시스템 (전립선 랜딩 디자인 언어 이식)
   테마 색은 .shell[style] 컨테이너에 CSS 변수로 주입됨
   ========================================================================= */

/* 리셋과 본문 폰트 설정은 설문 화면(#root) 안에서만 적용한다.
   전역으로 두면 첫 화면(.page)의 버튼 기본 여백·글자 렌더링까지 바뀐다. */
/* :where()로 명시도를 0으로 두어 아래 클래스 규칙의 여백이 항상 우선하도록 한다 */
:where(#root, #root *) { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { min-height: 100%; }

#root {
  font-family: 'Pretendard Variable', 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: #1A2238;
}

body.funnel-on { background: #E8ECF3; }

#root { min-height: 100%; }

/* ───────────────────────── 스테이지 / 셸 ───────────────────────── */
.stage {
  display: flex; justify-content: center;
  padding: 28px 16px 72px;
}
.shell {
  width: 100%; max-width: 400px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 30%, var(--surface) 62%);
  color: var(--ink);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px -22px rgba(20,40,90,.35);
  font-family: var(--font);
  position: relative;
  min-height: 100dvh;
}
@media (max-width: 440px) {
  .stage { padding: 0; }
  .shell { max-width: 100%; border-radius: 0; box-shadow: none; }
  body.funnel-on { background: #fff; }
}

/* ───────────────────────── 상단 바 ───────────────────────── */
.topbar {
  background: var(--accent);
  color: #fff;
  padding: 13px 18px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; letter-spacing: -0.3px;
}
.topbar .lock { opacity: .9; }
.topbar strong { margin-right: -4px; }
.topbar strong, .topbar strong + span { white-space: nowrap; }
.topbar .sub { color: rgba(255,255,255,.86); font-weight: 500; font-size: 11.5px; }

/* 긴급성 배너 */
.urgency {
  background: var(--danger); color: #fff; text-align: center;
  padding: 9px 16px; font-size: 12.5px; font-weight: 700; letter-spacing: -0.3px;
}

/* (첫 화면은 hero-first.css가 담당합니다 — 기존 인트로 스타일은 제거) */

/* ───────────────────────── 진행 바 ───────────────────────── */
.progress {
  padding: 18px 22px 4px;
}
.progress-wrap { display: flex; align-items: center; gap: 13px; }
.btn-back {
  width: 50px; height: 50px; flex: none; background: #fff; border: none;
  border-radius: 16px; box-shadow: 0 6px 16px rgba(20,40,90,.10);
  display: grid; place-items: center; cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.btn-back:active { transform: scale(.95); }
.progress-track {
  flex: 1; height: 10px; border-radius: 99px; background: #E3E9F4;
  overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 99px; background: var(--accent);
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.progress-label {
  font-size: 14.5px; font-weight: 700; color: #34529E; white-space: nowrap; letter-spacing: -0.3px;
}
.progress-label .cur { color: var(--accent); }

/* ───────────────────────── 본문 ───────────────────────── */
.body { padding: 6px 22px 48px; }

/* 질문 헤더 + 플로팅 아이콘 */
.q-head { position: relative; margin: 22px 0 4px; min-height: 128px; }
.q-icon {
  position: absolute; right: -6px; top: -10px;
  width: 104px; height: 104px; display: grid; place-items: center;
  pointer-events: none;
}
.q-icon::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 46%, var(--glow) 0%, rgba(220,231,251,.55) 42%, rgba(220,231,251,0) 72%);
}
.q-icon svg {
  position: relative; width: 78px; height: 78px;
  filter: drop-shadow(0 14px 18px rgba(31,77,255,.22));
}
.float { animation: fl 5s ease-in-out infinite; will-change: transform; }
@keyframes fl { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.q-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--accent); background: #fff;
  padding: 8px 15px; border-radius: 99px; margin-bottom: 14px;
  box-shadow: 0 6px 16px rgba(20,40,90,.08);
  position: relative; z-index: 2;
}
.q-title {
  font-size: 23.5px; font-weight: 800; line-height: 1.34; letter-spacing: -0.9px;
  color: var(--ink); word-break: keep-all; max-width: 258px;
  position: relative; z-index: 2;
}
.q-title .em { color: var(--accent); }
.q-sub {
  font-size: 16px; line-height: 1.55; color: var(--ink-faint); margin-top: 14px;
  font-weight: 500; word-break: keep-all; position: relative; z-index: 2;
}
.q-hint {
  font-size: 13.5px; color: var(--accent-ink); margin-top: 10px; font-weight: 600;
  position: relative; z-index: 2;
}

/* 옵션 — 리스트 */
.opts { display: flex; flex-direction: column; gap: 12px; margin: 22px 0 4px; }
.opt {
  display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 14px 20px;
  border: 2px solid var(--line); border-radius: 16px;
  cursor: pointer; background: #fff;
  font-size: 17px; font-weight: 600; color: #2A3550;
  box-shadow: 0 8px 20px rgba(20,40,90,.05);
  transition: border-color .15s, background .15s, transform .1s;
  text-align: left; width: 100%; font-family: inherit;
  word-break: keep-all; line-height: 1.4;
}
.opt:active { transform: scale(.985); }
.opt.sel { border-color: var(--accent); background: #F0F4FF; }
.radio {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid #D4DAE6; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s;
}
.opt.sel .radio { border-color: var(--accent); background: var(--accent); }
.radio::after {
  content: ""; width: 11px; height: 11px; border-radius: 50%; background: #fff;
  transform: scale(0); transition: transform .15s;
}
.opt.sel .radio::after { transform: scale(1); }
.check { border-radius: 8px; }
.check::after { border-radius: 2px; width: 12px; height: 12px; }

/* 옵션 — 제목 + 설명 2줄형 */
.opt-2line { align-items: flex-start; padding: 16px 20px; }
.opt-2line .radio { margin-top: 2px; }
.opt-body { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.opt-t { font-size: 17px; font-weight: 700; color: #2A3550; line-height: 1.35; }
.opt-d { font-size: 13.5px; font-weight: 500; color: var(--ink-faint); line-height: 1.4; }
.opt.sel .opt-t { color: var(--accent); }

/* 통화 희망 시간 — 시간대가 판단 기준이므로 크고 또렷하게 보여준다 */
.opts-q5 .opt-2line { padding: 15px 20px; }
.opts-q5 .opt-body { gap: 5px; }
.opts-q5 .opt-d {
  font-size: 16.5px; font-weight: 700; color: var(--accent-ink);
  letter-spacing: -0.2px;
}
.opts-q5 .opt.sel .opt-d { color: var(--accent); }
/* 시간 값이 아닌 설명 문구는 기본 톤 유지 */
.opts-q5 .opt-d-plain,
.opts-q5 .opt.sel .opt-d-plain {
  font-size: 13.5px; font-weight: 500; color: var(--ink-faint); letter-spacing: 0;
}

/* 질문 화면 하단 안내 카드 */
.guide-card {
  margin-top: 22px; background: #fff; border-radius: 18px;
  padding: 18px 20px; display: flex; align-items: center; gap: 15px;
  box-shadow: 0 10px 24px rgba(20,40,90,.05);
}
.guide-ic { flex: none; display: grid; place-items: center; }
.guide-h { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -0.4px; word-break: keep-all; line-height: 1.35; }
.guide-s { font-size: 13px; font-weight: 500; color: var(--ink-faint); margin-top: 5px; letter-spacing: -0.3px; }

/* 옵션 — 그리드 */
.opts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 4px; }
.opt-g {
  min-height: 64px; border: 2px solid var(--line); border-radius: 16px;
  padding: 14px 8px; text-align: center; cursor: pointer;
  font-size: 17px; font-weight: 700; color: #2A3550; background: #fff;
  box-shadow: 0 8px 20px rgba(20,40,90,.05);
  transition: border-color .15s, background .15s, transform .1s;
  font-family: inherit; letter-spacing: -0.3px;
  display: flex; align-items: center; justify-content: center;
}
.opt-g:active { transform: scale(.98); }
.opt-g.sel { border-color: var(--accent); background: #F0F4FF; color: var(--accent); }

/* ───────────────────────── 버튼 ───────────────────────── */
.btn-row { margin-top: 22px; }
.btn {
  height: 64px; border: none; border-radius: 16px;
  font-size: 19px; font-weight: 800; cursor: pointer; font-family: inherit;
  letter-spacing: -0.4px; transition: filter .14s, transform .14s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn:active { transform: scale(.97); filter: brightness(.96); }
.btn-primary {
  width: 100%; color: #fff; background: var(--accent);
  box-shadow: 0 14px 26px -8px rgba(31,77,255,.5);
}
/* 선택·입력이 아직 안 끝난 상태 — 눌러도 넘어가지 않고 안내만 뜬다 */
.btn-primary.is-off {
  background: #C3CEE4; box-shadow: none; color: #F4F7FC;
}
.btn-primary.is-off:active { transform: none; filter: none; }
.btn-block { width: 100%; }

/* ───────────────────────── 인트로 (step 0) ───────────────────────── */
.intro { padding: 14px 18px 48px; }
.intro-cta { margin-bottom: 16px; }
.intro-cta .btn-primary { height: 68px; font-size: 21px; border: 3px solid #fff; }

.trust {
  margin-top: 6px; border-radius: 20px;
  padding: 20px 20px; background: #fff;
  box-shadow: 0 10px 24px rgba(20,40,90,.06);
}
.trust-h { font-size: 13px; font-weight: 700; color: var(--accent-ink); margin-bottom: 14px; letter-spacing: -0.3px; }
.trust-list { display: flex; flex-direction: column; gap: 12px; }
.trust-i {
  font-size: 15px; color: #2A3550; display: flex; align-items: flex-start; gap: 11px;
  line-height: 1.45; font-weight: 600; word-break: keep-all;
}
.trust-i .tick {
  color: #fff; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}

/* 유의사항 (접이식) */
.notice {
  margin-top: 14px; border-radius: 16px;
  background: #fff; overflow: hidden;
  box-shadow: 0 8px 20px rgba(20,40,90,.05);
}
.notice summary {
  list-style: none; cursor: pointer; padding: 15px 18px;
  font-size: 13.5px; font-weight: 700; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.notice summary::-webkit-details-marker { display: none; }
.notice summary .chev { transition: transform .2s; color: var(--ink-faint); }
.notice[open] summary .chev { transform: rotate(180deg); }
.notice-body { padding: 0 18px 16px; }
.notice-body p { font-size: 12.5px; color: var(--ink-faint); line-height: 1.85; }

/* ───────────────────────── 입력 폼 ───────────────────────── */
.field { margin-top: 22px; }
.field-tight { margin-top: 13px; }
.input-field {
  background: #fff; border: 1.5px solid var(--line); border-radius: 16px;
  box-shadow: 0 8px 20px rgba(20,40,90,.05);
  padding: 14px 18px; display: flex; align-items: center; gap: 15px;
  transition: border-color .15s;
}
.input-field:focus-within { border-color: var(--accent); }
.input-field.error { border-color: var(--danger); }
.input-ic {
  width: 48px; height: 48px; flex: none; border-radius: 99px;
  background: var(--accent-soft); display: grid; place-items: center;
}
.input-body { flex: 1; min-width: 0; }
.input-label { display: flex; align-items: center; gap: 8px; }
.input-label .lb { font-size: 17px; font-weight: 700; color: var(--ink); }
.input-label .req {
  font-size: 11.5px; font-weight: 700; color: #97A0B0;
  background: #EEF1F6; border-radius: 6px; padding: 3px 8px;
}
.input {
  border: none; outline: none; background: transparent;
  font: 500 17px inherit; font-family: inherit; color: var(--ink);
  width: 100%; min-width: 0; margin-top: 2px;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: #B5BECC; font-weight: 500; }

/* 연락처 — 앞자리 010이 미리 적혀 있는 형태 */
.input[type="tel"] { letter-spacing: 0.3px; }

.err-msg {
  font-size: 13.5px; font-weight: 600; color: var(--danger);
  margin-top: 8px; padding-left: 4px;
}

.warn { font-size: 12.5px; color: var(--ink-faint); line-height: 1.55; margin-top: 12px; }

/* 개인정보 동의 박스 */
.privacy-box {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 8px 20px rgba(20,40,90,.05);
  padding: 18px; display: flex; gap: 15px; margin-top: 13px;
}
.privacy-box.error { border-color: var(--danger); }
.privacy-ic {
  width: 48px; height: 48px; flex: none; border-radius: 99px;
  background: var(--accent-soft); display: grid; place-items: center;
}
.consent { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.checkbox {
  width: 26px; height: 26px; flex: none; border: 2px solid #C9D0DD;
  border-radius: 8px; margin-top: 1px; cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s, border-color .15s;
  background: #fff;
}
.checkbox.checked { background: var(--accent); border-color: var(--accent); }
.consent-text { font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--ink); word-break: keep-all; }
.privacy-detail {
  font-size: 13px; line-height: 1.55; color: var(--ink-faint);
  margin-top: 9px; margin-left: 38px; word-break: keep-all; font-weight: 500;
}

/* 안심 안내 카드 */
.assure {
  margin-top: 16px; background: var(--accent-soft); border-radius: 16px;
  padding: 16px 18px; display: flex; align-items: center; gap: 13px;
}
.assure-ic {
  width: 40px; height: 40px; flex: none; border-radius: 99px;
  background: var(--accent); display: grid; place-items: center;
}
.assure-text { font-size: 14px; line-height: 1.45; color: #8A94A8; font-weight: 500; word-break: keep-all; }
.assure-text strong { color: var(--accent-ink); font-weight: 700; }

.submit-note {
  margin-top: 13px; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 14px; color: #9AA3B2; font-weight: 500;
}

/* ───────────────────────── 완료 화면 ───────────────────────── */
.complete {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  padding: 64px 26px 40px; text-align: center;
}
.complete-badge {
  width: 122px; height: 122px; border-radius: 99px;
  background: rgba(255,255,255,.16); display: grid; place-items: center; flex: none;
}
.complete-badge-in {
  width: 88px; height: 88px; border-radius: 99px; background: #fff;
  display: grid; place-items: center;
}
.complete-badge svg { width: 40px; height: 34px; }
.complete-title {
  font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -0.8px;
  line-height: 1.4; margin-top: 32px; word-break: keep-all;
}
.complete-sub {
  font-size: 16.5px; font-weight: 500; color: #D5E0FF; line-height: 1.6;
  margin-top: 16px; word-break: keep-all;
}

.summary {
  width: 100%; text-align: left; border-radius: 18px;
  padding: 18px 20px; margin-top: 28px; background: rgba(255,255,255,.12);
}
.summary-h { font-size: 13px; font-weight: 700; color: #EAF0FF; margin-bottom: 12px; }
.summary-row { display: flex; gap: 12px; font-size: 14.5px; line-height: 1.5; padding: 6px 0; }
.summary-row .k { color: #B9CAFF; flex: 0 0 72px; font-weight: 500; }
.summary-row .v { color: #fff; font-weight: 700; flex: 1; word-break: keep-all; }

/* 지금 바로 상담 — 완료 화면 하단 */
.now-help {
  width: 100%; margin-top: 20px; padding: 22px 20px 20px;
  background: rgba(255,255,255,.14); border-radius: 20px;
  border: 1px solid rgba(255,255,255,.22);
}
.now-h { font-size: 18px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.now-s {
  font-size: 14px; font-weight: 500; color: #C9D8FF; line-height: 1.5;
  margin-top: 7px; word-break: keep-all;
}
.now-tel {
  font-size: 15px; font-weight: 700; color: #EAF0FF; letter-spacing: 0.2px;
  margin-top: 4px; opacity: .85;
}

.action-btns { width: 100%; display: flex; flex-direction: column; gap: 11px; margin-top: 16px; }
.btn-call, .btn-kakao {
  height: 62px; border: none; border-radius: 16px;
  font-size: 17px; font-weight: 800; cursor: pointer; font-family: inherit;
  text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: transform .14s;
}
.btn-call:active, .btn-kakao:active { transform: scale(.97); }
.btn-call { background: #fff; color: var(--accent); box-shadow: 0 14px 26px -8px rgba(0,0,0,.25); }
.btn-kakao { background: #FEE500; color: #3a1d1d; }

.info-card {
  width: 100%; text-align: left; background: rgba(255,255,255,.12);
  border-radius: 16px; padding: 16px 18px; margin-top: 16px;
}
.info-row {
  font-size: 13.5px; color: #D5E0FF; line-height: 1.8; display: flex; gap: 10px;
  font-weight: 500;
}
.info-row .ic { flex-shrink: 0; opacity: .9; display: flex; align-items: center; height: 24px; }

/* ───────────────────────── 페이드 전환 ───────────────────────── */
.fade-step { animation: fadeUp .35s cubic-bezier(.4,0,.2,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .fade-step { animation: none; }
  .float { animation: none; }
  .progress-fill { transition: none; }
}

/* ───────────────────────── 소형 화면 대응 ───────────────────────── */
/* 소형 화면 대응 — 설문 화면(#root)에만 적용한다.
   .hero, .hero-photo 등은 첫 화면에도 있는 이름이라 스코프를 지정하지 않으면
   380px 미만에서 첫 화면 제목 크기까지 바꿔 버린다. */
@media (max-width: 380px) {
  #root .q-title { font-size: 23px; max-width: 214px; }
  #root .q-icon { width: 100px; height: 100px; }
  #root .q-icon svg { width: 54px; height: 54px; }
  #root .opt, #root .opt-g { font-size: 16px; }
}
