/* 横向教师工作台与单题试卷编辑器 */
body.teacher-workspace {
  --teacher-primary:#1554ed; --teacher-primary-hover:#1042c0; --teacher-focus:#3673ff;
  --teacher-ice:#edf3ff; --teacher-soft-rule:#e1e6ee;
  --ink:#172132; --ink-2:#334056; --muted:#56657c; --muted-2:#617086;
  --line:#d5dde8; --bg:#f2f5fa;
  color:var(--ink); background:var(--bg);
}
body.teacher-workspace .app.studio { display:block; width:100%; min-width:0; background:var(--bg); }
.studio-bar { background:white; border-bottom:1px solid #dbe2ed; }
.studio-bar-inner {
  max-width:1760px; margin:auto; min-height:66px; padding:0 clamp(18px,2.3vw,42px);
  display:grid; grid-template-columns:minmax(144px,1fr) auto minmax(144px,1fr); align-items:center; gap:18px;
}
.studio-brand,.studio-account summary,.studio-btn,.studio-q-link,.studio-edit-title,
.studio-preset,.studio-menu-actions button { font:inherit; color:inherit; cursor:pointer; }
.studio-brand { padding:0; border:0; background:none; display:flex; gap:11px; align-items:center; justify-self:start; font-size:23px; font-weight:750; letter-spacing:-.04em; }
.studio-mark { width:40px; height:40px; border-radius:10px; display:inline-grid; place-content:center; flex:none; background:var(--blue); color:#fff; }
.studio-mark svg { width:25px; height:25px; stroke-width:2; }
body.teacher-workspace .nav.studio-nav { order:initial; display:flex; flex-direction:row; flex:none; flex-wrap:nowrap; gap:clamp(12px,2.7vw,54px); padding:0; margin:0; align-self:stretch; overflow:visible; }
body.teacher-workspace .nav.studio-nav button {
  display:block; position:relative; margin:0; border:none; width:auto; border-radius:0; background:transparent; box-shadow:none;
  color:#383f4c; font-size:clamp(14px,1.15vw,18px); font-weight:600; padding:0 5px; white-space:nowrap;
}
body.teacher-workspace .nav.studio-nav button.on,body.teacher-workspace .nav.studio-nav button:hover { background:transparent; color:var(--blue); }
.studio-nav button.on::after { content:""; background:var(--blue); height:3px; position:absolute; inset:auto 0 0; border-radius:3px 3px 0 0; }
.studio-account,.studio-ai { position:relative; margin:0; }
.studio-account { justify-self:end; }
.studio-account summary,.studio-ai summary,.studio-weights summary,.studio-answer summary { list-style:none; cursor:pointer; }
.studio summary::-webkit-details-marker {display:none}
.studio-account summary { display:flex; align-items:center; gap:8px; font-size:15px; min-height:40px; }
.studio-account summary > svg,.studio-weights svg,.studio-answer summary svg { width:15px; height:15px; }
.studio-avatar { width:29px; height:29px; border-radius:50%; display:grid; place-items:center; color:#fff; background:#7199ec; }
.studio-avatar svg { width:23px; height:23px; }
.studio-menu,.studio-ai-sheet { position:absolute; z-index:30; top:calc(100% + 8px); width:270px; padding:20px; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 10px 34px #13264a24; }
.studio-menu { right:0; }
.studio-menu strong,.studio-menu small {display:block}
.studio-menu small {font-size:12px;color:var(--muted);margin:2px 0 12px}
.studio-menu label,.studio-ai-sheet label {display:block;color:var(--muted);font-size:13px;font-weight:550;margin-bottom:10px}
.studio-menu select,.studio-prompt input {width:100%;border:1px solid var(--line);background:white;color:var(--ink);font:inherit;font-size:14px;border-radius:6px;padding:9px;margin-top:4px}
.studio-menu-actions {border-top:1px solid var(--line);padding-top:8px;display:grid}
.studio-menu-actions button,.studio-preset {border:none;background:transparent;text-align:left;border-radius:4px;padding:8px 3px;font-size:14px}
.studio-menu-actions button:hover,.studio-preset:hover {color:var(--blue);background:var(--blue-l)}
.studio-btn {display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:39px;padding:7px 13px;border:1px solid #cbd5e5;border-radius:7px;font-size:14px;font-weight:570;white-space:nowrap;background:#fff;line-height:1.4}
.studio-btn svg {width:17px;height:17px}
.studio-btn:hover {color:var(--blue);border-color:#8fadf4;background:#f9fbff}
.studio-btn.emph {background:var(--blue);border-color:var(--blue);color:white;padding-inline:21px}
.studio-btn.emph:hover {background:var(--blue-d)}
.studio-btn:disabled {background:#f5f7fa;color:#728094;border-color:#e0e5ed;cursor:default}
.studio-ai-sheet {width:min(360px,88vw);left:0}
.studio-ai-sheet h3 {font-size:18px;margin:0 0 12px}
.studio-ai-sheet h4 {font-size:13px;color:var(--muted);border-top:1px solid var(--line);padding-top:13px;margin:14px 0 5px}
.studio-ai-sheet label {margin:0}
.studio-prompt {position:relative;margin:0 0 10px}
.studio-prompt input {padding-right:30px}
.studio-prompt button {position:absolute;right:6px;top:8px;font-size:20px;color:var(--muted);background:none;border:0}
.studio-preset {display:flex;align-items:center;justify-content:space-between;width:100%}
.studio-preset svg {width:14px;height:14px}
/* 整卷摘要、目录和单题阅读区。 */
.studio-paper-summary {flex:none}
.studio-paper-summary,.studio-outline,.studio-doc {min-width:0;border:1px solid #d7e0ed;border-radius:11px;background:#fff}
.studio-paper-summary {display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto;align-items:center;gap:clamp(14px,2.3vw,38px);padding:3px 18px}
.studio-summary-main,.studio-summary-title {min-width:0}
.studio-summary-main {display:flex;align-items:center;gap:10px;padding-block:5px}
.studio-paper-icon {width:36px;height:36px;flex:none;display:grid;place-items:center;border-radius:8px;background:#edf2ff;color:#3c5dc0}
.studio-paper-icon svg {width:23px;height:23px}
.studio-paper-icon svg path {fill:white}
.studio-summary-title h2,.studio-summary-main h2 {font-size:clamp(16px,1.2vw,19px);line-height:1.45;letter-spacing:0;margin:0;color:#24334b;overflow-wrap:anywhere}
.studio-doc-meta {display:flex;align-items:center;flex-wrap:wrap;gap:2px 0;margin-top:5px;color:var(--muted);font-size:13px;line-height:1.4}
.studio-doc-meta span:not(:last-child)::after {content:"·";color:#9aa6b7;padding-inline:7px}
.studio-summary-settings {display:flex;align-items:flex-start;gap:clamp(14px,2.5vw,45px);margin:0;padding-inline-start:clamp(14px,1.7vw,28px);border-left:1px solid #e1e7f0}
.studio-summary-settings>div {min-width:0}
.studio-summary-settings dt {font-size:12px;line-height:1.4;color:var(--muted)}
.studio-summary-settings dd {font-size:14px;line-height:1.55;font-weight:550;color:#273650;margin:3px 0 0}
.studio-setting-unset {font-weight:400;color:var(--muted)}
.studio-preview-link {padding:2px 0;color:#345788;font:inherit}
.studio-preview-link:hover,.studio-preview-link:focus-visible {text-decoration:underline}
/* 上下两行等高，按钮始终沿摘要卡中线对齐；单行提示占用下方留白。 */
.studio-summary-actions {display:grid;align-self:stretch;grid-template-rows:1fr auto 1fr;min-height:72px;width:clamp(240px,20vw,300px);max-width:100%}
.studio-page-turn,.studio-dialog-actions {display:flex;gap:8px;align-items:center}
.studio-summary-buttons {grid-row:2;justify-self:end;display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.studio-summary-actions .studio-btn {min-height:32px;padding:5px 14px}
.studio-page-turn {gap:8px;color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums}
.studio-page-turn button {font:inherit;color:#42536c;display:inline-flex;align-items:center;justify-content:center;gap:4px;border:1px solid #d0dae7;background:white;border-radius:6px;cursor:pointer;padding:4px 8px;min-height:31px}
.studio-page-turn button svg {width:15px;height:15px}
.studio-page-turn button:hover {background:#eff4ff;color:#214eaa;border-color:#b3c9ef}
.studio-page-turn button:disabled {background:#f6f8fb;color:#78869c;border-color:#e2e7ef;cursor:default}
.studio-paper-grid {display:grid;grid-template-columns:minmax(0,54fr) minmax(0,46fr);grid-template-rows:minmax(0,1fr);gap:14px;min-height:0}
.studio-outline,.studio-doc {display:flex;flex-direction:column;min-height:0}
.studio-outline {
  --directory-fields:36px minmax(0,1fr) 42px;
  --directory-gap:12px; --directory-inset:16px;
  border-color:#c8d5e7;
}
.studio-outline.is-mixed {--directory-fields:36px minmax(0,1fr) 72px 42px}
.studio-outline-head,.studio-read-head {display:flex;justify-content:space-between;align-items:center;gap:8px 12px;flex:none;border-bottom:1px solid #e0e6ef}
.studio-outline-head {position:relative;padding:13px 18px;flex-wrap:wrap}
.studio-outline-heading {display:flex;align-items:baseline;gap:9px}
.studio-outline-head h2,.studio-read-head h2 {margin:0;line-height:1.4;letter-spacing:0;color:#20324b}
.studio-outline-head h2 {font-size:20px;font-weight:700}
.studio-outline-heading>span,.studio-q-link small,.studio-q-subject {font-size:13px;line-height:1.45;color:var(--muted);font-variant-numeric:tabular-nums}
.studio-q-list {min-height:0;flex:1 1 auto;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scroll-padding-block-start:36px}
.studio-directory-columns,.studio-outline-row,.studio-q-link {display:grid;align-items:center;column-gap:var(--directory-gap)}
.studio-directory-columns,.studio-outline-row {padding-inline:var(--directory-inset)}
.studio-directory-columns {position:sticky;z-index:1;top:0;grid-template-columns:var(--directory-fields);min-height:33px;background:#f5f7fb;border-bottom:1px solid #e2e7ef;color:#56667d;font-size:12px;font-weight:550}
.studio-directory-columns>span:first-child,.studio-directory-columns>span:last-child {text-align:center}
.studio-outline-row {grid-template-columns:minmax(0,1fr);min-width:0;border-bottom:1px solid #edf0f5}
.studio-outline-row:hover {background:#f6f8fc}
.studio-outline-row[data-current=true] {background:#edf3ff;box-shadow:inset 3px 0 #416bcb}
.studio-q-link {grid-template-columns:var(--directory-fields);width:100%;align-self:stretch;min-width:0;min-height:clamp(47px,6.7vh,64px);padding:8px 0;border:none;background:transparent;text-align:left;line-height:1.45}
.studio-q-number {font:600 13px/1.4 "Segoe UI",sans-serif;font-variant-numeric:tabular-nums;text-align:center;color:#66768d}
.studio-q-link b {min-width:0;overflow-wrap:anywhere;font-size:15px;font-weight:550;color:#26354a}
.studio-q-link[aria-current=true] :is(.studio-q-number,b) {color:#234f9e;font-weight:650}
.studio-q-link small {text-align:center;white-space:nowrap}
.studio-q-subject {font-size:12px}
.studio-weights summary {display:flex;align-items:center;gap:6px;min-height:30px;padding:3px 8px;border-radius:5px;color:#405b87;font-size:13px;font-weight:550}
.studio-weights summary:hover,.studio-weights[open] summary {background:#edf3ff;color:#234f9e}
.studio-weight-panel {position:absolute;z-index:5;inset-inline-end:var(--directory-inset);top:calc(100% - 4px);width:min(340px,calc(100% - 2 * var(--directory-inset)));box-sizing:border-box;max-height:min(38vh,320px);overflow:auto;overscroll-behavior:contain;padding:14px 16px;background:#fff;border:1px solid #cfdaeb;border-radius:8px;box-shadow:0 6px 20px #1c35581c}
.studio-weight-caption,.studio-weight-panel li {display:flex;align-items:baseline;justify-content:space-between;gap:4px 12px}
.studio-weight-caption {color:var(--muted);font-size:12px}
.studio-weight-caption strong {color:#344763;font-size:13px}
.studio-weight-panel ul {list-style:none;padding:0;margin:0}
.studio-weight-panel li {flex-wrap:wrap;margin-top:12px;font-size:13px;line-height:1.5}
.studio-weight-panel li b {margin-inline-start:auto;font-size:12px;font-weight:550;color:#405575;white-space:nowrap;font-variant-numeric:tabular-nums}
.studio-weight-track {flex-basis:100%;height:4px;border-radius:2px;background:#eaf0f7}
.studio-weight-track i {display:block;height:100%;border-radius:inherit;background:#6483c8}
.studio-outline-tools {padding:12px var(--directory-inset) 16px}
.studio-add-label {display:flex;align-items:center;gap:10px;margin:0 0 8px;color:#55657c;font-size:12px;font-weight:550;line-height:1.5}
.studio-add-label::after {content:"";height:1px;flex:1;background:#e5eaf2}
.studio-add-methods {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,206px),1fr));gap:8px}
.studio-add-option {display:grid;grid-template-columns:22px minmax(0,1fr) 12px;gap:10px;align-items:center;min-width:0;padding:10px 12px;border:1px solid #dce4ef;border-radius:7px;background:#f7f9fc;color:#294367;text-align:start;font:inherit;cursor:pointer}
.studio-add-option>svg:first-child {width:21px;height:21px;color:#4b69a3}
.studio-add-option>svg:last-child {width:12px;height:12px;color:#6b7d9a}
.studio-add-option strong,.studio-add-option small {display:block}
.studio-add-option strong {font-size:14px;line-height:1.5;font-weight:600}
.studio-add-option small {margin-top:2px;color:#576780;font-size:12px;line-height:1.5}
.studio-add-option:hover {background:#eef3ff;border-color:#adc1e6}
.studio-add-option:focus-visible {outline:2px solid var(--teacher-focus);outline-offset:2px}
.studio-empty-compose {width:100%;box-sizing:border-box;padding:clamp(18px,2.1vw,36px) var(--directory-inset) 0}
.studio-empty-compose>label {display:flex;align-items:center;gap:8px;color:#233d64;font-size:17px;font-weight:650}
.studio-empty-compose>label svg {width:21px;height:21px;color:var(--blue)}
.studio-empty-input {display:flex;align-items:stretch;gap:8px;margin-top:12px}
.studio-empty-input input {flex:1;min-width:0;width:100%;padding:9px 11px;border:1px solid #b6c7dc;border-radius:6px;background:white;color:var(--ink);font:inherit;font-size:14px}
.studio-empty-input .studio-btn {flex:none;font-size:14px;padding-inline:15px}
.studio-empty-presets {margin-top:10px}
.studio-empty-presets summary {display:flex;align-items:center;gap:4px;width:fit-content;cursor:pointer;list-style:none;color:#496084;font-size:13px}
.studio-empty-presets summary svg {width:14px;height:14px}
.studio-empty-presets[open] summary svg {transform:rotate(180deg)}
.studio-empty-presets>div {display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.studio-empty-presets button {padding:4px 8px;color:#415b7d;background:#f5f8fc;border:1px solid #dbe4ef;border-radius:5px;cursor:pointer;font:inherit;font-size:12px}
.studio-empty-presets button:hover {color:#1e519d;border-color:#afc5e1}
.studio-read-head {padding:12px clamp(16px,1.6vw,26px);flex-wrap:wrap}
.studio-read-head h2 {font-size:16px;font-weight:650;white-space:nowrap}
.studio-read-head .studio-page-turn {margin-inline-start:auto}
.studio-outline-return {display:none}
.studio-question-heading {display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.studio-question-actions {display:flex;align-items:center;gap:2px;padding-inline-start:8px;border-inline-start:1px solid #dce3ed}
.studio-question-actions button {display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:32px;padding:4px 7px;border:0;border-radius:5px;background:transparent;color:#435771;font:inherit;font-size:13px;white-space:nowrap;cursor:pointer}
.studio-question-actions button svg {width:14px;height:14px}
.studio-question-actions button:hover:not(:disabled),.studio-question-actions button:focus-visible {background:#edf3ff;color:#234f9e}
.studio-question-actions [data-action="remove-paper-q"]:hover:not(:disabled) {color:#9d3434;background:#fff1f1}
.studio-question-actions button:disabled {color:#788496;cursor:default}
.studio-question {flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:clamp(17px,2.8vh,32px) clamp(17px,1.8vw,32px)}
.studio-question-meta {display:flex;flex-wrap:wrap;align-items:center;gap:5px 12px;font-size:13px;line-height:1.6;color:var(--muted)}
.studio-question-meta strong {font-size:13px;font-weight:600;color:#36567e}
.studio-question h3,.studio-choices li {font-family:Cambria,"Times New Roman","SimSun",serif;overflow-wrap:anywhere;color:#152237}
.studio-question h3 {font-size:clamp(22px,1.65vw,29px);font-weight:500;line-height:1.6;margin:clamp(12px,1.8vh,20px) 0}
.studio-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:clamp(18px,3vw,56px);list-style:none;margin:0;padding:0}
.studio-choices li {min-width:0;display:flex;align-items:baseline;gap:11px;font-size:20px;line-height:1.6;padding:clamp(7px,1.4vh,18px) 0;border-bottom:1px solid #e7ecf3}
.studio-choices li>span {flex:none;min-width:19px;color:#566984;font:600 14px/1.6 "Segoe UI",sans-serif}
.studio-answer {margin-top:clamp(18px,3.1vh,38px);padding:clamp(12px,1.9vh,25px) clamp(14px,1.6vw,26px);border:1px solid #dfe7f2;border-radius:8px;background:#f5f8fc;color:#2a3950}
.studio-answer summary {display:flex;align-items:center;justify-content:space-between;list-style:none;cursor:pointer;font-size:15px;line-height:1.45;font-weight:650;color:#2a405e}
.studio-answer[open] summary {margin-bottom:7px}
.studio-answer[open] summary svg {transform:rotate(180deg)}
.studio-answer p {display:flex;align-items:baseline;gap:12px;font-size:15px;line-height:1.65;margin:4px 0 0;overflow-wrap:anywhere}
.studio-answer p b {flex:none;font-weight:600}
.studio-answer small {display:block;color:#52637a;font-size:12px;line-height:1.55;margin-top:8px}
.studio-paper-dialog {display:grid;gap:16px;color:#22324a}
.studio-paper-dialog h2 {margin:0;font-size:21px;font-weight:650;line-height:1.35}
.studio-dialog-summary {margin:0;padding:12px 15px;border:1px solid #e1e7ef;background:#f5f8fc;border-radius:7px;line-height:1.65;overflow-wrap:anywhere}
.studio-dialog-summary strong,.studio-dialog-summary small {display:block}
.studio-dialog-summary small {color:var(--muted);font-size:13px}
.studio-target-list {margin:5px 0 0;padding:0;list-style:none;font-size:13px;font-weight:400;color:var(--muted);overflow-wrap:anywhere}
.studio-target-list li+li {margin-top:4px}
.studio-target-list b {font-weight:600;color:var(--ink-2)}
.studio-paper-dialog form {display:grid;gap:14px}
.studio-publish-field {display:grid;gap:6px;color:#46566c;font-size:13px;font-weight:600;min-width:0}
.studio-publish-field input,.studio-publish-field select,.studio-paper-dialog textarea {width:100%;min-width:0;color:var(--ink);background:white;border:1px solid #bdcadc;border-radius:6px;padding:8px 10px;font:inherit;font-size:14px;line-height:1.4}
.studio-dialog-actions {flex-wrap:wrap;justify-content:flex-end;border-top:1px solid #e1e6ef;padding-top:14px}
.studio-dialog-actions button:first-child:nth-last-child(3) {margin-right:auto}
body.teacher-workspace .modal-dialog:has(.studio-paper-dialog) {width:min(530px,calc(100vw - 24px))}
.studio-publish-control {display:grid;gap:4px;justify-items:end}
#paper-empty-publish-hint {grid-row:3;align-self:start;min-width:0;padding-top:2px;color:#556379;font-size:12px;line-height:1.45;text-align:right;overflow-wrap:anywhere}
:is(.studio-summary-buttons,.studio-publish-control) .studio-btn.emph:disabled {color:#677588;background:#e8edf4;border-color:#d4dce6;cursor:not-allowed}
.studio-doc.studio-empty-paper {display:grid;align-content:center;justify-items:center;gap:7px;padding:24px;text-align:center;min-height:160px}
.studio-empty-paper h2 {font-size:17px;line-height:1.45;font-weight:600;margin:0}
.studio-empty-paper p {color:#536279;font-size:14px;line-height:1.55;margin:0}
body.teacher-workspace .modal-dialog:has(> .studio-paper-history) {width:min(570px,calc(100vw - 24px));max-width:none;padding:0;overflow:hidden}
body.teacher-workspace .modal-dialog:has(.history-versions) {width:min(780px,calc(100vw - 24px))}
.studio-paper-history {grid-template-rows:auto minmax(0,1fr);max-height:calc(88dvh - 2px);gap:0}
.studio-paper-history:has(.history-versions) {height:min(455px,84dvh)}
.history-heading {display:flex;align-items:center;justify-content:space-between;padding:16px 20px;gap:12px;border-bottom:1px solid var(--line)}
.history-heading>div,.history-version-meta {display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px}
.history-heading h2 {font-size:18px}
.history-heading small,.history-version-meta time {color:var(--muted);font-size:12px}
.history-close {flex:none;width:32px;height:32px;border:0;border-radius:6px;background:transparent;color:#566782;font:24px/1 sans-serif;cursor:pointer}
.history-close:hover,.history-versions button:hover {background:#eef2f9}
.history-layout {display:grid;min-height:0;min-width:0}
.history-layout:has(>.history-versions) {grid-template-columns:minmax(155px,29%) minmax(0,1fr)}
.history-versions {display:flex;flex-direction:column;gap:4px;min-width:0;overflow:auto;overscroll-behavior:contain;border-right:1px solid var(--line);padding:10px;background:#f8f9fc}
.history-versions button {flex:none;display:grid;gap:4px;padding:10px 12px;border:1px solid transparent;border-radius:6px;background:transparent;text-align:left;font:inherit;cursor:pointer;color:#34435b}
.history-versions button[aria-pressed=true] {background:#eaf0ff;border-color:#c8d5f8;color:#294ba3}
.history-versions button>span:first-child {display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:14px}
.history-versions small,.history-version-meta>span {background:#e7edff;color:#3657a3;border-radius:4px;padding:2px 6px;font-size:11px;line-height:1.4}
.history-list-topic {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#53637b;font-size:12px}
#history-preview {min-width:0;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto}
.history-reading {min-height:0;overflow:auto;overscroll-behavior:contain;padding:20px 22px;overflow-wrap:anywhere}
.history-version-meta {align-items:center;font-size:12px;color:#52637b}
.history-version-meta>span {margin-left:auto}
.history-reading h3 {font-size:16px;line-height:1.55;margin:12px 0 7px;color:var(--ink)}
.history-stem {margin:0;white-space:pre-line;font:18px/1.65 Cambria,"Times New Roman","SimSun",serif;color:var(--ink)}
.history-options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 16px;list-style:none;margin:14px 0;padding:0}
.history-options li {display:flex;align-items:baseline;gap:8px;padding:5px 0;color:var(--ink);font:17px/1.5 Cambria,"Times New Roman","SimSun",serif}
.history-options b {flex:none;font:600 12px/1.5 "Segoe UI",sans-serif;color:var(--muted)}
.history-solution {border-top:1px solid var(--line);padding-top:10px;font-size:13px;color:#455671}
.history-solution summary {cursor:pointer;font-weight:600}
.history-solution p {margin:6px 0 0;line-height:1.6}
.history-actions {display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px 12px;padding:12px 20px;border-top:1px solid var(--line)}
.history-actions span {margin-right:auto;font-size:12px;color:var(--muted)}
.history-actions .studio-btn:disabled {color:#5d6e85;background:#f0f3f7;border-color:#dce2ea;cursor:default}
.studio-paper-history :is(button,summary,.history-reading):focus-visible {outline:2px solid #4a69d5;outline-offset:-2px}
@media(max-width:600px) {
  .history-layout:has(>.history-versions) {grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
  .history-versions {flex-direction:row;border-right:0;border-bottom:1px solid var(--line);padding:7px;gap:5px}
  .history-versions button {width:125px;padding:6px 9px}
  .history-reading,.history-heading {padding:14px}
  .history-actions {padding:9px 14px}
}
@media(max-width:400px) {
  .history-options {grid-template-columns:minmax(0,1fr)}
}
@media(min-width:901px) and (min-height:540px) {
  body.teacher-workspace .app.studio:has(.studio-paper-summary) {display:grid;grid-template-rows:auto minmax(0,1fr);height:100dvh;min-height:0}
  body.teacher-workspace main.studio-content:has(.studio-paper-summary) {min-height:0}
  .studio-paper-grid {flex:1 1 0}
}
@media(min-width:901px) and (min-height:850px) {
  .studio-choices {grid-template-columns:minmax(0,1fr)}
  .studio-choices li {padding:clamp(5px,calc(2.7vh - 15px),21px) 0}
  .studio-question {padding-block:clamp(25px,3vh,48px)}
}
@media(min-width:901px) and (min-height:710px) and (max-height:849px) {
  .studio-question h3 {margin-block:14px;font-size:clamp(21px,1.65vw,25px)}
  .studio-choices li {padding-block:10px}
  .studio-answer {margin-top:20px;padding-block:13px}
}
@media(min-width:901px) and (max-height:800px) {
  .studio-q-list:has(.studio-outline-row:nth-of-type(9)) .studio-q-link {min-height:41px;padding-block:6px}
  .studio-outline-head {padding-block:12px}
}
@media(min-width:901px) and (max-height:665px) {
  .studio-read-head {padding-block:7px}
  .studio-question {padding-block:10px}
  .studio-question h3 {font-size:21px;margin-block:8px}
  .studio-choices li {padding-block:4px;font-size:18px}
  .studio-answer {margin-top:12px;padding-block:9px}
  .studio-answer p {font-size:14px;line-height:1.5}
}
.studio-content :is(.stu-card,.filter-bar,.teacher-empty) {border-radius:10px}
body.teacher-workspace .studio-content .stu-practice-head {padding:0; background:none; border:0; box-shadow:none}
.studio-content [data-action="save-qb-ver"] {max-width:max-content}
.studio-content .split-roster,.studio[data-view=qbank] .split {gap:16px}
.studio[data-view=qbank] .split {grid-template-columns:minmax(0,1.12fr) minmax(0,1fr)}
.studio[data-view=qbank] .split .exam-stem {font-family:Cambria,"Microsoft YaHei",sans-serif;font-size:18px!important;line-height:1.7;padding:14px 0!important;background:none!important}
.studio .studio-filters {display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.studio .roster-scope {margin:-5px 0 15px;padding:10px 14px;background:white;border:1px solid var(--line);border-radius:8px}
.studio .split-roster .tbl-wrap,.studio[data-view=qbank] .tbl-wrap {overflow-x:auto}
@media(max-width:1150px) {
  .studio-bar-inner {grid-template-columns:auto 1fr auto}
  body.teacher-workspace .nav.studio-nav {justify-self:center;gap:16px}
  .studio-btn {padding-inline:10px}
}
@media(max-width:900px) {
  .studio-bar-inner {gap:8px;min-height:56px}
  .studio-brand {font-size:19px;gap:7px}
  .studio-mark {width:33px;height:33px}
  body.teacher-workspace .nav.studio-nav {gap:8px}
  .studio-paper-summary {grid-template-columns:minmax(0,1fr) auto;gap:4px 18px;padding-block:8px}
  .studio-summary-actions {grid-column:2;grid-row:1 / 3}
  .studio-summary-settings {gap:10px 20px;flex-wrap:wrap;padding:0;border:0}
  .studio-paper-summary > .studio-summary-settings {display:grid;gap:4px}
  .studio-summary-settings>div {display:flex;align-items:baseline;gap:6px}
  .studio-summary-settings dd {margin:0}
  .studio-outline {--directory-fields:27px minmax(0,1fr) 30px;--directory-gap:7px;--directory-inset:10px}
  .studio-outline.is-mixed {--directory-fields:27px minmax(0,1fr) 51px 30px}
  .studio-q-link b {font-size:14px}
  .studio-q-list {max-height:65svh}
  .studio-question {padding:17px}
  .studio-content .split-roster,.studio[data-view=qbank] .split {grid-template-columns:minmax(0,1fr)}
}
@media(max-width:720px) {
  .studio-bar-inner {grid-template-columns:1fr auto;padding:8px 12px 0;gap:3px 12px}
  .studio-account {grid-row:1;grid-column:2}
  body.teacher-workspace .nav.studio-nav {grid-row:2;grid-column:1/-1;justify-self:stretch;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;}
  body.teacher-workspace .nav.studio-nav button {font-size:13px;min-height:40px;padding:0}
  .studio-brand {font-size:18px}
  .studio-ai-sheet {left:0}
  .studio-paper-summary {gap:10px;padding:13px}
  .studio-summary-main {grid-column:1/-1;gap:9px}
  .studio-summary-title h2 {text-wrap:balance}
  .studio-paper-icon {width:30px;height:32px;border-radius:7px}
  .studio-paper-icon svg {width:19px;height:19px}
  .studio-summary-settings {grid-column:1/-1;display:grid;gap:3px}
  .studio-summary-settings dd {font-size:13px}
  .studio-summary-actions {grid-row:auto;grid-column:1/-1;width:100%;min-height:0;grid-template-rows:auto}
  .studio-summary-buttons {grid-row:1;justify-self:stretch}
  #paper-empty-publish-hint {grid-row:2;text-align:center}
  .studio-summary-actions .studio-btn {min-height:32px;padding:5px 12px;font-size:13px}
  .studio-paper-grid {grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:10px}
  .studio-outline,.studio-outline.is-mixed {--directory-fields:25px minmax(0,1fr) 30px;--directory-gap:8px;--directory-inset:10px}
  .studio-outline-head {padding:11px 12px;gap:8px 14px}
  .studio-outline-head h2 {font-size:17px}
  .studio-read-head h2 {font-size:15px}
  .studio-q-list {flex:auto;max-height:clamp(185px,32svh,300px)}
  .studio-q-list:has(.studio-empty-compose) {max-height:none}
  .studio-empty-compose {padding-top:18px}
  .studio-empty-input {flex-wrap:wrap}
  .studio-empty-input input {flex:1 1 170px}
  .studio-empty-input .studio-btn {min-height:35px;padding:5px 10px;font-size:13px}
  .studio-q-link {min-height:42px;padding-block:6px}
  .studio-outline.is-mixed .studio-directory-columns>span:nth-child(3) {display:none}
  .studio-outline.is-mixed .studio-q-link {grid-template-areas:"num topic score" "num subject score";row-gap:1px}
  .studio-outline.is-mixed .studio-q-number {grid-area:num}
  .studio-outline.is-mixed .studio-q-link b {grid-area:topic}
  .studio-outline.is-mixed .studio-q-link small {grid-area:score}
  .studio-outline.is-mixed .studio-q-subject {grid-area:subject;font-size:11px}
  .studio-outline-tools {padding-block:8px}
  .studio-outline-return {display:inline-flex;align-items:center;justify-content:center;padding:4px 6px;border:0;border-radius:4px;background:transparent;color:#355d9e;font:inherit;font-size:12px;cursor:pointer}
  .studio-outline-return svg {width:13px;height:13px}
  .studio-read-head {padding:9px 13px}
  .studio-page-turn {gap:5px;font-size:12px}
  .studio-page-turn button {min-height:30px;padding:3px 6px}
  .studio-question {overflow:visible;padding:14px}
  .studio-question h3 {font-size:20px;margin:11px 0}
  .studio-question-meta {gap:4px 8px;font-size:12px}
  .studio-choices {gap:0 12px}
  .studio-choices li {font-size:18px;gap:6px;padding-block:6px}
  .studio-answer {padding:10px 12px;margin-top:14px}
  .studio-answer p {font-size:14px;gap:8px}
  .studio-dialog-actions {gap:6px}
  .studio-dialog-actions .studio-btn {font-size:13px;padding-inline:8px}
}
@media(max-width:720px) {
  .studio-read-head {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 8px}
  .studio-question-heading {grid-column:1/-1;gap:7px}
  .studio-question-actions {gap:0;padding-inline-start:5px}
  .studio-question-actions button {padding-inline:5px;font-size:12px}
  .studio-outline-return {justify-self:start}
}

@media(min-width:1000px) {
  .studio[data-view=roster] .split-roster {grid-template-columns:minmax(0,2.15fr) minmax(290px,1fr)}
  .studio[data-view=roster] .split-roster .stu-card:nth-child(2) {padding:22px!important}
}
.teacher-workspace .handout-import {display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px 16px;padding:16px;background:#f4f7fc;border-radius:8px}
.handout-import label {font-weight:650;font-size:14px}
.handout-import input[type=file] {font:inherit;font-size:14px;width:100%}
.handout-import small,.handout-import #studio-doc-preview,.handout-import button {grid-column:1/-1}
.handout-import #studio-doc-preview:empty {display:none}
.handout-import #studio-doc-preview ol {margin:0;padding-left:24px;max-height:220px;overflow:auto}
.handout-import button[hidden] {display:none!important}
.handout-alt {border-bottom:1px solid var(--line);padding:12px 0}
.handout-alt summary {cursor:pointer;color:var(--ink-2);font-weight:600}
.handout-alt[open] summary {margin-bottom:10px}

.studio-bank-options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:0 0 12px;padding:0;list-style:none;font-size:15px}
.studio-pick-search {display:flex;align-items:center;gap:6px;flex-wrap:wrap;max-width:100%}
.studio-pick-search input {width:170px;min-width:100px;flex:1 1 135px}
.studio-bank-fields {display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.studio-bank-fields label {display:grid;gap:4px;color:var(--muted)}
.studio-bank-fields input {max-width:180px}
.studio-revision {margin:7px 0}
.studio-revision summary {color:var(--blue);cursor:pointer}
.studio-revision p {white-space:pre-wrap}
@media(min-width:1200px) {
  body.teacher-workspace .nav.studio-nav button {font-size:18px}
}
