/* Phone month is orientation; the existing daily agenda owns operation.
   Keep the desktop/tablet event DOM and behavior unchanged. */
#health .calendar-day-summary { display: none; }

@media (max-width: 720px), (pointer: coarse) and (max-width: 932px) and (max-height: 500px) {
  #health #calendar-grid:not(.weekly):not(.daily) > .calendar-day {
    height: 49px; min-height: 49px; padding: 0;
  }
  #health .calendar-grid:not(.weekly):not(.daily) > .calendar-day > :is(.calendar-day-number,.calendar-event,.calendar-more) {
    display: none;
  }
  #health .calendar-grid:not(.weekly):not(.daily) > .calendar-day > .calendar-day-summary {
    display: grid; grid-template-rows: 16px 8px 12px; gap: 1px;
    place-content: center; justify-items: center;
    width: 100%; min-width: 0; max-width: 100%; height: 48px; min-height: 48px;
    margin: 0; padding: 4px 1px; border: 0; border-radius: 0;
    background: transparent; color: #52605a; font: inherit; cursor: pointer;
  }
  #health .calendar-day-summary:focus-visible {
    outline: 2px solid #245c49; outline-offset: -2px;
  }
  #health .calendar-summary-number { font-size: .75rem; line-height: 16px; font-weight: 800; }
  #health .calendar-day.today .calendar-summary-number { color: #24312c; }
  #health .calendar-summary-dots { display: flex; align-items: center; justify-content: center; gap: 3px; }
  #health .calendar-summary-dot { display: block; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; }
  #health .calendar-summary-dot.pending { background: #d97532; }
  #health .calendar-summary-dot.overdue { background: #b54a3c; }
  #health .calendar-summary-dot.completed { background: #2f7454; }
  #health .calendar-summary-dot.cancelled { background: #89948f; }
  #health .calendar-summary-more { font-size: .625rem; line-height: 12px; font-weight: 700; white-space: nowrap; }

  #health .activities-calendar-panel:has(.calendar-grid:not(.weekly):not(.daily)) {
    padding: 12px; margin-bottom: 12px;
  }
  #health .activities-calendar-panel:has(.calendar-grid:not(.weekly):not(.daily)) .activities-calendar-head { gap: 8px; }
  #health .activities-calendar-panel:has(.calendar-grid:not(.weekly):not(.daily)) .calendar-period-row { margin: 10px 0 6px; }
  #health .activities-calendar-panel:has(.calendar-grid:not(.weekly):not(.daily)) .calendar-weekdays span { padding: 5px 1px; }
  #health .activities-calendar-panel:has(.calendar-grid:not(.weekly):not(.daily)) .calendar-legend {
    margin-top: 10px; gap: 6px 12px; font-size: .65rem;
  }
  /* This is the fixed copyright pseudo-element visible in the report, not
     .app-copyright (which the existing app already hides). */
  body.authenticated:has(#health.active)::after {
    position: static; display: block; width: auto; margin: 0;
    padding: 8px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    text-align: center; line-height: 1.4; white-space: normal;
  }
}
