:root {
  --navy: #1d3557;
  --navy-2: #2a4a75;
  --blue: #2563a8;
  --blue-soft: #e8f0fa;
  --ink: #1f2933;
  --ink-2: #4a5563;
  --line: #d5dce6;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --paper: #fbfaf6;
  --warn: #8a4b00;
  --warn-bg: #fff4dc;
  --warn-line: #e3a73b;
  --none: #6b4fa0;
  --none-bg: #f1ecfa;
  --ok-bg: #edf6f0;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

a { color: var(--blue); }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid #f0b429;
  outline-offset: 2px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- ヘッダー ---- */
.site-head {
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.site-head .name { font-weight: 700; color: var(--navy); }
.site-head .desc { font-size: 13px; color: var(--ink-2); }

/* ---- ヒーロー（①対象業務） ---- */
.hero { padding: 22px 0 8px; }
.hero .label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 6px;
}
.hero h1 {
  font-size: clamp(24px, 4.2vw, 32px);
  line-height: 1.4;
  color: var(--navy);
  margin: 0 0 6px;
}
.hero .lead { font-size: 17px; margin: 0 0 12px; }
.hero .target { margin: 0 0 12px; font-size: 15px; color: var(--ink-2); }
.hero .target strong { color: var(--ink); }

.notice {
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
  color: #5c3400;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 14px;
  margin: 0 0 14px;
}
.notice strong { color: var(--warn); }

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.flow li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: var(--bg-soft);
  font-size: 15px;
  flex: 1 1 220px;
}
.flow li.arrow {
  flex: 0 0 auto;
  border: 0;
  background: none;
  padding: 8px 0;
  color: var(--blue);
  font-weight: 700;
  align-self: center;
}
.flow .k { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  border-radius: 6px;
  padding: 8px 16px;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
}
.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.secondary { background: #fff; color: var(--blue); }
.btn.secondary:hover { background: var(--blue-soft); color: var(--navy); }
.btn.small { font-size: 14px; padding: 4px 12px; min-height: 36px; }

/* ---- セクション共通 ---- */
.section { padding: 28px 0; border-top: 1px solid var(--line); }
.section h2 {
  font-size: 22px;
  color: var(--navy);
  margin: 0 0 12px;
  line-height: 1.45;
}
.section h2 .num {
  display: inline-block;
  min-width: 1.6em;
  color: var(--blue);
}
.section h3 { font-size: 17px; margin: 18px 0 6px; color: var(--navy); }
.section p { margin: 0 0 10px; }
.section ul { margin: 0 0 10px; padding-left: 1.3em; }
.section li { margin-bottom: 4px; }
.muted { color: var(--ink-2); font-size: 14px; }

/* ---- ②デモ ---- */
#demo { padding-top: 18px; scroll-margin-top: 8px; }
.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 20px;
  align-items: start;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}
.panel-head .tag {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  border-radius: 4px;
  padding: 1px 8px;
}
.panel-head .title { font-weight: 700; }
.panel-body { padding: 14px; }

