/* ============================================================================
 * CK-4260-EDITOR-LAYOUT-20260922 · 隔离候选（overlay：放在 uiopt-r6 链之后即整体胜出）
 * 只落实主审四条裁决，纯增量覆写，不修订父树任何一行：
 *  ① 缩略图占满自身高度；名称可隐藏（默认隐、悬停/聚焦浮签，title 常驻 DOM）；左缘与大图后退边对齐
 *  ② 主窗口（编辑器视口暗岛）不再黑块 → 主题 surface token 浅洗（--ed-island 契约第一处翻案）
 *  ③ 工作流未打开：底部缩略条零预留（旧 --preview-composer-width 无 setter=恒 406px 假预留作废）
 *  ④ 打开后才占用：让位与岛同闸走 --ed-wf（开 400 / ≤1000px 340 / .max 420），未开态画布可用宽度不动
 * 边界注记：分屏比较台 .ed-cmp-splitstage 的 --ed-island 是契约第二处，本单不翻；
 *          G5-VIS1-L 闭合缩裹（--ed-fit-w 未发值=恒拉伸）不受触；全文件零硬编码颜色。
 * 落地注记（非本件执行）：「占满自身高度」的槽宽同步须 paintThumbs(JS:2081) TH 闸 92→106 一行发值——
 *          Chrome intrinsic 尺寸通道不认 %-高替换元素加宽（aspect-ratio/!important/attr 三变体实测无效，见 RESULT 坑记），
 *          本 CSS 负责解除 92 钳制与带高填充，二者共同构成终态。
 * ==========================================================================*/

/* —— ② 视口暗岛翻案：墨丸 4% 入白洗出浅面，保留岛缘可辨（纯 token 推导，无字面色） —— */
.editor-layer.ws[data-ed-demo] .ws .ws-canvas {
  background-color: color-mix(in srgb, var(--ink-1) 4%, var(--surface));
}

/* —— ③ 未打开态：缩略条只让工具列（46px）+ 浮窗缝（20px），与岛闭合面完全同宽 —— */
.editor-layer.ws[data-ed-demo] .ws .ed-history {
  left: 12px;   /* ① 对齐大图后退边：岛 inset left=12px（refinement:3922，闭合/打开同值） */
  right: 66px;  /* 顶掉 uiopt-r4:109 / refinement:4717 的 calc(66px|46px + var(--preview-composer-width,340px)) 假预留 */
}
/* —— ④ 打开态：与岛同一变量闸（refinement:3915 + :5156 覆写段），窄屏随 --ed-wf 自动缩 —— */
.editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open] .ed-history { /* 属性在内层 section.ws（main.js:3171 openAttr），与 refinement:3915 同宿主 */
  right: calc(76px + var(--ed-wf));  /* 工具列合计 66 + 条-窗呼吸 10 + 工作流窗宽 */
}

/* ——— CK-4260-HIST-NARROW-OPEN-20261010 · 窄窗打开态「缩略带被输入列整条压住」具名窄修（纯增量，不动上面两行） ———
   实证（360x800，r8 基线，真实手势）：打开态 .ed-history 盒 [86,660,20,120]，cw20 恰为自身左右 padding（10+10），
   右缘由上面 26 行 right:calc(76px + var(--ed-wf)) 推入 ws 内 396px，而 ws 仅 276px ⇒ 内容宽 0；
   同带 .ed-composer [74,628,210,160]（z8，父 .ed-rail z7 均高于条 z6）整条压住：条带盒内 6/6 采样点命中
   textarea（外来节点，非条带后代），真实 Ctrl+点击不触发 handler，两轴滚轮皆惰 ⇒ 该态下历史项不可达。
   修法：把缩略带抬到输入列上缘之上；取值与 .ed-composer 自身 min-height:clamp(150px,20vh,200px) 同源 +10px 呼吸。
   **门值 494px 的实测依据（本票 verify-base 逐 1px 扫 470→502；判据 = 不加任何程序化 scrollLeft 时，
   项「夹心可见窗口中心」的 elementFromPoint 顶层节点是否为项自身）**：vw ≤ 497 ⇒ 顶层恒为 div.ed-composer
   （composer.left=vw−396 ≤ 采样点 x=101 故压住）；vw ≥ 498 ⇒ 顶层变为 button.ed-hist-item（composer.left=vw−396
   ≥102 > 101）。即名义无滚遮挡边界是 **497/498**。本修取 494 = 该带上「无滚顶层遮挡」与「真实无预滚 Ctrl+点击 0/5」
   两个判据同时成立的最大宽度；495–501 段的条带仍是 20px 退化缝（cw=20、内容宽 0、无缩略图可见），其点击命中共 4/5
   只在本仪器 CLICK 的预滚 scrollLeft **之后**才出现——该预滚正是本票合同禁止当作可达性依据的程序化滚动，
   故不据此扩大门值。**此处不假称「某一像素起全部可达」**。
   **495–640 段本票留置（现状与后续收口见下方 20261011 块）**：cw = max(20, vw−492)，vw ≤ 512 恒 20，
   该带当时另行具名，未纳入本修。
   **470x800 列表态落点实测（元素级清点，非推算）**：creation-choice 占 y50..339，输入列 textarea 起于 y646，
   工具轨 x411..443；抬升带 [86,500,308,120]（right:66px ⇒ 右缘 ws.right−66=394 < 411）整体落在 x86..394 × y340..645
   的控件空白矩形内 ⇒ 覆盖 0 个交互控件（本票 verify 基线/candidate 双腿均 coveredN=0，面板控件 own 命中全保留）。
   471–494 同构（面板右锚定 320 宽，y 布局不变；条右缘 vw−76 仍 < 工具轨 vw−59）。
   **诚实边界**：clamp 只是 min-height，不等于该列实测高度恒等；实测 360x800/470x800 两个面板子态该列 bbox 均
   [74,628,210,160] / [74,628,320,160]（=min-height 生效值），故几何不相交（重叠面积 2400px²→0）；
   若未来该列因内容长高到 min-height 以上，本规则不保证不相交，此处不假称「所有高度皆完美」。
   **详情态 = 本票冻结的具名结构缺口（未修，不假称已修）**：470x800 详情态实测 tile 行 y109..445、
   .ed-wf-foot [86,410,296,198] 内含 y420..445（生成张数）、y534..589（API生成ComfyUI/执行/自动/设置）、
   输入列 y646..780 ⇒ 左列 y109..608 全满，唯一空白带仅 y589..645(57px) 与 y40..84(44px)，均 < 120px 条高；
   现结构内不存在 120px 高 × 可用宽的控件空白带 ⇒ 纯 CSS 无法在不覆盖配方控件的前提下安置条带。
   该态条带保持 r8 几何（被输入列压住，指针不可达），仅键盘 Tab 可达（实测整圈含 HIST0/-1/1/2/3）。
   闭合态 :not([data-ed-wf-open]) 与 ≥495px 零生效 ⇒ 闭合条内部滚动/缩略图形制（含编辑器其余规则）逐字节不变。 */

