/* 레이아웃: 휴대폰 한 손으로 읽고 누르는 세로 한 줄. 카드 단위로 묶음 */
:root {
  --paper: #f4f6f5;
  --card: #ffffff;
  --ink: #1b2830;
  --muted: #56656d;
  --line: #dbe2df;
  --accent: #2b7a68;
  --accent-soft: #e2f0eb;
  --danger: #b3412e;
  /* 외부 웹폰트를 쓰지 않는다(제3자 요청 없음). 기기 기본 한글 글꼴을 쓴다. */
  --font-body: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Noto Sans CJK KR", system-ui, sans-serif;
  --font-display: var(--font-body);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121a1e;
    --card: #1a2429;
    --ink: #e7eeec;
    --muted: #9fb0b0;
    --line: #2c393e;
    --accent: #6cc3ad;
    --accent-soft: #1f3631;
    --danger: #ef8a75;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
}
main { max-width: 520px; margin: 0 auto; padding: 28px 18px 40px; display: flex; flex-direction: column; gap: 16px; }
main.wide { max-width: 860px; }
a { color: var(--accent); }
header.hero { display: flex; flex-direction: column; gap: 6px; padding: 8px 4px 4px; }
.role { align-self: flex-start; font-size: 13px; font-weight: 500; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; }
h1 { font-family: var(--font-display); font-size: 32px; font-weight: 700; margin: 4px 0 0; line-height: 1.25; text-wrap: balance; }
h1 small { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.lead { font-size: 18px; margin: 4px 0 0; text-wrap: balance; }
section, fieldset.q { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
h2 { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--muted); margin: 0; }
.project-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin: 0; line-height: 1.4; }
.meta { font-size: 14px; color: var(--muted); margin: 0; }
ul.dots { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
ul.dots li { display: grid; grid-template-columns: 6px 1fr; gap: 10px; align-items: baseline; }
ul.dots li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.contact-row:first-of-type { border-top: 0; padding-top: 2px; }
.contact-label { font-size: 13px; color: var(--muted); display: block; }
.contact-value { font-size: 16px; font-weight: 500; color: var(--ink); text-decoration: none; word-break: break-all; }
button, .btn {
  font: inherit; font-size: 14px; font-weight: 500; color: var(--accent); background: var(--accent-soft);
  border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer; white-space: nowrap; text-decoration: none; text-align: center;
}
.btn.primary, button.primary { background: var(--accent); color: var(--card); width: 100%; padding: 13px; font-size: 16px; display: block; }
button:focus-visible, .btn:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.status { font-size: 13px; color: var(--accent); min-height: 1.2em; margin: 0; text-align: center; }
footer { font-size: 12px; color: var(--muted); text-align: center; padding-top: 4px; display: flex; flex-direction: column; gap: 4px; }

/* 설문 */
fieldset.q legend { font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.45; padding: 0; float: left; width: 100%; margin-bottom: 6px; }
.qnum { color: var(--accent); margin-right: 4px; font-variant-numeric: tabular-nums; }
.hint { font-size: 13px; color: var(--muted); margin: 0; clear: both; }
.choices { display: flex; flex-direction: column; gap: 8px; clear: both; }
.choice { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 500; }
input[type="email"], textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%;
}
textarea { min-height: 84px; resize: vertical; }
.notice { font-size: 13px; color: var(--muted); background: var(--paper); border-radius: 10px; padding: 12px; margin: 0; }
.notice dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; }
.notice dt { font-weight: 700; color: var(--ink); }
.notice dd { margin: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.errors { border: 1px solid var(--danger); color: var(--danger); background: var(--card); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.errors ul { margin: 6px 0 0; padding-left: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 개인정보 안내 */
.doc h2 { color: var(--ink); font-size: 16px; }
.doc p, .doc li { font-size: 15px; }
.doc ul { margin: 0; padding-left: 18px; }

/* 관리자 */
.kpis { display: flex; gap: 12px; flex-wrap: wrap; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; min-width: 140px; }
.kpi b { display: block; font-size: 26px; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.kpi span { font-size: 13px; color: var(--muted); }
.bar-row { display: grid; grid-template-columns: 9.5em 1fr 4.5em; gap: 10px; align-items: center; font-size: 14px; }
.bar { height: 10px; background: var(--paper); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
@media (max-width: 400px) { .bar-row { grid-template-columns: 7em 1fr 4em; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
