#schedule {
  scroll-margin-top: 92px;
}

.schedule-jump {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 18px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
  color: var(--muted);
  font-size: 12.5px;
}

.schedule-jump a {
  color: var(--navy-800);
  font-weight: 700;
  white-space: nowrap;
}

.schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted-light);
}

.schedule-scroll-hint {
  font-size: 11.5px;
}

.schedule-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
  border-radius: 14px;
}

.schedule-board {
  display: grid;
  grid-template-columns: 76px repeat(7, minmax(116px, 1fr));
  grid-template-rows: 42px repeat(var(--schedule-rows, 30), 30px);
  min-width: 940px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.schedule-corner,
.schedule-day {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-800);
}

.schedule-corner {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted-light);
}

.schedule-day {
  border-left: 1px solid var(--line);
}

.schedule-time {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 2px 8px;
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 9.5px;
  line-height: 1;
  color: var(--muted-light);
  white-space: nowrap;
}

.schedule-slot {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #fff;
}

.schedule-entry {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 2px;
  padding: 6px 7px;
  overflow: hidden;
  border-left: 3px solid var(--entry-accent, #7faed6);
  border-radius: 8px;
  background: var(--entry-bg, #a9cbe8);
  color: var(--navy-900);
  box-shadow: 0 2px 6px rgba(11, 31, 51, 0.08);
  font-size: 10.5px;
  line-height: 1.2;
  word-break: keep-all;
}

.schedule-entry time {
  font-size: 9px;
  font-weight: 700;
  color: rgba(11, 31, 51, 0.66);
}

.schedule-entry strong {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
}

.schedule-entry span {
  font-size: 10px;
  color: rgba(11, 31, 51, 0.78);
}

.schedule-entry small {
  font-size: 9px;
  color: rgba(11, 31, 51, 0.62);
}

.schedule-entry em {
  position: absolute;
  top: 5px;
  right: 6px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.58);
  font-size: 8.5px;
  font-style: normal;
  color: rgba(11, 31, 51, 0.72);
}

.schedule-entry.color-yellow,
.schedule-mobile-entry.color-yellow {
  --entry-bg: #fbf5b8;
  --entry-accent: #d2c84a;
}

.schedule-entry.color-blue,
.schedule-mobile-entry.color-blue {
  --entry-bg: #a9cbe8;
  --entry-accent: #4f8cc9;
}

.schedule-entry.color-mint,
.schedule-mobile-entry.color-mint {
  --entry-bg: #c7f3e4;
  --entry-accent: #48b99a;
}

.schedule-entry.color-sky,
.schedule-mobile-entry.color-sky {
  --entry-bg: #d8edf9;
  --entry-accent: #6bb2d9;
}

.schedule-entry.color-green,
.schedule-mobile-entry.color-green {
  --entry-bg: #d4f3bf;
  --entry-accent: #6cbf4b;
}

/* Recruiting Classes: Warm Gold / Amber Accent */
.schedule-entry.is-recruit {
  z-index: 4;
  border: 2px solid #d97706;
  border-left-width: 5px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.22), 0 8px 18px rgba(11, 31, 51, 0.14);
}

.schedule-entry.is-recruit time {
  color: #92400e;
  font-weight: 700;
}

.schedule-entry.is-recruit strong {
  color: #78350f;
}

.schedule-entry.is-recruit strong .recruit-urgent,
.schedule-mobile-entry.is-recruit strong .recruit-urgent {
  color: #d92d20;
  animation: recruitBlink 1.1s ease-in-out infinite;
}

.schedule-entry.is-recruit small {
  color: #92400e;
  font-weight: 700;
}

.schedule-mobile-entry.is-recruit {
  border: 2px solid #d97706;
  border-left-width: 5px;
  background: linear-gradient(90deg, #fffbeb 0%, rgba(255, 255, 255, 0) 90%);
}

.schedule-mobile-entry.is-recruit strong {
  color: #78350f;
}

.schedule-mobile-entry.is-recruit span {
  color: #92400e;
  font-weight: 700;
}

/* Available Time Slot Gaps: Fresh Emerald Green Tint */
.schedule-entry.schedule-entry--available {
  z-index: 2;
  border: 1.5px dashed #12b76a;
  border-left-width: 4px;
  background: rgba(18, 183, 106, 0.09);
  box-shadow: inset 0 0 0 1px rgba(18, 183, 106, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
}

.schedule-entry.schedule-entry--available:hover {
  background: rgba(18, 183, 106, 0.18);
  border-style: solid;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(18, 183, 106, 0.22);
}

.schedule-entry.schedule-entry--available time {
  color: #027a48;
  font-weight: 700;
}

.schedule-entry.schedule-entry--available strong {
  color: #054f31;
  font-size: 11px;
}

.schedule-entry.schedule-entry--available small {
  color: #027a48;
  font-weight: 700;
}

.schedule-entry.schedule-entry--available em {
  color: #05603a;
  font-size: 8.5px;
  font-style: normal;
  display: block;
  margin-top: 2px;
}

.schedule-mobile-entry.is-available {
  border: 1.5px dashed #12b76a;
  border-left-width: 4px;
  background: rgba(18, 183, 106, 0.08);
}

.schedule-mobile-entry.is-available .schedule-mobile-time {
  color: #027a48;
  font-weight: 700;
}

.schedule-mobile-entry.is-available strong {
  color: #054f31;
}

.schedule-mobile-entry.is-available span {
  color: #027a48;
}

/* Legend Dots */
.legend-dot--open {
  background: #12b76a;
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.25);
}

.legend-dot--recruiting {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.legend-dot--closed {
  background: #98a2b3;
}


.schedule-footnote {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted-light);
}

.schedule-mobile {
  display: none;
}

.schedule-day-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.schedule-day-card h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-900);
}

