.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(210px, 1fr);
  gap: 16px;
  align-items: start;
}
.calendar-card,
.calendar-agenda {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}
.cal-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 18px 0;
  flex-wrap: wrap;
}
.cal-control-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.cal-control-group button {
  border: 0;
  background: #f0f3f5;
  border-radius: 6px;
  padding: 6px 11px;
  color: #29404b;
  font-size: 0.81rem;
  font-weight: 600;
  min-height: 33px;
}
.cal-control-group button:hover,
.cal-control-group button:focus-visible {
  background: #dcece9;
}
.cal-control-group .cal-arrow {
  font-size: 1.35rem;
  line-height: 1;
  padding: 2px 10px;
}
.cal-views {
  background: #f0f3f5;
  padding: 3px;
  border-radius: 7px;
  gap: 1px;
}
.cal-views button {
  min-height: 27px;
  padding: 3px 9px;
}
.cal-views button[aria-pressed="true"] {
  background: #fff;
  box-shadow: 0 1px 4px #27473822;
  color: #125a4a;
}
.cal-caption {
  padding: 14px 19px;
  font-size: 1.4rem;
  text-transform: capitalize;
}
.cal-weekdays,
.cal-dates {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.cal-weekdays {
  color: #566a72;
  background: #f5f8f8;
  border-block: 1px solid #e1e9e9;
  font-size: 0.76rem;
  font-weight: 640;
}
.cal-weekdays span {
  padding: 7px 4px;
  text-align: center;
}
.cal-day {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  position: relative;
  padding: 6px;
  min-height: 69px;
  min-width: 0;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #e5ebec;
  border-right: 1px solid #e5ebec;
  color: #283941;
  text-align: left;
}
.cal-day:nth-child(7n) {
  border-right: 0;
}
.cal-day:nth-last-child(-n + 7) {
  border-bottom: 0;
}
.cal-day:hover,
.cal-day:focus-visible {
  background: #f1f8f6;
  z-index: 1;
}
.cal-day.selected {
  background: #ecf7f3;
  box-shadow: inset 0 0 0 2px #367d6b;
}
.cal-day.outside {
  color: #7d8b8b;
  background: #f9fafa;
}
.cal-number {
  font-variant-numeric: tabular-nums;
  font-weight: 570;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  font-size: 0.84rem;
  border-radius: 7px;
}
.cal-day.today .cal-number {
  background: #1b6658;
  color: #fff;
}
.cal-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  margin-top: 5px;
  font-size: 0.65rem;
  line-height: 1.2;
  color: #256a5a;
  font-weight: 650;
}
.cal-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3a9078;
  flex: none;
}
.cal-pill span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-count {
  font-size: 0.64rem;
  color: #46716b;
}
.cal-grid.week .cal-day {
  min-height: 110px;
}
.cal-agenda-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e4e9e8;
}
.cal-bigdate {
  color: #18594c;
  background: #e5f2ee;
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 47px;
  font-weight: 650;
  font-size: 1.55rem;
  border-radius: 9px;
}
.cal-agenda-head h2 {
  font-size: 1.06rem;
}
.cal-agenda-head p,
.cal-meta,
.cal-empty {
  font-size: 0.83rem;
  color: #5a6c72;
}
.cal-event {
  padding: 17px 18px;
  border-bottom: 1px solid #e5ecea;
}
.cal-event:last-child {
  border-bottom: 0;
}
.cal-time {
  font-size: 0.74rem;
  letter-spacing: 0.025em;
  color: #3e7467;
  font-weight: 650;
  margin-bottom: 4px;
}
.cal-title {
  display: block;
  min-height: 1.55em;
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
}
.cal-title:hover {
  text-decoration: underline;
}
.cal-meta {
  margin: 4px 0 10px;
}
.cal-empty {
  padding: 18px;
}
@media (max-width: 1050px) {
  .calendar-layout {
    grid-template-columns: 1fr;
  }
  .cal-day {
    min-height: 61px;
  }
}
@media (max-width: 720px) {
  .cal-controls {
    padding: 12px 10px 0;
    gap: 5px;
  }
  .cal-caption {
    font-size: 1.18rem;
    padding: 13px 10px;
  }
  .cal-day {
    min-height: 51px;
    padding: 4px;
  }
  .cal-pill span {
    display: none;
  }
  .cal-pill {
    margin-top: 2px;
    margin-left: 6px;
  }
  .cal-grid.week .cal-day {
    min-height: 61px;
  }
}
