:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #22252a;
  --muted: #5f6670;
  --border: #dcd9d0;
  --accent: #1f6f5c;
  --accent-soft: #e3f1ec;
  --warn: #9a5b00;
  --warn-soft: #fdf1dc;
  --ng: #a3352b;
  --ng-soft: #fbe6e3;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a;
    --surface: #1e2125;
    --text: #e8e9eb;
    --muted: #a0a6ae;
    --border: #353a40;
    --accent: #5cc2a6;
    --accent-soft: #1d3530;
    --warn: #f0b45a;
    --warn-soft: #3a2e1a;
    --ng: #f08a80;
    --ng-soft: #3b2220;
  }
}
:root[data-theme="dark"] {
  --bg: #15171a; --surface: #1e2125; --text: #e8e9eb; --muted: #a0a6ae; --border: #353a40;
  --accent: #5cc2a6; --accent-soft: #1d3530; --warn: #f0b45a; --warn-soft: #3a2e1a; --ng: #f08a80; --ng-soft: #3b2220;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
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.75;
  font-size: 16px;
}
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

header.site { border-bottom: 1px solid var(--border); background: var(--surface); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; }
header.site .logo { font-weight: 700; text-decoration: none; color: var(--text); font-size: 18px; }
header.site nav a { margin-left: 14px; font-size: 14px; text-decoration: none; color: var(--muted); }

main { padding: 24px 0 48px; }
h1 { font-size: 26px; line-height: 1.4; margin: 8px 0 8px; }
h2 { font-size: 20px; margin: 36px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--border); }
h3 { font-size: 17px; margin: 24px 0 8px; }
.lead { color: var(--muted); margin: 0 0 20px; }
.updated { font-size: 13px; color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}
.field { margin-bottom: 16px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
input[type="number"], input[type="date"], select {
  width: 100%;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-group label {
  font-weight: 400; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; cursor: pointer; background: var(--bg);
}
.radio-group input:checked + span { font-weight: 700; color: var(--accent); }

.result { border-radius: var(--radius); padding: 18px 20px; margin-top: 8px; }
.result.ok { background: var(--accent-soft); }
.result.warn { background: var(--warn-soft); }
.result.ng { background: var(--ng-soft); }
.result .big { font-size: 22px; font-weight: 700; line-height: 1.5; }
.result ul { margin: 8px 0 0; padding-left: 20px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.stat .k { font-size: 13px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--bg); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

.timeline { list-style: none; padding: 0; margin: 8px 0 0; }
.timeline li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.timeline .date { min-width: 96px; font-variant-numeric: tabular-nums; color: var(--muted); }
.timeline .tag { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1px 8px; white-space: nowrap; height: fit-content; }
.tag.in { background: var(--accent-soft); color: var(--accent); }
.tag.out { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tabs button {
  font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.tabs button[aria-selected="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.panel[hidden] { display: none; }

.note { font-size: 13px; color: var(--muted); }
.callout { border-left: 4px solid var(--warn); background: var(--warn-soft); padding: 10px 14px; border-radius: 6px; font-size: 14px; margin: 16px 0; }

.tool-list { display: grid; gap: 12px; padding: 0; list-style: none; }
.tool-list a {
  display: block; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px;
}
.tool-list a:hover { border-color: var(--accent); }
.tool-list .t { font-weight: 700; font-size: 17px; color: var(--accent); }
.tool-list .d { font-size: 14px; color: var(--muted); }
.badge { font-size: 11px; font-weight: 700; background: var(--warn-soft); color: var(--warn); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }

/* 広告・PR枠（審査通過後に中身を入れる） */
.ad-slot:empty { display: none; }
.pr-box { border: 1px dashed var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 20px 0; font-size: 14px; }
.pr-box .pr-label { font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 6px; margin-right: 6px; }

details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
details summary { cursor: pointer; font-weight: 600; }

footer.site { border-top: 1px solid var(--border); padding: 24px 0 40px; font-size: 13px; color: var(--muted); }
footer.site a { color: var(--muted); margin-right: 14px; }