.schedule-mobile-entry {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  padding: 9px 0 9px 10px;
  border-top: 1px solid var(--line);
  border-left: 3px solid var(--entry-accent, #7faed6);
  background: linear-gradient(90deg, var(--entry-bg, #a9cbe8) 0%, rgba(255, 255, 255, 0) 86%);
  border-radius: 0 8px 8px 0;
}

.schedule-mobile-time {
  flex: 0 0 76px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--navy-700);
}

.schedule-mobile-entry strong {
  display: block;
  font-size: 12.5px;
  color: var(--navy-900);
}

.schedule-mobile-entry span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
}

.schedule-empty {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: var(--muted-light);
}

@media (max-width: 760px) {
  .schedule-scroll {
    display: block;
    padding-bottom: 10px;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .schedule-scroll-hint {
    display: block;
  }

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

  .schedule-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
  }

  .schedule-mobile {
    display: none;
  }
}

.schedule-entry.color-gray,
.schedule-mobile-entry.color-gray {
  --entry-bg: #f2f4f7;
  --entry-accent: #98a2b3;
  color: #475467;
}

.schedule-entry.color-gray time,
.schedule-mobile-entry.color-gray .schedule-mobile-time {
  color: #667085;
}

.schedule-entry.color-gray strong,
.schedule-mobile-entry.color-gray strong {
  color: #344054;
}

.schedule-entry.color-gray span,
.schedule-mobile-entry.color-gray span {
  color: #667085;
}

/* Big View Switcher Buttons */
.schedule-view-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 auto 20px;
  max-width: 940px;
}

.view-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background: #ffffff;
  border: 2.5px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(11, 31, 51, 0.05);
  font-family: inherit;
  position: relative;
}

.view-btn:hover {
  transform: translateY(-2px);
  border-color: var(--navy-700);
  box-shadow: 0 8px 24px rgba(11, 31, 51, 0.1);
}

.view-btn-icon {
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: #f4efe6;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.view-btn:hover .view-btn-icon {
  transform: scale(1.12);
}

