/* 실버케어365 — 확정 시안 8종(docs/설계/시안/*.dc.html)의 인라인 style 값을 그대로 옮긴 스타일시트.
 * 색·크기·여백·모서리 반경은 시안 값을 따른다(눈대중 금지). 한 파일로 유지한다(지시서 K).
 * 구성: 토큰 → 기본 → 레이아웃(머리글·빵부스러기·푸터) → 공통 부품 → 표 → 페이지별 → 모바일(390px 기준)
 */

/* ------------------------------------------------------------------ 토큰 */
:root {
  --bg: #FBF8F3;
  --surface: #FFFFFF;
  --surface-2: #FBF9F5;
  --band: #F5EFE6;
  --band-2: #F0E8DC;
  --primary: #0E6B63;
  --primary-dark: #0A544D;
  --primary-soft: #E4F1EF;
  --primary-pale: #A7CFC9;
  --accent: #C2632A;
  --accent-soft: #FBEFE2;
  --grade-a: #1D7A5A;
  --grade-b: #2E6EA6;
  --text: #2A2520;
  --text-2: #4A423A;
  --muted: #7A6F64;
  --border: #E7DDCE;
  --border-strong: #D6C8B5;
  --line: #EFE7DA;
  --input-border: #C4B4A0;
  --track: #EFE6D9;
  --font: "Noto Sans KR", system-ui, sans-serif;
}

/* ------------------------------------------------------------------ 기본 */
* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex-grow: 1; }

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
button, input, select { font-family: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.35; color: var(--text); }
h1 { font-size: 36px; }
h2 { font-size: 28px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0; }
strong { font-weight: 700; }
.muted { color: var(--muted); }

/* ------------------------------------------------------------------ 레이아웃 */
.container { max-width: 1280px; margin: 0 auto; padding: 0 48px; }
.container > article > .breadcrumb:first-child { padding-top: 0; }
article { padding-bottom: 8px; }

.site-header {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-brand { text-decoration: none; display: flex; flex-direction: column; }
.site-logo { font-size: 22px; font-weight: 700; color: var(--primary); text-decoration: none; }
.site-tagline { font-size: 13px; color: var(--muted); }
.site-summary { flex-grow: 1; font-size: 16px; color: var(--muted); }
.cart-link {
  min-height: 46px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  color: var(--text);
  background: var(--band-2);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
}
.cart-link:hover { color: var(--text); }
.cart-badge { min-width: 22px; margin-left: 6px; padding: 0 7px; font-size: 14px; font-weight: 700; line-height: 22px; text-align: center; color: #FFFFFF; background: var(--primary); border-radius: 999px; }

.breadcrumb { padding: 20px 0 8px; font-size: 16px; color: var(--muted); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "›"; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-dark); }
.breadcrumb [aria-current="page"] { color: var(--text); }

.site-footer {
  margin-top: 32px;
  padding: 24px 0 30px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--muted);
}
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--primary-dark); text-decoration: underline; }
.footer-sep { margin: 0 6px; }
.footer-operator { font-size: 14px; color: var(--muted); }

