body.blind-school-page {
    --school-ink: var(--sk-ink, #2e2118);
    --school-muted: var(--sk-muted, #7c6a59);
    --school-line: var(--sk-line, rgba(139, 90, 43, 0.22));
    --school-panel: var(--sk-panel-strong, #ffffff);
    --school-soft: var(--sk-panel, #fffdf8);
    --school-cream: #fffaf2;
    --school-copper: var(--sk-copper, #8b4513);
    --school-copper-2: var(--sk-copper-2, #a7652d);
    --school-gold: var(--sk-gold, #d2a263);
    --school-shadow: var(--sk-shadow-soft, 0 12px 28px rgba(74, 46, 23, 0.07));
    font-family: "Microsoft YaHei", "微软雅黑", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 12% 0%, rgba(211, 162, 99, 0.10), transparent 32%),
        radial-gradient(circle at 88% 8%, rgba(139, 69, 19, 0.05), transparent 34%),
        linear-gradient(180deg, rgba(255,250,242,0.64), rgba(255,255,255,0)),
        var(--sk-bg, #ffffff) !important;
    color: var(--school-ink);
}

/* 20260605 keep collapsed school sidebar from overlaying content. */
@media (min-width: 981px) {
    body.blind-school-page:not(.blind-lesson-page) .school-workbench.sidebar-collapsed {
        grid-template-columns: 54px minmax(0, 1fr) !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-workbench.sidebar-collapsed .school-title-block > :not(.school-sidebar-toggle),
    body.blind-school-page:not(.blind-lesson-page) .school-workbench.sidebar-collapsed .school-rail,
    body.blind-school-page:not(.blind-lesson-page) .school-workbench.sidebar-collapsed .school-rail.school-rail-mobile-scroll {
        display: none !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-workbench.sidebar-collapsed .school-sidebar {
        width: 54px !important;
        min-width: 54px !important;
        max-width: 54px !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-workbench.sidebar-collapsed .school-title-block {
        min-height: 54px !important;
        padding: 0 !important;
    }
}

/* 20260605 mobile school subnav matches quiz-space tabs. */
@media (max-width: 760px) {
    body.blind-school-page:not(.blind-lesson-page) .school-rail,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll {
        box-sizing: border-box !important;
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 4px 5px !important;
        border: 1px solid rgba(207, 164, 104, 0.72) !important;
        border-radius: 18px !important;
        background: rgba(255, 253, 248, 0.96) !important;
        box-shadow: none !important;
        overflow: hidden !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail::before,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll::before {
        display: none !important;
        content: none !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a {
        box-sizing: border-box !important;
        position: relative !important;
        display: inline-flex !important;
        flex: none !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 36px !important;
        margin: 0 !important;
        padding: 6px 1px 9px !important;
        border: 1px solid transparent !important;
        border-radius: 14px !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #74441f !important;
        font-size: clamp(10px, 2.75vw, 12px) !important;
        font-weight: 800 !important;
        line-height: 1 !important;
        text-align: center !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow: hidden !important;
        text-overflow: clip !important;
        transform: none !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a:hover,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a:hover {
        border-color: rgba(207, 164, 104, 0.42) !important;
        background: rgba(255, 248, 237, 0.64) !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a.active,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a.active {
        border-color: rgba(207, 164, 104, 0.46) !important;
        background: rgba(255, 248, 237, 0.72) !important;
        color: #8b4513 !important;
        box-shadow: none !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a.active::after,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a.active::after {
        content: "" !important;
        position: absolute !important;
        left: 50% !important;
        right: auto !important;
        bottom: 4px !important;
        transform: translateX(-50%) !important;
        display: block !important;
        width: min(36px, 68%) !important;
        height: 2px !important;
        min-height: 2px !important;
        margin: 0 !important;
        border-radius: 999px !important;
        background: #c58b4c !important;
    }
}

/* 20260604 desktop school sidebar parity with quiz-space sidebar. */
@media (min-width: 981px) {
    body.blind-school-page:not(.blind-lesson-page) .school-workbench:not(.sidebar-collapsed) {
        grid-template-columns: 220px minmax(0, 1fr) !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-sidebar {
        gap: 14px !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll {
        display: grid !important;
        gap: 0 !important;
        padding: 10px !important;
        border: 1px solid var(--school-line) !important;
        border-radius: 18px !important;
        background: linear-gradient(145deg, #fff, #fffdf8) !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail::before,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll::before {
        content: "\5BFC\822A" !important;
        display: block !important;
        margin: 4px 4px 10px !important;
        color: var(--school-copper) !important;
        font-size: 15px !important;
        font-weight: 900 !important;
        line-height: 1.2 !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        min-height: 38px !important;
        margin: 0 0 8px !important;
        padding: 10px 11px !important;
        border: 1px solid transparent !important;
        border-radius: 10px !important;
        background: #fff !important;
        color: #6f4722 !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        text-align: left !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        transition: all 0.16s ease !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a:last-child,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a:last-child {
        margin-bottom: 0 !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a:hover,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a:hover {
        border-color: #e6c89f !important;
        background: #fff8ec !important;
        color: #7d3f13 !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a.active,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a.active {
        border-color: #d6a46a !important;
        background: #fff0dc !important;
        color: var(--school-copper) !important;
        font-weight: 900 !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a.active::after,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a.active::after {
        display: none !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-workbench.sidebar-collapsed {
        grid-template-columns: 54px minmax(0, 1fr) !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-workbench.sidebar-collapsed .school-title-block > :not(.school-sidebar-toggle),
    body.blind-school-page:not(.blind-lesson-page) .school-workbench.sidebar-collapsed .school-rail,
    body.blind-school-page:not(.blind-lesson-page) .school-workbench.sidebar-collapsed .school-rail.school-rail-mobile-scroll {
        display: none !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-workbench.sidebar-collapsed .school-sidebar {
        width: 54px !important;
        min-width: 54px !important;
        max-width: 54px !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-workbench.sidebar-collapsed .school-title-block {
        min-height: 54px !important;
        padding: 0 !important;
    }
}

@media (min-width: 981px) {
    body.blind-school-page:not(.blind-lesson-page) .school-sidebar {
        gap: 14px;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll {
        display: grid;
        gap: 0;
        padding: 10px;
        border: 1px solid var(--school-line);
        border-radius: 18px;
        background: linear-gradient(145deg, #fff, #fffdf8);
        box-shadow: none;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail::before {
        content: "导航";
        display: block;
        margin: 4px 4px 10px;
        color: var(--school-copper);
        font-size: 15px;
        font-weight: 900;
        line-height: 1.2;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a {
        display: block;
        width: 100%;
        box-sizing: border-box;
        min-height: 38px;
        margin: 0 0 8px;
        padding: 10px 11px;
        border: 1px solid transparent;
        border-radius: 10px;
        background: #fff;
        color: #6f4722;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.2;
        text-align: left;
        text-decoration: none;
        transition: all 0.16s ease;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a:last-child,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a:last-child {
        margin-bottom: 0;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a:hover,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a:hover {
        border-color: #e6c89f;
        background: #fff8ec;
        color: #7d3f13;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a.active,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a.active {
        border-color: #d6a46a;
        background: #fff0dc;
        color: var(--school-copper);
        font-weight: 900;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a.active::after,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a.active::after {
        display: none;
    }
}

.blind-container {
    padding-bottom: 48px;
}

.blind-lesson-page .blind-container {
    width: min(1180px, calc(100% - clamp(24px, 4vw, 56px))) !important;
    max-width: 1180px !important;
}

body.blind-school-page .site-nav a {
    box-sizing: border-box !important;
}

.school-workbench,
.lesson-workbench {
    display: grid;
    grid-template-columns: minmax(236px, 300px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.school-workbench.sidebar-collapsed {
    grid-template-columns: 54px minmax(0, 1fr);
}

.school-workbench.sidebar-collapsed .school-title-block > :not(.school-sidebar-toggle),
.school-workbench.sidebar-collapsed .school-rail {
    display: none;
}

.school-sidebar-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #1f1f1f;
    cursor: pointer;
    box-shadow: none;
}

.school-sidebar-toggle:hover {
    background: transparent;
}

.school-sidebar-toggle span,
.school-sidebar-toggle span::before {
    content: "";
    position: absolute;
    border: 1.5px solid #1f1f1f;
    border-radius: 2px;
}

.school-sidebar-toggle span {
    left: 5px;
    top: 6px;
    width: 17px;
    height: 16px;
}

.school-sidebar-toggle span::before {
    left: 5px;
    top: -1.5px;
    bottom: -1.5px;
    width: 0;
    border-width: 0 1.5px 0 0;
    border-radius: 0;
}

.school-workbench.sidebar-collapsed .school-sidebar {
    width: 54px;
    min-width: 54px;
}

.school-workbench.sidebar-collapsed .school-title-block {
    min-height: 54px;
    padding: 0;
}

.school-workbench.sidebar-collapsed .school-sidebar-toggle {
    top: 13px;
    right: 13px;
}

.blind-lesson-page .lesson-workbench {
    display: block !important;
    width: 100%;
}

.blind-lesson-page .lesson-sidebar,
.blind-lesson-page .back-link,
.blind-lesson-page .lesson-meta-card,
.blind-lesson-page .lesson-jump {
    display: none !important;
}

.blind-lesson-page .lesson-stage {
    width: 100%;
}

.school-sidebar,
.lesson-sidebar {
    position: sticky;
    top: 16px;
    display: grid;
    gap: 14px;
}

.blind-lesson-page .lesson-sidebar {
    gap: 8px;
}

.school-title-block,
.school-metrics,
.school-rail,
.lesson-meta-card,
.lesson-jump,
.lesson-section,
.lesson-tile,
.teaching-flow,
.reuse-modules,
.build-roadmap {
    border: 1px solid var(--school-line);
    border-radius: var(--sk-radius-md, 12px);
    background:
        linear-gradient(145deg, rgba(255,255,255,0.98), rgba(255,253,248,0.94));
    box-shadow: var(--school-shadow);
}

.school-title-block,
.lesson-meta-card {
    position: relative;
    padding: 20px;
}

.school-title-block {
    padding-right: 64px;
}

.blind-lesson-page .lesson-meta-card {
    padding: 10px;
}

.page-kicker,
.status-pill,
.section-no,
.slide-label,
.quiz-editor-meta {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 999px;
    background: #fffaf2;
    color: var(--school-copper);
    font-size: 12px;
    font-weight: 700;
}

.school-title-block h1,
.lesson-meta-card h1 {
    margin: 10px 0 10px;
    color: #7d3f13;
    font-family: "STSong", "SimSun", "Noto Serif SC", "Microsoft YaHei", serif;
    font-size: clamp(34px, 3.3vw, 46px);
    line-height: 1.12;
    letter-spacing: 0.02em;
}

.blind-lesson-page .lesson-meta-card h1 {
    margin: 8px 0;
    font-family: "STSong", "SimSun", "Noto Serif SC", "Microsoft YaHei", serif;
    font-size: 19px;
    line-height: 1.24;
    letter-spacing: 0;
}

.blind-lesson-page .lesson-meta-card p {
    display: none;
}

.blind-lesson-page .lesson-meta-card .page-kicker {
    min-height: 24px;
    padding: 0 7px;
    font-size: 11px;
    white-space: normal;
}

.blind-lesson-page .lesson-meta-card .progress-line {
    height: 5px;
}

.school-title-block p,
.lesson-meta-card p,
.lesson-tile p,
.flow-grid p,
.roadmap-list span,
.theory-slide p,
.theory-slide li {
    color: var(--school-muted);
    line-height: 1.75;
    font-size: 13px;
}

.school-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
}

.school-metrics div {
    display: grid;
    gap: 4px;
    padding: 14px 10px;
    text-align: center;
}

.school-metrics div + div {
    border-left: 1px solid var(--school-line);
}

.school-metrics strong {
    color: var(--school-copper);
    font-size: 22px;
}

.school-metrics span,
.lesson-duration {
    color: var(--school-muted);
    font-size: 12px;
}

.school-rail,
.lesson-jump {
    display: grid;
    padding: 8px;
}

.blind-lesson-page .lesson-jump {
    padding: 6px;
}

.school-rail a,
.lesson-jump a,
.back-link {
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--school-copper);
    font-weight: 700;
    text-decoration: none;
}

.blind-lesson-page .lesson-jump a,
.blind-lesson-page .back-link {
    min-height: 34px;
    padding: 8px 9px;
    font-size: 13px;
    line-height: 1.25;
}

.school-rail a:hover,
.lesson-jump a:hover,
.back-link:hover {
    background: rgba(210, 162, 99, 0.16);
    color: #7d3f13;
}

.school-rail a.active {
    background: rgba(210, 162, 99, 0.18);
    color: #7d3f13;
}

.school-main,
.lesson-stage {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.school-content-panel {
    display: none;
    min-width: 0;
}

.school-content-panel.active {
    display: grid;
    gap: 16px;
}

.section-heading,
.lesson-section-head,
.lesson-tile-top,
.lesson-tile-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.lesson-title-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.lesson-top-tabs {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(170, 103, 43, 0.22);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 250, 242, 0.92), rgba(255, 255, 255, 0.95));
}

.lesson-top-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--school-copper);
    background: transparent;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.lesson-top-tabs a:hover {
    border-color: rgba(170, 103, 43, 0.30);
    background: rgba(255, 244, 226, 0.82);
}

.lesson-top-tabs a.active {
    color: #fffaf2;
    border-color: #c28b55;
    background: linear-gradient(145deg, #d4a574, #cd853f);
    box-shadow: 0 6px 16px rgba(139, 69, 19, 0.18);
}

.blind-lesson-page .lesson-stage > .lesson-section {
    display: none;
}

.blind-lesson-page .lesson-stage > .lesson-section.active {
    display: block;
}

.section-heading {
    padding: 4px 0;
}

.section-heading.compact {
    padding: 0;
}

.section-heading h2,
.lesson-section h2 {
    margin: 6px 0 0;
    color: #7d3f13;
    font-family: "STSong", "SimSun", "Noto Serif SC", "Microsoft YaHei", serif;
    font-size: clamp(24px, 2.6vw, 32px);
    line-height: 1.16;
    letter-spacing: 0.02em;
}

.primary-action,
.lesson-tile-footer a,
.case-import-actions button,
.existing-actions a,
.case-toolset a,
.reuse-links a,
.quiz-type-actions button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(170, 103, 43, 0.34);
    border-radius: 8px;
    background: linear-gradient(145deg, #d6a45c 0%, #bb7c31 58%, #8c4f1b 100%);
    color: #fffaf2;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.ghost-button,
.quiz-type-actions button {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,250,242,0.96));
    color: var(--school-copper);
}

.subtab-toolset .ghost-button {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    border-color: rgba(170, 103, 43, 0.26);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,251,245,0.96));
    color: #8a4f1f;
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
}

.subtab-toolset .ghost-button:hover {
    border-color: rgba(170, 103, 43, 0.44);
    background: #fff8ee;
}

.ppt-toolset .ghost-button {
    font-size: 14px;
}

.lesson-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.course-design-form,
.knowledge-system-board article {
    border: 1px solid var(--school-line);
    border-radius: var(--sk-radius-md, 12px);
    background:
        linear-gradient(145deg, rgba(255,255,255,0.98), rgba(255,253,248,0.94));
    box-shadow: var(--school-shadow);
}

.course-design-form {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.course-design-form[hidden] {
    display: none;
}

.course-design-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.course-design-grid label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: var(--school-copper);
    font-weight: 700;
}

.course-design-grid label.wide {
    grid-column: 1 / -1;
}

.course-design-grid input,
.course-design-grid textarea,
.blind-doc-upload-grid input,
.blind-doc-upload-grid textarea,
.blind-doc-search input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--school-line);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--school-ink);
    background: #fffdf8;
    font: inherit;
    font-weight: 500;
    resize: vertical;
}

.blind-doc-upload-form,
.blind-doc-sidebar,
.blind-doc-list,
.blind-doc-preview {
    border: 1px solid var(--school-line);
    border-radius: var(--sk-radius-md, 12px);
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(255,253,248,0.94));
    box-shadow: var(--school-shadow);
}

.blind-doc-upload-form {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.blind-doc-upload-form[hidden] {
    display: none;
}

.blind-doc-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.blind-doc-upload-grid label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: var(--school-copper);
    font-weight: 700;
}

.blind-doc-upload-grid label.wide {
    grid-column: 1 / -1;
}

.blind-doc-workspace {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 14px;
    min-height: calc(100vh - 210px);
}

.blind-doc-sidebar {
    display: grid;
    align-content: start;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
    position: sticky;
    top: 16px;
    text-align: left;
}

.blind-doc-folder-list {
    display: grid;
    gap: 2px;
    justify-items: stretch;
}

.blind-doc-current-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
}

.blind-doc-current-folder {
    min-width: 0;
    color: var(--school-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
}

.blind-doc-add-menu {
    position: relative;
    flex: 0 0 auto;
    margin-left: auto;
}

.blind-doc-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--school-copper);
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.blind-doc-add-btn:hover {
    background: transparent;
    color: #5f2f10;
}

.blind-doc-add-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    display: grid;
    gap: 4px;
    width: 138px;
    padding: 6px;
    border: 1px solid var(--school-line);
    border-radius: 10px;
    background: #fffdf8;
    box-shadow: 0 14px 28px rgba(74, 46, 23, 0.14);
}

.blind-doc-add-popover[hidden] {
    display: none;
}

.blind-doc-add-popover button {
    min-height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--school-copper);
    font: inherit;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.blind-doc-add-popover button:hover {
    background: rgba(210, 162, 99, 0.14);
}

.blind-doc-add-popover button:disabled {
    color: rgba(126, 74, 34, 0.42);
    cursor: not-allowed;
}

.blind-doc-add-popover button:disabled:hover {
    background: transparent;
}

.blind-doc-folder-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    position: relative;
    padding-left: calc(var(--folder-depth, 0) * 24px);
}

.blind-doc-folder-row.has-children {
    grid-template-columns: 18px minmax(0, 1fr);
}

.blind-doc-folder-caret {
    width: 18px;
    height: 30px;
}

.blind-doc-folder-spacer {
    display: none;
}

.blind-doc-folder-caret {
    position: relative;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.blind-doc-folder-caret::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 10px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid var(--school-muted);
    transition: transform 0.16s ease;
}

.blind-doc-folder-caret.expanded::before {
    transform: rotate(90deg);
}

.blind-doc-folder-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 32px;
    width: 100%;
    padding: 0 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--school-copper);
}

.blind-doc-folder {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    flex: 1 1 auto;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
}

.blind-doc-folder span {
    min-width: 0;
    text-align: left;
}

.blind-doc-folder-shell.active,
.blind-doc-folder-shell:hover {
    background: rgba(210, 162, 99, 0.13);
}

.blind-doc-folder-actions {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    flex: 0 0 auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

.blind-doc-folder-shell:hover .blind-doc-folder-actions,
.blind-doc-folder-shell.active .blind-doc-folder-actions,
.blind-doc-folder-shell:focus-within .blind-doc-folder-actions,
.blind-doc-folder-actions:has(.blind-doc-folder-menu:not([hidden])) {
    opacity: 1;
    pointer-events: auto;
}

.blind-doc-folder-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 26px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--school-copper);
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.blind-doc-folder-icon-btn:hover {
    color: #5f2f10;
    background: transparent;
}

.blind-doc-folder-more {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    letter-spacing: 0;
}

.blind-doc-folder-more span {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
}

.blind-doc-folder-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 45;
    display: grid;
    min-width: 112px;
    padding: 6px;
    border: 1px solid var(--school-line);
    border-radius: 10px;
    background: #fffdf8;
    box-shadow: 0 14px 28px rgba(74, 46, 23, 0.14);
}

.blind-doc-folder-menu[hidden] {
    display: none;
}

.blind-doc-folder-menu button {
    min-height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--school-copper);
    font: inherit;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.blind-doc-folder-menu button:hover {
    background: rgba(210, 162, 99, 0.14);
}

.blind-doc-folder-menu button:disabled {
    color: rgba(126, 74, 34, 0.42);
    cursor: not-allowed;
}

.blind-doc-folder-menu button:disabled:hover {
    background: transparent;
}

.blind-doc-create-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding-left: calc(var(--folder-depth, 0) * 24px + 24px);
}

.blind-doc-create-input {
    width: 100%;
    min-height: 30px;
    border: 0;
    border-radius: 6px;
    background: rgba(210, 162, 99, 0.10);
    color: var(--school-ink);
    font: inherit;
    font-weight: 800;
    padding: 0 10px;
    outline: none;
}

.blind-doc-create-input:focus {
    box-shadow: inset 0 0 0 1px rgba(170, 103, 43, 0.34);
}

.blind-doc-inline-rename {
    width: 100%;
    min-width: 0;
    height: 28px;
    border: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--school-ink);
    font: inherit;
    font-weight: 800;
    padding: 0 6px;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(170, 103, 43, 0.36);
}

.blind-doc-tree-file {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    width: calc(100% - (var(--folder-depth, 0) * 24px + 24px));
    margin-left: calc(var(--folder-depth, 0) * 24px + 24px);
    padding: 0 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--school-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.blind-doc-tree-file:hover,
.blind-doc-tree-file.active {
    background: rgba(210, 162, 99, 0.12);
}

.blind-doc-tree-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: #36b7e6;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    flex: 0 0 auto;
}

.blind-doc-tree-file-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blind-doc-main {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
}

.blind-doc-main.no-preview {
    grid-template-columns: minmax(0, 1fr);
}

.blind-doc-preview[hidden] {
    display: none;
}

.blind-doc-list {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 12px;
    max-height: calc(100vh - 210px);
    overflow: auto;
}

.blind-doc-main.no-preview .blind-doc-list {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    max-height: none;
}

.blind-doc-item {
    display: grid;
    gap: 7px;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(170, 103, 43, 0.16);
    border-radius: 10px;
    background: #fff;
    color: var(--school-ink);
    text-align: left;
    cursor: pointer;
}

.blind-doc-item.active,
.blind-doc-item:hover {
    border-color: rgba(170, 103, 43, 0.42);
    background: #fffaf2;
}

.blind-doc-item strong {
    color: var(--school-ink);
    font-size: 15px;
    line-height: 1.35;
}

.blind-doc-item small,
.blind-doc-item em {
    color: var(--school-muted);
    font-style: normal;
    font-size: 12px;
    line-height: 1.4;
}

.blind-doc-preview {
    min-width: 0;
    min-height: calc(100vh - 210px);
    padding: 18px;
    overflow: auto;
}

.blind-doc-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.blind-doc-preview-head h3 {
    margin: 8px 0 0;
    color: #7d3f13;
    font-family: "STSong", "SimSun", "Noto Serif SC", "Microsoft YaHei", serif;
    font-size: 28px;
    line-height: 1.2;
}

.blind-doc-preview-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.blind-doc-meta,
.blind-doc-tags {
    margin-bottom: 12px;
}

.blind-doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--school-muted);
    font-size: 13px;
}

.blind-doc-summary {
    margin: 0 0 12px;
    color: var(--school-muted);
    line-height: 1.75;
}

.blind-doc-text {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 12px 0;
    padding: 14px;
    border: 1px solid rgba(170, 103, 43, 0.18);
    border-radius: 10px;
    background: #fffdf8;
    color: var(--school-ink);
    font: inherit;
    line-height: 1.75;
}

.blind-doc-html,
.blind-doc-editor {
    margin: 12px 0;
    padding: 18px;
    border: 1px solid rgba(170, 103, 43, 0.18);
    border-radius: 10px;
    background: #fffdf8;
    color: var(--school-ink);
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.blind-doc-editor {
    min-height: 520px;
    outline: none;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(170, 103, 43, 0.12);
}

.blind-doc-editor:focus {
    box-shadow: inset 0 0 0 2px rgba(170, 103, 43, 0.28);
}

.blind-doc-html p,
.blind-doc-editor p {
    margin: 0 0 0.85em;
}

.blind-doc-html h1,
.blind-doc-html h2,
.blind-doc-html h3,
.blind-doc-editor h1,
.blind-doc-editor h2,
.blind-doc-editor h3 {
    margin: 1em 0 0.45em;
    color: #7d3f13;
    line-height: 1.35;
}

.blind-doc-html img,
.blind-doc-editor img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px auto;
    border-radius: 6px;
}

.blind-doc-html table,
.blind-doc-editor table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.blind-doc-html td,
.blind-doc-editor td {
    border: 1px solid rgba(170, 103, 43, 0.22);
    padding: 8px;
    vertical-align: top;
}

.blind-doc-pages {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.blind-doc-pages img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(170, 103, 43, 0.20);
    border-radius: 10px;
    background: #fff;
}

.blind-doc-pdf-frame {
    display: block;
    width: 100%;
    min-height: calc(100vh - 340px);
    height: 760px;
    border: 1px solid rgba(170, 103, 43, 0.20);
    border-radius: 10px;
    background: #fff;
}

.blind-doc-empty {
    min-height: 220px;
}

.blind-doc-search input {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 14px;
}

.blind-doc-sidebar {
    gap: 8px;
    padding: 10px;
}

.blind-doc-current-row {
    gap: 6px;
    min-height: 28px;
}

.blind-doc-current-folder {
    font-size: 13px;
    line-height: 1.25;
}

.blind-doc-root-more {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 20px;
    height: 24px;
    border: 0;
    background: transparent;
    color: var(--school-copper);
    cursor: pointer;
    padding: 0;
}

.blind-doc-root-more span {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
}

.blind-doc-root-more:hover {
    color: #5f2f10;
}

.blind-doc-root-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 45;
    display: grid;
    min-width: 112px;
    padding: 6px;
    border: 1px solid var(--school-line);
    border-radius: 10px;
    background: #fffdf8;
    box-shadow: 0 14px 28px rgba(74, 46, 23, 0.14);
}

.blind-doc-root-menu[hidden] {
    display: none;
}

.blind-doc-root-menu button {
    min-height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--school-copper);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.blind-doc-root-menu button:hover {
    background: rgba(210, 162, 99, 0.14);
}

.blind-doc-folder-list {
    gap: 1px;
}

.blind-doc-folder-row {
    gap: 4px;
    padding-left: calc(var(--folder-depth, 0) * 22px);
}

.blind-doc-folder-row.has-children {
    grid-template-columns: 16px minmax(0, 1fr);
}

.blind-doc-folder-caret {
    width: 16px;
    height: 28px;
}

.blind-doc-folder-caret::before {
    left: 4px;
    top: 9px;
    border-top-width: 4px;
    border-bottom-width: 4px;
    border-left-width: 5px;
}

.blind-doc-folder-shell {
    min-height: 28px;
    padding: 0 5px;
    gap: 4px;
}

.blind-doc-folder {
    height: 28px;
    font-size: 14px;
}

.blind-doc-folder-actions {
    gap: 3px;
}

.blind-doc-folder-icon-btn {
    width: 16px;
    height: 24px;
    font-size: 14px;
}

.blind-doc-folder-more span {
    width: 3px;
    height: 3px;
}

.blind-doc-folder-menu {
    min-width: 104px;
    padding: 5px;
}

.blind-doc-folder-menu button {
    min-height: 28px;
    border-radius: 7px;
    font-size: 13px;
}

.blind-doc-create-row {
    padding-left: calc(var(--folder-depth, 0) * 22px + 22px);
}

.blind-doc-create-input,
.blind-doc-inline-rename {
    min-height: 26px;
    height: 26px;
    font-size: 13px;
}

.blind-doc-tree-file-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    width: calc(100% - (var(--folder-depth, 0) * 22px + 22px));
    margin-left: calc(var(--folder-depth, 0) * 22px + 22px);
    padding: 0 5px;
    border-radius: 6px;
    color: var(--school-ink);
}

.blind-doc-tree-file-row:hover,
.blind-doc-tree-file-row.active {
    background: rgba(210, 162, 99, 0.12);
}

.blind-doc-tree-file-row .blind-doc-tree-file {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 28px;
    width: auto;
    margin-left: 0;
    padding: 0;
    gap: 6px;
    background: transparent;
    font-size: 13px;
}

.blind-doc-tree-file-row .blind-doc-tree-file:hover,
.blind-doc-tree-file-row .blind-doc-tree-file.active {
    background: transparent;
}

.blind-doc-tree-file-icon {
    width: 16px;
    height: 16px;
    font-size: 8px;
}

.blind-doc-file-actions {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

.blind-doc-tree-file-row:hover .blind-doc-file-actions,
.blind-doc-tree-file-row.active .blind-doc-file-actions,
.blind-doc-tree-file-row:focus-within .blind-doc-file-actions,
.blind-doc-file-actions:has(.blind-doc-file-menu:not([hidden])) {
    opacity: 1;
    pointer-events: auto;
}

.blind-doc-list.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 210px);
    max-height: none;
    padding: 16px;
}

.blind-doc-list.is-empty .blind-doc-empty {
    width: min(320px, 100%);
    min-height: 250px;
    margin: auto;
    text-align: center;
}

.blind-doc-workspace {
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
}

.blind-doc-sidebar {
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.blind-doc-search,
.blind-doc-current-row,
.blind-doc-folder-list {
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.blind-doc-search input {
    display: block;
    max-width: 100%;
}

.blind-doc-current-folder {
    overflow: hidden;
    text-overflow: ellipsis;
}

.blind-doc-main {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
}

.blind-doc-main .blind-doc-list:not(.is-empty) {
    display: none;
}

.blind-doc-main.no-preview .blind-doc-list {
    grid-template-columns: minmax(0, 1fr);
}

.blind-doc-preview {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.blind-doc-preview-head h3 {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.blind-doc-tree-file-row {
    box-sizing: border-box;
    max-width: calc(100% - (var(--folder-depth, 0) * 22px + 22px));
    min-width: 0;
    overflow: visible;
}

.blind-doc-tree-file-row .blind-doc-tree-file {
    overflow: hidden;
}

.blind-doc-tree-file-title {
    display: block;
    min-width: 0;
    max-width: 100%;
}

.blind-doc-folder-shell {
    min-width: 0;
    overflow: visible;
}

.blind-doc-folder {
    overflow: hidden;
}

.blind-doc-folder span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-design-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.course-design-note {
    margin-right: auto;
    color: var(--school-muted);
    font-size: 13px;
}

.lesson-design-modal[hidden] {
    display: none;
}

.lesson-design-modal {
    position: fixed;
    inset: 0;
    z-index: 3500;
    background: rgba(24, 18, 12, 0.38);
    display: grid;
    place-items: center;
    padding: 24px;
}

body.lesson-design-modal-open {
    overflow: hidden;
}

.lesson-design-dialog {
    width: min(1080px, calc(100vw - 32px));
    max-height: calc(100vh - 56px);
    overflow: auto;
    border: 1px solid var(--school-line);
    border-radius: var(--sk-radius-lg, 14px);
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(255,253,248,0.94));
    box-shadow: 0 24px 48px rgba(64, 32, 10, 0.22);
    padding: 18px;
}

.lesson-design-dialog h3 {
    margin: 0 0 10px;
    color: var(--school-ink);
    font-family: "STSong", "SimSun", "Noto Serif SC", "Microsoft YaHei", serif;
    font-size: 34px;
}

.lesson-design-form {
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0;
}


.fun-test-workspace {
    display: grid;
    grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
    gap: 14px;
    min-height: calc(100vh - 220px);
}

.fun-test-picker,
.fun-test-stage {
    border: 1px solid var(--school-line);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(255,253,248,0.94));
    box-shadow: var(--school-shadow);
}

.fun-test-picker {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 10px;
    position: sticky;
    top: 16px;
}

.fun-test-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    min-height: 72px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--school-ink);
    text-align: left;
    cursor: pointer;
}

.fun-test-card:hover,
.fun-test-card.active {
    border-color: rgba(170, 103, 43, 0.22);
    background: rgba(210, 162, 99, 0.13);
}

.fun-test-thumb {
    display: block;
    width: 58px;
    height: 58px;
    border-radius: 8px;
    background-color: #fff7eb;
    background-position: center;
    background-size: cover;
    box-shadow: inset 0 0 0 1px rgba(139, 90, 43, 0.14);
}

.fun-test-card-body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.fun-test-card-body strong,
.fun-test-card-body span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fun-test-card-body strong {
    color: var(--school-copper);
    font-size: 15px;
    font-weight: 800;
}

.fun-test-card-body span {
    color: var(--school-muted);
    font-size: 12px;
}

.fun-test-stage {
    min-height: 720px;
    overflow: hidden;
}

.fun-test-stage iframe {
    display: block;
    width: 100%;
    height: min(920px, calc(100vh - 190px));
    min-height: 720px;
    border: 0;
    background: #f5efe5;
}

.fun-test-open-link {
    text-decoration: none;
}

@media (max-width: 820px) {
    .fun-test-workspace {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .fun-test-picker {
        position: static;
        grid-template-columns: 1fr;
    }

    .fun-test-stage {
        min-height: 620px;
    }

    .fun-test-stage iframe {
        height: 720px;
        min-height: 620px;
    }
}
.knowledge-system-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.knowledge-system-board article {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: 180px;
    padding: 18px;
}

.knowledge-system-board h3 {
    margin: 0;
    color: #7d3f13;
    font-family: "STSong", "SimSun", "Noto Serif SC", "Microsoft YaHei", serif;
    font-size: 24px;
}

.knowledge-system-board p {
    margin: 0;
    color: var(--school-muted);
    line-height: 1.75;
}

.lesson-tile {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.lesson-tile h3 {
    margin: 0;
    color: #7d3f13;
    font-family: "STSong", "SimSun", "Noto Serif SC", "Microsoft YaHei", serif;
    font-size: 24px;
    line-height: 1.18;
}

.lesson-subtitle {
    margin: -6px 0 0;
    color: var(--school-copper-2) !important;
    font-weight: 700;
}

.progress-line {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(36, 54, 76, 0.10);
}

.progress-line span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--school-copper), var(--school-gold));
}

.outline-list,
.lesson-tags,
.section-toolset,
.quiz-type-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ppt-file-input {
    display: none;
}

.ppt-file-label {
    margin: 0;
}

.lesson-case-id-input {
    width: min(260px, 26vw);
    min-height: 38px;
    border: 1px solid var(--school-line);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--school-ink);
    background: #fffdf8;
}

.ppt-status-line {
    min-height: 34px;
    margin: -4px 0 12px;
    padding: 8px 12px;
    border: 1px solid var(--school-line);
    border-radius: 8px;
    background: #fffaf2;
    color: var(--school-muted);
    font-size: 13px;
    line-height: 1.4;
}

.ppt-status-line.compact {
    display: none;
    align-items: center;
    min-height: 38px;
    max-width: min(360px, 28vw);
    margin: 0;
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ppt-status-line.compact:not(:empty) {
    display: inline-flex;
}

.ppt-status-line.is-error {
    border-color: rgba(192, 57, 43, 0.32);
    background: #fff5f2;
    color: #a94432;
}

.ppt-status-line.is-success {
    border-color: rgba(212, 165, 116, 0.62);
    color: var(--school-copper);
}

.lesson-toast {
    position: fixed;
    top: 104px;
    right: 28px;
    z-index: 4000;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: min(520px, calc(100vw - 48px));
    padding: 12px 14px 12px 16px;
    border: 1px solid var(--school-line);
    border-radius: 10px;
    background: rgba(255, 253, 248, 0.98);
    box-shadow: 0 18px 42px rgba(117, 64, 24, 0.16);
    color: var(--school-ink);
    font-size: 15px;
    line-height: 1.55;
}

.lesson-toast.is-error {
    border-color: rgba(192, 57, 43, 0.36);
    background: #fff7f4;
    color: #9d321f;
}

.lesson-toast.is-success {
    border-color: rgba(212, 165, 116, 0.7);
    color: var(--school-copper);
}

.lesson-toast button {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--school-line);
    border-radius: 8px;
    background: #fffaf2;
    color: var(--school-copper);
    font-weight: 800;
    cursor: pointer;
}

.outline-list span,
.lesson-tags span {
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid var(--school-line);
    border-radius: 8px;
    background: #fffaf2;
    color: var(--school-muted);
    font-size: 12px;
    font-weight: 700;
}

.teaching-flow,
.reuse-modules,
.build-roadmap {
    padding: 18px;
}

.flow-grid,
.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flow-grid article,
.module-grid article {
    min-height: 150px;
    padding: 16px;
    border: 1px solid var(--school-line);
    border-radius: var(--sk-radius-md, 12px);
    background: linear-gradient(180deg, #ffffff, #fffdf8);
}

.flow-grid span {
    color: var(--school-copper);
    font-weight: 800;
}

.flow-grid h3,
.module-grid h3,
.roadmap-list strong,
.theory-slide h3 {
    color: var(--school-ink);
}

.module-grid article {
    display: grid;
    align-content: start;
    gap: 10px;
}

.module-grid article > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.module-grid h3 {
    margin: 0;
}

.module-grid p,
.reuse-tool p {
    margin: 0;
    color: var(--school-muted);
    line-height: 1.75;
}

.module-grid code {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--school-line);
    border-radius: 6px;
    background: #fff;
    color: var(--school-blue);
    overflow-wrap: anywhere;
}

.roadmap-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.roadmap-list div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--school-line);
    border-radius: var(--sk-radius-md, 12px);
    background: #fffdf8;
}

.back-link {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--school-line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--school-shadow);
}

.lesson-section {
    min-height: calc(100vh - 48px);
    padding: 18px;
    scroll-margin-top: 18px;
}

.lesson-section-head {
    position: sticky;
    top: 0;
    z-index: 30;
    box-sizing: border-box;
    margin: -18px -18px 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--school-line);
    background: rgba(255, 253, 248, 0.96);
    backdrop-filter: blur(10px);
}

.lesson-section-head > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.lesson-section-head .section-toolset,
.lesson-section-head .existing-actions {
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

.lesson-section-head .lesson-title-tabs {
    flex: 0 1 auto;
}

.theory-slide-scroll {
    box-sizing: border-box;
    display: block;
    height: calc(100vh - 164px);
    max-height: none;
    overflow-x: hidden;
    overflow-y: hidden;
    padding: 0 0 10px;
}

.theory-slide {
    box-sizing: border-box;
    display: none;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: calc(100vh - 176px);
    align-content: center;
    gap: 16px;
    padding: clamp(22px, 4vw, 44px);
    border: 1px solid var(--school-line);
    border-radius: var(--sk-radius-lg, 18px);
    background:
        linear-gradient(90deg, rgba(210, 162, 99, 0.10), transparent 34%),
        linear-gradient(180deg, #ffffff, #fffdf8);
}

.theory-slide.is-current-slide {
    display: grid !important;
}

.ppt-imported-slide {
    align-content: start;
}

.ppt-page-slide {
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    justify-items: center;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 250, 242, 0.92), rgba(255, 255, 255, 0.98));
    padding: 6px 10px 10px;
}

.theory-slide:not(.is-current-slide) {
    display: none !important;
}

.ppt-fixed-toolbar,
.case-fixed-toolbar {
    position: sticky;
    top: 63px;
    z-index: 24;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    margin: -2px -18px 12px;
    padding: 8px 18px;
    border-bottom: 1px solid var(--school-line);
    background: rgba(255, 253, 248, 0.98);
    backdrop-filter: blur(10px);
}

.case-fixed-toolbar {
    top: 63px;
    margin: -2px 0 12px;
}

.case-current-summary {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.case-current-summary strong {
    color: var(--school-ink);
    font-size: 12px;
    font-weight: 700;
}

.case-current-summary span:not(.status-pill) {
    color: var(--school-muted);
    font-size: 12px;
    font-weight: 700;
}

.theory-slide .slide-toolbar {
    display: none;
}

.slide-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin: 0 0 8px;
}

.slide-toolbar .slide-label {
    flex: 0 0 auto;
    background: rgba(255, 250, 242, 0.96);
}

.slide-nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.slide-nav-btn {
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid rgba(170, 103, 43, 0.30);
    border-radius: 999px;
    background: #fffdf8;
    color: var(--school-copper);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.slide-nav-btn:hover {
    border-color: rgba(170, 103, 43, 0.58);
    background: #fff4e4;
}

.slide-nav-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.ppt-page-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 176px);
    object-fit: contain;
    border: 1px solid rgba(170, 103, 43, 0.18);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(74, 46, 23, 0.10);
}

.theory-slide h3 {
    margin: 0;
    color: #7d3f13;
    font-family: "STSong", "SimSun", "Noto Serif SC", "Microsoft YaHei", serif;
    font-size: clamp(30px, 3.4vw, 44px);
    line-height: 1.16;
    letter-spacing: 0.02em;
}

.theory-slide ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 22px;
}

.ppt-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    align-items: start;
}

