.side-drawer.calendar-wide {
  width: min(390px, calc(100vw - 65px));
}

.day-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.day-title-line .day-kind {
  margin-top: 4px;
  padding: 6px 10px;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}

.drawer-calendar-months {
  grid-template-columns: 1fr;
  gap: 18px;
}

.workspace-week-day.holiday {
  background: #fff4f0;
}

.workspace-week-day > header {
  height: 82px;
  min-height: 82px;
  padding: 7px 4px;
}

.workspace-week-day.holiday > header {
  border-bottom-color: #e7bdb2;
  background: #f8e4df;
  box-shadow: inset 0 -3px #d56d50;
}

.workspace-week-day.holiday > header span,
.workspace-week-day.holiday > header strong {
  color: #9f4938;
}

.workspace-week-holiday {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: #a85140;
  font-size: 7px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.workspace-week-holiday[hidden] {
  display: none;
}

.workspace-week-day.holiday .workspace-week-body {
  background-color: #fff9f6;
}

@media (max-width: 900px) {
  .workspace-week-grid {
    grid-template-columns: repeat(7, minmax(135px, 1fr));
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .workspace-week-day {
    min-width: 135px;
    scroll-snap-align: start;
  }

  .workspace-week-body {
    min-height: 360px;
  }
}

.drawer-calendar button.today {
  position: relative;
  outline: 2px solid var(--teal);
  outline-offset: -3px;
  background: color-mix(in srgb, var(--teal) 10%, transparent);
  font-weight: 800;
}

.drawer-calendar button.today.selected {
  outline-color: #fff;
  background: #315b63;
}

.drawer-calendar button.holiday-date:hover::after,
.drawer-calendar button.holiday-date:focus-visible::after {
  content: attr(data-holiday);
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: calc(100% + 7px);
  width: max-content;
  max-width: 210px;
  padding: 7px 9px;
  transform: translateX(-50%);
  border-radius: 7px;
  background: #273b3f;
  color: #fff;
  box-shadow: 0 6px 18px #17212435;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.3;
  pointer-events: none;
  white-space: normal;
}

.drawer-calendar button.holiday-date:hover::before,
.drawer-calendar button.holiday-date:focus-visible::before {
  width: 7px;
  height: 7px;
}

@media (max-width: 700px) {
  .side-drawer.calendar-wide {
    width: 100%;
  }

  .day-title-line {
    gap: 7px;
  }

  .day-title-line .day-kind {
    padding: 5px 8px;
    font-size: 8px;
  }

  .drawer-calendar-months {
    gap: 14px;
  }

  .drawer-calendar-month {
    padding: 10px 8px;
  }

  .drawer-calendar button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    font-size: 12px;
  }

  .drawer-calendar-head {
    position: sticky;
    z-index: 2;
    top: -20px;
    padding: 8px 0;
    background: var(--surface-soft, #faf9f6);
  }

  .drawer-calendar-head button,
  .drawer-today {
    min-height: 42px;
  }

  .workspace-week-day > header,
  .workspace-week-day.holiday > header {
    height: 74px;
    min-height: 74px;
    padding: 5px 2px;
  }

  .workspace-week-holiday {
    font-size: 7px;
    line-height: 1.2;
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 370px) {
  .drawer-calendar {
    gap: 2px;
  }

  .drawer-calendar button {
    min-height: 40px;
  }
}
