/* ============================================================
 * styles-skillvideo-ws.css
 * 对照 maolong.da-ai.cc /toolbox/video-generation 的工作区外观：
 * 技能目录栏 / 创作面板 / 结果区 / 最近栏，按钮位置与尺寸逐项对齐。
 * 只作用于 .skws 作用域，不改动原有 .sk-* 组件，保证既有功能不受影响。
 * ============================================================ */

.sk-wrap.skws {
  display: grid;
  grid-template-columns: 300px 356px minmax(300px, 1fr) 152px;
  grid-template-rows: auto minmax(760px, auto);
  gap: 10px;
  align-items: stretch;
  padding: 0 0 26px;
}
.skws-topbar { grid-column: 1 / -1; }

/* --- 顶部条：参考站是「AI 视频」细标题 + 收起面板，本站保留模块切换 --- */
.skws-topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 4px 10px; border-bottom: 1px solid var(--line);
}
.skws-topbar-title { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: .4px; }
.skws-topbar-sep { color: var(--faint); font-size: 12px; }
.skws-topbar .sk-modtabs { margin: 0; gap: 6px; }
.skws-topbar .sk-modtab { padding: 4px 12px; font-size: 11px; border-radius: 999px; }
.skws-topbar .sk-hero-r { margin-left: auto; gap: 6px; }
.skws-topbar .sk-hero-r .btn { padding: 4px 10px; font-size: 11px; }
.skws-topbar .sk-current-name { font-size: 12px; margin-right: 4px; }
.skws-topbar .sk-hero-title, .skws-topbar .sk-hero-sub,
.skws-topbar .sk-hero-l > .sk-hero-title, .skws-topbar .sk-hero-l > .sk-hero-sub { display: none; }
.skws-topbar .sk-hero { display: contents; }
.skws-topbar .sk-hero-l { display: flex; align-items: center; gap: 10px; }

/* --- 四栏白卡 --- */
.skws-col {
  min-width: 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; display: flex; flex-direction: column;
  overflow: hidden; box-shadow: var(--shadow);
}
.skws-scroll { overflow: auto; min-height: 0; flex: 1; }
.skws-pane { display: flex; flex-direction: column; min-width: 0; }
.skws-pane-head {
  font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .4px;
  padding: 10px 14px 6px; border-bottom: 1px solid var(--line); background: var(--panel-soft);
}
.skws-pane-head:empty { display: none; }
.skws-pane-body { padding: 10px 12px; min-width: 0; }

/* --- 技能目录栏：放大版横条卡（图标 60、行高 78、卡间距 10）、分组标题、选中描边 ---
   三个入口（电商带货 / 同城到店 / 剧情短片）共用这套类名，改这里三处同时生效。 */