.page-head { margin: 8px 0 14px; }
.page-head h1 { margin: 0 0 6px; }
.page-sub { margin: 0; font-size: 16px; color: var(--muted); }
.page-asof { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.section-head { padding-top: 30px; }
.section-head h2 { margin: 0 0 6px; font-size: 30px; }
.section-head p { margin: 0 0 22px; font-size: 18px; color: var(--text-2); }
.hero-band { background: var(--surface); border-bottom: 1px solid var(--border); }

/* ------------------------------------------------------------------ 공통 부품 */
.card {
  margin: 16px 0 0;
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.card > h2, .card-head h2 { margin: 0 0 4px; font-size: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-sub { margin: 0 0 16px; font-size: 16px; color: var(--muted); }
.card-note { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.list-card { padding: 8px 22px 14px; }
.band-card { margin: 0 0 14px; padding: 18px 22px; background: var(--band); border-radius: 12px; }
.eyebrow { font-size: 15px; color: var(--primary); font-weight: 700; }
.panel-sub { margin: 0 0 16px; font-size: 16px; color: var(--text-2); }

.geo-summary {
  margin: 0 0 14px;
  padding: 16px 20px;
  background: var(--band);
  border-radius: 12px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-2);
}

.btn {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary { color: #FFFFFF; background: var(--primary); }
.btn-primary:hover { color: #FFFFFF; background: var(--primary-dark); }
.btn-outline:hover { color: var(--primary-dark); }
.btn-lg { min-height: 60px; padding: 0 24px; font-size: 18px; font-weight: 700; border-radius: 12px; }
.btn-text { border-color: transparent; background: transparent; color: var(--muted); }
.btn-disabled { color: var(--muted); background: var(--band); border-color: var(--border); cursor: default; }

.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  min-height: 48px;
  padding: 0 18px;
  font-size: 17px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
}
.pill[aria-selected="true"] { color: #FFFFFF; background: var(--primary); border-color: var(--primary); font-weight: 700; }

.grade-badge {
  display: inline-block;
  padding: 3px 9px;
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--muted);
  border-radius: 999px;
  white-space: nowrap;
}
.below-mark { margin-left: 4px; font-weight: 700; color: var(--muted); cursor: help; }
.below-legend { margin: 8px 0 0; font-size: 13px; }
.grade-a { background: var(--grade-a); }
.grade-b { background: var(--grade-b); }
.grade-c { background: var(--muted); }
.hero-title .grade-badge { padding: 5px 12px; font-size: 15px; }

.change-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  white-space: nowrap;
}
.hero-title .change-badge { padding: 5px 12px; font-size: 15px; }
.mini-tag { display: inline-block; padding: 2px 8px; font-size: 13px; color: var(--text-2); background: var(--band-2); border-radius: 999px; white-space: nowrap; font-weight: 400; }

.link-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.link-chips a {
  padding: 12px 16px;
  font-size: 17px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
}
.link-chips a:hover { color: var(--primary-dark); border-color: var(--primary-pale); }
.chip-count { font-size: 15px; color: var(--muted); }
.links-heading { display: block; font-size: 17px; color: var(--text-2); font-weight: 400; margin: 0; }
h2.links-heading { font-size: 24px; color: var(--text); font-weight: 700; margin-bottom: 14px; }

select, input[type="number"] {
  min-height: 50px;
  padding: 0 12px;
  font-size: 17px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: 10px;
}
label { font-size: 16px; color: var(--text-2); }

.grid-buttons { --cols: 6; --gap: 10px; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: var(--gap); margin-top: 12px; }
.grid-btn {
  min-height: 52px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 17px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
}
.grid-btn:hover { color: var(--primary-dark); border-color: var(--primary-pale); }
.grid-btn.is-current { color: #FFFFFF; background: var(--primary); border-color: var(--primary); font-weight: 700; }
.sgg-count { color: var(--muted); font-size: 15px; }
.picker-label { font-size: 17px; color: var(--text-2); cursor: pointer; }
.grid-more[open] { grid-column: 1 / -1; }
.grid-more[open] > summary { width: calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); }
.grid-more > summary { list-style: none; cursor: pointer; color: var(--primary); background: var(--band-2); border-color: var(--border-strong); }
.grid-more > summary::-webkit-details-marker { display: none; }
.grid-more > summary { white-space: nowrap; }
.grid-more > summary::after { content: " ▾"; }
.grid-more[open] > summary::after { content: " ▴"; }
.grid-more .grid-rest { margin-top: 10px; }

.bar-track { display: block; height: 12px; background: var(--track); border-radius: 999px; }
.bar-fill { display: block; height: 12px; background: var(--primary); border-radius: 999px; }
.fill-grade { background: var(--grade-a); }

.ad-slot {
  margin: 20px 0 0;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ad-label { font-size: 13px; color: var(--muted); border: 1px solid var(--input-border); border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.ad-text { font-size: 17px; color: var(--muted); flex-grow: 1; }

.sticky-bar { display: none; }
.disabled-link { color: var(--muted); text-decoration: line-through; cursor: not-allowed; }

/* ------------------------------------------------------------------ 표 */
table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
}
.data-table th { color: var(--muted); font-weight: 500; font-size: 16px; }
.data-table tbody tr:last-child > * { border-bottom: none; }
.data-table a { font-weight: 700; text-decoration: none; }
.data-table .col-name { width: 26%; }
.data-table .col-rank { width: 56px; }
.cell-strong { font-weight: 700; }
.cell-rank { font-weight: 700; font-size: 19px; }
.kv-table th { width: 42%; }
.kv-table td { word-break: keep-all; overflow-wrap: anywhere; }
.list-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 16px;
}
.list-foot .list-count, .list-foot .rank-footnote { flex-grow: 1; }
.list-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 0 4px; }
tr.outlier td, tr.parse-failed td { color: #8a5a2a; }
.nonbenefit-note { display: block; font-size: 14px; color: var(--accent); }
.monthly-cost-cta { margin: 14px 0 0; font-size: 16px; color: var(--muted); }

.cost-table .col-item { width: 34%; }
.cost-table .col-amount { width: 26%; }
.cost-table .muted-basis { color: var(--muted); font-size: 16px; }
.cost-total th { color: var(--text); font-weight: 700; font-size: 17px; }
.cost-total-amount { font-weight: 700; font-size: 20px; color: var(--primary); }

/* ------------------------------------------------------------------ 첫 화면 */
.home-page article, .home-page { padding-bottom: 0; }
.hero { display: flex; gap: 40px; align-items: center; padding-top: 40px; padding-bottom: 34px; }
.hero-copy { flex-grow: 1; max-width: 620px; }
.hero-badge { display: inline-block; font-size: 15px; color: var(--primary); background: var(--primary-soft); padding: 6px 12px; border-radius: 999px; }
.hero-copy h1 { margin: 16px 0 10px; font-size: 42px; line-height: 1.3; }
.hero-accent { color: var(--primary); }
.hero-lead { margin: 0 0 6px; font-size: 19px; color: var(--text-2); }
.hero-metrics { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: 18px; font-size: 16px; color: var(--text-2); }
.hero-metrics strong { font-size: 18px; }
.hero-figure { margin: 0; width: 480px; flex-shrink: 0; }
.hero-frame { border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: var(--band); line-height: 0; }
.hero-frame svg { width: 100%; height: auto; display: block; }
.hero-figure figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }

.tabs, .home-tabs { display: flex; gap: 10px; border-bottom: 2px solid var(--border-strong); }
.tabs [role="tab"] {
  min-height: 60px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  font-size: 20px;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border-strong);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  text-decoration: none;
  white-space: nowrap;
}
.tabs [role="tab"][aria-selected="true"] { font-weight: 700; color: #FFFFFF; background: var(--primary); border-color: var(--primary); }
.tab-panel {
  margin: 0 0 22px;
  padding: 30px 32px;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  border-top: none;
  border-radius: 0 0 16px 16px;
}
.tab-panel h2 { margin: 0 0 6px; font-size: 25px; }
.sido-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sido-cell { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.sido-cell > a:first-child { min-height: 52px; display: flex; flex-direction: column; justify-content: center; font-size: 17px; color: var(--text); text-decoration: none; }
.sido-cell > a:first-child:hover { color: var(--primary-dark); }
.sido-count { font-size: 15px; color: var(--muted); }
.sido-cell > a + a { font-size: 15px; color: var(--primary); text-decoration: none; border-top: 1px solid var(--line); padding-top: 6px; }
.rank-teaser h2 { margin: 8px 0 6px; font-size: 25px; }

/* ------------------------------------------------------------------ 시도·시군구 */
.grade-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.grade-bar { display: flex; align-items: center; gap: 14px; font-size: 16px; }
.grade-label { width: 64px; color: var(--text-2); }
.grade-bar .bar-track { flex-grow: 1; }
.grade-count { width: 64px; text-align: right; color: var(--text-2); }
.grade-distribution h2 { font-size: 20px; }
.sgg-picker { padding: 22px 26px; }
.adjacent-links.card { padding: 18px 24px; border-radius: 14px; }
.glance { display: flex; align-items: stretch; gap: 16px; margin-top: 16px; }
.glance-stats { flex-grow: 1; margin: 0; padding: 20px 24px; border-radius: 14px; }
.stat-strip { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 10px; font-size: 17px; }
.glance .btn-lg { align-self: center; }
.region-links, .scope-links { margin-top: 16px; }

/* ------------------------------------------------------------------ 순위 */
.rank-note { margin: 0; font-size: 18px; color: var(--text-2); }
.controls-card { margin-top: 0; padding: 22px 28px; border: 2px solid var(--border-strong); }
.control-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.control-row + .control-row { margin-top: 16px; }
.control-label { min-width: 72px; font-size: 16px; color: var(--text-2); }
.rank-basis { margin: 14px 0; font-size: 16px; }
.dist-title { font-size: 17px; color: var(--text-2); }
.dist-title strong { color: var(--text); }
.dist-bars { display: flex; gap: 6px; margin-top: 12px; align-items: flex-end; }
.dist-bar { flex: 1 1 0; text-align: center; min-width: 0; }
.dist-plot { height: 74px; display: flex; align-items: flex-end; }
.dist-fill { width: 100%; background: var(--primary); border-radius: 6px 6px 0 0; }
.dist-bar.is-beyond .dist-fill { background: var(--primary-pale); }
.dist-label { margin-top: 6px; font-size: 14px; color: var(--muted); }
.dist-range { white-space: nowrap; }
.excluded-card { padding: 18px 24px; border-radius: 14px; }
.excluded-title { font-size: 18px; font-weight: 500; }
.excluded-card p { margin: 8px 0 0; font-size: 16px; color: var(--text-2); }

/* ------------------------------------------------------------------ 기관 상세 */
.facility-hero { padding: 0 0 22px; }
.facility-hero .breadcrumb { padding-top: 18px; }
.hero-title { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.facility-hero .geo-summary { margin: 14px 0 0; padding: 0; background: none; font-size: 19px; line-height: 1.6; }
.asof-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; font-size: 15px; color: var(--muted); }
.asof-chip { padding: 6px 12px; background: var(--band-2); border-radius: 8px; }
.asof-link { background: var(--primary-soft); color: var(--primary); text-decoration: none; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 24px; }
.metric-card { padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.metric-label { font-size: 15px; color: var(--muted); }
.metric-value { margin-top: 4px; font-size: 32px; font-weight: 700; line-height: 1.35; }
.metric-value.muted { font-size: 24px; font-weight: 500; }
.metric-cost { color: var(--primary); }
.metric-unit { font-size: 17px; font-weight: 400; color: var(--muted); }
.metric-sub { margin-top: 4px; font-size: 15px; color: var(--text-2); }

.change-list { display: flex; flex-direction: column; gap: 10px; }
.change-row { display: flex; gap: 16px; align-items: center; font-size: 17px; }
.change-date { min-width: 96px; color: var(--muted); }
.change-kind { min-width: 110px; font-weight: 500; color: var(--primary); }
.change-diff { color: var(--text-2); }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.two-col > .card { margin-top: 18px; }
.as-of { font-size: 16px; font-weight: 400; color: var(--muted); }
.score-bars { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 18px; }
.score-head { display: flex; justify-content: space-between; font-size: 16px; }
.score-row .bar-track { margin-top: 6px; }
.program-list { margin: 12px 0 0; padding-left: 20px; font-size: 16px; color: var(--text-2); }

.similar-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.similar-card { padding: 18px 20px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text); }
.similar-card:hover { border-color: var(--primary-pale); color: var(--text); }
.similar-name { font-size: 18px; font-weight: 500; }
.similar-meta { margin-top: 6px; font-size: 15px; color: var(--text-2); }
.similar-cost { margin-top: 6px; font-size: 17px; font-weight: 700; color: var(--primary); }
.similar-cost.muted { font-weight: 400; color: var(--muted); }
.internal-links .region-links, .internal-links .adjacent-links { margin-top: 16px; }

.phone-checklist summary { cursor: pointer; font-size: 18px; font-weight: 500; }
.phone-checklist ol { margin: 12px 0 0; padding-left: 22px; color: var(--text-2); }
.checklist-footnote { margin: 12px 0 0; font-size: 15px; color: var(--muted); }

.owner-cta {
  margin: 18px 0 0;
  padding: 20px 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--band-2);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
}
.owner-copy { flex-grow: 1; font-size: 17px; color: var(--text-2); }
.owner-copy strong { display: block; font-size: 19px; color: var(--text); }
.owner-actions { display: flex; gap: 10px; }
.owner-actions .btn { min-height: 50px; font-size: 17px; }
.correction-line { flex-wrap: wrap; }
.facility-footer { margin-top: 14px; }
.as-of-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------------ 통계 페이지 */
.stats-table th[scope="row"] { width: 28%; color: var(--text-2); font-weight: 500; font-size: 17px; }
.stats-table td { font-size: 17px; }
.stat-n { font-size: 14px; color: var(--muted); }
.trend-heading { margin: 18px 0 8px; font-size: 19px; }
.trend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.trend-fig { margin: 0; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.trend-fig figcaption { font-size: 15px; color: var(--muted); }
.trend-chart { width: 100%; height: auto; display: block; }
.trend-line { stroke: var(--primary); stroke-width: 2; }
.trend-dot { fill: var(--primary); }
.trend-axis { stroke: var(--border-strong); stroke-width: 1; }
.trend-label { font-size: 15px; fill: var(--muted); }
.trend-table { margin-top: 12px; }
.trend-table summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 16px; color: var(--primary); }
.stats-cite code { padding: 2px 8px; font-size: 15px; background: var(--band); border-radius: 6px; word-break: break-all; }
.stats-cite p, .stats-method p { margin: 8px 0 0; font-size: 17px; color: var(--text-2); }

/* ------------------------------------------------------------------ 맞춤검색 */
.search-page h1 { margin-bottom: 10px; }
.search-page [hidden] { display: none !important; }
.search-disclaimer { padding: 12px 18px; background: var(--band); border-radius: 12px; font-size: 16px; color: var(--text-2); }
.fee-year-note { font-size: 14px; color: var(--muted); }
.step-progress { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.step-progress li { display: flex; align-items: center; gap: 8px; padding: 8px 16px; font-size: 16px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.step-progress .dot { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--muted); border: 1px solid var(--input-border); border-radius: 50%; }
.step-progress li[aria-current="step"] { color: #FFFFFF; background: var(--primary); border-color: var(--primary); font-weight: 700; }
.step-progress li[aria-current="step"] .dot { color: var(--primary); background: #FFFFFF; border-color: #FFFFFF; }
.step-progress li.is-done { color: var(--primary); background: var(--primary-soft); border-color: var(--primary-pale); }

.search-step { margin: 16px 0; padding: 26px 30px; background: var(--surface); border: 2px solid var(--border-strong); border-radius: 14px; }
.search-page .step-heading { display: flex; align-items: center; justify-content: space-between; }
.search-step h2 { margin: 0 0 12px; font-size: 24px; }
.search-page fieldset { margin: 12px 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; }
.search-page legend { padding: 0 6px; font-size: 16px; color: var(--text-2); }
.search-page label { display: block; margin: 12px 0 6px; }
.search-page .check-inline { display: inline-flex; align-items: center; gap: 6px; margin: 4px 14px 4px 0; }
.search-page input[type="checkbox"], .search-page input[type="radio"] { width: 20px; height: 20px; accent-color: var(--primary); vertical-align: middle; margin-right: 6px; }
.search-page select, .search-page input[type="number"] { min-height: 56px; font-size: 18px; min-width: 200px; }
.search-page .inline-fields { display: flex; flex-wrap: wrap; gap: 16px; }
.search-page .inline-fields > div { min-width: 200px; }
.search-page .align-end { align-self: flex-end; }
.search-page .step-nav { display: flex; gap: 10px; margin-top: 16px; }
.search-page button {
  min-height: 46px;
  padding: 0 18px;
  font-size: 16px;
  color: #FFFFFF;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 10px;
  cursor: pointer;
}
.search-page button.secondary { color: var(--primary); background: var(--surface); }
.search-page button:disabled { color: var(--muted); background: var(--band); border-color: var(--border); cursor: not-allowed; }
.search-page #btn-search, .search-page [data-next] { min-height: 58px; padding: 0 34px; font-size: 20px; font-weight: 700; border-radius: 12px; }
.search-page [data-prev] { min-height: 58px; padding: 0 26px; font-size: 18px; border-radius: 12px; }
.help-btn { width: 22px; height: 22px; padding: 0 !important; min-height: 0 !important; line-height: 1; font-size: 13px !important; color: var(--muted) !important; background: var(--surface) !important; border: 1px solid var(--input-border) !important; border-radius: 50% !important; }
.help-text { display: none; margin: 8px 0; padding: 10px 14px; font-size: 15px; color: var(--text-2); background: var(--band); border-radius: 10px; }
.help-text.open { display: block; }
.help-text:focus { outline: 2px solid var(--primary); outline-offset: 2px; }

.budget-hint { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.chip-row { margin: 0 0 16px; padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.chip-row-label { font-size: 16px; color: var(--muted); margin-right: 4px; }
.search-page .cond-chip { min-height: 44px; padding: 0 16px; font-size: 16px; color: var(--primary); background: var(--primary-soft); border: 1px solid var(--primary-pale); border-radius: 999px; white-space: nowrap; }
.chip-row-reset { margin-left: auto; font-size: 16px; }
.result-summary-bar { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin: 8px 0 14px; }
.result-summary-bar p { margin: 0; font-size: 30px; font-weight: 700; line-height: 1.35; }
.result-summary-bar label { display: flex; align-items: center; gap: 12px; margin: 0; white-space: nowrap; }
.relax-suggestions { margin: 0 0 14px; padding: 18px 24px; background: var(--band); border: 1px dashed var(--input-border); border-radius: 14px; font-size: 17px; color: var(--text-2); }
.search-page .relax-suggestions button { min-height: 44px; margin: 4px 10px 4px 0; padding: 0 16px; color: var(--primary); background: var(--surface); border-radius: 9px; }

.result-card {
  margin: 14px 0 0;
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.rc-main { flex: 1 1 320px; display: flex; flex-direction: column; gap: 10px; }
.rc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.rc-name { font-size: 23px; font-weight: 700; color: var(--text); text-decoration: none; }
.rc-name:hover { color: var(--primary-dark); }
.rc-meta { font-size: 16px; color: var(--text-2); }
.rc-stats { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 16px; color: var(--text-2); }
.rc-stats strong { color: var(--text); }
.rc-vac, .rc-cost { padding-left: 20px; border-left: 1px solid var(--line); }
.rc-vac { min-width: 150px; }
.rc-cost { min-width: 210px; }
.rc-label { font-size: 15px; color: var(--muted); }
.rc-vac-num { margin-top: 4px; font-size: 24px; font-weight: 700; }
.rc-wait { margin-top: 2px; font-size: 16px; color: var(--text-2); }
.cost-headline { margin-top: 2px; font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1.35; }
.rc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rc-actions .btn { min-height: 46px; padding: 0 14px; border-radius: 9px; }
.result-card .card-warning { flex-basis: 100%; margin: 0; font-size: 15px; color: #8a5a2a; }
.result-card .cost-detail { display: none; flex-basis: 100%; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-2); }
.result-card .cost-detail.open { display: block; }
.result-card .cost-detail ul { margin: 0; padding-left: 20px; }
.unknown-card { margin-top: 14px; padding: 20px 24px; border-radius: 14px; }
.unknown-title { font-size: 19px; font-weight: 500; }
.unknown-card p { margin: 8px 0 12px; font-size: 16px; color: var(--text-2); }
.unknown-card .link-chips { margin-top: 0; }
.unknown-card .link-chips a { padding: 10px 14px; font-size: 16px; border-radius: 9px; }
.results-bar { display: flex; gap: 10px; margin-top: 20px; }

.cost-calculator-standalone h2 { font-size: 24px; }
#calc-standalone-result { margin-top: 14px; }
#calc-standalone-result .cost-headline { font-size: 28px; }
#calc-standalone-result ul { margin: 8px 0 0; padding-left: 20px; }
.card-warning { font-size: 15px; color: #8a5a2a; }

/* ------------------------------------------------------------------ 비교함 */
.compare-page h1 { margin: 12px 0 10px; }
.compare-page #compare-table-root { margin-top: 16px; padding: 8px 22px 14px; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.compare-page th, .compare-page td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 17px; }
.compare-page th { color: var(--muted); font-weight: 500; font-size: 16px; }
.cart-add-btn { cursor: pointer; }
.cart-add-btn.is-in-cart { color: var(--primary-dark); background: var(--primary-soft); border-color: var(--primary); font-weight: 700; }
.score-note { margin: 0 0 8px; font-size: 16px; color: var(--text-2); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ------------------------------------------------------------------ 안내 페이지 */
.about-page, .privacy-page, .terms-page, .method-page { max-width: 880px; }

/* ------------------------------------------------------------------ 좁은 화면 (모바일 390px 기준) */
@media (max-width: 1100px) {
  .metric-grid, .similar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-buttons { --cols: 4; }
  .sido-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { flex-direction: column; align-items: stretch; }
  .hero-figure { width: 100%; max-width: 480px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: 27px; }
  h2 { font-size: 22px; }
  .container { padding: 0 16px; }

  .site-header { flex-wrap: wrap; gap: 4px 12px; padding: 14px 18px; }
  .site-brand { flex-grow: 1; }
  .site-logo { font-size: 19px; }
  .site-tagline { font-size: 12px; }
  .site-summary { order: 3; flex-basis: 100%; font-size: 13px; }
  .cart-link { min-height: 44px; min-width: 44px; padding: 0 12px; font-size: 15px; }
  .breadcrumb { padding: 14px 0 6px; font-size: 14px; }
  .site-footer { padding: 18px 0; font-size: 13px; line-height: 1.6; }
  .footer-source a { display: inline-block; }

  .page-head h1 { font-size: 27px; }
  .page-sub { font-size: 14px; }
  .card { margin-top: 12px; padding: 16px; border-radius: 14px; }
  .card > h2, .card-head h2 { font-size: 19px; }
  .card-sub { font-size: 14px; }
  .list-card { padding: 6px 16px 12px; }
  .band-card { padding: 14px 16px; }
  .geo-summary { padding: 14px 16px; font-size: 16px; }
  .facility-hero .geo-summary { font-size: 16px; }
  .link-chips a { padding: 10px 14px; font-size: 16px; }
  .btn-lg { min-height: 54px; font-size: 16px; }
  .ad-slot { padding: 12px 14px; }
  .ad-label { font-size: 12px; padding: 2px 6px; }
  .ad-text { font-size: 14px; }

  .grid-buttons { --cols: 3; --gap: 8px; }
  .grid-btn { font-size: 15px; padding: 6px; }
  .glance { flex-direction: column; }
  .glance .btn-lg { align-self: stretch; }
  .stat-strip { font-size: 15px; gap: 4px 18px; }

  .hero { padding-top: 20px; padding-bottom: 18px; gap: 16px; }
  .hero-copy h1 { font-size: 27px; }
  .hero-lead { font-size: 16px; }
  .hero-metrics { gap: 4px 14px; font-size: 15px; }
  .hero-metrics strong { font-size: 16px; }
  .hero-figure figcaption { font-size: 13px; }
  .section-head { padding-top: 20px; }
  .section-head h2 { font-size: 22px; }
  .section-head p { font-size: 15px; margin-bottom: 14px; }
  .tabs, .home-tabs { gap: 6px; }
  .tabs [role="tab"] { flex-grow: 1; justify-content: center; min-height: 52px; padding: 0 6px; font-size: 16px; border-radius: 10px 10px 0 0; }
  .tab-panel { padding: 18px 16px; border-radius: 0 0 14px 14px; }
  .tab-panel h2 { font-size: 20px; }
  .sido-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .controls-card { padding: 16px; }
  .control-label { min-width: 100%; }
  .pill { min-height: 44px; padding: 0 14px; font-size: 15px; }
  .rank-note { font-size: 15px; }
  .dist-bars { gap: 4px; }
  .dist-label { font-size: 12px; }
  .dist-range { display: block; }
  .dist-title { font-size: 15px; }

  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 14px; }
  .metric-card { padding: 14px 16px; border-radius: 12px; }
  .metric-label { font-size: 13px; }
  .metric-value { font-size: 25px; }
  .metric-value.muted { font-size: 18px; }
  .metric-unit { font-size: 15px; }
  .metric-sub { font-size: 13px; }
  .hero-title { gap: 8px; }
  .hero-title h1 { font-size: 27px; }
  .hero-title .grade-badge, .hero-title .change-badge { font-size: 14px; padding: 4px 10px; }
  .asof-chips { gap: 6px; font-size: 13px; }
  .asof-chip { padding: 5px 10px; }
  .change-row { font-size: 15px; gap: 10px; flex-wrap: wrap; }
  .change-date { min-width: 58px; }
  .change-kind { min-width: 86px; }
  .two-col { grid-template-columns: 1fr; gap: 0; }
  .two-col > .card { margin-top: 12px; }
  .similar-grid { grid-template-columns: 1fr; }
  .owner-cta { flex-direction: column; align-items: stretch; padding: 16px; }
  .owner-actions { flex-direction: column; }
  .owner-actions .btn { min-height: 48px; }
  .data-table.kv-table th, .data-table.kv-table td { padding: 11px 8px; font-size: 15px; }
  .kv-table td { text-align: right; }
  .cost-table thead { display: none; }
  .cost-table tr { display: grid; grid-template-columns: 1fr auto; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .cost-table th, .cost-table td { border: none; padding: 3px 0; font-size: 15px; }
  .cost-table td:nth-child(3) { grid-column: 1 / -1; font-size: 13px; }
  .cost-total-amount { font-size: 18px; }
  .eval-year-table { display: none; }

  /* 표 -> 세로 카드(지역·순위·정원 표는 가로 스크롤 금지) */
  table.stack, .stack thead, .stack tbody, .stack tr, .stack th, .stack td { display: block; width: 100%; }
  .stack thead { display: none; }
  .stack tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .stack tbody tr:last-child { border-bottom: none; }
  .stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; border: none; font-size: 15px; text-align: right; }
  .stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 14px; text-align: left; }
  .stack td.cell-name { display: block; font-size: 19px; text-align: left; padding-bottom: 6px; }
  .stack td.cell-name a { font-size: 19px; }
  .stack td.cell-rank { display: inline-flex; gap: 0; font-size: 19px; width: auto; padding-bottom: 0; }
  .stack td.cell-rank::after { content: "위"; font-size: 14px; font-weight: 400; margin-left: 2px; color: var(--muted); }
  .rank-table tr { position: relative; }
  .list-foot { flex-wrap: wrap; font-size: 14px; }
  .list-controls { gap: 8px; }
  .list-controls select { min-height: 48px; font-size: 16px; flex-grow: 1; }

  .search-step { padding: 18px 16px; border-radius: 14px; }
  .search-step h2 { font-size: 20px; }
  .search-page select, .search-page input[type="number"] { min-height: 54px; font-size: 17px; width: 100%; min-width: 0; }
  .search-page .inline-fields > div { min-width: 0; flex: 1 1 100%; }
  .search-page #btn-search, .search-page [data-next] { min-height: 60px; font-size: 19px; flex-grow: 1; }
  .search-page [data-prev] { min-height: 60px; font-size: 16px; padding: 0 20px; }
  .step-progress { gap: 6px; }
  .step-progress li { padding: 6px 10px; font-size: 14px; }
  .chip-row { padding: 12px 16px; gap: 8px; }
  .search-page .cond-chip { padding: 0 14px; font-size: 15px; }
  .result-summary-bar p { font-size: 22px; }
  .result-summary-bar label { flex-grow: 1; }
  .result-summary-bar select { flex-grow: 1; min-height: 48px; font-size: 16px; }
  .result-card { padding: 16px 16px 14px; gap: 0; border-radius: 14px; flex-direction: column; flex-wrap: nowrap; }
  .rc-main { flex: none; gap: 8px; }
  .rc-head { gap: 8px; }
  .rc-name { font-size: 19px; }
  .rc-meta { font-size: 15px; }
  .rc-stats { font-size: 15px; gap: 4px 16px; }
  .rc-vac { min-width: 0; padding: 10px 0 0; border: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
  .rc-vac-num { margin: 0; font-size: 17px; }
  .rc-wait { margin: 0; font-size: 15px; }
  .rc-vac .rc-label { flex-basis: 100%; font-size: 13px; }
  .rc-cost { min-width: 0; margin-top: 12px; padding: 12px 0 0; border-left: none; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; }
  .rc-cost .rc-label { grid-column: 1; grid-row: 1; }
  .rc-cost .cost-headline { grid-column: 1; grid-row: 2; }
  .rc-cost .rc-actions { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; justify-content: flex-end; }
  .rc-actions .btn-text { flex-basis: 100%; min-height: 36px; padding: 0; justify-content: flex-end; font-size: 14px; }
  .rc-label { font-size: 13px; }
  .cost-headline { font-size: 23px; }
  .rc-actions .btn { min-height: 48px; padding: 0 14px; font-size: 15px; border-radius: 10px; }
  .result-card .card-warning { margin-top: 8px; font-size: 13px; }
  .relax-suggestions { padding: 14px 16px; font-size: 15px; }
  .unknown-card { padding: 14px 16px; }
  .unknown-title { font-size: 17px; }
  .unknown-card p { font-size: 14px; }

  /* 하단 고정 바 — 기관 상세("전화 문의"+"목록"), 결과("조건 수정"+"비교함 보기") */
  .sticky-bar {
    display: flex;
    position: sticky;
    bottom: 0;
    z-index: 5;
    gap: 10px;
    margin: 16px -16px 0;
    padding: 12px 16px;
    background: var(--surface);
    border-top: 1px solid var(--border);
  }
  .facility-page > .sticky-bar { margin: 20px 0 0; }
  .sticky-bar .btn { flex-grow: 1; min-height: 54px; border-radius: 12px; }
  .facility-page > .sticky-bar .btn-primary { min-height: 56px; font-size: 17px; }
  .facility-page > .sticky-bar .btn-outline { flex-grow: 0; padding: 0 18px; }
  .facility-page > .sticky-bar .btn-outline:only-child { flex-grow: 1; }
  .results-bar { margin: 16px -16px 0; }
  /* 터치 목표 최소 44px (지시서 K 보완 2번) — 버튼·단독 링크(빵부스러기·푸터·표 안 링크·칩). 문장 속 링크는 제외 */
  .breadcrumb ol { row-gap: 0; }
  .breadcrumb a, .breadcrumb [aria-current="page"] { min-height: 44px; display: inline-flex; align-items: center; }
  .site-footer a, .footer-source a, .footer-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; }
  .footer-nav span:not(.footer-sep) { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-source, .footer-nav { display: flex; flex-wrap: wrap; align-items: center; }
  .data-table a, .stack td.cell-name a { min-height: 44px; display: inline-flex; align-items: center; }
  .sido-cell > a + a { min-height: 44px; display: flex; align-items: center; }
  /* 문장 속 인라인 링크는 44px 적용에서 뺀다 — 버튼·단독 링크만 */
  .kv-table a, .chip-row-reset, .asof-link { min-height: 44px; display: inline-flex; align-items: center; }
  .asof-chip { display: inline-flex; align-items: center; min-height: 44px; }
  .search-page .btn-text, .rc-actions .btn-text { min-height: 44px; }
  .help-btn { width: 44px !important; height: 44px !important; min-height: 44px !important; font-size: 0 !important; border: none !important; background: transparent !important; }
  .help-btn::before { content: "?"; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; font-size: 14px; color: var(--muted); border: 1px solid var(--input-border); border-radius: 50%; }
  .search-page fieldset label, .search-page .check-inline, .search-page label:has(> input[type="checkbox"]) { min-height: 44px; display: flex; align-items: center; }
  .phone-checklist summary, .grid-more > summary { min-height: 44px; display: flex; align-items: center; }
  .trend-grid { grid-template-columns: 1fr; }
  .stats-table th[scope="row"], .stats-table td { font-size: 15px; padding: 11px 8px; }
  .stats-table th[scope="row"] { width: 34%; }
  .stat-n { display: block; font-size: 13px; }
  .stats-cite p, .stats-method p { font-size: 15px; }
  .cart-add-btn, .btn { min-height: 44px; }
  .rc-name { min-height: 44px; display: inline-flex; align-items: center; }
}