/* ——— CK-4260-HIST-MIDWIDTH-20261011 · 495/560/640 代表宽度 + 长 composer 内容态实测，及「只改门值」扩围 ———
   目标：按**容器预算**收口上段留置的 495–640 退化缝，而不是继续放大门值掩盖内容问题。
   **预算推导（可复算）**：打开态条带内容宽 cw = max(20, vw−492)（实测 495/560/640/470 ⇒ cw 20/68/148/20，盒
   [86,660,20,120]/[86,660,68,120]/[86,660,148,120] 逐项相符）；单个历史项实测宽 158px（DOM 序 0/-1/1/2/3，
   项间 8px）⇒ **能容下完整一项的最小宽度 = 492 + 158 = 650** ⇒ 门值取 649。
   **495 默认位实测（真实手势；不施加任何程序化 scrollLeft）**：条带与输入列盒相交 840px²，最新项可见窗仅
   **2px**（项盒 [96,664,158,108]，自由带 x86..98），其余四项 0px ⇒ 默认位只有 2px 可点。
   560/640 默认位可见窗 57/137px，实轮滚入后各项 own 命中且真实点击可选中 ⇒ 该两宽已可用，本修不改其几何。
   **修法 = 只改门值 494 → 649，块内三条声明逐字节不动**（与 r11→r2 同法：声明不变则 <495 的 computed style
   不变，既有 r12 证据与 <495 布局继续有效）；:has(.ed-wf-panel[data-wf-view="list"]) 保留。
   同一仪器基线/候选双腿实测：495 列表态条带 [86,500,333,120]（cw 333），最新项可见窗 2 → 158px，560/640 同向；
   **coveredN 0/63·0/63·0/64（覆盖交互控件 0）**，prompt/send own 命中全真，文档无溢出，pageerror 0。
   **本修不覆盖（实测具名，不假称已修）**：
   ① **详情态**：在 :has(list) 之外，抬升带与该态 .ed-wf-foot（内含 y534..589 的 API生成ComfyUI/执行/自动/设置
      等）相交。同一仪器把本规则**在详情态也放开**实测：495/560/640 各覆盖 **14** 个交互控件（360 为 11）⇒ 故不放开。
      详情态保持 r8 几何：495 时 cw 20、与输入列相交 840px²、默认位五项可见窗 0px；360 详情态实测条带中心
      elementFromPoint = textarea ⇒ 真实滚轮被输入列夺走（条带自身 scrollLeft 不动）。该态仅键盘 Tab 可达
      （实测整圈 HIST0/-1/1/2/3）。结构缺口与 r12 冻结结论一致：现结构内无 120px 高 × 可用宽的控件空白带。
   ② **内容增长**：长提示词真实键入（470 列表态，fill + type 30 行）⇒ 输入列 160 → 181（盒 [74,607,320,181]），
      与抬升带相交 **4004px²**，五项可见窗全 0（真实滚轮仍可滑 sl 0→513，但带内无点可命中、点击 handler 不触发）。
      = 上段「clamp 只是 min-height，不等于该列实测高度」边界的实测化：本规则按该列 min-height 取值，内容长高后
      可被重新压住；不改动输入列声明则无纯 CSS 解（本票不改输入列声明）。
   闭合态 :not([data-ed-wf-open]) 零生效 ⇒ 闭合条逐字节不变。 */
@media (max-width: 649px) {
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="list"]) .ed-history {
    right: 66px;                                    /* 与闭合态同值：条带恢复可滚动宽（overflow-x:auto 合同不变） */
    bottom: calc(clamp(150px, 20vh, 200px) + 10px); /* 抬到输入列上缘之上：与该列自身 min-height 同源取值 */
    z-index: 8;                                     /* 仅盖过 .ed-rail(z7) 底色；与输入列无几何重叠故不抢位 */
  }
}

/* R2 correction: keep settings in their own bounded scroller so the prompt
   retains a reachable 120px body in narrow detail mode. */