.skws-side .skws-scroll { padding: 10px 10px 24px; }
.skws-group-title {
  font-size: 12px; color: var(--faint); font-weight: 600;
  padding: 18px 10px 8px; letter-spacing: .4px;
}
.skws-group:first-child .skws-group-title { padding-top: 8px; }
.skws-skill {
  width: 100%; min-height: 78px; display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft);
  padding: 9px 12px; margin: 0 0 10px; text-align: left; cursor: pointer; color: var(--ink);
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.skws-skill:hover {
  background: var(--panel); border-color: var(--line-strong);
  box-shadow: 0 6px 16px rgba(16, 24, 40, .08); transform: translateY(-1px);
}
.skws-skill.is-active {
  background: var(--panel); border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.skws-skill.is-foreign { opacity: .62; }
.skws-skill-thumb {
  width: 60px; height: 60px; border-radius: 14px; flex: none; object-fit: cover;
  background: linear-gradient(135deg, #cfd6e6, #a8b3cc); color: #fff;
  font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  overflow: hidden; box-shadow: 0 2px 6px rgba(16, 24, 40, .10);
}
.skws-skill-thumb img { width: 100%; height: 100%; object-fit: cover; }
.skws-skill-meta { min-width: 0; flex: 1; }
.skws-skill-name { font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.3; letter-spacing: .2px; }
.skws-skill-desc {
  font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.skws-skill-arrow { font-size: 15px; color: var(--faint); flex: none; }
/* 旧版技能网格在参考站外观下收进「更多」折叠，仍保留 DOM 供功能与回归使用 */
.skws-side .sk-skill-list { display: none; }
.skws-side .sk-search, .skws-side .sk-catrow, .skws-side .sk-rec, .skws-side .sk-foot-note {
  padding-left: 4px; padding-right: 4px;
}
.skws-side .sk-search { margin-bottom: 8px; }
.skws-side .sk-catrow { margin-bottom: 4px; }
.skws-side .sk-rec { margin-bottom: 6px; gap: 6px; }
/* 搜索框与推荐胶囊随技能卡一起放大，避免大小头重脚轻 */
.skws-side .sk-search .input { height: 36px; font-size: 12.5px; border-radius: 10px; }
.skws-side .sk-search-tip { font-size: 11.5px; }
.skws-side .sk-rec-chip { padding: 5px 12px; font-size: 11.5px; border-radius: 999px; }
.skws-side .sk-foot-note { font-size: 11px; padding: 16px 0 6px; }

/* --- 创作面板 --- */
.skws-main .skws-scroll { padding: 0; }
.skws-cmp-head {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}
.skws-cmp-thumb {
  width: 32px; height: 32px; border-radius: 7px; object-fit: cover; flex: none;
  background: linear-gradient(135deg, #d8dee9, #aab6cd);
}
.skws-cmp-title { min-width: 0; flex: 1; }
.skws-cmp-title b { display: block; font-size: 12px; color: var(--ink); font-weight: 700; }
.skws-cmp-title span {
  display: block; font-size: 10px; color: var(--muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.skws-new {
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  border-radius: 8px; font-size: 11px; padding: 5px 10px; cursor: pointer; white-space: nowrap;
}
.skws-new:hover { background: var(--panel-soft); }

.skws-cmp-tools {
  display: flex; align-items: center; gap: 4px; padding: 8px 12px 2px;
  font-size: 11px; color: var(--faint);
}
.skws-cmp-count { margin-right: auto; }
.skws-iconbtn {
  width: 26px; height: 26px; border: none; background: transparent; color: var(--muted);
  border-radius: 7px; font-size: 12px; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
}
.skws-iconbtn:hover { background: var(--panel-soft); color: var(--ink); }

.skws-cmp-slots { display: flex; gap: 8px; padding: 8px 12px 12px; }
.skws-slot {
  width: 68px; height: 92px; border: 1px dashed var(--line-strong); border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  line-height: 1.35; text-align: center; padding: 4px;
  flex: none; box-sizing: border-box;
}
.skws-slot:hover { border-color: var(--accent); color: var(--accent-deep); }
.skws-slot .skws-slot-ico { font-size: 16px; opacity: .55; }
.skws-slot small { font-size: 9px; color: var(--faint); }
.skws-slot.has-file {
  border-style: solid; border-color: var(--accent); color: var(--accent-deep);
  background: var(--panel); padding: 3px; gap: 2px;
  justify-content: flex-start; overflow: hidden; position: relative;
}
/* 已上传素材的缩略区：容器只管裁圆角，图片自己按比例缩小到框内 */
.skws-slot-thumb {
  width: 100%; flex: 1 1 auto; min-height: 0; border-radius: 6px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-soft); position: relative; padding: 2px;
}
/* 只给 max-*，不给固定宽高：等比缩放，完整可见，绝不溢出框体 */
.skws-slot-thumb img,
.skws-slot-thumb video {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  display: block; object-fit: contain; border-radius: 4px;
}
/* 音频槽没有画面：用等宽波形条做「素材已就绪」的可视化，风格与图片槽一致 */
.skws-slot-wave { display: flex; align-items: center; gap: 2px; height: 24px; }
.skws-slot-wave i {
  display: block; width: 3px; border-radius: 2px;
  background: var(--accent); opacity: .5;
}
.skws-slot-play {
  position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%);
  text-align: center; font-size: 12px; color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .55); pointer-events: none;
}
.skws-slot-cap {
  font-size: 9px; line-height: 1.2; color: var(--muted);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.skws-slot.has-file .skws-slot-cap { color: var(--accent-deep); }
.skws-slot-num {
  position: absolute; top: 3px; right: 3px; z-index: 1;
  background: rgba(39, 39, 39, .72); color: #fff;
  font-size: 9px; line-height: 1; padding: 2px 4px; border-radius: 6px;
}
/* 素材槽悬停预览：浮在槽位上方，不改变原有 68×92 布局 */
.skws-slot-wrap { position: relative; display: block; flex: none; }
.skws-slot-hover {
  display: none; position: absolute; left: 0; bottom: calc(100% - 2px); z-index: 30;
  min-width: 132px; max-width: 236px; padding: 7px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); box-shadow: 0 12px 30px rgba(10, 20, 16, .16);
  grid-template-columns: repeat(3, 58px); gap: 6px;
}
.skws-slot-wrap:hover .skws-slot-hover { display: grid; }
.skws-slot-hover-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 0; color: var(--muted); font-size: 9px;
}
.skws-slot-hover-item img {
  width: 58px; height: 46px; object-fit: contain; border-radius: 5px;
  background: var(--panel-soft); border: 1px solid var(--line);
}
.skws-slot-hover-ph {
  width: 58px; height: 46px; display: flex; align-items: center; justify-content: center;
  border-radius: 5px; background: var(--panel-soft); border: 1px solid var(--line); font-size: 16px;
}
.skws-slot-hover-name {
  max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.skws-slot-hover-more {
  grid-column: 1 / -1; text-align: center; color: var(--faint); font-size: 9px;
}
.skws-slot-hover .skws-slot-wave { height: 46px; width: 58px; justify-content: center; }

/* --- 素材预览条：上传完成立即出现，hover 单张放大一倍 --- */
/* 左右各留 27px 余量：放大一倍时第一张/最后一张会外溢 27px，
   不加余量会被栏容器的 overflow:hidden 切掉一条边 */
.skws-mats { margin: 0 -15px; padding: 6px 27px 14px; position: relative; z-index: 6; }
.skws-mats-label {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 9px; color: var(--faint); margin: 0 0 6px;
}
.skws-mats-label em { font-style: normal; opacity: .78; }
.skws-mats-row { display: flex; flex-wrap: wrap; gap: 10px; }
.skws-mat {
  position: relative; flex: none; width: 54px; height: 54px; padding: 0;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft);
  cursor: zoom-in; overflow: hidden; transform-origin: center center;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
/* 放大一倍：同时抬起 z-index，被划到的那张才会浮在邻居之上 */
.skws-mat:hover, .skws-mat:focus-visible {
  transform: scale(2); z-index: 50; border-color: var(--accent);
  box-shadow: 0 16px 38px rgba(10, 20, 16, .24); outline: none;
}
.skws-mat-thumb {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.skws-mat-thumb img, .skws-mat-thumb video {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; display: block;
}
.skws-mat-ph { font-size: 16px; color: var(--faint); }
.skws-mat-ref {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: center;
  font-size: 8px; line-height: 1.55; color: #fff; background: rgba(12, 14, 17, .56);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none;
}
/* 刚上传成功的那张闪一圈，避免「传完了不知道该看哪」 */
.skws-mat.is-new { animation: skws-mat-flash 1.4s ease-out 1; }
@keyframes skws-mat-flash {
  0% { box-shadow: 0 0 0 0 rgba(28, 31, 36, .42); border-color: var(--accent); }
  70% { box-shadow: 0 0 0 9px rgba(28, 31, 36, 0); border-color: var(--accent); }
  100% { box-shadow: 0 0 0 0 rgba(28, 31, 36, 0); }
}

/* --- 提示词 @ 素材提及面板 --- */
.skws-mention {
  position: fixed; z-index: 9200; width: 244px; max-height: 262px; overflow-y: auto;
  padding: 5px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel); box-shadow: 0 18px 44px rgba(10, 20, 16, .22);
}
.skws-mention-item {
  display: flex; align-items: center; gap: 8px; padding: 5px 6px;
  border-radius: 8px; cursor: pointer;
}
.skws-mention-item:hover, .skws-mention-item.is-active { background: var(--panel-soft); }
.skws-mention-item .skws-mat-thumb {
  position: relative; inset: auto; flex: none; width: 30px; height: 30px;
  border: 1px solid var(--line); border-radius: 7px; overflow: hidden;
}
.skws-mention-item .skws-slot-wave { gap: 1px; height: 18px; }
.skws-mention-item .skws-slot-wave i { width: 2px; }
.skws-mention-main { min-width: 0; flex: 1; display: block; }
.skws-mention-name {
  display: block; font-size: 11px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.skws-mention-sub {
  display: block; font-size: 9px; color: var(--faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.skws-mention-kind {
  flex: none; font-size: 9px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 5px; padding: 0 4px;
}
.skws-mention-empty { padding: 10px 8px; font-size: 10px; line-height: 1.6; color: var(--muted); }

/* 编导模式：参考站中央「你想创作一条什么视频？」+ 6 个创意方向 */
.skws-intro { padding: 30px 16px 18px; text-align: center; }
.skws-intro-mark { font-size: 26px; opacity: .13; letter-spacing: 4px; }
.skws-intro-title { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 10px 0 14px; }
.skws-intro-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.skws-intro-chip {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft);
  border-radius: 7px; font-size: 10px; padding: 6px 4px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.skws-intro-chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.skws-intro-chip.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.skws-exit {
  display: inline-block; margin: 14px 0 4px; border: none; border-radius: 999px;
  background: #272727; color: #fff; font-size: 10px; padding: 5px 12px; cursor: pointer;
}

.skws-cmp-prompt { padding: 4px 12px 0; }
.skws-cmp-prompt textarea {
  width: 100%; min-height: 108px; border: none; outline: none; resize: vertical;
  background: transparent; color: var(--ink); font-size: 12px; line-height: 1.7;
  font-family: var(--font);
  /* 高度由脚本按内容实测（autoGrowPrompt），默认不出现内滚动条 */
  overflow-y: hidden;
}
.skws-cmp-prompt textarea::placeholder { color: var(--faint); }
.skws-helpwrite {
  display: inline-block; border: none; background: transparent; color: #2f6bff;
  font-size: 11px; cursor: pointer; padding: 0; margin-top: 2px;
}
/* 撰写中：按钮置灰不可连点，避免一次要求被重复提交成多条脚本 */
.skws-helpwrite:disabled { color: var(--faint); cursor: default; }
/* 「帮我写」的运行态：只给一行轻量进度，不展开任何编导面板 */
.skws-write-status {
  display: flex; align-items: center; gap: 7px; padding: 0 12px 8px;
  font-size: 11px; color: var(--muted); line-height: 1.5;
}
.skws-write-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #2f6bff; flex: none;
  animation: skws-write-pulse 1s ease-in-out infinite;
}
@keyframes skws-write-pulse {
  0%, 100% { opacity: .25; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.15); }
}
.skws-cmp-foot {
  display: flex; align-items: center; gap: 6px; padding: 4px 12px 10px;
  font-size: 10px; color: var(--faint);
}
.skws-cmp-foot .skws-count { margin-right: auto; }
.skws-credits { font-size: 10px; color: var(--faint); white-space: nowrap; }
.skws-director-btn {
  border: none; background: transparent; color: #2f6bff; font-size: 11px;
  cursor: pointer; padding: 3px 6px; border-radius: 6px;
}
.skws-director-btn:hover { background: rgba(47, 107, 255, .08); }

.skws-cmp-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px 12px 10px; }
.skws-setbtn {
  height: 50px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel);
  color: var(--ink); text-align: left; padding: 7px 10px; cursor: pointer; min-width: 0;
}
.skws-setbtn:hover { border-color: var(--accent); }
.skws-setbtn b { display: block; font-size: 10px; color: var(--faint); font-weight: 500; }
.skws-setbtn span {
  display: block; font-size: 11px; margin-top: 3px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.skws-cmp-submit { padding: 0 12px 12px; }
.skws-submit {
  width: 100%; height: 40px; border: none; border-radius: 9px;
  background: #272727; color: #fff; font-size: 12px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.skws-submit:hover { background: #3a3a3a; }
.skws-submit:disabled { opacity: .55; cursor: not-allowed; }
.skws-submit small { font-weight: 400; font-size: 10px; color: rgba(255, 255, 255, .72); }

/* 高级编辑：本站原有功能全部保留，默认展开，参考站外观下作为第二层 */
/* 业务配置 + 高级编辑栏及其下方全部模块：视图统一不显示，
   控件 DOM / 事件绑定 / 配置数据仍完整保留，由内部驱动层维护，不占布局空间。 */
.skws-internal-config,
.skws-internal-config[hidden] {
  display: none !important;
  width: 0; height: 0; overflow: hidden;
  pointer-events: none;
}
/* 可见的「模型 / 视频设置」触发器打开的紧凑创作设置浮层 */
.skws-settings { padding: 2px 2px 4px; min-width: 260px; }
.skws-settings .sk-sec-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.skws-settings .sk-field { margin-bottom: 10px; }
.skws-settings .sk-sec-label { margin-top: 4px; }
.skws-settings .lb-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
/* 产品理解：识别结论 + 每条依据，放在创作设置浮层里，不占常驻版面 */
.sk-insight {
  margin: 10px 0 4px; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel-soft);
}
.sk-insight .sk-sec-label { margin: 0 0 6px; }
.sk-insight-row { display: flex; gap: 6px; font-size: 11px; line-height: 1.65; }
.sk-insight-k { flex: none; width: 54px; color: var(--faint); }
.sk-insight-v { flex: 1; color: var(--ink); word-break: break-word; }
.sk-insight-sec { margin-top: 8px; }
.sk-insight-title { font-size: 10px; color: var(--muted); letter-spacing: .04em; margin-bottom: 3px; }
.sk-insight-item { display: flex; gap: 6px; padding: 2px 0; }
.sk-insight-idx {
  flex: none; width: 14px; height: 14px; margin-top: 2px; border-radius: 50%;
  background: var(--line); color: var(--muted); font-size: 9px; line-height: 14px; text-align: center;
}
.sk-insight-body { flex: 1; min-width: 0; }
.sk-insight-text { font-size: 11px; color: var(--ink); line-height: 1.5; }
.sk-basis { font-size: 10px; color: var(--faint); line-height: 1.5; margin-top: 1px; }
.sk-insight-pos { font-size: 11px; color: var(--ink); margin-top: 8px; line-height: 1.55; }
.sk-insight .lb-actions { justify-content: flex-start; margin-top: 8px; }
.sk-insight .sk-hint { margin-top: 4px; }
/* 折叠区：默认只显示前两条依据，其余按需展开，避免浮层被撑成一整屏 */
.sk-insight .sk-more { margin-top: 5px; }
.sk-insight .sk-more > summary {
  list-style: none; cursor: pointer; font-size: 10px; color: var(--muted); line-height: 1.6;
}
.sk-insight .sk-more > summary::-webkit-details-marker { display: none; }
.sk-insight .sk-more > summary::before { content: '▸ '; color: var(--faint); }
.sk-insight .sk-more[open] > summary::before { content: '▾ '; }
.sk-insight .sk-more .sk-hint { margin-top: 3px; }
.skws-advanced { border-top: 1px solid var(--line); margin-top: 2px; }
.skws-advanced > summary {
  list-style: none; cursor: pointer; padding: 9px 12px; font-size: 11px;
  color: var(--muted); background: var(--panel-soft); user-select: none;
}
.skws-advanced > summary::-webkit-details-marker { display: none; }
.skws-advanced > summary::before { content: '▸ '; color: var(--faint); }
.skws-advanced[open] > summary::before { content: '▾ '; }
.skws-advanced .skws-pane-head { font-size: 10px; padding: 8px 12px 4px; }
.skws-advanced .skws-pane-body { padding: 8px 10px; }
.skws-advanced .sk-skill-list { display: none; }

/* 编导模式：头部 → 中央提问区 → 底部三槽 → 输入条 → 语言/积分 → 提交，顺序对齐参考站 */
.skws-main.is-director .skws-cmp-head { order: 0; }
.skws-main.is-director .skws-cmp-tools { order: 1; }
.skws-main.is-director .skws-intro { order: 2; }
.skws-main.is-director .skws-cmp-slots { order: 3; border-top: 1px solid var(--line); }
.skws-main.is-director .skws-cmp-prompt { order: 4; }
.skws-main.is-director .skws-cmp-foot { order: 5; }
.skws-main.is-director .skws-cmp-settings { order: 6; display: none; }
.skws-main.is-director .skws-cmp-submit { order: 7; }
/* 高级编辑区保持自然高度且不产生二级滚动容器，否则自动化点击会被滚动打断 */
.skws-main.is-director .skws-advanced { order: 8; }
/* 编导态只留最小高度，最大高度交给 autoGrowPrompt 实测（原来钉死 80px，
   5 句台词必须拖着看，等于把脚本藏起来），外层创作面板负责滚动 */
.skws-main.is-director .skws-cmp-prompt textarea { min-height: 46px; max-height: none; resize: none; }
.skws-main.is-director .skws-cmp-foot .skws-director-btn { color: var(--muted); }
.skws-main-inner, .skws-result-inner, .skws-recent-inner {
  display: flex; flex-direction: column; min-height: 100%;
}
.skws-result-inner .skws-res-empty { flex: 1; }
.skws-recent-card b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- 结果区：参考站「参考示例 / 收藏」两个 tab + 空态 --- */
.skws-res-head { display: flex; align-items: center; gap: 16px; padding: 12px 16px 0; border-bottom: 1px solid var(--line); }
.skws-resttab {
  border: none; background: transparent; color: var(--muted); font-size: 11px;
  padding: 0 0 9px; cursor: pointer; position: relative;
}
.skws-resttab.is-active { color: var(--ink); font-weight: 700; }
.skws-resttab.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--ink);
}
.skws-res-empty {
  flex: 1; min-height: 260px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; text-align: center;
}
.skws-res-empty b { font-size: 14px; color: var(--ink); }
.skws-res-empty span { font-size: 11px; color: var(--muted); }
.skws-res-empty button {
  border: none; background: transparent; color: #2f6bff; font-size: 11px; cursor: pointer; padding: 0;
}
.skws-result .skws-pane-body { padding: 10px 12px; }

/* --- 最近栏 --- */
.skws-recent-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 10px 8px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 600;
}
.skws-recent-head button {
  border: none; background: transparent; color: var(--faint); font-size: 10px; cursor: pointer; padding: 0;
}
.skws-recent-list { padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.skws-recent-card {
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft);
  padding: 8px; font-size: 10px; color: var(--muted); cursor: pointer; line-height: 1.5;
}
.skws-recent-card:hover { border-color: var(--accent); }
.skws-recent-card b { display: block; font-size: 11px; color: var(--ink); font-weight: 600; }
.skws-recent-empty { font-size: 10px; color: var(--faint); text-align: center; padding: 14px 6px; }