.ppt-image-grid img {
    display: block;
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    border: 1px solid var(--school-line);
    border-radius: 10px;
    background: #fff;
}

.theory-section:fullscreen,
.theory-section.is-ppt-fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fffdf8;
    overflow: hidden;
}

.theory-section:fullscreen .lesson-section-head,
.theory-section.is-ppt-fullscreen .lesson-section-head {
    position: absolute;
    z-index: 20;
    top: 14px;
    right: 14px;
    margin: 0;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
}

.theory-section:fullscreen .lesson-section-head > div:first-child,
.theory-section.is-ppt-fullscreen .lesson-section-head > div:first-child,
.theory-section:fullscreen .ppt-file-label,
.theory-section.is-ppt-fullscreen .ppt-file-label,
.theory-section:fullscreen .ppt-file-input,
.theory-section.is-ppt-fullscreen .ppt-file-input,
.theory-section:fullscreen #ppt-upload-btn,
.theory-section.is-ppt-fullscreen #ppt-upload-btn {
    display: none;
}

.theory-section:fullscreen .ppt-toolset,
.theory-section.is-ppt-fullscreen .ppt-toolset {
    display: block;
}

.theory-section:fullscreen #ppt-fullscreen-btn,
.theory-section.is-ppt-fullscreen #ppt-fullscreen-btn {
    min-width: 96px;
    height: 40px;
    border-color: rgba(255, 255, 255, 0.42);
    color: #fff;
    background: rgba(0, 0, 0, 0.42);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
}

