/* Visual layer only. Original region widths, grids, order and placement remain native. */
body[data-template-library-ui] .模板工作台{--review-accent:#5265d9;--review-ink:#29344b;--review-muted:#7a8496;--review-line:#e8ebf1;border-color:var(--review-line)!important;box-shadow:0 3px 14px #23334d05!important}
body[data-template-library-ui] :is(.模板左栏,.模板右栏){color:var(--review-ink)}
body[data-template-library-ui] .模板右栏 :is(.模板检查器分组,.模板功能元数据){background:transparent!important;border:0!important;border-bottom:1px solid var(--review-line)!important;border-radius:0!important;box-shadow:none!important;padding:14px 0!important;margin:0!important}
body[data-template-library-ui] .模板检查器分组>header{gap:8px!important;margin-bottom:12px!important;align-items:center!important}
body[data-template-library-ui] .模板检查器分组>header strong{font-size:13px!important;font-weight:600!important;color:var(--review-ink)!important}
body[data-template-library-ui] .模板检查器分组>header small{color:var(--review-muted)!important;font-size:11px!important;line-height:1.55!important}
body[data-template-library-ui] .模板右栏 label{font-size:12px!important;color:#687489!important;line-height:1.6!important}
body[data-template-library-ui] .模板工作台 :is(input,textarea,select,.IM飞书选择器按钮){border-color:#e0e5ed!important;border-radius:6px!important;background:#fff!important;box-shadow:none!important;font-size:12px!important;color:#37445b!important;transition:border-color .15s,box-shadow .15s}
body[data-template-library-ui] .模板工作台 :is(input,textarea,select,.IM飞书选择器按钮):hover{border-color:#bec8db!important}
body[data-template-library-ui] .模板工作台 :is(input,textarea,select,.IM飞书选择器按钮):focus-visible{outline:2px solid #5265d943!important;outline-offset:2px!important;border-color:#7282df!important}
body[data-template-library-ui] .模板工作台 textarea{line-height:1.7!important}
body[data-template-library-ui] .模板工作台 button{border-radius:6px!important;font-size:12px;transition:background .15s,border-color .15s}
body[data-template-library-ui] .模板工作台 button:focus-visible{outline:2px solid #7282df!important;outline-offset:2px}
body[data-template-library-ui] .模板工作台 button:disabled{opacity:.45!important;cursor:not-allowed!important}
body[data-template-library-ui] .模板工作台 [data-review-disclosure]{margin-left:auto;border:0!important;background:transparent!important;color:#7a8496!important;font-size:11px!important;min-height:28px;padding:3px 7px;white-space:nowrap}
body[data-template-library-ui] .模板工作台 [data-review-disclosure]:hover{color:#5265d9!important;background:#f1f3fc!important}
body[data-template-library-ui] .模板右栏 .review-collapsed>:not(header){display:none!important}
body[data-template-library-ui] .模板右栏 .review-collapsed>header{margin-bottom:0!important}
body[data-template-library-ui] .模板效果工具栏{gap:8px!important;padding:10px 0!important;border-bottom:1px solid var(--review-line);background:#fff!important}
body[data-template-library-ui] .模板效果工具栏>[role=group]{background:#f0f2f7!important;padding:3px!important;border-radius:7px!important}
body[data-template-library-ui] .模板效果工具栏>[role=group] button{border:0!important;background:transparent!important;color:#6e798c!important;min-height:29px!important}
body[data-template-library-ui] .模板效果工具栏>[role=group] button[aria-pressed=true]{background:#fff!important;color:#5265d9!important;box-shadow:0 1px 4px #25335414!important;font-weight:600}
body[data-template-library-ui] .模板效果工具栏 label{font-size:12px!important;color:#6e798c!important}
body[data-template-library-ui] .模板效果工具栏 [data-effect-status]{color:#8690a1!important;font-size:11px!important;line-height:1.55!important}
body[data-template-library-ui] .模板效果工具栏 [data-effect-generate]{border-color:#d9def4!important;background:#f3f5ff!important;color:#5265d9!important}
body[data-template-library-ui] .模板画布外框{background:#f6f7fa!important;border-color:#e9ecf2!important;box-shadow:none!important}
body[data-template-library-ui] .模板画布外框 [data-effect-rendered] .模板区域文字{white-space:pre-wrap!important;overflow:hidden!important;overflow-wrap:normal!important;word-break:normal!important;display:block!important;width:100%!important;box-sizing:border-box!important}
body[data-template-library-ui] .模板画布外框 .课程模板画布:not(.紧凑) .模板文字层[data-max-lines="1"] .模板区域文字,
body[data-template-library-ui] .模板画布外框 [data-effect-rendered] .模板文字层[data-max-lines="1"] .模板区域文字{white-space:nowrap!important;overflow:hidden!important;overflow-wrap:normal!important;word-break:keep-all!important}
body[data-template-library-ui] .模板效果分页{color:#6e798c!important;font-size:12px!important}
body[data-template-library-ui] .模板效果分页 button{padding:6px 10px;border:1px solid #e1e5ee;background:white;color:#59677e}
@media(prefers-reduced-motion:reduce){body[data-template-library-ui] .模板工作台 *{transition:none!important}}
/* Fit controls and rendered sheet inside the existing center region. */
body[data-template-library-ui] .模板画布内容>:is(.模板效果工具栏,.模板画布外框,.模板分页条,.模板效果分页){box-sizing:border-box!important;min-width:0!important;max-width:100%!important;width:100%!important}
body[data-template-library-ui] .模板效果工具栏 label{min-width:0!important;max-width:100%!important;flex:1 1 100%!important;white-space:nowrap!important}
body[data-template-library-ui] .模板效果工具栏 label :is(.IM飞书选择器,.IM飞书选择器按钮){min-width:0!important;max-width:100%!important;width:100%!important;box-sizing:border-box!important}
body[data-template-library-ui] .模板效果工具栏 label>.IM飞书选择器{flex:1!important;width:0!important}
body[data-template-library-ui] .模板效果工具栏 .IM飞书选择器按钮{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body[data-template-library-ui] .模板画布外框>[data-effect-rendered]{width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;aspect-ratio:3/4!important;transform:none!important;container-type:inline-size!important}
body[data-template-library-ui] .模板画布外框 [data-effect-rendered] .模板吸附线{display:none!important}
body[data-template-library-ui] .模板效果分页{flex-wrap:wrap!important;gap:8px!important}
body[data-template-library-ui] .模板效果分页>span{font-size:11px!important}
/* Review request: remove the component toolbar and layer panel in both modes. */
body[data-template-library-ui] .模板工作台 :is(.模板组件工具栏,.模板Figma图层){display:none!important}
/* Form configuration + passive preview. No direct canvas manipulation. */
body[data-template-library-ui] #环节轨道 :is(h1,h3)[hidden]{display:none!important}
body[data-template-library-ui] .模板工作台 :is(.模板Figma工具栏,.模板安全区标签,.模板安全区可视线,.模板层级标尺,.模板吸附线,.模板缩放手柄,.模板区域尺寸,.模板画布页面删除操作,.模板原子编辑标题,.模板双结构说明){display:none!important}
body[data-template-library-ui] .模板画布内容[data-template-effect=effect] .模板设计调试层{display:none!important}
body[data-template-library-ui] .模板画布外框>.课程模板画布{pointer-events:none!important;zoom:1!important;transform:none!important;width:100%!important;min-width:0!important;height:auto!important;aspect-ratio:3/4!important;container-type:inline-size!important;margin:0 auto!important}
body[data-template-library-ui] .模板画布外框 :is(.模板文字层,.模板区域文字){outline:none!important;border-color:transparent!important;box-shadow:none!important;cursor:default!important}
body[data-template-library-ui] .模板画布外框 .模板区域文字{white-space:pre-wrap!important;overflow:hidden!important;overflow-wrap:normal!important;word-break:normal!important;width:100%!important}
body[data-template-library-ui] .模板画布外框 .课程模板画布:not(.紧凑) .模板文字层[data-max-lines="1"] .模板区域文字{white-space:nowrap!important;overflow:hidden!important;overflow-wrap:normal!important;word-break:keep-all!important}
body[data-template-library-ui] .模板画布外框 .模板区域文字::after{display:none!important}
body[data-template-library-ui] .模板画布内容[data-template-effect=edit] .模板效果工具栏>:not([role=group]){display:none!important}
body[data-template-library-ui] .模板画布外框{display:flex!important;align-items:flex-start!important;justify-content:center!important;padding:20px 16px!important;overflow:auto!important}
.review-field-picker{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:12px 14px;border-bottom:1px solid #e8ebf1;background:white;position:sticky;top:0;z-index:6}
.review-field-picker>span{font-size:12px;color:#788297;margin-right:4px}
.review-field-picker button{padding:6px 9px;background:#f4f5f8;border:1px solid transparent;color:#65718a}
.review-field-picker button[aria-pressed=true]{background:#eef0ff;border-color:#ccd2f4;color:#5265d9}
body[data-template-library-ui] .模板右栏 .当前文字区域卡>header{position:static!important}
body[data-template-library-ui] #环节轨道 .ark-page-heading:has(h1[hidden]){display:none!important}
body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板工作台 .模板画布外框 .课程模板画布 :is(.模板文字层,.模板区域文字,.模板卡片组件){outline:0!important;box-shadow:none!important;border:0!important}
body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板工作台 .模板画布内容:not([data-template-effect=effect]) .模板画布外框 .课程模板画布:not(.紧凑) .模板卡片组件.可替换图片槽{opacity:1!important;background-color:rgba(82,101,217,.14)!important;border:1.5px dashed #5265d9!important;border-radius:0!important;box-shadow:none!important}
body[data-template-library-ui] .模板画布内容:not([data-template-effect=effect]) .课程模板画布:not(.紧凑) .模板卡片组件.可替换图片槽>small{left:50%;top:50%;transform:translate(-50%,-50%);max-width:calc(100% - 12px);background:rgba(82,101,217,.92)}
/* Click a slot to select its form; do not allow direct drag/resize editing. */
body[data-template-library-ui] .模板画布外框>.课程模板画布:not([data-effect-rendered]){pointer-events:auto!important}
body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板工作台 .模板画布外框 .课程模板画布:not([data-effect-rendered]) [data-template-preview-slot]{cursor:pointer!important}
body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板工作台 .模板画布外框 .课程模板画布:not([data-effect-rendered]) [data-template-preview-slot]:hover{background:#5265d90a!important}
body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板工作台 .模板画布外框 .课程模板画布:not([data-effect-rendered]) .当前文字区域{outline:1px solid #98a5e8!important;outline-offset:3px!important}
/* Present the template directly, without an enclosing card. */
body[data-template-library-ui] .模板工作台 .模板画布外框{background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;min-height:0!important;height:auto!important;align-self:start!important;overflow:visible!important}
body[data-template-library-ui] .模板工作台 .模板画布外框::before,body[data-template-library-ui] .模板工作台 .模板画布外框::after{display:none!important}
/* Right column owns all configuration and source-preview controls. */
body[data-template-library-ui] .模板工作台 .模板内容工作区{grid-template-rows:auto minmax(0,1fr)!important;align-items:stretch!important}
body[data-template-library-ui] .模板工作台 .模板画布内容{display:contents!important}
body[data-template-library-ui] .模板工作台 .review-template-display{grid-column:1;grid-row:1 / span 2;min-width:0;min-height:0;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:12px}
body[data-template-library-ui] .模板工作台 .review-function-dock{grid-column:2;grid-row:1;min-width:0;padding:0 14px;background:white;border-left:1px solid #e8ebf1}
body[data-template-library-ui] .模板工作台 .模板右栏{grid-column:2!important;grid-row:2!important;min-height:0!important}
body[data-template-library-ui] .review-function-dock .模板效果工具栏{width:100%!important;min-width:0!important;box-sizing:border-box!important}
body[data-template-library-ui] .review-template-display>:is(.模板画布外框,.模板分页条,.模板效果分页){width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
body[data-template-library-ui] .模板工作台[data-review-mode=effect] .review-template-display .模板分页条{display:none!important}
@media(max-width:939px){body[data-template-library-ui] .模板工作台 .review-function-dock{grid-column:1;grid-row:1}body[data-template-library-ui] .模板工作台 .review-template-display{grid-column:1;grid-row:2}body[data-template-library-ui] .模板工作台 .模板右栏{grid-column:1!important;grid-row:3!important}}
body[data-template-library-ui] .review-function-dock .模板效果工具栏{justify-content:center!important}
body[data-template-library-ui] .review-function-dock .模板效果工具栏>[role=group]{margin:0 auto 6px!important;flex:0 0 auto!important}
body[data-template-library-ui] .review-function-dock .模板效果工具栏>[role=group] button{min-width:94px!important}
body[data-template-library-ui] .review-function-dock .模板效果工具栏 label{flex-basis:100%!important}
/* Mode tabs are centered above the template; functional controls remain at right. */
body[data-template-library-ui] .review-function-dock .模板效果工具栏>[role=group]{display:none!important}
body[data-template-library-ui] .模板工作台[data-review-mode=edit] .review-function-dock{display:none!important}
body[data-template-library-ui] .review-preview-modes{display:flex;justify-content:center;align-self:center;gap:2px;background:#f0f2f7;border-radius:7px;padding:3px;margin:0 0 6px}
body[data-template-library-ui] .review-preview-modes button{min-width:94px;padding:7px 12px;border:0;background:transparent;color:#6e798c;cursor:pointer}
body[data-template-library-ui] .review-preview-modes button[aria-pressed=true]{background:white;color:#5265d9;box-shadow:0 1px 4px #25335414;font-weight:600}
/* Whole-page balance: stable list / template / controls, one shared top edge. */
body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板工作台{grid-template-columns:240px minmax(0,1fr)!important;--模板右栏宽度:360px}
body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板内容工作区{grid-template-columns:minmax(0,1fr) 360px!important}
body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板内容工作区>.模板右栏{min-width:0!important;overflow:auto!important}
body[data-template-library-ui] .模板工作台 .review-template-display{padding:0 24px 16px!important;gap:18px!important;align-items:center!important}
body[data-template-library-ui] .review-preview-modes{margin:0!important;min-height:36px;box-sizing:border-box}
body[data-template-library-ui] .模板工作台 .review-template-display>.模板画布外框{width:min(100%,calc((100vh - 240px)*.75))!important;flex:0 0 auto!important}
body[data-template-library-ui] .模板工作台 .review-template-display>.模板分页条{justify-content:center!important;flex:0 0 auto!important}
body[data-template-library-ui] .模板工作台 .review-function-dock{padding:0 16px!important;border-left:0!important}
body[data-template-library-ui] .review-field-picker{position:static!important;padding:0 16px 12px!important;min-height:40px;box-sizing:border-box}
body[data-template-library-ui] .模板右栏 .模板主编辑区{height:auto!important;min-height:0!important;overflow:visible!important}
body[data-template-library-ui] .模板右栏 .当前文字区域卡>header{gap:8px!important;flex-wrap:wrap!important;padding:12px 0!important;margin-bottom:4px!important}
body[data-template-library-ui] .模板右栏 .当前文字区域卡>header strong{font-size:12px!important;font-weight:500!important;flex-basis:100%!important;color:#65718a!important}
body[data-template-library-ui] .模板右栏 .模板检查器分组>header small{font-size:11px!important}
body[data-template-library-ui] .模板右栏 .模板字段网格{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
body[data-template-library-ui] .模板右栏 textarea{min-height:76px!important;resize:vertical!important}
body[data-template-library-ui] .review-template-info{margin:12px 0;border-top:1px solid #e8ebf1;border-bottom:1px solid #e8ebf1;padding:12px 0}
body[data-template-library-ui] .review-template-info summary{font-size:12px;color:#65718a;cursor:pointer}
body[data-template-library-ui] .review-template-info .模板功能元数据{border:0!important}
body[data-template-library-ui] .review-template-info .模板功能元数据>header{display:none!important}
body[data-template-library-ui] .模板工作台 .模板左栏>.课程操作标题{padding-top:0!important;min-height:40px!important}
body[data-template-library-ui] .review-function-dock .模板效果工具栏{padding-top:0!important;justify-content:flex-start!important;gap:14px!important}
body[data-template-library-ui] .review-function-dock .模板效果工具栏 label{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important}
body[data-template-library-ui] .review-function-dock .模板效果工具栏 label>.IM飞书选择器{width:100%!important;flex:auto!important}
@media(max-width:1240px) and (min-width:940px){body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板工作台{grid-template-columns:200px minmax(0,1fr)!important}body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板内容工作区{grid-template-columns:minmax(0,1fr) 290px!important}body[data-template-library-ui] .模板工作台 .review-template-display{padding:0 12px 16px!important}}
@media(max-width:939px){body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] :is(.模板工作台,.模板内容工作区){grid-template-columns:minmax(0,1fr)!important}}
body[data-template-library-ui] .review-field-picker{display:block!important;padding:0 16px 14px!important}
.review-field-picker>strong{font-size:13px;font-weight:600;color:#334158}
.review-field-picker>p{font-size:11px;line-height:1.7;color:#718095;margin:8px 0}
.review-relation-page{padding:7px 0}
.review-relation-page>small{display:block;color:#8b95a5;font-size:11px;margin:0 0 6px}
.review-relation-page>button{display:block;text-align:left;width:100%;padding:7px 10px;margin:2px 0;white-space:normal;font-size:12px}
body[data-template-library-ui] .模板工作台 .review-template-display>.模板画布外框{align-self:center!important;width:min(100%,calc((100dvh - 250px)*.75))!important}
/* Wider configuration area for relationship labels and editable fields. */
body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板内容工作区{grid-template-columns:minmax(0,1fr) 440px!important}
@media(max-width:1240px) and (min-width:940px){body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板内容工作区{grid-template-columns:minmax(0,1fr) 340px!important}}
@media(max-width:939px){body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板内容工作区{grid-template-columns:minmax(0,1fr)!important}}
.review-binding-tree,.review-binding-tree ul{list-style:none;margin:0;padding:0}
.review-binding-tree{max-height:360px;overflow:auto;padding:4px 2px!important}
.review-binding-tree ul{margin-left:12px;padding-left:16px;border-left:1px solid #d8dfee}
.review-binding-node{position:relative;margin:5px 0}
.review-binding-tree ul>.review-binding-node::before{content:'';position:absolute;top:17px;left:-16px;width:14px;border-top:1px solid #d8dfee}
.review-binding-node>button{display:flex;width:100%;align-items:center;text-align:left;gap:8px;padding:7px 8px!important;background:#f7f8fb!important;border:1px solid transparent!important;cursor:pointer}
.review-binding-node>button>small{margin-left:auto;color:#8a94a5;font-size:10px;white-space:nowrap}
.review-binding-node.is-related>button{background:#f0f3fd!important}
.review-binding-node>button[aria-pressed=true]{background:#e9eeff!important;border-color:#aebdeb!important;color:#3b57af!important}
.review-page-label{font-size:10px;color:#667baa;background:white;padding:2px 4px;border-radius:3px;white-space:nowrap}
.review-cross-page{display:block;color:#657fb7;font-size:10px;margin:7px 0 3px}
.review-binding-hint{display:block;color:#8a95a5;font-size:10px;line-height:1.6;margin-top:9px}
/* Give the functional area enough room for parallel fields and relationships. */
@media(min-width:1241px){
 body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板内容工作区{grid-template-columns:minmax(0,1fr) minmax(540px,54%)!important}
 body[data-template-library-ui] .模板右栏 .模板字段网格{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 body[data-template-library-ui] .模板右栏 .当前文字区域卡{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:20px!important}
 body[data-template-library-ui] .模板右栏 .当前文字区域卡>:is(header,.模板内容设置,.模板内容合同设置,.模板双结构说明){grid-column:1 / -1!important}
 .review-binding-tree{max-height:330px}
}
@media(max-width:1240px) and (min-width:940px){body[data-template-library-ui][data-workbench="xhs"][data-current-page="xiaohongshu"][data-xhs-canvas="course-production"] .模板内容工作区{grid-template-columns:minmax(0,1fr) 400px!important}}
/* Compact the relationship overview so editing controls stay close by. */
body[data-template-library-ui] .review-binding-tree{max-height:250px!important}
body[data-template-library-ui] .review-binding-node{margin:2px 0!important}
body[data-template-library-ui] .review-binding-node>button{padding:4px 8px!important;min-height:25px!important}
body[data-template-library-ui] .review-cross-page{margin:3px 0 1px!important}
body[data-template-library-ui] .模板右栏 .当前文字区域卡>header{margin:0!important;padding:9px 0!important}
body[data-template-library-ui] .模板右栏 .当前文字区域卡>header strong{flex-basis:auto!important}
.review-tree-columns{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:18px;align-items:start}
.review-tree-section{min-width:0}
.review-tree-section>strong{display:block;font-size:12px;color:#65718a;font-weight:500;margin:0 0 8px}
.review-page-tree{max-height:270px;overflow:auto;padding-right:3px}
.review-page-tree details{margin:0 0 8px}
.review-page-tree summary{font-size:12px;color:#42516a;padding:5px 0;cursor:pointer}
.review-page-tree ul{list-style:none;padding-left:13px;margin:0 0 0 5px;border-left:1px solid #d8dfee}
.review-page-tree li{position:relative;margin:3px 0}
.review-page-tree li::before{content:'';position:absolute;left:-13px;top:14px;width:10px;border-top:1px solid #d8dfee}
.review-page-tree button{width:100%;text-align:left;padding:5px 7px;border:1px solid transparent;background:#f7f8fb;color:#65718a;cursor:pointer}
.review-page-tree button[aria-pressed=true]{background:#e9eeff;border-color:#aebdeb;color:#3b57af}
body[data-template-library-ui] .review-tree-columns .review-binding-tree{max-height:270px!important}
.review-tree-columns .review-binding-tree ul{margin-left:5px;padding-left:10px}
.review-tree-columns .review-binding-tree ul>.review-binding-node::before{left:-10px;width:8px}
.review-tree-columns .review-binding-node>button{gap:5px;flex-wrap:wrap}
.review-tree-columns .review-binding-node>button>small{font-size:9px}
.review-tree-columns .review-cross-page{font-size:9px}
@media(max-width:1240px){.review-tree-columns{grid-template-columns:1fr}.review-page-tree{max-height:180px}}
.review-unified-tree{max-height:350px;overflow:auto;padding:2px 4px 2px 0}
.review-unified-tree details{margin:0 0 10px}
.review-unified-tree summary{font-size:12px;font-weight:600;color:#46546d;padding:6px 0;cursor:pointer}
.review-unified-tree ul{list-style:none;margin:0 0 0 7px;padding:0 0 0 15px;border-left:1px solid #d8dfee}
.review-unified-tree li{position:relative;margin:4px 0}
.review-unified-tree li::before{content:'';position:absolute;left:-15px;top:15px;width:13px;border-top:1px solid #d8dfee}
.review-unified-tree button{display:block;width:100%;text-align:left;padding:6px 9px;border:1px solid transparent;background:#f7f8fb;color:#55647d;cursor:pointer}
.review-unified-tree button[aria-pressed=true]{background:#e9eeff;border-color:#aebdeb;color:#3b57af}
.review-unified-tree .review-cross-binding{font-size:11px;color:#687fb6;background:transparent;padding:4px 9px}
.review-unified-tree button:hover{background:#edf1fb}
.review-unified-tree .review-child-pages{margin:8px 0 0 8px;padding:0 0 0 18px;border-left:2px solid #c8d2ed}
.review-child-pages>small{display:block;font-size:10px;color:#7c8eb5;margin:5px 0}
.review-child-pages>details{position:relative}
.review-child-pages>details::before{content:'';position:absolute;left:-18px;top:14px;width:15px;border-top:2px solid #c8d2ed}
.review-page-binding-reason,.review-page-reference{font-size:10px;color:#7285ac;line-height:1.5;margin:0 0 5px}
body[data-template-library-ui] .review-unified-tree{max-height:400px}
.review-page-graph{overflow-x:auto;padding:0 0 10px}
.review-page-graph-inner{display:flex;gap:26px;position:relative;padding-top:74px;box-sizing:border-box;min-width:100%}
.review-page-arrows{position:absolute;top:0;left:0;width:100%;height:80px;overflow:visible}
.review-page-column{flex:0 0 180px;min-width:0}
.review-page-column>header{font-size:13px;font-weight:600;text-align:center;padding:9px 0;background:#f0f3fa;color:#526685;border-top:2px solid #adbbd8;border-radius:4px}
.review-page-column>header.is-current-page{background:#eaf0ff;color:#3f5aaf;border-top-color:#587ad1}
.review-page-parent{display:block;text-align:center;font-size:10px;color:#8b95a5;margin:6px 0 12px}
.review-page-column ul{list-style:none;margin:0;padding:0}
.review-page-column ul ul{margin-left:7px;padding-left:11px;border-left:1px solid #d5ddec}
.review-page-column li{position:relative;margin:5px 0}
.review-page-column ul ul>li::before{position:absolute;content:'';left:-11px;top:13px;width:9px;border-top:1px solid #d5ddec}
.review-page-column button{width:100%;text-align:left;font-size:11px!important;padding:6px 8px;background:#f7f8fb;color:#627189;border:1px solid transparent;cursor:pointer}
.review-page-column button.is-linked{background:#f0f4ff;border-color:#dbe4fa}
.review-page-column button[aria-pressed=true]{background:#e8efff;color:#3e58a2;border-color:#a8bae9}
.review-slot-binding{display:block;font-size:10px;color:#7a8cb4;padding:3px 2px 5px;line-height:1.5}
.review-page-arrows{height:112px;pointer-events:none}
.review-page-graph-inner{padding-top:30px}
.review-page-arrows{height:68px}
.review-slot-arrows{position:absolute;inset:0;pointer-events:none;z-index:3;overflow:visible}
.review-page-column .review-slot-binding{font-size:11px;color:#5f79a7}
.review-page-column button[aria-pressed=true]{box-shadow:inset 3px 0 #4c73c9}
.review-page-arrows{opacity:.45}
.review-page-column button.is-linked{border-color:#aabfe4;color:#456798;background:#edf3ff}
.review-expand-relations{float:right;width:auto!important;padding:4px 8px!important;font-size:11px!important;border:0!important;background:transparent!important;color:#526caa!important;cursor:pointer}
.review-relations-fullscreen{position:fixed;inset:16px;width:calc(100vw - 32px);height:calc(100dvh - 32px);max-width:none;max-height:none;box-sizing:border-box;margin:0;padding:24px 32px;border:0;border-radius:10px;background:#fff;color:#334158;overflow:hidden}
.review-relations-fullscreen::backdrop{background:#17213555}
.review-relations-fullscreen>header{display:flex;align-items:center;justify-content:space-between;gap:20px}
.review-relations-fullscreen>header>strong{font-size:18px}
.review-relations-fullscreen>header>button{padding:8px 14px;background:white;border:1px solid #dce2ed;border-radius:6px;color:#566982;cursor:pointer}
.review-relations-fullscreen>p{font-size:12px;color:#8290a3;margin:16px 0 24px}
.review-relations-fullscreen>.review-page-graph{height:calc(100% - 100px);overflow:auto}
.review-relations-fullscreen .review-page-graph-inner{min-width:0}
.review-relations-fullscreen .review-page-column>header{font-size:15px}
.review-relations-fullscreen .review-page-column button{font-size:13px!important;line-height:1.5;padding:10px 8px;white-space:normal}
.review-relations-fullscreen .review-page-parent,.review-relations-fullscreen .review-slot-binding{font-size:12px}
.review-field-picker>.review-page-graph>.review-page-graph-inner:has(.review-page-column:only-of-type){min-width:0}
.review-relations-fullscreen .review-page-graph-inner{width:100%!important;min-width:calc(var(--review-page-count)*300px)!important;gap:32px;align-items:start;padding:16px 0 32px}
.review-relations-fullscreen .review-page-column{flex:1 0 268px}
.review-relations-fullscreen .review-page-arrows{display:none}
.review-full-slot-text{font-size:12px;line-height:1.7;color:#778399;white-space:pre-wrap;margin:6px 8px 12px}
.review-field-picker .review-full-slot-text{display:none}
.review-relations-fullscreen .review-page-column>header{padding:12px}
.review-relations-fullscreen .review-page-column button{font-weight:500}
.review-full-hierarchy{height:calc(100% - 110px);overflow:auto;padding:0 20px 24px 0;box-sizing:border-box}
.review-hierarchy-page{margin:0 0 20px;min-width:0}
.review-hierarchy-page>summary{display:list-item;cursor:pointer;padding:12px 16px;background:#eef2fa;border-radius:5px;color:#4b638c}
.review-hierarchy-page>summary strong{font-size:16px;margin-right:18px}
.review-hierarchy-page>summary span{font-size:12px;color:#7b8ca8}
.review-hierarchy-content{list-style:none;padding:0 0 0 20px;margin:14px 0 14px 18px;border-left:1px solid #d4ddef}
.review-hierarchy-content>li{position:relative;padding:0 0 12px;margin:8px 0}
.review-hierarchy-content>li::before{content:'';position:absolute;left:-20px;top:16px;width:17px;border-top:1px solid #d4ddef}
.review-hierarchy-content button{font-size:13px;border:1px solid transparent;background:#f7f8fb;border-radius:5px;color:#4d6081;padding:8px 12px;text-align:left;cursor:pointer}
.review-hierarchy-content button[aria-pressed=true]{border-color:#a8bae9;background:#eaf0ff;color:#3c5dae}
.review-hierarchy-binding{font-size:12px;color:#5879b3;margin:8px 12px}
.review-hierarchy-text{font-size:13px;line-height:1.7;color:#69768a;white-space:pre-wrap;margin:8px 12px;max-width:900px}
.review-hierarchy-child-pages{margin:16px 0 0 28px;padding-left:28px;border-left:2px solid #aebfe1}
.review-hierarchy-child-pages>small{display:block;color:#7e91b3;font-size:12px;margin:0 0 10px}
.review-hierarchy-child-pages>.review-hierarchy-page{position:relative}
.review-hierarchy-child-pages>.review-hierarchy-page::before{content:'';position:absolute;left:-28px;top:22px;width:25px;border-top:2px solid #aebfe1}
.review-hierarchy-reference{color:#7489ad;font-size:12px;margin:12px}
.review-actual-graph{height:calc(100% - 110px);overflow:auto;padding:12px 4px 28px;box-sizing:border-box}
.review-actual-graph-inner{display:grid;gap:40px 60px;align-items:start;position:relative;min-width:100%;width:max-content;box-sizing:border-box}
.review-actual-page{min-width:0;max-width:520px}
.review-actual-page>header{font-size:15px;font-weight:600;color:#64738a;padding:13px 14px;background:#f1f4f9;margin:0 0 28px;border-radius:5px;text-align:center}
.review-actual-node{margin:0 0 18px}
.review-actual-node>button{display:block;width:100%;padding:12px 14px;text-align:left;border:1px solid #dbe4ed;border-radius:6px;background:white;cursor:pointer}
.review-actual-node>button small{display:block;color:#8493a5;font-size:11px;margin:0 0 8px}
.review-actual-node>button>span{display:block;white-space:pre-wrap;font-size:14px;line-height:1.7;color:#405775}
.review-actual-node>button[aria-pressed=true]{border-color:#97b3e5;background:#f5f8ff}
.review-actual-children{padding:22px 0 0 34px}
.review-actual-graph-inner>svg{position:absolute;inset:0;pointer-events:none;overflow:visible}
.review-category-layout{gap:32px 44px}
.review-category-column{display:flex;flex-direction:column;gap:18px;max-width:none}
.review-category-column>header{background:transparent;font-size:12px;font-weight:500;color:#8593a9;margin:0 0 4px;padding:5px;text-align:left}
.review-category-column .review-actual-node{margin:0}
.review-content-category{display:block;font-size:14px;color:#405d85;margin:0 0 6px}
.review-category-column .review-actual-node>button small{font-size:10px;margin-bottom:12px}
.review-category-column .review-actual-node>button>span{border-top:1px solid #edf0f5;padding-top:10px;font-size:13px}
.review-explicit-binding{margin-top:14px;padding:10px 0 0;border-top:1px dashed #cfd9e9}
.review-category-column .review-actual-node>button .review-explicit-binding small{font-size:11px;color:#486aa3;margin:0 0 6px}
.review-explicit-binding>span{display:block;font-size:12px;line-height:1.6;white-space:pre-wrap;color:#58749f}
/* Relationships remain visible in both configuration and applied preview modes. */
body[data-template-library-ui] .模板工作台[data-review-mode=effect] .模板右栏{visibility:visible!important}
body[data-template-library-ui] .模板工作台[data-review-mode=effect] .review-field-picker .review-full-slot-text{display:block!important}
body[data-template-library-ui] .模板工作台[data-review-mode=effect] .review-field-picker .review-page-graph{max-height:calc(100dvh - 430px);overflow:auto}
/* Both modes show every page horizontally; fullscreen provides the overview. */
body[data-template-library-ui] .review-field-picker .review-page-graph{max-height:clamp(120px,20dvh,180px);overflow:auto}
body[data-template-library-ui] .review-field-picker .review-page-column button{white-space:pre-wrap;line-height:1.6}
/* Actual text is already in the selectable node; avoid repeating it below. */
body[data-template-library-ui] .模板工作台 .review-field-picker .review-full-slot-text{display:none!important}
.review-relation-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.review-relation-heading>strong{font-size:13px;font-weight:600;color:#334158}
.review-relation-actions{display:flex;gap:4px;flex-shrink:0}
.review-relation-actions>button{font-size:11px!important;padding:4px 7px!important;background:transparent!important;border:0!important;color:#64799e!important;cursor:pointer}
.review-relation-actions>button:hover{background:#eff3fb!important}
.review-relation-actions>button:last-child{color:#4265af!important}
.review-field-picker.relations-collapsed>:not(.review-relation-heading){display:none!important}

/* Empty state uses the same library, template and functional regions. */
.背景库默认说明{padding:20px 4px;color:#8a94a4;font-size:12px}.背景库模板占位{width:100%;aspect-ratio:3/4;background:#f3f5f8;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#9aa4b4;gap:12px}.背景库模板占位 span{font-size:18px}.背景库模板占位 small{font-size:12px}
.背景库素材选择{width:100%;margin-top:auto;padding-top:18px;border-top:1px solid #edf0f4}.背景库素材选择>header{display:flex;justify-content:space-between;gap:10px;align-items:center}.背景库素材选择 h3{font-size:13px;margin:0}.背景库素材选择 header p{font-size:11px;color:#8893a4;margin:6px 0}.背景库素材选择>header button{white-space:nowrap;border:1px solid #cad7ed;border-radius:6px;padding:8px 12px;background:#f3f7ff;color:#3564a9;cursor:pointer}.背景库素材选择 input[type=search]{margin-top:12px;width:100%;padding:8px 12px;box-sizing:border-box}
.背景库素材列表{display:flex;gap:12px;overflow-x:auto;padding:12px 1px;max-height:220px}.背景库素材列表>p{font-size:12px;color:#7b8798}.背景库素材卡{flex:0 0 124px;text-align:left;background:transparent;border:1px solid transparent;border-radius:6px;padding:6px;color:#425168;cursor:pointer}.背景库素材卡[aria-pressed=true]{border-color:#6892cd;background:#f4f8ff}.背景库素材卡 img,.背景库素材无图{display:block;width:110px;height:96px;object-fit:cover;border-radius:3px;background:#f1f3f6}.背景库素材卡 strong{display:block;font-size:12px;margin:8px 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.背景库素材卡 small{font-size:11px;color:#8a95a5}.背景库素材转换详情 .素材架构转换操作{display:block}.背景库素材转换详情:empty{display:none}
body[data-template-library-ui] [data-template-empty] .review-page-graph-inner{min-height:0}body[data-template-library-ui] [data-template-empty] .模板主编辑区>header{display:none}

/* Functional groups stay expanded and share the available horizontal space. */
body[data-template-library-ui] .模板右栏 [data-review-disclosure]{display:none!important}
body[data-template-library-ui] .模板右栏 .模板检查器分组.review-collapsed>:not(header){display:block!important}
body[data-template-library-ui] .模板右栏 .review-template-info{margin:8px 0;border:0;padding:0}
body[data-template-library-ui] .模板右栏 .review-template-info summary{display:none}
body[data-template-library-ui] .模板右栏 .当前文字区域卡{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px 20px!important}
body[data-template-library-ui] .模板右栏 .当前文字区域卡>:is(header,.模板内容设置){grid-column:1/-1!important}
body[data-template-library-ui] .模板右栏 .当前文字区域卡>:is(.模板内容合同设置,.模板双结构说明){grid-column:auto!important}
body[data-template-library-ui] .模板右栏 .模板内容设置{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:18px!important}
body[data-template-library-ui] .模板右栏 .模板内容设置>header{grid-column:1/-1}
body[data-template-library-ui] .模板右栏 .模板内容设置>.模板字段网格{grid-column:1/-1}
body[data-template-library-ui] .模板右栏 [data-filled-slot-content]{min-height:96px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;font-size:13px;color:#37445b;padding:10px 0}
body[data-template-library-ui] .模板右栏 [data-filled-slot-count]{display:block;font-size:11px;color:#8993a3;margin-top:4px}
body[data-template-library-ui] .模板右栏 .模板预览文字编辑 textarea[hidden]{display:none!important}
@media(max-width:700px){body[data-template-library-ui] .模板右栏 .当前文字区域卡,body[data-template-library-ui] .模板右栏 .模板内容设置{grid-template-columns:1fr!important}}

/* Reclassify the controls without collapsible subsections. */
body[data-template-library-ui] .模板右栏 .模板内容设置{display:block!important}
body[data-template-library-ui] .模板右栏 .当前文字区域卡>.review-content-binding{grid-column:1/-1!important}
body[data-template-library-ui] .模板右栏 .review-content-binding>.模板字段网格{grid-template-columns:repeat(3,minmax(0,1fr))!important}
body[data-template-library-ui] .模板右栏 .review-content-binding>.模板内容合同设置{padding:8px 0 0!important;border:0!important}
body[data-template-library-ui] .模板右栏 .模板内容合同设置>:is(header,pre,code,p){display:none!important}
body[data-template-library-ui] .模板右栏 .模板布局设置>.模板版式绑定设置{border:0!important;padding-bottom:0!important}
body[data-template-library-ui] .模板右栏 .模板版式绑定设置>header{display:none!important}
body[data-template-library-ui] .模板右栏 details>summary{display:none!important}
body[data-template-library-ui] .模板右栏 .review-template-metadata .模板功能字段{display:grid;grid-template-columns:1fr;gap:10px}
body[data-template-library-ui] .模板右栏 .review-template-metadata .模板内容结构折叠{display:none!important}
body[data-template-library-ui] .模板右栏 .当前文字区域卡>header{order:0}

/* One category per row; its child fields run horizontally. */
body[data-template-library-ui] .模板右栏 .当前文字区域卡{display:flex!important;flex-direction:column!important;gap:10px!important}
body[data-template-library-ui] .模板右栏 .当前文字区域卡>.模板检查器分组{width:100%!important;box-sizing:border-box!important;padding:10px 0!important}
body[data-template-library-ui] .模板右栏 .模板检查器分组 .模板字段网格,body[data-template-library-ui] .模板右栏 .review-content-binding>.模板字段网格,body[data-template-library-ui] .模板右栏 .review-template-metadata .模板功能字段{display:grid!important;grid-auto-flow:column!important;grid-auto-columns:minmax(104px,1fr)!important;grid-template-columns:none!important;gap:10px!important;overflow-x:auto!important;padding-bottom:4px!important;align-items:start!important}
body[data-template-library-ui] .模板右栏 .模板字段网格>label{grid-column:auto!important;min-width:0!important;width:auto!important}
body[data-template-library-ui] .模板右栏 .模板内容设置{display:block!important}
body[data-template-library-ui] .模板右栏 [data-filled-slot-content]{min-height:48px!important;padding:6px 0!important}
body[data-template-library-ui] .模板右栏 .模板内容合同设置 textarea{min-height:52px!important}
body[data-template-library-ui] .模板右栏 .review-field-picker .review-page-graph:has(.review-page-graph-inner:empty){display:none!important}

body[data-template-library-ui] .模板右栏 .模板检查器分组[hidden],body[data-template-library-ui] .review-page-graph[hidden]{display:none!important}
body[data-template-library-ui] .模板右栏 .模板检查器分组>header{margin:0 0 8px!important;padding:0!important;min-height:0!important}
body[data-template-library-ui] .模板右栏 .review-content-binding .模板字段网格>label:has(textarea){min-width:170px}
body[data-template-library-ui] .模板右栏 .review-content-binding textarea{min-height:32px!important;height:32px!important}
body[data-template-library-ui] .模板右栏 .模板检查器分组 label{margin:0!important}
body[data-template-library-ui] .review-field-picker:has(.review-page-graph[hidden]){min-height:0!important;padding-bottom:8px!important}
body[data-template-library-ui] .review-field-picker:has(.review-page-graph[hidden]) .review-binding-hint{display:none!important}

/* Align the right functional heading with the left library heading. */
@media(min-width:940px){
 body[data-template-library-ui] .模板工作台[data-review-mode=edit] .模板右栏{margin-top:var(--review-edit-top,0px)!important}
 body[data-template-library-ui] .模板工作台[data-review-mode=effect] .review-function-dock{margin-top:var(--review-effect-top,0px)!important}
}

body[data-template-library-ui] .review-preview-heading{display:block!important;width:100%;flex:0 0 100%;margin:0 0 8px!important;padding:0!important}
body[data-template-library-ui] .review-preview-heading strong{font-size:14px;font-weight:600;color:#29344b}
body[data-template-library-ui] .review-preview-heading p{font-size:12px;line-height:1.7;color:#7a8496;margin:7px 0 0}

/* Empty legacy save footer must not reserve a white panel. */
body[data-template-library-ui] .模板右栏 .模板保存区{min-height:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
body[data-template-library-ui] .模板右栏 .模板保存区:has(>.模板保存状态:empty):not(:has(> :not(.模板保存状态))){display:none!important}

/* The desktop template editor owns the viewport; each panel owns its overflow. */
body[data-template-library-ui] #环节轨道 .模板右栏 :is(.模板主编辑区,.模板文字区域标签内容,.模板文字层面板,.模板当前槽位编辑器,.review-field-picker) {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

body[data-template-library-ui] #环节轨道 .模板右栏 :is(.模板主编辑区,.模板文字层面板) {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 940px) {
  body[data-template-library-ui][data-lg-navigation-ready] #功能页面:has(.模板工作台),
  body[data-template-library-ui][data-lg-navigation-ready] #功能页面 #环节画布:has(.模板工作台) {
    overflow: hidden !important;
  }

  body[data-template-library-ui][data-lg-navigation-ready] #环节轨道:has(.模板工作台),
  body[data-template-library-ui][data-lg-navigation-ready] #环节轨道 :is(.课程生产工作台,.课程生产主区,.课程生产工作区):has(.模板工作台),
  body[data-template-library-ui] #环节轨道 :is(.模板工作台,.模板内容工作区) {
    height: 100% !important;
    min-height: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body[data-template-library-ui] #环节轨道 .课程生产工作台:has(.模板工作台),
  body[data-template-library-ui] #环节轨道 .模板工作台 {
    grid-template-rows: minmax(0, 1fr) !important;
  }

  body[data-template-library-ui] #环节轨道 .模板左栏 {
    height: 100%;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  body[data-template-library-ui] #环节轨道 .模板内容工作区 {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 54%) !important;
  }

  body[data-template-library-ui] #环节轨道 .review-template-display {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    display: grid !important;
    min-height: 0;
    height: 100% !important;
    overflow: hidden !important;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-items: stretch !important;
    overflow: hidden;
  }

  body[data-template-library-ui] #环节轨道 .review-preview-modes {
    grid-row: 1;
    justify-self: center;
  }

  body[data-template-library-ui] #环节轨道 .review-template-display > .模板画布外框 {
    grid-row: 2;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    align-self: stretch !important;
    overflow: auto !important;
  }

  body[data-template-library-ui] #环节轨道 .review-template-display > :is(.模板分页条,.模板效果分页) {
    grid-row: 3;
    min-height: 0;
    max-height: 132px;
    justify-content: safe center !important;
    overflow: auto;
  }

  body[data-template-library-ui] #环节轨道 .模板内容工作区 > .模板右栏 {
    height: auto !important;
    max-height: none !important;
    margin-top: 0 !important;
    overflow: hidden !important;
  }

  body[data-template-library-ui] #环节轨道 .review-function-dock {
    min-height: 0;
    max-height: 40dvh;
    margin-top: 0 !important;
    overflow: auto;
  }

  body[data-template-library-ui] #环节轨道 .模板右栏 > .模板主编辑区 {
    position: absolute;
    inset: 0;
    height: 100% !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden !important;
  }

  body[data-template-library-ui] #环节轨道 .模板右栏 :is(.review-field-picker,.模板文字区域标签内容,.模板文字层面板,.模板当前槽位编辑器) {
    min-width: 0;
    min-height: 0;
    max-width: 100%;
  }

  body[data-template-library-ui] #环节轨道 .模板文字区域标签内容,
  body[data-template-library-ui] #环节轨道 .模板文字层面板 {
    height: 100% !important;
    overflow: hidden !important;
  }

  body[data-template-library-ui] #环节轨道 .模板文字层面板 {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }

  body[data-template-library-ui] #环节轨道 .模板当前槽位编辑器 {
    overflow: auto;
  }

  body[data-template-library-ui] #环节轨道 .模板右栏 .当前文字区域卡 > header {
    position: sticky !important;
    top: 0;
    z-index: 7;
    background: var(--workbench-surface-panel, #fff);
  }

  body[data-template-library-ui] #环节轨道 .review-field-picker > p {
    max-height: 40px;
    overflow: auto;
  }

  body[data-template-library-ui] #环节轨道 .模板工作台[data-review-mode=effect] .模板主编辑区 {
    grid-template-rows: minmax(0, 1fr);
  }

  body[data-template-library-ui] #环节轨道 .模板工作台[data-review-mode=effect] .review-field-picker {
    height: 100%;
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  body[data-template-library-ui] #环节轨道 .模板工作台[data-review-mode=effect] .review-page-graph {
    height: 100%;
    min-height: 0;
    max-height: none;
  }

  body[data-template-library-ui] #环节轨道 :is(.模板侧栏列表,.模板画布外框,.模板分页条,.模板效果分页,.review-function-dock,.review-page-graph,.模板当前槽位编辑器) {
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #b7c1d1 transparent;
  }

  body[data-template-library-ui] #环节轨道 :is(.模板侧栏列表,.模板当前槽位编辑器) {
    scrollbar-gutter: stable;
  }
}

@media (min-width: 940px) and (max-width: 1240px) {
  body[data-template-library-ui] #环节轨道 .模板内容工作区 {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 55%) !important;
  }
}

[data-template-source-content] .source-content-selector {display:block;max-height:360px;overflow:auto;margin:12px 0;overscroll-behavior:contain;scrollbar-gutter:stable;}
[data-template-source-content] .source-content-selector button{text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:8px;border:1px solid #e2e5ec;border-radius:6px;background:white;}
[data-template-source-content] .source-content-selector button[aria-pressed="true"]{border-color:#6366f1;background:#f1f2ff;}
[data-template-source-content] .source-content-line {display:grid;gap:6px;margin:12px 0;}
[data-template-source-content] textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:64px;padding:10px;font:inherit;}
[data-template-source-content] p{font-size:13px;line-height:1.6;color:#64748b;}
[data-template-source-content] [data-form-status]{color:#9f3a28;}
.模板工作台:has([data-template-source-content]) .模板区域调整手柄,.模板工作台:has([data-template-source-content]) .模板卡片名称,.模板工作台:has([data-template-source-content]) [data-template-component-resize]{display:none!important;}

[data-template-source-content] .source-content-definition{display:grid;grid-template-columns:68px minmax(0,1fr);gap:6px;font-size:13px;line-height:1.5;}
[data-template-source-content] .source-content-definition dt{color:#64748b;}
[data-template-source-content] .source-content-definition dd{margin:0;word-break:break-word;}

[data-template-source-content] > header {
  padding: 12px 12px 0;
  border-radius: 8px 8px 0 0;
  background: var(--workbench-surface-inset, #f3f5f8);
}
[data-template-source-content] .source-content-selector {
  margin: 0;
  padding: 12px;
  border-radius: 0 0 8px 8px;
  background: var(--workbench-surface-inset, #f3f5f8);
  container-type: inline-size;
}
/* Original-image groups remain in their source rows and columns. Only actual
   paragraph parents add a branch; container borders identify the source groups. */
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-rows,
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-columns {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: start;
}
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-node,
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-row {
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-group {
  padding: 6px;
  border: 1px solid var(--workbench-border, #e2e5ec);
  border-radius: 6px;
  background: var(--workbench-surface, #fff);
}
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-group .source-layout-group {
  padding: 0;
  border: 0;
  background: transparent;
}
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-node > button {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 26px;
  margin: 0;
  padding: 4px 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-align: left;
  line-height: 1.45;
  font-size: 12px;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-node > button:is([data-source-role="title"], [data-source-role="heading"]) { font-weight: 600; }
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-node > button[data-source-role="counter"] { text-align: center; }
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-node > button:hover { background: var(--workbench-surface-inset, #f3f5f8); }
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-node > button[aria-pressed="true"] { border-color: #6366f1; background: #f1f2ff; color: #4338ca; }
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-node > button:focus-visible { outline: 2px solid #6366f1; outline-offset: 1px; }
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-branch {
  position: relative;
  margin: 2px 0 0 7px;
  padding-left: 9px;
  border-left: 1px solid #b8c1d1;
}
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-branch > .source-layout-rows > .source-layout-row { position: relative; }
body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-layout-branch > .source-layout-rows > .source-layout-row::before {
  content: '';
  position: absolute;
  top: 13px;
  left: -9px;
  width: 8px;
  border-top: 1px solid #b8c1d1;
}
@container (max-width: 420px) {
  body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-content-selector > .source-layout-rows > .source-layout-row > .source-layout-columns {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
body[data-template-library-ui] #环节轨道 [data-template-source-content] [data-source-content-disclosure] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  min-height: 28px;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}
body[data-template-library-ui] #环节轨道 [data-template-source-content] [data-source-content-disclosure]:hover {
  background: var(--workbench-surface-inset, #f3f5f8);
}
[data-template-source-content] [data-source-content-disclosure]:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: -2px;
}
[data-source-content-collapsed] [data-source-content-disclosure] svg { transform: rotate(180deg); }
[data-template-source-content] > .模板文字层面板 > :is(article, .source-content-function-fields)[hidden] { display: none !important; }

/* Source-content editing has three rows, even when the source panel itself is
   the legacy .模板主编辑区 instead of being nested inside that wrapper. */
@media (min-width: 940px) {
  body[data-template-library-ui] #环节轨道 .模板右栏 .模板原子编辑面板[data-template-source-content] {
    display: grid !important;
    overflow: hidden !important;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  body[data-template-library-ui] #环节轨道 [data-template-source-content] .source-content-selector {
    min-height: 0;
    max-height: min(360px, 36dvh);
    align-content: start;
  }

  body[data-template-library-ui] #环节轨道 [data-template-source-content] > .模板文字层面板 > .source-content-function-fields {
    min-height: 0;
    min-width: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body[data-template-library-ui] #环节轨道 [data-template-source-content] > .模板文字层面板 {
    display: grid !important;
    min-height: 0;
    height: 100% !important;
    overflow: hidden !important;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  body[data-template-library-ui] #环节轨道 [data-template-source-content] > .模板文字层面板 > .模板保存区 {
    grid-row: 3;
  }
  body[data-template-library-ui] #环节轨道 .模板右栏 .模板原子编辑面板[data-template-source-content][data-source-content-collapsed] {
    display: grid !important;
    min-height: 0;
    height: 100% !important;
    overflow: hidden !important;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  body[data-template-library-ui] #环节轨道 [data-source-content-collapsed] > .source-content-selector {
    max-height: none;
  }
  body[data-template-library-ui] #环节轨道 [data-source-content-collapsed] > .模板文字层面板 {
    height: auto !important;
    grid-template-rows: auto 0 auto;
  }
}


/* The relationship tree shares the existing workspace with its configuration. */
body[data-template-library-ui] #环节轨道 .模板主编辑区:has([data-template-source-content]){display:block!important;overflow:hidden!important;}
body[data-template-library-ui] #环节轨道 [data-template-source-content]{height:100%;min-height:0;padding:0 12px 16px;box-sizing:border-box;}
@media(max-width:939px){body[data-template-library-ui] #环节轨道 [data-template-source-content]{display:block;height:auto;overflow:visible;}body[data-template-library-ui] #环节轨道 [data-template-source-content] .模板文字层面板{display:block;height:auto;overflow:visible;}}
body[data-template-library-ui] #环节轨道 .模板工作台[data-review-mode=effect] .review-template-display{display:flex!important;overflow:auto!important;}
body[data-template-library-ui] #环节轨道 .模板工作台[data-review-mode=effect] .review-template-display>.模板画布外框{display:none!important;}
[data-template-source-content] .模板功能字段{display:grid;gap:10px;}
[data-template-source-content] .模板功能字段>label{display:grid;gap:6px;min-width:0;}
[data-template-source-content] .模板功能字段 input,[data-template-source-content] .source-content-capacity-settings input{width:100%;min-width:0;box-sizing:border-box;}
[data-template-source-content] .模板内容结构折叠{margin:12px 0;}
[data-template-source-content] .模板内容结构折叠 ol{list-style:none;padding:0;max-height:220px;overflow:auto;}
[data-template-source-content] .模板内容结构折叠 li{overflow-wrap:anywhere;padding-block:4px;}
body[data-template-library-ui] .模板右栏 [data-template-source-content] .模板内容结构折叠>summary{display:flex!important;gap:8px;}
body[data-template-library-ui] .模板右栏 [data-template-source-content] .source-content-settings .模板字段网格{grid-auto-flow:row!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-columns:auto!important;}
