/* 혜택모아 - 어르신 사용성 기준: 본문 18px 이상, 버튼 48px 이상, 높은 대비 */

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #1a1a1a;
  --muted: #555b65;
  --line: #d9dde3;
  --primary: #0b5cad;
  --primary-text: #ffffff;
  --primary-soft: #e8f1fb;
  --accent: #b5470b;
  --badge: #eef0f3;
  --radius: 10px;
  --wrap: 960px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 18px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: var(--primary); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

h1 { font-size: 1.75rem; line-height: 1.35; margin: 1.2rem 0 .6rem; }
h2 { font-size: 1.35rem; line-height: 1.4; margin: 0 0 .8rem; }
h3 { font-size: 1.15rem; margin: 1.2rem 0 .6rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); padding: 8px; z-index: 10; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }

/* 머리말 */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 12px; padding-bottom: 12px; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--text); text-decoration: none; }
.private-badge {
  display: inline-block; font-size: .85rem; line-height: 1.4; padding: 2px 8px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface);
}
.top-nav { margin-left: auto; display: flex; gap: 4px; }
.top-nav a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px;
  color: var(--text); text-decoration: none; font-weight: 600; border-radius: var(--radius);
}
.top-nav a:hover { background: var(--surface); }

main { padding-bottom: 48px; }

.breadcrumb { font-size: 1rem; color: var(--muted); margin-top: 16px; }
.breadcrumb a { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); margin-top: 0; }
.note { font-size: 1rem; color: var(--muted); }
.empty { padding: 20px; background: var(--surface); border-radius: var(--radius); }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 52px; padding: 0 20px; border: 2px solid var(--primary); border-radius: var(--radius);
  background: var(--bg); color: var(--primary); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--primary-soft); }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: #094c8f; }
.btn-call { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-call:hover { background: #963a08; }

/* 첫 화면 */
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: 2rem; margin-top: 0; }

/* 맞춤 찾기 폼 */
.find-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  display: grid; gap: 18px;
}
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 6px; padding: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.find-form input[type=number], .find-form select, .search-form input {
  width: 100%; min-height: 52px; padding: 8px 12px; font: inherit; color: var(--text);
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--bg);
}
.find-form input[type=number] { max-width: 200px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.choice {
  display: flex !important; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px;
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--bg); font-weight: 500 !important; cursor: pointer;
}
.choice input { width: 22px; height: 22px; margin: 0; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.find-form .btn-primary { width: 100%; font-size: 1.15rem; min-height: 58px; }
.form-note { margin: 0; font-size: .95rem; color: var(--muted); }

.search-form { display: flex; gap: 8px; margin-bottom: 20px; }
.search-form input { flex: 1; }

/* 구역 */
.section { margin-top: 36px; }
.section-sub { padding: 20px; background: var(--surface); border-radius: 14px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head .more { font-weight: 600; min-height: 48px; display: inline-flex; align-items: center; }
.count { font-size: .9em; color: var(--muted); font-weight: 500; margin-left: 4px; }
.cta-inline { margin: 16px 0 0; }
.result-summary { font-size: 1.15rem; }

/* 혜택 목록 */
.benefit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.benefit-card a {
  display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--text); text-decoration: none;
}
.benefit-card a:hover { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.card-title { font-size: 1.2rem; font-weight: 700; color: var(--primary); }
.card-org { font-size: 1rem; color: var(--muted); }
.card-desc { font-size: 1.05rem; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.badge { font-size: .9rem; padding: 2px 10px; border-radius: 999px; background: var(--badge); color: var(--text); }

/* 지역 */
.region-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.region-grid a {
  display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 56px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 600;
}
.region-grid a:hover { border-color: var(--primary); background: var(--primary-soft); }
.field-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.field-list li { padding: 6px 14px; border-radius: 999px; background: var(--surface); }

/* 혜택 상세 */
.detail-head h1 { font-size: 2rem; margin-bottom: .3rem; }
.detail-org { margin: 0; font-size: 1.1rem; color: var(--muted); }
.detail-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .95rem; color: var(--muted); }
.closed-notice { padding: 14px 16px; border-radius: var(--radius); background: #fdeee6; color: #7a2e06; font-weight: 700; }

.facts dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 20px 0 0; }
.facts dl > div { padding: 12px 14px; background: var(--surface); border-radius: var(--radius); }
.facts dt { font-size: .95rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }

.boxes { margin-top: 28px; display: grid; gap: 14px; }
.box { border: 2px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.box h2 { font-size: 1.25rem; color: var(--primary); margin-bottom: .5rem; }
.box-body { font-size: 1.1rem; }

.apply { margin-top: 28px; padding: 20px; border-radius: 14px; background: var(--primary-soft); }
.phone-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.apply-info { margin: 0; display: grid; gap: 10px; }
.apply-info dt { font-weight: 700; }
.apply-info dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }

.original { margin-top: 28px; }
.original summary {
  min-height: 52px; display: flex; align-items: center; padding: 0 16px; cursor: pointer; font-weight: 700;
  border: 2px solid var(--line); border-radius: var(--radius);
}
.original-list { margin: 16px 0 0; display: grid; gap: 16px; }
.original-list dt { font-weight: 700; }
.original-list dd { margin: 0; }
.disclaimer { margin-top: 24px; font-size: 1rem; color: var(--muted); }

/* 정보가 달라요 신고 */
.report { margin-top: 28px; }
.report summary {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 16px; cursor: pointer; font-weight: 700;
  border: 2px solid var(--line); border-radius: var(--radius); color: var(--muted);
}
.report form { margin-top: 14px; padding: 18px; border: 2px solid var(--line); border-radius: 14px; display: grid; gap: 10px; }
.report fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.report legend { font-weight: 700; margin-bottom: 6px; }
.report .radio { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.report .radio input { width: 22px; height: 22px; }
.report textarea { width: 100%; padding: 10px 12px; font: inherit; border: 2px solid var(--line); border-radius: var(--radius); }
.report .btn { justify-self: start; }
.report .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.report-msg { padding: 14px 16px; border-radius: var(--radius); font-weight: 700; }
.report-msg.ok { background: var(--primary-soft); }
.report-msg.error { background: #fdecea; color: #8a1c12; }

.prose ul { padding-left: 1.2em; }

/* 꼬리말 */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 1rem; padding: 24px 0 40px; }
.site-footer p { margin: 0 0 8px; }
.site-footer strong { color: var(--text); }

@media (max-width: 600px) {
  body { font-size: 18px; }
  h1, .hero h1, .detail-head h1 { font-size: 1.6rem; }
  .top-nav { margin-left: 0; width: 100%; }
  .top-nav a { flex: 1; justify-content: center; padding: 0 6px; }
  .field-row { grid-template-columns: 1fr; }
  .search-form { flex-direction: column; }
}

/* A4 한 장 인쇄: 자녀가 출력해 부모님께 전달 */
@media print {
  @page { size: A4; margin: 14mm; }
  body { font-size: 12pt; line-height: 1.55; color: #000; }
  .site-header .top-nav, .no-print, .skip, .benefit-detail .note { display: none !important; }
  .site-header, .site-footer { border: 0; background: none; padding: 0; }
  .site-footer { margin-top: 10mm; font-size: 9pt; }
  .detail-head h1 { font-size: 20pt; }
  .facts dl > div, .apply, .box { background: none; border: 1px solid #999; break-inside: avoid; }
  .box { padding: 3mm 4mm; }
  .boxes { gap: 3mm; }
  .btn-call { background: none; color: #000; border: 0; padding: 0; min-height: 0; font-weight: 700; }
  a { color: #000; text-decoration: none; }
}
