/* Phone calendar toolbar. Existing FullCalendar buttons and event handlers are preserved. */
@media screen and (max-width: 767.98px) {
  #calendar { min-width: 0; max-width: 100%; }
  #calendar .fc-header-toolbar { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: stretch; margin: 18px 0 16px; }
  #calendar .fc-header-toolbar > .fc-toolbar-chunk { min-width: 0; margin: 0; }
  #calendar .fc-header-toolbar > .fc-toolbar-chunk:nth-child(2) { order: 1; text-align: center; padding: 0 4px 4px; }
  #calendar .fc-header-toolbar .fc-toolbar-title { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 750; color: #123e2e; overflow-wrap: anywhere; }
  #calendar .fc-header-toolbar > .fc-toolbar-chunk:first-child { order: 2; display: flex; align-items: stretch; gap: 8px; }
  #calendar .fc-header-toolbar > .fc-toolbar-chunk:first-child > .fc-button-group { display: flex; gap: 8px; flex: 0 0 auto; }
  #calendar .fc-header-toolbar > .fc-toolbar-chunk:nth-child(3) { order: 3; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  #calendar .fc-header-toolbar > .fc-toolbar-chunk:nth-child(3) > .fc-button-group { order: 1; display: flex; width: 100%; margin: 0; padding: 4px; gap: 4px; background: #edf5ef; border: 1px solid #d7e5dc; border-radius: 12px; }
  #calendar .fc-header-toolbar .fc-button { min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid #cbded2; border-radius: 10px !important; background: #fff; color: #285840; box-shadow: none; font-size: 13px; font-weight: 650; line-height: 1.25; text-transform: capitalize; white-space: nowrap; }
  #calendar .fc-header-toolbar .fc-today-button { flex: 1 1 auto; min-width: 0; margin: 0; }
  #calendar .fc-header-toolbar .fc-today-button:disabled { color: #536b5c; background: #f4f8f5; opacity: 1; border-color: #d9e5dd; }
  #calendar .fc-header-toolbar .fc-prev-button, #calendar .fc-header-toolbar .fc-next-button { width: 46px; flex: 0 0 46px; padding: 10px; display: inline-flex; align-items: center; justify-content: center; }
  #calendar .fc-header-toolbar .fc-prev-button > span, #calendar .fc-header-toolbar .fc-next-button > span { display: none; }
  /* CSS arrows remain visible even if the calendar icon font fails to load. */
  #calendar .fc-header-toolbar .fc-prev-button::after, #calendar .fc-header-toolbar .fc-next-button::after { content: ''; display: inline-block; width: 9px; height: 9px; border-bottom: 2px solid currentColor; border-left: 2px solid currentColor; }
  #calendar .fc-header-toolbar .fc-prev-button::after { transform: rotate(45deg); margin-left: 4px; }
  #calendar .fc-header-toolbar .fc-next-button::after { transform: rotate(225deg); margin-right: 4px; }
  #calendar .fc-header-toolbar > .fc-toolbar-chunk:nth-child(3) > .fc-button-group > .fc-button { flex: 1 1 0; min-width: 0; border-color: transparent; background: transparent; }
  #calendar .fc-header-toolbar > .fc-toolbar-chunk:nth-child(3) > .fc-button-group > .fc-button-active { color: #fff; background: #165b3d; border-color: #165b3d; }
  #calendar .fc-header-toolbar .fc-addEvent-button { order: 2; width: 100%; margin: 0; color: #fff; background: #167347; border-color: #167347; }
  #calendar .fc-header-toolbar .fc-addEvent-button::before { content: '+'; margin-right: 7px; font-size: 18px; font-weight: 500; vertical-align: -1px; }
  #calendar .fc-header-toolbar .fc-button:enabled:hover { background: #e2efe7; color: #164c32; }
  #calendar .fc-header-toolbar .fc-addEvent-button:enabled:hover, #calendar .fc-header-toolbar .fc-button-active:enabled:hover { color: #fff; background: #104d32; }
  #calendar .fc-header-toolbar .fc-button:focus-visible { outline: 3px solid #8cbea0; outline-offset: 2px; }
  #calendar .fc-view-harness { min-width: 0; }
  #calendar .fc-col-header-cell-cushion { padding: 6px 2px; font-size: 11px; }
}
