#calendar-dashboard .calendar-day {
  flex-direction: column;
}
#calendar-dashboard .calendar-day[role="button"] {
  cursor: pointer;
}
#calendar-dashboard .calendar-day[role="button"]:focus-visible {
  outline: 2px solid #d7dfd9;
  outline-offset: 2px;
}
#calendar-dashboard .calendar-selected-day {
  box-shadow: inset 0 0 0 1px #9aad9e;
}
#calendar-dashboard .calendar-event-count {
  display: block;
  font-size: 9px;
  line-height: 1.2;
  margin-top: 3px;
}
#calendar-dashboard .calendar-feed-event {
  border-color: #34483b !important;
  overflow-wrap: anywhere;
}
#calendar-dashboard .calendar-past-event {
  opacity: 0.6;
}

/* 今日の終了済み予定だけをコンパクトに表示 */
#calendar-dashboard #calendar-agenda .calendar-past-event {
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
}

#calendar-dashboard #calendar-agenda .calendar-past-event h3 {
  font-size: 1rem;
  line-height: 1.35;
  margin-bottom: 0.15rem !important;
}

#calendar-dashboard #calendar-agenda .calendar-past-event > div {
  font-size: 0.75rem;
  line-height: 1.3;
  margin-bottom: 0.15rem !important;
}

#calendar-dashboard #calendar-agenda .calendar-past-event p {
  font-size: 0.75rem;
  line-height: 1.3;
}


/* 予定名の横に、メモを小さな文字で表示 */
#calendar-dashboard .calendar-event-note {
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
  color: #a8baac;
  white-space: pre-wrap;
}

#calendar-dashboard .calendar-location-link {
  color: #a9c5b1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#calendar-dashboard .calendar-location-link:hover {
  color: #e0eadf;
}

#calendar-dashboard .calendar-location-link:focus-visible {
  outline: 2px solid #d7dfd9;
  outline-offset: 3px;
}


/* 月間表示の上1/3を日付、下2/3を予定一覧にする */
#calendar-dashboard .calendar-month-panel {
  height: clamp(540px, calc(100dvh - 240px), 900px);
}
#calendar-dashboard .calendar-month-panel > .card-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 2fr);
  gap: 12px;
  min-height: 0;
  padding: 16px;
}
#calendar-dashboard .calendar-month-overview {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#calendar-dashboard .calendar-month-overview h2 {
  font-size: 1rem;
  line-height: 1.2;
  margin: 0 0 6px;
}
#calendar-dashboard #calendar-range {
  font-size: 0.72rem;
  line-height: 1.2;
  margin: 0 0 4px;
}
#calendar-dashboard .calendar-weekdays {
  font-size: 0.65rem;
  line-height: 1.2;
  margin-bottom: 4px;
}
#calendar-dashboard #calendar-grid {
  flex: 1;
  min-height: 0;
  gap: 2px;
  grid-auto-rows: minmax(0, 1fr);
}
#calendar-dashboard #calendar-grid .calendar-day {
  min-height: 0;
  font-size: 0.78rem;
  line-height: 1;
  border-radius: 5px;
}
#calendar-dashboard #calendar-grid .calendar-has-events:not(.is-today) {
  background: #873841;
  color: #ffe9e9;
}
#calendar-dashboard #calendar-grid .is-today {
  background: #a9c5a0;
  color: #17261b;
  font-weight: 600;
}
#calendar-dashboard .calendar-upcoming-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-top: 1px solid #34483b;
  padding-top: 10px;
}
#calendar-dashboard .calendar-upcoming-panel h3 {
  font-size: 0.85rem;
  margin: 0 0 8px;
}
#calendar-dashboard #calendar-upcoming-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  position: relative;
}
#calendar-dashboard .calendar-upcoming-day + .calendar-upcoming-day {
  border-top: 1px solid #34483b;
  margin-top: 4px;
  padding-top: 4px;
}
#calendar-dashboard .calendar-upcoming-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  padding: 5px 2px;
  line-height: 1.5;
}
#calendar-dashboard .calendar-upcoming-when {
  color: #a9c5b1;
  white-space: nowrap;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}
#calendar-dashboard .calendar-upcoming-title {
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}