.editor-layer.ws[data-ed-demo] .ws .ed-composer {
  min-height: 120px;
  max-height: min(62vh, 460px);
  display: flex;
  flex-direction: column;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-config-mount {
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-config {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  max-height: min(38vh, 300px);
  overflow: auto;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-group {
  display: flex;
  flex: 1 1 30%;
  flex-wrap: wrap;
  align-items: center;
  min-width: 180px;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-group h4 {
  flex: 0 0 auto;
  margin-right: 5px;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-parameters {
  flex: 1 1 100%;
  min-width: 0;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-parameters .ed-cfg {
  flex: 1 1 100%;
  min-width: 0;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer .ed-c-body {
  flex: 0 0 120px;
  min-height: 120px;
}
@media (max-width: 649px) {
  .editor-layer.ws[data-ed-demo] .ws .ed-composer {
    min-height: 120px;
    max-height: min(62vh, 440px);
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-composer-config {
    max-height: min(36vh, 240px);
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-composer-group {
    flex-basis: 100%;
    min-width: 0;
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-composer-parameters {
    flex-basis: 100%;
  }
}

/* ——— CK-4260-HIST-DETAIL-BUDGET-20261011 · 详情态 ≤649 空间预算（纯增量；上两块的列表态声明逐字节不动）———
   本票（work/b-history-detail-composer-budget-20261011）只修两个已复现缺口，实测与结论如下。
   **① 详情态指针不可达（本块修）**：≤649 详情态不命中上面 :has(list) 闸，条带维持 r8 几何。
   实测（真实手势，无程序化 scrollLeft）495/470/360 详情态条带盒均 [86,660,20,120]（cw=20，=自身左右 padding），
   与输入列盒相交 840/2400/2400px²；**470/360 条带中心 elementFromPoint 顶层 = textarea（输入列）**⇒真实水平
   滚轮被输入列夺走（条带 scrollLeft 不动），REAL 两项 own 0/2、真实效果 0/2（applySwitch 零调用、confirm.target 未变）
   ⇒ 该态历史项指针不可达，与 r12/r15 冻结结论同源。495 仅因自由带余 ~9px 才 2/2，仍是 20px 退化缝（无缩略图可见）。
   **② 长 composer（结论更正，不改任何声明）**：上块 ② 记「470 列表态 refs+30 行长提示词 ⇒ 输入列 160→181、
   与带相交 4004px²、五项可见窗全 0、带内无点可命中」。本票改用**浏览器命中测试**复测同一状态：
   条带自身盒内 6×12=72 点采样，**71 点顶层为真实 .ed-hist-item**（余 1 点为条带底色）、输入列 0 点；
   REAL 两项 own 2/2、真实效果 2/2（applySwitch idx=2 真实完成）。即 4004px² 只是盒相交：两元素同 z 而条带在
   DOM 后 ⇒ y607..620 段实际由条带绘制在上（命中测试在该段 y=610 返回项，非输入列）。该段内**逐控件命中
   测试 coveredN 0/59**（无交互控件被遮）⇒ 该项**不是可达性缺口**；旧结论源于「任意垂交即整条横切」的判据
   + 未计绘制序，本票不继承、也不为此改任何声明。
   **修法（详情态空间预算：不搬条带，用局部 flex/max-height 把带腾出来）**：
   ① .ed-rail 下缘抬到 H−161 ⇒ 左列（面板+输入列）止于带上方（条带上缘 H−151，10px 呼吸）；
   ② 输入列钉回 A5 设计高 120px（refinement.css:4547 原始 flex:0 0 120px / height:120px 值）⇒ 参考行与长提示词
      只在列内滚动，不再长高挤压条带；③ 面板正文 flex:1 1 0（basis 0，不是 auto）⇒ 正文独占剩余空间自滚，
      foot 按 820 高块给的自身 flex-shrink 收进既有滚动口；④ 条带落入 [H−151, H−63]（下缘距画布底栏 y≈H−53 有 10px）。
   同一仪器（注入同一 CSS 文本，非源改）实测 495/470/360 详情态：条带 [86,607,333/308/198,120]（cw 333/308/198），
   默认位可见窗 158/158·131/131·21/21px，coveredN 0/61·0/61·0/59，REAL 两项 own 2/2、效果 2/2，
   正文 ch 60 可滚（sh 760）、foot 盒 187 自身无溢出（sh=ch=186），执行/设置 own 命中（「参数」在 DOM 中不存在，
   按真实标签记为缺，不以推测补），prompt/send own，文档无溢出（doc 495/470/360 = vw），pageerror 0。
   同一注入在列表态四条腿（495/470/470+refs/360）与基线**逐项相同**（条带盒、cw、输入列 160/181、own/效果、coveredN 全同）
   ⇒ 本块只对详情态生效。闭合态 :not([data-ed-wf-open]) 与 ≥650px 零生效。
   **诚实边界**：本修把左列压短 191px（正文 200→60、输入列 160→120、foot 198→187），是「正文可见行数」换
   「条带可用宽度」的有意取舍——正文须滚动才看全（sh 760/ch 60）；相对 r8~r15 详情态（cw 20、REAL 0/2）为净改善，
   但**不假称正文一眼可见全、也不假称 470/360 详情态以外宽度同样良好**。 */
@media (max-width: 649px) {
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="detail"]) .ed-rail {
    bottom: 161px;                                  /* ⑪ 带高 120→88（refinement.css:4056）⇒ 带上缘 H−183→H−151；
                                                       仍取「带上缘 + 10px 呼吸」= 161，保护本条既有语义（左列止于带上方、不压条带） */
  }
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="detail"]) .ed-composer {
    flex: 0 0 auto;
    min-height: 120px;                              /* 钉回 A5 设计高；参考行/长提示词只在列内滚动 */
    max-height: 120px;
  }
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="detail"]) .ed-wf-mount .ed-wf-body {
    flex: 1 1 0;                                    /* basis 0：正文独占剩余并自滚，不连坐 foot */
    min-height: 60px;                               /* 正文可读下限；foot 由自身 flex-shrink 收进滚动口 */
  }
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="detail"]) .ed-history {
    right: 66px;                                    /* 与闭合态/列表态同值（overflow-x:auto 合同不变） */
    bottom: 63px;                                   /* 带下缘 H−63：距画布底栏 y≈H−53 留 10px */
    z-index: 8;
  }
}

/* —— ① 缩略带占满自身高度 + 名称可隐藏 —— */
.editor-layer.ws[data-ed-demo] .ws .ed-hist-item {
  position: relative;       /* 浮签定位父；带高由 strip align-items:stretch 供（120−pad12=108） */
  flex-basis: max-content;  /* 占满后 canvas 等比实宽（如 21:9→246px）晚于 content 基线解析，旧 flex:0 0 auto 按固有 200 出槽会压叠邻项——宽轴一并占满 */
}
.editor-layer.ws[data-ed-demo] .ws .ed-hist-thumb { flex: 1 1 auto; min-height: 0; }
.editor-layer.ws[data-ed-demo] .ws .ed-hist-thumb canvas {
  height: 100%;        /* 占满自身高度=内容带 108（旧「max-height:92 与 JS TH=92 同闸」R7-02 档作废） */
  width: auto;         /* 替换元素定高+宽自动=按固有纵横等比，零畸变 */
  max-height: none;    /* 92 上限随占满裁决退场 */
  max-width: none;     /* 200 宽钳一并退场：宽图自然加宽，由条既有 overflow-x:auto 承接（合同不变） */
  background-color: var(--surface); /* #10130f 黑底（refinement:4090）→ 主题面；圆角残角即唯一留白 */
}
.editor-layer.ws[data-ed-demo] .ws .ed-hist-label {
  display: none;       /* 名称默认隐藏；DOM 常驻（title 属性同项已有——edHistoryHtml:1081） */
  position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  z-index: 2; pointer-events: none;
  background: var(--surface-soft); color: var(--ink-1);
  border: 1px solid var(--hairline); border-radius: var(--r-pill);
  padding: 1px 8px; font-size: 11px; line-height: 1.4; white-space: nowrap;
  box-shadow: var(--sh-rest);
}
.editor-layer.ws[data-ed-demo] .ws .ed-hist-item:hover .ed-hist-label,
.editor-layer.ws[data-ed-demo] .ws .ed-hist-item:focus-visible .ed-hist-label { display: block; }

/* Total dialog width = fitted image viewport + the actual left/right panel insets. */
.editor-layer.ws[data-ed-demo]:not(.max) .ws {
  width: var(--ed-dialog-w, min(340px, calc(100vw - 20px))); /* T02-R100：--ed-dialog-w 缺省窗（首帧/layout 未写变量）不再暴露 64% 巨幅；潜在加载回退窗加固，用户原始闪大尚未复现；窄占位≈layout ph9 首帧形，decode 后由 JS 写真实 fit 宽单向展开 */
  min-width: min(300px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
}
.editor-layer.ws[data-ed-demo] .ws:not([data-ed-wf-open]) .ws-canvas { width: auto; }

/* Decode gate is independent of the measured editor shell. */
.editor-layer[data-ed-opening] > section.ws { visibility: hidden; pointer-events: none; }
.editor-layer .ed-loading-gate {
 position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
 width: min(280px, calc(100vw - 32px)); box-sizing: border-box;
 display: grid; gap: 14px; padding: 20px; border-radius: var(--r-pop, 10px);
 background: var(--surface); color: var(--ink-1); box-shadow: var(--sh-lift);
 font: inherit; pointer-events: auto;
}
.editor-layer .ed-loading-gate button { justify-self: end; font: inherit; color: inherit; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-btn, 6px); padding: 6px 10px; cursor: pointer; }

/* ── 原13UI 红字5/6（UX-REDLINE-20261011 右栏两排）——仅重排既有真控件，不新增功能、不改控件语义、不改可访问名称 ──
   第一排 = .recipe-batch 的直系子：模型分配控件（批量统一行 或 edGenSlotHtml 的唯一一组）+ 分配方式 + 图层网格开关；
   第二排 = .ed-c-cfgrow：生成张数下拉（recipeQuantityHtml）+ 执行（模式）/比例/设置，四控件等宽同排。
   开关刻意保持 .recipe-batch 直系子（不裹进新容器）——uiopt-r4 既有 `.recipe-batch > [data-recipe-return]` 窄态契约逐字不动。 */
.editor-layer.ws[data-ed-demo] .ws .ed-wf-foot .recipe-batch {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 4px 0;
}
/* 模型分配控件 flex-basis:0（不是 100%）：否则行内 width:100% 会让它独占整行、把分配方式/开关挤到下一行。 */
.editor-layer.ws[data-ed-demo] .ws .ed-wf-foot .recipe-batch > .recipe-assignment,
.editor-layer.ws[data-ed-demo] .ws .ed-wf-foot .recipe-batch > .ed-generation-controls {
  flex: 1 1 0; min-width: 0;
}
.editor-layer.ws[data-ed-demo] .ws .ed-wf-foot .recipe-batch > .recipe-mode { flex: 0 0 auto; margin-bottom: 0; }
.editor-layer.ws[data-ed-demo] .ws .ed-wf-foot .recipe-batch > [data-recipe-return],
.editor-layer.ws[data-ed-demo] .ws .ed-wf-foot .recipe-batch > [data-recipe-cancelbatch] { flex: 0 0 auto; }
/* 状态行独占一排；无必要信息时 <p> 为空 ⇒ 高度 0、外边距 0，不占版面（红字5「多余说明取消」）。 */
.editor-layer.ws[data-ed-demo] .ws .ed-wf-foot .recipe-batch > p[data-recipe-status] { flex: 1 1 100%; margin: 2px 0; }
.editor-layer.ws[data-ed-demo] .ws .ed-wf-foot .recipe-batch > p[data-recipe-status]:empty { margin: 0; }
/* 第二排：张数下拉与三枚 pill 等宽同排（.ed-c-cfgrow 的列数见 JS 内联 grid-template-columns，本票 3→4）。 */
.editor-layer.ws[data-ed-demo] .ws .ed-wf-foot .ed-c-cfgrow > .recipe-quantity {
  width: 100%; min-width: 0; margin: 0; display: flex; align-items: center; justify-content: stretch;
}
.editor-layer.ws[data-ed-demo] .ws .ed-wf-foot .ed-c-cfgrow > .recipe-quantity > select {
  width: 100%; height: 26px; min-width: 0; box-sizing: border-box;
}

/* UX-REDLINE-20261011 · composer settings overlay: existing controls only. */
.editor-layer.ws[data-ed-demo] .ws .ed-composer-config {
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
  padding: 7px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-btn, 6px);
  background: var(--surface-soft);
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-group {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-group h4 {
  margin: 0;
  color: var(--ink-1);
  font-size: 10px;
  line-height: 1.25;
  font-weight: 650;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-group-note {
  margin: 0;
  color: var(--ink-2);
  font-size: 10px;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-config .ed-generation-controls {
  width: 100%;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-config .recipe-batch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-config .recipe-batch > .recipe-assignment,
.editor-layer.ws[data-ed-demo] .ws .ed-composer-config .recipe-batch > .ed-generation-controls {
  flex: 1 1 0;
  min-width: 0;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-config .recipe-batch > .recipe-mode {
  flex: 0 0 auto;
  margin-bottom: 0;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-config .recipe-batch > p[data-recipe-status] {
  flex: 1 1 100%;
  margin: 2px 0;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-config .ed-cfg {
  margin: 0;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 4px 0;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer-actions .ed-tool {
  width: 28px;
  height: 26px;
  padding: 3px;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer .ed-c-tawrap {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer .ed-c-tawrap .ed-c-send {
  position: static;
  flex: 0 0 auto;
}
@media (max-width: 649px) {
  .editor-layer.ws[data-ed-demo] .ws .ed-composer-config {
    padding: 6px;
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-composer-config .ed-c-cfgrow {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* ==========================================================================
 * CK-4260-COMPOSER-BUDGET-20261011 · 编辑器 composer 设置/输入两栏高度预算收口
 * 票 task_e6d6f87c155b / dispatch ctx_5c404f2174db
 * 纯末段追加：本叶上方任何一行未改 ⇒ 未命中的档位（桌面 / 闭合态 / ≥650px 非目标态）zero-diff。
 * --------------------------------------------------------------------------
 * 依据 = Sol 真跑 work/sol-ui-controls-review-20261011/out/RESULT.json（实测视口高 890）：
 *  · 1440/2048：22 项检查全真（settings 250 / prompt 104 / actions 26 均可达）；
 *    其后 error = harness `[data-ed-cfg-open]` **严格模式命中 2 元素**（「API/ComfyUI」与
 *    「逐图分配」两区各有一枚合法入口）⇒ 仪器选择器歧义，非产品/CSS 缺陷；本叶零 JS 权限、
 *    亦不改仪器 ⇒ 该项不能也不应由本叶修正（见 report/CHECKPOINT.md §6）。
 *  · 470/360（详情态）：composer 盒 [74,609,320|210,120]；设置块真实 [86,617,296|186,240]；
 *    正文 textarea 被推到 [86,937,256|146,104]（折叠线 890 之下）；actions [86,885,…]；
 *    promptOwn/sendOwn/actions own 全 false。
 * 三处根因（与票面逐条对应）：
 *  ① 类名/属性错配：上方 R2 块命中 `.ed-composer-config-mount`（**类**），真实标记是
 *     `<div data-ed-composer-config-mount>`（image-editor-demo.js:2238，**属性**）
 *     ⇒ 其「有界滚动」声明从未匹配，设置块原尺寸外溢。
 *  ② 后块压前块：L103 的 flex 滚动器被其后 L270 的 `display:grid` 同特异度后置覆盖（grid 压 flex）。
 *  ③ 盒高结构不足：≤649 详情态把 `.ed-composer` 钉 `max-height:120px`，而最少内容
 *     actions(≈34)+正文(120)=154 ⇒ 结构上必然外溢，设置越多正文越远。
 * 修法（A/B/C 三段，全部末段）：
 *  A 属性选择器补回 mount 有界滚动（可收缩 + 内层自滚）；
 *  B 末段重声明 flex 版设置容器：三选择组并排紧凑、参数 pill 占整行；皮肤逐值沿用后置块；
 *  C ≤649 **list 与 detail 两态统一空间预算**：`.ed-rail` 下缘 161、`.ed-history` 下缘 63
 *    （带高 88 不变 ⇒ 条带自成一档命中窗），composer 由「钉死 120」改「有界自适应
 *    clamp(240px,46vh,360px)」，正文 `.ed-c-body` 钉 120 可达、actions 保持同排。
 * 明确不动：顶部 r37 `top:38`（不在本叶）、条带 `height:88`（refinement.css:4056）、
 *  `.ed-c-cfgrow` 列数（JS 内联栅格，承载 6 输出）、pill 弹层生命周期、绘制工具、
 *  `[data-ed-composer-input]` 真实输入选择器。
 * ==========================================================================*/

/* —— A. mount 有界滚动：属性选择器，修正 ① 的类名错配 —— */
.editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] {
  flex: 0 1 auto;      /* 可被压缩：父列内唯一弹性项，设置让位给正文 */
  min-height: 0;       /* 解除 flex 项 auto 最小尺寸，否则不收缩 */
  overflow: hidden;    /* 兜底：绝不把设置块外溢到正文/视口之外 */
  display: flex;
  flex-direction: column;
}

/* —— B. 设置容器 = flex（压过后置 grid）+ 独立有界滚动（A 的收缩结果落在此层）；皮肤逐值沿用 —— */
.editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] > .ed-composer-config {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 8px;
  padding: 7px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-btn, 6px);
  background: var(--surface-soft);
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(38vh, 300px);   /* 桌面档设置块上界（远 < 400px ⇒ 无 400px 白块） */
  overflow: auto;                 /* 设置获得**独立有界滚动** */
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] .ed-composer-group {
  display: flex;
  flex: 1 1 30%;       /* 三选择组并排紧凑 */
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] .ed-composer-group h4 {
  flex: 0 0 auto;
  margin: 0 5px 0 0;
  color: var(--ink-1);
  font-size: 10px;
  line-height: 1.25;
  font-weight: 650;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] .ed-composer-group-note {
  margin: 0;
  color: var(--ink-2);
  font-size: 10px;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] .ed-composer-parameters {
  flex: 1 1 100%;      /* 参数 pill 占整行 */
  min-width: 0;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] .ed-composer-parameters .ed-cfg {
  flex: 1 1 auto;
  min-width: 0;
}

/* —— C. ≤649：list 与 detail 两态统一空间预算 —— */
@media (max-width: 649px) {
  /* 窄档设置上界再收一档，保证正文优先；mount 已可收缩，故此处再压即触发独立滚动 */
  .editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] > .ed-composer-config {
    max-height: min(36vh, 240px);
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] .ed-composer-group {
    flex: 1 1 45%;     /* 窄档：两列并排（≥92px 实用宽），余下一组自换行 */
    min-width: 92px;
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] .ed-composer-parameters {
    flex: 1 1 100%;
    min-width: 0;
  }
  /* 左列下缘抬到条带上方：带高 88 ⇒ 带上缘 H−151，取 161（留 10px 呼吸）—— list 与 detail 同值 */
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="list"]) .ed-rail,
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="detail"]) .ed-rail {
    bottom: 161px;
  }
  /* 条带自成一档命中窗（右缘同闭合态，overflow-x:auto 合同不变） */
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="list"]) .ed-history,
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="detail"]) .ed-history {
    right: 66px;
    bottom: 63px;
    z-index: 8;
  }
  /* composer = 有界自适应（不再钉死 120，票面「足够总高放进 rail」）：设置滚动 + actions 同排 + 正文 120 可达 */
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="list"]) .ed-composer,
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="detail"]) .ed-composer {
    flex: 0 1 auto;
    min-height: 120px;
    max-height: clamp(240px, 46vh, 360px);
  }
  /* 正文（唯一输入）钉 120px：与设置滚动解耦，始终在视口内 */
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="list"]) .ed-composer .ed-c-body,
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="detail"]) .ed-composer .ed-c-body {
    flex: 0 0 120px;
    min-height: 120px;
  }
  /* 列表态工作流正文自滚（detail 档已由上块给 flex:1 1 0 / min-height:60px，此处不覆盖） */
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="list"]) .ed-wf-mount .ed-wf-body {
    flex: 1 1 0;
    min-height: 0;
  }
}

