:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #1c1f24;
  --muted: #5b6472;
  --line: #dfe3e8;
  --accent: #1a6dd8;
  --accent-ink: #ffffff;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "맑은 고딕", sans-serif;
}
@media screen and (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --card: #1c2026;
    --text: #eef1f5;
    --muted: #a7b0bd;
    --line: #333944;
    --accent: #5b9cf0;
    --accent-ink: #0c1116;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}
.top, main, .site-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}
.top h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }
.top .lead { color: var(--muted); margin: 0; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card h2 { margin-top: 0; font-size: 1.1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.field input, .field select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
}
.field .help { color: var(--muted); font-size: 0.85rem; margin: 0.35rem 0 0; }
.field-group {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 0.75rem 1rem 0.25rem;
  margin-bottom: 1rem;
}
.field-group legend { padding: 0 0.4rem; font-weight: 600; }
button[type="submit"] {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}
button[type="submit"]:hover { filter: brightness(1.08); }
.result-total { font-size: 1.15rem; }
.result-total strong { font-size: 1.6rem; color: var(--accent); }
.result-table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; }
.result-table th, .result-table td {
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.related ul { padding-left: 1.1rem; }
.related .disclosure { color: var(--muted); font-size: 0.85rem; }
.error { color: #c0392b; font-weight: 600; }
.site-footer { color: var(--muted); font-size: 0.85rem; }
.site-footer a { color: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
