/* ========= 第1章 41節-1 専用（最小・安全版） ========= */

/* スコープ＆トークン */
.page-law-proc, .page-law-proc * { box-sizing: border-box; }
.page-law-proc{
  --container: min(1120px, calc(100% - 32px));
  --page-bg: #f5f7fb;
  --card-bg: #fff;
  --ink: #0b1f3a;
  --accent: #1f2a44;
  --head-bg: #f1f6ff;
  --border: #e5e7eb;
  --border-strong: #d5d9e2;   /* 縦罫の視認性UP */
  --hint: #6b7280;            /* 補足色 */
  --ok: #0ea5a8;              /* 可バッジ色 */
  --ng: #ef4444;              /* 不可バッジ色 */
}
body.page-law-proc { background: var(--page-bg); color: var(--ink); }
.page-law-proc .breadcrumbs,
.page-law-proc .main-container { max-width: var(--container); margin-inline: auto; }

/* 見出し（統一） */
.page-law-proc .section-title{
  margin: 18px 0 14px;
  font: 700 clamp(22px,2.1vw,28px)/1.25 system-ui,"Noto Sans JP",sans-serif;
  color: var(--ink);
  border-left: 5px solid var(--accent);
  padding-left: 12px;
  background: transparent;
  box-shadow: none;
}

/* ====== テーブル（#transport-and-transfer 内だけ） ====== */
#transport-and-transfer .table-wrap{
  position: relative;
  background: transparent;
  padding: 2px 0;
  margin: 0;
  border: 0;
  box-shadow: none;
  overflow-x: auto;          /* SP横スクロール */
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y pan-x; /* 縦横パンを許可（スクロール固まり対策） */
  overscroll-behavior-x: contain;
}

#transport-and-transfer .procedures-table{
  width: 100%;
  min-width: 780px;          /* 3列なのでやや狭めでOK */
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.7;
}

#transport-and-transfer .procedures-table caption{
  caption-side: top;
  text-align: left;
  font-weight: 700;
  margin: 6px 0 12px;
}
#transport-and-transfer .procedures-table caption small{
  display:block; font-weight:400; color: var(--hint); margin-top: 4px;
}

/* セル基礎（sticky の透け防止） */
#transport-and-transfer .procedures-table th,
#transport-and-transfer .procedures-table td{
  background: #fff;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  word-break: auto-phrase;
}

/* ヘッダ固定 */
#transport-and-transfer .procedures-table thead th{
  position: sticky; top: 0; z-index: 40;
  background: var(--head-bg);
  border-bottom: 1px solid #d8e2ff;
  font-weight: 700;
}

/* 1列目（手段）固定＋右側の縦罫を疑似要素で */
#transport-and-transfer .procedures-table thead th:first-child,
#transport-and-transfer .procedures-table tbody th.cell-proc,
#transport-and-transfer .procedures-table tbody th[scope="row"]{
  position: sticky; left: 0; z-index: 45;
  background: #fff;
  background-clip: padding-box;
  isolation: isolate;
}
#transport-and-transfer .procedures-table thead th:first-child{ top: 0; z-index: 50; background: var(--head-bg); }
#transport-and-transfer .procedures-table thead th:first-child::after,
#transport-and-transfer .procedures-table tbody th.cell-proc::after,
#transport-and-transfer .procedures-table tbody th[scope="row"]::after{
  content: "";
  position: absolute; top: 0; right: -1px; bottom: 0; width: 1px;
  background: var(--border-strong);
  pointer-events: none;
}

/* 左列ラベルの見た目 */
#transport-and-transfer .cell-proc{
  background:#f9fbff; color:#0b2b66; font-weight:700; text-align:center;
}

/* 列の縦罫（1列目以外の境界） */
#transport-and-transfer .procedures-table thead th + th,
#transport-and-transfer .procedures-table tbody td + td{
  border-left: 1px solid var(--border-strong);
}


/* 6列の幅（例） */
#transport-and-transfer .procedures-table thead th:nth-child(1){ width: 70px; }   /* 手段 */
#transport-and-transfer .procedures-table thead th:nth-child(2){ width: 140px; }  /* 例 */
#transport-and-transfer .procedures-table thead th:nth-child(3){ width: 160px; }  /* 規定 */
#transport-and-transfer .procedures-table thead th:nth-child(4){ width: auto; }   /* 同乗/関与 */
#transport-and-transfer .procedures-table thead th:nth-child(5){ width: 120px; }  /* 消火設備 */
#transport-and-transfer .procedures-table thead th:nth-child(6){ width: 100px; }  /* 標識 */



