.clinic-schedule-card {
  width: 100%;
  min-width: 0;
  background: #0c3178;
  color: #0c3178;
}

.clinic-schedule-nav {
  display: grid;
  grid-template-columns: minmax(108px, 1fr) auto minmax(108px, 1fr);
  align-items: center;
  min-height: 62px;
  column-gap: 14px;
  padding: 8px 18px;
  background: #123f8c;
  color: #fff;
}

.clinic-week-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
}

.clinic-week-heading strong {
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: 0.06em;
}

.clinic-week-range {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  padding: 3px 12px 4px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.clinic-week-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  padding: 0 13px;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, opacity 0.2s, transform 0.2s;
}

.clinic-week-prev {
  justify-self: start;
}

.clinic-week-button-icon {
  display: inline-block;
  font-family: Arial, sans-serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-1px);
}

.clinic-week-next {
  justify-self: end;
}

.clinic-week-button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.clinic-week-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.clinic-week-button:disabled {
  cursor: default;
  opacity: 0.28;
}

.clinic-schedule-panel {
  min-width: 0;
  padding: 18px 26px 22px;
  background: linear-gradient(135deg, #24bfd1 0%, #0c3178 100%);
}

.clinic-schedule-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin-bottom: 12px;
  color: #fff;
}

.clinic-schedule-brand .brand-logo {
  font-size: 24px;
  font-weight: 700;
}

.clinic-schedule-brand strong {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.clinic-schedule-title-block {
  display: grid;
  gap: 4px;
  text-align: center;
}

.clinic-schedule-header-note {
  color: #ffe38a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
}

.clinic-week-viewport {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.clinic-week-track {
  display: flex;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.clinic-week-track::-webkit-scrollbar {
  display: none;
}

.clinic-week-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.clinic-schedule-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.clinic-schedule-table {
  width: 100%;
  min-width: 700px;
  border: 5px solid #eefbff;
  border-collapse: separate;
  border-radius: 28px 0 28px 0;
  border-spacing: 0;
  overflow: hidden;
  background: #fff;
  color: #0c3178;
  table-layout: fixed;
}

.clinic-schedule-table th,
.clinic-schedule-table td {
  border-right: 1px solid #c4d6ea;
  border-bottom: 1px solid #c4d6ea;
  text-align: center;
  vertical-align: middle;
}

.clinic-schedule-table th:last-child,
.clinic-schedule-table td:last-child {
  border-right: none;
}

.clinic-schedule-table tr:last-child th,
.clinic-schedule-table tr:last-child td {
  border-bottom: none;
}

.clinic-schedule-table thead th {
  height: 72px;
  background: #d7edf7;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
}

.clinic-schedule-table thead .clinic-week-date {
  display: block;
  margin: 4px 0 0;
  color: #55708d;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.clinic-schedule-table .corner-cell {
  position: relative;
  width: 92px;
  background: #d7edf7;
}

.clinic-schedule-table .corner-cell span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, transparent calc(50% - 1px), #9fb8d7 50%, transparent calc(50% + 1px));
}

.clinic-schedule-table .time-cell {
  width: 92px;
  padding: 12px 6px;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.55;
}

.clinic-schedule-table td {
  min-height: 86px;
  padding: 12px 8px;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.35;
}

.clinic-schedule-table .schedule-name + .schedule-name {
  margin-top: 6px;
}

.clinic-schedule-table small {
  display: block;
  margin: 0 0 2px;
  color: #e60012;
  font-size: 14px;
  font-weight: 700;
}

.clinic-schedule-table .schedule-note-text {
  line-height: 1.35;
}

.clinic-schedule-table .schedule-doctor-name {
  display: block;
}

.clinic-schedule-table .schedule-rest-text {
  color: #e60012;
  font-weight: 700;
}

.clinic-schedule-table .period-note-text {
  margin: 0 0 4px;
  line-height: 1.35;
}

@media screen and (max-width: 767px) {
  .clinic-schedule-nav {
    grid-template-columns: minmax(66px, 1fr) minmax(0, auto) minmax(66px, 1fr);
    min-height: 56px;
    column-gap: 8px;
    padding: 5px 10px;
  }

  .clinic-week-heading {
    gap: 7px;
  }

  .clinic-week-heading strong {
    font-size: 16px;
    letter-spacing: 0.03em;
  }

  .clinic-week-range {
    min-width: 92px;
    padding: 2px 8px 3px;
    font-size: 11px;
  }

  .clinic-week-button {
    min-width: 34px;
    height: 34px;
    gap: 4px;
    padding: 0 8px;
    font-size: 12px;
  }

  .clinic-week-button-icon {
    font-size: 22px;
  }

  .clinic-schedule-panel {
    padding: 14px 12px 16px;
  }

  .clinic-schedule-brand {
    gap: 10px;
  }

  .clinic-schedule-brand .brand-logo {
    font-size: 18px;
  }

  .clinic-schedule-brand strong {
    font-size: 22px;
  }

  .clinic-schedule-header-note {
    font-size: 13px;
  }

  .clinic-schedule-table {
    min-width: 640px;
  }

  .clinic-schedule-table thead th {
    font-size: 27px;
  }

  .clinic-schedule-table .time-cell {
    font-size: 22px;
  }

  .clinic-schedule-table td {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clinic-week-track {
    scroll-behavior: auto;
  }

  .clinic-week-button {
    transition: none;
  }
}
