.drawer, [data-overlay] {
  color-scheme: light;
  --bg: #f5f0e6;
  --paper: #fffdf8;
  --surface: rgba(255, 252, 245, 0.92);
  --surface-strong: #fffaf0;
  --ink: #2d241d;
  --muted: #7f6e61;
  --line: rgba(112, 88, 67, 0.15);
  --line-strong: rgba(112, 88, 67, 0.24);
  --blue: #2a63c8;
  --blue-soft: rgba(42, 99, 200, 0.12);
  --red: #cb5a48;
  --red-soft: rgba(203, 90, 72, 0.12);
  --shadow: 0 28px 60px rgba(33, 22, 13, 0.18);
  --overlay: rgba(26, 18, 12, 0.52);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --drawer-width: min(90vw, 520px);
  --drawer-font: "PT Sans Narrow", "PT Sans", system-ui, sans-serif;
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-safe-bottom: env(safe-area-inset-bottom, 0px);
}
body.body--drawer-open{overflow:hidden}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  width: var(--drawer-width);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.98) 0%, rgba(249, 243, 232, 0.98) 100%);
  box-shadow: var(--shadow);
  transform: translateX(106%);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--drawer-font);
  color: var(--ink);
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer__top {
  flex: 0 0 auto;
  padding:
    calc(10px + var(--app-safe-top))
    14px
    10px;
  border-left: 1px solid rgba(112, 88, 67, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(252, 247, 239, 0.98));
}

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.drawer__meta-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.drawer__eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.drawer__period {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.drawer__period::before {
  content: "·";
  margin-right: 4px;
}

.drawer__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
  font-weight: 700;
}

.drawer__close {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: rgba(131, 105, 83, 0.1);
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.calendar {
  border-radius: 18px;
  padding: 10px 10px 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(112, 88, 67, 0.1);
}

.calendar__weekdays,
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar__weekdays {
  gap: 6px;
  margin-bottom: 3px;
  color: rgba(91, 73, 60, 0.66);
  font-size: 9px;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.calendar__grid {
  gap: 4px 3px;
}

.calendar__day {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 2px;
  min-height: 38px;
  padding: 5px 0 4px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.calendar__day:hover {
  background: rgba(42, 99, 200, 0.08);
}

.calendar__day:active {
  transform: scale(0.97);
}

.calendar__day.is-today {
  outline: 1px solid rgba(42, 99, 200, 0.35);
  outline-offset: -1px;
}

.calendar__day.is-selected {
  background: var(--blue);
  color: #fff;
}

.calendar__day.is-empty {
  color: rgba(45, 36, 29, 0.45);
}

.calendar__day.is-empty.is-flashed {
  animation: empty-day-flash 520ms ease;
}

.calendar__number {
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
}

.calendar__dots {
  display: grid;
  grid-template-columns: repeat(2, 5px);
  column-gap: 3px;
  align-items: center;
  justify-content: center;
  min-height: 5px;
}

.calendar__dot-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5px;
  height: 5px;
}

.calendar__dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 999px;
}

.calendar__dot--morning {
  background: var(--blue);
}

.calendar__dot--evening {
  background: var(--red);
}

.calendar__actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.calendar__ghost,
.calendar__full-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
}

.calendar__ghost {
  flex: 0 0 auto;
  padding: 0 10px;
  border: 1px solid rgba(112, 88, 67, 0.16);
  background: rgba(255, 252, 247, 0.9);
  color: var(--ink);
  cursor: pointer;
}

.calendar__full-link {
  flex: 1 1 auto;
  padding: 0 10px;
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid rgba(42, 99, 200, 0.12);
}

.calendar__full-link.is-hinted {
  animation: full-link-pulse 560ms ease;
}

.calendar__icon {
  font-size: 14px;
}

.drawer__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 14px calc(14px + var(--app-safe-bottom));
}

.drawer__cards {
  display: grid;
  gap: 7px;
  padding-top: 7px;
}

