: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}

.resource-heading-actions{display:flex;align-items:center;gap:12px}.resource-heading-actions button.primary{background:var(--accent);color:var(--white);border-color:var(--accent)}.resource-heading-actions button.primary:hover{filter:brightness(1.06)}@media(max-width:700px){.resource-heading-actions{gap:8px}.resource-heading-actions button{font-size:12px;padding:6px 9px}}

.resource-push-hint{margin:12px 0 0;color:var(--accent);font-size:14px;line-height:1.7}@media(max-width:700px){.resource-push-hint{font-size:12px}}
.pptx-stage{position:relative;display:block;overflow:hidden;background:#fff}.pptx-toolbar{position:absolute;z-index:3;left:50%;bottom:18px;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid #dce4ef;border-radius:8px;background:rgba(255,255,255,.96);box-shadow:0 4px 18px rgba(23,32,51,.12);opacity:0;transition:opacity .18s}.pptx-stage:hover .pptx-toolbar,.pptx-stage:focus-within .pptx-toolbar{opacity:1}.pptx-toolbar button,.pptx-toolbar .button{padding:7px 11px;white-space:nowrap}.pptx-counter{min-width:66px;text-align:center;color:#64748b;font-size:13px}.pptx-canvas{width:100%;height:100%;display:grid;place-items:center;overflow:auto;padding:18px}.pptx-canvas>svg{display:block;max-width:100%;max-height:100%;width:auto;height:auto;box-shadow:0 2px 14px rgba(23,32,51,.12);background:#fff}.pptx-status{color:#64748b}.pptx-stage:fullscreen{background:#fff}.pptx-stage:fullscreen .pptx-canvas{padding:0}.pptx-stage:fullscreen .pptx-canvas>svg{max-width:100vw;max-height:100vh;box-shadow:none}.pptx-stage:fullscreen .pptx-toolbar{bottom:22px}

/* Resource preview uses the entire browser viewport so uploaded teaching files remain readable. */
html,body,#resourceViewer{width:100%;height:100%;min-height:100%;}
body.resource-viewer-page{overflow:hidden;background:#fff;}
#resourceViewer.resource-viewer{height:100vh;min-height:100vh;display:flex;flex-direction:column;background:#fff;}
#resourceViewer .viewer-header{flex:0 0 auto;min-height:52px;padding:10px 18px;background:#fff;}
#resourceViewer .viewer-stage{flex:1 1 auto;min-height:0;height:auto;}
#resourceViewer .media-stage img,#resourceViewer .media-stage video{display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;}
#resourceViewer .document-stage iframe{display:block;width:100%;height:100%;border:0;background:#fff;}
#resourceViewer.has-ci-preview .viewer-header{position:absolute;inset:0 0 auto;z-index:4;width:100%;border-bottom:0;background:rgba(255,255,255,.94);}
#resourceViewer.has-ci-preview .viewer-stage{height:100vh;}
#resourceViewer:fullscreen{width:100vw;height:100vh;}
#resourceViewer:fullscreen .viewer-header{display:none;}
#resourceViewer:fullscreen .viewer-stage{height:100vh;}
#resourceViewer .pptx-stage{display:flex;flex-direction:column;min-width:0;min-height:0;}
#resourceViewer .pptx-canvas{flex:1 1 auto;min-width:0;min-height:0;width:100%;height:auto;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:0;}
#resourceViewer .pptx-canvas>svg,#resourceViewer .pptx-canvas>img{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;box-shadow:none;}

#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);}
.wps-open-link{border-color:#2e8069!important;color:#246a55!important;background:#edf8f3!important}.wps-open-link:hover{border-color:#246a55!important;background:#dff2e9!important}

/* 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}}
[data-teacher-only]{display:none!important}.teacher-mode [data-teacher-only]{display:inline-flex!important}

#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{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;overflow:hidden}#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}}
