/* 仅课程编辑工作区：宽内容区、可滚动正文、始终可见的操作栏。 */
.course-editor .modal-card { width:min(1160px,100%); height:min(880px,94dvh); max-height:94dvh; padding:0; display:flex; flex-direction:column; overflow:hidden; border-radius:16px; color:#263e33; }
.course-editor .modal-card > header { flex:none; padding:20px 26px 16px; border-bottom:1px solid #dce3d8; align-items:center; }
.course-editor .modal-card > header h2 { font-size:22px; line-height:1.3; }
.course-editor-subtitle { margin:4px 0 0; font-size:13px; color:#637266; }
.course-editor-navigation { display:flex; flex:none; flex-wrap:wrap; gap:8px; padding:8px 26px; border-bottom:1px solid #e4e9df; background:#f8faf5; }
.course-editor-navigation button { min-height:36px; padding:4px 12px; font-size:13px; }
.course-editor-content { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; display:grid; grid-template-columns:minmax(0,1fr) 260px; align-items:start; }
.course-editor-main { min-width:0; padding:0 28px 24px; }
.course-editor-section { padding:22px 0; border-bottom:1px solid #e4e9df; }
.course-editor-section:last-child { border-bottom:0; padding-bottom:0; }
.course-editor h3 { margin:0 0 8px; font-size:17px; color:#263e33; }
.course-editor h4 { margin:0; font-size:14px; }
.course-editor .field-hint { display:block; margin:4px 0 14px; font-size:13px; line-height:1.6; color:#637266; }
.course-editor .field { margin:12px 0; gap:6px; font-weight:500; }
.course-editor input:not([type=checkbox]):not([type=file]),.course-editor select,.course-editor textarea { width:100%; min-height:44px; border:1px solid #c5d1bf; border-radius:8px; padding:10px 12px; background:#fff; color:#263e33; font-size:14px; }
.course-editor textarea { resize:vertical; min-height:110px; line-height:1.7; }
.course-editor input[aria-invalid=true],.course-editor textarea[aria-invalid=true],.course-editor select[aria-invalid=true] { border-color:#b13745; outline:2px solid #b1374520; }
.course-editor input:focus-visible,.course-editor select:focus-visible,.course-editor textarea:focus-visible,.course-editor button:focus-visible,.course-editor summary:focus-visible { outline:3px solid #5e927b; outline-offset:3px; }
.course-editor button { min-height:40px; border:1px solid #c5d1bf; border-radius:8px; padding:8px 13px; background:#fff; color:#245b46; transition:background .12s ease,border-color .12s ease; }
.course-editor button:hover:not(:disabled) { background:#eef4ea; border-color:#759d86; }
.course-editor button.primary { background:#245b46; color:#fff; border-color:#245b46; }
.course-editor button.primary:hover:not(:disabled) { background:#194c38; }
.course-editor summary { cursor:pointer; width:fit-content; padding:8px 0; color:#406951; font-size:13px; min-height:36px; }
.course-editor details[open] { padding-bottom:4px; }
.course-grade-choices,.course-weekdays { display:flex; flex-wrap:wrap; gap:8px; }
.course-editor button[aria-pressed=true] { background:#eaf2e6; border-color:#245b46; color:#194c38; box-shadow:inset 0 0 0 1px #245b46; }
.course-grade-choices button { min-width:74px; }
.course-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 16px; }
.course-weekdays { grid-column:1/-1; margin:12px 0 4px; }
.course-editor .check-field { display:flex; align-items:center; gap:9px; min-height:44px; white-space:nowrap; }
.course-editor .check-field input { width:20px; height:20px; min-height:20px; padding:0; margin:0; }
.course-media-block { margin-top:18px; }
.course-media-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.course-media-empty { margin:0; padding:22px 16px; text-align:center; font-size:13px; color:#637266; background:#f6f8f3; border:1px dashed #c5d1bf; border-radius:8px; }
.course-media-item { min-width:0; }
.course-image { display:grid; place-items:center; height:140px; overflow:hidden; border:1px solid #e1e7db; border-radius:8px; background:#f3f6ef; color:#637266; font-size:13px; }
.course-image img { width:100%; height:100%; max-height:140px; object-fit:contain; }
.course-image > * { grid-area:1/1; }.course-image.image-loading img { opacity:0; }
.course-cover-list .course-media-item { max-width:340px; }
.course-cover-list .course-image { height:170px; }.course-cover-list .course-image img { max-height:170px; }
.course-detail-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 12px; }
.course-detail-list > .course-media-empty { grid-column:1/-1; }
.course-image-actions { display:flex; flex-wrap:wrap; gap:4px; align-items:center; margin-top:6px; }
.course-image-actions span { width:100%; font-size:12px; color:#637266; }
.course-image-actions button { min-height:36px; padding:4px 10px; font-size:13px; }
.course-upload-status { margin:6px 0 0; font-size:13px; color:#406951; overflow-wrap:anywhere; }
.course-upload-failures > div { display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:10px 0; color:#a43d3d; font-size:13px; }
.course-upload-failures span { flex:1 1 100%; overflow-wrap:anywhere; }
.course-editor-footer { flex:none; display:grid; grid-template-columns:1fr auto; align-items:center; gap:2px 16px; padding:14px 26px max(14px,env(safe-area-inset-bottom)); border-top:1px solid #dce3d8; background:#fff; }
.course-editor-footer .modal-actions { grid-column:2; grid-row:1/3; margin:0; flex-direction:row; }
.course-editor-footer .modal-actions button { min-height:44px; white-space:nowrap; }
.course-save-status { font-size:13px; color:#637266; }
.course-editor-message { margin:0; font-size:13px; color:#a43d3d; overflow-wrap:anywhere; max-height:68px; overflow:auto; }
.course-editor-message:empty { display:none; }
.course-preview { margin:24px 22px 24px 0; padding-left:22px; border-left:1px solid #e1e7db; position:sticky; top:24px; min-width:0; }
.course-preview h3 { font-size:14px; }
.course-preview h4 { font-size:18px; line-height:1.5; margin-top:12px; overflow-wrap:anywhere; }
.course-preview > p { font-size:13px; color:#637266; overflow-wrap:anywhere; }
.course-preview [data-preview-description] { white-space:pre-wrap; max-height:210px; overflow:auto; }
.course-preview .course-image { height:150px; }.course-preview .course-image img { max-height:150px;object-fit:cover; }
@media(max-width:1000px) { .course-editor-content { grid-template-columns:minmax(0,1fr) 220px; }.course-editor-main { padding-inline:22px; }.course-preview { padding-left:16px; margin-right:16px; } }
@media(max-width:760px) {
  .course-editor { padding:0; }
  .course-editor .modal-card { width:100%; height:100dvh; max-height:100dvh; border-radius:0; }
  .course-editor .modal-card > header { padding:16px 18px 12px; }
  .course-editor-navigation { padding:6px 18px; gap:6px; }.course-editor-navigation button { min-height:40px; }
  .course-editor-content { display:block; }
  .course-editor-main { padding:0 18px 20px; }
  .course-editor-section { padding-top:20px; }
  .course-preview { display:none; }
  .course-editor-footer { padding:12px 18px max(12px,env(safe-area-inset-bottom)); grid-template-columns:1fr; gap:6px; }
  .course-editor-footer .modal-actions { grid-column:1;grid-row:auto;justify-content:flex-end; }
  .course-editor-footer .modal-actions button { width:auto;flex:1; }
  .course-editor .course-field-grid { grid-template-columns:1fr; }
  .course-editor input:not([type=checkbox]):not([type=file]),.course-editor select,.course-editor textarea { font-size:16px; }
  .course-grade-choices button { min-width:68px;min-height:44px; }.course-weekdays button { min-height:44px; }
}
@media(prefers-reduced-motion:reduce) { .course-editor button { transition:none; } }
.course-rich { min-width:0; }
.course-rich-tools { display:flex; gap:8px; flex-wrap:wrap; margin:12px 0; }
.course-rich .ql-toolbar { border-color:#c5d1bf; background:#f8faf5; border-radius:8px 8px 0 0; position:sticky; top:0; z-index:2; padding:8px; }
.course-rich .ql-toolbar .ql-formats { margin:0 9px 4px 0; }
.course-rich .ql-toolbar button { width:32px; min-height:32px; height:32px; padding:4px; border:0; border-radius:4px; background:transparent; }
.course-rich .ql-toolbar button svg { width:24px; height:24px; display:block; }
.course-rich .ql-toolbar .ql-picker { height:32px; font-size:14px; }
.course-rich .ql-toolbar .ql-picker-label { padding-top:5px; }
.course-rich .ql-toolbar .ql-picker-options { z-index:3; }
.course-rich .ql-picker.ql-header .ql-picker-label::before,.course-rich .ql-picker.ql-header .ql-picker-item::before { content:'正文'; }
.course-rich .ql-picker.ql-header [data-value="1"]::before { content:'一级标题'; }.course-rich .ql-picker.ql-header [data-value="2"]::before { content:'二级标题'; }.course-rich .ql-picker.ql-header [data-value="3"]::before { content:'三级标题'; }
.course-rich .ql-container { font-family:inherit; font-size:16px; border-color:#c5d1bf; border-radius:0 0 8px 8px; background:#fff; }
.course-rich .ql-editor { min-height:350px; padding:20px; line-height:1.8; overflow-wrap:anywhere; }
.course-rich .ql-editor img { max-width:100%; height:auto; display:block; margin:0; }
.course-rich .ql-editor p { margin:0; }
.course-detail-notice { background:#fff6df; color:#705119; padding:12px; font-size:13px; line-height:1.7; border-left:3px solid #d3b15c; }
.course-detail-notice[hidden] { display:none; }
.course-full-preview { position:absolute; inset:0; background:#eef1eb; z-index:10; display:flex; }
.course-full-preview > section { width:100%; min-height:0; display:flex; flex-direction:column; }
.course-full-preview header { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 20px; background:white; border-bottom:1px solid #dce3d8; }
.course-full-preview header > div { display:flex; gap:6px; }
.course-full-preview-scroll { overflow:auto; min-height:0; flex:1; padding:22px 12px; }
.course-full-preview article { margin:0 auto; width:100%; background:#fffdf8; min-height:100%; box-shadow:0 3px 18px #20352814; }
.course-preview-copy { padding:22px 20px; }
.course-preview-copy h1 { font-size:24px; line-height:1.5; }
.course-preview-copy h2 { font-size:20px; margin:22px 0 12px; }
.course-preview-intro { white-space:pre-wrap; }
.course-rich-render { font-size:16px; line-height:1.8; overflow-wrap:anywhere; color:#263e33; }
.course-rich-render img { max-width:100%; height:auto; display:block; }
.course-preview-cover { width:100%; max-height:290px; object-fit:cover; }
.course-preview-bottom { padding:16px 20px; color:#637266; background:#f3f6ef; font-size:13px; }
@media(max-width:760px) { .course-rich .ql-editor { padding:16px; min-height:320px; }.course-full-preview header { padding:12px; }.course-full-preview header strong { font-size:14px; }.course-full-preview header button { padding:6px 9px; }.course-full-preview-scroll { padding:12px 0; } }