.theory-section:fullscreen .ppt-status-line,
.theory-section.is-ppt-fullscreen .ppt-status-line {
    display: none;
}

.theory-section:fullscreen .theory-slide-scroll,
.theory-section.is-ppt-fullscreen .theory-slide-scroll {
    max-height: 100vh;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0;
    padding: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.theory-section:fullscreen .theory-slide-scroll::-webkit-scrollbar,
.theory-section.is-ppt-fullscreen .theory-slide-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.theory-section:fullscreen .theory-slide,
.theory-section.is-ppt-fullscreen .theory-slide {
    flex-basis: 100vw;
    width: 100vw;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    padding: clamp(36px, 6vw, 86px);
    scroll-snap-align: start;
}

.theory-section:fullscreen .ppt-page-slide,
.theory-section.is-ppt-fullscreen .ppt-page-slide {
    padding: 0;
    background: #fffdf8;
    align-content: center;
}

.theory-section:fullscreen .ppt-page-image,
.theory-section.is-ppt-fullscreen .ppt-page-image {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
}

.theory-section:fullscreen .ppt-page-slide .slide-label,
.theory-section.is-ppt-fullscreen .ppt-page-slide .slide-label {
    position: absolute;
    left: 14px;
    bottom: 14px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(8px);
}

.theory-section:fullscreen .theory-slide h3,
.theory-section.is-ppt-fullscreen .theory-slide h3 {
    font-size: clamp(38px, 5vw, 72px);
}

.theory-section:fullscreen .theory-slide p,
.theory-section:fullscreen .theory-slide li,
.theory-section.is-ppt-fullscreen .theory-slide p,
.theory-section.is-ppt-fullscreen .theory-slide li {
    font-size: clamp(20px, 2vw, 30px);
}

.case-import-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.case-import-actions input {
    width: min(360px, 38vw);
    height: 38px;
    border: 1px solid var(--school-line);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--school-ink);
    background: #fffdf8;
}

.existing-actions,
.reuse-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reuse-panel {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 14px;
    min-height: calc(100vh - 158px);
}

.case-lesson-shell {
    display: grid;
    min-height: calc(100vh - 158px);
}

