.calendar-page { background: #eef1f3; }
.calendar-header { min-height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1180px)/2)); color: var(--white); background: var(--ink); border-bottom: 1px solid rgba(255,255,255,.14); }
.calendar-brand img { width: 150px; }
.back-link { font-size: .82rem; font-weight: 750; text-underline-offset: 4px; }
.calendar-hero { padding: 80px 0 68px; color: var(--white); background: var(--ink); }
.calendar-hero-inner { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.calendar-hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(4rem,9vw,7.5rem); font-weight: 400; letter-spacing: -.06em; line-height: .74; }
.calendar-hero h1 em { color: #d7e2ec; font-weight: 400; }
.year-controls { display: grid; grid-template-columns: 48px minmax(120px,1fr) 48px; align-items: stretch; border: 1px solid rgba(255,255,255,.25); }
.year-controls label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.year-controls button, .year-controls select { min-height: 52px; color: var(--white); background: transparent; border: 0; font: 700 1rem var(--sans); }
.year-controls button { cursor: pointer; font-size: 1.2rem; }
.year-controls button:first-child { border-right: 1px solid rgba(255,255,255,.25); }
.year-controls button:last-child { border-left: 1px solid rgba(255,255,255,.25); }
.year-controls button:disabled { opacity: .3; cursor: not-allowed; }
.year-controls select { padding: 0 22px; appearance: none; text-align: center; }
.year-controls select option { color: var(--ink); background: var(--white); }
.calendar-content-section { padding: 54px 0 100px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px 26px; margin-bottom: 38px; color: #445260; font-size: .8rem; }
.legend span { display: inline-flex; gap: 8px; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.yudansha, .day.yudansha { --event-color: #315981; }
.dot.graduation, .day.graduation { --event-color: #d74635; }
.dot.holiday, .day.holiday { --event-color: #9a3e52; }
.dot.optional, .day.optional { --event-color: #bf7b20; }
.dot.closed, .day.closed { --event-color: #59636d; }
.dot { background: var(--event-color); }
.months-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.month { padding: 24px; background: var(--white); border: 1px solid rgba(7,24,43,.1); box-shadow: 0 7px 24px rgba(7,24,43,.045); }
.month h2 { margin: 0 0 18px; font: 400 1.5rem var(--serif); }
.weekday-grid, .days-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.weekday-grid { margin-bottom: 7px; color: #7b8791; font-size: .62rem; font-weight: 800; text-align: center; text-transform: uppercase; }
.day { position: relative; aspect-ratio: 1; display: grid; place-items: center; min-width: 0; border: 0; border-radius: 50%; background: transparent; font: 600 .76rem var(--sans); }
button.day { cursor: pointer; color: var(--white); background: var(--event-color); }
button.day:hover, button.day:focus-visible { z-index: 2; transform: scale(1.12); }
.day.muted { color: #c5cbd0; }
.day.today { box-shadow: inset 0 0 0 2px var(--red); }
.day-tooltip { position: fixed; z-index: 20; max-width: 240px; padding: 9px 12px; color: var(--white); background: var(--ink); box-shadow: 0 8px 28px rgba(0,0,0,.22); font-size: .75rem; line-height: 1.4; pointer-events: none; transform: translate(-50%, calc(-100% - 10px)); }
.calendar-note { max-width: 680px; margin: 34px 0 0; color: #687581; font-size: .82rem; }
.calendar-footer { padding: 30px 0; color: rgba(255,255,255,.62); background: #050d16; }
.calendar-footer .shell { display: flex; justify-content: space-between; gap: 30px; font-size: .78rem; }
.calendar-footer a { color: var(--white); text-underline-offset: 4px; }
@media (max-width: 980px) { .months-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px) {
  .calendar-header { min-height: 70px; padding-inline: 16px; }
  .calendar-brand img { width: 125px; }
  .calendar-hero { padding: 58px 0 48px; }
  .calendar-hero-inner { align-items: stretch; flex-direction: column; }
  .year-controls { width: 100%; }
  .legend { display: grid; grid-template-columns: 1fr 1fr; }
  .months-grid { grid-template-columns: 1fr; }
  .month { padding: 20px; }
  .day { font-size: .85rem; }
  .calendar-footer .shell { flex-direction: column; }
}
