.public-calendar { margin-bottom: 1.25rem; }
.public-calendar h2 { margin-top: 0; }
.public-calendar-controls { display: flex; justify-content: space-between; gap: .25rem; align-items: center; }
.public-calendar-controls h3 { margin: 0; text-align: center; }
.public-calendar-controls button { min-height: 44px; padding-inline: .65rem; }
.public-calendar-controls button:disabled { opacity: .45; cursor: default; }
.public-calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); text-align: center; gap: 3px; }
.public-calendar .public-weekday { padding-block: .25rem; font-weight: 600; }
.public-calendar .public-calendar-day {
  display: grid; align-content: start; gap: 3px; min-width: 0; padding: 5px 1px;
  border: 1px solid #c7d9e5; border-radius: 6px; background: #fff; color: #23445e;
}
.public-calendar-day[aria-pressed="true"] { outline: 2px solid #315c7b; outline-offset: -2px; }
.public-calendar-day span {
  display: block; border-radius: 4px; padding-block: 3px; font-size: clamp(.61rem,2.7vw,.875rem);
  line-height: 1.3; overflow-wrap: anywhere; font-weight: 600;
}
.calendar-free { background: #e1f1f8; color: #1b5370; }
.calendar-reserved { background: #fff0b8; color: #734500; }
.calendar-crowded { background: #ffdfaa; color: #713d08; }
.calendar-busy { background: #f7c5cb; color: #812d38; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .75rem; }
.calendar-legend span { border-radius: 5px; padding: .2rem .45rem; font-size: .875rem; font-weight: 600; }
@media (max-width: 460px) {
  .public-calendar { padding-inline: 8px; }
  .public-calendar-controls h3 { font-size: 1rem; }
}

.calendar-low { background: #fbd2bc; color: #833906; }
.calendar-paused { background: #e8ebef; color: #465361; }
.calendar-summary, .calendar-selection {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: .5rem; margin-block: .75rem;
}
.calendar-selection[hidden], .calendar-summary:empty { display: none; }
.calendar-summary p, .calendar-selection p { margin: 0; }
.calendar-summary > div, .calendar-selection > div {
  border: 1px solid #c7d9e5; border-radius: 6px; padding: .65rem;
}
.calendar-selection h3 { grid-column: 1 / -1; margin: 0; }
.calendar-selection button { min-height: 44px; margin-top: .4rem; }
