/* 2424 VACCINE_SCHEDULE — kit-corporate 변형 "clinic"
 * 차분한 의료 정보 톤: 옅은 회청 바탕 + 딥 틸 단색 액센트, 평면 카드(1px 헤어라인), 그림자·그라디언트·블러 없음.
 * 좌측 정렬 문서형 헤딩, 표 숫자는 tabular-nums. 라이트 기본 + 다크 토글.
 */
:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #f9fbfa;
  --text: #1c2a2d;
  --text-2: #4a5b5f;
  --text-3: #75868a;
  --border: #dbe3e1;
  --border-2: #c6d2cf;
  --accent: #24666e;
  --accent-ink: #ffffff;
  --accent-soft: #e7f0ef;
  --warn: #9c4436;
  --warn-soft: #f7ecea;
  --r: 8px;
  --maxw: 880px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0f1517;
  --surface: #161e21;
  --surface-2: #1b2427;
  --text: #e2eae9;
  --text-2: #b0bfbe;
  --text-3: #83959a;
  --border: #283538;
  --border-2: #34454a;
  --accent: #7ab8bd;
  --accent-ink: #0f1517;
  --accent-soft: #1d2d30;
  --warn: #e0968a;
  --warn-soft: #2c1f1d;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif;
  font-size: 16px; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; color: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── header ── */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; letter-spacing: -0.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; }
.brand-mark svg { width: 18px; height: 18px; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 14.5px; padding: 8px 10px; border-radius: 6px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.icon-btn { width: 36px; height: 36px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; display: inline-grid; place-items: center; cursor: pointer; color: var(--text-2); }
.icon-btn svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .site-header .wrap { flex-wrap: wrap; gap: 6px 10px; padding-top: 8px; padding-bottom: 6px; }
  .nav { order: 3; width: 100%; margin: 0 -10px; overflow-x: auto; }
  .nav a { white-space: nowrap; font-size: 14px; }
  .site-header .icon-btn { margin-left: auto; }
}

main { padding: 20px 0 48px; }

