body.fixed-schedule-canonical #content,
body.fixed-schedule-canonical .fixed-canonical-panel,
body.fixed-schedule-canonical .fixed-canonical-board {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.fixed-canonical-actions {
  align-items: center;
  flex-wrap: wrap;
}

#fixed-canonical-status[data-status="error"] { color: #a32318; }
#fixed-canonical-status[data-status="saving"],
#fixed-canonical-status[data-status="pending"] { color: #866000; }
#fixed-canonical-status[data-status="saved"] { color: #176734; }

.internal-color-field select { border-left-width: 10px; }
.fixed-canonical-grid .matrix-cell[data-internal-color="blue"] { background: #dceeff !important; border-color: #75add8 !important; color: #123f60 !important; }
.fixed-canonical-grid .matrix-cell[data-internal-color="green"] { background: #dff4e9 !important; border-color: #73bd99 !important; color: #176748 !important; }
.fixed-canonical-grid .matrix-cell[data-internal-color="yellow"] { background: #fff4c9 !important; border-color: #dfbd4e !important; color: #72550a !important; }
.fixed-canonical-grid .matrix-cell[data-internal-color="orange"] { background: #ffe5cd !important; border-color: #e79b59 !important; color: #7a3f0d !important; }
.fixed-canonical-grid .matrix-cell[data-internal-color="pink"] { background: #fbe0ec !important; border-color: #d98bad !important; color: #792946 !important; }
.fixed-canonical-grid .matrix-cell[data-internal-color="purple"] { background: #ece2fa !important; border-color: #a68acf !important; color: #4e3474 !important; }
.fixed-canonical-grid .matrix-cell[data-internal-color="gray"] { background: #e8edf1 !important; border-color: #9eabb4 !important; color: #394b57 !important; }
.fixed-canonical-grid .matrix-cell[data-internal-color="turquoise"] { background: #d9f4f1 !important; border-color: #69bdb5 !important; color: #145d58 !important; }

.fixed-canonical-day {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.fixed-canonical-grid.schedule-matrix.explicit-matrix {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(54px, .38fr) repeat(var(--teacher-count), minmax(0, 1fr)) !important;
}

.fixed-canonical-grid .matrix-head,
.fixed-canonical-grid .matrix-cell,
.fixed-canonical-grid .matrix-time {
  width: auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.fixed-canonical-grid .matrix-head,
.fixed-canonical-grid .matrix-cell {
  padding-left: 4px;
  padding-right: 4px;
  font-size: clamp(9px, .72vw, 13px);
}

.fixed-canonical-grid .matrix-head,
.fixed-canonical-grid .matrix-cell strong,
.fixed-canonical-grid .matrix-cell small,
.fixed-canonical-grid .matrix-cell time {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fixed-canonical-grid .matrix-head,
.fixed-canonical-grid .matrix-cell small,
.fixed-canonical-grid .matrix-cell time {
  white-space: nowrap;
}

.fixed-canonical-grid .matrix-cell strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
}

@media (max-width: 760px) {
  body.fixed-schedule-canonical .fixed-canonical-board { overflow-x: auto; }
  .fixed-canonical-day { overflow-x: auto; }
  .fixed-canonical-grid.schedule-matrix.explicit-matrix {
    min-width: max(620px, calc(58px + var(--teacher-count) * 130px));
    grid-template-columns: 58px repeat(var(--teacher-count), minmax(130px, 1fr)) !important;
  }
  .fixed-canonical-actions { width: 100%; }
  #fixed-canonical-status { flex: 1 0 100%; }
}
