.editor-lab.has-document-tabs:not(.is-preview-mode) > .editor-lab-header { display:none!important; }
.document-tabs-bar { display:flex; align-items:center; gap:4px; height:50px; padding:0 180px 0 20px; box-sizing:border-box; background:#f6f8fb; border-bottom:1px solid #dce5ef; min-width:0; flex-shrink:0; }
.document-files-link { flex-shrink:0; padding:10px 12px; color:#566c84; font-size:13px; text-decoration:none; }
.document-tabs { display:flex; align-items:stretch; gap:0; overflow-x:auto; min-width:0; scrollbar-width:thin; height:100%; }
.document-tab { display:flex; align-items:center; background:transparent; border:0; border-right:1px solid #e3e8ef; border-radius:0; flex:0 1 auto; width:280px; max-width:320px; min-width:180px; position:relative; }
.document-tab.is-active { background:#fff; border-color:#dce5ef; }
.document-tab.is-active::before { content:""; position:absolute; bottom:0; left:16px; right:16px; height:2px; background:#3169ab; border-radius:2px; }
.document-tab button { border:0; background:transparent; cursor:pointer; font:inherit; }
.document-tab [role=tab] { display:flex; align-items:center; gap:7px; padding:9px 4px 9px 16px; min-width:0; flex:1; color:#52657b; font-size:13px; height:100%; text-align:left; }
.document-tab.is-active [role=tab] { color:#234b7b; font-weight:600; }
.document-tab-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
.document-tab-kind { font-size:10px; color:#3169ab; border:1px solid #9eb6d2; border-radius:3px; padding:1px 3px; font-weight:500; }
.document-tab .document-tab-close { width:26px; height:26px; margin-right:5px; color:#8392a5; border-radius:4px; font-size:17px; }
.document-tab-close:hover { background:#dce5ef; color:#344961; }
.document-tab-new { border:0; background:transparent; color:#52657b; font-size:24px; padding:5px 9px; cursor:pointer; flex-shrink:0; }
.document-tab-state { width:5px; height:5px; border-radius:50%; background:transparent; }
.document-tab-state.is-dirty { background:#d99a39; }
.document-tab-name-input { width:100%; min-width:0; box-sizing:border-box; border:1px solid #6d98cc; background:white; padding:3px; font:12px "Microsoft YaHei",sans-serif; }
.document-tab button:focus-visible,.document-tab-new:focus-visible { outline:2px solid #3169ab; outline-offset:-2px; }
.document-action-bar { display:flex; align-items:center; gap:12px; padding:10px 0; min-height:56px; border-bottom:1px solid #e2e9f2; background:#fff; box-sizing:border-box; flex-shrink:0; }
.document-action-bar .editor-lab-history-group { padding:0 14px 0 0!important; margin:0!important; border-right:1px solid #e2e9f2!important; border-left:0!important; }
.document-action-bar .editor-lab-history-group { width:auto!important; min-width:78px!important; min-height:0!important; height:auto!important; flex:0 0 auto!important; }
.document-action-bar .editor-lab-history-tools { display:flex!important; flex-direction:row!important; gap:6px!important; }
.document-action-bar button { border:1px solid #dce5ef; border-radius:5px; background:white; color:#3169ab; cursor:pointer; padding:7px 12px; font:13px "Microsoft YaHei",sans-serif; white-space:nowrap; box-shadow:none; }
.document-action-bar [data-editor-command] { width:32px; height:32px; padding:0; font-size:17px; }
.document-action-bar .editor-save-stack { display:flex; flex-direction:row; align-items:center; justify-content:center; min-width:0; gap:9px; padding-right:12px; border-right:1px solid #e2e9f2; }
.document-action-bar [data-save-document] { padding:6px 16px; height:32px; font-size:13px; }
.document-action-bar .lecture-style-toggle { padding:8px 12px; background:#f7faff; }
.document-action-bar [data-preview-entry],.document-action-bar [data-direct-export] { background:#3169ab; color:white; border-color:#3169ab; font-weight:600; padding:8px 16px; }
.document-action-bar [data-discard-session] { margin-left:8px; color:#c43d3d; border-color:#edc9c9; background:white; }
.document-action-bar button[hidden] { display:none!important; }
.has-document-tabs.is-preview-mode .document-action-bar { display:none; }
.has-document-tabs.is-preview-mode .editor-lab-header { min-height:64px!important; }
@media(max-width:1050px){.document-tabs-bar{padding-right:120px;}.document-action-bar{gap:8px;padding:8px 0;flex-wrap:wrap;}.document-tab{width:235px;}}

.document-action-label { width:36px; flex:0 0 36px; color:#24364b; font-size:14px; font-weight:600; }
.document-action-bar [data-editor-lab-save-status] { display:block; flex:0 0 132px; width:132px; min-width:132px!important; max-width:132px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:left; font-variant-numeric:tabular-nums; }
.document-action-bar [data-save-document] { flex:0 0 80px; width:80px; min-width:80px; max-width:80px; overflow:hidden; text-overflow:ellipsis; }
.document-tab:not(.is-active):hover { background:#edf1f6; }
.document-tab-state { flex-shrink:0; }

/* Content and document operations share one continuous toolbar row. */
.document-command-row { display:flex; align-items:center; gap:24px; overflow-x:auto; scrollbar-width:thin; border-bottom:1px solid #e2e9f2; }
.app-content[data-route="editor-lab"] .editor-lab:not(.is-preview-mode) .document-command-row .editor-lab-primary-actions { flex:0 0 auto; flex-wrap:nowrap!important; border-bottom:0!important; }
.document-command-row .document-action-bar { flex:0 0 auto; flex-wrap:nowrap; gap:8px; min-height:56px; padding:10px 0; border:0; background:transparent; }
.document-command-row .document-action-label { color:#1f2329; font-size:14px; font-weight:600; }
.document-command-row .document-action-bar button { height:36px!important; min-height:36px!important; padding:0 14px!important; border-radius:7px!important; font-family:inherit; font-size:13px!important; font-weight:600!important; line-height:normal; }
.document-command-row .document-action-bar [data-editor-command] { width:36px; padding:0!important; }
.document-command-row .document-action-bar .editor-lab-history-group { min-width:0!important; padding-right:0!important; border-right:0!important; }
.document-command-row .document-action-bar .editor-save-stack { padding-right:8px; gap:8px; }
.document-command-row .document-action-bar [data-discard-session] { margin-left:4px; }
.has-document-tabs.is-preview-mode .document-command-row { display:none; }

/* Browser-style tabs: rounded active surface, without selection lines. */
.document-tabs-bar { height:50px; padding:7px 180px 0 16px; gap:6px; background:#e4edfc; border-bottom:0; }
.document-tabs { gap:4px; }
.document-tab { border:0; border-radius:14px 14px 0 0; width:280px; }
.document-tab.is-active { background:#fff; }
.document-tab.is-active::before { content:none; }
.document-tab.is-active [role=tab] { color:#24364b; font-weight:600; }
.document-tab:not(.is-active):hover { background:#d6e3f8; }
.document-tab .document-tab-close { color:#52657b; }
.document-tab-new { align-self:center; margin-bottom:7px; font-size:24px; }
@media(max-width:1050px) { .document-tabs-bar { padding-right:120px; } }
.app-content[data-route="editor-lab"] .editor-lab:not(.is-preview-mode) .document-command-row .editor-lab-primary-actions { width:auto!important; min-width:0!important; }
.app-shell .app-content[data-route="editor-lab"] .editor-lab .document-command-row .document-action-bar button { height:36px!important; min-height:36px!important; padding:0 14px!important; font-size:13px!important; font-weight:600!important; border-radius:7px!important; }
.app-shell .app-content[data-route="editor-lab"] .editor-lab .document-command-row .document-action-bar [data-editor-command] { padding:0!important; }

/* Keep the editor chrome on one shared surface. */
.document-tabs-bar { padding:0 20px 0 0; height:56px; background:#f8fafd; gap:0; }
.document-tabs { gap:0; align-items:flex-end; }
.document-tab { height:46px; border-radius:12px 12px 0 0; }
.document-tab [role=tab],.document-tab.is-active [role=tab] { color:#1f2329; }
.document-tab:not(.is-active):hover { background:#eef2f7; }
.document-tab-new { margin:0 10px; }
.document-tabs-bar workbench-account { position:static!important; inset:auto!important; transform:none!important; margin-left:auto; flex:0 0 auto; align-self:center; z-index:20; }
.document-tabs-bar .account-trigger { min-height:44px; height:44px; padding:4px 8px; }
.document-tabs-bar .account-avatar { width:34px; height:34px; min-width:34px; font-size:19px; }
.document-command-row { gap:40px; }
.document-command-row .document-action-bar { margin-left:auto; gap:10px; }
.document-command-row .document-action-label { margin-right:4px; }
@media(min-width:1600px) { .document-command-row { gap:56px; } .document-command-row .document-action-bar { gap:12px; } }
body:has(.document-tabs-bar) workbench-account:not(.document-tabs-account) { display:none!important; }

/* Align the operations label with the symbol tool below. */
.editor-lab .document-command-row { gap:var(--operation-gap, 40px); }
.editor-lab .document-command-row .document-action-bar { margin-left:0; }
.document-tabs-bar,
.app-content[data-route="editor-lab"] .editor-lab:not(.is-preview-mode) .editor-lab-toolbar { background:#f2f6fc!important; }
.document-tab [role=tab] { font-weight:600; }
.app-content[data-route="editor-lab"] .editor-lab:not(.is-preview-mode) .editor-version-bar { background:#f2f6fc!important; padding-bottom:8px!important; }
.app-content[data-route="editor-lab"] .editor-lab .editor-version-view-tabs { gap:8px; }
.app-content[data-route="editor-lab"] .editor-lab .editor-version-view-tabs button { border:1px solid transparent!important; border-radius:7px!important; background:transparent!important; box-shadow:none!important; }
.app-content[data-route="editor-lab"] .editor-lab .editor-version-view-tabs button.active { background:#fff!important; border-color:#cbdcf1!important; color:#275c99!important; }
.app-content[data-route="editor-lab"] .editor-lab .editor-version-view-tabs button:hover { background:#e7effa!important; }
/* A single selected version; the common draft follows the same rules. */
.app-shell .app-content[data-route="editor-lab"] .editor-lab .editor-version-view-tabs { gap:6px!important; }
.app-shell .app-content[data-route="editor-lab"] .editor-lab .editor-version-view-tabs button[data-edit-view] { display:inline-flex!important; align-items:center; gap:8px; min-width:136px; min-height:36px; padding:7px 14px!important; background:transparent!important; border:1px solid transparent!important; border-radius:6px!important; color:#34465d!important; box-shadow:none!important; }
.app-shell .app-content[data-route="editor-lab"] .editor-lab .editor-version-view-tabs button[data-edit-view] strong { font-weight:500!important; }
.app-shell .app-content[data-route="editor-lab"] .editor-lab .editor-version-view-tabs button[data-edit-view][aria-pressed="true"] { background:#fff!important; border-color:#cbd9eb!important; color:#245b96!important; }
.app-shell .app-content[data-route="editor-lab"] .editor-lab .editor-version-view-tabs button[data-edit-view][aria-pressed="true"] strong { font-weight:600!important; }
.app-shell .app-content[data-route="editor-lab"] .editor-lab .editor-version-view-tabs button[data-edit-view][aria-pressed="false"]:hover { background:#e8eff8!important; border-color:transparent!important; }