/* ==========================================================================
 * CK-4260-COMPOSER-BUDGET-20261011-R2 · 生成/输入两组防溢出窄修（B2）
 * 票 task_1e1640bb94e2 / dispatch ctx_9eaf7a221376
 * 证据 = Sol 真跑 work/sol-ui-controls-review-20261011/out/RESULT-R3.json：
 *   1440/2048 两档 22 项检查**全真**（settings 165.5 / prompt 104 / actions 26 全可达），
 *   随后 `[data-ed-cfg-open]`（唯一齿轮）点击 **Timeout 3500ms**；Playwright 记录拦截者 =
 *   「<summary>两个输入源的区别</summary> from <section aria-label="输入源">」。
 *   470 档 26/26 全绿、360 档 23 项全绿（其唯一 error = `[data-action="close-sidebar"]`
 *   「element is outside of the viewport」，属既有 sidebar 340px 宽的**前存**行为，本票不扩域）。
 * 根因：上轮「三选择组 flex:1 1 30% / min-width:0」把「来源与模型」组压到 ~110px，而组内
 *   `.ed-generation-controls` 带**行内** `display:flex;…;min-width:0;width:100%`
 *   （image-editor-demo.js:2318-2321 / :2281），其子项（来源下拉 + 真实模型 + 齿轮）横向溢出该组，
 *   压到邻组「输入源」的 `<summary>`；命中测试返回该 summary ⇒ 齿轮不再 own 命中。
 * 修法（票面提案，最小 scoped）：① 组最小宽 **150px** ⇒ 342 内容宽一行只容 2×150+gap6，需换行的行自然换行；
 *   ② `.ed-generation-controls { flex-wrap: wrap }`（`flex-wrap` 不在行内声明内，普通声明即生效，无需 !important）；
 *   ③ 组直系子项与 `.ed-generation-controls` 子项 `min-width:0; max-width:100%` ⇒ 内容被**包住**而非溢出；
 *   ④ 齿轮 `[data-ed-cfg-open] { flex: 0 0 auto }` ⇒ 恒占自身宽、绝不被挤没。
 * **不用 z-index、不使用 hidden/裁剪隐藏任何控件**（无 overflow:hidden）。
 * 作用域 **@media (min-width:650px)**：≤649 档本轮已全绿，逐字节不动（其组宽仍走上方 92px 规则）。
 * 未改：`-- source165px settings 预算`（设置 max-height 上界 min(38vh,300px) 未动）、
 *   `.ed-c-cfgrow` 列数、pill 生命周期、绘制工具、真实输入选择器、r37 CSS top / history 88。
 * ==========================================================================*/
