.month-calendar {
  margin-top: 16px;
}
.month-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}
.month-calendar-head h3 {
  margin: 0;
  font:
    20px Georgia,
    serif;
}
.month-calendar-head button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff06;
  color: #ddd9ff;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.month-weekday {
  padding: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}
.month-day {
  position: relative;
  min-height: 58px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff04;
  color: #dcd8f5;
  text-align: left;
}
.month-day.outside {
  opacity: 0.32;
}
.month-day.today {
  border-color: #8d7cf4;
  background: #8d7cf41b;
}
.month-day.selected {
  box-shadow: 0 0 0 3px #8d7cf41e;
}
.month-day b {
  font-size: 11px;
}
.month-events {
  display: flex;
  gap: 3px;
  margin-top: 9px;
  flex-wrap: wrap;
}
.month-events i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 7px #61d5cd;
}
.calendar-agenda {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}
.calendar-agenda-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff04;
}
.calendar-agenda-row small {
  color: var(--muted);
}
.visual-time-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #071329;
  color: #fff;
  font-weight: 800;
}
.visual-time-trigger span:before {
  content: "◷";
  margin-right: 8px;
  color: var(--violet);
}
.routine-form input[name="time"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.clock-backdrop {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #020714bd;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
}
.clock-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.clock-dialog {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #0b1930;
  color: #fff;
  box-shadow: 0 30px 90px #000;
}
.clock-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.clock-dialog-head button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
}
.clock-display {
  margin: 16px 0;
  padding: 14px;
  border-radius: 13px;
  background: #8d7cf417;
  color: #fff;
  font:
    38px Georgia,
    serif;
  text-align: center;
}
.clock-period {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.clock-period button,
.clock-face button {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff05;
  color: #cfc9ef;
}
.clock-period button {
  padding: 9px;
}
.clock-period button.active,
.clock-face button.active {
  border-color: #8d7cf4;
  background: #8d7cf431;
  color: #fff;
}
.clock-face {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.clock-face button {
  aspect-ratio: 1;
}
.clock-minutes {
  grid-template-columns: repeat(6, 1fr);
  margin-top: 14px;
}
.clock-minutes button {
  aspect-ratio: auto;
  padding: 9px 3px;
}
.clock-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
@media (max-width: 520px) {
  .month-day {
    min-height: 47px;
    padding: 5px;
  }
  .month-events i {
    width: 5px;
    height: 5px;
  }
  .clock-dialog {
    padding: 18px;
  }
  .clock-face {
    gap: 6px;
  }
}
