@charset "utf-8";

/* ==========================================================================
   過去問一覧ページ専用スタイル（行高さを狭めてスマートに凝縮）
   ========================================================================== */

/* 【位置統一】内部余白コンテナの数値を統一 */
.msb-content-card .msb-list-body {
  padding: 40px 48px;
  box-sizing: border-box;
}

/* 【位置統一】見出しの余白・位置ルールを統一 */
.msb-list-body .msb-list-main-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 20px 0; /* 上マージンを完全にゼロ化 */
  padding: 0 0 8px 0;
  border-bottom: 2px solid #3a6b73;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  text-align: left;
}

/* 各年度ごとのセクション見出し */
.msb-list-body .msb-list-year-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #475569;
  margin: 28px 0 10px 0;
  padding: 0 0 4px 0;
  border-bottom: 1px solid #cbd5e1;
  text-align: left;
}
/* 最初の年度タイトルの上余白を調整 */
.msb-list-body .msb-list-year-title:first-of-type {
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   縦一列リスト
   -------------------------------------------------------------------------- */

.msb-list-body .msb-list-group {
  display: flex;
  flex-direction: column;
  gap: 4px; 
  margin-bottom: 16px;
  width: 100%;
}

.msb-list-group .msb-list-row-link {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.msb-list-row-link .msb-list-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: #3a6b73;
  background-color: #e6f0f2;
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 14px;
  flex-shrink: 0;
  min-width: 34px;
  text-align: center;
}

.msb-list-row-link .msb-list-name {
  font-size: 1.0rem;
  font-weight: 500;
  color: #334155;
  line-height: 1.4;
  flex: 1;
  text-align: left;
}

.msb-list-row-link .msb-list-arrow {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-left: 12px;
  transition: transform 0.15s ease;
}

.msb-list-group .msb-list-row-link:hover {
  background-color: #ffffff;
  border-color: #3a6b73;
  box-shadow: 0 2px 6px rgba(58, 107, 115, 0.04);
  transform: translateY(-0.5px);
}

.msb-list-group .msb-list-row-link:hover .msb-list-arrow {
  color: #3a6b73;
  transform: translateX(2px);
}

.msb-list-group div.msb-list-row-link {
  background-color: #f1f5f9;
  border-color: #e2e8f0;
  cursor: not-allowed;
  pointer-events: none;
}

div.msb-list-row-link .msb-list-num {
  color: #94a3b8;
  background-color: #e2e8f0;
}
div.msb-list-row-link .msb-list-name {
  color: #94a3b8;
  font-weight: 400;
}
div.msb-list-row-link .msb-list-arrow {
  display: none;
}

/* --------------------------------------------------------------------------
   スマートフォン向けの画面幅調整（画面幅768px以下の時）
   -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
  /* スマホ時も科目選択ページ側と余白を完全に統一 */
  .msb-content-card .msb-list-body {
    padding: 24px 12px;
  }
  .msb-list-body .msb-list-main-title {
    font-size: 1.3rem;
    margin-bottom: 16px;
  }
  .msb-list-body .msb-list-year-title {
    font-size: 1.0rem;
    margin: 22px 0 8px 0;
  }
  .msb-list-group .msb-list-row-link {
    padding: 6px 12px;
  }
  .msb-list-row-link .msb-list-name {
    font-size: 0.9rem;
  }
  .msb-list-row-link .msb-list-num {
    font-size: 0.8rem;
    margin-right: 10px;
    min-width: 30px;
  }
}