/* 侧栏表单：控件、开关、chips、参考图槽位、首尾帧、锚点行、文件行、估时、生成按钮。 */

label{display:block;font-size:12px;color:var(--dim);margin:18px 0 8px;font-weight:600}
label:first-child{margin-top:0}
textarea,select,input[type=text]{width:100%;background:var(--surf);color:var(--fg);border:1px solid var(--line);
  border-radius:6px;padding:11px 12px;font:inherit;box-shadow:none}
textarea:focus,select:focus,input[type=text]:focus,input[type=number]:focus{border-color:var(--acc)}
input[type=text]::placeholder{color:var(--ph)}
textarea{min-height:158px;resize:vertical;line-height:1.6}
textarea::placeholder{color:var(--ph)}
select{appearance:none;cursor:pointer;padding-right:34px}
select option{background:var(--surf);color:var(--fg)}
.selwrap{position:relative}
.selwrap::after{content:"";position:absolute;right:15px;top:50%;width:7px;height:7px;
  margin-top:-5px;border-right:1.6px solid var(--dim);border-bottom:1.6px solid var(--dim);
  transform:rotate(45deg);pointer-events:none}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
input[type=number]{width:100%;background:var(--surf);color:var(--fg);border:1px solid var(--line);
  border-radius:6px;padding:11px 12px;font:inherit;box-shadow:none}
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button{opacity:.35}
.opt{display:flex;align-items:center;gap:10px;margin-top:14px;cursor:pointer;
  position:relative;min-height:26px;
  font-size:12.5px;color:var(--dim);user-select:none}
/* 开关的真身藏起来，但**必须**钉在这一行里（position:relative + left/top）。
   原来只写 position:absolute：包含块是最近的定位祖先，也就是 sticky 的 .ct-compose，
   静态位置落在那块 overflow:hidden 面板的底边之外，把面板撑出 150px 的滚动高度；
   点一下 label，浏览器聚焦这个看不见的 input、顺手把这段溢出滚进视野——
   面板顶上的「新建视频」和提示词输入框就被推出裁剪边，而且再也滚不回来
   （2026-09-14 用户报「勾选生成中预览页面坍塌、输入框不见」）。 */
.opt input{position:absolute;left:0;top:0;width:1px;height:1px;margin:0;
  opacity:0;pointer-events:none}
.sw{width:36px;height:20px;border-radius:99px;flex:0 0 auto;position:relative;transition:.15s;
  background:var(--line)}
.sw::after{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;
  background:var(--ph);transition:.15s;box-shadow:1px 1px 3px var(--lo)}
.opt input:checked + .sw{background:var(--acc)}
.opt input:checked + .sw::after{transform:translateX(16px);background:var(--on-accent)}
.opt input:focus-visible + .sw{outline:2px solid var(--acc);outline-offset:2px}
/* 控件下面的一行说明：别用负 margin 往上顶，原生 select 会盖在它上面；
   颜色也别用 --ph，浅色模式下几乎看不见 */
.subhint{font-size:12px;color:var(--hint);line-height:1.55;margin:9px 0 14px}
.subhint:empty{display:none}
/* 控件底下的一行小按钮（克隆音色 / 删除音色）。原来只有 .ttsout .trow 有样式，
   音色区那一行没人管，两颗按钮各占一行、删除键掉到左下角。 */
.trow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
/* 种子：一个输入框 + 一颗「随机」把它清空 */
.seedrow{display:flex;gap:9px;align-items:stretch}
.seedrow input{flex:1;min-width:0}
.seedrow button{border:0;cursor:pointer;font:inherit;font-size:12px;padding:0 15px;border-radius:12px;
  color:var(--dim);background:var(--surf);white-space:nowrap;
  box-shadow:3px 3px 7px var(--lo), -3px -3px 7px var(--hi)}
.seedrow button:active{box-shadow:inset 2px 2px 5px var(--lo), inset -2px -2px 5px var(--hi)}
.seedlock{font-size:11.5px;color:var(--acc);margin-top:7px}
.chips{display:flex;gap:6px;margin-top:7px;flex-wrap:wrap}
.chips button{flex:1;min-width:0;border:1px solid var(--line);cursor:pointer;font:inherit;font-size:11.5px;
  padding:5px 0;border-radius:5px;color:var(--dim);background:var(--surf)}
.chips button.on{color:var(--acc);background:var(--soft);border-color:var(--acc)}
.chips button:active{box-shadow:inset 2px 2px 4px var(--lo), inset -2px -2px 4px var(--hi)}