.panel.input { background: var(--paper); }
.panel.input .panel-head { background: #efece3; }
.panel.input .tag { background: #6b6455; }

.panel.output { border-color: #9db8db; }
.panel.output .panel-head { background: var(--blue-soft); }
.panel.output .tag { background: var(--blue); }

@media (min-width: 900px) and (min-height: 820px) {
  .panel.input.sticky { position: sticky; top: 12px; }
}

.mail {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 15px;
}
.mail .meta {
  font-size: 13px;
  color: var(--ink-2);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.mail p { margin: 0 0 8px; }
.src {
  border-radius: 3px;
  transition: background-color .2s;
}
.src.is-hl {
  background: #ffe28a;
  box-shadow: 0 0 0 2px #ffe28a;
}
.sample-note { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }

/* タブ */
.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 2px solid var(--blue);
  padding: 10px 10px 0;
  margin: 0;
}
.tab {
  font: inherit;
  font-size: 15px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--bg-soft);
  color: var(--ink-2);
  padding: 8px 12px;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  min-height: 44px;
  flex: 1 1 auto;
}
.tab .n { font-size: 12px; display: block; line-height: 1.2; }
.tab[aria-selected="true"] {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  font-weight: 700;
}
.tabpanel { padding: 14px; }
.tabpanel[hidden] { display: none; }
.tabpanel h3 { margin-top: 0; font-size: 17px; color: var(--navy); }

/* 状態バッジ（色＋文字で識別） */
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  border-radius: 4px;
  padding: 0 6px;
  margin-right: 4px;
  vertical-align: 1px;
  white-space: nowrap;
}
.badge.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
.badge.warn::before { content: "▲ "; }
.badge.none { background: var(--none-bg); color: var(--none); border: 1px solid #b9a5dd; }
.badge.ok { background: var(--ok-bg); color: #24613a; border: 1px solid #9fcfb0; }
.badge.info { background: var(--blue-soft); color: var(--navy); border: 1px solid #9db8db; }

.is-warn {
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-line);
}

/* 項目カード（表の代わり：狭い画面でも切れない） */
.item-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.item-card .item-title {
  background: var(--bg-soft);
  padding: 8px 12px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.kv { margin: 0; }
.kv-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 4px 12px;
  padding: 8px 12px;
  border-bottom: 1px solid #e8ecf1;
  align-items: start;
}
.kv-row:last-child { border-bottom: 0; }
.kv-row.head {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  background: #fafbfc;
  padding-top: 4px;
  padding-bottom: 4px;
}
.kv dt { font-weight: 700; font-size: 14px; color: var(--ink-2); }
.kv dd { margin: 0; }
.kv .v { white-space: nowrap; }
.mail p[aria-hidden] { line-height: .8; }
.kv .from { font-size: 14px; color: var(--ink-2); }
.ref-btn {
  font: inherit;
  font-size: 13px;
  text-align: left;
  background: #fff;
  border: 1px dashed #9aa5b4;
  border-radius: 4px;
  padding: 1px 6px;
  cursor: pointer;
  color: var(--ink);
}
.ref-btn:hover, .ref-btn[aria-pressed="true"] { background: #fff3c4; border-color: #c9a227; }

@media (max-width: 640px) {
  .kv-row { grid-template-columns: minmax(0, 1fr); }
  .kv-row.head { display: none; }
  .kv .from::before { content: "元の記載："; font-weight: 700; }
  .kv .from.empty { display: none; }
}

/* コピー可能な文面 */
.copy-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.copy-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  padding: 6px 10px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.copy-bar .t { font-weight: 700; font-size: 14px; }
.copy-status { font-size: 13px; color: #24613a; min-height: 1em; }
.copy-status.err { color: var(--warn); }
.copy-text {
  margin: 0;
  padding: 12px 14px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.8;
  background: #fff;
  user-select: text;
}
.ph { background: #eef1f5; border-radius: 3px; padding: 0 2px; }

.callout {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 15px;
  margin: 0 0 12px;
  background: var(--bg-soft);
}
.callout.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout ul { padding-left: 1.2em; margin: 4px 0 0; }

/* 報告書 */
.report {
  border: 1px solid #b8c4d4;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.report .report-title {
  text-align: center;
  font-weight: 700;
  padding: 8px;
  background: var(--bg-soft);
  border-bottom: 1px solid #b8c4d4;
  letter-spacing: .1em;
}
.report table { width: 100%; border-collapse: collapse; }
.report th, .report td {
  border-bottom: 1px solid #e1e6ed;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 15px;
}
.report th { width: 8.5em; background: #fafbfc; color: var(--ink-2); font-size: 14px; }
.report tr:last-child th, .report tr:last-child td { border-bottom: 0; }
.report td ul { margin: 0; padding-left: 1.2em; }
@media (max-width: 520px) {
  .report th, .report td { display: block; width: auto; }
  .report th { border-bottom: 0; padding-bottom: 0; background: none; }
}

/* 写真（説明用イラスト） */
.photo-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.photo {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
.photo svg { display: block; width: 100%; height: auto; background: #f3f6f9; }
.photo figcaption { font-size: 13px; padding: 4px 8px; line-height: 1.5; }
.illu-note { font-size: 12px; color: var(--ink-2); margin: 6px 0 0; }

.ledger { display: grid; gap: 12px; }
.ledger-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}
.ledger-item svg { width: 100%; height: auto; display: block; border-radius: 4px; background: #f3f6f9; }
.ledger-item dl { margin: 0; display: grid; grid-template-columns: 6em minmax(0, 1fr); gap: 2px 8px; font-size: 15px; }
.ledger-item dt { color: var(--ink-2); font-size: 14px; font-weight: 700; }
.ledger-item dd { margin: 0; }
@media (max-width: 520px) {
  .photo-row { gap: 6px; }
  .photo figcaption { font-size: 12px; padding: 3px 5px; }
  .ledger-item { grid-template-columns: minmax(0, 1fr); }
  .ledger-item svg { max-width: 180px; }
}

/* チェックリスト */
.checklist { list-style: none; padding: 0; margin: 0 0 12px; }
.checklist li {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 8px;
}
.checklist label {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  align-items: flex-start;
}
.checklist input { width: 20px; height: 20px; margin-top: 4px; flex: 0 0 auto; }
.checklist .why { display: block; font-size: 14px; color: var(--ink-2); }
.checklist li.is-warn { border-left-width: 4px; border-color: var(--warn-line); }

/* C: 資料 */
.doc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 10px;
  scroll-margin-top: 12px;
}
.doc > summary {
  cursor: pointer;
  padding: 10px 12px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  align-items: baseline;
  min-height: 44px;
}
.doc > summary::-webkit-details-marker { display: none; }
.doc > summary::before {
  content: "▶";
  font-size: 11px;
  color: var(--blue);
  transition: transform .15s;
}
.doc[open] > summary::before { transform: rotate(90deg); }
.doc .doc-id { font-weight: 700; color: var(--navy); }
.doc .doc-name { font-weight: 700; }
.doc .doc-meta { font-size: 13px; color: var(--ink-2); flex-basis: 100%; padding-left: 20px; }
.doc .doc-body {
  border-top: 1px solid var(--line);
  padding: 10px 14px 12px;
  background: var(--paper);
  font-size: 15px;
}
.doc .doc-body p { margin: 0 0 4px; padding: 1px 4px; }
.doc-line.is-hl { background: #ffe28a; border-radius: 3px; }
.doc.is-target { border-color: #c9a227; box-shadow: 0 0 0 2px #ffe28a; }

.q-list { display: grid; gap: 8px; padding: 10px; }
.q-btn {
  font: inherit;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  min-height: 44px;
}
.q-btn .n { font-size: 12px; color: var(--ink-2); display: block; }
.q-btn[aria-selected="true"] { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 700; }
.q-btn[aria-selected="true"] .n { color: #dbe7f6; }

.answer h4 { font-size: 15px; margin: 14px 0 6px; color: var(--navy); }
.answer h4:first-child { margin-top: 0; }
.finding {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
}
.finding p { margin: 0 0 4px; }
.cite { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cite-btn {
  font: inherit;
  font-size: 13px;
  border: 1px solid #9db8db;
  background: var(--blue-soft);
  color: var(--navy);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  min-height: 32px;
}
.cite-btn:hover { background: #d4e3f5; }
.quote { font-size: 14px; color: var(--ink-2); border-left: 3px solid #c3cfdf; padding-left: 8px; margin: 4px 0; }

/* ③〜⑤ */
.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.box h3 { margin-top: 0; }
.box ul { margin-bottom: 0; }
.trial dl { margin: 0; display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 6px 12px; }
.trial dt { font-weight: 700; color: var(--ink-2); }
.trial dd { margin: 0; }
@media (max-width: 520px) {
  .trial dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .trial dd { margin-bottom: 8px; }
}

/* ⑥ */
.contact {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.contact .provider { font-size: 18px; font-weight: 700; color: var(--navy); margin: 0; }
.contact .provider-desc { margin: 0 0 12px; color: var(--ink-2); }
.contact .reply {
  background: #fff;
  border: 1px solid #9db8db;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 0 0 12px;
  font-size: 16px;
}
.contact .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.contact .actions:empty { display: none; }

.site-foot {
  border-top: 1px solid var(--line);
  padding: 16px 0 28px;
  font-size: 14px;
  color: var(--ink-2);
}
.site-foot .other { margin: 0 0 6px; }
.site-foot .other a { margin-right: 12px; }

/* 狭い画面 */
@media (max-width: 899px) {
  .demo-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .to-output { display: flex; }
}
.to-output {
  display: none;
  justify-content: center;
  font-size: 14px;
  color: var(--blue);
  font-weight: 700;
  margin: -4px 0;
}
@media (max-width: 480px) {
  body { font-size: 15.5px; }
  .section { padding: 22px 0; }
  .section h2 { font-size: 20px; }
  .hero { padding-top: 16px; }
  .hero h1 { font-size: 23px; }
  .hero .lead { font-size: 16px; margin-bottom: 8px; }
  .hero .target { font-size: 14px; margin-bottom: 10px; }
  .notice { font-size: 13px; }
  .flow li { font-size: 14px; padding: 6px 10px; }
  .panel-body, .tabpanel { padding: 12px; }
  .tablist { padding: 8px 8px 0; }
  .tab { font-size: 14px; padding: 6px 8px; }
  .flow li.arrow { flex-basis: 100%; text-align: center; padding: 0; transform: rotate(90deg); }
}

/* トップページ */
.index-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.index-list a {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--ink);
}
.index-list a:hover { border-color: var(--blue); background: var(--blue-soft); }
.index-list .t { font-weight: 700; color: var(--navy); font-size: 17px; display: block; }
.index-list .d { font-size: 14px; color: var(--ink-2); }

.noscript { padding: 12px; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .tablist, .btn, .copy-bar button { display: none !important; }
  .tabpanel[hidden] { display: block !important; }
}

.kv-mini dt { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.kv-mini dd { margin: 0; }

/* ===== 改訂版の部品 ===== */

/* 冒頭の案内：警告色ではなく落ち着いた案内にする */
.notice {
  border: 0;
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
  color: var(--navy);
}
.notice strong { color: var(--navy); }

.benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 6px 16px;
}
.benefits li {
  position: relative;
  padding-left: 1.6em;
  font-size: 15px;
}
.benefits li::before {
  content: "";
  position: absolute;
  left: .2em;
  top: .45em;
  width: .5em;
  height: .9em;
  border: solid var(--blue);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

/* 入力パネル：PCは開いた状態、スマホは折りたたみ */
details.panel.input > summary {
  cursor: pointer;
  list-style: none;
}
details.panel.input > summary::-webkit-details-marker { display: none; }
details.panel.input > summary::after {
  content: "開く ▼";
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-2);
}
details.panel.input[open] > summary::after { content: "閉じる ▲"; }
details.panel.input:not([open]) > summary { border-bottom: 0; border-radius: var(--radius); }
@media (min-width: 900px) {
  details.panel.input > summary::after { display: none; }
  details.panel.input > summary { pointer-events: none; }
}
@media (max-width: 899px) {
  .demo-grid .panel.output { order: -1; }
}
#output { scroll-margin-top: 8px; }

.out-lead {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 10px;
}
.out-sub { font-size: 14px; color: var(--ink-2); margin: -4px 0 12px; }

/* A：照会先ごとの振り分け */
.route {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.route-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 8px 12px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.route-head .to { font-weight: 700; font-size: 16px; }
.route-head .act { font-size: 14px; color: var(--ink-2); }
.route-head .go {
  margin-left: auto;
  font: inherit;
  font-size: 13px;
  color: var(--blue);
  background: none;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  text-decoration: underline;
  min-height: 32px;
}
.route.customer .route-head { background: var(--warn-bg); }
.route.internal .route-head { background: #f1f3f6; }
.kind {
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 8px;
  color: #fff;
  background: var(--blue);
}
.route.customer .kind { background: var(--warn); }
.route.internal .kind { background: #5b6b80; }

.line-item {
  display: grid;
  grid-template-columns: 2em minmax(0, 1fr) auto auto;
  gap: 2px 12px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #e8ecf1;
  font-size: 15px;
}
.line-item:last-child { border-bottom: 0; }
.line-item .no {
  font-weight: 700;
  color: var(--ink-2);
}
.line-item .what strong { font-weight: 700; }
.line-item .what .sub { display: block; font-size: 13px; color: var(--ink-2); }
.line-item .due { font-size: 14px; white-space: nowrap; }
@media (max-width: 640px) {
  .line-item { grid-template-columns: 1.6em minmax(0, 1fr) auto; row-gap: 0; }
  .line-item .what { grid-column: 2 / 4; }
  .line-item .due { grid-column: 2; font-size: 13px; }
  .line-item .ref-btn { grid-column: 3; justify-self: end; }
  .route-head .go { margin-left: 0; }
}
@media (max-width: 520px) {
  .tablist { flex-wrap: nowrap; gap: 3px; }
  .tab { flex: 1 1 0; min-width: 0; font-size: 13px; line-height: 1.35; padding: 6px 4px; }
  .tab .n { display: none; }
}

/* 相談導線（出力の直後） */
.cta {
  border: 1px solid #9db8db;
  background: var(--blue-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 16px;
}
.cta h3 { margin: 0 0 4px; font-size: 18px; color: var(--navy); }
.cta p { margin: 0 0 10px; font-size: 15px; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cta .actions:empty { display: none; }
.cta .reply-note { font-size: 14px; color: var(--ink-2); margin: 0; }

/* 下部の「進め方と対応範囲」 */
.scope .box h3 { font-size: 16px; }
.scope .box ul { padding-left: 1.2em; font-size: 15px; }
.scope .box li { margin-bottom: 3px; }

.steps { list-style: none; counter-reset: st; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.steps li { counter-increment: st; position: relative; padding-left: 2.2em; font-size: 15px; }
.steps li::before {
  content: counter(st);
  position: absolute;
  left: 0;
  top: .15em;
  width: 1.6em;
  height: 1.6em;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.section .profile { margin: 0 0 14px; padding: 0; list-style: none; }
.profile li { margin-bottom: 6px; font-size: 15px; }
.profile:empty { display: none; }

/* B：提出用の帳票 */
.sheet {
  border: 1px solid #9aa7b8;
  border-radius: 4px;
  background: #fff;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 1px 0 #e4e8ee;
}
.sheet-title {
  text-align: center;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .3em;
  margin: 0 0 10px;
}
.sheet-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  font-size: 14px;
  margin-bottom: 10px;
}
.sheet-meta .to { font-size: 16px; font-weight: 700; border-bottom: 1px solid var(--ink); padding: 0 4px; }
.sheet table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.sheet th, .sheet td {
  border: 1px solid #b8c4d4;
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 14.5px;
}
.sheet th { background: #f3f5f8; width: 7.5em; font-weight: 700; color: var(--ink-2); }
.sheet .sec { font-weight: 700; font-size: 14px; margin: 12px 0 4px; color: var(--navy); }
.sheet ol { margin: 0; padding-left: 1.4em; }
.sheet ol li { margin-bottom: 4px; }
.sheet .measure th { width: auto; text-align: center; }
.sheet .measure td { text-align: center; }
@media (max-width: 520px) {
  .sheet { padding: 12px; }
  .sheet th, .sheet td { padding: 5px 6px; font-size: 13.5px; }
  .sheet th { width: 5.5em; }
}

.photo-ph {
  aspect-ratio: 4 / 3;
  border: 1px dashed #9aa7b8;
  border-radius: 4px;
  background: #f3f5f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--ink-2);
  font-size: 12px;
  text-align: center;
  padding: 6px;
}
.photo-ph svg { width: 28px; height: 28px; }
.ledger-sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ledger-sheet .cell { border: 1px solid #b8c4d4; border-radius: 4px; padding: 8px; font-size: 14px; }
.ledger-sheet .cell .cap { margin-top: 6px; }
.ledger-sheet .cell .cap strong { color: var(--navy); }
@media (max-width: 520px) {
  .ledger-sheet { grid-template-columns: minmax(0, 1fr); }
  .ledger-sheet .cell { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; align-items: start; }
  .ledger-sheet .cell .cap { margin-top: 0; }
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.chips li {
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
}
.chips li b { color: var(--blue); margin-right: 4px; }
.src-label { font-size: 12px; font-weight: 700; color: var(--ink-2); margin: 12px 0 4px; }
.src-label:first-child { margin-top: 0; }

/* C：回答 */
.answer-lead {
  border: 1px solid #9db8db;
  background: var(--blue-soft);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.answer-lead p { margin: 0 0 4px; }
.answer-lead ul { margin: 4px 0 6px; padding-left: 1.2em; }
.hit {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 10px;
}
.hit-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 4px; }
.hit-head .t { font-weight: 700; }
.hit-head .m { font-size: 13px; color: var(--ink-2); }
.hit p { margin: 0 0 6px; font-size: 15px; }
.hit details { margin-top: 4px; }
.hit details > summary { cursor: pointer; font-size: 14px; color: var(--blue); min-height: 32px; display: inline-flex; align-items: center; }
.cite-btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 700; }
.cite-btn.primary:hover { background: var(--navy); }
.doc .doc-body .fig { margin: 8px 0 4px; }
.doc .doc-body .fig svg { width: 100%; max-width: 360px; height: auto; display: block; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.doc .doc-body .fig figcaption { font-size: 12px; color: var(--ink-2); }
.doc .status { font-size: 12px; }

/* 担当者の写真 */
.provider-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-areas: "photo head" "photo profile";
  column-gap: 18px;
  align-items: start;
  margin-bottom: 4px;
}
.provider-photo {
  grid-area: photo;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
}
.provider-head { grid-area: head; }
.provider-head .provider-desc { margin-bottom: 8px; }
.provider-card .profile { grid-area: profile; }
.provider-card:not(:has(.provider-photo)) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "profile"; }
@media (max-width: 520px) {
  .provider-card {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas: "photo head" "profile profile";
    column-gap: 12px;
    align-items: center;
  }
  .provider-photo { width: 72px; height: 72px; }
  .provider-head .provider-desc { margin-bottom: 0; }
  .provider-card .profile { margin-top: 10px; }
}

/* 問い合わせ先アドレス */
.addr {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 15px;
}
.addr-text { font-weight: 700; user-select: all; }

/* 回答・整理へ戻るボタン */
.back-btn {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 10;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--navy);
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  cursor: pointer;
}
.back-btn[hidden] { display: none; }

/* B：試運転表（スマホでは縦並び） */
.measure-narrow { display: none; }
@media (max-width: 520px) {
  .measure-wide { display: none; }
  .measure-narrow { display: table; }
  .sheet .measure-narrow th { width: 6.5em; white-space: nowrap; }
}
