/* ============================================================
   加盟校名簿：レイアウト完全固定（差し替え用）
   ============================================================ */

.school-list-wrapper {
  margin-bottom: 50px;
  /* --- 横スクロール設定を追加 --- */
  overflow-x: auto !important; /* はみ出た場合にスクロールを表示 */
  -webkit-overflow-scrolling: touch; /* iOSでの操作感を滑らかにする */
}

.school-list-wrapper .school-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important; /* 幅を固定 */
  border: none !important;
  margin-top: 10px;
}

/* --- ヘッダー（th） --- */
.school-list-wrapper .school-table thead th {
  border-top: 3px solid #008080 !important;
  border-bottom: 2px solid #ccc !important;
  background-color: #fcfcfc !important;
  padding: 6px 4px !important;
  font-size: 13px !important;
  color: #333 !important;
  text-align: center !important;
}

/* --- データセル（td）共通設定 --- */
.school-list-wrapper .school-table td {
  border-bottom: 1px solid #eee !important;
  border-left: 1px dotted #e0e0e0 !important;
  border-right: 1px dotted #e0e0e0 !important;
  padding: 4px 10px !important;
  font-size: 13px !important;
  color: #444 !important;
  vertical-align: middle !important; /* 上下中央 */
  line-height: 1.3 !important;
}

/* 両端の線を消す */
.school-list-wrapper .school-table td:first-child { border-left: none !important; }
.school-list-wrapper .school-table td:last-child { border-right: none !important; }

/* ============================================================
   ★重要：配置と幅の指定（クラス名による絶対固定）
   ============================================================ */

/* 1. 配置の強制（連結行でもズレないようクラス名を使用） */
.school-list-wrapper .school-table .c, 
.school-list-wrapper .school-table td:nth-child(1),
.school-list-wrapper .school-table td:nth-child(2) { text-align: center !important; }

.school-list-wrapper .school-table .l { text-align: left !important; padding-left: 15px !important; }
.school-list-wrapper .school-table .r { text-align: right !important; padding-right: 10px !important; }

/* 2. 列幅の強制（クラス名が付いていることを前提に固定） */
.school-list-wrapper .school-table .col-no    { width: 35px !important; }
.school-list-wrapper .school-table .col-type  { width: 40px !important; }
.school-list-wrapper .school-table .col-school { width: auto !important; }
.school-list-wrapper .school-table .col-count  { width: 65px !important; }
.school-list-wrapper .school-table .col-name   { width: 140px !important; }

/* 連結(rowspan)セルの補正 */
.school-list-wrapper .school-table td[rowspan] {
  background-color: #fff !important;
  text-align: center !important; /* Noの連結は中央 */
}

/* ============================================================
   合計行（tfoot）
   ============================================================ */
.school-list-wrapper .school-table tfoot tr.total-row td {
  border-top: 3px double #333 !important;
  border-bottom: 1px solid #333 !important;
  padding: 8px 10px !important;
  font-weight: bold !important;
  text-align: right !important; /* 全て右寄せ */
}

/* ============================================================
   スマホ対応：カード型表示
   ============================================================ */
@media screen and (max-width: 767px) {
  /* 外枠を「横スクロールする窓」に変える */
  .school-list-wrapper {
    overflow-x: auto !important;
    display: block !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch;
  }

  /* テーブルを画面幅より大きくして、強制的に横にはみ出させる */
  .school-list-wrapper .school-table {
    display: table !important; 
    min-width: 850px !important; /* スマホ画面より広く設定 */
    table-layout: fixed !important;
  }

  /* セルの縦並びを解除して、PCと同じ表の形に戻す */
  .school-list-wrapper .school-table thead { display: table-header-group !important; }
  .school-list-wrapper .school-table tr { display: table-row !important; }
  .school-list-wrapper .school-table td { 
    display: table-cell !important; 
    white-space: nowrap !important; /* 改行させず横長を維持 */
  }

  /* 以前のスマホ用設定（data-labelなど）が表示されないように消す */
  .school-list-wrapper .school-table td::before { display: none !important; }
}
/* ============================================================
   加盟校名簿：列幅・配置の最終固定（均等割り解消版）
   ============================================================ */

/* 1. 表の基本ルール：幅指定を「絶対」にする */
.school-list-wrapper .school-table {
  table-layout: fixed !important; 
  width: 100% !important;
}

/* 2. 各列の幅を「px」で厳格に固定 */
/* No (1列目) */
.school-list-wrapper .school-table th:nth-child(1),
.school-list-wrapper .school-table td:nth-child(1) { 
  width: 35px !important; 
  text-align: center !important; 
}

/* 種別 (2列目) */
.school-list-wrapper .school-table th:nth-child(2),
.school-list-wrapper .school-table td:nth-child(2) { 
  width: 45px !important; 
  text-align: center !important; 
}

/* 生徒数 (4列目) */
.school-list-wrapper .school-table th:nth-child(4),
.school-list-wrapper .school-table td:nth-child(4) { 
  width: 70px !important; 
  text-align: right !important; 
  padding-right: 15px !important;
}

/* 会長(5列目) と 事務局担当(6列目) ★同じ幅に固定 */
.school-list-wrapper .school-table th:nth-child(5),
.school-list-wrapper .school-table td:nth-child(5),
.school-list-wrapper .school-table th:nth-child(6),
.school-list-wrapper .school-table td:nth-child(6) { 
  width: 150px !important; 
  text-align: left !important; 
  padding-left: 12px !important;
  white-space: nowrap !important;
}

/* 学校名 (3列目) ★残りの幅をすべてここに割り当てる */
.school-list-wrapper .school-table th:nth-child(3),
.school-list-wrapper .school-table td:nth-child(3) { 
  width: auto !important; 
  text-align: left !important; 
  padding-left: 15px !important;
}

/* 3. 連結(rowspan)がある場合の文字位置補正 */
.school-list-wrapper .school-table td[rowspan] {
  vertical-align: middle !important;
}