/* 课堂案例讲解：去掉外层套圈，只保留案例详情内容本体 */
.blind-lesson-page .case-embed-frame {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.blind-lesson-page .case-stack-scroll {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.blind-lesson-page .lesson-case-item {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.quiz-reuse-panel {
    min-height: 430px;
}

.reuse-tool,
.case-embed-frame,
.empty-reuse-state {
    min-width: 0;
    border: 1px solid var(--school-line);
    border-radius: var(--sk-radius-md, 12px);
    background: #ffffff;
    padding: 16px;
}

.reuse-tool {
    display: grid;
    align-content: start;
    gap: 14px;
}

.case-bind-status {
    min-height: 30px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid rgba(170, 103, 43, 0.20);
    border-radius: 8px;
    color: var(--school-muted);
    background: rgba(255, 250, 242, 0.76);
}

.case-bind-status.is-error {
    color: #9d2b18;
    border-color: rgba(157, 43, 24, 0.32);
    background: rgba(157, 43, 24, 0.08);
}

.case-bind-status.is-success {
    color: #6d3d0e;
    border-color: rgba(170, 103, 43, 0.36);
}

.case-bind-status.compact {
    display: none;
    align-items: center;
    min-height: 38px;
    padding: 0 11px;
    white-space: nowrap;
}

.case-bind-status.compact:not(:empty) {
    display: inline-flex;
}

.status-confirm-btn {
    margin-left: 10px;
    border: 1px solid rgba(170, 103, 43, 0.34);
    border-radius: 999px;
    background: #fffaf2;
    color: var(--school-accent);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 3px 10px;
}

.reuse-tool h3,
.empty-reuse-state h3 {
    margin: 0;
    color: var(--school-ink);
}

.case-embed-frame {
    min-height: 520px;
    padding: 0;
    overflow: hidden;
}

.case-stack-scroll {
    display: block;
    height: calc(100vh - 194px);
    min-height: 704px;
    overflow-x: hidden;
    overflow-y: hidden;
    padding: 10px;
}

.lesson-case-item {
    display: none;
    grid-template-rows: minmax(680px, calc(100vh - 244px));
    min-height: calc(100vh - 206px);
    border: 1px solid var(--school-line);
    border-radius: var(--sk-radius-md, 12px);
    overflow: hidden;
    background: #fff;
}

.lesson-case-item.is-current-case {
    display: grid;
}

.lesson-case-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--school-line);
    background: linear-gradient(180deg, rgba(255, 250, 242, 0.96), #fff);
}

.lesson-case-bar > div:first-child,
.lesson-case-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.lesson-case-nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.lesson-case-bar strong {
    color: var(--school-ink);
}

.lesson-case-bar span:not(.status-pill) {
    color: var(--school-muted);
}

.lesson-case-actions a,
.lesson-case-actions button {
    min-height: 32px;
    border: 1px solid rgba(170, 103, 43, 0.28);
    border-radius: 8px;
    padding: 0 10px;
    color: var(--school-copper);
    background: #fffdf8;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.case-embed-frame iframe,
.lesson-case-detail-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 720px;
    border: 0;
    background: #fff;
}

/* 课堂案例详情与案例详情页桌面间距一致 */
@media (min-width: 901px) {
    .blind-lesson-page .lesson-case-detail-frame {
        min-height: 760px;
    }
}

.empty-reuse-state {
    display: grid;
    place-content: center;
    gap: 12px;
    min-height: 320px;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(210, 162, 99, 0.12), transparent 45%),
        #fffdf8;
}

.empty-reuse-state p {
    max-width: 460px;
    margin: 0;
    color: var(--school-muted);
    line-height: 1.75;
}

.lesson-intro-state {
    min-height: calc(100vh - 280px);
}

.lesson-intro-state h3 {
    font-size: 24px;
}

.lesson-intro-state p {
    max-width: 680px;
    font-size: 18px;
}

.lesson-quiz-member,
.lesson-quiz-editor {
    padding: 18px;
}

.lesson-quiz-answer {
    display: grid;
    gap: 14px;
}

.lesson-quiz-answer-head,
.lesson-quiz-submit-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lesson-quiz-question,
.lesson-quiz-score-card,
.lesson-quiz-answer-card {
    border: 1px solid var(--school-line);
    border-radius: var(--sk-radius, 12px);
    background: #fffdf8;
    padding: 16px;
}

.lesson-quiz-question h3,
.lesson-quiz-answer-card h3 {
    margin: 0 0 12px;
    color: var(--school-ink);
    font-size: 18px;
    line-height: 1.45;
}

.lesson-quiz-options {
    display: grid;
    gap: 10px;
}

.lesson-quiz-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(170, 103, 43, 0.22);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.lesson-quiz-result {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.lesson-quiz-score-card strong {
    display: block;
    margin-top: 8px;
    color: var(--school-copper);
    font-size: 34px;
}

.lesson-quiz-answer-list {
    display: grid;
    gap: 12px;
}

.lesson-quiz-answer-card.is-correct {
    border-color: rgba(44, 128, 72, 0.28);
}

.lesson-quiz-answer-card.is-wrong {
    border-color: rgba(185, 74, 62, 0.28);
}

.lesson-quiz-explain {
    color: var(--school-muted);
}

@media (max-width: 980px) {
    .school-workbench,
    .lesson-workbench {
        grid-template-columns: 1fr;
    }

    .school-sidebar-toggle {
        display: none;
    }

    .school-sidebar,
    .lesson-sidebar {
        position: static;
    }

    .lesson-board,
    .flow-grid,
    .module-grid,
    .reuse-panel,
    .lesson-case-study,
    .blind-doc-workspace,
    .blind-doc-main {
        grid-template-columns: 1fr;
    }

    .reuse-panel {
        min-height: auto;
    }
}

@media (max-width: 720px) {
    .section-heading,
    .lesson-section-head,
    .lesson-tile-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-action,
    .lesson-tile-footer a,
    .case-import-actions button,
    .case-import-actions input,
    .existing-actions a,
    .case-toolset a,
    .lesson-case-id-input,
    .reuse-links a,
    .quiz-type-actions button,
    .ghost-button {
        width: 100%;
    }

    .case-import-actions,
    .existing-actions,
    .case-toolset,
    .reuse-links,
    .section-toolset,
    .quiz-type-actions {
        width: 100%;
        flex-direction: column;
    }

    .lesson-case-bar,
    .lesson-case-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .lesson-case-study {
        grid-template-columns: 1fr;
    }

    .lesson-section {
        min-height: auto;
        padding: 14px;
    }

    .theory-slide-scroll {
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }

    .theory-slide {
        min-height: 68vh;
    }

    .school-metrics,
    .module-grid article > div,
    .roadmap-list div {
        grid-template-columns: 1fr;
    }

    .module-grid article > div {
        align-items: flex-start;
        flex-direction: column;
    }

    .school-metrics div + div {
        border-left: 0;
        border-top: 1px solid var(--school-line);
    }

    .blind-school-page .school-rail {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
    }

    .blind-school-page .school-rail a {
        flex: 0 0 auto;
        min-width: 0;
        white-space: nowrap;
    }

    .blind-lesson-page .lesson-section-head {
        gap: 8px;
    }

    .blind-lesson-page .lesson-title-tabs {
        width: 100%;
        min-width: 0;
    }

    .blind-lesson-page .lesson-top-tabs {
        display: flex;
        width: 100%;
        flex-wrap: nowrap;
        gap: 4px;
        overflow: hidden;
    }

    .blind-lesson-page .lesson-top-tabs a {
        flex: 1 1 0;
        min-width: 0;
        white-space: nowrap;
        padding: 0 8px;
        font-size: 13px;
    }

    .blind-lesson-page .section-toolset,
    .blind-lesson-page .case-toolset,
    .blind-lesson-page .quiz-toolset,
    .blind-lesson-page .ppt-toolset,
    .blind-lesson-page .case-import-actions,
    .blind-lesson-page .quiz-type-actions {
        width: 100%;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        align-items: center;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
    }

    .blind-lesson-page .section-toolset > *,
    .blind-lesson-page .case-toolset > *,
    .blind-lesson-page .quiz-toolset > *,
    .blind-lesson-page .ppt-toolset > *,
    .blind-lesson-page .case-import-actions > *,
    .blind-lesson-page .quiz-type-actions > * {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        white-space: nowrap;
    }

    .blind-lesson-page .lesson-case-id-input,
    .blind-lesson-page .case-import-actions input {
        width: min(240px, 58vw);
        min-width: 180px;
    }

    .blind-lesson-page .theory-section .ppt-toolset {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        overflow: hidden;
    }

    .blind-lesson-page .theory-section .ppt-toolset > * {
        width: 100%;
        min-width: 0;
        padding: 0 6px;
        font-size: 12px;
        letter-spacing: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .blind-lesson-page .lesson-stage,
    .blind-lesson-page .lesson-section,
    .blind-lesson-page .theory-slide-scroll,
    .blind-lesson-page .case-lesson-shell,
    .blind-lesson-page .case-embed-frame {
        max-width: 100%;
        overflow-x: hidden;
    }

    .blind-lesson-page .ppt-fixed-toolbar,
    .blind-lesson-page .case-fixed-toolbar {
        max-width: 100%;
        overflow: hidden;
        gap: 8px;
    }

    .blind-lesson-page .case-fixed-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px;
    }

    .blind-lesson-page .case-current-summary {
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
        gap: 6px;
    }

    .blind-lesson-page .case-current-summary strong,
    .blind-lesson-page .case-current-summary span:not(.status-pill) {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .blind-lesson-page .ppt-fixed-toolbar .slide-nav-actions,
    .blind-lesson-page .case-fixed-toolbar .slide-nav-actions {
        flex: 0 0 auto;
        gap: 4px;
    }

    .blind-lesson-page .ppt-fixed-toolbar .slide-nav-btn,
    .blind-lesson-page .case-fixed-toolbar .slide-nav-btn {
        min-height: 24px;
        padding: 0 7px;
        font-size: 11px;
    }

    .blind-lesson-page .lesson-section,
    .blind-lesson-page .case-lesson-shell,
    .blind-lesson-page .case-stack-scroll,
    .blind-lesson-page .lesson-case-item,
    .blind-lesson-page .lesson-case-detail-frame {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .blind-lesson-page .lesson-case-item {
        grid-template-rows: auto;
        min-height: 0;
    }

    .blind-lesson-page .lesson-case-detail-frame {
        height: auto;
        min-height: 0;
    }

    .blind-lesson-page .case-embed-frame {
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .blind-lesson-page .case-stack-scroll {
        padding: 0;
        border: 0;
        min-height: auto;
        height: auto;
        background: transparent;
        overflow-y: visible;
    }

    .blind-lesson-page .lesson-case-item {
        border: 0;
        border-radius: 0;
        background: transparent;
        overflow: visible;
    }

    .blind-school-page:not(.blind-lesson-page) .school-content-panel {
        --school-mobile-inline-pad: 8px;
    }

    .blind-school-page:not(.blind-lesson-page) .school-content-panel .section-heading {
        padding-left: var(--school-mobile-inline-pad);
        padding-right: var(--school-mobile-inline-pad);
    }

    .blind-school-page:not(.blind-lesson-page) .school-content-panel .lesson-board,
    .blind-school-page:not(.blind-lesson-page) .school-content-panel .knowledge-system-board,
    .blind-school-page:not(.blind-lesson-page) .school-content-panel .course-design-form,
    .blind-school-page:not(.blind-lesson-page) .school-content-panel .blind-doc-upload-form,
    .blind-school-page:not(.blind-lesson-page) .school-content-panel .blind-doc-workspace,
    .blind-school-page:not(.blind-lesson-page) .school-content-panel .fun-test-workspace {
        padding-left: var(--school-mobile-inline-pad);
        padding-right: var(--school-mobile-inline-pad);
        box-sizing: border-box;
    }

    .blind-doc-upload-grid {
        grid-template-columns: 1fr;
    }

    .blind-doc-list,
    .blind-doc-preview {
        max-height: none;
    }

    /* Mobile hard rule: no horizontal overflow anywhere in blind-school pages */
    html,
    body.blind-school-page {
        overflow-x: hidden;
    }

    .blind-school-page .blind-container,
    .blind-school-page .school-workbench,
    .blind-school-page .lesson-workbench,
    .blind-school-page .school-main,
    .blind-school-page .lesson-stage,
    .blind-school-page .school-content-panel,
    .blind-school-page .lesson-section,
    .blind-school-page .lesson-quiz-editor,
    .blind-school-page .lesson-quiz-member,
    .blind-school-page .case-lesson-shell,
    .blind-school-page .case-embed-frame,
    .blind-school-page .case-stack-scroll,
    .blind-school-page .lesson-case-item,
    .blind-school-page .lesson-case-detail-frame {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .blind-school-page .case-stack-scroll,
    .blind-school-page .lesson-case-item,
    .blind-school-page .lesson-case-detail-frame {
        overflow-y: visible !important;
    }

    /* Secondary toolbar buttons: max 4 per row, auto wraps to next row */
    .blind-lesson-page .theory-section .ppt-toolset,
    .blind-lesson-page .quiz-section .quiz-toolset,
    .blind-lesson-page .quiz-section .quiz-type-actions {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
        overflow: hidden;
    }

    .blind-lesson-page .theory-section .ppt-toolset > *,
    .blind-lesson-page .quiz-section .quiz-toolset > *,
    .blind-lesson-page .quiz-section .quiz-type-actions > * {
        width: 100%;
        min-width: 0;
        padding: 0 6px;
        font-size: 12px;
        letter-spacing: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        box-sizing: border-box;
    }

    .blind-lesson-page .quiz-section .quiz-toolset .case-bind-status.compact,
    .blind-lesson-page .quiz-section .quiz-type-actions .case-bind-status.compact {
        grid-column: 1 / -1;
        width: 100%;
    }

    /* Case toolbar keeps one row within border */
    .blind-lesson-page .case-section .case-toolset {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
        overflow: hidden;
    }

    .blind-lesson-page .case-section .case-toolset > * {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .blind-lesson-page .case-section .case-toolset .lesson-case-id-input {
        grid-column: 1 / span 2;
        width: 100%;
        min-width: 0;
    }

    .blind-lesson-page .case-section .case-toolset .case-bind-status.compact {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* 20260513 fun tests mobile fit */
@media (max-width: 760px) {
    .blind-school-page .blind-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 10px 22px;
    }

    .blind-school-page .site-header {
        margin-bottom: 8px !important;
    }

    .blind-school-page .school-workbench {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .blind-school-page .school-title-block {
        padding: 10px 42px 10px 10px;
        border-radius: 8px;
    }

    .blind-school-page .school-title-block .page-kicker {
        min-height: 22px;
        padding: 0 7px;
        font-size: 11px;
    }

    .blind-school-page .school-title-block h1 {
        margin: 7px 0 4px;
        font-size: 28px;
        line-height: 1.08;
        letter-spacing: 0;
    }

    .blind-school-page .school-title-block p {
        margin: 0;
        font-size: 13px;
        line-height: 1.52;
    }

    .blind-school-page .school-rail {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        padding: 6px;
        border-radius: 8px;
        scrollbar-width: none;
    }

    .blind-school-page .school-rail::-webkit-scrollbar,
    .fun-test-picker::-webkit-scrollbar {
        display: none;
    }

    .blind-school-page .school-rail a {
        flex: 0 0 auto;
        min-height: 32px;
        padding: 7px 10px;
        font-size: 13px;
        white-space: nowrap;
    }

    .blind-school-page .school-content-panel.active {
        gap: 10px;
    }

    .blind-school-page:not(.blind-lesson-page) .school-content-panel .section-heading {
        padding-left: 2px;
        padding-right: 2px;
    }

    #fun-tests .section-heading {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    #fun-tests .section-heading > div {
        min-width: 0;
    }

    #fun-tests .section-heading h2 {
        margin-top: 4px;
        font-size: 24px;
        line-height: 1.12;
        letter-spacing: 0;
    }

    #fun-tests .page-kicker {
        min-height: 22px;
        padding: 0 7px;
        font-size: 11px;
    }

    #fun-tests .fun-test-open-link {
        display: none;
    }

    .fun-test-workspace {
        grid-template-columns: 1fr;
        gap: 8px;
        min-height: 0;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .fun-test-picker {
        position: static;
        display: flex;
        grid-template-columns: none;
        gap: 8px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding: 8px;
        border-radius: 8px;
        scrollbar-width: none;
    }

    .fun-test-card {
        flex: 0 0 224px;
        grid-template-columns: 42px minmax(0, 1fr);
        min-height: 60px;
        gap: 8px;
        padding: 7px;
        scroll-snap-align: start;
    }

    .fun-test-thumb {
        width: 42px;
        height: 42px;
        border-radius: 7px;
    }

    .fun-test-card-body strong {
        font-size: 14px;
    }

    .fun-test-card-body span {
        font-size: 11px;
    }

    .fun-test-stage {
        min-height: calc(100dvh - 210px);
        border-radius: 8px;
    }

    .fun-test-stage iframe {
        width: 100%;
        height: calc(100dvh - 210px);
        min-height: 590px;
    }

    .blind-school-page .fun-test-workspace,
    .blind-school-page .fun-test-picker,
    .blind-school-page .fun-test-stage,
    .blind-school-page .fun-test-stage iframe {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow-x: hidden;
    }
}

@media (max-width: 420px) {
    .blind-school-page .blind-container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .blind-school-page .school-title-block h1 {
        font-size: 26px;
    }

    .blind-school-page .school-title-block p {
        font-size: 12px;
    }

    #fun-tests .section-heading h2 {
        font-size: 22px;
    }

    .fun-test-card {
        flex-basis: 204px;
    }

    .fun-test-stage iframe {
        min-height: 560px;
    }
}
/* 20260513 fun tests mobile carousel fix */
@media (max-width: 760px) {
    .blind-school-page .school-title-block {
        display: none !important;
    }

    .blind-school-page .school-sidebar {
        display: block;
    }

    .blind-school-page .school-rail {
        margin-bottom: 0;
    }

    .fun-test-picker {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 8px;
        touch-action: pan-x pan-y pinch-zoom;
    }

    .fun-test-card {
        flex: 0 0 calc(100% - 16px);
        max-width: calc(100% - 16px);
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .fun-test-picker .fun-test-card + .fun-test-card {
        margin-left: 0;
    }

    .blind-school-page .fun-test-picker {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .blind-school-page .fun-test-stage,
    .blind-school-page .fun-test-stage iframe {
        overflow-x: hidden;
    }
}

@media (max-width: 420px) {
    .fun-test-card {
        flex-basis: calc(100% - 16px);
        max-width: calc(100% - 16px);
    }
}
/* 20260513 fun tests portal page */
.blind-fun-tests-page {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.fun-test-portal {
    width: min(1280px, calc(100% - 28px));
    margin: 0 auto;
    padding: 18px 0 10px;
}

.fun-test-portal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.fun-test-portal-head h1 {
    margin: 8px 0 0;
    color: #7d3f13;
    font-family: "STSong", "SimSun", "Noto Serif SC", "Microsoft YaHei", serif;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.12;
    letter-spacing: 0;
}

.fun-test-portal-workspace {
    align-items: start;
    min-height: 0;
}

.blind-fun-tests-page .fun-test-stage {
    min-height: 720px;
    overflow: visible;
}

.blind-fun-tests-page .fun-test-stage iframe {
    min-height: 720px;
    height: 760px;
}

@media (max-width: 760px) {
    .fun-test-portal {
        width: 100%;
        padding: 8px 8px 18px;
    }

    .fun-test-portal-head {
        align-items: center;
        margin-bottom: 8px;
    }

    .fun-test-portal-head h1 {
        font-size: 22px;
    }

    .fun-test-portal-head .ghost-button {
        width: auto;
        min-height: 32px;
        padding: 0 10px;
        font-size: 13px;
        white-space: nowrap;
    }

    .blind-fun-tests-page .fun-test-picker {
        overflow-x: auto !important;
        overflow-y: hidden !important;
    }

    .blind-fun-tests-page .fun-test-stage,
    .blind-fun-tests-page .fun-test-stage iframe {
        min-height: 640px;
        height: 700px;
    }
}
/* 20260513 fun tests swipe hint */
.fun-test-swipe-hint {
    display: none;
}

@media (max-width: 760px) {
    .fun-test-card {
        flex: 0 0 calc(100% - 54px);
        max-width: calc(100% - 54px);
    }

    .fun-test-picker {
        padding-right: 42px;
        background:
            linear-gradient(90deg, rgba(255,255,255,0), rgba(255,250,242,0.96) 78%, rgba(255,250,242,1)),
            linear-gradient(145deg, rgba(255,255,255,0.98), rgba(255,253,248,0.94));
        background-size: 82px 100%, auto;
        background-position: right top, center;
        background-repeat: no-repeat;
    }

    .fun-test-swipe-hint {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        justify-self: center;
        width: min(100%, 260px);
        min-height: 30px;
        margin: -2px auto 0;
        padding: 0 12px;
        border: 1px solid rgba(210, 146, 73, 0.46);
        border-radius: 999px;
        background: linear-gradient(135deg, #fff4df, #f2d8ac);
        color: #8b4513;
        font-size: 13px;
        font-weight: 800;
        box-shadow: 0 8px 18px rgba(139, 69, 19, 0.10);
    }

    .fun-test-swipe-hint b {
        display: inline-grid;
        place-items: center;
        width: 20px;
        height: 20px;
        border-radius: 999px;
        background: #d08a3a;
        color: #fff;
        font-size: 20px;
        line-height: 1;
        animation: fun-test-nudge 1.2s ease-in-out infinite;
    }
}

@media (max-width: 420px) {
    .fun-test-card {
        flex-basis: calc(100% - 48px);
        max-width: calc(100% - 48px);
    }
}

@keyframes fun-test-nudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* 20260514 course checkin */
.checkin-workspace,
.checkin-admin-grid {
    display: grid;
    gap: 14px;
}

/* Keep teaching management width aligned with other content panels */
#course-checkin,
#course-checkin .checkin-workspace,
#course-checkin .teaching-tab-panel,
#course-checkin .teaching-admin-panel,
#course-checkin .checkin-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

#course-checkin .checkin-workspace,
#course-checkin .teaching-tab-panel {
    overflow-x: hidden;
}

.checkin-admin-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
}

.checkin-flow-note {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border: 1px dashed rgba(212, 165, 116, 0.58);
    border-radius: 10px;
    background: #fffaf2;
    padding: 10px 12px;
    color: var(--school-copper);
}

.checkin-flow-note strong {
    margin-right: 4px;
}

.checkin-flow-note span {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: #fff;
    color: var(--school-muted);
    font-size: 13px;
    font-weight: 700;
}

.checkin-panel {
    border: 1px solid var(--school-line);
    border-radius: 10px;
    background: linear-gradient(180deg, #fffdf9 0%, #fffaf4 100%);
    box-shadow: 0 10px 24px rgba(124, 67, 22, 0.045);
    padding: 16px 18px;
}

.checkin-panel h3,
.checkin-panel h4 {
    margin: 0 0 10px;
    color: var(--school-copper);
}

.teaching-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 14px;
}

.teaching-tabs button {
    min-height: 38px;
    padding: 0 18px;
    border: 1px solid rgba(194, 132, 55, 0.62);
    border-radius: 8px;
    background: #fffdf8;
    color: var(--school-copper);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.teaching-tabs button.active {
    background: #d28f4f;
    color: #fff;
    box-shadow: 0 8px 18px rgba(157, 90, 32, 0.18);
}

.teaching-tab-panel {
    display: none;
}

.teaching-tab-panel.active {
    display: block;
}

.teaching-page-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.78fr) minmax(420px, 1.22fr);
    gap: 16px;
    align-items: start;
}

.teaching-form-panel,
.teaching-list-panel {
    min-width: 0;
}

.teaching-flow-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.teaching-flow-board article {
    border: 1px solid rgba(212, 165, 116, 0.36);
    border-radius: 8px;
    background: #fffaf2;
    padding: 12px;
}

.teaching-flow-board strong,
.teaching-board-title h4 {
    display: block;
    color: var(--school-copper);
}

.teaching-flow-board span,
.teaching-board-title span {
    display: block;
    margin-top: 6px;
    color: var(--school-muted);
    line-height: 1.55;
}

.checkin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.checkin-form-grid input,
.checkin-form-grid select,
.checkin-panel textarea,
.checkin-lesson-row textarea {
    width: 100%;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fff;
    color: var(--school-ink);
    font: inherit;
}

.checkin-form-grid input,
.checkin-form-grid select {
    min-height: 38px;
    padding: 0 10px;
}

.checkin-panel textarea,
.checkin-lesson-row textarea {
    margin-top: 10px;
    padding: 10px;
    resize: vertical;
}

.program-checks,
.registry-program-tags,
.registry-class-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.program-field {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
}

.program-field strong {
    color: var(--school-copper);
    font-size: 14px;
}

.program-checks label,
.registry-program-tags span,
.registry-class-tags span,
.checkin-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid rgba(212, 165, 116, 0.42);
    border-radius: 999px;
    background: #fffaf2;
    color: var(--school-copper);
    font-size: 13px;
    font-weight: 700;
}

.registry-class-tags {
    margin-top: 8px;
}

.registry-class-tags span {
    background: #fff;
    color: #7d3f13;
}

.registry-program-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.registry-program-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(194, 132, 55, 0.42);
    border-radius: 999px;
    background: #fff;
    color: #a33a2a;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.registry-program-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.registry-program-actions select {
    min-height: 30px;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fff;
    padding: 0 8px;
    font: inherit;
}

.registry-program-actions button {
    min-height: 30px;
    border: 1px solid rgba(194, 132, 55, 0.48);
    border-radius: 8px;
    background: #fff8ec;
    color: var(--school-copper);
    padding: 0 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.checkin-action-row,
.checkin-selected-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.teaching-board-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    justify-content: stretch;
    min-width: 0;
}

/* Backward-compatible layout for legacy markup without wrapper rows */
.teaching-board-filters > #registry-search {
    grid-column: 1;
    grid-row: 1;
}

.teaching-board-filters > #registry-filter-mode {
    grid-column: 2;
    grid-row: 1;
}

.teaching-board-filters > #registry-filter-program {
    grid-column: 3;
    grid-row: 1;
}

.teaching-board-filters > #student-batch-add-class-btn {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
}

.teaching-filter-row {
    display: grid;
    grid-template-columns: minmax(136px, 150px) minmax(240px, 1fr) minmax(140px, 170px) minmax(160px, 200px);
    gap: 10px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    align-items: center;
}

.teaching-filter-row > * {
    min-width: 0;
}

.teaching-filter-row #student-batch-add-class-btn {
    margin-top: 0;
    align-self: center;
    justify-self: start;
    min-height: 36px;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fff;
    color: var(--school-copper);
    box-shadow: none;
    font-weight: 700;
}

.teaching-filter-actions {
    display: flex;
    justify-content: flex-start;
    min-width: 0;
}

.checkin-selected-row {
    margin-top: 8px;
    color: var(--school-muted);
    font-weight: 700;
}

.teaching-board-filters input,
.teaching-board-filters select {
    min-height: 36px;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fff;
    padding: 0 10px;
    font: inherit;
}

.checkin-panel .primary-action,
.checkin-panel .ghost-button {
    margin-top: 10px;
}

.checkin-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.checkin-panel-head.compact {
    margin-bottom: 8px;
}

.course-program-filter-nav {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    max-width: 100%;
    flex-wrap: wrap;
}

.course-program-filter-nav button {
    min-height: 28px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #9b6230;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    text-decoration: underline;
    text-decoration-color: rgba(155, 98, 48, 0.42);
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    transition: color 0.14s ease, text-decoration-color 0.14s ease, font-weight 0.14s ease;
}

.course-program-filter-nav button:hover,
.course-program-filter-nav button:focus-visible {
    color: #7f4411;
    text-decoration-color: rgba(127, 68, 17, 0.68);
    outline: none;
}

.course-program-filter-nav button.active {
    color: #87501c;
    font-weight: 900;
    text-decoration-color: rgba(135, 80, 28, 0.68);
    text-shadow: 0 0 0 currentColor;
}

.course-management-toolbar {
    grid-template-columns: 1fr;
    align-items: center;
    overflow: visible;
}

.course-management-title-line {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    max-width: 100%;
}

.course-management-title-line h3 {
    flex: 0 0 auto;
}

.course-management-title-block {
    min-width: 0;
}

.course-management-title-block .checkin-muted {
    margin: 12px 0 0;
}

.teaching-admin-panel + .teaching-admin-panel {
    margin-top: 14px;
}

.teaching-action-bar,
.teaching-list-toolbar {
    display: grid;
    gap: 14px;
    align-items: center;
}

.teaching-action-bar {
    grid-template-columns: minmax(170px, 0.34fr) minmax(0, 1fr);
}

.student-action-bar {
    grid-template-columns: 1fr;
    gap: 12px;
}

.teaching-list-toolbar {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.class-action-bar {
    grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr);
}

.course-action-bar {
    grid-template-columns: 1fr;
    align-items: start;
    overflow: clip;
}

.teaching-action-title h3 {
    margin: 0;
    color: var(--school-copper);
    font-size: 20px;
    line-height: 1.2;
}

.teaching-action-title span {
    display: block;
    margin-top: 5px;
    color: var(--school-muted);
    font-size: 13px;
    line-height: 1.35;
}

.teaching-collapsible .teaching-action-title[data-teaching-collapse-toggle] {
    display: inline-block;
    cursor: pointer;
    border-radius: 8px;
}

