:root {
  --bg: #fdf8f3;
  --card: #ffffff;
  --text: #3d3833;
  --muted: #8a8178;
  --accent: #ff7a59;
  --accent-soft: #ffe9e2;
  --border: #eee2d7;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1a22;
    --card: #26232e;
    --text: #eee9e4;
    --muted: #a39b91;
    --accent: #ff8f73;
    --accent-soft: #3a2d33;
    --border: #37323f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

header.site {
  padding: 20px 0 8px;
}

header.site a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}

h1 {
  font-size: 26px;
  line-height: 1.3;
  margin: 8px 0 6px;
}

p.lead {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 15px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 14px 0 6px;
}

label:first-child { margin-top: 0; }

input[type="date"],
input[type="number"],
select {
  width: 100%;
  font-size: 17px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

.row { display: flex; gap: 10px; }
.row > div { flex: 1; }

.seg {
  display: flex;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 4px;
}

.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 4px;
  border-radius: 9px;
  cursor: pointer;
}

.seg button.on {
  background: var(--accent);
  color: #fff;
}

.results { display: none; }
.results.show { display: block; }

.big-result {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-bottom: 14px;
}

.big-result .num {
  font-size: 30px;
  font-weight: 800;
  color: var(--accent);
}

.big-result .sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.result-row:last-child { border-bottom: 0; }
.result-row .k { color: var(--muted); flex-shrink: 0; margin-right: 12px; }
.result-row .v { font-weight: 700; text-align: right; }

.note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}

.error {
  display: none;
  color: #d64545;
  font-size: 14px;
  margin-top: 10px;
}

.error.show { display: block; }

/* 허브 페이지 카드 목록 */
a.tool-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
}

a.tool-card:active { border-color: var(--accent); }
a.tool-card .t { font-weight: 700; font-size: 17px; }
a.tool-card .d { font-size: 14px; color: var(--muted); margin-top: 2px; }

.tool-card.soon {
  opacity: 0.55;
  pointer-events: none;
}

.tool-card.soon .t::after {
  content: " · 준비 중";
  font-size: 12px;
  color: var(--accent);
}

/* 본문 콘텐츠 */
section.content { margin-top: 32px; }
section.content h2 { font-size: 19px; margin: 28px 0 10px; }
section.content p, section.content li { font-size: 15px; }

details {
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 0;
  list-style: none;
}

details summary::before { content: "Q. "; color: var(--accent); }
details p { margin: 4px 0 14px; color: var(--muted); }

/* 예방접종 일정 리스트 */
.vx { padding: 12px 4px; border-bottom: 1px solid var(--border); }
.vx:last-child { border-bottom: 0; }
.vx .when { font-weight: 700; font-size: 15px; }
.vx .when small { font-weight: 600; font-size: 12px; color: var(--accent); }
.vx .date { font-size: 13px; color: var(--muted); margin-top: 1px; }
.vx .what { font-size: 14px; margin-top: 4px; line-height: 1.5; }
.vx.done { opacity: 0.45; }
.vx.now {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 12px;
  border-bottom: 0;
  margin: 4px 0;
}

footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