@media (min-width: 650px) {
  .editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] .ed-composer-group {
    min-width: 150px;   /* 压顶：三组 30%/0 曾把首组压到 ~110px 致内容溢出压住邻组 summary */
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] .ed-composer-group > * {
    min-width: 0;       /* 内容包在自身组内，不外溢到邻组 */
    max-width: 100%;
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] .ed-generation-controls {
    flex-wrap: wrap;    /* 行内 display:flex 未含 flex-wrap ⇒ 普通声明即可生效 */
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] .ed-generation-controls > * {
    min-width: 0;
    max-width: 100%;    /* 来源/模型/齿轮换行而非横向溢出 */
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] .ed-generation-controls > [data-ed-cfg-open] {
    flex: 0 0 auto;     /* 唯一齿轮恒占自身宽 ⇒ 数量 6→1、manual/unified/auto、来源切换后仍 own 命中 */
  }
}

/* IMG-01.03 r39: keep the floating auxiliary card, including its close
   control, inside the narrow viewport's fixed left/right safety rails. */
@media (max-width: 649px) {
  .app-frame:has(.canvas-shell) .canvas-shell > .sidebar.aux-card {
    max-width: calc(100vw - 84px) !important;
  }
}

/* R77 用户10/13截图：真实编辑器参数在上、来源/输入/分配随后、唯一正文置底。
   工具绘制组独立滚动，六钮固定列底，避免旧composer reserve抬高/遮盖。 */