/* ── 기준일 배너 (크게) ── */
.basis { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--r); margin-bottom: 16px; }
.basis-year { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.basis-year b { color: var(--accent); }
.basis-meta { font-size: 13.5px; color: var(--text-2); }
.basis-meta a { color: inherit; }

/* ── panels ── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; }
.panel + .panel { margin-top: 14px; }
.panel-title { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--text-2); letter-spacing: -0.01em; }

.kids { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.kid-tab { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 14.5px; }
.kid-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.kid-add { border: 1px dashed var(--border-2); background: transparent; color: var(--accent); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 14px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input, .field select { height: 44px; border: 1px solid var(--border-2); border-radius: 7px; padding: 0 12px; background: var(--surface); min-width: 0; width: 100%; }
.field input[type=date] { font-variant-numeric: tabular-nums; }
.field-wide { grid-column: 1 / -1; }
details.opts { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 10px; }
details.opts summary { cursor: pointer; font-size: 14px; color: var(--text-2); font-weight: 600; }
details.opts .form-grid { margin-top: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); grid-column: 1 / -1; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.btn { height: 44px; padding: 0 18px; border-radius: 7px; border: 1px solid var(--border-2); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: transparent; color: var(--text-3); font-weight: 500; }
.btn-ghost:hover { color: var(--warn); }
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-actions .btn-primary { flex: 1; justify-content: center; }
}

.empty { text-align: left; color: var(--text-3); font-size: 14.5px; padding: 18px; border: 1px dashed var(--border-2); border-radius: var(--r); margin-top: 14px; }

/* ── summary ── */
.summary { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); margin-top: 14px; }
.sum-cell { padding: 16px 18px; min-width: 0; }
.sum-cell + .sum-cell { border-left: 1px solid var(--border); }
.sum-k { font-size: 12.5px; font-weight: 600; color: var(--text-3); letter-spacing: 0.02em; margin: 0 0 6px; }
.sum-name { font-size: 19px; font-weight: 750; margin: 0; letter-spacing: -0.02em; }
.sum-age { font-size: 13.5px; color: var(--text-2); margin: 2px 0 12px; font-variant-numeric: tabular-nums; }
.next { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.next-vac { font-size: 17px; font-weight: 700; margin: 0; }
.next-vac a { color: var(--text); text-decoration: none; }
.next-vac a:hover { color: var(--accent); }
.nx-dose { font-weight: 500; color: var(--text-2); font-size: 15px; }
.next-date { font-size: 13.5px; color: var(--text-2); margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.dday { flex: none; font-size: 22px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.dday.is-late { color: var(--warn); }
.prog-num { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.prog-num small { font-size: 15px; color: var(--text-3); font-weight: 600; }
.bar { height: 6px; background: var(--accent-soft); border-radius: 3px; margin: 8px 0 8px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .25s; }
.late-badge { display: inline-block; font-size: 13px; color: var(--warn); background: var(--warn-soft); padding: 2px 8px; border-radius: 4px; font-weight: 600; }
@media (max-width: 640px) {
  .summary { grid-template-columns: 1fr; }
  .sum-cell + .sum-cell { border-left: 0; border-top: 1px solid var(--border); }
}

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin: 18px 0 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); padding: 5px 12px; border-radius: 999px; font-size: 13.5px; cursor: pointer; }
.chip .n { color: var(--text-3); margin-left: 3px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions .btn { height: 38px; font-size: 14px; padding: 0 12px; }

/* ── timeline ── */
.tl-group { margin-top: 18px; }
.tl-head { margin: 0 0 6px; font-size: 13.5px; font-weight: 700; color: var(--text-2); display: flex; align-items: center; gap: 10px; }
.tl-head::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.tl-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.dose { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; padding: 12px 14px; align-items: start; }
.dose + .dose { border-top: 1px solid var(--border); }
.dose-check { padding-top: 2px; cursor: pointer; }
.dose-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dose-check .box { display: block; width: 22px; height: 22px; border: 1.5px solid var(--border-2); border-radius: 5px; background: var(--surface); position: relative; }
.dose-check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.dose-check input:checked + .box::after { content: ''; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.dose-check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.dose-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.dose-name { font-weight: 700; color: var(--text); text-decoration: none; }
.dose-name:hover { color: var(--accent); text-decoration: underline; }
.dose-label { color: var(--text-2); font-size: 14.5px; }
.tag { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--border-2); color: var(--text-3); }
.tag-nip { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.dose-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13.5px; color: var(--text-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.dose-date { color: var(--text); font-weight: 600; }
.dose-range { color: var(--text-3); }
.dose-note { margin: 6px 0 0; font-size: 13px; color: var(--text-3); line-height: 1.55; }
.dose-done { margin-top: 8px; font-size: 13px; color: var(--text-2); }
.dose-done input { height: 32px; border: 1px solid var(--border-2); border-radius: 6px; padding: 0 8px; background: var(--surface); margin-left: 6px; }
.dose-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 64px; }
.st { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.dd { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
.dose.is-due .st, .dose.is-soon .st, .dose.is-due .dd, .dose.is-soon .dd { color: var(--accent); }
.dose.is-due { background: var(--accent-soft); }
.dose.is-late .st, .dose.is-late .dd { color: var(--warn); }
.dose.is-done .dose-name, .dose.is-done .dose-label, .dose.is-done .dose-date { color: var(--text-3); }
.dose.is-done .dose-date { text-decoration: line-through; }
.dose.is-done .st { color: var(--accent); }
.tl-empty { color: var(--text-3); padding: 16px 0; }
@media (max-width: 480px) {
  .dose { grid-template-columns: 30px 1fr; }
  .dose-side { grid-column: 2; flex-direction: row; align-items: baseline; gap: 10px; text-align: left; }
}

.disclaim { margin-top: 18px; font-size: 13px; color: var(--text-3); line-height: 1.6; border-top: 1px solid var(--border); padding-top: 12px; }

/* 기타(선택) 표 */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data th { font-size: 12.5px; color: var(--text-3); font-weight: 700; background: var(--surface-2); }
table.data tr:last-child td { border-bottom: 0; }
table.data td { font-variant-numeric: tabular-nums; }

.section { margin-top: 28px; }
.section-title { font-size: 17px; font-weight: 750; margin: 0 0 10px; letter-spacing: -0.02em; }
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.related-card { display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); text-decoration: none; color: var(--text); }
.related-card b { display: block; font-size: 15px; }
.related-card span { font-size: 13px; color: var(--text-3); }
a.related-card:hover { border-color: var(--accent); }

/* ── content pages ── */
.crumb { font-size: 13px; color: var(--text-3); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.crumb a { color: var(--text-3); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.crumb .sep { color: var(--border-2); }
.page-head { border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 18px; }
.page-head h1 { font-size: clamp(24px, 4.6vw, 32px); line-height: 1.3; margin: 0 0 6px; letter-spacing: -0.03em; }
.page-head .lead { margin: 0; color: var(--text-2); font-size: 16px; }
.page-head .meta { margin-top: 10px; font-size: 13px; color: var(--text-3); }
.prose { max-width: 720px; }
.prose h2 { font-size: 20px; margin: 30px 0 10px; letter-spacing: -0.02em; padding-top: 4px; }
.prose h3 { font-size: 17px; margin: 22px 0 8px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose .callout { border: 1px solid var(--border); border-left: 4px solid var(--accent); background: var(--surface); border-radius: var(--r); padding: 12px 14px; margin: 16px 0; font-size: 15px; }
.prose .callout.warn { border-left-color: var(--warn); }
.prose table.data { margin: 0; }
.prose .table-wrap { margin: 8px 0 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); margin-bottom: 18px; }
.fact { padding: 12px 14px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-right: -1px; margin-bottom: -1px; }
.fact dt { font-size: 12px; color: var(--text-3); font-weight: 700; }
.fact dd { margin: 2px 0 0; font-weight: 650; font-size: 15px; }
.src { font-size: 13.5px; color: var(--text-3); border-top: 1px solid var(--border); padding-top: 12px; margin-top: 28px; }
.src ul { padding-left: 18px; margin: 6px 0 0; }

.card-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.card-list a { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); text-decoration: none; color: var(--text); }
.card-list a:hover { border-color: var(--accent); }
.card-list b { display: block; font-size: 16px; letter-spacing: -0.01em; }
.card-list .sub { display: block; font-size: 13px; color: var(--text-3); margin-top: 2px; }
.card-list p { margin: 6px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.55; }

.faq dt { font-weight: 700; margin-top: 16px; }
.faq dd { margin: 4px 0 0; color: var(--text-2); }

/* ── ads (architecture §4-1·§4-2: 래퍼에 radius/overflow 금지) ── */
.ad-wrap { margin: 28px auto 0; }
.ad-grid { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 672px; margin: 0 auto; }
.ad-grid[data-ad-layout="mixed"] { max-width: 780px; }
.ad-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; }
.ad-cell { max-width: 100%; }
.ad-row.ad-mo { display: none; }
.ad-row.ad-pc { display: flex; }
.ad-row.ad-any { display: flex; }
@media (max-width: 719px) { .ad-row.ad-pc { display: none; } .ad-row.ad-mo { display: flex; } }

/* ── footer ── */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 40px; padding: 22px 0 28px; font-size: 13.5px; color: var(--text-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-disclaim { margin: 0 0 8px; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── print: 접종표만 ── */
#printSheet { display: none; }
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  body > *:not(main), main > *:not(.wrap), .no-print, .site-header, .site-footer, .ad-wrap, .toast { display: none !important; }
  main .wrap > *:not(#vxApp), #vxApp > *:not(#printSheet) { display: none !important; }
  #printSheet { display: block !important; }
  #printSheet h2 { font-size: 16pt; margin: 0 0 4pt; }
  #printSheet p { margin: 0 0 8pt; font-size: 9.5pt; }
  #printSheet table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  #printSheet th, #printSheet td { border: 1px solid #999; padding: 3pt 5pt; text-align: left; }
  #printSheet th { background: #eee; }
  #printSheet tr { page-break-inside: avoid; }
  #printSheet .ps-note { margin-top: 8pt; }
}
