.page-body--calendar {
  padding-top: 1.25rem;
}

.global-cal {
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.global-cal-banner {
  display: flex;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.1rem 1.35rem;
  background: linear-gradient(120deg, var(--navy-deep), var(--navy-mid));
  color: #fff;
}

.global-cal-logo {
  width: auto;
  height: 2.35rem;
  object-fit: contain;
  flex-shrink: 0;
}

.global-cal-school {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.global-cal-title {
  margin: 0.2rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  font-weight: 600;
  color: #fff;
}

.global-cal-intro {
  margin: 0;
  padding: 1rem 1.35rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 55%, var(--white));
}

.global-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  padding: 0.75rem 1.35rem;
  border-bottom: 1px solid var(--line);
}

.global-cal-key {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.global-cal-key i {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 2px;
  display: inline-block;
}

.global-cal-key .tone-school,
.fc .evt-school {
  background: #3f9a52;
}

.global-cal-key .tone-exam,
.fc .evt-exam {
  background: #f0c24b;
  color: #111 !important;
}

.global-cal-key .tone-holiday,
.fc .evt-holiday {
  background: #2f7a3e;
}

.global-cal-key .tone-national,
.fc .evt-national {
  background: #f0b48a;
  color: #111 !important;
}

.global-cal-key .tone-special,
.fc .evt-special {
  background: #4f8ec9;
}

.global-cal-mount {
  padding: 1rem 1.15rem 1.35rem;
}

.global-cal-mount .fc {
  --fc-border-color: var(--line);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: color-mix(in srgb, var(--paper) 70%, var(--white));
  --fc-list-event-hover-bg-color: color-mix(in srgb, var(--paper) 80%, var(--white));
  --fc-today-bg-color: color-mix(in srgb, var(--gold-soft) 45%, transparent);
  --fc-button-bg-color: var(--navy);
  --fc-button-border-color: var(--navy);
  --fc-button-hover-bg-color: var(--navy-mid);
  --fc-button-hover-border-color: var(--navy-mid);
  --fc-button-active-bg-color: var(--navy-deep);
  --fc-button-active-border-color: var(--navy-deep);
  --fc-button-text-color: #fff;
  font-family: var(--sans);
}

.global-cal-mount .fc .fc-toolbar-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--heading);
}

.global-cal-mount .fc .fc-button {
  border-radius: 0;
  font-weight: 700;
  text-transform: none;
  box-shadow: none;
}

.global-cal-mount .fc .fc-col-header-cell-cushion,
.global-cal-mount .fc .fc-daygrid-day-number {
  color: var(--text-strong);
  text-decoration: none;
  font-weight: 600;
}

.global-cal-mount .fc .fc-day-sun .fc-daygrid-day-number,
.global-cal-mount .fc .fc-day-sat .fc-daygrid-day-number,
.global-cal-mount .fc .fc-day-sun .fc-col-header-cell-cushion,
.global-cal-mount .fc .fc-day-sat .fc-col-header-cell-cushion {
  color: #c62828;
}

.global-cal-mount .fc .fc-event {
  border: 0;
  border-radius: 0;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.1rem 0.25rem;
}

.global-cal-mount .fc .fc-list-event-dot {
  display: none;
}

.global-cal-notes {
  border-top: 1px solid var(--line);
}

.global-cal-notes-title {
  margin: 0;
  padding: 0.55rem 0.9rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: #c62828;
}

.global-cal-notes-body {
  margin: 0.9rem 1.1rem 1.15rem;
  padding: 0.9rem 1rem;
  border: 1px solid #8eb6d8;
  background: #fff;
  color: #1d4f7a;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .page-body--calendar {
    padding-top: 0.75rem;
  }

  .global-cal-banner {
    justify-content: center;
    padding: 0.7rem 0.85rem;
  }

  .global-cal-logo {
    height: 1.75rem;
  }

  .global-cal-legend {
    gap: 0.35rem 0.55rem;
    padding: 0.5rem 0.75rem;
  }

  .global-cal-key {
    font-size: 0.7rem;
  }

  .global-cal-key i {
    width: 0.7rem;
    height: 0.7rem;
  }

  .global-cal-mount {
    padding: 0.55rem 0.45rem 0.85rem;
  }

  .global-cal-mount .fc .fc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.3rem;
    margin-bottom: 0.55rem !important;
  }

  .global-cal-mount .fc .fc-toolbar-chunk:nth-child(2) {
    flex: 1 0 100%;
    order: -1;
    text-align: center;
  }

  .global-cal-mount .fc .fc-toolbar-title {
    font-size: 1.05rem;
    line-height: 1.2;
  }

  .global-cal-mount .fc .fc-button {
    min-height: 1.95rem;
    padding: 0.2rem 0.45rem;
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .global-cal-mount .fc .fc-prev-button,
  .global-cal-mount .fc .fc-next-button {
    min-width: 1.95rem;
    padding-inline: 0.35rem;
  }

  .global-cal-mount .fc .fc-col-header-cell-cushion {
    padding: 0.3rem 0;
    font-size: 0.68rem;
  }

  .global-cal-mount .fc .fc-daygrid-day-number {
    padding: 0.2rem 0.25rem 0.1rem;
    font-size: 0.74rem;
  }

  .global-cal-mount .fc .fc-daygrid-day-frame {
    min-height: 3.1rem;
  }

  .global-cal-mount .fc .fc-daygrid-event {
    font-size: 0.6rem;
    padding: 0.05rem 0.15rem;
    margin-top: 0.05rem;
  }

  .global-cal-mount .fc .fc-daygrid-event .fc-event-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .global-cal-mount .fc .fc-more-link {
    font-size: 0.65rem;
  }

  .global-cal-notes-title {
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
  }

  .global-cal-notes-body {
    margin: 0.65rem 0.75rem 0.85rem;
    padding: 0.65rem 0.7rem;
    font-size: 0.85rem;
  }
}
