:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #5f6368;
  --border: #e3e3de;
  --accent: #0b6e4f;
  --accent-soft: #e6f3ee;
  --warn: #8a4b00;
  --warn-soft: #fff4e5;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --surface: #1e1e1c;
    --text: #ececea;
    --muted: #a3a39e;
    --border: #33332f;
    --accent: #4fc79a;
    --accent-soft: #17352a;
    --warn: #ffb35c;
    --warn-soft: #3a2a14;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  line-height: 1.7;
}
a { color: var(--accent); }
header, main, footer { max-width: 760px; margin: 0 auto; padding: 0 16px; }
header { padding-top: 20px; padding-bottom: 8px; }
header .brand { font-weight: 700; text-decoration: none; color: var(--text); }
h1 { font-size: 1.6rem; line-height: 1.35; margin: 0.6em 0 0.3em; }
h2 { font-size: 1.2rem; margin-top: 2em; }
.lead { color: var(--muted); margin-top: 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}
.tool-list { list-style: none; padding: 0; }
.tool-list li { margin: 12px 0; }
.tool-list a { font-weight: 600; font-size: 1.05rem; }
.tool-list p { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input, select {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.result {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 20px;
}
.result .big { font-size: 1.8rem; font-weight: 700; }
.notice {
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
}
button {
  font: inherit;
  font-weight: 600;
  margin-top: 12px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--surface);
  cursor: pointer;
}
button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.result table { margin-top: 12px; }
.ad-label { font-size: 0.75rem; color: var(--muted); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { border-bottom: 1px solid var(--border); padding: 8px 6px; text-align: left; }
footer { color: var(--muted); font-size: 0.85rem; padding-top: 32px; padding-bottom: 40px; }
footer a { color: var(--muted); }
