/* 活動予定ページ専用。既存ページへの影響を避ける。 */
.schedule-content {
  max-width: 1120px;
  padding-block: 40px 64px;
}

.schedule-intro {
  text-align: center;
  font-size: 19px;
  font-weight: 700;
}

.schedule-note {
  color: #666;
  text-align: center;
  line-height: 1.8;
  font-size: 14px;
}

.schedule-month-nav {
  display: grid;
  grid-template-columns: repeat(12,1fr);
  gap: 8px;
  margin: 32px 0 20px;
}

.schedule-month-nav :is(a, span) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid #ddd;
  text-decoration: none;
  font-weight: 700;
}

.schedule-month-nav a:hover {
  background: #191919;
  color: #fff;
}

.schedule-sample-note {
  color: #777;
  font-size: 13px;
  margin-bottom: 24px;
}

.schedule-month {
  border-top: 1px solid #ddd;
  scroll-margin-top: 160px;
}

.schedule-month:last-of-type {
  border-bottom: 1px solid #ddd;
}

.schedule-month :is(summary, .month-static-heading) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.schedule-month summary::-webkit-details-marker {
  display: none;
}

.schedule-month summary::after {
  content: '+';
  font-size: 24px;
}

.schedule-month[open] summary::after {
  content: '−';
}

.schedule-month :is(summary, .month-static-heading) strong {
  font-size: 28px;
  margin-left: 12px;
}

.schedule-month[open] > summary {
  border-top: 3px solid #d3152c;
  background: #f7f6f6;
}

.month-empty-label {
  margin-left: auto;
  font-size: 13px;
  color: #666;
}

.month-content {
  padding: 0 0 12px;
}

.schedule-day {
  display: grid;
  grid-template-columns: 110px minmax(0,1fr) minmax(0,1fr);
  gap: 24px;
  padding: 20px;
  border-bottom: 1px solid #e5e5e5;
}

.schedule-day:last-child {
  border-bottom: 0;
}

.schedule-day h3 {
  margin: 0;
  font-size: 36px;
  line-height: 1.3;
}

.schedule-day h3 span {
  display: block;
  font-size: 14px;
  font-weight: 400;
  margin-top: 6px;
}

.schedule-group {
  min-width: 0;
}

.schedule-group h4 {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #222;
  font-size: 16px;
}

.schedule-group.schedule-junior h4 {
  border-color: #d3152c;
}

.schedule-group p {
  margin: 0 0 4px;
  line-height: 1.65;
  font-size: 15px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.schedule-group .schedule-grade {
  font-weight: 700;
  margin: 14px 0 6px;
}

.schedule-group h4 + .schedule-grade {
  margin-top: 0;
}

.schedule-group > p:last-child {
  margin-bottom: 0;
}

.schedule-empty {
  color: #777;
}

.schedule-end {
  margin-top: 32px;
}

.schedule-page :is(summary,a):focus-visible {
  outline: 3px solid #d3152c;
  outline-offset: 3px;
}

@media(max-width:700px) {
  .schedule-content {
    padding-block: 24px 40px;
  }

  .schedule-month-nav {
    grid-template-columns: repeat(4,1fr);
    gap: 8px;
    margin-top: 24px;
  }

  .schedule-month {
    scroll-margin-top: 90px;
  }

  .schedule-month :is(summary, .month-static-heading) {
    padding: 16px 8px;
    gap: 8px;
  }

  .schedule-month :is(summary, .month-static-heading) strong {
    font-size: 24px;
    margin-left: 4px;
  }

  .month-empty-label {
    font-size: 12px;
  }

  .schedule-day {
    grid-template-columns: minmax(0,1fr);
    gap: 12px;
    padding: 18px 8px;
  }

  .schedule-day h3 {
    font-size: 30px;
  }

  .schedule-day h3 span {
    display: inline;
    margin-left: 8px;
  }

  .schedule-group {
    padding: 12px;
    background: #faf9f9;
  }

  .schedule-group h4 {
    margin-bottom: 8px;
  }

}

/* 当日と選択月を控えめに強調する。 */
.schedule-day.is-today {
  background: #fff6f7;
  border-left: 3px solid #d3152c;
}

.today-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  background: #d3152c;
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
}

.schedule-month-nav a[aria-current="true"] {
  background: #191919;
  color: #fff;
  border-color: #191919;
}

/* 月見出しは、その月の予定を読んでいる間だけヘッダー直下に固定。 */
.schedule-month[open] > summary {
  position: sticky;
  top: var(--schedule-header-height, var(--sticky-header-offset));
  z-index: 10;
  box-shadow: 0 1px 0 #e5e5e5;
}

/* この予定表の平日行は祝日。曜日も残して色だけに頼らず区別する。 */
.schedule-day h3 time {
  color: #d3152c;
}

.schedule-day[data-weekday="土"] h3 time {
  color: #2165ac;
}

/* 未掲載の月は静的な表示にして、開閉できる月と区別する。 */
.schedule-month-nav span {
  color: #999;
  background: #f6f6f6;
}

.schedule-month .month-static-heading {
  cursor: default;
  color: #777;
}
