:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1d1d1b;
  --muted: #5f5f5a;
  --line: #e2e2dc;
  --accent: #1f6f5c;
  --accent-soft: #e4f1ec;
  --warn: #8a4b00;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161614;
    --surface: #20201d;
    --text: #ececE6;
    --muted: #a3a39b;
    --line: #34342f;
    --accent: #6cc4a8;
    --accent-soft: #1e332c;
    --warn: #f0b060;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  word-break: keep-all;
}
a { color: var(--accent); }
.top, main, .foot { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.top { padding-top: 20px; padding-bottom: 8px; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); }
h1 { font-size: 1.6rem; margin: 24px 0 8px; }
h2 { font-size: 1.15rem; margin: 32px 0 8px; }
.lead { color: var(--muted); margin-top: 0; }
.cards { list-style: none; padding: 0; display: grid; gap: 12px; }
.card {
  display: block; padding: 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; text-decoration: none; color: var(--text);
}
.card:hover { border-color: var(--accent); }
.card span { display: block; color: var(--muted); font-size: .92rem; }
form.calc {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px;
  display: grid; gap: 12px;
}
label { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
label small { font-weight: 400; color: var(--muted); }
input, select {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); width: 100%;
}
button {
  font: inherit; font-weight: 700; padding: 12px; border: 0; border-radius: 8px;
  background: var(--accent); color: var(--surface); cursor: pointer;
}
.result {
  margin-top: 16px; padding: 16px; border-radius: 10px; background: var(--accent-soft);
  min-height: 1em;
}
.result:empty { display: none; }
.result .big { font-size: 1.5rem; font-weight: 700; display: block; }
.result .warn { color: var(--warn); }
.foot { margin-top: 48px; padding-bottom: 32px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; }