@media (max-width: 1380px) {
  .sk-wrap.skws { grid-template-columns: 286px 330px minmax(280px, 1fr); }
  .skws-recent { display: none; }
}
@media (max-width: 1050px) {
  .sk-wrap.skws { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .skws-side { grid-column: 1 / -1; max-height: 320px; }
  .skws-main { grid-column: 1; }
  .skws-result { grid-column: 2; }
}
@media (max-width: 720px) {
  .sk-wrap.skws { grid-template-columns: 1fr; }
  .skws-main, .skws-result { grid-column: 1; }
}

/* 识别来源：明确告诉用户这次是「视觉模型真读了图」还是「本地像素猜的」 */
.sk-vision-src {
  margin: 4px 0 6px; padding: 4px 8px; border-radius: 5px;
  font-size: 11px; line-height: 1.5; color: var(--ink);
  background: rgba(64, 158, 255, .10); border-left: 2px solid #4a9eff;
}
.sk-vision-src-off {
  background: rgba(224, 168, 0, .12); border-left-color: #e0a800; color: var(--muted);
}

/* ============================================================
 * 生成进度窗口（右侧主窗口：脚本 → 进度 → 成片）
 * 原「参考示例」位置改为这里；示例降级为右上角轻量入口。
 * ============================================================ */
.skws-prog {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px; flex: 1; min-height: 0; overflow: auto;
}
.skws-prog-head { display: flex; align-items: center; gap: 8px; }
.skws-prog-head b { font-size: 12.5px; color: var(--ink); font-weight: 600; letter-spacing: .2px; }
.skws-prog-state {
  font-size: 10px; padding: 1px 7px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.skws-prog-state.is-run { color: #6d5ce7; border-color: rgba(109, 92, 231, .35); background: rgba(109, 92, 231, .08); }
.skws-prog-state.is-ok { color: #0f9d58; border-color: rgba(15, 157, 88, .30); background: rgba(15, 157, 88, .08); }
.skws-prog-state.is-bad { color: #d93025; border-color: rgba(217, 48, 37, .30); background: rgba(217, 48, 37, .07); }
.skws-prog-video {
  width: 100%; max-height: 320px; border-radius: 10px; background: #000;
  object-fit: contain; display: block;
}
.skws-prog-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.skws-prog-fill {
  height: 100%; border-radius: 999px;
  background: var(--tech-grad, linear-gradient(90deg, #6366f1, #a855f7));
  transition: width .45s ease;
}
/* 右栏「生成进度」只承载生视频进度：脚本卡片已整体移出，
   改由底栏「脚本」入口打开浮层查看（样式见下方 .skws-sheet）。 */
.skws-prog-meta { font-size: 10.5px; color: var(--muted); line-height: 1.5; }
.skws-prog-ops { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.skws-prog-note { font-size: 10px; color: var(--faint); line-height: 1.6; }
.skws-prog-err {
  font-size: 11px; color: #d93025; line-height: 1.6;
  background: rgba(217, 48, 37, .06); border: 1px solid rgba(217, 48, 37, .20);
  border-radius: 8px; padding: 8px 10px;
}

/* --- 脚本浮层：脚本 / 台词 / 分镜全文，与生视频进度解耦 --- */
.skws-script-btn {
  border: none; background: transparent; color: #2f6bff; font-size: 11px;
  cursor: pointer; padding: 3px 6px; border-radius: 6px;
}
.skws-script-btn:hover { background: rgba(47, 107, 255, .08); }
.skws-sheet { display: flex; flex-direction: column; gap: 10px; }
.skws-sheet-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.skws-sheet-head b {
  font-size: 14px; color: var(--ink); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.skws-sheet-badge {
  flex: none; font-size: 9px; padding: 1px 6px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.skws-sheet-badge.is-llm { color: #6d5ce7; border-color: rgba(109, 92, 231, .35); background: rgba(109, 92, 231, .06); }
.skws-sheet-meta { font-size: 11px; color: var(--muted); line-height: 1.5; }
/* 续写基础：让用户看到脚本是从自己写的那句话接下去的 */
.skws-sheet-brief {
  font-size: 10px; color: var(--ink-soft); line-height: 1.6;
  background: var(--panel-soft); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 8px; margin: 6px 0 8px;
}
.skws-sheet-brief b { color: var(--muted); font-weight: 600; margin-right: 4px; }
.skws-sheet-lines {
  display: flex; flex-direction: column; gap: 7px;
  max-height: 46vh; overflow: auto; padding: 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft);
}
.skws-sheet-line { display: flex; gap: 8px; }
.skws-sheet-no {
  flex: none; width: 17px; height: 17px; margin-top: 1px; border-radius: 50%;
  background: var(--line); color: var(--muted);
  font-size: 9px; line-height: 17px; text-align: center;
}
.skws-sheet-line-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.skws-sheet-line-body b { font-size: 11px; color: var(--ink); font-weight: 600; }
.skws-sheet-line-body span { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.skws-sheet-full > summary { cursor: pointer; font-size: 11px; color: var(--muted); }
.skws-sheet-full .sk-script { margin-top: 6px; max-height: 34vh; overflow: auto; }
.skws-res-example {
  margin-left: auto; font-size: 10px; color: var(--muted);
  background: none; border: none; cursor: pointer; text-decoration: underline;
  padding: 0;
}
.skws-res-example:hover { color: var(--ink); }

/* ===== 20261120r-del: 素材条右上角删除角标（悬停浮现，点击删除并重编号） ===== */
.skws-mat-del {
  position: absolute; top: 0; right: 0;
  width: 16px; height: 16px; line-height: 14px; text-align: center;
  font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(17, 19, 23, .68); border-bottom-left-radius: 8px;
  cursor: pointer; pointer-events: auto; user-select: none; z-index: 3;
  opacity: 0; transition: opacity .14s ease, background .14s ease, color .14s ease;
}
.skws-mat:hover .skws-mat-del,
.skws-mat:focus-visible .skws-mat-del,
.skws-mat-del:focus { opacity: 1; }
.skws-mat-del:hover { background: #e5484d; color: #fff; }
html[data-theme="light"] .skws-mat-del { background: rgba(60, 64, 70, .6); }
html[data-theme="light"] .skws-mat-del:hover { background: #d93036; }
/* 触屏没有 hover：常显半透明，点按仍可删除 */
@media (hover: none) {
  .skws-mat-del { opacity: .85; width: 18px; height: 18px; font-size: 13px; }
}
