    .sch {
        --s-primary: #0062cc;
        --s-dark: #004a99;
        --s-ink: #1d2b3d;
        --s-muted: #6b7a8f;
        --s-line: #dce5f1;
        --s-surface: #fff;
        --s-free: #fbfcfe;
        max-width: 1500px;
        margin: 0 auto;
        padding-bottom: 40px;
    }

    .sch-notice {
        margin: 0 0 18px;
        padding: 11px 15px;
        border: 1px solid #f2cfae;
        border-left: 4px solid #d9822b;
        border-radius: 10px;
        background: #fff8f0;
        color: #8a4b0f;
        font-size: .92rem;
    }

    /* ---------- Шапка ---------- */
    .sch-head {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        justify-content: space-between;
        gap: 14px;
        margin-bottom: 6px;
    }

    .sch-eyebrow {
        margin: 0;
        font-size: .78rem;
        font-weight: 500;
        letter-spacing: .09em;
        text-transform: uppercase;
        color: var(--s-muted);
    }

    .sch .sch-title h1 {
        margin: 4px 0 0;
        font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
        font-weight: 700;
        line-height: 1.15;
        color: var(--s-dark);
        text-align: left;
    }

    .sch-faculty {
        max-width: 62ch;
        margin: 7px 0 0;
        font-size: .9rem;
        color: var(--s-muted);
    }

    .sch-toolbar {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }

    .sch-btn {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 10px 18px;
        border-radius: 10px;
        background: var(--s-primary);
        color: #fff;
        font-size: .94rem;
        font-weight: 600;
        text-decoration: none;
        box-shadow: 0 2px 8px rgba(0, 98, 204, .25);
        transition: background-color .15s ease;
    }

    .sch-btn:hover {
        background: var(--s-dark);
        color: #fff;
    }

    .sch-btn.is-ghost {
        background: #fff;
        border: 1px solid var(--s-line);
        color: var(--s-dark);
        box-shadow: none;
    }

    .sch-btn.is-ghost:hover {
        background: #eef4fe;
        border-color: var(--s-primary);
        color: var(--s-primary);
    }

    .sch-hint {
        margin: 0;
        font-size: .78rem;
        color: var(--s-muted);
    }

    /* ---------- Тиждень ---------- */
    .sch-week {
        margin-top: 26px;
    }

    .sch .sch-week-title {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--s-dark);
        text-align: left;
    }

    .sch-fold > summary {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
        cursor: pointer;
        list-style: none;
    }

    .sch-fold > summary::-webkit-details-marker {
        display: none;
    }

    .sch-fold > summary::before {
        content: '';
        flex: none;
        width: 8px;
        height: 8px;
        border-right: 2px solid var(--s-muted);
        border-bottom: 2px solid var(--s-muted);
        transform: rotate(-45deg);
        transition: transform .15s ease;
    }

    .sch-fold[open] > summary::before {
        transform: rotate(45deg);
    }

    .sch-fold > summary:focus-visible {
        outline: 2px solid var(--s-primary);
        outline-offset: 3px;
        border-radius: 6px;
    }

    .sch-week-note {
        margin: 0 0 12px;
        padding: 10px 14px;
        border-left: 3px solid var(--s-primary);
        border-radius: 0 8px 8px 0;
        background: #eef4fe;
        color: var(--s-dark);
        font-size: .88rem;
        line-height: 1.45;
    }

    .sch-week-empty {
        padding: 2px 9px;
        border-radius: 999px;
        background: #f0f3f8;
        color: #8794a6;
        font-size: .7rem;
        font-weight: 600;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    /* ---------- Таблиця ---------- */
    .sch-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid var(--s-line);
        border-radius: 14px;
        background: var(--s-surface);
    }

    .sch .sch-table {
        width: 100%;
        min-width: 920px;
        border-collapse: separate;
        border-spacing: 0;
        table-layout: fixed;
        font-size: 1rem;
        line-height: 1.35;
    }

    .sch .sch-table th,
    .sch .sch-table td {
        border-right: 1px solid var(--s-line);
        border-bottom: 1px solid var(--s-line);
        vertical-align: top;
    }

    .sch .sch-table tr > *:last-child {
        border-right: 0;
    }

    .sch .sch-table tbody tr:last-child > * {
        border-bottom: 0;
    }

    .sch .sch-table thead th {
        padding: 12px 8px !important;
        background: #eef4fe !important;
        color: var(--s-dark) !important;
        font-size: .88rem;
        font-weight: 700;
        text-align: center;
    }

    .sch .sch-table thead .sch-day-name.is-marked {
        background: #d9e9fd !important;
    }

    .sch-day-flag {
        display: block;
        margin-top: 3px;
        font-size: .68rem;
        font-weight: 600;
        color: var(--s-primary);
    }

    .sch-date {
        display: block;
        margin-top: 3px;
        font-size: .75rem;
        font-weight: 600;
        color: var(--s-muted);
        font-variant-numeric: tabular-nums;
    }

    .sch .sch-table thead th.is-today {
        background: #dcf1e3 !important;
    }

    .sch .sch-table thead th.is-today .sch-date {
        color: #0f6b4d;
    }

    .sch-day-today {
        display: block;
        margin-top: 3px;
        color: #0f6b4d;
        font-size: .68rem;
        font-weight: 700;
    }

    .sch .sch-table td.is-today {
        background: #f5fbf7;
    }

    .sch .sch-table td.is-today.is-free {
        background: #f1f9f4;
    }

    .sch .sch-table .sch-corner,
    .sch .sch-table tbody th.sch-hour {
        position: sticky;
        left: 0;
        z-index: 2;
        width: 94px;
    }

    .sch .sch-table .sch-corner {
        z-index: 3;
        background: #eef4fe !important;
    }

    .sch .sch-table tbody th.sch-hour {
        padding: 10px 6px !important;
        background: #f6faff !important;
        color: var(--s-dark) !important;
        text-align: center;
    }

    .sch-hour-num {
        display: block;
        font-size: 1.05rem;
        font-weight: 700;
        line-height: 1.1;
    }

    .sch-hour-time {
        display: block;
        margin-top: 2px;
        font-size: .72rem;
        font-weight: 500;
        color: var(--s-muted);
        white-space: nowrap;
    }

    .sch .sch-table td {
        padding: 6px !important;
        background: var(--s-surface);
    }

    .sch .sch-table td.is-free {
        background: var(--s-free);
    }

    .sch .sch-table td.is-marked {
        background: #f4f9ff;
    }

    /* ---------- Картка пари ---------- */
    .sch-stack {
        display: flex;
        flex-direction: column;
        gap: 6px;
        height: 100%;
    }

    .sch-stack.is-split {
        flex-direction: row;
        align-items: stretch;
    }

    .sch-stack.is-split > .sch-pair {
        flex: 1 1 0;
        min-width: 0;
    }

    .sch-pair {
        display: flex;
        flex-direction: column;
        padding: 8px 9px 8px 11px;
        border: 1px solid var(--s-line);
        border-left: 3px solid var(--s-muted);
        border-radius: 8px;
        background: #fff;
        font-size: .82rem;
        line-height: 1.35;
        text-align: left;
    }

    .sch-pair.is-lecture {
        border-left-color: #0062cc;
    }

    .sch-pair.is-practice {
        border-left-color: #12805c;
    }

    .sch-pair.is-lab {
        border-left-color: #b0611c;
    }

    .sch-pair.is-exam {
        border-left-color: #b3261e;
    }

    .sch-pair.is-placeholder {
        border-style: dashed;
        border-left-color: var(--s-line);
        background: transparent;
    }

    .sch-subgroup {
        align-self: flex-start;
        margin-bottom: 4px;
        padding: 1px 8px;
        border-radius: 999px;
        background: #eef4fe;
        color: var(--s-dark);
        font-size: .7rem;
        font-weight: 600;
    }

    .sch-subject {
        color: var(--s-ink);
        font-size: .86rem;
        font-weight: 700;
        overflow-wrap: anywhere;
    }

    .sch-meta-line {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 3px 7px;
        margin-top: 4px;
        color: var(--s-muted);
        font-size: .78rem;
    }

    .sch-room a {
        color: #a3282a;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
    }

    .sch-room-sep {
        color: #c3cddb;
    }

    .sch-noroom {
        font-style: italic;
    }

    .sch-teachers {
        margin-top: 5px;
        font-size: .78rem;
    }

    .sch-teachers a {
        display: block;
        color: var(--s-ink);
        font-style: italic;
        text-decoration: none;
    }

    .sch-teachers a:hover,
    .sch-room a:hover,
    .sch-flow a:hover {
        text-decoration: underline;
    }

    .sch-flow {
        display: flex;
        flex-wrap: wrap;
        gap: 3px 5px;
        margin-top: 6px;
    }

    .sch-flow a {
        padding: 1px 6px;
        border-radius: 5px;
        background: #f2f6fd;
        color: var(--s-muted);
        font-size: .72rem;
        text-decoration: none;
        white-space: nowrap;
    }

    /* ---------- Дії адміністратора ---------- */
    .sch-admin {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
        margin-bottom: 5px;
    }

    .sch-fill {
        margin-right: auto;
        padding: 1px 7px;
        border-radius: 999px;
        background: #e8f5ee;
        color: #12805c;
        font-size: .7rem;
        font-weight: 700;
        font-variant-numeric: tabular-nums;
    }

    .sch-fill.is-over {
        background: #fdecea;
        color: #b3261e;
    }

    .sch-act {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        padding: 0;
        border: 1px solid var(--s-line);
        border-radius: 7px;
        background: #fff;
        cursor: pointer;
        opacity: .6;
        transition: opacity .15s ease, border-color .15s ease, background-color .15s ease;
    }

    .sch-act img {
        display: block;
        width: 14px;
        height: 14px;
    }

    .sch-pair:hover .sch-act,
    .sch-act:focus-visible {
        opacity: 1;
    }

    .sch-act:hover {
        opacity: 1;
        border-color: var(--s-primary);
        background: #eef4fe;
    }

    .sch-act.delete:hover {
        border-color: #b3261e;
        background: #fdf0ef;
    }

    /* Порожня клітинка — точка входу для додавання пари */
    .sch-cell[data-add-day] {
        cursor: pointer;
    }

    .sch-cell[data-add-day]:hover {
        background: #eaf4ff;
    }

    .sch-add {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        color: var(--s-primary);
        font-size: 1.4rem;
        font-weight: 300;
        line-height: 1;
        opacity: 0;
        transition: opacity .15s ease;
    }

    .sch-cell[data-add-day]:hover .sch-add {
        opacity: 1;
    }

    /* ---------- Список по днях (телефон) ---------- */
    .sch-days {
        display: none;
    }

    .sch-day {
        overflow: hidden;
        border: 1px solid var(--s-line);
        border-radius: 14px;
        background: #fff;
    }

    .sch .sch-day-title {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 4px 8px;
        margin: 0;
        padding: 11px 15px;
        background: #eef4fe;
        color: var(--s-dark);
        font-size: .95rem;
        font-weight: 700;
        text-align: left;
    }

    .sch-day-date {
        font-size: .85rem;
        font-weight: 500;
        color: var(--s-muted);
    }

    .sch-day.is-today {
        border-color: #9fd4b3;
    }

    .sch-day.is-today .sch-day-title {
        background: #dcf1e3;
        color: #0f6b4d;
    }

    .sch-day.is-today .sch-day-date {
        color: #2c8560;
    }

    .sch-day-title .sch-day-today {
        display: inline-block;
        margin: 0 0 0 auto;
        padding: 1px 9px;
        border-radius: 999px;
        background: #0f6b4d;
        color: #fff;
        font-size: .68rem;
        font-weight: 700;
    }

    .sch-slot {
        display: flex;
        gap: 12px;
        padding: 11px 14px;
    }

    .sch-slot + .sch-slot {
        border-top: 1px solid #eef2f8;
    }

    .sch-slot-time {
        flex: none;
        width: 62px;
        text-align: center;
        color: var(--s-dark);
    }

    .sch-slot-pairs {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        gap: 8px;
        min-width: 0;
    }

    .sch-empty {
        margin: 18px 0;
        padding: 32px 20px;
        border: 1px dashed var(--s-line);
        border-radius: 14px;
        background: #fff;
        color: var(--s-muted);
        text-align: center;
    }

    @media (max-width: 920px) {
        .sch-scroll {
            display: none;
        }

        .sch-days {
            display: grid;
            gap: 12px;
        }

        .sch-head,
        .sch-toolbar {
            align-items: flex-start;
        }

        .sch-pair {
            font-size: .88rem;
        }

        .sch-subject {
            font-size: .95rem;
        }

        .sch-meta-line,
        .sch-teachers {
            font-size: .84rem;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .sch * {
            transition: none !important;
        }
    }

    @media print {
        .sch-notice,
        .sch-toolbar,
        .sch-admin {
            display: none !important;
        }

        .sch-scroll {
            display: block !important;
            overflow: visible;
        }

        .sch-days {
            display: none !important;
        }
    }

/* ---------- Режим «вільні аудиторії» ---------- */
.sch-rooms-free {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 4px;
    max-height: 210px;
    overflow: auto;
}

.sch-rooms-free a {
    padding: 1px 7px;
    border-radius: 5px;
    background: #eef4fe;
    color: var(--s-dark);
    font-size: .72rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.sch-rooms-free a:hover {
    background: #d9e9fd;
    color: var(--s-primary);
}

.sch.is-free-mode .sch-table {
    min-width: 1150px;
}

/* Тут немає списку по днях, тому таблиця лишається й на вузькому екрані */
.sch.is-free-mode .sch-scroll {
    display: block;
}
