/* 정책 숙의 시민 화면 — 고령 접근성 우선 + 정제된 룩. 순수 CSS(빌드 없음). */
:root {
  --fg: #182233;
  --muted: #667085;
  --line: #e2e7f0;
  --line-strong: #cbd3e1;
  --bg: #eef1f7;
  --card: #ffffff;
  --brand: #2456c9;
  --brand-dark: #1a3f96;
  --brand-tint: #eaf0fd;
  --accept: #17864a;
  --conditional: #b06f12;
  --reject: #c23b2e;
  --focus: #ffb020;
  font-size: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.65;
}
main { max-width: 660px; margin: 0 auto; padding: 0 0 150px; }
.hidden { display: none !important; }

/* 상태 화면 */
.state { text-align: center; padding: 88px 24px; }
.big { font-size: 1.45rem; font-weight: 800; margin: 14px 0 6px; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.spinner { width: 46px; height: 46px; margin: 0 auto 18px; border: 5px solid var(--line-strong);
  border-top-color: var(--brand); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.check { width: 76px; height: 76px; line-height: 76px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--accept); color: #fff; font-size: 2.6rem; font-weight: 800;
  box-shadow: 0 8px 24px rgba(23,134,74,.28); }

/* 헤더 — 가볍고 차분하게(색 슬래브 아님). 흰 배경·짙은 글씨·얇은 상단 액센트. */
.survey-head {
  background: var(--card); color: var(--fg); padding: 26px 22px 20px;
  border-bottom: 1px solid var(--line); border-top: 3px solid var(--brand);
}
.eyebrow { margin: 0 0 6px; font-weight: 700; font-size: .9rem; color: var(--brand); letter-spacing: .01em; }
.survey-head h1 { font-size: 1.55rem; font-weight: 800; margin: 0 0 10px; letter-spacing: -.02em; line-height: 1.3; }
.intro p { margin: 0 0 7px; color: var(--muted); font-size: 1rem; }
.intro p:last-child { margin-bottom: 0; }

/* 첨부 자료 칩 — 옅은 아웃라인 */
.attachments { margin-top: 14px; }
.att-label { font-size: .82rem; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.att {
  display: inline-flex; align-items: center; gap: 7px; background: #fff;
  color: var(--brand-dark); text-decoration: none; padding: 8px 13px; border-radius: 999px; margin: 0 8px 8px 0;
  font-size: .92rem; font-weight: 600; border: 1px solid var(--line-strong);
}
.att:hover { background: var(--brand-tint); border-color: var(--brand); }
.att-ico { font-size: 1rem; }

.section-hint { color: var(--muted); font-weight: 600; margin: 20px 22px 4px; }

/* 카드 */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 18px; margin: 14px 16px; box-shadow: 0 2px 10px rgba(24,34,51,.05);
}
.card h2 { margin: 2px 0 0; font-size: 1.32rem; letter-spacing: -.01em; }
.card .desc { color: #3a4557; margin: 8px 0 16px; }
.card.missing { border-color: var(--reject); box-shadow: 0 0 0 3px rgba(194,59,46,.16); }
.prop-num { display: inline-block; color: var(--brand-dark); background: var(--brand-tint);
  font-weight: 800; font-size: .82rem; padding: 3px 10px; border-radius: 999px; }

/* 입장 3버튼 */
.stances { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stance {
  min-height: 62px; border: 2px solid var(--line-strong); background: #fff; border-radius: 13px;
  font-size: 1.08rem; font-weight: 800; color: var(--fg); cursor: pointer; padding: 8px 4px;
  transition: transform .04s ease, background .12s ease;
}
.stance:hover { border-color: var(--muted); }
.stance:active { transform: translateY(1px); }
.stance[aria-pressed="true"] { color: #fff; }
.stance[aria-pressed="true"].accept { background: var(--accept); border-color: var(--accept); box-shadow: 0 4px 12px rgba(23,134,74,.28); }
.stance[aria-pressed="true"].conditional { background: var(--conditional); border-color: var(--conditional); box-shadow: 0 4px 12px rgba(176,111,18,.28); }
.stance[aria-pressed="true"].reject { background: var(--reject); border-color: var(--reject); box-shadow: 0 4px 12px rgba(194,59,46,.28); }

label.opinion-label { display: block; font-weight: 700; margin: 8px 0 5px; }
label.opinion-label .req { color: var(--reject); font-weight: 700; }
textarea {
  width: 100%; min-height: 76px; font: inherit; padding: 12px 14px; border: 2px solid var(--line-strong);
  border-radius: 12px; resize: vertical; background: #fcfdff;
}
textarea::placeholder { color: #9aa4b5; }
textarea:focus, .stance:focus-visible, button:focus-visible, select:focus-visible, .att:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
select { width: 100%; min-height: 54px; font: inherit; padding: 10px 14px; border: 2px solid var(--line-strong);
  border-radius: 12px; background: #fcfdff; }

/* 프로필 */
.profile.card h2 { font-size: 1.15rem; }
.optional { color: var(--muted); font-weight: 500; font-size: .9rem; }
.field { margin-top: 12px; }
.field > label { display: block; font-weight: 700; margin-bottom: 5px; }

/* 하단 고정 바 */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px); border-top: 1px solid var(--line-strong);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center;
  justify-content: space-between; gap: 14px; max-width: 660px; margin: 0 auto;
}
.progress { font-weight: 800; color: var(--brand-dark); }
.btn-primary { background: var(--brand); color: #fff; border: 0; border-radius: 13px; font: inherit;
  font-weight: 800; padding: 15px 26px; cursor: pointer; min-height: 54px; box-shadow: 0 4px 14px rgba(36,86,201,.32); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-lg { font-size: 1.18rem; }
.submit-error { background: #fdeceb; border: 2px solid var(--reject); color: var(--reject);
  border-radius: 12px; padding: 13px 16px; font-weight: 700; margin: 10px 16px; }
