.class-schedule { --schedule-ink: #152945; --schedule-mist: #f4f7fd; }
.class-schedule [hidden] { display: none !important; }
.schedule-settings, .schedule-calendar {
    display: grid;
    grid-template-columns: minmax(170px, 1.5fr) minmax(120px, 1fr) minmax(82px, .65fr) minmax(135px, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.schedule-settings label, .schedule-calendar label, .schedule-dialog label {
    display: grid;
    gap: 4px;
    min-width: 0;
    font-weight: 650;
    font-size: .86rem;
}
.schedule-settings .input, .schedule-settings .select, .schedule-calendar .input { width: 100%; min-width: 0; margin: 0; }
.schedule-board {
    margin-block-start: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg);
}
.schedule-board-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: #152945;
    color: #fff;
}
.schedule-board-heading h2 { margin: 0; font-size: clamp(1rem, 3vw, 1.3rem); overflow-wrap: anywhere; }
.schedule-board-heading span { white-space: nowrap; font-size: .85rem; color: #e1ecff; }
.schedule-scroll { overflow-x: auto; }
.schedule-table { border-collapse: collapse; table-layout: fixed; width: 100%; min-width: 650px; }
.schedule-table[data-days="7"] { min-width: 830px; }
.schedule-table th, .schedule-table td { border: 1px solid var(--line); padding: 6px; vertical-align: middle; }
.schedule-table thead th { background: var(--schedule-mist); color: var(--schedule-ink); font-size: .85rem; }
.schedule-table th:first-child { width: 112px; }
.schedule-slot { display: grid; justify-items: center; gap: 3px; font-size: .78rem; }
.schedule-slot input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 5px; padding: 3px; font: inherit; text-align: center; color: inherit; background: var(--bg); }
.schedule-cell {
    width: 100%;
    min-height: 66px;
    padding: 7px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--schedule-mist);
    color: var(--schedule-ink);
    cursor: pointer;
    text-align: start;
    font: inherit;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.schedule-cell.is-empty { text-align: center; border: 1px dashed #c5d2e8; color: #436086; background: transparent; }
.schedule-cell.is-filled { border-inline-start: 4px solid var(--lesson-color); background: color-mix(in srgb, var(--lesson-color) 12%, #fff); }
.schedule-cell[draggable="true"] { cursor: grab; }
.schedule-cell strong, .schedule-cell small { display: block; }
.schedule-cell small { margin-block-start: 4px; }
.schedule-cell.is-conflict, .schedule-slot input[aria-invalid="true"] { outline: 2px solid #b42318; outline-offset: -2px; }
.schedule-cell .schedule-warning { color: #8b1b13; font-weight: 700; }
.schedule-cell.is-drop-target { outline: 2px dashed #2563eb; outline-offset: -2px; }
.schedule-exports, .schedule-export-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.schedule-exports details { flex: 1 1 250px; }
.schedule-exports summary { cursor: pointer; font-weight: 650; }
.schedule-calendar { grid-template-columns: repeat(2, minmax(130px, 1fr)) auto; margin-block-start: 10px; }
.schedule-status:empty { display: none; }
.schedule-dialog { width: min(430px, calc(100vw - 24px)); border: 1px solid var(--line); border-radius: 16px; padding: 22px; color: var(--text); background: var(--bg); }
.schedule-dialog::backdrop { background: rgb(21 41 69 / .52); }
.schedule-dialog form { display: grid; gap: 12px; }
.schedule-dialog h2, .schedule-dialog p { margin: 0; }
.schedule-dialog input[type="color"] { min-width: 52px; min-height: 34px; border: 0; padding: 0; background: transparent; }
@media (max-width: 750px) {
    .schedule-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .schedule-name { grid-column: 1 / -1; }
    .schedule-settings > button { grid-column: 1 / -1; justify-self: start; }
    .schedule-table th:first-child { position: sticky; inset-inline-start: 0; background: var(--bg); z-index: 1; }
}
@media (max-width: 470px) {
    .schedule-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .schedule-calendar > button { grid-column: 1 / -1; justify-self: start; }
    .schedule-board-heading { padding: 12px; }
}
