.schedule-hero {
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.schedule-hero > :first-child { min-width: 0; overflow-wrap: anywhere; }
.schedule-hero .hero-actions { flex: 0 1 auto; min-width: 0; }

.schedule-main-panel .schedule-cascade-bar {
  background: #fff;
  padding: 16px 20px;
}
.schedule-person-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
}
.schedule-person-filter select {
  background-color: #fff;
  color: var(--ink);
  min-height: 36px;
  min-width: 170px;
  max-width: 100%;
  width: 228px;
}
.schedule-main-panel .schedule-mode-switch {
  padding: 3px;
  background: var(--brand-soft);
  border-radius: 8px;
}
.schedule-main-panel .schedule-mode-switch .button { border-color: transparent; }
.schedule-main-panel .schedule-mode-switch .button.is-active {
  background: var(--brand);
  color: #fff;
}
.schedule-main-panel .schedule-focus-bar {
  align-items: center;
  background: #f8f9ff;
}
.schedule-result {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 13px 20px;
  color: var(--muted);
  font-size: 12.5px;
}
.schedule-result strong { color: var(--ink); }
.schedule-jump {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8f9ff;
  color: var(--muted);
  font-size: 13px;
}
.schedule-print-table { display: none; }
.schedule-main-panel :is(.schedule-day, .session-item, .excel-day, .excel-row):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.schedule-main-panel .excel-schedule-wrap { padding: 0; }
.schedule-main-panel .excel-schedule-table {
  border: 0;
  white-space: normal;
}
.schedule-main-panel .excel-schedule-table thead th {
  background: #1f2057;
  color: #fff;
  border-color: #343569;
  white-space: normal;
  vertical-align: middle;
}
.schedule-main-panel .excel-schedule-table td {
  padding: 12px 10px;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.schedule-main-panel .excel-row .excel-time { white-space: normal; font-variant-numeric: tabular-nums; }
.schedule-main-panel .excel-time strong { color: var(--brand); }
.schedule-main-panel .excel-course-name { font-size: 14px; line-height: 1.4; }
.schedule-main-panel .excel-row small { display: block; margin-top: 3px; }
.schedule-main-panel .excel-row .sched-pill { white-space: normal; }
.schedule-main-panel .excel-actions { white-space: normal; }
.schedule-main-panel .excel-actions > * + * { margin-left: 0; }
.excel-secondary-actions {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: 5px;
  font-size: 12px;
}
.excel-secondary-actions .button { padding: 2px 6px; }
.schedule-main-panel .excel-day th { padding: 0; }
.schedule-main-panel .schedule-day-banner {
  padding: 9px 18px;
  background: #eef0ff;
  border: 0;
}
.schedule-main-panel .schedule-day-banner .schedule-day-title {
  color: #26276a;
  font-size: 14px;
  font-weight: 750;
}
.schedule-main-panel .schedule-day-banner .badge { background: #fff; color: #39327d; }
.schedule-parallel {
  display: inline-block;
  width: fit-content;
  padding: 2px 7px;
  border-radius: 5px;
  background: #eaf0ff;
  color: #333782;
  font-size: 11.5px;
  font-weight: 700;
}
.excel-time .schedule-parallel { display: block; margin-top: 5px; }

.schedule-main-panel .schedule-card-list { display: grid; gap: 10px; padding: 12px; }
.schedule-main-panel .excel-detail-row .schedule-card-list { padding: 0; }
.schedule-main-panel .schedule-card-list .session-item {
  border-radius: 9px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.schedule-main-panel .session-main-title { font-size: 17px; }
.schedule-status-row { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 7px; }
.schedule-status-row .sched-pill { white-space: normal; }
.schedule-session-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 13px 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f7f8ff;
}
.schedule-session-facts dt { color: var(--muted); font-size: 12px; }
.schedule-session-facts dd { margin: 3px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.schedule-extra-actions { margin-top: 10px; }
.schedule-extra-actions summary { color: var(--brand); cursor: pointer; font-size: 13px; font-weight: 650; width: fit-content; }
.schedule-extra-actions .item-actions { justify-content: flex-start; margin-top: 8px; }

.session-attendance-panel .panel-body { overflow-wrap: anywhere; }
.session-checkin-picker { max-width: 520px; margin-bottom: 10px; }
.session-checkin-picker select { width: 100%; min-width: 0; min-height: 44px; }
.session-checkin-summary { margin: 14px 0 6px; font-size: 14px; }
.session-attendance-panel .session-roster { padding-inline: 0; }
.session-attendance-panel .session-roster-row { padding: 9px 12px; }
.session-attendance-panel .session-roster-row > :first-child { min-width: 0; }
.participant-cell-label { display: none; }

@media screen {
  .schedule-main-panel .excel-schedule-wrap { max-height: min(68dvh, 760px); overflow: auto; scroll-padding-block-start: 44px; }
  .schedule-main-panel .excel-schedule-table { min-width: 850px; }
  .schedule-main-panel .excel-schedule-table thead { position: sticky; top: 0; z-index: 2; }
  .schedule-main-panel .excel-schedule-table :is(thead th:first-child, .excel-time) {
    position: sticky;
    inset-inline-start: 0;
    z-index: 1;
    box-shadow: 1px 0 var(--line);
  }
  .schedule-main-panel .excel-row .excel-time { background: var(--surface); }
  .schedule-main-panel .excel-row > :first-child { min-width: 110px; }
  .schedule-main-panel .excel-row > :nth-child(2) { min-width: 150px; }
  .schedule-main-panel .excel-row > :nth-child(3) { min-width: 110px; }
  .schedule-main-panel .excel-row > :nth-child(5) { min-width: 95px; }
}
@media screen and (max-width: 1060px) {
  :is(.schedule-hero, .schedule-main-panel, .session-attendance-panel, .participant-table) .button,
  .schedule-main-panel .schedule-focus-chip,
  .schedule-person-filter select { min-height: 44px; }
  .schedule-main-panel :is(.schedule-day, .session-item) { scroll-margin-block-start: 7rem; }
  .schedule-main-panel .session-card-head { flex-wrap: wrap; }
  .session-attendance-panel .panel-body { padding: 14px; }
  .participant-table-wrap { overflow: visible; }
  .participant-table { display: block; white-space: normal; }
  .participant-table > thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .participant-table > tbody { display: grid; gap: 10px; padding: 12px; }
  .participant-table > tbody > tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
  }
  .participant-table > tbody > tr.is-duplicate-row { border-color: #e7bd91; }
  .participant-table > tbody > tr > td { padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
  .participant-table > tbody > tr > td:is(:first-child, :last-child) { grid-column: 1 / -1; }
  .participant-table > tbody > tr > td:first-child { font-size: 15px; }
  .participant-table .item-actions { justify-content: flex-start; }
  .participant-table .badge { white-space: normal; }
  .participant-cell-label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
}
@media screen and (max-width: 650px) {
  .schedule-jump,
  .schedule-main-panel .schedule-cascade-bar,
  .schedule-main-panel .schedule-focus-bar,
  .schedule-main-panel .schedule-result { padding-inline: 12px; }
  .schedule-session-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  .schedule-hero { display: block; }
  .schedule-print-table { display: block; }
  .schedule-result, .schedule-main-panel .schedule-day-banner { padding: 1.5mm 2mm; }
  .schedule-main-panel .excel-schedule-table { table-layout: fixed; font-size: 8.5pt; }
  .schedule-main-panel .excel-schedule-table thead th { background: #f1f2fb; color: #202344; border-color: var(--line); }
  .schedule-main-panel .excel-schedule-table :is(th, td) {
    min-width: 0;
    padding: 1.4mm 1mm;
    overflow-wrap: anywhere;
  }
  .schedule-main-panel .excel-schedule-table thead th:nth-child(1) { width: 13%; }
  .schedule-main-panel .excel-schedule-table thead th:nth-child(2) { width: 24%; }
  .schedule-main-panel .excel-schedule-table thead th:nth-child(3) { width: 18%; }
  .schedule-main-panel .excel-schedule-table thead th:nth-child(4) { width: 11%; }
  .schedule-main-panel .excel-schedule-table thead th:nth-child(5) { width: 15%; }
  .schedule-main-panel .excel-schedule-table thead th:nth-child(6) { width: 8%; }
  .schedule-main-panel .excel-schedule-table thead th:nth-child(7) { width: 11%; }
  .schedule-main-panel .excel-day th { padding: 0; }
  .schedule-main-panel .excel-day { break-after: avoid-page; }
  .schedule-main-panel .excel-detail-row { break-inside: auto; }
  .schedule-main-panel .excel-course-name,
  .schedule-main-panel .schedule-day-banner .schedule-day-title { font-size: 9pt; }
  .schedule-main-panel .excel-row small,
  .schedule-main-panel .excel-warn,
  .schedule-main-panel .sched-pill,
  .schedule-parallel { font-size: 7.5pt; }
  .schedule-main-panel .schedule-card-list { display: block; padding: 2mm; }
  .schedule-main-panel .schedule-card-list .session-item {
    break-inside: auto;
    background: #fff;
    margin-bottom: 2mm;
  }
  .schedule-main-panel .session-card-head,
  .schedule-main-panel .schedule-day-banner { break-after: avoid-page; }
  .schedule-main-panel .schedule-session-facts { break-inside: avoid-page; }
}