.teaching-collapsible .teaching-action-title[data-teaching-collapse-toggle] h3 {
    display: inline-block;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
    transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.teaching-collapsible .teaching-action-title[data-teaching-collapse-toggle]:hover h3 {
    color: #b8681e;
    text-decoration-color: #d28f4f;
}

.teaching-collapse-hint {
    display: inline-block;
    margin-left: 10px;
    color: #a56a2f;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    vertical-align: 2px;
}

.teaching-collapsible .teaching-action-title[data-teaching-collapse-toggle]:hover .teaching-collapse-hint {
    color: #8d4b14;
}

.teaching-collapsible .teaching-action-title[data-teaching-collapse-toggle]:focus-visible {
    outline: 2px solid rgba(194, 132, 55, 0.62);
    outline-offset: 4px;
}

.teaching-collapsible.is-collapsed .teaching-action-bar {
    display: block;
}

.teaching-collapsible.is-collapsed .teaching-action-title span,
.teaching-collapsible.is-collapsed .student-action-tools,
.teaching-collapsible.is-collapsed .teaching-inline-fields,
.teaching-collapsible.is-collapsed .course-create-workspace,
.teaching-collapsible.is-collapsed .case-bind-status {
    display: none;
}

.teaching-inline-fields {
    display: grid;
    grid-template-columns: minmax(160px, 0.9fr) minmax(200px, 1fr) 140px;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.student-manual-fields {
    grid-template-columns: minmax(140px, 0.72fr) minmax(160px, 0.92fr) minmax(150px, 0.78fr) 140px;
}

.teaching-inline-fields.wide {
    grid-template-columns: minmax(180px, 1.15fr) minmax(150px, 0.78fr) minmax(145px, 0.7fr) minmax(118px, 0.48fr);
}

.course-create-workspace {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.course-fields {
    grid-template-columns: minmax(180px, 1.2fr) minmax(130px, 0.8fr) 142px 92px 112px;
    min-width: 0;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(212, 165, 116, 0.34);
}

.course-fields > * {
    min-width: 0;
}

.course-class-picker {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding-top: 0;
    min-width: 0;
}

.course-class-picker strong {
    color: var(--school-copper);
    font-size: 14px;
    line-height: 32px;
}

.student-action-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

.student-tool-row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.student-tool-row > strong {
    color: var(--school-copper);
    font-size: 14px;
    line-height: 36px;
    white-space: nowrap;
}

.teaching-upload-group {
    display: grid;
    grid-template-columns: minmax(160px, 0.9fr) minmax(200px, 1fr) 140px;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.teaching-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.teaching-file-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px;
    border: 1px solid rgba(194, 132, 55, 0.54);
    border-radius: 8px;
    background: #fff8ec;
    color: var(--school-copper);
    padding: 0 12px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

#registry-import-file-name {
    min-width: 0;
    overflow: hidden;
    color: var(--school-muted);
    font-size: 13px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#student-batch-add-class-btn,
#registry-import-btn,
#registry-save-btn {
    width: 100%;
}

#student-batch-add-class-btn {
    width: 150px;
}

.teaching-tool-strip {
    display: grid;
    grid-template-columns: minmax(160px, 1.15fr) repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    align-items: end;
}

.teaching-tool-strip.slim {
    grid-template-columns: minmax(220px, 1fr) 160px;
    align-items: center;
}

.teaching-tool-strip h3,
.teaching-tool-strip p {
    margin: 0;
}

.teaching-tool-strip input,
.teaching-tool-strip select,
.teaching-tool-strip textarea,
.teaching-inline-fields input,
.teaching-inline-fields select,
.teaching-board-filters input,
.teaching-board-filters select {
    min-width: 0;
    width: 100%;
    min-height: 36px;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fff;
    padding: 0 10px;
    color: var(--school-ink);
    font: inherit;
}

.teaching-inline-fields input:focus,
.teaching-inline-fields select:focus,
.teaching-board-filters input:focus,
.teaching-board-filters select:focus,
.inline-class-name-input:focus,
.inline-class-date-input:focus {
    border-color: rgba(178, 105, 29, 0.78);
    box-shadow: 0 0 0 3px rgba(210, 143, 79, 0.14);
    outline: none;
}

.teaching-tool-strip textarea {
    min-height: 38px;
    margin-top: 0;
    padding: 8px 10px;
    resize: vertical;
}

.program-checks.inline {
    max-height: none;
    overflow: visible;
    align-self: stretch;
    align-content: start;
    border: 0;
    border-radius: 8px;
    padding: 0;
    background: transparent;
}

.course-class-picker .program-checks.inline label {
    border-radius: 7px;
    background: #fff;
}

.course-class-picker .program-checks.inline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 8px;
    min-width: 0;
}

.course-class-picker .program-checks.inline label {
    min-height: 34px;
    margin: 0;
    border: 1px solid rgba(212, 165, 116, 0.36);
    padding: 0 10px;
    color: var(--school-ink);
    font-size: 13px;
    line-height: 1.25;
}

.course-class-picker .program-checks.inline input {
    margin-right: 6px;
}

.checkin-panel .primary-action.compact,
.checkin-panel .ghost-button.compact {
    min-height: 36px;
    margin-top: 0;
    white-space: nowrap;
}

.course-fields .primary-action.compact {
    width: 100%;
}

.teaching-batch-panel {
    display: grid;
    grid-template-columns: minmax(140px, auto) minmax(220px, 320px) auto auto;
    gap: 10px;
    align-items: center;
    margin: 8px 0 10px;
    border: 1px dashed rgba(212, 165, 116, 0.48);
    border-radius: 8px;
    background: #fffaf2;
    padding: 8px 10px;
}

.teaching-batch-panel[hidden] {
    display: none;
}

.teaching-batch-panel span {
    color: var(--school-copper);
    font-weight: 800;
}

.teaching-batch-panel select {
    min-height: 36px;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fff;
    padding: 0 10px;
    font: inherit;
}

@media (max-width: 1120px) {
    .student-action-tools {
        grid-template-columns: 1fr;
    }

    .teaching-filter-row {
        grid-template-columns: minmax(130px, 144px) minmax(200px, 1fr) minmax(130px, 160px) minmax(150px, 180px);
    }
}

@media (max-width: 920px) {
    .teaching-filter-row {
        grid-template-columns: 140px minmax(200px, 1fr) 150px 180px;
    }

    .teaching-board-filters > #registry-search {
        grid-column: 1;
    }

    .teaching-board-filters > #registry-filter-mode {
        grid-column: 2;
    }

    .teaching-board-filters > #registry-filter-program {
        grid-column: 3;
    }
}

.registry-student-list,
.course-checkin-list,
.teaching-class-list {
    display: block;
}

.registry-student-list {
    display: block;
}

.teaching-table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid rgba(212, 165, 116, 0.34);
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.teaching-table-wrap.compact {
    margin-top: 8px;
}

.teaching-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    font-size: 14px;
}

.teaching-table.compact {
    min-width: 680px;
    font-size: 13px;
}

.student-table {
    min-width: 940px;
    table-layout: fixed;
}

.student-table col.student-col-select { width: 30px; }
.student-table col.student-col-index { width: 42px; }
.student-table col.student-col-code { width: 76px; }
.student-table col.student-col-name { width: 14ch; }
.student-table col.student-col-day { width: 68px; }
.student-table col.student-col-date { width: 112px; }
.student-table col.student-col-programs { width: 260px; }
.student-table col.student-col-actions { width: 184px; }

.student-table th,
.student-table td {
    padding-left: 6px;
    padding-right: 6px;
}

.class-table {
    min-width: 100%;
    table-layout: fixed;
    font-size: 13px;
}

.class-table th,
.class-table td {
    padding: 4px 6px;
    line-height: 1.25;
}

.teaching-table th,
.teaching-table td {
    border-bottom: 1px solid rgba(212, 165, 116, 0.24);
    padding: 8px 10px;
    text-align: left;
    vertical-align: middle;
}

.teaching-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff8ec;
    color: var(--school-copper);
    font-weight: 800;
    white-space: nowrap;
}

.checkin-empty {
    border: 1px dashed rgba(212, 165, 116, 0.48);
    border-radius: 8px;
    background: #fffaf2;
    padding: 18px;
    text-align: center;
}

.teaching-table tbody tr:hover,
.teaching-table tbody tr.active:not(.course-row-active) {
    background: #fffaf2;
}

.course-table tbody tr.course-row-active,
.course-table tbody tr.course-row-active:hover,
.course-table tbody tr.active.course-row-active {
    background: #fff1d7;
    box-shadow: inset 4px 0 0 #d79a43, inset 0 0 0 9999px rgba(215, 154, 67, 0.08);
}

.course-table tbody tr.course-row-active .table-link-button {
    color: #7a3d08;
    border-color: rgba(166, 91, 19, 0.58);
    background: #ffe7bd;
}

.class-table tbody tr.class-row-active,
.class-table tbody tr.class-row-active:hover,
.class-table tbody tr.active.class-row-active {
    background: #fff1d7;
    box-shadow: inset 4px 0 0 #d79a43, inset 0 0 0 9999px rgba(215, 154, 67, 0.08);
}

.class-table tbody tr.class-row-active .table-link-button,
.class-table tbody tr.class-row-active .teaching-soft-tag {
    color: #7a3d08;
    border-color: rgba(166, 91, 19, 0.58);
    background: #ffe7bd;
}

.teaching-table tr.class-member-frozen {
    background: #f7f1e8;
    color: #8d7660;
}

.teaching-table tr.class-member-frozen td {
    color: #8d7660;
}

.teaching-table td {
    color: var(--school-ink);
}

.teaching-table td:nth-child(1),
.teaching-table td:nth-child(2) {
    width: 46px;
    white-space: nowrap;
}

.student-table th:nth-child(1),
.student-table td:nth-child(1) {
    width: 30px;
    padding-left: 6px;
    padding-right: 2px;
    text-align: center;
}

.student-table th:nth-child(2),
.student-table td:nth-child(2) {
    width: 42px;
    padding-left: 2px;
    padding-right: 2px;
    text-align: center;
}

.student-table th:nth-child(3),
.student-table td:nth-child(3) {
    width: 76px;
    padding-left: 4px;
    padding-right: 4px;
    white-space: nowrap;
}

.class-table th:nth-child(1),
.class-table td:nth-child(1) {
    width: 6%;
}

.class-table th:nth-child(2),
.class-table td:nth-child(2) {
    width: 28%;
}

.class-table th:nth-child(3),
.class-table td:nth-child(3) {
    width: 16%;
}

.class-table th:nth-child(4),
.class-table td:nth-child(4) {
    width: 12%;
}

.class-table th:nth-child(5),
.class-table td:nth-child(5) {
    width: 18%;
}

.class-table th:nth-child(6),
.class-table td:nth-child(6) {
    width: 20%;
}

.student-table th:nth-child(4),
.student-table td:nth-child(4) {
    width: 14ch;
    max-width: 14ch;
}

.student-table td:nth-child(4) {
    white-space: normal;
}

.student-table td:nth-child(4) strong {
    display: block;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.student-table tr.registry-student-frozen {
    background: #fff8f3;
}

.student-table tr.registry-student-frozen td {
    color: rgba(72, 49, 28, 0.68);
}

.student-table tbody tr.registry-student-active,
.student-table tbody tr.registry-student-active:hover,
.student-table tbody tr.registry-student-editing,
.student-table tbody tr.registry-student-editing:hover {
    background: #fff1d7;
    box-shadow: inset 4px 0 0 #d79a43, inset 0 0 0 9999px rgba(215, 154, 67, 0.08);
}

.student-table tbody tr.registry-student-active td {
    color: #7a3d08;
}

.registry-status-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.registry-status-badge.frozen {
    border: 1px solid rgba(176, 92, 55, 0.28);
    background: #fff0e8;
    color: #a8471f;
}

.student-table th:nth-child(6),
.student-table td:nth-child(6) {
    white-space: nowrap;
    width: 112px;
}

.student-table th:nth-child(5),
.student-table td:nth-child(5) {
    width: 68px;
    white-space: nowrap;
    text-align: center;
}

.student-table th:nth-child(7),
.student-table td:nth-child(7) {
    width: 260px;
    max-width: 260px;
}

.student-table td:nth-child(7) .registry-class-tags {
    margin-top: 0;
    max-width: 260px;
    gap: 6px;
}

.student-table .registry-class-tags {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    align-items: center;
    justify-content: start;
    gap: 6px;
}

.student-table .registry-class-tags > span,
.student-table .registry-program-chip {
    min-width: 0;
    max-width: 74px;
    justify-content: center;
    white-space: nowrap;
}

.student-table .registry-class-tags-editing {
    grid-template-columns: repeat(3, minmax(0, 74px));
    align-items: center;
}

.student-table .registry-class-tags-editing .registry-program-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    margin-top: 0;
    width: 100%;
}

.student-table .registry-class-tags-editing .registry-program-actions select {
    width: 100%;
    min-width: 0;
    min-height: 28px;
    padding-left: 7px;
    padding-right: 7px;
}

.student-table .registry-class-tags-editing .registry-program-actions button {
    min-height: 28px;
    padding-left: 8px;
    padding-right: 8px;
    white-space: nowrap;
}

.student-table td:nth-child(8) .teaching-row-actions {
    width: 184px;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 6px;
    justify-content: flex-start;
}

.student-table td:nth-child(8) .teaching-row-actions button {
    min-height: 28px;
    padding-left: 8px;
    padding-right: 8px;
}

.teaching-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.teaching-detail-actions .course-download-format {
    width: 76px;
    min-height: 30px;
    border: 1px solid rgba(212, 165, 116, 0.48);
    border-radius: 7px;
    background: #fffdf8;
    color: var(--school-ink);
    font: inherit;
    font-size: 12px;
}

.inline-class-name-input,
.inline-class-date-input {
    width: min(280px, 100%);
    min-height: 32px;
    border: 1px solid rgba(212, 165, 116, 0.42);
    border-radius: 7px;
    background: #fff;
    color: var(--school-ink);
    padding: 0 9px;
    font: inherit;
    font-weight: 800;
}

.class-table .inline-class-name-input {
    width: 100%;
    max-width: 180px;
    min-height: 28px;
    padding: 0 8px;
    font-size: 13px;
}

.class-table .teaching-row-actions {
    gap: 3px;
    flex-wrap: nowrap;
}

.class-table .teaching-row-actions button {
    white-space: nowrap;
    min-width: 48px;
    padding: 0 8px;
}

.class-table .inline-class-date-input {
    width: 126px;
    min-height: 28px;
    padding: 0 8px;
    font-size: 13px;
}

.class-table .teaching-soft-tag {
    min-height: 22px;
    padding: 0 7px;
    font-size: 12px;
    line-height: 1;
}

.course-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 13px;
}

#course-checkin-list .teaching-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.course-table-admin col.course-col-index { width: 4%; }
.course-table-admin col.course-col-class { width: 9%; }
.course-table-admin col.course-col-name { width: 30%; }
.course-table-admin col.course-col-teacher { width: 9%; }
.course-table-admin col.course-col-count { width: 6%; }
.course-table-admin col.course-col-date { width: 11%; }
.course-table-admin col.course-col-actions { width: 31%; }

.course-table-member col.course-col-index { width: 5%; }
.course-table-member col.course-col-class { width: 12%; }
.course-table-member col.course-col-name { width: 42%; }
.course-table-member col.course-col-teacher { width: 12%; }
.course-table-member col.course-col-count { width: 12%; }
.course-table-member col.course-col-score { width: 17%; }

.course-table th,
.course-table td {
    padding: 4px 5px;
    line-height: 1.15;
}

.course-table-admin th:nth-child(1),
.course-table-admin td:nth-child(1) {
    width: 4%;
}

.course-table-admin th:nth-child(2),
.course-table-admin td:nth-child(2) {
    width: 9%;
    max-width: 9%;
}

.course-table-admin th:nth-child(3),
.course-table-admin td:nth-child(3) {
    width: 30%;
    max-width: none;
}

.course-table-admin th:nth-child(4),
.course-table-admin td:nth-child(4) {
    width: 9%;
    max-width: 9%;
}

.course-table-admin th:nth-child(5),
.course-table-admin td:nth-child(5) {
    width: 6%;
    white-space: nowrap;
}

.course-table-admin th:nth-child(6),
.course-table-admin td:nth-child(6) {
    width: 11%;
    white-space: nowrap;
}

.course-table-admin th:nth-child(7),
.course-table-admin td:nth-child(7) {
    width: 31%;
    max-width: 31%;
}

.course-table-member th:nth-child(1),
.course-table-member td:nth-child(1) {
    width: 5%;
}

.course-table-member th:nth-child(2),
.course-table-member td:nth-child(2) {
    width: 12%;
    max-width: 12%;
}

.course-table-member th:nth-child(3),
.course-table-member td:nth-child(3) {
    width: 42%;
    max-width: none;
}

.course-table-member th:nth-child(4),
.course-table-member td:nth-child(4) {
    width: 12%;
    max-width: 12%;
}

.course-table-member th:nth-child(5),
.course-table-member td:nth-child(5) {
    width: 12%;
    white-space: nowrap;
}

.course-table-member th:nth-child(6),
.course-table-member td:nth-child(6) {
    width: 17%;
    white-space: nowrap;
}

.course-table .inline-course-name-input {
    width: 100%;
    max-width: 100%;
    min-height: 28px;
    padding: 0 8px;
    font-size: 13px;
}

.course-class-text {
    display: inline-block;
    max-width: 8ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.course-table .inline-course-teacher-input {
    width: 100%;
    max-width: 100%;
    min-height: 28px;
    padding: 0 8px;
    font-size: 13px;
}

.course-table .inline-class-date-input {
    width: 100%;
    min-height: 28px;
    padding: 0 8px;
    font-size: 13px;
}

.course-table .teaching-row-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    gap: 3px;
    width: 100%;
    min-width: 0;
}

.course-table .teaching-row-actions button {
    width: 100%;
    min-width: 0;
    min-height: 26px;
    padding: 0 2px;
    font-size: 12px;
    white-space: nowrap;
}

@media (min-width: 761px) {
    #course-checkin .course-table .teaching-row-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px 5px;
        width: 100%;
        max-width: none;
        min-width: 0;
        box-sizing: border-box;
    }

    #course-checkin .course-table .teaching-row-actions button {
        width: 100%;
        min-width: 0;
        min-height: 26px;
        padding: 0 4px;
        justify-content: center;
    }

    .school-workbench.sidebar-collapsed #course-checkin .course-table .teaching-row-actions {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 4px;
    }
}

.course-table td {
    min-width: 0;
}