.editor-layer.ws[data-ed-demo]:not(.ed-composer-docked) .ws .ed-toolbar,
.editor-layer.ws[data-ed-demo].ed-composer-docked .ws .ed-toolbar {
  bottom: 10px; overflow: hidden;
}
.editor-layer.ws[data-ed-demo] .ws .ed-toolbar > .ed-drawing-tools {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin;
}
.editor-layer.ws[data-ed-demo] .ws .ed-toolbar > .ed-workflow-tools {
  position: static !important; flex: 0 0 auto; margin-top: auto;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer {
  height: auto; min-height: 0; flex: 0 1 auto; max-height: min(60vh, 560px);
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer .ed-c-body,
.editor-layer.ws[data-ed-demo] .ws .ed-composer .ed-c-tawrap {
  flex: 0 1 auto; min-height: 0;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-input] {
  field-sizing: content; height: auto; min-height: 72px; max-height: min(20vh, 200px);
  flex: 1 1 auto; overflow-y: auto;
}
.editor-layer.ws[data-ed-demo] .ws .ed-composer [data-ed-composer-config-mount] > .ed-composer-config {
  margin-bottom: 0;
}
/* 与旧短窗空间预算同级特异度：正文可增长，长文有界滚动，历史条仍保留原区域。 */
@media (max-width: 649px) {
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="list"]) .ed-composer,
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="detail"]) .ed-composer {
    height: auto; min-height: 0; flex: 0 1 auto;
  }
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="list"]) .ed-composer .ed-c-body,
  .editor-layer.ws[data-ed-demo] .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="detail"]) .ed-composer .ed-c-body {
    flex: 0 1 auto; min-height: 0;
  }
}

