/* 고원규통신 상담 신청서 — 홈페이지(go1q.co.kr)와 같은 색·글꼴·모서리 규칙
 * 색: 로고 오렌지 #f05a28(큰 글씨·장식) / 버튼·작은 글씨는 대비 4.5:1 이상인 #d23f0f
 * 모서리: 8 / 12 / 16 / 24 / 999 만 쓴다 */
:root {
  --ink: #14202b;
  --ink-2: #2a3642;
  --muted: #5c6772;
  --line: #e8e6e3;
  --line-2: #d9d5d0;
  --bg: #f7f6f4;
  --card: #ffffff;
  --brand: #d23f0f;
  --brand-vivid: #f05a28;
  --brand-dark: #b0350c;
  --brand-soft: #fff0e9;
  --danger: #c62828;
  --kakao: #fee500;
  --kakao-ink: #191600;
  --shadow: 0 18px 40px -24px rgba(20, 32, 43, .28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  letter-spacing: -.01em;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

/* ---------- 상단 브랜드 바 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 64px; padding: 0 16px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; }
.brand-logo { display: block; width: 144px; height: auto; }
.brand-store { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px 64px;
}

/* ---------- 히어로 ---------- */
.hero { padding: 36px 4px 8px; }
.hero .eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 6px 12px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  font-size: 13px; font-weight: 800;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: 26px; line-height: 1.35; font-weight: 800; letter-spacing: -.04em;
}
.hero h1 em { font-style: normal; color: var(--brand-vivid); }
.hero-sub { margin: 0 0 18px; font-size: 15px; color: var(--ink-2); }
.hero-points { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hero-points li {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.hero-points li::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--brand-vivid);
}

/* ---------- 위저드 ---------- */
#wizard {
  margin-top: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
}
.wizard-nav {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 28px; margin-bottom: 16px;
}
.back-btn {
  border: none; background: none; padding: 4px 0; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 14px; font-weight: 700;
}
.back-btn:hover { color: var(--ink); }
.progress {
  margin-left: auto; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 800;
}

.q-text { margin: 0 0 8px; font-size: 20px; line-height: 1.4; font-weight: 800; letter-spacing: -.03em; }
.q-help { margin: 0 0 16px; font-size: 14px; color: var(--muted); }

.option-list { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 4px; }
.option-list.multi { margin-bottom: 16px; }

.option-btn {
  width: 100%; min-height: 54px; padding: 14px 16px; text-align: left;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: border-color .15s, background-color .15s, transform .1s;
}
.option-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.option-btn:active { transform: scale(.99); }
.option-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.option-check {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.option-check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.option-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); flex: none; }

.q-text-input,
input[type="text"], input[type="tel"], input[type="number"], select, textarea {
  width: 100%; min-height: 52px; margin-bottom: 10px; padding: 0 14px;
  border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff;
  font: inherit; font-size: 16px; color: var(--ink);
}
.q-text-input:focus, input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
textarea { padding: 12px 14px; resize: vertical; min-height: 80px; }

.next-btn, button.submit {
  width: 100%; min-height: 54px; margin-top: 6px; padding: 14px;
  border: none; border-radius: 12px; background: var(--brand); color: #fff;
  font: inherit; font-size: 17px; font-weight: 800; cursor: pointer;
  box-shadow: 0 12px 24px -14px rgba(210, 63, 15, .7);
  transition: background-color .15s, transform .1s;
}
.next-btn:hover, button.submit:hover { background: var(--brand-dark); }
.next-btn:active, button.submit:active { transform: translateY(1px); }
.next-btn:disabled, button.submit:disabled { background: #b8b2ad; box-shadow: none; cursor: not-allowed; }

.consent {
  display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 4px; padding: 14px;
  border-radius: 12px; background: var(--bg); font-size: 14px; line-height: 1.5; cursor: pointer;
}
.consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.consent a { color: var(--muted); }

.error-msg { display: none; margin-top: 8px; color: var(--danger); font-size: 14px; font-weight: 700; }
.error-msg.show { display: block; }

/* ---------- 결과 / 실패 ---------- */
.state { display: none; margin-top: 24px; padding: 32px 20px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.state.show { display: block; }
.state h2 { margin: 0 0 8px; font-size: 21px; line-height: 1.4; letter-spacing: -.03em; }
.state p { margin: 0 0 20px; color: var(--muted); font-size: 15px; }

.result-cards { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.result-card { padding: 16px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.result-card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; color: var(--ink); }
.result-card p { margin: 0 0 6px; font-size: 14px; color: var(--ink-2); }
.result-card .tone { margin: 0; color: var(--brand); font-size: 13px; font-weight: 700; }

.warn-banner {
  margin-bottom: 12px; padding: 12px 14px; text-align: left;
  border: 1px solid #f3c27a; border-radius: 12px; background: #fff7e8; font-size: 14px;
}
.urgent-badge {
  margin-bottom: 12px; padding: 10px 14px; text-align: center;
  border: 1px solid var(--danger); border-radius: 12px; background: #fdecea; color: var(--danger);
  font-size: 14px; font-weight: 800;
}
.disclaimer { margin: 12px 0 18px !important; font-size: 13px !important; color: var(--muted); }

.kakao-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-kakao, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px; border-radius: 12px; text-decoration: none;
  font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
}
.btn-kakao { background: var(--kakao); color: var(--kakao-ink); border: 0; }
.btn-secondary { background: #fff; color: var(--ink); border: 1.5px solid var(--line-2); }

/* ---------- 푸터 ---------- */
footer.site-footer { margin-top: 36px; text-align: center; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
footer.site-footer p { margin: 0 0 6px; }
.footer-links { display: flex; justify-content: center; gap: 16px; }
footer.site-footer a { color: var(--ink-2); text-decoration: none; }
footer.site-footer a:hover { text-decoration: underline; }

/* ---------- 개인정보처리방침 페이지 (form/fieldset 재사용) ---------- */
form { margin-top: 24px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
fieldset { margin: 0 0 20px; padding: 0; border: none; }
fieldset legend { margin-bottom: 8px; padding: 0; font-size: 16px; font-weight: 800; }
fieldset p { margin: 0; font-size: 14px; color: var(--ink-2); }

@media (min-width: 640px) {
  .topbar { padding: 0 32px; }
  .hero { padding-top: 56px; }
  .hero h1 { font-size: 32px; }
  #wizard, .state { padding: 32px 28px; }
}

/* 한글 단어 중간 줄바꿈 방지 */
body { word-break: keep-all; overflow-wrap: anywhere; }

/* 첫 답 이후: 메인 문구를 작게 줄여 질문이 바로 보이게 */
.started .hero { padding-top: 20px; }
.started .hero .eyebrow, .started .hero-sub, .started .hero-points { display: none; }
.started .hero h1 { font-size: 17px; margin: 0; }
.started .hero h1 br { display: none; }
.started .hero h1 em { display: block; }
.started #wizard, .started .state { margin-top: 16px; }

/* 동의 항목 묶음 */
.consent-box { display: grid; gap: 2px; margin: 6px 0 4px; padding: 10px 14px; border-radius: 12px; background: var(--bg); }
.consent-box .consent { margin: 0; padding: 7px 0; background: none; border-radius: 0; align-items: center; }
.consent-box .consent a { margin-left: auto; padding-left: 8px; font-size: 13px; white-space: nowrap; }
.consent-box .consent-all { font-weight: 800; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }

/* 카톡 채널명 안내 */
.state p.kakao-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