.course-table td:nth-child(2),
.course-table td:nth-child(4) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-table td:nth-child(3) {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.course-table td:nth-child(7) {
    overflow: visible;
}

.course-table th:last-child,
.course-table td:last-child {
    text-align: left;
}

.course-cell-text {
    display: inline-block;
    max-width: 10ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.course-table .table-link-button {
    display: inline-block;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
    text-align: left;
    vertical-align: middle;
}

.inline-class-date-input {
    width: 148px;
    font-weight: 600;
}

.inline-student-code-input {
    width: 88px;
    max-width: 88px;
}

.inline-student-day-pillar-input {
    width: 64px;
    max-width: 64px;
    text-align: center;
}

.teaching-soft-tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    background: #fff8ec;
    color: var(--school-copper);
    padding: 0 9px;
    font-size: 13px;
    font-weight: 800;
}

.teaching-row-actions button,
.checkin-lesson-row button,
.table-link-button {
    min-height: 28px;
    border: 1px solid rgba(194, 132, 55, 0.48);
    border-radius: 7px;
    background: #fff8ec;
    color: var(--school-copper);
    padding: 0 9px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.table-link-button {
    background: transparent;
    border-color: transparent;
    padding: 0 2px;
    color: var(--school-copper);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.teaching-row-actions button:disabled,
.teaching-table input:disabled {
    cursor: not-allowed;
    opacity: 0.46;
}

.teaching-row-actions button.danger {
    border-color: rgba(190, 80, 62, 0.42);
    background: #fff5f2;
    color: #a33a2a;
}

.teaching-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}

.teaching-detail-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.teaching-detail-actions button {
    min-height: 30px;
    border: 1px solid rgba(170, 103, 43, 0.30);
    border-radius: 7px;
    background: #fff7ec;
    color: var(--school-copper);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.teaching-detail-head h3,
.teaching-detail-head h4 {
    margin: 0;
}

.teaching-detail-head span {
    color: var(--school-muted);
    font-size: 13px;
    font-weight: 700;
}

.registry-student-card,
.course-checkin-card,
.teaching-class-card,
.checkin-lesson-row {
    border: 1px solid rgba(212, 165, 116, 0.38);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.registry-student-card strong,
.course-checkin-card h4,
.teaching-class-card strong {
    display: block;
    margin-bottom: 8px;
}

.registry-student-card {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 0.9fr) minmax(160px, 1fr);
    gap: 10px;
    align-items: center;
}

.registry-student-card strong {
    margin-bottom: 0;
}

.student-select-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.student-select-row input {
    margin-top: 3px;
}

.course-checkin-card,
.teaching-class-card {
    cursor: pointer;
}

.teaching-class-card.active {
    border-color: #d28f4f;
    background: #fff8ec;
}

.teaching-class-card em {
    display: inline-flex;
    margin-top: 8px;
    color: var(--school-copper);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.course-checkin-card p,
.teaching-class-card span,
.teaching-class-card small,
.checkin-muted,
.checkin-empty {
    color: var(--school-muted);
    line-height: 1.6;
}

.teaching-class-card small {
    display: block;
}

.teaching-board-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(260px, 1fr) minmax(260px, 1fr);
    gap: 14px;
    align-items: start;
}

.teaching-board-grid > section {
    min-width: 0;
}

.teaching-board-title {
    margin-bottom: 10px;
}

.teaching-class-detail {
    margin-top: 12px;
    border-left: 4px solid #d28f4f;
    background: #fff8ec;
    padding: 12px;
}

.class-member-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.class-member-list span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    padding: 0 8px;
    border: 1px solid rgba(212, 165, 116, 0.36);
    border-radius: 999px;
    background: #fff;
    color: var(--school-copper);
    font-size: 13px;
    font-weight: 700;
}

.class-member-list button {
    border: 0;
    border-left: 1px solid rgba(212, 165, 116, 0.36);
    background: transparent;
    color: #b42318;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.class-selection-summary {
    margin-top: 10px;
    border-left: 4px solid #d28f4f;
    background: #fff8ec;
    padding: 10px 12px;
    color: var(--school-muted);
    font-weight: 700;
}

.class-member-picker {
    margin-top: 14px;
    border-top: 1px dashed rgba(212, 165, 116, 0.42);
    padding-top: 12px;
}

.class-student-pool {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.class-student-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    border: 1px solid rgba(212, 165, 116, 0.32);
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}

.class-student-option strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.class-student-option button {
    min-height: 30px;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fff8ec;
    color: var(--school-copper);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.course-checkin-detail {
    margin-top: 14px;
    border-left: 4px solid #d28f4f;
    background: #fff8ec;
    padding: 12px;
}

.checkin-student-name {
    display: inline-block;
    max-width: 16ch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.checkin-col-no {
    width: calc(3ch + 16px);
    min-width: calc(3ch + 16px);
    max-width: calc(3ch + 16px);
}

.checkin-col-code {
    width: calc(7ch + 16px);
    min-width: calc(7ch + 16px);
    max-width: calc(7ch + 16px);
}

.checkin-col-name {
    width: calc(16ch + 16px);
    min-width: calc(16ch + 16px);
    max-width: calc(16ch + 16px);
}

.checkin-col-name-cell {
    width: calc(16ch + 16px);
    min-width: calc(16ch + 16px);
    max-width: calc(16ch + 16px);
}

.checkin-col-lesson {
    width: calc(7ch + 24px);
    min-width: calc(7ch + 24px);
    max-width: calc(7ch + 24px);
}

.checkin-stats-table {
    display: inline-table;
    min-width: 0;
    max-width: none;
    table-layout: fixed;
}

.checkin-stats-table th,
.checkin-stats-table td {
    padding: 6px 8px;
    box-sizing: border-box;
    white-space: nowrap;
}

.checkin-stats-table .checkin-col-no,
.checkin-stats-table th.checkin-col-no,
.checkin-stats-table td:nth-child(1) {
    width: calc(3ch + 16px);
    min-width: calc(3ch + 16px);
    max-width: calc(3ch + 16px);
}

.checkin-stats-table .checkin-col-code,
.checkin-stats-table th.checkin-col-code,
.checkin-stats-table td:nth-child(2) {
    width: calc(7ch + 16px);
    min-width: calc(7ch + 16px);
    max-width: calc(7ch + 16px);
}

.checkin-stats-table .checkin-col-name,
.checkin-stats-table th.checkin-col-name,
.checkin-stats-table td:nth-child(3) {
    width: calc(16ch + 16px);
    min-width: calc(16ch + 16px);
    max-width: calc(16ch + 16px);
}

.checkin-stats-table .checkin-col-lesson,
.checkin-stats-table th.checkin-col-lesson,
.checkin-stats-table td:nth-child(n+4) {
    width: calc(7ch + 24px);
    min-width: calc(7ch + 24px);
    max-width: calc(7ch + 24px);
}

.checkin-stats-table.is-editing-lessons .checkin-col-lesson,
.checkin-stats-table.is-editing-lessons th.checkin-col-lesson,
.checkin-stats-table.is-editing-lessons td:nth-child(n+4) {
    width: calc(9ch + 40px);
    min-width: calc(9ch + 40px);
    max-width: calc(9ch + 40px);
}

.checkin-stats-table th[data-checkin-lesson-title] {
    cursor: help;
}

.checkin-lesson-title-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: min(280px, calc(100vw - 24px));
    padding: 8px 10px;
    border: 1px solid rgba(184, 116, 45, 0.34);
    border-radius: 8px;
    background: #fffaf2;
    color: #7a3d08;
    box-shadow: 0 10px 28px rgba(91, 45, 8, 0.16), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    pointer-events: none;
    transform: translateY(2px);
    opacity: 0;
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.checkin-lesson-title-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.checkin-lesson-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-width: 0;
}

.checkin-lesson-delete-btn {
    flex: 0 0 auto;
    min-width: 26px;
    height: 24px;
    padding: 0 5px;
    border: 1px solid rgba(214, 74, 62, 0.45);
    border-radius: 8px;
    background: #fff5f2;
    color: #b92519;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.checkin-lesson-delete-btn:hover {
    background: #ffe9e3;
    border-color: rgba(214, 74, 62, 0.72);
}

.checkin-stats-table .checkin-col-review,
.checkin-stats-table th.checkin-col-review,
.checkin-stats-table td.checkin-col-review {
    width: calc(7ch + 20px);
    min-width: calc(7ch + 20px);
    max-width: calc(7ch + 20px);
}

.checkin-stats-table th.checkin-col-review {
    overflow: visible;
    text-overflow: clip;
}

.checkin-stats-table th,
.checkin-stats-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkin-score-input {
    width: 100%;
    min-width: 0;
    height: 30px;
    padding: 3px 4px;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fffdf8;
    color: #5f2f09;
    font: inherit;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.checkin-score-input:focus {
    outline: none;
    border-color: #c9812f;
    background: #fff7e8;
    box-shadow: 0 0 0 2px rgba(201, 129, 47, 0.18);
}

.checkin-score-input.saving {
    background: #fff4d9;
}

.checkin-score-input.saved {
    border-color: #8fc7a7;
    background: #effaf4;
}

.checkin-score-input.error {
    border-color: #d96954;
    background: #fff1ee;
}

.checkin-score-cell {
    position: relative;
    width: 100%;
}

.checkin-score-cell .checkin-score-input {
    padding-left: 6px;
    padding-right: 24px;
}

.checkin-homework-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    display: inline-flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #d95f45;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    border: 0;
}

.checkin-homework-stack {
    position: absolute;
    top: 2px;
    right: 2px;
    display: inline-grid;
    gap: 2px;
    width: 16px;
    pointer-events: none;
}

.checkin-homework-stack .checkin-homework-badge {
    position: static;
}

.checkin-homework-badge.clickable {
    pointer-events: auto;
    cursor: pointer;
}

.checkin-homework-review-badge {
    background: #3d8f63;
}

.checkin-homework-badge.empty {
    background: #a7a7a7;
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease, visibility 0.12s ease;
}

.checkin-score-cell:hover .checkin-homework-badge.empty,
.checkin-score-cell:focus-within .checkin-homework-badge.empty {
    opacity: 1;
    visibility: visible;
}

.checkin-basic-badge,
.checkin-program-badge {
    display: inline-flex;
    width: 18px;
    height: 18px;
    margin-left: 5px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff3d8;
    color: #8b4513;
    border: 1px solid rgba(212, 165, 116, 0.72);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    vertical-align: middle;
}

.checkin-program-badge.high {
    background: #f1f7ff;
    color: #1f5f9f;
    border-color: rgba(91, 143, 204, 0.72);
}

.checkin-review-btn {
    width: 100%;
    min-height: 30px;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fffdf8;
    color: #7a4720;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.checkin-review-btn.reviewed {
    border-color: rgba(41, 139, 92, 0.45);
    background: #effaf4;
    color: #087345;
}

.checkin-review-empty {
    display: inline-flex;
    width: 100%;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 165, 116, 0.38);
    border-radius: 8px;
    background: #fffdf8;
    color: #8c755f;
    font-size: 12px;
    font-weight: 900;
    box-sizing: border-box;
}

.checkin-review-head {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    white-space: nowrap;
}

.checkin-review-head button {
    display: inline-flex;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(190, 80, 62, 0.42);
    border-radius: 999px;
    background: #fff5f2;
    color: #a33a2a;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    box-sizing: border-box;
}

.my-checkin-score-cell .table-link-button {
    width: 100%;
    min-height: 30px;
    padding-right: 18px;
    box-sizing: border-box;
}

.table-link-button.disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--school-copper);
    text-decoration: none;
}

.checkin-stats-bottom-scroll {
    position: fixed;
    bottom: 10px;
    z-index: 1200;
    height: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid rgba(212, 165, 116, 0.42);
    border-radius: 999px;
    background: rgba(255, 248, 236, 0.96);
    box-shadow: 0 2px 8px rgba(85, 49, 14, 0.14);
}

.checkin-stats-bottom-scroll-inner {
    height: 1px;
}

body.checkin-publish-modal-open {
    overflow: hidden;
}

body.checkin-analysis-modal-open {
    overflow: hidden;
}

body.checkin-homework-modal-open {
    overflow: hidden;
}

body.checkin-review-modal-open {
    overflow: hidden;
}

body.checkin-class-modal-open {
    overflow: hidden;
}

.checkin-homework-modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(30, 19, 11, 0.36);
}

.checkin-homework-dialog {
    width: min(980px, 94vw);
    max-height: min(760px, 90vh);
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 10px;
    background: #fffdf8;
    box-shadow: 0 18px 42px rgba(70, 42, 16, 0.24);
    padding: 14px;
}

.checkin-homework-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.checkin-homework-dialog-head h3 {
    margin: 0;
    color: var(--school-copper);
    font-size: 18px;
}

.checkin-homework-dialog-head button {
    border: 1px solid rgba(212, 165, 116, 0.72);
    border-radius: 8px;
    background: #fff;
    color: var(--school-copper);
    font-weight: 800;
    min-height: 34px;
    padding: 0 14px;
    cursor: pointer;
}

.checkin-homework-links {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.checkin-homework-links a,
.checkin-homework-links button {
    box-sizing: border-box;
    display: block;
    width: 100%;
    border: 1px solid rgba(234, 217, 197, 0.95);
    border-radius: 8px;
    background: #fff8ec;
    color: #5f2f09;
    font-weight: 800;
    padding: 9px 10px;
    text-decoration: none;
    word-break: break-all;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.checkin-homework-links button:hover,
.checkin-homework-links a:hover {
    border-color: rgba(212, 165, 116, 0.85);
    background: #fff3df;
}

.checkin-homework-preview-frame {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    height: min(68vh, 620px);
    border: 1px solid rgba(234, 217, 197, 0.95);
    border-radius: 8px;
    background: #fffdf8;
}

.checkin-homework-dialog-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.checkin-homework-dialog-foot a {
    color: #8b4513;
    font-weight: 800;
}

.checkin-homework-review-panel {
    margin-top: 12px;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fffaf2;
    padding: 12px;
}

.checkin-homework-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--school-copper);
    font-weight: 900;
    margin-bottom: 8px;
}

.checkin-homework-review-head span {
    color: #3d8f63;
    font-size: 13px;
    font-weight: 800;
}

.checkin-homework-review-stars,
.checkin-homework-review-readonly-stars {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-bottom: 8px;
    color: #c79135;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.checkin-homework-review-star {
    border: 0;
    background: transparent;
    color: #d8c6a6;
    font: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.checkin-homework-review-star.active {
    color: #c9852e;
}

.checkin-homework-review-panel textarea {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 120px;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fff;
    color: var(--school-ink);
    font: inherit;
    line-height: 1.6;
    padding: 10px;
    resize: vertical;
}

.checkin-homework-review-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.checkin-homework-review-actions button {
    border: 1px solid rgba(212, 165, 116, 0.72);
    border-radius: 8px;
    background: #d18a45;
    color: #fff;
    font-weight: 900;
    min-height: 34px;
    padding: 0 14px;
    cursor: pointer;
}

.checkin-homework-review-readonly-content {
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--school-ink);
    line-height: 1.7;
}

.checkin-review-modal {
    position: fixed;
    inset: 0;
    z-index: 1700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(30, 19, 11, 0.36);
}

.checkin-review-dialog {
    width: min(560px, 92vw);
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 10px;
    background: #fffdf8;
    box-shadow: 0 18px 42px rgba(70, 42, 16, 0.24);
    padding: 14px;
}

.checkin-review-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.checkin-review-dialog-head h3 {
    margin: 0;
    color: var(--school-copper);
    font-size: 18px;
}

.checkin-review-dialog-head button,
.checkin-review-dialog-actions button {
    border: 1px solid rgba(212, 165, 116, 0.72);
    border-radius: 8px;
    background: #fff;
    color: var(--school-copper);
    font-weight: 800;
    min-height: 34px;
    padding: 0 14px;
    cursor: pointer;
}

.checkin-review-dialog textarea {
    display: block;
    width: 100%;
    min-height: 180px;
    padding: 10px;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fff;
    color: var(--school-ink);
    font: inherit;
    line-height: 1.55;
    box-sizing: border-box;
    resize: vertical;
}

.checkin-review-content {
    max-height: min(520px, 72vh);
    overflow: auto;
    padding: 12px;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fff;
    color: var(--school-ink);
    font: inherit;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.checkin-review-dialog-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

.checkin-review-error {
    flex: 1 1 auto;
    min-width: 0;
    color: #b8322b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
}

.checkin-review-dialog-actions button {
    background: #d18a45;
    color: #fff;
}

.course-roster-edit-panel {
    margin: 12px 0;
    border: 1px solid rgba(212, 165, 116, 0.48);
    border-radius: 10px;
    background: rgba(255, 250, 242, 0.72);
    padding: 10px;
}

.course-roster-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--school-copper);
}

.course-roster-edit-head strong {
    font-size: 16px;
}

.course-roster-edit-head span {
    color: var(--school-muted);
    font-size: 13px;
    font-weight: 700;
}

.course-roster-edit-table th:nth-child(1),
.course-roster-edit-table td:nth-child(1) {
    width: 58px;
}

.course-roster-edit-table th:nth-child(2),
.course-roster-edit-table td:nth-child(2) {
    width: 110px;
}

.course-roster-edit-table th:nth-child(4),
.course-roster-edit-table td:nth-child(4) {
    width: 96px;
    text-align: center;
}

.course-roster-edit-table tr.course-roster-excluded td {
    color: var(--school-muted);
    background: rgba(255, 250, 242, 0.62);
}

.course-roster-edit-table tr.course-roster-excluded td:nth-child(3)::after {
    content: " 未参加";
    color: #b8322b;
    font-size: 12px;
    font-weight: 700;
}

.checkin-analysis-modal {
    position: fixed;
    inset: 0;
    z-index: 3900;
    background: rgba(22, 16, 10, 0.48);
    display: grid;
    place-items: center;
    padding: 16px;
}

