:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #1d2327;
  --ink-2: #4b555c;
  --ink-3: #79838a;
  --line: #e2e0d8;
  --accent: #1f6f5c;
  --accent-soft: #e4f1ec;
  --warn: #9a5b00;
  --warn-soft: #fbf0dc;
  --info: #3c5a8a;
  --info-soft: #e7edf7;
  --radius: 10px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15191b; --surface: #1d2326; --ink: #e8ebec; --ink-2: #b6bec2; --ink-3: #8a9499;
    --line: #2f373b; --accent: #5cc0a3; --accent-soft: #17322b; --warn: #e0a64a; --warn-soft: #3a2c14;
    --info: #8fb0e6; --info-soft: #1d2a3d;
  }
}
:root[data-theme="dark"] {
  --bg: #15191b; --surface: #1d2326; --ink: #e8ebec; --ink-2: #b6bec2; --ink-3: #8a9499;
  --line: #2f373b; --accent: #5cc0a3; --accent-soft: #17322b; --warn: #e0a64a; --warn-soft: #3a2c14;
  --info: #8fb0e6; --info-soft: #1d2a3d;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.75; }
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 12px; }
header.site a.brand { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; }
header.site .beta { font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-left: 6px; font-weight: 400; }
header.site nav a { font-size: 14px; margin-left: 14px; color: var(--ink-2); text-decoration: none; }
main { padding: 28px 0 56px; }
h1 { font-size: 24px; line-height: 1.45; margin: 0 0 12px; }
h2 { font-size: 18px; margin: 32px 0 10px; }
h3 { font-size: 16px; margin: 20px 0 6px; }
p { margin: 0 0 12px; }
.lead { color: var(--ink-2); }
.muted { color: var(--ink-3); font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; }
.card > h3:first-child { margin-top: 0; }
.notice { background: var(--info-soft); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; color: var(--ink-2); margin: 16px 0; }
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 11px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
input[type=text], input[type=number], input[type=month], select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
label.field { display: block; margin: 14px 0 4px; font-weight: 600; font-size: 15px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 12px; cursor: pointer; font-size: 15px; }
.choices input { margin-right: 6px; }
.choices label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
ul.results { list-style: none; padding: 0; margin: 8px 0; }
ul.results li { border-bottom: 1px solid var(--line); }
ul.results li a, ul.results li button { display: block; width: 100%; text-align: left; padding: 10px 4px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
ul.results li .sub { display: block; color: var(--ink-3); font-size: 13px; }
ul.results li a:hover, ul.results li button:hover { background: var(--accent-soft); }
table.items { width: 100%; border-collapse: collapse; font-size: 15px; }
table.items td, table.items th { border-bottom: 1px solid var(--line); padding: 9px 4px; vertical-align: top; text-align: left; }
table.items th { font-size: 13px; color: var(--ink-3); font-weight: 600; }
table.items td.num { text-align: right; white-space: nowrap; }
table.items input[type=number] { width: 84px; padding: 6px 8px; text-align: right; }
.label { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 4px; padding: 1px 7px; white-space: nowrap; }
.label.ok { background: var(--accent-soft); color: var(--accent); }
.label.check { background: var(--warn-soft); color: var(--warn); }
.label.info { background: var(--info-soft); color: var(--info); }
.plain { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 15px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.questions { background: var(--surface); border: 1px dashed var(--accent); border-radius: var(--radius); padding: 14px 16px; white-space: pre-wrap; font-size: 15px; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.hidden { display: none !important; }
.x { background: none; border: 0; color: var(--ink-3); font-size: 18px; cursor: pointer; padding: 0 4px; }
.suggest { position: relative; }
.suggest ul.results { position: absolute; z-index: 5; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; max-height: 320px; overflow: auto; margin-top: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
footer.site { border-top: 1px solid var(--line); padding: 22px 0 40px; font-size: 13px; color: var(--ink-3); }
footer.site a { color: var(--ink-2); }
@media (max-width: 520px) {
  h1 { font-size: 21px; }
  header.site nav a { margin-left: 10px; }
  table.items .hide-sm { display: none; }
}