.day-card {
  border-radius: 18px;
  border: 1px solid rgba(112, 88, 67, 0.1);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 6px 12px rgba(53, 33, 16, 0.04);
  overflow: clip;
}

.day-card.is-expanded {
  border-color: rgba(42, 99, 200, 0.18);
  box-shadow: 0 18px 28px rgba(42, 99, 200, 0.12);
}

.day-card__button {
  width: 100%;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 18px;
  gap: 8px;
  padding: 9px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.day-card__button--expanded {
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: start;
  padding: 9px 9px 5px;
}

.day-card__date {
  display: grid;
  gap: 1px;
  align-content: start;
  justify-items: start;
  padding: 6px 5px;
  border-radius: 14px;
  background: rgba(244, 238, 228, 0.92);
}

.day-card__num {
  font-size: 22px;
  line-height: 0.9;
  font-weight: 700;
}

.day-card__month,
.day-card__weekday {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
}

.day-card__body {
  min-width: 0;
}

.day-card__body--expanded {
  min-width: 0;
}

.day-card__date-line {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.day-card__title {
  margin: 0;
  font-size: 14px;
  line-height: 1.18;
  font-weight: 600;
}

.day-card__summary {
  display: grid;
  gap: 1px;
  margin-top: 5px;
}

.day-card__line {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.26;
}

.day-card__line--muted {
  color: var(--muted);
}

.day-card__chevron {
  justify-self: end;
  align-self: start;
  margin-top: 2px;
  color: rgba(45, 36, 29, 0.4);
  font-size: 14px;
  transition: transform 160ms ease;
}

.day-card.is-expanded .day-card__chevron {
  transform: rotate(180deg);
}

.day-card__details {
  display: none;
  padding: 0 9px 10px;
}

.day-card.is-expanded .day-card__details {
  display: block;
}

.day-card__detail-title {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(91, 73, 60, 0.7);
}

.day-card__full-title {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
}

.day-card__group {
  margin-top: 8px;
}

.day-card__group-name {
  margin: 0 0 5px;
  color: rgba(91, 73, 60, 0.76);
  font-size: 11px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.day-card__place {
  margin: 6px 0 3px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.15;
  font-weight: 700;
}

.day-card__service-list {
  display: grid;
  gap: 3px;
}

.day-card__service {
  display: flex;
  gap: 6px;
  align-items: start;
  font-size: 12px;
  line-height: 1.25;
}

.day-card__time {
  flex: 0 0 36px;
  font-weight: 700;
}

.day-card__service-title {
  min-width: 0;
}

.day-card__readings {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(112, 88, 67, 0.18);
}

.day-card__reading {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.day-card__footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--blue);
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
}

@keyframes empty-day-flash {
  0% {
    background: rgba(203, 90, 72, 0.22);
  }
  100% {
    background: transparent;
  }
}

@keyframes full-link-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(42, 99, 200, 0.35);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(42, 99, 200, 0);
  }
}

@media (max-width: 720px) {
  .demo-page {
    padding-inline: 14px;
  }

  .demo-hero {
    padding: 22px 18px;
    border-radius: 28px;
  }

  .demo-copy,
  .demo-card ul {
    font-size: 18px;
  }

  .day-card__button {
    grid-template-columns: 56px minmax(0, 1fr) 16px;
    gap: 7px;
  }

  .day-card__button--expanded {
    grid-template-columns: minmax(0, 1fr) 16px;
  }

  .day-card__details {
    padding-left: 10px;
  }
}

@media (max-height: 760px) {
  .drawer__top {
    padding-top: calc(8px + var(--app-safe-top));
  }

  .drawer__header {
    margin-bottom: 2px;
  }

  .drawer__meta-row {
    margin-bottom: 6px;
  }

  .calendar {
    padding: 7px;
  }

  .calendar__day {
    min-height: 35px;
    padding-top: 4px;
  }
}
