/* ============================================================
   共通設定：Bootstrapや元CSSの余計な余白をリセット
   ============================================================ */
.officer table.compact-list-table,
.officer table.compact-list-table tbody,
.officer table.compact-list-table tr,
.officer table.compact-list-table td {
  /* PC・スマホ共通で一旦余計な「高さ」の制限を壊す */
  min-height: 0 !important;
  height: auto !important;
}

/*役員　名簿---------------------------------*/
/* ============================================================
   役員　名簿　PC版：画面幅768px以上
   ============================================================ */
@media screen and (min-width: 768px) {
.officer table.compact-list-table thead th {
    border-top: 3px solid #008080 !important; /* ← ご希望の線をここに追加 */
    border-bottom: 1px solid #ccc !important;
    background-color: #fcfcfc !important;
    color: #333 !important;
    padding: 15px 10px !important;
    font-size: 16px !important;
    text-align: left !important; /* 左寄せを維持 */
  }

  /* 列ごとの幅指定（合計100%になるように調整） */
  /* 1列目：所属 */
  .officer table.compact-list-table th:nth-child(1),
  .officer table.compact-list-table td:nth-child(1) {
    width: 35% !important; 
  }
  /* 2列目：氏名（短くてOK） */
  .officer table.compact-list-table th:nth-child(2),
  .officer table.compact-list-table td:nth-child(2) {
    width: 15% !important;
  }
  /* 3列目：県役職 */
  .officer table.compact-list-table th:nth-child(3),
  .officer table.compact-list-table td:nth-child(3) {
    width: 20% !important;
  }
  /* 4列目：委員会 */
  .officer table.compact-list-table th:nth-child(4),
  .officer table.compact-list-table td:nth-child(4) {
    width: 30% !important;
  }

  .officer table.compact-list-table thead {
    display: table-header-group !important;
  }
  .officer table.compact-list-table tbody tr {
    display: table-row !important;
  }
  .officer table.compact-list-table tbody tr td {
    display: table-cell !important;
    padding: 12px 10px 12px 15px !important; /* 右パディングを少し追加 */
    border-bottom: 1px solid #eee !important;
    vertical-align: middle !important;
    line-height: 1.5 !important;
    text-align: left !important;
    word-break: break-all !important; /* 長い英数字などでの突き抜け防止 */
  }

  .officer table.compact-list-table tbody tr td::before {
    display: none !important;
  }
}

/* ============================================================
   役員　名簿　スマホ版：画面幅767px以下
   ============================================================ */
@media screen and (max-width: 767px) {
  /* テーブル構造を解除して「縦並びのブロック」にする */
  .officer table.compact-list-table,
  .officer table.compact-list-table tbody,
  .officer table.compact-list-table tr,
  .officer table.compact-list-table td {
    display: block !important;
    width: 100% !important;
    border-collapse: separate !important; /* 1行目のcollapse設定を解毒 */
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
  }

  /* ヘッダーは非表示 */
  .officer table.compact-list-table thead {
    display: none !important;
  }

  /* 1人分（1行）のブロック：ここで区切り線と上下余白を管理 */
  .officer table.compact-list-table tbody tr {
    padding: 10px 0 !important; /* ブロックの上下余白 */
    border-bottom: 1px solid #eee !important; /* PCと同じ薄い線 */
    margin-bottom: 5px !important;
  }

  /* 各項目の行間：所属、氏名などの行 */
  .officer table.compact-list-table tbody tr td {
    display: flex !important;
    padding: 2px 0 2px 15px !important; /* 上下2px、左15px */
    align-items: baseline !important;
    line-height: 1.1 !important; /* 行間を詰め気味に固定 */
  }

  /* スマホ時のみ「所属：」などのラベルを表示 */
  .officer table.compact-list-table tbody tr td::before {
    display: inline-block !important;
    flex-shrink: 0 !important;
    width: 80px !important;
    font-size: 11px !important;
    font-weight: bold !important;
    color: #999 !important;
  }

  /* 各項目のラベル名（ここをページごとに書き換えれば使い回せます） */
  .officer table.compact-list-table tbody tr td:nth-of-type(1)::before { content: "所属："; }
  .officer table.compact-list-table tbody tr td:nth-of-type(2)::before { content: "氏名："; }
  .officer table.compact-list-table tbody tr td:nth-of-type(3)::before { content: "県役職："; }
  .officer table.compact-list-table tbody tr td:nth-of-type(4)::before { content: "委員会："; }

  .officer table.compact-list-table tbody tr td {
    font-size: 13.5px !important;
  }
}
/*専門委員会委員　名簿---------------------------------*/
/* ============================================================
   共通設定：高さや余計な干渉のリセット
   ============================================================ */
table.committee-table,
table.committee-table tbody,
table.committee-table tr,
table.committee-table td {
  min-height: 0 !important;
  height: auto !important;
  word-break: break-all !important;
  font-size:9pt;
}

/* ============================================================
   基本設定：th(役職) と td(名前) を自動判別
   ============================================================ */
.committee-wrapper {
  display: flex;
  flex-wrap: wrap; /* PCでは横並び、入り切らないと折り返し */
  gap: 30px 1.3%;  /* 表同士の縦・横の間隔 */
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
}

.committee-table {
  border-collapse: collapse !important;
  background: #fff !important;
  border: 1px solid #ccc !important;
  table-layout: fixed !important;
}

