/* ========= 第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;
}

/* ====== テーブル（#appo-and-lectures 内だけ） ====== */
#appo-and-lectures .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;
}

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

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

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

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

/* 1列目（立場）固定＋右側の縦罫を疑似要素で */
#appo-and-lectures .procedures-table thead th:first-child,
#appo-and-lectures .procedures-table tbody th.cell-proc,
#appo-and-lectures .procedures-table tbody th[scope="row"]{
  position: sticky; left: 0; z-index: 45;
  background: #fff;
  background-clip: padding-box;
  isolation: isolate;
}
#appo-and-lectures .procedures-table thead th:first-child{ top: 0; z-index: 50; background: var(--head-bg); }
#appo-and-lectures .procedures-table thead th:first-child::after,
#appo-and-lectures .procedures-table tbody th.cell-proc::after,
#appo-and-lectures .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;
}

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

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

/* 列幅（3列）— 立場 / 要件 / 講習 */
#appo-and-lectures .procedures-table thead th:nth-child(1){ width: 140px; }
#appo-and-lectures .procedures-table thead th:nth-child(2){ width: auto;  }
#appo-and-lectures .procedures-table thead th:nth-child(3){ width: 220px; }

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

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

/* 選任要件の箇条書き：読みやすいミニリスト */
#appo-and-lectures .mini-list{
  margin: 0; padding-left: 1.1em; list-style: disc; line-height: 1.7;
}
#appo-and-lectures .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; }

/* ===== 頻出ポイント（オレンジ） ===== */
.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;
  }
}



