/* ページ全体の本文幅 */
.allpage {
    max-width: 1000px;
    margin: 0 auto;
    padding: 6% 40px 60px;
}

/* スマートフォン */
@media (max-width: 768px) {
    .allpage {
        padding: 20px;
    }
}

/* リンク */
.text-link {
    color: #0f4c81;
    text-decoration: underline;
}

.text-link:hover {
    color: #00448d;
}

/* 注意事項ボックス */
.notice-box {
    background: #eef8fc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

/* ==========================================
   classes.css
   基本レイアウト
========================================== */

.grade-section{
  margin-bottom:70px;
}

.grade-title{
  margin-bottom:28px;
  padding-left:14px;
  border-left:8px solid #0b3962;
  color:#0b3962;
  font-size:2rem;
  font-weight:700;
}

/* ==========================================
   ページ飛ぶやつ
========================================== */
.grade-nav{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:15px;
    margin:30px 0 40px;
}

.grade-nav a{
    background:#0f4c81;
    color:#fff;
    text-decoration:none;
    padding:10px 22px;
    border-radius:999px;
    font-weight:600;
    transition:.2s;
}

.grade-nav a:hover{
    background:#1b6aa8;
}

html{
    scroll-behavior:smooth;
}

.grade-section{
    scroll-margin-top:100px;
}

/* ==========================================
   カード
========================================== */

.class-card{
  margin-bottom:22px;
  background:#fff;
  border:1px solid #d9d9d9;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 3px 10px rgba(0,0,0,.08);
  transition:.25s;
}

.class-card:hover{
  box-shadow:0 8px 18px rgba(0,0,0,.12);
}

/* ==========================================
   details
========================================== */

.class-card details{
  width:100%;
}

.class-card summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:20px 24px;
  transition:.2s;
}

.class-card summary:hover{
  background:#f7fbff;
}

.class-card summary::-webkit-details-marker{
  display:none;
}

/* ==========================================
   左側
========================================== */

.summary-left{
  display:flex;
  align-items:flex-start;
  gap:20px;
  flex:1;
}

.summary-info{
  flex:1;
  min-width:0;
}

.class-meta{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:6px;
}

.class-id{
  font-weight:700;
  color:#0f4c81;
  font-size:1.05rem;
}

.class-place{
  color:#666;
  font-size:.95rem;
  font-weight: 600;
}

.class-title{
  margin:0 0 10px;
  font-size:1.35rem;
  color:#222;
  font-weight: bold;
}

.class-categories{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.class-category{
    display:inline-block;
    padding:4px 12px;
    background:#e8f2ff;
    color:#0f4c81;
    border-radius:999px;
    font-size:.82rem;
    font-weight:600;
    line-height:1.4;
}

.summary-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:8px;
}

.class-category.drama{
  background:#f7e7ff;
  color:#7a2da6;
}

/* ==========================================
   右側
========================================== */

.summary-open{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#0f4c81;
}

.arrow{
  display:inline-block;
  font-size:1rem;
  font-weight:bold;
  transition:.25s;
}

details[open] .arrow{
  transform:scaleY(-1);
}

/* ==========================================
   展開部分
========================================== */

.details-content{
  padding:22px 24px 26px;
  border-top:1px solid #ececec;
  background:#fcfcfc;
}

.details-content p{
  margin:0;
  line-height:1.9;
  color:#333;
}

/* ==========================================
   アイコン
========================================== */

.class-icon{
    display:block;
    width:130px;
    height:130px;
    max-width:100%;
    margin:0 auto;
    border-radius:12px;
    object-fit:contain;
    background:#f5f5f5;
    box-shadow:0 4px 10px rgba(0,0,0,.12);
}

/* 画像が横長・縦長でも崩れない */
.class-icon img{
  width:100%;
  height:100%;
}

/* ==========================================
   スマホ
========================================== */

@media (max-width:768px){

  .grade-title{
    font-size:1.6rem;
    margin-bottom:20px;
  }

  .class-card summary{
    padding:18px;
    gap:16px;
  }

  .summary-left{
    gap:14px;
    align-items:flex-start;
  }

  .class-icon{
    width:90px;
    height:90px;
  }

  .class-title{
    font-size:1.1rem;
    line-height:1.4;
    margin-bottom:8px;
  }

  .class-meta{
    gap:8px;
    flex-wrap:wrap;
  }

  .class-id{
    font-size:1rem;
  }

  .class-place{
    font-size:.9rem;
  }

  .class-category{
    font-size:.8rem;
    padding:4px 10px;
  }

  .summary-open{
  margin-left:auto;
}

  .details-content{
    padding:18px;
  }

  .details-content p{
    font-size:.95rem;
    line-height:1.8;
  }

}

/* ==========================================
   小型スマホ
========================================== */

@media (max-width:480px){

  .grade-section{
    margin-bottom:50px;
  }

  .grade-title{
    font-size:1.35rem;
    border-left-width:6px;
    padding-left:10px;
  }

  .class-card summary{
    flex-direction:column;
    align-items:stretch;
  }

  .summary-left{
    width:100%;
  }

  .summary-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

  .class-icon{
    width:80px;
    height:80px;
  }

  .class-title{
    font-size:1rem;
  }

}

/* ==========================================
   アニメーション
========================================== */

details > .details-content{
  animation:fadeOpen .25s ease;
}

@keyframes fadeOpen{

  from{
    opacity:0;
    transform:translateY(-4px);
  }

  to{
    opacity:1;
    transform:translateY(0);
  }

}