:root {
  --ok: #1d7a4f;
  --ok-soft: #e3f3ea;
  --warn: #9a6200;
  --warn-soft: #fbf0d9;
  --ng: #9b3434;
  --ng-soft: #f8e4e4;
  --c-proc: #9aa3ab;
  --c-wait: #c9b98a;
  --c-restr: #d98c5f;
  --c-pay: #3c8f75;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ok: #7fd1a6; --ok-soft: #1c3027;
    --warn: #e6b866; --warn-soft: #362c18;
    --ng: #e89a9a; --ng-soft: #3a2222;
    --c-proc: #6b747c; --c-wait: #8f8461; --c-restr: #b5714b; --c-pay: #5fb397;
  }
}

.toplink { color: var(--muted); font-size: 13px; text-decoration: none; }
.toplink:hover { color: var(--accent); }

.tool { max-width: 720px; margin: 0 auto; padding: 28px 16px 96px; }
.badge {
  display: inline-block; margin: 0 0 10px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; color: var(--warn); background: var(--warn-soft);
}
.tool h1 { font-size: 24px; line-height: 1.45; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 24px; font-size: 15px; }

.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 18px 16px; margin: 0 0 14px;
}
.step h2 { font-size: 16px; margin: 0 0 10px; line-height: 1.55; display: flex; gap: 10px; align-items: baseline; }
.num {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  display: inline-grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--accent); color: var(--surface);
}
.hint { color: var(--muted); font-size: 13px; line-height: 1.7; margin: -2px 0 12px; }
.inline { display: flex; align-items: center; gap: 8px; }
.inline input {
  font: inherit; font-size: 18px; width: 180px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text);
}
.inline input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices.stack { flex-direction: column; }
.choices label { cursor: pointer; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span {
  display: block; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); font-size: 14.5px; line-height: 1.6;
}
.choices input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.choices input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

.more { margin: 8px 0 24px; }
.more > summary {
  cursor: pointer; font-weight: 600; color: var(--accent); padding: 10px 0; list-style: none;
}
.more > summary::before { content: "＋ "; }
.more[open] > summary::before { content: "－ "; }
.more .step h2 { font-size: 15px; }

.result { margin-top: 8px; }
.placeholder {
  color: var(--muted); text-align: center; padding: 28px 16px;
  border: 1px dashed var(--line); border-radius: 12px;
}
.r-block { margin: 0 0 22px; }
.r-step { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 6px; }
.headline { font-size: 20px; font-weight: 700; line-height: 1.5; margin: 0 0 6px; padding: 12px 16px; border-radius: 10px; }
.headline.yes { color: var(--ok); background: var(--ok-soft); }
.headline.warn { color: var(--warn); background: var(--warn-soft); }
.headline.no { color: var(--ng); background: var(--ng-soft); }
.kubun { margin: 0; font-size: 14.5px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.sc-label { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--accent); }
.big { font-size: 28px; font-weight: 700; margin: 0; line-height: 1.3; font-variant-numeric: tabular-nums; }
.big.muted { color: var(--muted); font-size: 20px; }
.small { font-size: 13.5px; color: var(--muted); margin: 4px 0 0; }
.small strong { color: var(--text); }

.tl { margin-top: 14px; }
.tl-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--line); }
.seg { display: block; height: 100%; }
.seg.proc, .tl-legend i.proc { background: var(--c-proc); }
.seg.wait, .tl-legend i.wait { background: var(--c-wait); }
.seg.restr, .tl-legend i.restr { background: var(--c-restr); }
.seg.pay, .tl-legend i.pay { background: var(--c-pay); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.tl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.tl-note { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.6; }
.tl-note strong { color: var(--warn); }

.steps { margin: 0 0 12px; padding-left: 1.4em; }
.steps li { margin: 6px 0; line-height: 1.7; }
.notes { display: grid; gap: 10px; }
.note { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; }
.note p { margin: 0; font-size: 14px; line-height: 1.75; }
.note-t { font-weight: 700; margin-bottom: 2px !important; }

.basis { border-top: 1px solid var(--line); padding-top: 12px; margin: 8px 0 18px; }
.basis > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 6px 0; }
.basis h3 { font-size: 14px; margin: 16px 0 6px; }
.basis ul { margin: 0 0 6px; padding-left: 1.3em; font-size: 13.5px; line-height: 1.75; }
.basis a { color: var(--accent); }
.disclaimer { font-size: 12.5px; color: var(--muted); }

@media (max-width: 520px) {
  .tool h1 { font-size: 21px; }
  .big { font-size: 24px; }
  .inline input { width: 140px; }
}
.profile-bar { font-size: 12px; color: var(--muted); margin: 0 0 10px; line-height: 1.6; }
.linkbtn { font: inherit; font-size: 12px; background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0 0 0 6px; }
