:root {
  --bg: #f6f7f9; --card: #fff; --text: #1d2430; --muted: #5f6b7a; --line: #d9dee5;
  --accent: #1f4e79; --accent-text: #fff; --ok: #1e7a46; --warn: #a85d00; --ng: #b42318;
  --ok-bg: #e6f4ec; --warn-bg: #fff3e0; --ng-bg: #fdecea;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181e; --card: #1d232b; --text: #e8ecf1; --muted: #9aa6b4; --line: #333c47;
    --accent: #6ea8dc; --accent-text: #0d1117; --ok: #6fcf97; --warn: #f2b45a; --ng: #f28b82;
    --ok-bg: #1b3326; --warn-bg: #3a2c14; --ng-bg: #3d1f1d;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.7; font-size: 16px;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", "Meiryo UI", sans-serif;
}
main { max-width: 760px; margin: 0 auto; padding: 16px 16px 48px; }
h1 { font-size: 1.4rem; margin: 8px 0 12px; line-height: 1.4; }
h2 { font-size: 1.1rem; margin: 28px 0 8px; }
a { color: var(--accent); }
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line);
}
.bar .brand { font-weight: 700; text-decoration: none; color: var(--text); }
.bar nav { display: flex; align-items: center; gap: 16px; }
.inline { display: inline; margin: 0; }
.muted { color: var(--muted); font-size: .9rem; }
.crumb { margin: 0; font-size: .9rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin: 0 0 12px;
}
.card p { margin: 6px 0; }
.cards { list-style: none; padding: 0; margin: 0; }
.cards .title { font-size: 1.1rem; font-weight: 700; margin-right: 8px; }
.card-link { display: block; position: relative; color: var(--text); text-decoration: none; padding-right: 40px; }
.card-link .title { color: var(--accent); }
.card-link:hover, .card-link:focus-visible { border-color: var(--accent); }
.card-link .chevron { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--muted); }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
label.check { font-weight: 400; display: flex; align-items: center; gap: 8px; }
input[type=email], input[type=text], input[type=password], input:not([type]), input[type=file], textarea {
  width: 100%; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); color: var(--text);
}
input[type=checkbox] { width: 20px; height: 20px; }
select { width: 100%; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); }
button, .button {
  display: inline-block; min-height: 44px; padding: 10px 18px; margin: 12px 0 0;
  font-size: 1rem; font-weight: 600; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: var(--accent-text); text-decoration: none; text-align: center;
}
form.card button { width: 100%; }
.button.secondary, button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.button.small, button.small { min-height: 36px; padding: 6px 12px; font-size: .9rem; margin-top: 4px; }
button.link { background: none; color: var(--accent); padding: 0; min-height: 0; margin: 0; font-weight: 400; }
.downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.downloads .button { margin: 0; }
.downloads .label { min-width: 6.5em; font-weight: 600; }
.tag { display: inline-block; font-size: .8rem; padding: 1px 8px; border-radius: 999px; margin-left: 4px; white-space: nowrap; }
.tag.ok { color: var(--ok); background: var(--ok-bg); }
.tag.warn { color: var(--warn); background: var(--warn-bg); }
.tag.ng { color: var(--ng); background: var(--ng-bg); }
.findings { list-style: none; padding: 0; margin: 8px 0; }
.findings li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.findings .tag { margin: 0 6px 0 0; }
.notice { background: var(--ok-bg); color: var(--ok); padding: 10px 12px; border-radius: 8px; }
.error { background: var(--ng-bg); color: var(--ng); padding: 10px 12px; border-radius: 8px; }
.dev { border-style: dashed; }
button:disabled { opacity: .75; cursor: progress; }
.busy-status { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
details summary { cursor: pointer; color: var(--accent); }
.small-note { font-size: .8rem; margin: 4px 0; }
a.quiet { color: var(--muted); }
button.danger { background: var(--ng); color: #fff; }
form.assign { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
form.assign select { width: auto; max-width: 100%; padding: 6px 8px; font-size: .9rem; }
form.assign button { margin: 0; }
td { white-space: normal; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 8px 0 16px; overflow-x: auto; overflow-y: hidden; }
.tabs .tab { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap;
  border-bottom: 3px solid transparent; }
.tabs .tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.kind { display: block; font-size: .8rem; color: var(--muted); }
.field-head { font-weight: 600; margin: 16px 0 4px; }
label.sub { font-weight: 400; font-size: .9rem; margin: 8px 0 4px; }
.sources { list-style: none; padding: 0; margin: 4px 0; font-size: .85rem; color: var(--muted); }
.sources .label { display: inline-block; min-width: 8.5em; font-weight: 600; }
