.schedule-page {
  padding-top: 18px;
  padding-bottom: 96px;
}

.schedule-shell {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.schedule-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: end;
}

.schedule-hero__content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.schedule-hero__kicker {
  color: rgba(230, 190, 152, 0.9);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.schedule-title {
  margin: 0;
  color: #fff;
  font-family: var(--font-family-display);
  font-size: clamp(40px, 5vw, 82px);
  line-height: 0.94;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  font-weight: 800;
}

.schedule-subtitle {
  max-width: 860px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.6;
}

.schedule-hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.schedule-stat {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(230, 190, 152, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(230, 190, 152, 0.15);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.schedule-stat__value {
  color: #fff;
  font-family: var(--font-family-display);
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
}

.schedule-stat__label {
  color: rgba(230, 190, 152, 0.95);
  max-width: 118px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-transform: uppercase;
  text-align: left;
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 8px 14px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  line-height: 1.4;
}

.schedule-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  white-space: nowrap;
}

.schedule-legend__dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex: 0 0 12px;
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.schedule-legend__dot--busy {
  background: #29451f;
  border-color: rgba(124, 189, 83, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 0 4px rgba(124, 189, 83, 0.08);
}

.schedule-board-frame {
  position: relative;
  min-width: 0;
}

.schedule-scroll-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.schedule-scroll-controls[hidden] {
  display: none;
}

.schedule-scroll-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: 0 0 44px;
  border: 1px solid color-mix(in srgb, var(--theme-main) 24%, var(--theme-border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--theme-surface-2) 88%, transparent);
  color: var(--theme-text-strong);
  box-shadow: var(--theme-shadow-soft);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.schedule-scroll-button svg {
  width: 20px;
  height: 20px;
}

.schedule-scroll-button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--theme-main) 62%, var(--theme-border));
  background: color-mix(in srgb, var(--theme-main) 16%, var(--theme-surface-2));
  color: var(--theme-main);
  transform: translateY(-1px);
}

.schedule-scroll-button:focus-visible,
.schedule-board-wrap:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-main) 72%, transparent);
  outline-offset: 3px;
}

.schedule-scroll-button:disabled {
  opacity: 0.34;
  cursor: default;
  box-shadow: none;
}

.schedule-board-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 10px;
  border-radius: 28px;
  scrollbar-gutter: stable both-edges;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--theme-main) 70%, var(--theme-muted)) color-mix(in srgb, var(--theme-surface-3) 76%, transparent);
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.schedule-board-wrap::-webkit-scrollbar {
  height: 12px;
}

.schedule-board-wrap::-webkit-scrollbar-track {
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-surface-3) 76%, transparent);
}

.schedule-board-wrap::-webkit-scrollbar-thumb {
  min-width: 56px;
  border: 3px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-main) 70%, var(--theme-muted));
  background-clip: padding-box;
}

.schedule-board-wrap::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--theme-main) 88%, var(--theme-text-soft));
  background-clip: padding-box;
}