/* W213: the editor uses the same prompt/control composition as the canvas generator. */
.editor-layer.ws[data-ed-demo] .ws .ed-composer.ed-generation-unified {
  display:flex; flex-direction:column; gap:8px; padding:12px;
  max-height:min(56vh,520px); overflow:auto;
}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .gen-compact-top {
  display:flex; align-items:center; gap:8px; min-width:0;
}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .gen-compact-top > span {flex:1;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .gen-composer {
  display:flex; flex-direction:column; gap:8px; min-width:0;
}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .gen-prompt-box {min-width:0;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified [data-ed-composer-input] {
  box-sizing:border-box; width:100%; min-height:88px; max-height:180px; padding:8px;
  border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text);
  font:inherit; font-size:12px; resize:vertical;
}
.editor-layer.ws[data-ed-demo] .ed-generation-unified [data-ed-composer-config-mount] {display:block;max-height:none;overflow:visible;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-fields {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) 32px; gap:6px; align-items:center;
}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-fields > * {min-width:0;margin:0;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-fields > :nth-child(4) {grid-column:1;grid-row:2;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-fields > :nth-child(5) {grid-column:2;grid-row:2;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-fields > :nth-child(6) {grid-column:3;grid-row:2;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified [data-ed-generation-send] {grid-column:4;grid-row:1 / span 2;align-self:stretch;display:flex;align-items:center;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified [data-ed-generation-send] button {width:30px;height:30px;border-radius:50%;padding:6px;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-fields select {
  box-sizing:border-box; width:100%; min-width:0; max-width:100%;height:28px;
  border:0; border-radius:4px; background:var(--surface);color:inherit;font:inherit;font-size:11px;
}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-options {margin-top:8px;font-size:11px;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-options summary {cursor:pointer;padding:5px 0;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-options .ed-wf-params {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .recipe-batch {margin-top:8px;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified button:focus-visible,
.editor-layer.ws[data-ed-demo] .ed-generation-unified select:focus-visible,
.editor-layer.ws[data-ed-demo] .ed-generation-unified textarea:focus-visible {outline:2px solid var(--accent);outline-offset:2px;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .gen-controls {display:block;width:100%;min-width:0;padding:0;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-fields {width:100%;box-sizing:border-box;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-references {display:flex;gap:6px;align-items:center;min-width:0;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-primary {flex:0 0 56px;display:flex;flex-direction:column;font-size:10px;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-primary img {width:56px;height:44px;object-fit:contain;border-radius:4px;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-references {flex:1;min-width:0;}
.editor-layer.ws[data-ed-demo] .ed-generation-unified .gen-ref-add {flex:0 0 28px;width:28px;height:28px;padding:5px;}
.editor-layer.ws[data-ed-demo] .ws .ed-composer.ed-generation-unified .ed-references {flex:1 1 0;min-width:0;width:0;max-width:100%;padding:0;}
.editor-layer.ws[data-ed-demo] .ws .ed-composer.ed-generation-unified .ed-generation-fields .gen-ctl {display:flex;flex-direction:row;align-items:center;gap:4px;}
.editor-layer.ws[data-ed-demo] .ws .ed-composer.ed-generation-unified .ed-generation-fields .gen-ctl > svg {flex:0 0 13px;}
.editor-layer.ws[data-ed-demo] .ws .ed-composer.ed-generation-unified [data-ed-generation-send] button {box-sizing:border-box;min-width:0;width:30px;height:30px;flex:0 0 30px;}
.editor-layer.ws[data-ed-demo] .ws .ed-composer.ed-generation-unified .ed-references > small {display:block;white-space:normal;overflow-wrap:anywhere;}
/* Shared thumbnail tiles keep their edit controls reachable inside the editor strip. */
.editor-layer.ws[data-ed-demo] .ws .ed-composer.ed-generation-unified .ed-references {max-height:96px;}
.editor-layer.ws[data-ed-demo] .ws .ed-composer.ed-generation-unified [data-wf-ref-item] {flex:0 0 90px;min-width:0;width:90px;}
.editor-layer.ws[data-ed-demo] .ws .ed-composer.ed-generation-unified [data-wf-ref-item] img {width:56px;height:44px;object-fit:contain;}
.editor-layer.ws[data-ed-demo] .ws .ed-composer.ed-generation-unified [data-wf-ref-add] {display:none;}

.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-primary[hidden] {display:none;}

/* ============================================================================
 * UI-BUDGET-20261018-A · 截图红9：生成区文字框尽量大 + 两排参数间距缩小 + 文字框保底
 * 纯增量覆写，零 JS、零模板面板 CSS，保留全部原真实控件。
 *   ① 文字框尽量大：解除 180px 上限，参数让位后文字框吃掉剩余面板高度
 *   ② 两排参数间距缩小：fields 网格 gap 6→3、行高 28→26、options 上距 8→4
 *   ③ 文字框保底：底=保持 promptPosition:'bottom'（DOM 未动），min-height 88→140 兜底
 * ==========================================================================*/
.editor-layer.ws[data-ed-demo] .ws .ed-composer.ed-generation-unified { height:min(44vh,420px); flex:0 0 auto; } /* 红9: 解除 refinement:4551 的 120px 钳制, 参数行让位, 文字框吃剩余高度 */
.editor-layer.ws[data-ed-demo] .ed-generation-unified .gen-composer { flex:1 1 auto; min-height:0; }
.editor-layer.ws[data-ed-demo] .ed-generation-unified .gen-composer .gen-controls { flex:0 0 auto; }
.editor-layer.ws[data-ed-demo] .ed-generation-unified .gen-composer .gen-prompt-box { flex:1 1 auto; display:flex; min-height:0; }
.editor-layer.ws[data-ed-demo] .ed-generation-unified .gen-composer .gen-prompt-box [data-ed-composer-input] { flex:1 1 auto; height:100%; min-height:140px; max-height:none; resize:vertical; }

.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-fields { gap:3px 4px; }
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-fields select { height:26px; }
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-fields .gen-ctl { gap:3px; }
.editor-layer.ws[data-ed-demo] .ed-generation-unified .ed-generation-options { margin-top:4px; }

/* User T4 dashboard: fill the workspace below the existing 28px header.
   Keep desktop canvas, history and workflow in their existing live hosts. */
@media (min-width: 900px) {
  .editor-layer.ws[data-ed-demo]:is(.max,:not(.max)) > .ws {
    top:28px;
    border-radius:0; box-shadow:none;
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-rail { top:0; bottom:0; gap:8px; }
  .editor-layer.ws[data-ed-demo] .ws .ws-canvas { top:0; left:0; }
  .editor-layer.ws[data-ed-demo] .ws .ed-history { left:0; }
  .editor-layer.ws[data-ed-demo] .ws .ed-wf-panel { border-radius:0; }
  .editor-layer.ws[data-ed-demo] .ws .ed-wf-body {
    min-height:0; max-height:none; flex:1 1 0;
    scrollbar-width:thin; scrollbar-color:var(--accent-ui) transparent;
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-wf-body::-webkit-scrollbar { width:4px; }
  .editor-layer.ws[data-ed-demo] .ws .ed-wf-body::-webkit-scrollbar-thumb { background:var(--accent-ui); }
  .editor-layer.ws[data-ed-demo] .ws .ed-wf-body::-webkit-scrollbar-button { display:none; }
}

/* FB1020-24: keep every tool reachable without paging a hidden rail. */
@media (max-height: 1280px) {
  .editor-layer.ws[data-ed-demo]:not(.ed-composer-docked) .ws .ed-toolbar,
  .editor-layer.ws[data-ed-demo].ed-composer-docked .ws .ed-toolbar {
    width: 80px; overflow: visible; align-items: flex-end;
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-toolbar > .ed-drawing-tools {
    display: grid; grid-auto-flow: column; grid-template-rows: repeat(18, 32px);
    grid-auto-columns: 32px; gap: 3px; justify-content: end; align-content: start;
    align-items: center; justify-items: center; overflow: visible; width: 100%;
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-toolbar > .ed-drawing-tools > .ed-tool {
    width: 32px; height: 32px; min-height: 32px; flex: none;
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-toolbar > .ed-drawing-tools > .ed-tsep {
    width: 26px; height: 1px; margin: 0; align-self: center;
  }
  .editor-layer.ws[data-ed-demo] .ws .ed-toolbar > .ed-workflow-tools {
    width: 32px; align-self: flex-end; position: static !important;
  }
}
@media (max-height: 960px) {
  .editor-layer.ws[data-ed-demo]:not(.ed-composer-docked) .ws .ed-toolbar,
  .editor-layer.ws[data-ed-demo].ed-composer-docked .ws .ed-toolbar { width: 115px; }
  .editor-layer.ws[data-ed-demo] .ws .ed-toolbar > .ed-drawing-tools { grid-template-rows: repeat(12, 32px); }
}
@media (max-height: 700px) {
  .editor-layer.ws[data-ed-demo]:not(.ed-composer-docked) .ws .ed-toolbar,
  .editor-layer.ws[data-ed-demo].ed-composer-docked .ws .ed-toolbar { width: 185px; }
  .editor-layer.ws[data-ed-demo] .ws .ed-toolbar > .ed-drawing-tools { grid-template-rows: repeat(7, 32px); }
}

/* Tool properties open beside the rail instead of covering its tools. */
.editor-layer.ws[data-ed-demo]:not(.ed-composer-docked) .ws .ed-toolbar,
.editor-layer.ws[data-ed-demo].ed-composer-docked .ws .ed-toolbar { overflow: visible; }
.editor-layer.ws[data-ed-demo]:not(.ed-composer-docked) .ws .ed-toolbar > .ed-draw-properties,
.editor-layer.ws[data-ed-demo].ed-composer-docked .ws .ed-toolbar > .ed-draw-properties {
  position: absolute; left: auto; right: 100%; top: 0; bottom: 0;
  height: fit-content; width: auto; margin: auto 0; transform: none;
  padding: 5px 4px; background: var(--u6-paper, #f8f7f2);
  border: 1px solid var(--u6-line, #dedcd3); border-right: 0;
  border-radius: 8px 0 0 8px;
}

/* ============================================================================
 * R42-T02/T19/FB1020-03/24 · workflow 控件被加宽工具列遮挡：内容列按真实条宽让位
 *   FB1020-24 已按视口高度把工具列加宽为 80/115/185px 网格占位（max-height
 *   1280/960/700 三断点），但 ws 内容列（.ed-rail：workflow 面板 + composer）
 *   右缘仍按旧 46px 条宽预留 ⇒ composer「+」[data-recipe-add-reference] 与
 *   wf 面板 [data-ang2=resetall] 落进网格占位被盖（red47: top=ed-drawing-tools/eraser）。
 *   修法：同一组高度断点把 .ed-rail 右缘让到真实条宽 + 6px 呼吸；工具列本身零改动、
 *   不动左空白、不加 pointer-events 穿透、不关工具；>1280px 沿用原 46px 预留。
 * ==========================================================================*/
@media (max-height: 1280px) {
  .editor-layer.ws[data-ed-demo] .ws .ed-rail { right: 86px; }   /* 条宽 80 + 6 呼吸 */
}
@media (max-height: 960px) {
  .editor-layer.ws[data-ed-demo] .ws .ed-rail { right: 121px; }  /* 条宽 115 + 6 呼吸 */
}
@media (max-height: 700px) {
  .editor-layer.ws[data-ed-demo] .ws .ed-rail { right: 191px; }  /* 条宽 185 + 6 呼吸 */
}
