.lp-dialog,.lp-editor { position:fixed;inset:0;margin:auto;box-sizing:border-box;border:1px solid #deddeb;border-radius:18px;background:#f7f8fc;color:#282a40;padding:0;width:min(1160px,calc(100vw - 48px));max-height:calc(100dvh - 48px);overflow:auto;box-shadow:0 24px 80px #24223c33;font-size:14px; }
.lp-dialog::backdrop,.lp-editor::backdrop { background:#23203966; }
.lp-head { display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 28px;border-bottom:1px solid #e8e9f1;background:#fff; }
.lp-head h2 { font-size:23px;line-height:1.4;margin:0 0 5px; }
.lp-head p { color:#85869a;font-size:13px;margin:0; }
.lp-head-actions { display:flex;align-items:center;gap:10px;flex-shrink:0; }
.lp-save-state { font-size:13px;font-weight:700;color:#dc3545;margin-right:4px; }
.lp-save-state[hidden] { display:none; }
.lp-dialog .btn,.lp-editor .btn { min-height:38px;height:38px;padding:0 14px;border-radius:8px;font-size:13px;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center; }
.lp-close { width:34px;height:34px;margin-left:4px;border:0;background:transparent;border-radius:8px;font-size:25px;line-height:1;color:#7d8091;cursor:pointer; }
.lp-close:hover { background:#f0eff9;color:#5f5bd5; }
.lp-body { display:grid;grid-template-columns:minmax(330px,.9fr) minmax(400px,1.25fr);gap:20px;padding:24px 28px;align-items:start; }
.lp-grouping { display:flex;flex-direction:column;gap:16px;min-width:0; }
.lp-groups,.lp-roster,.lp-materials { min-width:0;background:white;border:1px solid #e5e6ef;border-radius:12px;padding:18px; }
.lp-section-head { display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:38px; }
.lp-section-head>div { display:flex;align-items:center;gap:9px;min-width:0; }
.lp-body h3 { font-size:15px;font-weight:650;line-height:1.5;margin:0; }
.lp-step { display:inline-grid;place-items:center;width:25px;height:25px;border-radius:7px;background:#f0efff;color:#6663d9;font-size:11px;font-weight:700; }
.lp-count,.lp-roster-summary { font-size:12px;color:#9194a3;font-weight:400;white-space:nowrap; }
.lp-count { margin-left:5px; }
.lp-section-note { margin:7px 0 18px;color:#9294a3;font-size:12px; }
.lp-group-toolbar { display:flex;align-items:center;gap:8px;padding:14px 0 0; }
.lp-group-toolbar label { display:flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap;color:#777b8c;margin-right:auto; }
.lp-dialog input,.lp-dialog select,.lp-editor input:not([type=checkbox]),.lp-editor select,.lp-editor textarea { box-sizing:border-box;min-width:0;border:1px solid #dedfeb;border-radius:7px;padding:8px 10px;background:white;font:inherit; }
.lp-dialog input,.lp-dialog select { height:36px;min-height:36px;margin:0;line-height:18px; }
.lp-dialog input[data-count] { width:52px;padding:6px; }
.lp-group-list { display:grid;gap:10px;margin-top:14px; }
.lp-group { padding:12px;background:#fafaff;border:1px solid #eae9f5;border-radius:9px; }
.lp-group-title { display:flex;align-items:center;gap:8px; }
.lp-group-title input { width:0;flex:1;font-weight:600;background:white; }
.lp-group p { margin:10px 0 0;color:#828597;font-size:12px;line-height:1.7;overflow-wrap:anywhere; }
.lp-roster-list { margin-top:6px;max-height:360px;overflow:auto; }
.lp-member { margin:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #f0f1f6; }
.lp-member:last-child { border-bottom:0; }
.lp-member-name { display:flex;align-items:center;gap:10px;min-width:0;overflow-wrap:anywhere; }
.lp-member-number { font-size:11px;color:#aaadbc; }
.lp-member select { width:120px;flex-shrink:0;font-size:12px; }
.lp-material-list { display:grid;gap:12px; }
.lp-material { padding:16px;border:1px solid #e7e7f0;border-radius:10px;background:#fff;min-width:0; }
.lp-material-heading { display:flex;align-items:center;justify-content:space-between;gap:12px; }
.lp-material-heading strong { font-size:15px;overflow-wrap:anywhere; }
.lp-kind { padding:4px 7px;font-size:11px;background:#f3f2fd;color:#7874b8;border-radius:5px;white-space:nowrap; }
.lp-material p { margin:12px 0;color:#7b7f91;line-height:1.7;overflow-wrap:anywhere; }
.lp-recipients { color:#999bad;font-size:12px; }
.lp-material-footer { display:flex;align-items:center;gap:16px;border-top:1px solid #f0f0f5;margin-top:14px;padding-top:12px; }
.lp-material-footer .btn { margin-left:auto; }
.lp-text-button { background:transparent;border:0;color:#787b91;font-size:12px;cursor:pointer;padding:4px 0;white-space:nowrap; }
.lp-text-button:hover { color:#625ed8; }
.lp-empty { display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#9699aa; }
.lp-empty strong { font-size:14px;color:#777b91;font-weight:500; }
.lp-empty p { font-size:12px;line-height:1.8;margin:7px 0 0; }
.lp-empty-small { padding:22px 8px;background:#fafaff;border:1px dashed #e4e3ef;border-radius:8px; }
.lp-empty-materials { min-height:320px;background:#fcfcff;border:1px dashed #e6e5f0;border-radius:10px; }
.lp-empty svg { width:46px;height:46px;margin-bottom:18px;color:#b2afd9; }
.lp-status { border-top:1px solid #e8e9f1;padding:13px 28px;background:white;color:#9295a6;font-size:12px;line-height:1.6; }
.lp-editor { width:min(650px,calc(100vw - 32px));padding:24px;background:white; }
.lp-editor label { display:flex;flex-direction:column;gap:6px;margin:12px 0; }
.lp-editor input:not([type=checkbox]),.lp-editor select { height:40px; }
.lp-fields { display:grid;grid-template-columns:1fr 1fr;gap:16px; }
.lp-editor fieldset { padding:12px;border:1px solid #dddce8;border-radius:10px;margin:16px 0; }
.lp-editor .lp-target { display:inline-flex;flex-direction:row;margin:8px 16px 8px 0;align-items:center; }
.lp-actions { display:flex;justify-content:flex-end;gap:8px;align-items:center;flex-wrap:wrap;position:sticky;bottom:-24px;background:#fff;padding:16px 0 0;margin-top:16px; }
.lp-choices { display:grid;gap:12px;padding:24px; }
.lp-dialog[aria-busy=true] .lp-body { pointer-events:none;opacity:.7; }
@media(max-width:900px) { .lp-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}.lp-body{grid-template-columns:1fr;padding:18px;gap:16px}.lp-head{padding:18px;align-items:flex-start}.lp-head-actions{flex-wrap:wrap;justify-content:flex-end}.lp-empty-materials{min-height:200px}.lp-status{padding:12px 18px}.lp-head h2{font-size:20px} }
@media(max-width:540px) { .lp-head{flex-wrap:wrap;gap:14px}.lp-head-actions{width:100%;justify-content:flex-start}.lp-close{margin-left:auto}.lp-groups,.lp-roster,.lp-materials{padding:14px}.lp-group-toolbar{flex-wrap:wrap}.lp-group-toolbar label{margin-right:4px}.lp-section-head{gap:8px}.lp-body h3{font-size:14px}.lp-fields{grid-template-columns:1fr}.lp-section-head .btn{padding:0 10px}.lp-member select{width:110px} }

.lp-editor .lp-select-all {display:flex;margin:0 0 8px;padding-bottom:10px;border-bottom:1px solid #eeedf5;color:#635bd3;font-weight:600;}
.lp-select-all [data-selection-count] {margin-left:auto;color:#88899b;font-size:12px;font-weight:400;}

.lp-group .lp-merge{width:100%;height:30px;margin-top:8px;font-size:11px;color:#9385ad;border:1px solid #e8e1f1;border-radius:6px;background:#faf8fe}.lp-group.lp-drop-active{outline:2px solid #9c8be0;background:#f3efff}.lp-member[draggable=true]{cursor:grab}

.lp-student-search{width:100%;box-sizing:border-box;padding:10px 14px;margin:4px 0 14px;border:1px solid #e1dfea;border-radius:9px;background:#fff;font:inherit;font-size:14px}.lp-member[hidden],.lp-target[hidden]{display:none!important}.lp-student-search:focus{outline:2px solid #b7b1eb;outline-offset:1px}

/* One task editor for scheduled preparation and live publication. */
.lp-dialog [hidden],.lp-editor [hidden]{display:none!important}
.lp-task-home{display:flex;flex-direction:column;gap:18px;padding:24px 28px}
.lp-task-home>.lp-materials{order:0;width:100%;box-sizing:border-box;padding:22px;border:0;background:transparent}
.lp-task-home>.lp-grouping{order:1;width:100%;display:block;border:1px solid #e5e6ef;border-radius:12px;background:white}
.lp-grouping>summary{padding:18px 22px;font-weight:650;cursor:pointer;color:#49455f}
.lp-grouping>summary span{font-size:12px;font-weight:400;color:#8b879c;margin-left:14px}
.lp-grouping-body{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:0 18px 18px}
.lp-material-list{grid-template-columns:repeat(auto-fill,minmax(270px,1fr))}
.lp-material{padding:18px;box-shadow:0 3px 14px #28203b04;border-radius:14px}
.lp-material-preview{width:100%;height:160px;position:relative;margin-bottom:16px;border-radius:9px;overflow:hidden;background:#f3f1f8;display:grid;place-items:center;color:#9a92aa;font-size:12px}
.lp-material-preview img{width:100%;height:100%;object-fit:contain}.lp-material-preview iframe{width:100%;height:100%;border:0}
.lp-empty-materials{grid-column:1/-1;min-height:250px;background:white}
.lp-unified-editor{width:min(1160px,calc(100vw - 32px));padding:0;background:#f7f8fc;max-height:calc(100dvh - 32px)}
.lp-unified-editor .ct-publisher{gap:0;display:block}
.lp-unified-editor .ct-publish-layout{padding:22px;grid-template-columns:minmax(0,1.45fr) minmax(280px,1fr);gap:20px;align-items:start}
.lp-unified-editor .ct-source-pane,.lp-unified-editor .ct-settings-pane{padding:20px;background:#fff;border:1px solid #e9e6f0;border-radius:14px;min-width:0}
.lp-unified-editor .ct-source-pane>.ct-toolbar{align-items:center;flex-wrap:wrap;margin-bottom:18px}
.lp-unified-editor h4{font-size:16px;margin:0}.lp-unified-editor label{margin:0 0 14px;font-size:13px;color:#514b63}
.lp-unified-editor input:not([type=checkbox]),.lp-unified-editor select,.lp-unified-editor textarea{width:100%;border-radius:9px;border-color:#e6e1ee;background:#fdfcfe;outline-color:#9b87e3}
.lp-unified-editor .ct-source-pane>.ct-toolbar label{flex-direction:row;align-items:center;margin:0;gap:8px;white-space:nowrap}.lp-unified-editor .ct-source-pane>.ct-toolbar select{width:auto}
.lp-unified-editor .ct-settings-pane{display:grid;gap:18px}.lp-unified-editor .ct-settings-pane>label{margin:0}
.lp-unified-editor .ct-button{min-height:38px;border-radius:9px;padding:8px 12px;font:inherit;font-size:13px}
.lp-unified-editor .ct-primary{background:#7560d8;border-color:#7560d8;color:#fff;min-height:42px;font-weight:650}
.lp-unified-editor details{border-top:1px solid #eeebf4;padding-top:14px}.lp-unified-editor summary{cursor:pointer;color:#716581;line-height:1.7;font-size:13px}.lp-unified-editor summary small{color:#aaa1b5;margin-left:6px}
.lp-unified-editor details>label:first-of-type{margin-top:14px}.lp-unified-editor .ct-mode-switch{margin-top:9px;display:flex;gap:8px}.lp-unified-editor .ct-mode-switch>button{flex:1;background:#faf9fc;border:1px solid #e5e0ef}.lp-unified-editor .ct-mode-switch>button[aria-pressed=true]{background:#eee8fc;border-color:#aa93e5;color:#6f50bd}
.lp-unified-editor .ct-frame-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:540px;overflow:auto}
.lp-unified-editor .ct-frame-card{border-radius:12px;padding:8px;text-align:left}.lp-unified-editor .ct-frame-card strong{padding:8px 4px;font-size:13px;display:block}.lp-unified-editor .ct-frame-card-preview{aspect-ratio:16/10;border-radius:7px;background:#f5f2fa}
.lp-unified-editor .lp-target{display:flex;margin:10px 0;font-size:13px;gap:8px}.lp-unified-editor .lp-group-toolbar{flex-wrap:wrap;padding:0}.lp-unified-editor .lp-group-toolbar label{margin:0;gap:5px}.lp-unified-editor input[data-count]{width:52px}
.lp-unified-editor .lp-manual-member{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;margin:8px 0}.lp-manual-member select{max-width:150px}
.lp-editor-footer{position:sticky;bottom:0;display:flex;align-items:center;gap:12px;padding:18px 24px;background:#fff;border-top:1px solid #e9e5f0;z-index:2}.lp-editor-footer>div{flex:1;color:#83778f;font-size:12px}.lp-editor-footer [data-error]{color:#bd4159;margin:4px 0 0;max-width:600px}
.lp-text-note{padding:60px 24px;text-align:center;line-height:1.8;color:#9a8daa;background:#faf8fd;border-radius:12px}.lp-unified-editor .ct-group-controls{padding:14px;border-radius:10px;background:#faf8fd}
@media(max-width:800px){.lp-unified-editor .ct-publish-layout{grid-template-columns:1fr;padding:16px}.lp-unified-editor .ct-frame-grid{max-height:380px}.lp-grouping-body{grid-template-columns:1fr}.lp-task-home{padding:10px}.lp-task-home>.lp-materials{padding:12px}.lp-editor-footer{padding:14px 16px;flex-wrap:wrap}.lp-editor-footer>div{min-width:100%}.lp-unified-editor .ct-source-pane,.lp-unified-editor .ct-settings-pane{padding:16px}.lp-grouping>summary span{display:block;margin-left:16px}}
.lp-unified-editor .ct-publisher>.lp-editor-footer{bottom:0;margin:0;padding:16px 24px;flex-direction:row}.lp-unified-editor .ct-publisher>.lp-editor-footer>button{width:auto}
@media(max-width:640px){.lp-unified-editor .ct-publisher>.lp-editor-footer{padding:14px 16px;flex-wrap:wrap}}

/* A single vertical flow keeps the task content and publishing choices together. */
.lp-flow{display:grid;gap:16px;padding:20px 24px}
.lp-flow>section{min-width:0;border:1px solid #e7e3ef;border-radius:14px;background:#fff;padding:18px 20px}
.lp-flow-label{display:flex;align-items:center;gap:9px;margin-bottom:14px}.lp-flow-label>span{display:grid;place-items:center;width:23px;height:23px;border-radius:7px;background:#f0eafa;color:#8061bf;font-size:12px;font-weight:650}.lp-flow-label h3{font-size:14px;margin:0;color:#393149}.lp-flow-label>small{margin-left:auto;color:#9a91a6;font-size:12px}
.lp-type-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.lp-type-options button{display:flex;gap:5px;flex-direction:column;text-align:left;cursor:pointer;border:1px solid #e6e1ec;background:#faf9fc;border-radius:10px;padding:12px 16px;color:#696071;font:inherit}.lp-type-options button strong{font-size:14px}.lp-type-options button small{font-size:11px;color:#a098ab}.lp-type-options button[aria-pressed=true]{background:#f2ecfc;border-color:#a78ae1;color:#7251b3;box-shadow:0 0 0 1px #a78ae133}
.lp-unified-editor .lp-content-section .ct-frame-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:230px;overflow:auto;overscroll-behavior:contain;padding:2px}.lp-unified-editor .lp-content-section .ct-frame-card-preview{aspect-ratio:16/8;min-height:100px;max-height:150px}.lp-unified-editor .lp-content-section label{margin:0}.lp-content-section .ct-frame-tools{margin:12px 0 0}.lp-content-section [data-frame-status]{flex:1}.lp-unified-editor .lp-content-section textarea{resize:vertical;min-height:96px;max-height:220px}
.lp-unified-editor .lp-release-section{display:block}.lp-release-grid{display:grid;grid-template-columns:minmax(200px,1.3fr) minmax(220px,1fr) minmax(140px,.7fr);align-items:start;gap:24px}.lp-unified-editor .lp-release-grid>label{margin:0}.lp-unified-editor .lp-release-grid details{border:0;padding:0;min-width:0}.lp-unified-editor .lp-release-grid details>summary{min-height:68px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:8px;background:#faf8fd;border:1px solid #e9e2f3;border-radius:9px;padding:0 12px}.lp-release-grid summary:before{display:none}.lp-unified-editor .lp-release-grid summary span{margin:0;color:#79638f;font-size:12px}.lp-release-grid [data-targets]{max-height:180px;overflow:auto}.lp-unified-editor .lp-release-section>[data-group-settings]{margin-top:18px}.lp-unified-editor .lp-release-grid .ct-mode-switch{margin-top:8px}.lp-unified-editor .lp-release-grid .ct-mode-switch button{min-height:40px}
.lp-unified-editor .lp-head{padding:18px 24px}.lp-unified-editor .lp-head h2{font-size:21px;margin:2px 0 0}.lp-unified-editor .lp-head p{display:none}
@media(max-width:850px){.lp-flow{padding:16px;gap:12px}.lp-release-grid{grid-template-columns:1fr 1fr;gap:16px}.lp-release-grid>[data-recipients]{grid-column:1/-1}.lp-unified-editor .lp-release-grid details>summary{min-height:46px;flex-direction:row;align-items:center;justify-content:space-between}.lp-unified-editor .lp-content-section .ct-frame-card-preview{min-height:85px}.lp-flow>section{padding:16px}}
@media(max-width:540px){.lp-type-options{gap:8px}.lp-type-options button{padding:10px}.lp-type-options button small{display:none}.lp-type-options button strong{font-size:12px}.lp-release-grid{grid-template-columns:1fr}.lp-unified-editor .lp-content-section .ct-frame-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Compact task panel: the primary view is the task list and one create action. */
.lp-task-home{display:block;padding:22px 28px}.lp-task-home>.lp-materials{padding:0;background:transparent}.lp-task-home>.lp-grouping{display:none}.lp-task-home .lp-section-head{margin-bottom:14px}.lp-task-home .lp-section-head h3{font-size:18px}.lp-task-home .lp-section-note{display:none}.lp-task-home .lp-material-list{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}.lp-task-home .lp-material{padding:16px;border-radius:12px;box-shadow:none}.lp-task-home .lp-material p.lp-material-summary{margin:8px 0;color:#8b879c;font-size:12px}.lp-task-home .lp-empty-materials{min-height:260px;border:1px dashed #d9d5e7;background:#fff}.lp-task-home .lp-empty-materials p{display:none}.lp-task-home .lp-empty-materials strong{font-size:15px}.lp-task-home .lp-material-footer{margin-top:12px;padding-top:10px}.lp-task-home .lp-material-footer .btn{margin-left:auto}.lp-dialog .lp-head-actions .lp-save-state{font-size:12px;color:#8176a5}@media(max-width:640px){.lp-task-home{padding:16px}.lp-task-home .lp-material-list{grid-template-columns:1fr}.lp-task-home .lp-section-head{align-items:center}.lp-task-home .lp-section-head .btn{padding:0 11px}}

.lp-dialog:not(.lp-groups-view) .lp-task-home>.lp-grouping{display:none}.lp-dialog.lp-groups-view .lp-task-home>.lp-grouping{display:block}.lp-dialog.lp-groups-view .lp-materials{display:none}.lp-dialog .lp-status:has([data-status]:empty){display:none}.lp-task-home .lp-recipients{display:none}

.lp-unified-editor{overflow:hidden!important}.lp-unified-editor>form{min-height:0;max-height:calc(100dvh - 48px);display:flex;flex-direction:column;overflow:hidden}.lp-unified-editor .lp-head,.lp-unified-editor .lp-editor-footer{flex-shrink:0}.lp-unified-editor .lp-flow{min-height:0;overflow:auto;overflow-x:hidden;flex:1}.lp-unified-editor .ct-frame-card-preview{position:relative;overflow:hidden}.lp-unified-editor .ct-frame-card-preview iframe{display:block;width:100%;height:100%;border:0;pointer-events:none}.lp-unified-editor .ct-frame-card-preview[data-preview-state=live]::after{content:'实时预览';position:absolute;bottom:4px;right:4px;background:#fffE;border-radius:4px;padding:2px 5px;font-size:10px;color:#7b7094}

/* Definite outer and form heights are required for the flex body to scroll. */
dialog.lp-unified-editor{height:min(900px,calc(100dvh - 32px));max-height:calc(100dvh - 32px)}
dialog.lp-unified-editor>form.ct-publisher{height:100%;max-height:none;min-height:0;display:flex;flex-direction:column;overflow:hidden;margin:0}
dialog.lp-unified-editor>form.ct-publisher>.lp-flow{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
dialog.lp-unified-editor>form.ct-publisher>.lp-head,dialog.lp-unified-editor>form.ct-publisher>.lp-editor-footer{flex:none;position:static;margin:0}
.lp-material-list>[data-task-empty][hidden]{display:none}

/* Task lists use the same rows on teacher and display surfaces. */
.lp-task-home .lp-material-list{grid-template-columns:minmax(0,1fr)}
.lp-task-home .lp-material-list .hw-task{grid-template-columns:minmax(0,1fr) auto auto;align-items:center}
.lp-task-home .lp-material-list .hw-task>.hw-actions{grid-column:auto;margin:0;padding:0;border:0}
.task-list-actions button{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.task-list-actions svg{flex-shrink:0}
@media(max-width:600px){.lp-task-home .lp-material-list .hw-task{grid-template-columns:minmax(0,1fr) auto}.lp-task-home .lp-material-list .hw-task>.hw-actions{grid-column:1/-1;justify-content:flex-end}}
