.schedule-year {
  margin-bottom: 2.5rem;
  padding-bottom: 0.5rem;
}


.schedule-year h3 {
  margin-bottom: 1.2rem;
  padding: 0.4rem 0.8rem;
  border-left: 4px solid #228b22;
  background: #f5f5f5;
  font-weight: bold;
}

.schedule-year:first-of-type h3 {
  margin-top: 2rem;
}

.schedule-year+.schedule-year {
  margin-top: -1rem;
}

.month-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.6rem;
}

.month-list li a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 4.5rem;
  padding: 0.45rem 0;

  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.month-list li a:hover {
  background: #f7f7f7;
  border-color: #ccc;
}

/* 戻るリンク＋アーカイブリンクの配置 */
.schedule-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}

.schedule-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* アーカイブリンク */
.archive-link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;

  padding: 0.6rem 1rem;

  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;

  text-decoration: none;
  color: #228b22;
  font-weight: bold;
}

.archive-link-button:hover {
  background: #f7f7f7;
  border-color: #ccc;
}

.archive-link-button:visited {
  color: #228b22;
}

.archive-link-button img {
  width: 20px;
  height: auto;
}

/* 戻るリンク（← 活動記録一覧に戻る） */
.back-to-index {
  display: inline-flex;  /* アイコンとテキストを横に並べて、位置をそろえる */
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;

  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;

  text-decoration: none;
  color: #228b22;
  font-weight: bold;
}

.back-to-index:hover {
  background: #f7f7f7;
  border-color: #ccc;
}

.back-to-index:visited {
  color: #228b22;
}

.back-to-index img {
  width: 20px;
  height: auto;
}

/* =========================
   スマホ表示用
   ========================= */

@media (max-width: 768px) {
  .month-list {
    justify-content: center;    /* 横に並んだ子要素を中央に寄せる */
  }

  /* スマホではブラウザの「戻るボタン」を消して「もっと見る」ボタンを右寄せにうするコード（現在未使用）
  .schedule-nav .back-to-index {
    display: none;
  }

  
  .schedule-nav {
    display: flex;
    justify-content: flex-end;
  }
*/

  /* スマホだけ表示文字を短い文言に変えて、矢印アイコンとの距離を少し詰める */

  /* font-size: 0;にすることでPC用の文言が消える */
  .back-to-index,
  .archive-link-button {
    font-size: 0;
  }

  /* PC用で指定しているgap: 0.4rem;を無効化（重要！） */
  .schedule-nav a {
    gap: 0;
  }

  /* PC用の文言のあとにスマホ用の文言を指定 */
  .back-to-index::after {
    content: "戻る";
    font-size: 1rem;
  }

  .archive-link-button::after {
    content: "進む";
    font-size: 1rem;
  }

  /* アイコンと文字の距離 */
  .schedule-nav a img {
    margin-right:6px;
  }
}