:root {
  --bg: #f6f7f5;
  --card: #ffffff;
  --text: #1f2a26;
  --muted: #5c6b65;
  --line: #dde3df;
  --accent: #2f6f5e;
  --accent-soft: #e4f0eb;
  --result: #fff8e6;
  --result-line: #f0d999;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a18;
    --card: #1e2522;
    --text: #e6ece9;
    --muted: #9fb0a9;
    --line: #34403b;
    --accent: #6cc3a6;
    --accent-soft: #233630;
    --result: #2d2a1e;
    --result-line: #5c5130;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  line-height: 1.75;
  font-size: 16px;
}
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; height: 56px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; font-size: 17px; }
main { padding-top: 16px; padding-bottom: 40px; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
h1 { font-size: 26px; line-height: 1.4; margin: 8px 0 4px; }
h2 { font-size: 20px; margin: 32px 0 8px; padding-left: 10px; border-left: 4px solid var(--accent); }
h3 { font-size: 17px; margin: 20px 0 4px; }
.lead { color: var(--muted); margin-top: 0; }

.tool {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button {
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
  padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 14px; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.panel[hidden] { display: none; }
.field { margin-bottom: 14px; }
.field > label, .field > .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
input[type="number"], input[type="date"], input[type="time"], input[type="text"], select, textarea {
  font: inherit; font-size: 17px; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; max-width: 100%;
}
input[type="number"] { width: 10em; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { width: 100%; min-height: 180px; resize: vertical; line-height: 1.6; }
.choices { display: flex; gap: 14px; flex-wrap: wrap; font-size: 15px; }
.choices label { display: flex; gap: 4px; align-items: center; cursor: pointer; }
.btn {
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px;
}
.btn.sub { background: var(--accent-soft); color: var(--accent); }
.result {
  background: var(--result); border: 1px solid var(--result-line); border-radius: 10px;
  padding: 14px 16px; margin-top: 16px;
}
.result .big { font-size: 28px; font-weight: 700; line-height: 1.3; word-break: break-all; }
.result .sub-line { color: var(--muted); font-size: 14px; }
.result table { margin-top: 8px; }
.note { font-size: 13px; color: var(--muted); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
th { background: var(--accent-soft); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.content p, .content li { font-size: 15.5px; }
.faq dt { font-weight: 700; margin-top: 12px; }
.faq dd { margin: 4px 0 0; }
.ad-slot { margin: 24px 0; min-height: 0; }

.tool-grid { list-style: none; padding: 0; margin: 8px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tool-grid a {
  display: block; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; text-decoration: none; color: var(--text);
}
.tool-grid a:hover { border-color: var(--accent); }
.tool-grid strong { display: block; color: var(--accent); }
.tool-grid span { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; }
.hero { padding: 12px 0 4px; }
.hero h1 { font-size: 24px; }

.site-footer { border-top: 1px solid var(--line); background: var(--card); padding: 20px 0; font-size: 13px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; }
.site-footer a { color: var(--muted); }
.copy { margin: 0; }
@media (max-width: 480px) {
  h1 { font-size: 22px; }
  .tool { padding: 16px; }
  .result .big { font-size: 24px; }
}
