:root{font-family:'Microsoft YaHei','Segoe UI',sans-serif;color:#172033;background:#fff;line-height:1.6;--line:#dce4ef;--blue:#1769d1;--muted:#64748b}*{box-sizing:border-box}body{margin:0;background:white}a{color:var(--blue);text-decoration:none}button,input,select{font:inherit;font-size:14px}button,.button{cursor:pointer;border:1px solid var(--line);background:white;border-radius:6px;padding:8px 12px;color:#172033;display:inline-block}button:hover,.button:hover{background:#eef5ff}button.primary{background:var(--blue);color:white;border-color:var(--blue)}button:disabled{opacity:.5;cursor:wait}input,select{max-width:100%;padding:8px;border:1px solid var(--line);border-radius:6px;background:white}input[type=file]{border:0;padding-left:0}label{display:flex;gap:6px;flex-direction:column;color:var(--muted);font-size:12px}h1{font-size:34px;margin:20px 0 10px}h2{font-size:20px;margin:0}.shell{max-width:1160px;margin:auto;padding:0 24px}.topbar{display:flex;gap:20px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:18px 0}.tools{display:flex;gap:12px;flex-wrap:wrap;align-items:end;margin:22px 0}.tools .title-field{flex:1;min-width:180px}.muted{color:var(--muted);font-size:13px}.status{min-height:28px;margin:8px 0;color:var(--blue)}.resource-list{margin-bottom:50px}.resource-row{display:grid;grid-template-columns:56px minmax(0,1fr);gap:14px;padding:20px 0;border-bottom:1px solid var(--line)}.file-icon{color:var(--blue);background:#eef5ff;border-radius:6px;height:42px;display:grid;place-items:center;font-size:12px;font-weight:bold;overflow:hidden}.resource-title{font-weight:700;font-size:17px;overflow-wrap:anywhere}.resource-meta{color:var(--muted);font-size:12px;margin:5px 0;overflow-wrap:anywhere}.row-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px;align-items:center}.row-actions button,.row-actions a{font-size:12px;padding:5px 9px}.row-actions select{font-size:12px;max-width:300px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:26px}.viewer-header{padding:12px 18px;display:flex;gap:12px;align-items:center;border-bottom:1px solid var(--line);flex-wrap:wrap}.viewer-header strong{flex:1;overflow-wrap:anywhere}.viewer-stage{height:calc(100vh - 80px);display:flex;align-items:center;justify-content:center;background:white}.viewer-stage iframe{border:0;width:100%;height:100%;background:#fff}.viewer-stage video{max-height:100%;width:100%;background:#fff}.viewer-stage img{max-width:100%;max-height:100%}.viewer-stage audio{width:min(90%,700px)}.viewer-stage .fallback{padding:30px}.event-table{width:100%;border-collapse:collapse;font-size:13px}.event-table td,.event-table th{padding:10px;text-align:left;border-bottom:1px solid var(--line);white-space:nowrap}.table-scroll{overflow:auto;max-height:450px}.pager{display:flex;align-items:center;gap:12px;margin:12px 0}progress{width:100%;height:8px}@media(max-width:620px){.shell{padding:0 14px}h1{font-size:28px}.tools{align-items:stretch}.tools label{width:100%}.resource-row{grid-template-columns:40px minmax(0,1fr);gap:10px}.row-actions select{max-width:100%}.viewer-stage{height:calc(100dvh - 100px)}}
:where([hidden]){display:none!important}

#resourceViewer .onlyoffice-stage{position:relative;display:block;overflow:hidden;background:#fff;}#resourceViewer .onlyoffice-host{width:100%;height:100%;min-height:0;}#resourceViewer .onlyoffice-stage .pptx-status{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);margin:0;color:#64748b;white-space:nowrap;}#resourceViewer .pptx-back-button{position:absolute;z-index:4;left:16px;bottom:max(14px,env(safe-area-inset-bottom));padding:7px 12px;border:1px solid #d5deea;border-radius:999px;background:rgba(255,255,255,.96);color:#1d4ed8;cursor:pointer;box-shadow:0 5px 18px rgba(23,32,51,.12);}

/* PPT 快速预览：首屏直接铺满视口，避免外层卡片和编辑器启动骨架阻塞课堂。 */
#resourceViewer.fast-pptx,#resourceViewer.office-pptx{position:fixed;inset:0;width:100vw;height:100vh;min-height:100vh;background:#fff;}
#resourceViewer.fast-pptx .viewer-header,#resourceViewer.office-pptx .viewer-header{display:none;}
#resourceViewer.fast-pptx .viewer-stage,#resourceViewer.office-pptx .viewer-stage{height:100vh;min-height:100vh;flex:1 1 auto;}
#resourceViewer .pptx-fast-stage{position:relative;display:grid;place-items:center;overflow:hidden;background:#fff;}
#resourceViewer .pptx-fast-preview{display:block;width:100%;height:100%;object-fit:contain;background:#fff;}
#resourceViewer .pptx-fast-stage .pptx-status{position:absolute;inset:auto auto 84px 50%;transform:translateX(-50%);margin:0;padding:6px 12px;background:rgba(255,255,255,.94);color:#64748b;font-size:13px;white-space:nowrap;}
#resourceViewer .pptx-fast-toolbar{position:absolute;left:50%;bottom:max(14px,env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid #dce4ef;border-radius:999px;background:rgba(255,255,255,.96);box-shadow:0 5px 18px rgba(23,32,51,.12);opacity:.14;transition:opacity .18s;}
#resourceViewer .pptx-fast-stage:hover .pptx-fast-toolbar,#resourceViewer .pptx-fast-toolbar:focus-within{opacity:1;}
#resourceViewer .pptx-fast-toolbar button{padding:6px 10px;border:0;border-radius:999px;white-space:nowrap;background:transparent;color:#172033;}
#resourceViewer .pptx-fast-toolbar button:hover{background:#eef5ff;}
#resourceViewer .pptx-fast-toolbar button.primary{background:#1769d1;color:#fff;}
#resourceViewer .pptx-fast-toolbar .pptx-counter{min-width:76px;text-align:center;color:#64748b;font-size:12px;}
#resourceViewer .office-mode{position:relative;}
#resourceViewer .office-mode .onlyoffice-host{position:absolute;inset:0;width:100%;height:100%;}
#resourceViewer .office-mode .pptx-status{z-index:2;}
#resourceViewer .pptx-back-button{position:absolute;z-index:4;left:14px;bottom:max(14px,env(safe-area-inset-bottom));padding:7px 12px;border:1px solid #dce4ef;border-radius:999px;background:rgba(255,255,255,.96);color:#172033;}
#resourceViewer.office-pptx .onlyoffice-stage iframe{border:0!important;width:100%!important;height:100%!important;}
@media(max-width:620px){#resourceViewer .pptx-fast-toolbar{max-width:calc(100% - 20px);overflow:auto}.pptx-fast-toolbar button{font-size:12px;padding-inline:8px!important}.pptx-fast-toolbar .pptx-counter{min-width:64px!important}}

/* 公共 HTML 保持为课程封面；教师上传内容在卡片下方独立列出。 */
.course-extra-resources{padding:14px 18px 16px;border-top:1px solid #e6eaf0;background:#fff}
.course-extra-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#64748b;font-size:12px;font-weight:700}
.directory-personal-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;padding:12px 0;border-top:1px solid #eef2f7}
.directory-personal-row:first-of-type{margin-top:8px}
.directory-personal-copy{display:grid;min-width:0;gap:2px}
.directory-personal-copy strong{overflow-wrap:anywhere;color:#172033;font-size:14px}
.directory-personal-copy small,.directory-personal-eyebrow{overflow-wrap:anywhere;color:#64748b;font-size:11px}
.directory-personal-actions{display:flex;align-items:center;gap:7px}
.directory-personal-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 11px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#335d9f;font-size:12px;font-weight:700;white-space:nowrap}
.directory-personal-actions a:first-child{border-color:#2563eb;background:#2563eb;color:#fff}
.directory-personal-actions a:hover{border-color:#2563eb;background:#eff6ff;color:#1d4ed8}
.directory-personal-actions a:first-child:hover{background:#1d4ed8;color:#fff}
@media(max-width:680px){.directory-personal-row{grid-template-columns:1fr}.directory-personal-actions{justify-content:flex-start}.directory-personal-actions a{flex:1}}
[data-teacher-only]{display:none!important}.teacher-mode [data-teacher-only]{display:inline-flex!important}
.teacher-mode [data-teacher-login]{display:none}
.course-activity-toggle{min-height:42px;padding:8px 18px;border-color:#2563eb;background:#fff;color:#1d4ed8;font-size:16px;font-weight:700}
.course-activity-toggle:hover,.course-activity-toggle[aria-expanded=true]{background:#eff6ff;border-color:#1d4ed8}
.course-activity-panel{margin-top:12px;padding-top:12px;border-top:1px solid #e6eaf0;min-width:0}
.course-activity-head{font-size:15px;font-weight:600;color:#172033}
.course-activity-primary,.course-resource-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.course-activity-primary button,.course-resource-actions button,.course-resource-link{min-height:38px;padding:6px 10px;font-size:14px}
.course-resource-link{display:inline-flex;align-items:center}
.course-activity-empty,.course-activity-status{font-size:13px;margin:12px 0 0;color:#64748b;overflow-wrap:anywhere}
.course-activity-status{color:#1769d1}
.course-resource-row{padding:14px 0;border-top:1px solid #e6eaf0;margin-top:12px;min-width:0}
.course-resource-copy{display:grid;gap:4px;overflow-wrap:anywhere}
.course-resource-copy strong{font-size:15px}
.course-resource-copy span{font-size:12px;color:#64748b}
#catalogStatus{margin:12px 0 0;color:#1769d1;font-size:14px;overflow-wrap:anywhere}
#catalogRetry{margin-top:8px}
@media(max-width:420px){.catalog-shell .course-catalog{grid-template-columns:minmax(0,1fr)}.course-activity-primary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}

#teacherResources .tools{display:flex;flex-wrap:wrap;align-items:end}#teacherResources .link-source{flex:1 0 100%;min-width:0}#teacherResources textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:90px;padding:10px;border:1px solid #cdd8e6;border-radius:5px;background:#fff;color:#172033;font:inherit}#teacherResources{max-height:calc(100dvh - 72px);overflow:auto}#teacherResources .mobile-transfer-entry{padding:10px 0;min-height:44px}.course-resource-actions [hidden],.directory-personal-actions [hidden]{display:none!important}

#resourceViewer.presentation-view{position:fixed;inset:0;width:100%;height:100vh;height:100dvh;min-height:0;display:flex;flex-direction:column;background:#fff}
#resourceViewer.presentation-view .viewer-header{display:flex;flex:0 0 auto;padding:8px 12px;gap:8px}
#resourceViewer.presentation-view .presentation-stage{display:block;flex:1 1 auto;min-height:0;height:auto;overflow:hidden}
#resourceViewer.presentation-view .presentation-stage iframe{display:block;width:100%;height:100%;border:0;background:#fff}
#resourceViewer.presentation-view .presentation-status{font-size:13px;color:#64748b}
#resourceViewer.presentation-view:fullscreen .viewer-header{display:flex}
#resourceViewer.presentation-view:fullscreen .viewer-stage{height:auto}
@media(max-width:600px){#resourceViewer.presentation-view .viewer-header strong{font-size:14px;min-width:90px}#resourceViewer.presentation-view .viewer-header .button,#resourceViewer.presentation-view .viewer-header button{font-size:12px;padding:5px 8px}}
