:root {
  --line: #6c2a86;        /* 서부선 노선색 */
  --line-dark: #4b1a5f;
  --line-soft: #f3ecf7;
  --accent: #f5b301;      /* 환승역 노란색 */
  --ink: #1d1a21;
  --ink-2: #4a4550;
  --ink-3: #77717e;
  --bg: #ffffff;
  --bg-2: #f7f6f9;
  --border: #e3dfe8;
  --danger: #c62828;
  --ok: #1b7f4c;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(40, 10, 60, .08);
  --wrap: 1040px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--line); }
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.02em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 시연 안내 띠 ---------- */
.demo-banner {
  background: #fff4cc; color: #5c4300; border-bottom: 1px solid #f0d77a;
  font-size: 14.5px; line-height: 1.5; text-align: center; padding: 8px 16px;
}
.demo-banner b { color: #8a5a00; }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 16px; line-height: 1.2; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-3); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px;
  border: 0; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 17px;
  text-decoration: none; cursor: pointer;
  transition: transform .08s ease, background-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--line); color: #fff; }
.btn-primary:hover { background: var(--line-dark); }
.btn-primary[disabled] { background: #b9a9c2; cursor: not-allowed; }
.btn-ghost { background: var(--bg-2); color: var(--ink); border: 1px solid var(--border); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-lg { min-height: 60px; font-size: 19px; padding: 0 32px; }

/* ---------- 히어로 ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #3a1250 0%, var(--line) 60%, #8a3fa8 100%);
  color: #fff;
  padding: 56px 0 64px;
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -40px; width: 340px; height: 680px;
  border: 14px solid rgba(255, 255, 255, .08); border-radius: 200px; transform: rotate(18deg);
  pointer-events: none;
}
.hero .eyebrow { display: inline-block; font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .15); margin-bottom: 18px; }
.hero h1 { font-size: clamp(30px, 7vw, 52px); font-weight: 800; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: clamp(17px, 2.6vw, 20px); color: rgba(255, 255, 255, .88); max-width: 640px; margin-bottom: 28px; }
.hero .btn-primary { background: var(--accent); color: #2b1a00; }
.hero .btn-primary:hover { background: #ffc629; }

.counter {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px;
  margin-top: 36px; padding: 20px 24px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius);
  max-width: 640px;
}
.counter .num { font-size: clamp(34px, 8vw, 46px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.counter .num span { font-size: .5em; font-weight: 700; margin-left: 4px; }
.counter .label { font-size: 15px; color: rgba(255, 255, 255, .8); }
.progress { flex: 1 1 220px; }
.progress-bar { height: 10px; background: rgba(255, 255, 255, .2); border-radius: 999px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width 1s ease; }
.progress small { display: block; margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .75); }

/* ---------- 섹션 ---------- */
section.block { padding: 64px 0; }
section.block.alt { background: var(--bg-2); }
.section-kicker { color: var(--line); font-weight: 800; font-size: 14px; letter-spacing: .04em; margin-bottom: 8px; }
.section-title { font-size: clamp(25px, 4.4vw, 34px); font-weight: 800; }
.section-desc { color: var(--ink-2); max-width: 720px; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 28px 0; }
.fact { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.fact b { display: block; font-size: clamp(24px, 5vw, 30px); color: var(--line); line-height: 1.2; }
.fact span { font-size: 15px; color: var(--ink-2); }

.two-col { display: grid; gap: 32px; align-items: start; }
.map-figure { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.map-figure figcaption { font-size: 13px; color: var(--ink-3); padding: 10px 14px; border-top: 1px solid var(--border); }

.gu-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.gu-list li { padding: 6px 14px; border-radius: 999px; background: var(--line-soft); color: var(--line-dark); font-weight: 700; font-size: 15px; }

/* 경과 타임라인 */
.timeline { list-style: none; margin: 32px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 4px; background: var(--line); border-radius: 2px; opacity: .25; }
.timeline li { position: relative; padding: 0 0 26px 40px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 4px solid var(--line);
}
.timeline li.warn::before { border-color: var(--danger); }
.timeline li.now::before { background: var(--accent); border-color: var(--accent); }
.timeline time { display: block; font-weight: 800; color: var(--line); font-size: 15px; }
.timeline li.warn time { color: var(--danger); }
.timeline h3 { font-size: 18px; margin: 2px 0 4px; }
.timeline p { font-size: 15.5px; color: var(--ink-2); margin: 0; }

.callout {
  margin-top: 8px; padding: 22px 24px; border-radius: var(--radius);
  background: #fff6f6; border: 1px solid #f3cdcd;
}
.callout b { color: var(--danger); }

/* 요구사항 */
.demands { display: grid; gap: 14px; margin-top: 28px; counter-reset: d; }
.demand { background: #fff; border-radius: var(--radius); padding: 22px 22px 22px 70px; position: relative; box-shadow: var(--shadow); }
.demand::before {
  counter-increment: d; content: counter(d);
  position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--line); color: #fff; font-weight: 800; display: grid; place-items: center;
}
.demand h3 { font-size: 18px; margin-bottom: 4px; }
.demand p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* 구별 참여 현황 */
.gu-stats { display: grid; gap: 12px; margin-top: 24px; }
.gu-row { display: grid; grid-template-columns: 80px 1fr 64px; align-items: center; gap: 12px; font-size: 16px; }
.gu-row .bar { height: 14px; background: var(--bg-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.gu-row .bar i { display: block; height: 100%; width: 0; background: var(--line); border-radius: inherit; transition: width .8s ease; }
.gu-row b { text-align: right; font-variant-numeric: tabular-nums; }

blockquote.quote {
  margin: 28px 0 0; padding: 24px; border-left: 5px solid var(--accent);
  background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0; font-size: 18px; font-weight: 600;
}
blockquote.quote cite { display: block; margin-top: 10px; font-size: 14px; font-weight: 500; color: var(--ink-3); font-style: normal; }

.cta-band { background: var(--line-dark); color: #fff; text-align: center; padding: 56px 0; }
.cta-band h2 { font-size: clamp(24px, 4.6vw, 32px); }
.cta-band p { color: rgba(255, 255, 255, .8); }
.cta-band .btn-primary { background: var(--accent); color: #2b1a00; }

.site-footer { background: #1d1a21; color: #b7b0bf; font-size: 14px; padding: 32px 0 40px; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 6px; }

/* 하단 고정 서명 버튼 (모바일) */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--border);
  transform: translateY(110%); transition: transform .25s ease;
}
.sticky-cta.show { transform: none; }

/* ---------- 서명 페이지 ---------- */
.page-head { background: var(--line); color: #fff; padding: 28px 0 32px; }
.page-head h1 { font-size: clamp(24px, 5vw, 32px); margin-bottom: 6px; }
.page-head p { margin: 0; color: rgba(255, 255, 255, .85); font-size: 16px; }

.form-wrap { max-width: 640px; margin: 0 auto; padding: 24px 16px 80px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 18px; margin-bottom: 18px; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; margin-bottom: 16px; }
.step { width: 28px; height: 28px; border-radius: 50%; background: var(--line); color: #fff; font-size: 15px; display: grid; place-items: center; flex: none; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .hint { display: block; font-size: 14px; color: var(--ink-3); margin-top: 4px; }
.input {
  width: 100%; min-height: 54px; padding: 12px 14px;
  font: inherit; font-size: 18px; color: var(--ink);
  border: 1.5px solid #cfc8d6; border-radius: 10px; background: #fff;
}
.input:focus { outline: 3px solid rgba(108, 42, 134, .25); border-color: var(--line); }
.input[readonly] { background: var(--bg-2); }
.field.has-error .input, .field.has-error .sigpad { border-color: var(--danger); }
.error-msg { display: none; color: var(--danger); font-size: 14.5px; font-weight: 600; margin-top: 6px; }
.field.has-error .error-msg { display: block; }
.addr-row { display: flex; gap: 8px; }
.addr-row .input { flex: 1; }
.addr-row .btn { flex: none; border-radius: 10px; min-height: 54px; padding: 0 16px; }
.addr-row + .input, .input + .input { margin-top: 8px; }

/* 동의 */
.agree { border: 1.5px solid var(--border); border-radius: 12px; margin-bottom: 12px; }
.agree-all { background: var(--line-soft); border-color: #dccbe6; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 14px; cursor: pointer; font-weight: 700; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--line); flex: none; }
.agree details { border-top: 1px solid var(--border); }
.agree summary { cursor: pointer; padding: 10px 14px; font-size: 14.5px; color: var(--ink-2); }
.agree table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 4px; }
.agree th, .agree td { border-top: 1px solid var(--border); padding: 8px 14px; text-align: left; vertical-align: top; }
.agree th { width: 92px; color: var(--ink-2); background: var(--bg-2); font-weight: 600; }
.agree .note { font-size: 13.5px; color: var(--ink-3); padding: 8px 14px 12px; margin: 0; }

/* 서명 패드 */
.sigpad {
  position: relative; border: 2px dashed #b9abc4; border-radius: 12px; background: #fff;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.sigpad canvas { display: block; width: 100%; height: 220px; border-radius: 10px; cursor: crosshair; }
.sigpad .placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  color: #b3a8bb; font-size: 20px; font-weight: 700;
}
.sigpad.signed .placeholder { display: none; }
.sigpad .baseline { position: absolute; left: 24px; right: 24px; bottom: 52px; border-bottom: 1.5px solid #e1d9e7; pointer-events: none; }
.sig-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 14px; color: var(--ink-3); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-alert { display: none; padding: 14px 16px; border-radius: 10px; background: #fff3f3; color: var(--danger); font-weight: 600; margin-bottom: 14px; }
.form-alert.show { display: block; }
.secure-note { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); background: var(--bg-2); border-radius: 10px; padding: 12px 14px; margin-top: 14px; }
.secure-note svg { flex: none; margin-top: 3px; }

/* 개인정보 보호 안내 */
.privacy-box { background: var(--line-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 14px; margin-bottom: 18px; }
.privacy-box h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; color: var(--line-dark); margin: 0 0 10px; }
.privacy-box h2 svg { flex: none; color: var(--line); }
.privacy-box ul { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.privacy-box li + li { margin-top: 4px; }
.privacy-box b { color: var(--ink); }
.privacy-more { font-size: 14px; color: var(--ink-3); margin: 10px 0 0; }
.privacy-more a { color: var(--line); }

/* 완료 */
.done { text-align: center; padding: 36px 20px; }
.done .check-circle { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; background: #e6f5ed; display: grid; place-items: center; }
.done h2 { font-size: 26px; }
.done .share { display: grid; gap: 10px; margin-top: 24px; }

/* 우편번호 레이어 */
.postcode-layer { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .5); display: none; }
.postcode-layer.open { display: flex; align-items: flex-end; justify-content: center; }
.postcode-box { width: 100%; max-width: 520px; height: 88vh; background: #fff; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; overflow: hidden; }
.postcode-box header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 800; }
.postcode-box header button { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; padding: 4px 8px; }
#postcodeEmbed { flex: 1; }

/* 문서 페이지 */
.doc { max-width: 760px; margin: 0 auto; padding: 32px 20px 80px; }
.doc h2 { font-size: 21px; margin-top: 32px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg-2); width: 30%; }

@media (min-width: 760px) {
  body { font-size: 18px; }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .two-col { grid-template-columns: 1.1fr .9fr; gap: 48px; }
  .demands { grid-template-columns: 1fr 1fr; }
  .hero { padding: 88px 0 96px; }
  section.block { padding: 88px 0; }
  .postcode-layer.open { align-items: center; }
  .postcode-box { height: 640px; border-radius: 16px; }
  .sticky-cta { display: none; }
  .sigpad canvas { height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