.view-btn-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.view-btn-content strong {
  font-size: 18.5px;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.view-btn-content small {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

/* Active State for Closed Classes */
.view-btn[data-schedule-view="closed"].is-active {
  border-color: var(--navy-900);
  background: #f8fafc;
  box-shadow: 0 0 0 3px rgba(11, 31, 51, 0.18), 0 8px 22px rgba(11, 31, 51, 0.08);
}

.view-btn[data-schedule-view="closed"].is-active .view-btn-icon {
  background: var(--navy-900);
  color: #fff;
}

.view-btn[data-schedule-view="closed"].is-active strong {
  color: var(--navy-900);
}

/* Active State for Available Times */
.view-btn[data-schedule-view="available"].is-active {
  border-color: #12b76a;
  background: #f0fdf4;
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.25), 0 8px 22px rgba(18, 183, 106, 0.1);
}

.view-btn[data-schedule-view="available"].is-active .view-btn-icon {
  background: #12b76a;
  color: #fff;
}

.view-btn[data-schedule-view="available"].is-active strong {
  color: #027a48;
}

@media (max-width: 768px) {
  .schedule-view-switcher {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .view-btn {
    padding: 14px 18px;
  }
  .view-btn-icon {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }
  .view-btn-content strong {
    font-size: 17px;
  }
  .view-btn-content small {
    font-size: 12px;
  }
}

/* --- View Modes Visibility Logic --- */

/* View Mode 1: Closed Classes (Default) */
/* View Mode 1: Closed Classes & Recruiting Classes */
.schedule-container.view-mode--closed .schedule-entry.schedule-entry--available,
.schedule-container.view-mode--closed .schedule-mobile-entry.is-available {
  display: none !important;
}

.schedule-container.view-mode--closed .schedule-entry.is-recruit,
.schedule-container.view-mode--closed .schedule-mobile-entry.is-recruit {
  display: block !important;
}

.schedule-container.view-mode--closed .schedule-entry.color-gray {
  display: block !important;
}

.schedule-container.view-mode--closed .legend-item--open,
.schedule-container.view-mode--closed .legend-item--recruiting {
  display: none !important;
}

.schedule-container.view-mode--closed .legend-item--closed {
  display: inline-flex !important;
}

/* View Mode 2: Available & Recruiting Classes */
.schedule-container.view-mode--available .schedule-entry.color-gray,
.schedule-container.view-mode--available .schedule-mobile-entry.color-gray {
  display: none !important;
}

.schedule-container.view-mode--available .schedule-entry.schedule-entry--available,
.schedule-container.view-mode--available .schedule-mobile-entry.is-available,
.schedule-container.view-mode--available .schedule-entry.is-recruit,
.schedule-container.view-mode--available .schedule-mobile-entry.is-recruit {
  display: block !important;
}

.schedule-container.view-mode--available .legend-item--closed {
  display: none !important;
}

.schedule-container.view-mode--available .legend-item--open,
.schedule-container.view-mode--available .legend-item--recruiting {
  display: inline-flex !important;
}

/* Polish schedule entry typography & line breaks */
.schedule-entry {
  line-height: 1.35 !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
  gap: 3px !important;
  padding: 6px 8px !important;
}

.schedule-entry time {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  margin-bottom: 2px !important;
  display: block !important;
}

.schedule-entry strong {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
  word-break: keep-all !important;
  display: block !important;
}

.schedule-entry span {
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  word-break: keep-all !important;
  display: block !important;
}

.schedule-entry small {
  font-size: 9px !important;
  line-height: 1.25 !important;
  display: block !important;
}

/* Recruiting Slot Clean Line Breaks */
.schedule-entry.is-recruit strong {
  font-size: 11.5px !important;
  line-height: 1.35 !important;
  color: #78350f !important;
}

.schedule-entry.is-recruit .badge-recruit {
  background: #d92d20;
  color: #ffffff;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  margin-right: 3px;
  display: inline-block;
  vertical-align: 1px;
}

.schedule-entry.is-recruit .entry-sub {
  color: #92400e !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

.schedule-entry.is-recruit .entry-note {
  color: #b45309 !important;
  font-size: 8.5px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  margin-top: 1px !important;
}

/* Available Slot Clean Line Breaks */
.schedule-entry.schedule-entry--available .slot-title {
  color: #054f31 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
}

.schedule-entry.schedule-entry--available .slot-duration {
  display: inline-block !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  color: #027a48 !important;
  background: rgba(18, 183, 106, 0.12) !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  width: fit-content !important;
  margin-top: 1px !important;
}

.schedule-entry.schedule-entry--available .slot-note {
  font-size: 9px !important;
  color: #05603a !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  margin-top: 2px !important;
}

/* Mobile entries typography */
.schedule-mobile-entry {
  line-height: 1.4 !important;
}

.schedule-mobile-entry strong {
  font-size: 13.5px !important;
  line-height: 1.35 !important;
}

.schedule-mobile-entry span {
  font-size: 12px !important;
  line-height: 1.35 !important;
}

/* Timetable Download Bar */
.schedule-download-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 18px;
  background: #fdfbf7;
  border: 1.5px solid var(--line);
  border-radius: 12px;
}

.schedule-download-bar .download-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-900);
}

.download-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--navy-900);
  color: #ffffff !important;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(11, 31, 51, 0.12);
}

.btn-download:hover {
  background: var(--navy-800);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(11, 31, 51, 0.18);
}

.btn-download--img {
  background: #fff;
  color: var(--navy-900) !important;
  border: 1.5px solid var(--navy-900);
}

.btn-download--img:hover {
  background: #f4efe6;
  color: var(--navy-900) !important;
}

@media (max-width: 650px) {
  .schedule-download-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .download-buttons {
    flex-direction: column;
  }
  .btn-download {
    justify-content: center;
    width: 100%;
    padding: 10px 14px;
  }
}

/* --- Schedule Consultation Confirmation Modal --- */
.schedule-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.schedule-modal-layer[hidden] {
  display: none !important;
}

.schedule-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 51, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.schedule-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 20px;
  border-top: 4px solid var(--gold);
  padding: 32px 26px 24px;
  box-shadow: 0 20px 60px rgba(11, 31, 51, 0.35);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.schedule-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: #f1f5f9;
  color: var(--navy-900);
  font-size: 20px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.schedule-modal-close:hover {
  background: var(--navy-900);
  color: #fff;
}

.schedule-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
}

.schedule-modal-card h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy-900);
  margin-bottom: 16px;
}

.schedule-modal-card h3 strong {
  color: #c3a163;
}

.schedule-modal-info {
  background: #fdfbf7;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-modal-info .info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
}

.schedule-modal-info .info-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

.schedule-modal-info .info-val {
  font-weight: 700;
  color: var(--navy-900);
  text-align: right;
  word-break: keep-all;
}

.schedule-modal-msg {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.schedule-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.schedule-modal-actions .btn {
  flex: 1;
  padding: 12px 14px;
  font-size: 14px;
  justify-content: center;
}

/* Make recruiting classes explicitly styled as clickable cards */
.schedule-entry.is-recruit,
.schedule-mobile-entry.is-recruit {
  cursor: pointer !important;
  transition: all 0.25s ease !important;
}

.schedule-entry.is-recruit:hover,
.schedule-mobile-entry.is-recruit:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.35) !important;
  border-color: #b45309 !important;
}