.refs{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.slot{aspect-ratio:1;border-radius:6px;position:relative;cursor:pointer;overflow:hidden;
  display:grid;place-items:center;color:var(--ph);font-size:20px;
  background:var(--hole);border:1px dashed var(--line)}
.slot img{width:100%;height:100%;object-fit:cover;display:block}
.slot .x{position:absolute;top:3px;right:3px;width:19px;height:19px;border-radius:50%;
  background:rgba(255,255,255,.92);color:#e8646d;font-size:13px;line-height:19px;
  text-align:center;box-shadow:1px 1px 3px rgba(0,0,0,.2)}
.slot.drag{color:var(--acc)}
label .hint{color:var(--hint);opacity:.85;font-weight:400;margin-left:6px}
/* 首尾帧：两个 16:9 的格子，各带一行说明 */
#tierwrap,#ltxwrap,#refblock,#flfblock{margin-top:18px}   /* 块内首个 label 的 margin-top 被 :first-child 清掉了 */
.flf{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.fcell{display:flex;flex-direction:column;gap:6px}
.fcell .slot{aspect-ratio:16/9}
.fcap{text-align:center;font-size:11.5px;color:var(--ph)}
.warn{font-size:11.5px;color:var(--warn);margin-top:10px;line-height:1.5}
/* 中间锚点：一行一个，缩略图 + 帧号 */
.guides{display:flex;flex-direction:column;gap:7px}
.grow{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:12px;
  box-shadow:inset 3px 3px 7px var(--lo), inset -3px -3px 7px var(--hi)}
.grow .gthumb{width:44px;height:26px;border-radius:7px;object-fit:cover;flex:0 0 auto;background:var(--hole)}
.grow .gkind{width:44px;height:26px;border-radius:7px;flex:0 0 auto;display:grid;place-items:center;
  font-size:12px;color:var(--acc);box-shadow:2px 2px 5px var(--lo), -2px -2px 5px var(--hi)}
.grow .gat{font-size:11.5px;color:var(--dim);white-space:nowrap}
.grow input[type=number]{width:62px;background:transparent;color:var(--fg);border:0;outline:none;
  border-radius:9px;padding:5px 8px;font:inherit;font-size:12px;
  box-shadow:inset 3px 3px 6px var(--lo), inset -3px -3px 6px var(--hi)}
.grow .gsec{flex:1;font-size:11px;color:var(--ph);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.est{margin-top:12px;font-size:12px;color:var(--dim);text-align:center;min-height:18px}
.est b{color:var(--acc);font-weight:650}
.files{display:flex;flex-direction:column;gap:7px}
.frow{display:flex;align-items:center;gap:9px;padding:9px 12px;border-radius:12px;font-size:12.5px;
  box-shadow:inset 3px 3px 7px var(--lo), inset -3px -3px 7px var(--hi)}
.frow .fi{width:22px;height:22px;border-radius:7px;flex:0 0 auto;display:grid;place-items:center;
  font-size:11px;color:var(--acc);box-shadow:2px 2px 5px var(--lo), -2px -2px 5px var(--hi)}
.frow .fn{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fg);opacity:.85}
.frow .fs{color:var(--ph);font-size:11.5px;white-space:nowrap}
.frow .tg,.frow .fx{border:0;background:var(--surf);cursor:pointer;font:inherit;font-size:11px;
  padding:3px 9px;border-radius:99px;white-space:nowrap;color:var(--dim);
  box-shadow:2px 2px 5px var(--lo), -2px -2px 5px var(--hi)}
.frow .tg.on{color:var(--acc)}
.frow .fx{color:var(--bad);padding:3px 8px}
.frow .tg:active,.frow .fx:active{box-shadow:inset 2px 2px 4px var(--lo), inset -2px -2px 4px var(--hi)}
.fadd{cursor:pointer;color:var(--ph);justify-content:center;font-size:13px}
.fadd.drag,.fadd:hover{color:var(--acc)}
/* 生成中的实时预览：ComfyUI 每一步的 latent 预览铺在底下，状态条压在上面 */
.thumb img.pv{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#0d1016}
.thumb.haspv .wait{position:absolute;left:10px;right:10px;bottom:10px;width:auto;padding:9px 12px;
  gap:7px;border-radius:10px;color:#fff;background:rgba(12,16,24,.55);backdrop-filter:blur(5px)}
.thumb.haspv .spin{display:none}
.thumb.haspv .bar{width:100%;box-shadow:inset 1px 1px 3px rgba(0,0,0,.5)}
.thumb.haspv .w-eta{color:rgba(255,255,255,.75)}

.go{width:100%;margin-top:22px;border:0;border-radius:6px;padding:13px;cursor:pointer;
  background:var(--acc);color:var(--on-accent);font:inherit;font-weight:650;font-size:14px;transition:filter .15s}
.go:active:not(:disabled){filter:brightness(.94)}
.go:disabled{background:var(--hole);color:var(--dim);cursor:not-allowed}
