/* 読みやすさ優先: 大きめの文字・高いコントラスト・押しやすい大きさ（44px 以上） */
:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --text: #1b1b1b;
  --muted: #555b57;
  --line: #d9dbd6;
  --control-line: #878e89;
  --accent: #0f5132;
  --accent-ink: #ffffff;
  --accent-soft: #e3efe8;
  --incident: #8a3b12;
  --incident-soft: #fbeee6;
  --update: #1d4f91;
  --update-soft: #e7eef9;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121412; --surface: #1c1f1d; --text: #ecefec; --muted: #a9b0ab; --line: #343a36; --control-line: #6e766f;
    --accent: #6fcf97; --accent-ink: #0b1a11; --accent-soft: #1f3327;
    --incident: #f0a070; --incident-soft: #3a2418; --update: #8fb7f0; --update-soft: #1a2a40;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 18px/1.75 system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
a { color: var(--accent); text-underline-offset: 3px; }
#app { max-width: 720px; margin: 0 auto; padding: 0 16px; }
main { padding: 8px 0 24px; outline: none; }
h1 { font-size: 1.45rem; line-height: 1.4; margin: 20px 0 12px; }
h2 { font-size: 1.2rem; line-height: 1.45; margin: 4px 0 6px; }
h3 { font-size: 1.05rem; margin: 16px 0 6px; }
p { margin: 8px 0; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 6px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; letter-spacing: .02em; }
.beta { font-size: .7rem; font-weight: 600; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
select { font: inherit; font-size: 1rem; padding: 8px 10px; min-height: 44px; border-radius: 10px; border: 1px solid var(--control-line); background: var(--surface); color: var(--text); }

.count { font-size: .9rem; font-weight: 600; margin-left: 10px; color: var(--muted); }
.progress { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 8px 0 16px; }
.progress p { margin: 6px 0 0; font-size: .95rem; color: var(--muted); }
.bar { height: 12px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.is-done { opacity: .75; }
.tag { font-size: .85rem; font-weight: 700; margin: 0 0 4px; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.incident .tag { color: var(--incident); }
.update .tag { color: var(--update); }
.new { font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: var(--incident-soft); color: var(--incident); }
.meta { color: var(--muted); font-size: .95rem; margin: 2px 0 8px; }
.quotes { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.qlabel { font-size: .85rem; color: var(--muted); margin: 0 0 4px; font-weight: 600; }
blockquote { margin: 6px 0; padding: 0 0 0 12px; border-inline-start: 3px solid var(--line); }
.steps, .advice { padding-left: 1.4em; margin: 6px 0; }
.steps li, .advice li { margin: 4px 0; }
.links { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
a.ext::after { content: " ↗"; font-size: .85em; }
.fine { font-size: .88rem; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--control-line); }
.btn.small { min-height: 40px; padding: 6px 14px; }
.btn.big { width: 100%; margin: 16px 0 8px; font-size: 1.1rem; min-height: 56px; }
.btn:focus-visible, .chip:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--update); outline-offset: 2px; }

.empty { padding-top: 8px; }
.sub { color: var(--muted); font-size: .95rem; }
.done-all { background: var(--accent-soft); padding: 14px; border-radius: var(--radius); }
details.finished { margin-top: 18px; }
summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: 12px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "開く"; margin-left: auto; flex: none; font-size: .85rem; font-weight: 700; color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: 0 10px; }
details[open] > summary::after { content: "閉じる"; }

fieldset.chips { border: 0; padding: 0; margin: 18px 0; display: flex; flex-wrap: wrap; gap: 10px; }
fieldset.chips legend { font-weight: 700; margin-bottom: 8px; width: 100%; }
.chip { font: inherit; min-height: 48px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--control-line); background: var(--surface); color: var(--text); cursor: pointer; }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.chip.on::before { content: "✓ "; }

details.emergency { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px; margin: 10px 0; }
details.emergency[open] { padding-bottom: 14px; }
.contacts { display: grid; gap: 10px; margin-top: 10px; }
.contact { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface); }
.cname { font-weight: 700; margin: 0; }
.tel { display: inline-block; font-size: 1.6rem; font-weight: 800; margin: 2px 0; text-decoration: none; }

footer.fine { border-top: 1px solid var(--line); padding: 14px 0; margin-top: 12px; }
nav.bottom { position: fixed; inset: auto 0 0 0; display: grid; grid-template-columns: 1fr .8fr 1.3fr 1.1fr; padding-inline: max(0px, calc(50vw - 360px)); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
nav.bottom a { white-space: nowrap; text-align: center; padding: 12px 4px; min-height: 56px; font-size: .9rem; font-weight: 700; color: var(--muted); text-decoration: none; }
nav.bottom a.on { color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.error { padding: 40px 0; }
.addform { display: grid; gap: 8px; margin-top: 12px; }
.addform label { font-weight: 700; }
.addform input { font: inherit; min-height: 52px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--control-line); background: var(--surface); color: var(--text); }
dl.facts { margin: 8px 0; display: grid; gap: 2px; }
dl.facts dt { font-weight: 700; font-size: .92rem; color: var(--muted); margin-top: 6px; }
dl.facts dd { margin: 0; }
details.quotes-more { margin: 10px 0; }
details.quotes-more summary { color: var(--accent); }
q { quotes: "「" "」"; }

.who { display: flex; align-items: center; gap: 8px; }
.who label { font-size: .9rem; color: var(--muted); font-weight: 700; }
.lead { font-size: 1.05rem; font-weight: 700; }
.row { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.coverage { margin: 6px 0 14px; }
.coverage p { margin: 4px 0; font-size: .92rem; color: var(--muted); }
.notice { background: var(--update-soft); color: var(--text); border-radius: 12px; padding: 12px 14px; }
.card .btn { margin-top: 6px; }
details.more { margin: 8px 0 4px; border-top: 1px dashed var(--line); padding-top: 4px; }
details.more summary { color: var(--accent); }
.block { display: block; margin-top: 4px; }
.card.habit .tag { color: var(--muted); }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(68px + env(safe-area-inset-bottom)); max-width: 688px; margin: 0 auto; display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--text); color: var(--bg); z-index: 20; }
.toast.show { display: flex; }
.toast .btn.ghost { color: var(--bg); border-color: var(--bg); }
p.tel { margin: 2px 0; }

.brandbox { display: flex; flex-direction: column; }
.sub-brand { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.unofficial { margin: 0; font-size: .75rem; color: var(--muted); }