/* 行ストライプ */
#transport-and-transfer .procedures-table tbody tr:nth-child(even) td{
  background: #fcfdff;
}

/* SP微調整 */
@media (max-width: 768px){
  #transport-and-transfer .procedures-table{ min-width: 760px; }
  #transport-and-transfer .procedures-table th,
  #transport-and-transfer .procedures-table td{ padding: 12px 10px; font-size: .93rem; }
  #transport-and-transfer .procedures-table tbody td + td{ border-left: 1px solid #cfd6e3; }
}

/* 注釈：読みやすいミニリスト */
#transport-and-transfer .mini-list{
  margin: 0; padding-left: 1.1em; list-style: disc; line-height: 1.7;
}
#transport-and-transfer .mini-list li{ margin: 4px 0; }


/* 補助文字 */
.muted { color: var(--hint); font-size: .9em; }

/* ===== 注意・補足（丙の範囲） ===== */
.page-law-proc .note-block.callout-warn{
  background: #fff; border: 1px solid #ffd28a; border-left: 5px solid #f7a02f;
  border-radius: 10px; padding: 14px 16px 12px; margin: 18px 0 12px;
}
.page-law-proc .note-block.callout-warn h3{
  margin: 0 0 8px; font-size: clamp(18px,1.9vw,20px); line-height: 1.35;
}
.page-law-proc .note-block .hint{ color: var(--hint); margin-top: 8px; }

/* 可／不可の“バッジ化” */
.note-block .pair{
  display: grid; gap: 10px; align-items: start;
  grid-template-columns: 1fr;           /* SP：1列 */
}
@media (min-width: 720px){
  .note-block .pair{ grid-template-columns: 1fr 1fr; }  /* PC：左右2列 */
}
.badge-list{ display:flex; flex-wrap:wrap; gap:8px 10px; margin:6px 0 0; padding:0; list-style:none; }
.badge{ display:inline-block; padding:6px 10px; border-radius:999px; font-weight:600; }
.badge.ok{ background:#ecfeff; color:var(--ok); border:1px solid #a5f3fc; }
.badge.ng{ background:#fee2e2; color:var(--ng); border:1px solid #fecaca; }

.note-box{
  border:1px solid #dce3ef; border-radius:14px; padding:16px 18px; background:#fff;
}
.note-box h3{
  margin:0 0 .5rem; font-size:1.05rem; font-weight:700; color:#0f2b4f;
}
.note-list{ list-style:none; margin:.25rem 0 0; padding:0; counter-reset: note; }
.note-list > li{ position:relative; padding-left:2.2em; margin:.6rem 0; }
.note-list > li::before{
  counter-increment: note;
  content:"※" counter(note) " ";
  position:absolute; left:0; top:.1rem; font-weight:700; color:#0f2b4f;
}
.note-items{ margin:.25rem 0 0; line-height:1.7; }
.sub-note{ margin:.35rem 0 0; color:#435067; font-size:.94rem; }
.note-box u{ text-underline-offset:2px; }
.note-box em{ font-style:normal; font-weight:700; }
@media (max-width:640px){
  .note-box{ padding:14px }
  .note-list > li{ padding-left:2em }
}


/* ===== 頻出ポイント・ひっかけ注意（オレンジ） ===== */
.page-law-proc .exam-notes{
  background: #FFF8E8;
  border: 2px dashed #F1C073;
  border-radius: 12px;
  box-shadow: none;
  padding: 18px 18px 16px;
  margin: 20px 0 18px;
}
.page-law-proc .exam-notes > h3{
  margin: 0 0 12px;
  font-size: clamp(18px,1.9vw,20px);
  font-weight: 700;
  color: #2B2B2B;
  border: 0; padding: 0;
}
.page-law-proc .exam-notes ul.compact{
  list-style: disc;
  margin: 0;
  padding: 0 0 0 1.2em;
}
.page-law-proc .exam-notes ul.compact li{
  margin: 8px 0;
  line-height: 1.7;
}
.page-law-proc .exam-notes ul.compact li::before{ content: none; }

/* 表示崩れ防止 */
.page-law-proc .main-container,
.page-law-proc .site-main,
.page-law-proc .summary-section{ overflow: visible !important; }

/* iOS/Safariの自動拡大を禁止（このページだけ） */
.page-law-proc { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* テーブル内の文字サイズを固定 */
.page-law-proc .procedures-table { font-size: 1rem; line-height: 1.6; }
@media (max-width: 768px){
  .page-law-proc .procedures-table th,
  .page-law-proc .procedures-table td{ font-size: .95rem; }
  .page-law-proc .procedures-table td,
  .page-law-proc .procedures-table th{
    word-break: break-word; overflow-wrap: anywhere;
  }
}

/* ── 修正①：「指定数量未満」行（運搬2段目）の左罫線を復活 ── */
#transport-and-transfer .procedures-table tbody tr.subrow td:first-child {
  /* この行の最初のセル＝実質5列目に相当。左境界を明示追加 */
  border-left: 1px solid var(--border-strong);
}

/* ── 修正②：ヘッダ行との列境界の一貫性（thead側も明示） ── */
#transport-and-transfer .procedures-table thead th + th {
  border-left: 1px solid var(--border-strong);
}

/* ── おまけ（よりカチッと）：2段目の上罫線を控えめに ── */
#transport-and-transfer .procedures-table tbody tr.subrow td {
  border-top-color: #edf1f7; /* お好みで */
}

/* ── 修正③：頻出ポイントの箇条書きを“整うリスト”に ── */
.page-law-proc .exam-notes ul.compact{
  list-style: disc;
  padding-left: 1.2em;   /* ハンギングインデントの土台 */
  margin: .2rem 0 0;
}
.page-law-proc .exam-notes ul.compact li{
  margin: .35rem 0;
  line-height: 1.8;
  padding-left: .2em;    /* テキストがマーカーに寄り過ぎないよう微調整 */
}
.page-law-proc .exam-notes ul.compact li::marker{
  color: #C69336;        /* 枠のダッシュ色に寄せる（視認性UP） */
  font-size: .95em;
}

/* セル内リスト（読みやすい行間＆インデント） */
#transport-and-transfer .cell-list{
  margin: 0; padding-left: 1.2em; list-style: disc; line-height: 1.7;
}
#transport-and-transfer .cell-list li{ margin: .2rem 0; }