/* 1. 委員会名（一番上のヘッダー） */
.committee-table thead th {
  background-color: #008080 !important;
  color: #ffffff !important;
  padding: 12px 5px !important;
  font-size: 17px !important;
  border: 1px solid #008080 !important;
  text-align: center !important;
}

/* 2. 役職名（tbodyの中にあるth） */
.committee-table tbody th {
  background-color: #f4fafa !important; /* ほんのり薄い緑 */
  color: #008080 !important;
  font-weight: bold !important;
  font-size: 13px !important;
  text-align: left !important;
  padding: 12px 15px 4px !important; /* 下の文字と近づける */
  border-left: 1px solid #ccc !important;
  border-right: 1px solid #ccc !important;
  border-bottom: none !important; /* 下の名前と一体感を出す */
}

/* 3. 名前（td） */
.committee-table td {
  background-color: #ffffff !important;
  color: #333 !important;
  padding: 2px 15px 12px !important; /* 上の役職と近づける */
  font-size: 13px !important;
  text-align: left !important;
  border-left: 1px solid #ccc !important;
  border-right: 1px solid #ccc !important;
  border-bottom: 1px solid #eee !important;
  line-height: 1.5 !important;
}

/* ============================================================
   表示設定：PC4列 / スマホ1列
   ============================================================ */

/* PC：画面が広いときは4つ横に並べる */
@media screen and (min-width: 1025px) {
  .committee-table { 
    width: 24% !important; 
  }
}

/* タブレット：2列並び */
@media screen and (max-width: 1024px) and (min-width: 768px) {
  .committee-table { 
    width: 49% !important; 
  }
}

/* スマホ：縦1列に流す */
@media screen and (max-width: 767px) {
  .committee-wrapper { 
    display: block !important; 
  }
  .committee-table {
    width: 100% !important;
    margin-bottom: 40px !important; /* 委員会ごとの余白 */
  }
}

/**/
/**/
/**/
/* ============================================================
   派遣名簿設定：haken-list-table（1列目：氏名 / 2列目：所属）
   ============================================================ */

/* 共通リセット */
.officer table.haken-list-table,
.officer table.haken-list-table tbody,
.officer table.haken-list-table tr,
.officer table.haken-list-table td {
  min-height: 0 !important;
  height: auto !important;
}

/* ============================================================
   PC版：画面幅768px以上
   ============================================================ */
@media screen and (min-width: 768px) {
  .officer table.haken-list-table thead th {
    border-top: 3px solid #008080 !important;
    border-bottom: 1px solid #ccc !important;
    background-color: #fcfcfc !important;
    color: #333 !important;
    padding: 15px 10px !important;
    font-size: 16px !important;
    text-align: left !important;
  }

  /* --- 列の幅変更（ご指定に合わせて逆転させました） --- */
  /* 1列目：氏名（15% に縮小） */
  .officer table.haken-list-table th:nth-child(1),
  .officer table.haken-list-table td:nth-child(1) {
    width: 15% !important; 
  }
  /* 2列目：所属（35% に拡大） */
  .officer table.haken-list-table th:nth-child(2),
  .officer table.haken-list-table td:nth-child(2) {
    width: 35% !important;
  }
  /* 3列目：役職（20%） */
  .officer table.haken-list-table th:nth-child(3),
  .officer table.haken-list-table td:nth-child(3) {
    width: 20% !important;
  }
  /* 4列目：派遣先・内容（30%） */
  .officer table.haken-list-table th:nth-child(4),
  .officer table.haken-list-table td:nth-child(4) {
    width: 30% !important;
  }

  .officer table.haken-list-table thead { display: table-header-group !important; }
  .officer table.haken-list-table tbody tr { display: table-row !important; }
  .officer table.haken-list-table tbody tr td {
    display: table-cell !important;
    padding: 12px 10px 12px 15px !important;
    border-bottom: 1px solid #eee !important;
    vertical-align: middle !important;
    line-height: 1.5 !important;
    text-align: left !important;
    word-break: break-all !important;
  }
}

/* ============================================================
   スマホ版：画面幅767px以下
   ============================================================ */
@media screen and (max-width: 767px) {
  .officer table.haken-list-table,
  .officer table.haken-list-table tbody,
  .officer table.haken-list-table tr,
  .officer table.haken-list-table td {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
  }

  .officer table.haken-list-table thead { display: none !important; }

  .officer table.haken-list-table tbody tr {
    padding: 10px 0 !important;
    border-bottom: 1px solid #eee !important;
    margin-bottom: 5px !important;
  }

  .officer table.haken-list-table tbody tr td {
    display: flex !important;
    padding: 2px 0 2px 15px !important;
    align-items: baseline !important;
    line-height: 1.1 !important;
    font-size: 13.5px !important;
  }

  /* スマホ用ラベル（ここも順番を逆にしました） */
  .officer table.haken-list-table tbody tr td::before {
    display: inline-block !important;
    flex-shrink: 0 !important;
    width: 80px !important;
    font-size: 11px !important;
    font-weight: bold !important;
    color: #999 !important;
  }

  .officer table.haken-list-table tbody tr td:nth-of-type(1)::before { content: "氏名："; }
  .officer table.haken-list-table tbody tr td:nth-of-type(2)::before { content: "所属："; }
  .officer table.haken-list-table tbody tr td:nth-of-type(3)::before { content: "役職："; }
  .officer table.haken-list-table tbody tr td:nth-of-type(4)::before { content: "派遣先："; }
}