.checkin-analysis-dialog {
    width: min(920px, calc(100vw - 24px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    border: 1px solid rgba(212, 165, 116, 0.46);
    border-radius: 12px;
    background: #fffefb;
    box-shadow: 0 20px 42px rgba(66, 39, 14, 0.32);
    padding: 14px;
}

.checkin-analysis-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.checkin-analysis-head h3 {
    margin: 0;
    color: var(--school-copper);
}

.checkin-analysis-head p {
    margin: 6px 0 0;
    color: var(--school-muted);
    line-height: 1.45;
}

.checkin-analysis-head button,
.checkin-analysis-toolbar button {
    min-height: 32px;
    border: 1px solid rgba(170, 103, 43, 0.34);
    border-radius: 7px;
    background: #fff7ec;
    color: var(--school-copper);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.checkin-analysis-toolbar button.active {
    background: #d69a58;
    color: #fff;
}

.checkin-analysis-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
    margin-bottom: 10px;
}

.checkin-analysis-toolbar label {
    display: grid;
    gap: 4px;
    min-width: min(320px, 100%);
    color: var(--school-copper);
    font-size: 12px;
    font-weight: 800;
}

.checkin-analysis-toolbar .checkin-analysis-download-field {
    min-width: 126px;
}

.checkin-analysis-toolbar select {
    min-height: 34px;
    border: 1px solid rgba(212, 165, 116, 0.42);
    border-radius: 8px;
    background: #fff;
    padding: 0 10px;
    color: var(--school-ink);
    font: inherit;
}

.checkin-analysis-title {
    margin: 2px 0 8px;
    color: var(--school-copper);
    font-size: 16px;
    font-weight: 900;
}

.checkin-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.checkin-analysis-grid.metrics {
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
}

.checkin-analysis-grid.charts {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.checkin-analysis-grid.charts .checkin-chart-card {
    height: 162px;
    min-height: 0;
    overflow: auto;
}

.checkin-analysis-lesson-details {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.checkin-analysis-lesson-details .checkin-analysis-card {
    height: 248px;
    min-height: 0;
    overflow: auto;
}

.checkin-analysis-course-main {
    --checkin-analysis-course-card-height: 178px;
    --checkin-analysis-course-main-height: calc(var(--checkin-analysis-course-card-height) * 3 + 16px);
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.95fr);
    gap: 8px;
    align-items: stretch;
    margin-bottom: 8px;
}

.checkin-analysis-course-left {
    display: grid;
    gap: 8px;
    min-width: 0;
    height: var(--checkin-analysis-course-main-height);
}

.checkin-analysis-chart-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: var(--checkin-analysis-course-card-height);
    gap: 8px;
}

.checkin-analysis-course-bottom {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: var(--checkin-analysis-course-card-height);
    gap: 8px;
}

.checkin-analysis-chart-stack .checkin-analysis-card,
.checkin-analysis-course-bottom .checkin-analysis-card {
    height: var(--checkin-analysis-course-card-height);
    min-height: 0;
    overflow: auto;
}

.checkin-analysis-followups {
    align-self: stretch;
    height: var(--checkin-analysis-course-main-height);
    max-height: var(--checkin-analysis-course-main-height);
    min-height: 0;
    overflow: auto;
}

.checkin-analysis-followups ol.checkin-analysis-numbered {
    gap: 3px;
}

.checkin-analysis-followups ol.checkin-analysis-numbered li {
    font-size: 13px;
    line-height: 1.35;
}

.checkin-analysis-grid.metrics article,
.checkin-analysis-card {
    border: 1px solid rgba(212, 165, 116, 0.28);
    border-radius: 8px;
    background: #fff9f0;
    padding: 9px;
}

.checkin-analysis-grid.metrics article strong {
    display: block;
    color: var(--school-copper);
    font-size: 18px;
    line-height: 1.15;
}

.checkin-analysis-grid.metrics article span {
    display: block;
    margin-top: 4px;
    color: var(--school-muted);
    font-size: 12px;
    font-weight: 700;
}

.checkin-analysis-card.wide {
    margin-top: 2px;
}

.checkin-analysis-card h4 {
    margin: 0 0 7px;
    color: var(--school-copper);
    font-size: 14px;
}

.checkin-analysis-card p {
    margin: 0;
    color: var(--school-ink);
    line-height: 1.55;
}

.checkin-analysis-card ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.checkin-analysis-card ol.checkin-analysis-numbered {
    display: grid;
    gap: 4px;
    margin: 0;
    padding-left: 22px;
}

.checkin-analysis-card ol.checkin-analysis-numbered li {
    display: list-item;
    color: var(--school-ink);
    line-height: 1.45;
}

.checkin-analysis-card li {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    color: var(--school-ink);
    line-height: 1.35;
}

.checkin-analysis-card li.checkin-analysis-line {
    display: block;
}

.checkin-analysis-card li strong {
    color: var(--school-copper);
    white-space: nowrap;
}

.checkin-chart-bars {
    display: grid;
    gap: 7px;
}

.checkin-chart-row {
    display: grid;
    grid-template-columns: minmax(58px, 0.8fr) minmax(90px, 2fr) minmax(42px, auto);
    gap: 7px;
    align-items: center;
    color: var(--school-ink);
    font-size: 12px;
    font-weight: 700;
}

.checkin-chart-row > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkin-chart-row > strong {
    color: var(--school-copper);
    text-align: right;
    white-space: nowrap;
}

.checkin-chart-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #f0e2d1;
}

.checkin-chart-track i {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: #d69a58;
}

.checkin-chart-track i.good {
    background: #4d9a62;
}

.checkin-chart-track i.warn {
    background: #d9a441;
}

.checkin-chart-track i.risk {
    background: #c65a47;
}

.checkin-analysis-muted {
    color: var(--school-muted) !important;
}

@media (max-width: 760px) {
    .checkin-analysis-toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }

    .checkin-analysis-toolbar label {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .checkin-analysis-toolbar .checkin-analysis-download-field {
        grid-column: auto;
    }

    .checkin-analysis-toolbar button {
        width: 100%;
    }

    .checkin-analysis-grid.charts {
        grid-template-columns: 1fr;
    }

    .checkin-analysis-grid.charts .checkin-chart-card,
    .checkin-analysis-lesson-details .checkin-analysis-card {
        height: auto;
        max-height: 320px;
    }

    .checkin-analysis-lesson-details {
        grid-template-columns: 1fr;
    }

    .checkin-analysis-course-main,
    .checkin-analysis-chart-stack,
    .checkin-analysis-course-bottom {
        grid-template-columns: 1fr;
    }

    .checkin-analysis-course-left,
    .checkin-analysis-chart-stack .checkin-analysis-card,
    .checkin-analysis-course-bottom .checkin-analysis-card {
        height: auto;
    }

    .checkin-analysis-chart-stack,
    .checkin-analysis-course-bottom {
        grid-auto-rows: auto;
    }

    .checkin-analysis-followups {
        height: auto;
        max-height: 320px;
    }
}

.checkin-publish-modal {
    position: fixed;
    inset: 0;
    z-index: 3800;
    background: rgba(22, 16, 10, 0.46);
    display: grid;
    place-items: center;
    padding: 16px;
}

.checkin-publish-dialog {
    width: min(760px, calc(100vw - 24px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    border: 1px solid rgba(212, 165, 116, 0.44);
    border-radius: 12px;
    background: #fffefb;
    box-shadow: 0 20px 42px rgba(66, 39, 14, 0.3);
    padding: 16px;
}

.checkin-publish-dialog h3 {
    margin: 0;
    color: var(--school-copper);
}

.checkin-publish-desc {
    margin: 8px 0 10px;
    color: var(--school-muted);
    line-height: 1.45;
}

.checkin-publish-meta {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(220px, 1fr);
    gap: 10px 16px;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 700;
}

.checkin-publish-title-field {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr);
    gap: 8px;
    align-items: center;
    color: var(--school-copper);
}

.checkin-publish-title-field input {
    min-height: 34px;
    border: 1px solid rgba(212, 165, 116, 0.42);
    border-radius: 8px;
    background: #fff;
    padding: 0 10px;
    color: var(--school-ink);
    font: inherit;
    font-weight: 600;
}

.checkin-publish-input-row {
    display: grid;
    grid-template-columns: auto 120px auto;
    gap: 10px;
    align-items: center;
}

.checkin-publish-input-row label {
    color: var(--school-copper);
    font-weight: 700;
}

.checkin-publish-input-row input {
    min-height: 34px;
    border: 1px solid rgba(212, 165, 116, 0.42);
    border-radius: 8px;
    padding: 0 10px;
    font: inherit;
}

.checkin-publish-dialog textarea {
    width: 100%;
    min-height: 180px;
    border: 1px solid rgba(212, 165, 116, 0.34);
    border-radius: 8px;
    background: #fff;
    padding: 10px;
    resize: vertical;
    font: inherit;
    line-height: 1.5;
}

.checkin-publish-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.checkin-publish-dialog.shake {
    animation: checkinDialogShake 0.24s ease;
}

@keyframes checkinDialogShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

@media (max-width: 760px) {
    .checkin-publish-meta,
    .checkin-publish-title-field {
        grid-template-columns: 1fr;
    }

    .checkin-publish-input-row {
        grid-template-columns: 1fr;
    }
}

.teaching-table tr.checkin-lesson-row {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.teaching-table .checkin-lesson-row textarea {
    min-height: 58px;
    margin-top: 6px;
    font-size: 12px;
}

.checkin-lesson-list {
    display: grid;
    gap: 10px;
}

.checkin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.checkin-stat-grid article,
.checkin-student-stat-list div {
    border: 1px solid rgba(212, 165, 116, 0.32);
    border-radius: 8px;
    background: #fffaf2;
    padding: 10px;
}

.checkin-stat-grid strong,
.checkin-student-stat-list strong {
    display: block;
    color: var(--school-copper);
}

.checkin-stat-grid span,
.checkin-student-stat-list span {
    display: block;
    margin-top: 4px;
    color: var(--school-muted);
    font-size: 13px;
}

.checkin-student-stat-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
    margin: 10px 0 14px;
}

.checkin-lesson-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 120px auto;
    gap: 10px;
    align-items: start;
}

.checkin-lesson-row div span {
    display: block;
    margin-top: 4px;
    color: var(--school-muted);
}

.checkin-lesson-row textarea {
    grid-column: 1 / -1;
    min-height: 104px;
}

.course-checkin-page {
    min-height: 100dvh;
}

.checkin-mobile-shell {
    width: min(520px, calc(100% - 24px));
    margin: 0 auto;
    padding: 18px 0 34px;
}

.checkin-mobile-shell.checkin-class-page {
    width: min(1120px, calc(100% - 24px));
}

.checkin-brand {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--school-copper);
    font-weight: 800;
    text-decoration: none;
}

.checkin-card {
    border: 1px solid var(--school-line);
    border-radius: 12px;
    background: #fffdf8;
    padding: 18px;
    box-shadow: var(--school-shadow);
}

.checkin-card h1 {
    margin: 12px 0 6px;
    color: #7d3f13;
    font-size: 24px;
    line-height: 1.25;
}

.checkin-bind-box,
#checkin-form-box {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.checkin-bind-box[hidden],
#checkin-form-box[hidden] {
    display: none;
}

.checkin-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.checkin-inline-form input,
#checkin-score,
#checkin-note {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fff;
    padding: 10px;
    font: inherit;
}

.checkin-inline-form button,
.checkin-submit-btn,
.checkin-leave-btn,
.checkin-homework-btn,
.score-quick-row button {
    border: 1px solid rgba(212, 165, 116, 0.72);
    border-radius: 8px;
    background: #d28f4f;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.checkin-inline-form button {
    min-width: 74px;
}

.checkin-student {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-left: 4px solid #d28f4f;
    background: #fff8ec;
    padding: 10px 12px;
}

.checkin-label {
    color: var(--school-copper);
    font-weight: 800;
}

.score-quick-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.score-quick-row button {
    min-height: 46px;
    background: #fff;
    color: var(--school-copper);
}

.score-quick-row button.active {
    background: #d28f4f;
    color: #fff;
}

#checkin-score-range {
    width: 100%;
}

.checkin-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
}

.checkin-submit-btn,
.checkin-leave-btn,
.checkin-homework-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 8px;
    font-size: clamp(15px, 4.1vw, 17px);
    line-height: 1.1;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
}

.checkin-leave-btn {
    background: #fff;
    color: var(--school-copper);
}

.checkin-leave-btn.active {
    background: #d28f4f;
    color: #fff;
}

.checkin-homework-btn {
    background: #fff;
    color: var(--school-copper);
}

.checkin-homework-list {
    display: grid;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 8px;
    color: var(--school-muted);
    font-size: 14px;
    font-weight: 700;
}

.checkin-homework-list strong {
    color: var(--school-copper);
    font-size: 15px;
}

.checkin-homework-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.checkin-homework-list a {
    color: #5f2f09;
    text-decoration: underline;
    word-break: break-all;
}

.checkin-homework-delete {
    border: 1px solid #f0b8aa;
    border-radius: 8px;
    background: #fff7f3;
    color: #b42318;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    padding: 6px 9px;
}

.checkin-homework-delete:active {
    transform: translateY(1px);
}

.checkin-status {
    min-height: 24px;
    margin-top: 12px;
    color: var(--school-muted);
    font-weight: 700;
}

.checkin-status.is-error,
.case-bind-status.is-error {
    color: #b42318;
}

.checkin-status.is-success,
.case-bind-status.is-success {
    color: #157347;
}

.checkin-history-link {
    display: inline-flex;
    margin-top: 12px;
    color: var(--school-copper);
    font-weight: 800;
}

.checkin-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.checkin-history-row .checkin-history-link {
    margin-top: 0;
}

.checkin-class-link {
    display: inline-flex;
    border: 0;
    background: transparent;
    color: var(--school-copper);
    font: inherit;
    font-weight: 800;
    line-height: 1.2;
    padding: 0;
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
}

.checkin-class-link[hidden] {
    display: none;
}

.checkin-class-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: rgba(28, 18, 8, 0.46);
}

.checkin-class-dialog {
    width: min(960px, 100%);
    max-height: min(82vh, 760px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 12px;
    background: #fffdf8;
    box-shadow: 0 18px 50px rgba(58, 32, 12, 0.26);
}

.checkin-class-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(212, 165, 116, 0.32);
}

.checkin-class-dialog-head h3 {
    margin: 0;
    color: var(--school-copper);
    font-size: 18px;
}

.checkin-class-dialog-head p {
    margin: 3px 0 0;
    color: var(--school-muted);
    font-size: 13px;
    font-weight: 700;
}

.checkin-class-dialog-head button {
    min-width: 58px;
    border: 1px solid rgba(212, 165, 116, 0.58);
    border-radius: 8px;
    background: #fff;
    color: var(--school-copper);
    font-weight: 800;
    cursor: pointer;
}

.checkin-class-table-wrap {
    min-height: 0;
    overflow: auto;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y pinch-zoom;
}

.checkin-class-table-wrap.standalone {
    max-height: none;
    padding: 0;
}

.checkin-class-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.checkin-class-page-head h1 {
    margin-top: 6px;
}

.class-checkin-table {
    min-width: 560px;
}

.class-checkin-score-cell {
    min-height: 30px;
}

.class-checkin-score {
    display: inline-flex;
    width: 100%;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    padding-right: 20px;
    box-sizing: border-box;
    color: #5f2f09;
    font-weight: 800;
}

@media (max-width: 760px) {
    .checkin-admin-grid,
    .checkin-form-grid,
    .checkin-lesson-row,
    .teaching-flow-board,
    .teaching-board-grid,
    .teaching-page-grid {
        grid-template-columns: 1fr;
    }

    .registry-student-list,
    .course-checkin-list,
    .teaching-class-list,
    .class-student-pool,
    .registry-student-card {
        grid-template-columns: 1fr;
    }

    .checkin-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .course-program-filter-nav {
        justify-content: flex-start;
    }

    .course-program-filter-nav button {
        min-height: 26px;
        padding: 0;
        font-size: 13px;
    }

    .course-management-toolbar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .course-management-title-line {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .teaching-tool-strip,
    .teaching-tool-strip.slim,
    .teaching-batch-panel,
    .teaching-action-bar,
    .teaching-list-toolbar,
    .student-tool-row,
    .student-action-tools,
    .teaching-inline-fields,
    .student-manual-fields,
    .teaching-inline-fields.wide,
    .course-fields,
    .course-action-bar,
    .course-class-picker,
    .teaching-upload-group {
        grid-template-columns: 1fr;
    }

    .teaching-board-filters {
        justify-content: stretch;
    }

    .teaching-board-filters input,
    .teaching-board-filters select {
        min-width: 0;
        width: 100%;
    }

    .teaching-filter-row {
        grid-template-columns: 120px minmax(150px, 1fr) 120px 150px;
    }

    .teaching-board-filters > #registry-search {
        grid-column: 1;
    }

    .teaching-board-filters > #registry-filter-mode {
        grid-column: 2;
    }

    .teaching-board-filters > #registry-filter-program {
        grid-column: 3;
    }

    .teaching-table {
        min-width: 720px;
    }
}

/* 20260516 mobile tune: course checkin only (do not affect desktop) */
@media (max-width: 760px) {
    #course-checkin .teaching-action-bar,
    #course-checkin .class-action-bar,
    #course-checkin .course-action-bar {
        grid-template-columns: 1fr;
        gap: 10px;
        overflow: visible;
    }

    #course-checkin .teaching-inline-fields,
    #course-checkin .teaching-inline-fields.wide,
    #course-checkin .course-fields,
    #course-checkin .course-action-bar,
    #course-checkin .course-class-picker,
    #course-checkin .teaching-upload-group,
    #course-checkin .teaching-batch-panel,
    #course-checkin .teaching-filter-row {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    #course-checkin .teaching-filter-row > * {
        min-width: 0;
        width: 100%;
    }

    #course-checkin .teaching-filter-row #student-batch-add-class-btn {
        justify-self: start;
        width: auto;
        order: -1;
    }

    #course-checkin .teaching-board-filters,
    #course-checkin .checkin-panel,
    #course-checkin .teaching-admin-panel {
        min-width: 0;
        overflow: hidden;
    }

    #course-checkin input[type="text"],
    #course-checkin input[type="search"],
    #course-checkin input[type="date"],
    #course-checkin input[type="number"],
    #course-checkin select,
    #course-checkin textarea {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    #course-checkin .course-class-picker {
        gap: 8px;
    }

    #course-checkin .course-class-picker strong {
        line-height: 1.25;
    }

    #course-checkin .course-class-picker .program-checks.inline {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    #course-checkin .checkin-panel,
    #course-checkin .teaching-admin-panel {
        padding: 12px;
    }

    #course-checkin .checkin-panel-head {
        gap: 8px;
    }

    #course-checkin .checkin-panel-head h3,
    #course-checkin .checkin-panel-head h4 {
        line-height: 1.3;
    }

    #course-checkin .teaching-table-wrap {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x pan-y pinch-zoom;
    }

    #course-checkin .teaching-table-wrap .teaching-table {
        width: max-content;
        max-width: none;
    }

    #course-checkin .student-table {
        min-width: 940px;
    }

    #course-checkin .class-table:not(.course-table) {
        min-width: 520px;
    }

    #course-checkin .course-table {
        width: max-content;
        min-width: 760px;
        table-layout: auto;
    }

    #course-checkin .course-table-member {
        min-width: 680px;
    }

    #course-checkin .course-table-admin {
        min-width: 760px;
    }

    #course-checkin .course-table th,
    #course-checkin .course-table td {
        padding: 6px 4px;
        font-size: 12px;
        line-height: 1.25;
        white-space: nowrap;
    }

    #course-checkin .course-table th:nth-child(1),
    #course-checkin .course-table td:nth-child(1) {
        width: 34px;
    }

    #course-checkin .course-table th:nth-child(2),
    #course-checkin .course-table td:nth-child(2) {
        width: 7ch;
    }

    #course-checkin .course-table th:nth-child(3),
    #course-checkin .course-table td:nth-child(3) {
        width: 24ch;
        min-width: 24ch;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    #course-checkin .course-table th:nth-child(4),
    #course-checkin .course-table td:nth-child(4) {
        width: 5.5ch;
    }

    #course-checkin .course-table th:nth-child(5),
    #course-checkin .course-table td:nth-child(5) {
        width: 44px;
    }

    #course-checkin .course-table th:nth-child(6),
    #course-checkin .course-table td:nth-child(6) {
        width: 86px;
    }

    #course-checkin .course-table th:nth-child(7),
    #course-checkin .course-table td:nth-child(7) {
        width: 198px;
        min-width: 198px;
    }

    #course-checkin .course-class-text {
        max-width: 7ch;
    }

    #course-checkin .course-table .table-link-button {
        max-width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    #course-checkin .course-cell-text {
        max-width: 6ch;
    }

    #course-checkin .course-table .teaching-row-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: center;
        gap: 3px;
        width: 100%;
        min-width: 190px;
    }

    #course-checkin .course-table .teaching-row-actions button {
        min-height: 30px;
        width: 100%;
        min-width: 0;
        padding: 0 2px;
        font-size: 12px;
    }

    #course-checkin .course-checkin-detail .teaching-table.compact {
        max-width: none;
    }

    #course-checkin .course-checkin-detail {
        overflow: visible;
    }

    #course-checkin .course-checkin-detail .checkin-stats-wrap {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x pan-y pinch-zoom;
    }

    #course-checkin .course-checkin-detail .teaching-table.compact th,
    #course-checkin .course-checkin-detail .teaching-table.compact td {
        padding: 6px 6px;
        font-size: 12px;
    }

    #course-checkin .course-checkin-detail .checkin-col-no {
        width: calc(3ch + 12px);
        min-width: calc(3ch + 12px);
        max-width: calc(3ch + 12px);
    }

    #course-checkin .course-checkin-detail .checkin-col-code {
        width: calc(7ch + 12px);
        min-width: calc(7ch + 12px);
        max-width: calc(7ch + 12px);
    }

    #course-checkin .course-checkin-detail .checkin-col-name,
    #course-checkin .course-checkin-detail .checkin-col-name-cell {
        width: calc(16ch + 12px);
        min-width: calc(16ch + 12px);
        max-width: calc(16ch + 12px);
    }

    #course-checkin .course-checkin-detail .checkin-col-lesson {
        width: calc(7ch + 20px);
        min-width: calc(7ch + 20px);
        max-width: calc(7ch + 20px);
    }

    #course-checkin .course-checkin-detail .checkin-student-name {
        max-width: 16ch;
    }
}