.schedule-board {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.schedule-board__master-col {
  width: 200px;
}

.schedule-board__slot-col {
  width: 65px;
}

.schedule-board th,
.schedule-board td {
  padding: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.schedule-board thead th {
  background: rgba(255, 255, 255, 0.03);
}

.schedule-board__master-head {
  position: sticky;
  left: 0;
  z-index: 5;
  background: rgba(10, 10, 10, 0.98);
  color: #fff;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 18px 16px;
  vertical-align: middle;
}

.schedule-board__date-head {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  text-align: center;
  padding: 13px 10px;
  line-height: 1.15;
}

.schedule-board__date-head.is-today {
  background:
    linear-gradient(180deg, rgba(230, 190, 152, 0.2), rgba(230, 190, 152, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.schedule-date__day {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.schedule-board__shift-head {
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 12px 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.schedule-board__shift-head.is-today {
  background: rgba(230, 190, 152, 0.09);
  color: #f2d8bd;
}

.schedule-master-cell {
  position: sticky;
  left: 0;
  z-index: 4;
  padding: 10px;
  background: linear-gradient(180deg, rgba(11, 11, 11, 0.98), rgba(8, 8, 8, 0.98));
}

.schedule-master-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
}

.schedule-master-link__media {
  display: block;
  position: relative;
  width: 92px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.schedule-master-link__media picture,
.schedule-master-link__media img {
  display: block;
  width: 100%;
  height: 100%;
}

.schedule-master-link__picture,
.schedule-master-link__image {
  object-fit: cover;
  object-position: center center;
}

.schedule-master-link__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: #242424;
}

.schedule-master-link__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}

.schedule-master-link__name {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-slot {
  height: 82px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.015);
  text-align: center;
}

.schedule-slot.is-today {
  background:
    linear-gradient(180deg, rgba(230, 190, 152, 0.09), rgba(230, 190, 152, 0.045)),
    rgba(255, 255, 255, 0.015);
}

.schedule-slot.is-busy {
  background:
    linear-gradient(180deg, rgba(124, 189, 83, 0.22), rgba(124, 189, 83, 0.14)),
    rgba(255, 255, 255, 0.02);
}

.schedule-slot.is-busy.is-today {
  background:
    linear-gradient(180deg, rgba(124, 189, 83, 0.24), rgba(124, 189, 83, 0.16)),
    linear-gradient(180deg, rgba(230, 190, 152, 0.08), rgba(230, 190, 152, 0.04));
}

.schedule-slot__marker {
  display: none;
}

.schedule-slot.is-free {
  color: transparent;
}

.schedule-row:hover .schedule-master-cell,
.schedule-row:hover .schedule-slot {
  background-color: rgba(255, 255, 255, 0.03);
}

.schedule-row:hover .schedule-slot.is-today {
  background-color: rgba(230, 190, 152, 0.08);
}

.schedule-empty {
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.schedule-empty__title {
  color: #fff;
  font-family: var(--font-family-display);
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.05;
  margin-bottom: 12px;
}

.schedule-empty__text {
  color: rgba(255, 255, 255, 0.74);
  max-width: 720px;
  font-size: 18px;
  line-height: 1.6;
}

@media (max-width: 991px) {
  .schedule-hero {
    grid-template-columns: 1fr;
  }

  .schedule-hero__aside {
    align-items: flex-start;
  }

  .schedule-legend {
    align-items: flex-start;
  }

  .schedule-legend__item {
    text-align: left;
  }
}

@media (max-width: 767px) {
  .schedule-page {
    padding-top: 12px;
    padding-bottom: 72px;
  }

  .schedule-shell {
    gap: 22px;
  }

  .schedule-scroll-controls {
    margin-bottom: 8px;
  }

  .schedule-title {
    letter-spacing: -0.04em;
  }

  .schedule-board {
    min-width: 980px;
  }

  .schedule-board__master-col {
    width: 160px;
  }

  .schedule-board__slot-col {
    width: 58px;
  }

  .schedule-master-cell {
    padding: 9px;
  }

  .schedule-master-link__media {
    width: 78px;
  }

  .schedule-master-link__name {
    font-size: 14px;
  }

  .schedule-slot {
    height: 74px;
    padding: 8px 6px;
  }

  .schedule-slot__marker {
    width: 16px;
    height: 16px;
  }

  .schedule-empty {
    padding: 22px;
  }
}

@media (max-width: 239px) {
  .schedule-title {
    max-width: 100%;
    font-size: 28px;
    line-height: 1.02;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 767px) {
  .schedule-board-wrap,
  .schedule-empty,
  .schedule-hero,
  .schedule-legend {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .schedule-shell,
  .schedule-board-wrap {
    content-visibility: auto;
    contain-intrinsic-size: 1px 720px;
  }
}
