.calendar-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}
.calendar-tools .search {
  font-size: 13px;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
}
.weekday {
  padding: 12px 8px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}
.day-cell {
  min-height: 130px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 7px;
  min-width: 0;
  background: white;
}
.day-cell:nth-child(7n) {
  border-right: 0;
}
.day-cell.outside {
  background: #f9faf8;
  color: #a4aba6;
}
.day-number {
  border: 0;
  background: transparent;
  padding: 4px;
  width: 40px;
  height: 40px;
  line-height: 20px;
  font-size: 12px;
  border-radius: 50%;
  margin-bottom: 5px;
}
.day-number.today {
  background: var(--accent);
  color: white;
  font-weight: 600;
}
.event-chip {
  display: block;
  width: 100%;
  border: 0;
  border-left: 3px solid var(--event-color, var(--accent));
  background: var(--soft);
  border-radius: 4px;
  padding: 7px 8px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  margin: 4px 0;
  color: #2a5245;
}
.event-chip:hover {
  filter: brightness(0.97);
}
.event-chip time {
  font-weight: 600;
  margin-right: 4px;
}
.agenda {
  padding: 8px 24px;
}
.agenda-day {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.agenda-day h2 {
  font-size: 15px;
  margin: 0 0 12px;
}
.agenda-row {
  display: flex;
  gap: 18px;
  align-items: start;
  width: 100%;
  border: 0;
  border-left: 3px solid var(--event-color, var(--accent));
  border-radius: 4px;
  padding: 12px 15px;
  text-align: left;
  white-space: normal;
  margin: 7px 0;
  background: #f8faf8;
}
.agenda-row time {
  width: 105px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
}
.agenda-row strong {
  font-size: 13px;
  display: block;
}
.agenda-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(var(--days, 7), minmax(0, 1fr));
  overflow: auto;
  min-height: 620px;
}
.week-day {
  border-right: 1px solid var(--line);
  padding: 12px 9px;
  min-width: 0;
  background: repeating-linear-gradient(#fff, #fff 59px, #eef2ee 60px);
}
.week-day:last-child {
  border: 0;
}
.week-day h2 {
  font-size: 12px;
  text-align: center;
  margin: 0 0 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.week-day .event-chip {
  white-space: normal;
  padding: 9px 7px;
  margin-bottom: 10px;
  min-height: 48px;
}
.week-day .event-chip time {
  display: block;
  font-size: 10px;
  margin-bottom: 4px;
}
.week-day .new-day {
  font-size: 11px;
  padding: 5px;
  width: 100%;
  margin-top: 12px;
  white-space: normal;
}
.detail-date {
  font-size: 15px;
  color: #50685d;
  line-height: 1.8;
  background: var(--soft);
  padding: 14px 18px;
  border-radius: 9px;
  margin: 0 0 20px;
}
.detail-block {
  margin: 20px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-block strong {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.guest-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.rsvp {
  padding: 16px;
  background: var(--paper);
  border-radius: 8px;
  margin-top: 18px;
}
.rsvp p {
  font-size: 13px;
  margin-top: 0;
}
#event-guests {
  min-height: 65px;
}
#import-form {
  display: grid;
  gap: 16px;
}
.week-day .day-number {
  width: auto;
  min-width: 32px;
}
.calendar-loading {
  padding: 70px;
  text-align: center;
  color: var(--muted);
}
@media (min-width: 1550px) {
  .day-cell {
    min-height: 155px;
  }
}
@media (max-width: 1100px) {
  .day-cell {
    min-height: 115px;
  }
  .day-cell {
    padding: 5px;
  }
  .event-chip {
    font-size: 10px;
  }
  .week-grid {
    grid-template-columns: repeat(var(--days, 7), minmax(90px, 1fr));
  }
}
@media (max-width: 600px) {
  .calendar-tools {
    flex-wrap: wrap;
  }
  .calendar-tools .search {
    width: 100%;
  }
  .day-cell {
    min-height: 92px;
    padding: 3px;
  }
  .event-chip {
    font-size: 9px;
    border-left-width: 2px;
    padding: 4px 3px;
    white-space: normal;
    max-height: 40px;
  }
  .event-chip time {
    display: none;
  }
  .weekday {
    font-size: 10px;
    padding: 9px 2px;
  }
  .day-number {
    font-size: 11px;
    width: 25px;
    height: 25px;
    padding: 2px;
  }
  .agenda {
    padding: 5px 14px;
  }
  .agenda-row {
    gap: 10px;
    padding: 10px;
  }
  .agenda-row time {
    width: 76px;
    font-size: 11px;
  }
  .week-grid {
    min-height: 400px;
  }
  .page-heading .toolbar {
    width: 100%;
    justify-content: space-between;
  }
  .sidebar #display-zone {
    max-width: 190px;
  }
}
