/* gwanbu.com — 관부가세 계산기. 모바일 우선, 기기 설정(다크모드) 자동 대응. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f7f9;
  --surface-2: #eceff3;
  --text: #1a1d21;
  --muted: #5b6470;
  --border: #d8dde3;
  --accent: #0b5cad;
  --accent-text: #ffffff;
  --pass-bg: #e5f4e9;
  --pass-text: #14632e;
  --warn-bg: #fdf3d8;
  --warn-text: #7a5410;
  --fail-bg: #fbe7e5;
  --fail-text: #9c2b1e;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #14171b;
    --surface: #1d2126;
    --surface-2: #262b31;
    --text: #e8ebee;
    --muted: #9aa4ae;
    --border: #394048;
    --accent: #4f9be0;
    --accent-text: #0c1520;
    --pass-bg: #173a22;
    --pass-text: #7fd79b;
    --warn-bg: #3d3312;
    --warn-text: #f0cd6e;
    --fail-bg: #40201c;
    --fail-text: #f19a8d;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px 48px; }
a { color: var(--accent); }
header.site { border-bottom: 1px solid var(--border); margin-bottom: 20px; }
header.site .wrap { padding-top: 14px; padding-bottom: 12px; }
.logo { font-size: 20px; font-weight: 800; color: var(--text); text-decoration: none; }
.logo small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
nav.main { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; }
nav.main a { color: var(--muted); text-decoration: none; }
nav.main a[aria-current="page"] { color: var(--text); font-weight: 700; }
h1 { font-size: 24px; line-height: 1.35; margin: 8px 0 6px; }
h2 { font-size: 19px; margin: 28px 0 8px; }
h3 { font-size: 16px; margin: 18px 0 4px; }
.lede { color: var(--muted); margin: 0 0 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.field .help { font-size: 13px; color: var(--muted); margin: 2px 0 6px; }
.field input[type="number"], .field select {
  width: 100%; padding: 10px 12px; font-size: 16px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text);
}
.field .check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 14px; margin-top: 6px; }
.field .check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }
#result { margin-top: 16px; display: none; }
#result.show { display: block; }
.verdict { border-radius: 10px; padding: 12px 14px; font-weight: 800; font-size: 18px; }
.verdict.pass { background: var(--pass-bg); color: var(--pass-text); }
.verdict.pass_declare { background: var(--warn-bg); color: var(--warn-text); }
.verdict.exceed { background: var(--fail-bg); color: var(--fail-text); }
.kv { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.kv th, .kv td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.kv th { color: var(--muted); font-weight: 600; width: 42%; }
.notes { margin: 10px 0; padding-left: 20px; font-size: 14px; }
.notes li { margin-bottom: 4px; }
.disclaimer { font-size: 13px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 12px; }
table.plain { width: 100%; border-collapse: collapse; font-size: 15px; margin: 10px 0; }
table.plain th, table.plain td { border: 1px solid var(--border); padding: 8px; text-align: left; vertical-align: top; }
table.plain th { background: var(--surface-2); }
.case { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: var(--surface); }
.case h3 { margin-top: 0; }
.case .judge { font-weight: 700; }
.faq-item { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq-item h3 { margin-top: 0; }
footer.site { border-top: 1px solid var(--border); margin-top: 36px; }
footer.site .wrap { padding-top: 14px; font-size: 13px; color: var(--muted); }
.btn-link { display: inline-block; margin-top: 6px; font-weight: 700; }