@media (min-width: 601px) and (max-width: 760px) {
    #course-checkin [data-teaching-tab-panel="students"] .student-tool-row {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    #course-checkin [data-teaching-tab-panel="students"] .student-manual-fields {
        grid-template-columns: minmax(140px, 0.72fr) minmax(160px, 0.92fr) minmax(150px, 0.78fr) 140px;
    }

    #course-checkin .teaching-filter-row {
        grid-template-columns: minmax(130px, 144px) minmax(200px, 1fr) minmax(130px, 160px) minmax(150px, 180px);
        gap: 10px;
    }

    #course-checkin .teaching-filter-row > * {
        width: auto;
    }

    #course-checkin .teaching-filter-row #student-batch-add-class-btn {
        justify-self: start;
        width: auto;
        order: 0;
    }
}

@media (max-width: 600px) {
    #course-checkin .teaching-filter-row {
        grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
        gap: 10px;
    }

    #course-checkin .teaching-filter-row > * {
        min-width: 0;
        width: 100%;
    }

    #course-checkin .teaching-filter-row #student-batch-add-class-btn {
        grid-column: 1;
        grid-row: 1;
        justify-self: stretch;
        width: 100%;
        order: 0;
    }

    #course-checkin .teaching-filter-row #registry-search {
        grid-column: 2;
        grid-row: 1;
    }

    #course-checkin .teaching-filter-row #registry-filter-mode {
        grid-column: 1;
        grid-row: 2;
    }

    #course-checkin .teaching-filter-row #registry-filter-program {
        grid-column: 2;
        grid-row: 2;
    }
}
/* 20260513 desktop fun-test scroll lock */
@media (min-width: 981px) {
    body.blind-school-page.fun-tests-scroll-lock {
        overflow: hidden;
    }

    body.blind-school-page.fun-tests-scroll-lock .site-header {
        margin-bottom: 8px !important;
    }

    body.blind-school-page.fun-tests-scroll-lock .school-workbench {
        height: calc(100vh - 108px);
        min-height: 0;
        overflow: hidden;
    }

    body.blind-school-page.fun-tests-scroll-lock .school-sidebar {
        max-height: calc(100vh - 126px);
        overflow: hidden;
    }

    body.blind-school-page.fun-tests-scroll-lock #fun-tests.school-content-panel.active {
        height: calc(100vh - 108px);
        min-height: 0;
        grid-template-rows: auto minmax(0, 1fr);
        overflow: hidden;
    }

    body.blind-school-page.fun-tests-scroll-lock #fun-tests .section-heading {
        padding: 0;
    }

    body.blind-school-page.fun-tests-scroll-lock .fun-test-workspace {
        height: 100%;
        min-height: 0;
        grid-template-columns: minmax(260px, 350px) minmax(0, 1fr);
        overflow: hidden;
    }

    body.blind-school-page.fun-tests-scroll-lock .fun-test-picker,
    body.blind-school-page.fun-tests-scroll-lock .fun-test-stage {
        position: static;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    body.blind-school-page.fun-tests-scroll-lock .fun-test-stage iframe {
        height: 100%;
        min-height: 0;
    }
}
/* 20260513 desktop fun-test lock offset tune */
@media (min-width: 981px) {
    body.blind-school-page.fun-tests-scroll-lock {
        --fun-test-lock-offset: 64px;
    }

    body.blind-school-page.fun-tests-scroll-lock .school-workbench {
        height: calc(100vh - 108px - var(--fun-test-lock-offset));
    }

    body.blind-school-page.fun-tests-scroll-lock .school-sidebar {
        max-height: calc(100vh - 126px - var(--fun-test-lock-offset));
    }

    body.blind-school-page.fun-tests-scroll-lock #fun-tests.school-content-panel.active {
        height: calc(100vh - 108px - var(--fun-test-lock-offset));
    }
}

/* 20260513 desktop fun-test sticky viewport */
@media (min-width: 981px) {
    body.blind-school-page #fun-tests.school-content-panel.active .fun-test-workspace {
        align-items: start;
    }

    body.blind-school-page #fun-tests.school-content-panel.active .fun-test-picker {
        top: 16px;
        max-height: calc(100vh - 32px);
        overflow: auto;
    }

    body.blind-school-page #fun-tests.school-content-panel.active .fun-test-stage {
        position: sticky;
        top: 16px;
        align-self: start;
        height: calc(100vh - 32px);
        min-height: 0;
    }

    body.blind-school-page #fun-tests.school-content-panel.active .fun-test-stage iframe {
        height: 100%;
        min-height: 0;
    }
}

/* 20260516 mobile recover: keep blind-school readable and avoid clipped tabs */
@media (max-width: 760px) {
    body.blind-school-page:not(.blind-lesson-page) .school-workbench {
        gap: 12px;
    }

    /* 手机端：栏目导航固定单行，不使用横向滚动 */
    body.blind-school-page:not(.blind-lesson-page) .school-rail,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        overflow: hidden;
        padding: 8px 6px;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a {
        flex: 1 1 0;
        min-width: 0;
        text-align: center;
        min-height: 36px;
        padding: 7px 4px;
        font-size: 12px;
        line-height: 1.15;
        letter-spacing: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-content-panel {
        min-width: 0;
        overflow-x: hidden;
    }

    body.blind-school-page:not(.blind-lesson-page) .section-heading h2 {
        font-size: 24px;
        line-height: 1.18;
    }

    body.blind-school-page:not(.blind-lesson-page) #lesson-list > .section-heading > div {
        display: none;
    }

    body.blind-school-page:not(.blind-lesson-page) #lesson-list > .section-heading {
        display: flex;
        align-items: stretch;
    }

    body.blind-school-page:not(.blind-lesson-page) .lesson-board {
        gap: 12px;
    }

    body.blind-school-page:not(.blind-lesson-page) .lesson-tile {
        padding: 14px;
    }

    body.blind-school-page:not(.blind-lesson-page) .lesson-tile h3 {
        font-size: 24px;
        line-height: 1.2;
        word-break: break-word;
    }

    body.blind-school-page:not(.blind-lesson-page) .lesson-subtitle,
    body.blind-school-page:not(.blind-lesson-page) .lesson-tile p {
        font-size: 15px;
        line-height: 1.65;
    }

    body.blind-school-page:not(.blind-lesson-page) .knowledge-system-board {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    body.blind-school-page:not(.blind-lesson-page) .knowledge-system-board article {
        min-height: 0;
        padding: 14px;
    }

    body.blind-school-page:not(.blind-lesson-page) .knowledge-system-board h3 {
        font-size: 24px;
        line-height: 1.18;
        word-break: break-word;
    }

    body.blind-school-page:not(.blind-lesson-page) .knowledge-system-board p {
        font-size: 15px;
        line-height: 1.65;
        word-break: break-word;
    }
}

@media (max-width: 460px) {
    body.blind-school-page:not(.blind-lesson-page) .school-rail a,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a {
        font-size: 11px;
        padding: 7px 3px;
    }

    body.blind-school-page:not(.blind-lesson-page) .section-heading h2 {
        font-size: 22px;
    }

    body.blind-school-page:not(.blind-lesson-page) .lesson-tile h3,
    body.blind-school-page:not(.blind-lesson-page) .knowledge-system-board h3 {
        font-size: 22px;
    }

    body.blind-school-page:not(.blind-lesson-page) .lesson-subtitle,
    body.blind-school-page:not(.blind-lesson-page) .lesson-tile p,
    body.blind-school-page:not(.blind-lesson-page) .knowledge-system-board p {
        font-size: 14px;
    }
}

/* 20260602 mobile nav parity: blind-school matches quiz-space tab language */
@media (max-width: 768px) {
    body.blind-school-page .site-nav {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 0 !important;
        width: 100% !important;
        padding: 0 0 10px !important;
        overflow: visible !important;
        scrollbar-width: none !important;
    }

    body.blind-school-page .site-nav::-webkit-scrollbar,
    body.blind-school-page .site-nav::before {
        display: none !important;
    }

    body.blind-school-page .site-nav a {
        position: relative !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 7px 4px !important;
        border-color: transparent !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #7d4a24 !important;
        white-space: nowrap !important;
        word-break: keep-all !important;
        text-align: center !important;
        font-size: clamp(12px, 3.6vw, 14px) !important;
        font-weight: 700 !important;
        letter-spacing: 0.01em !important;
        line-height: 1.15 !important;
        transform: none !important;
    }

    body.blind-school-page .site-nav a.active,
    body.blind-school-page .site-nav a:hover {
        border-color: transparent !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #b97535 !important;
    }

    body.blind-school-page .site-nav a.active::after {
        content: "" !important;
        position: absolute !important;
        left: 50% !important;
        bottom: -9px !important;
        transform: translateX(-50%) !important;
        width: 0 !important;
        height: 0 !important;
        border-left: 5px solid transparent !important;
        border-right: 5px solid transparent !important;
        border-top: 6px solid #cf944b !important;
        filter: drop-shadow(0 2px 2px rgba(108, 63, 23, 0.18)) !important;
    }
}

/* 20260607 keep the global nav compact on blind-school at tablet/browser-zoom widths. */
@media (min-width: 721px) and (max-width: 960px) {
    body.blind-school-page .site-nav {
        justify-content: space-between !important;
        overflow: hidden !important;
        scrollbar-width: none !important;
        gap: 2px !important;
    }

    body.blind-school-page .site-nav a {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        padding: 7px 4px !important;
        font-size: 12px !important;
        letter-spacing: 0 !important;
    }
}

@media (max-width: 760px) {
    body.blind-school-page:not(.blind-lesson-page) .school-rail,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll {
        display: flex;
        flex-wrap: nowrap;
        gap: 4px;
        align-items: center;
        padding: 6px;
        border-radius: 18px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        background:
            linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 251, 244, 0.94));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail::-webkit-scrollbar {
        display: none;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a {
        position: relative;
        flex: 0 0 auto;
        width: auto;
        min-width: 92px;
        min-height: 48px;
        margin: 0;
        padding: 10px 12px;
        border: 0;
        border-radius: 13px;
        background: transparent;
        color: #7a4a22;
        font-size: 14px;
        font-weight: 600;
        box-shadow: none;
        text-align: center;
        justify-content: center;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a:hover {
        background: rgba(255, 246, 232, 0.7);
        color: #7a4a22;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a.active {
        background:
            radial-gradient(circle at 50% 0, rgba(217, 166, 108, 0.22), transparent 58%),
            linear-gradient(145deg, #fff8eb, #fff3df);
        color: #8b4513;
        box-shadow: inset 0 0 0 1px rgba(214, 164, 106, 0.34), 0 5px 14px rgba(139, 69, 19, 0.07);
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a.active::after {
        content: "";
        position: absolute;
        left: 24%;
        right: 24%;
        bottom: 5px;
        height: 2px;
        border-radius: 999px;
        background: #c58b4c;
    }
}

@media (max-width: 460px) {
    body.blind-school-page:not(.blind-lesson-page) .school-rail a,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a {
        font-size: 13px;
        min-width: 84px;
        min-height: 46px;
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* 20260603 mobile-only: keep blind-school menus inside the viewport */
@media (max-width: 768px) {
    body.blind-school-page .site-header,
    body.blind-school-page .header-top,
    body.blind-school-page .userbar,
    body.blind-school-page .user-menu,
    body.blind-school-page .avatar-menu {
        overflow: visible !important;
    }

    body.blind-school-page .user-menu-panel {
        top: calc(100% + 6px) !important;
        right: 0 !important;
        left: auto !important;
        transform: none !important;
        max-width: min(calc(100vw - 20px), 420px) !important;
        overflow-x: auto !important;
        justify-content: flex-end !important;
        gap: 5px !important;
        padding: 5px 7px !important;
        border-radius: 11px !important;
        scrollbar-width: none !important;
        z-index: 900 !important;
    }

    body.blind-school-page .user-menu-panel::-webkit-scrollbar {
        display: none !important;
    }

    body.blind-school-page .user-menu-panel .btn-secondary,
    body.blind-school-page .user-menu-panel .btn-logout,
    body.blind-school-page .user-menu-panel .btn-soft,
    body.blind-school-page .user-menu-panel .btn {
        height: 28px !important;
        min-height: 28px !important;
        padding: 0 10px !important;
        border-radius: 8px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }

    body.blind-school-page:not(.blind-lesson-page),
    body.blind-school-page:not(.blind-lesson-page) .blind-container,
    body.blind-school-page:not(.blind-lesson-page) .school-workbench,
    body.blind-school-page:not(.blind-lesson-page) .school-main,
    body.blind-school-page:not(.blind-lesson-page) .school-content-panel,
    body.blind-school-page:not(.blind-lesson-page) .lesson-board,
    body.blind-school-page:not(.blind-lesson-page) .lesson-tile {
        box-sizing: border-box !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .blind-container {
        width: min(100% - 12px, 1180px) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-workbench,
    body.blind-school-page:not(.blind-lesson-page) .school-main,
    body.blind-school-page:not(.blind-lesson-page) .school-content-panel,
    body.blind-school-page:not(.blind-lesson-page) .lesson-board {
        width: 100% !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .lesson-tile {
        width: 100% !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .lesson-tile > * {
        max-width: 100% !important;
        min-width: 0 !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-evenly !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 0 !important;
        padding: 3px 4px !important;
        border: 1px solid rgba(201, 148, 85, 0.48) !important;
        border-radius: 20px !important;
        background: rgba(255, 253, 248, 0.92) !important;
        box-shadow: none !important;
        overflow: hidden !important;
        overscroll-behavior-x: auto !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a {
        flex: 0 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        min-height: 24px !important;
        padding: 2px 2px !important;
        border: 0 !important;
        border-radius: 5px !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #74441f !important;
        font-size: clamp(10px, 2.85vw, 12px) !important;
        font-weight: 800 !important;
        line-height: 1.1 !important;
        text-align: center !important;
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow: hidden !important;
        text-overflow: clip !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a:hover {
        background: rgba(255, 247, 235, 0.70) !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a.active {
        border: 1px solid rgba(201, 148, 85, 0.34) !important;
        background: rgba(255, 249, 240, 0.50) !important;
        color: #8b4513 !important;
        box-shadow: none !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a.active::after {
        position: static !important;
        display: block !important;
        width: 76% !important;
        margin: 1px auto 0 !important;
        height: 2px !important;
        min-height: 2px !important;
        background: #c58b4c !important;
        border-radius: 999px !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .lesson-tile-footer {
        display: grid !important;
        grid-template-columns: 1fr !important;
        justify-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .lesson-tags {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 4px !important;
        overflow: hidden !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .lesson-tags span {
        box-sizing: border-box !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 8px 2px !important;
        font-size: clamp(10px, 2.75vw, 12px) !important;
        text-align: center !important;
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow: hidden !important;
        overflow-wrap: normal !important;
        text-overflow: clip !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .lesson-tile-footer a {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
}

/* 20260604 desktop school sidebar parity with quiz-space sidebar. */
@media (min-width: 981px) {
    body.blind-school-page:not(.blind-lesson-page) .school-sidebar {
        gap: 14px !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll {
        display: grid !important;
        gap: 0 !important;
        padding: 10px !important;
        border: 1px solid var(--school-line) !important;
        border-radius: 18px !important;
        background: linear-gradient(145deg, #fff, #fffdf8) !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail::before,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll::before {
        content: "\5BFC\822A" !important;
        display: block !important;
        margin: 4px 4px 10px !important;
        color: var(--school-copper) !important;
        font-size: 15px !important;
        font-weight: 900 !important;
        line-height: 1.2 !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        min-height: 38px !important;
        margin: 0 0 8px !important;
        padding: 10px 11px !important;
        border: 1px solid transparent !important;
        border-radius: 10px !important;
        background: #fff !important;
        color: #6f4722 !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        text-align: left !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        transition: all 0.16s ease !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a:last-child,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a:last-child {
        margin-bottom: 0 !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a:hover,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a:hover {
        border-color: #e6c89f !important;
        background: #fff8ec !important;
        color: #7d3f13 !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a.active,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a.active {
        border-color: #d6a46a !important;
        background: #fff0dc !important;
        color: var(--school-copper) !important;
        font-weight: 900 !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a.active::after,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a.active::after {
        display: none !important;
    }
}

/* 20260605 final mobile school subnav override. */
@media (max-width: 760px) {
    body.blind-school-page:not(.blind-lesson-page) .school-rail,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll {
        box-sizing: border-box !important;
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 4px 5px !important;
        border: 1px solid rgba(207, 164, 104, 0.72) !important;
        border-radius: 18px !important;
        background: rgba(255, 253, 248, 0.96) !important;
        box-shadow: none !important;
        overflow: hidden !important;
        overscroll-behavior-x: auto !important;
        scrollbar-width: none !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail::before,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll::before {
        display: none !important;
        content: none !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a {
        box-sizing: border-box !important;
        position: relative !important;
        display: inline-flex !important;
        flex: none !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 36px !important;
        margin: 0 !important;
        padding: 6px 1px 9px !important;
        border: 1px solid transparent !important;
        border-radius: 14px !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #74441f !important;
        font-size: clamp(10px, 2.75vw, 12px) !important;
        font-weight: 800 !important;
        line-height: 1 !important;
        text-align: center !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow: hidden !important;
        text-overflow: clip !important;
        transform: none !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a:hover,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a:hover {
        border-color: rgba(207, 164, 104, 0.42) !important;
        background: rgba(255, 248, 237, 0.64) !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a.active,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a.active {
        border-color: rgba(207, 164, 104, 0.46) !important;
        background: rgba(255, 248, 237, 0.72) !important;
        color: #8b4513 !important;
        box-shadow: none !important;
    }

    body.blind-school-page:not(.blind-lesson-page) .school-rail a.active::after,
    body.blind-school-page:not(.blind-lesson-page) .school-rail.school-rail-mobile-scroll a.active::after {
        content: "" !important;
        position: absolute !important;
        left: 50% !important;
        right: auto !important;
        bottom: 4px !important;
        transform: translateX(-50%) !important;
        display: block !important;
        width: min(36px, 68%) !important;
        height: 2px !important;
        min-height: 2px !important;
        margin: 0 !important;
        border-radius: 999px !important;
        background: #c58b4c !important;
    }
}
/* 20260609 mobile audit: keep teaching/check-in tables readable and scrollable. */
@media (max-width: 768px) {
    body.blind-school-page #course-checkin .teaching-table-wrap,
    body.blind-school-page #course-checkin .checkin-stats-wrap,
    body.blind-school-page .checkin-class-table-wrap {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-x: contain !important;
        touch-action: pan-x pan-y pinch-zoom !important;
    }

    body.blind-school-page #course-checkin .teaching-table-wrap .teaching-table,
    body.blind-school-page #course-checkin .checkin-stats-wrap .teaching-table,
    body.blind-school-page .checkin-class-table-wrap .class-checkin-table {
        width: max-content !important;
        max-width: none !important;
        table-layout: auto !important;
    }

    body.blind-school-page #course-checkin .student-table {
        min-width: 940px !important;
    }

    body.blind-school-page #course-checkin .class-table:not(.course-table) {
        min-width: 520px !important;
    }

    body.blind-school-page #course-checkin .course-table {
        min-width: 760px !important;
    }

    body.blind-school-page #course-checkin .course-checkin-detail .teaching-table.compact,
    body.blind-school-page .checkin-class-table-wrap .class-checkin-table {
        min-width: 760px !important;
    }
}