/* テーブルの直後に来る補足ボックスとの間隔を作る */
#transport-and-transfer .table-wrap{
  margin-bottom: 16px;       /* まずは下マージン */
  padding-bottom: 8px;       /* スクロールバーと衝突しないようクッション */
}

/* 補足ボックス自体の上マージン（他の場所でも使えるように） */
.note-box{ 
  margin-top: 18px; 
}

/* 画面幅で可変（SPは少し詰める、PCは広めに） */
@media (min-width: 768px){
  #transport-and-transfer .table-wrap{ margin-bottom: 20px; padding-bottom: 10px; }
  .note-box{ margin-top: 22px; }
}


/* ===== 1) 余白トークン（このページ専用スコープ・後で全ページに入れる） ===== */
.page-law-proc{
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
}
.page-law-proc .section-title{ margin: var(--space-5) 0 var(--space-4); }
#transport-and-transfer .table-wrap{ margin-bottom: var(--space-5); }
.note-box{ margin-top: var(--space-5); }
.page-law-proc .exam-notes{ margin: var(--space-6) 0 var(--space-5); }

/* ===== 2) フォーカス可視化（このページ専用） ===== */
.page-law-proc a,
.page-law-proc button,
.page-law-proc [tabindex]:not([tabindex="-1"]) { outline: none; }
.page-law-proc :focus-visible{
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 6px;
}

/* ===== 3) 印刷最適化（このページ専用） ===== */
@media print{
  .page-law-proc .site-header,
  .page-law-proc .breadcrumbs,
  .page-law-proc .nav-links{ display: none !important; }
  .page-law-proc{ background: #fff; color: #000; }
  .page-law-proc .procedures-table th,
  .page-law-proc .procedures-table td{ border-color: #999; }
}




