/* ==========================================
   0. 上部テキストエリア（タイトル・案内・注意書き）
   ========================================== */
   .schedule-intro,
   .tab-container {
     color: #1e293b;
     font-family: inherit;
     margin-bottom: 3em;
   }
   
   h2.titlebox002 {
    background-color: #21272b;
    color: #fff;
    padding: 0.5em 0;
    font-weight: 600;
    position: relative;
    letter-spacing: 0.1em;
    margin-bottom:1em;
    font-size: 1.6em;
    text-align: center;
  }

  h2.titlebox002:after {
    background: repeating-linear-gradient(-45deg, #21272b, #21272b 5px, #ffffff 0, #ffffff 10px);
    content: "";
    height: 5px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
  }
   .tab-container > h3,
   .tab-container h3 {
     font-size: 1.05rem;
     color: #0f172a;
     font-weight: 700;
     margin-bottom: 8px;
     line-height: 1.5;
   }
   
   .tab-container h3 span,
   .tab-container h3 .bold {
     color: #ea580c;
     background: #ffedd5;
     padding: 2px 6px;
     border-radius: 4px;
     margin: 0 2px;
   }
   
   p.chuki001 {
     font-size: 0.85rem;
     color: #64748b;
     margin-bottom: 20px;
     line-height: 1.5;
     padding-left: 4px;
   }
   
   /* ==========================================
      1. インデックス部分（学年タブ）
      ========================================== */
   .tab-list {
     display: flex;
     flex-wrap: wrap;
     gap: 6px;
     margin-bottom: 0;
     /* padding-left: 4px; */
   }
   
   .tab-item {
     flex: 1;
     min-width: 50px;
     padding: 12px 6px;
     background: linear-gradient(to bottom, #f8fafc, #e2e8f0);
     border: 2px solid #334155;
     border-bottom: none;
     cursor: pointer;
     font-weight: 800;
     font-size: 0.9rem;
     text-align: center;
     border-top-left-radius: 10px;
     border-top-right-radius: 10px;
     transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
     color: #000;
   }
   
   .tab-item:hover {
     background: linear-gradient(to bottom, #ffffff, #cbd5e1);
     transform: translateY(-2px);
     /* color: #0f172a; */
   }
   
   .tab-item.active {
     /* color: #ffffff; */
     border: 3px solid #334155;
     border-bottom: none !important;
     position: relative;
     z-index: 10;
     padding-top: 14px; 
     padding-bottom: 14px;
     transform: translateY(0);
     /* box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.12); */
   }
   
   /* ==========================================
      各タブおよび背景の色定義（中学生＝寒色系、小学生＝暖色系になるように配置）
      ========================================== */
   
   /* 1番目：中3 */
   .tab-item:nth-child(1).active { background: #c3a8ff; border-color: #334155; }
   .tab-pane:nth-child(1).active { background-color: #c3a8ff; } 
   
   /* 2番目：中2 */
   .tab-item:nth-child(2).active { background: #68d3e5; border-color: #334155; }
   .tab-pane:nth-child(2).active { background-color: #68d3e5; } 
   
   /* 3番目：中1*/
   .tab-item:nth-child(3).active { background: #66cdab; border-color: #334155; }
   .tab-pane:nth-child(3).active { background-color: #66cdab; } 
   
   /* 4番目：小6 */
   .tab-item:nth-child(4).active { background: #ffd962; color: #1e293b; border-color: #334155; }
   .tab-pane:nth-child(4).active { background-color: #ffd962; } 
   
   /* 5番目：小5 */
   .tab-item:nth-child(5).active { background: #fbab74; border-color: #334155; }
   .tab-pane:nth-child(5).active { background-color: #fbab74; } 
   
   /* 6番目：小4*/
   .tab-item:nth-child(6).active { background: #fb7979; border-color: #334155; }
   .tab-pane:nth-child(6).active { background-color: #fb7979; }
   
   /* ==========================================
     ボックス本体
      ========================================== */
   .tab-pane {
     display: none;
     padding: 24px 20px;
     border: 3px solid #334155;
     border-radius: 0 0 16px 16px; 
     box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
     margin-top: -3px; 
     position: relative;
     z-index: 1; 
   }
   
   .tab-pane.active {
     display: block;
   }
   
   /* ==========================================
      大見出し・エリア見出しの視認性＆目立ち度アップ
      ========================================== */
   .tab-pane > h3 {
     font-size: 1.35rem;
     color: #0f172a;
     font-weight: 800;
     margin-bottom: 24px;
     padding-bottom: 12px;
     border-bottom: 3px dashed rgba(255, 255, 255, 0.35);
     text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
   }
   
   .area-group h4 {
     font-size: 1.05rem;
     color: #0f172a;
     font-weight: 800;
     margin-bottom: 14px;
     padding-left: 12px;
     border-left: 8px solid #0f172a;
     background: rgba(255, 255, 255, 0.35);
     padding-top: 6px;
     padding-bottom: 6px;
     border-radius: 0 6px 6px 0;
   }
   
   .area-group {
     margin-bottom: 28px;
   }
   .area-group:last-child {
     margin-bottom: 0;
   }
   
   .school-list {
     list-style: none;
     padding: 0;
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
     gap: 10px;
   }

/* 校舎ボタン */
.school-list li a {
  display: block;
  padding: 14px 10px;
  background: #ffffff;
  border: 2px solid #0f172a;           /* 周囲の枠線（通常時） */
  border-bottom: 6px solid #0f172a;     /* 下部の厚み */
  text-align: center;
  color: #0f172a;
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: none;
  transition: all 0.1s ease;
}

/* ホバー時：下部の厚みが小さくなり、下へ3px沈む */
.school-list li a:hover {
  background: #ffffff;
  color: #0f172a;
  border: 2px solid #0f172a;         
  border-bottom: 4px solid #0f172a;  
  transform: translateY(2px);         
  box-shadow: none;
}

/* クリック時：下部の厚みだけが消えて、周囲の枠線はそのまま残る */
.school-list li a:active {
  background: #ffffff;
  border: 2px solid #0f172a;
  /* border-bottom: 0px solid transparent; */
  transform: translateY(6px); 
  box-shadow: none;
}

   /* ==========================================
      3. PC・タブレット表示用（768px以上）
      ========================================== */
   @media (min-width: 768px) {
   .schedule-intro,
   .tab-container {
     margin-bottom:100px;
   }
     h2.titlebox002 {
       font-size: 1.6rem;
       padding: 16px 22px;
     }
   
     .tab-list {
       gap: 8px;
     }
   
     .tab-item {
       min-width: 85px;
       padding: 14px 12px;
       font-size: 1rem;
       border-top-left-radius: 12px;
       border-top-right-radius: 12px;
     }
   
     .tab-pane {
       padding: 30px;
       border-radius: 0 0 20px 20px;
     }
   
     .tab-pane > h3 {
       font-size: 1.4rem;
       margin-bottom: 24px;
     }
   
     .area-group {
       margin-bottom: 30px;
     }
   
     .school-list {
       grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
       gap: 12px;
     }
   
     .school-list li a {
       font-size: 1rem;
       padding: 16px 12px;
     }
   }