/* =========================================================
   公共提示词组件（Prompt Composer）
   —— 与「生成」页输入框同一套视觉：参考图堆叠 + 模式/模型/参数 + 积分预估 + 发送
   使用方：生成页（creation_generate.html）、灵感首页（index.html）
   ========================================================= */

/* 参考图堆叠区在输入框内部左侧 */
.gb-body { display: flex; align-items: flex-start; gap: 10px; }
/* 文本区容器必须建立定位上下文：镜像层才能与 textarea 完全重合（含左侧参考图栏偏移）。
   字号/行高定义在容器上，textarea 与镜像层都 inherit —— 任一端改字号（如移动端放大）
   两层自动保持一致，否则镜像层里的引用胶囊会按错误字号排版、定位全偏 */
.gb-ta-wrap { position: relative; flex: 1; min-width: 0; display: flex; font-size: 13px; line-height: 1.5; }
.gb-ta-wrap > .pc-prompt { position: relative; z-index: 1; }
/* 拖拽调高把手：移到输入框顶部中央，hover 边框时出现上下箭头 */
.gb-resize {
  position: absolute; left: 50%; top: -6px; transform: translateX(-50%);
  width: 58px; height: 12px; display: flex; align-items: center; justify-content: center;
  gap: 3px; color: #6c6c78; font-size: 8px; cursor: ns-resize; z-index: 3;
  border-radius: 6px; opacity: 0; transition: opacity .15s, color .15s, background .15s;
  touch-action: none;
}
.gb-input-box:hover .gb-resize, .gb-resize:hover, .gb-resize.dragging { opacity: 1; }
.gb-resize:hover, .gb-resize.dragging { color: #8ab4ff; background: rgba(77,124,255,.12); }
.gb-rail { flex: 0 0 54px; width: 54px; height: 54px; position: relative; margin-top: 2px; }
.gb-rail .gb-rail-add {
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border: 1px dashed #3a3a44; border-radius: 12px;
  background: #131316; color: #8a8a92; font-size: 18px; cursor: pointer; transition: .2s;
}
.gb-rail .gb-rail-add:hover { border-color: #4d7cff; color: #8ab4ff; }
/* 有图时：缩略图角度堆叠，+ 变成右下角小圆钮 */
.gb-rail.has-refs .gb-rail-add {
  position: absolute; right: -9px; bottom: -9px; width: 22px; height: 22px;
  border: 0; border-radius: 50%; background: #4d7cff; color: #fff; font-size: 10px; z-index: 10;
}
.gb-rail.has-refs .gb-rail-add:hover { background: #5f8bff; color: #fff; }
.gb-rail.has-refs .gb-rail-item {
  position: absolute; left: 0; top: 0; width: 54px; height: 54px; cursor: pointer;
  transform: translate(var(--jx, 0), var(--jy, 0)) rotate(var(--rot, 0deg));
  transition: transform .26s cubic-bezier(.2,.8,.2,1);
}
.gb-rail-item img {
  width: 54px; height: 54px; border-radius: 12px; object-fit: cover; display: block;
  border: 2px solid #232329; box-sizing: border-box; box-shadow: 0 3px 10px rgba(0,0,0,.6);
}
.gb-rail.pop-open .gb-rail-item, .gb-rail.pop-open .gb-rail-add { visibility: hidden; }
.gb-ref-pop {
  position: fixed; z-index: 100; background: rgba(18,18,22,.95);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid #2c2c34; border-radius: 12px; padding: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.6); display: none;
  max-width: min(620px, 76vw);
}
.gb-ref-pop.show { display: block; }
/* 内边距只放网格上（8px）：既容纳外凸 7px 的删除钮不被 overflow 裁剪，
   又让首图与输入框堆叠区同高（浮层 top 已按 8px 回让，不再叠一层 padding 造成下移） */
.gb-ref-pop .gb-pop-grid { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; max-width: 100%; padding: 8px; }
.gb-ref-pop .gb-pop-grid::-webkit-scrollbar { height: 4px; }
.gb-ref-pop .gb-pop-grid::-webkit-scrollbar-thumb { background: #33333c; border-radius: 2px; }
.gb-ref-pop .pop-item { position: relative; width: 54px; height: 54px; flex-shrink: 0; cursor: pointer; }
.gb-ref-pop .pop-item img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; display: block; }
.gb-ref-pop .pop-item:hover img { opacity: .6; }
.gb-ref-pop .pop-item:hover { z-index: 2; }
.gb-ref-pop .pop-corner {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; padding: 2px 5px;
  background: rgba(0,0,0,.55); color: #fff; line-height: 1.4; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-radius: 0 0 10px 10px; pointer-events: none;
}
.gb-ref-pop .pop-del {
  display: none; position: absolute; top: -7px; right: -7px; z-index: 6;
  width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.85);
  border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: 10px; cursor: pointer;
  align-items: center; justify-content: center;
}
.gb-ref-pop .pop-del:hover { background: #d95b5b; border-color: #d95b5b; }
.gb-ref-pop .pop-item:hover .pop-del { display: flex; }
.gb-ref-pop .pop-add {
  display: flex; align-items: center; justify-content: center; width: 54px; height: 54px;
  border: 1px dashed #3a3a44; border-radius: 10px; background: #1a1a1f;
  color: #cfcfd6; font-size: 18px; cursor: pointer; transition: .2s;
}
.gb-ref-pop .pop-add:hover { border-color: #4d7cff; color: #8ab4ff; }

.gb-box { position: relative; display: flex; flex-direction: column; gap: 8px; }
.gb-input-box {
  display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 7px;
  background: rgba(22,22,27,.92); border: 1px solid #2a2a31; border-radius: 14px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color .2s, box-shadow .2s;
}
.gb-input-box:focus-within { border-color: #3f4d7a; box-shadow: 0 0 0 3px rgba(77,124,255,.12); }
#genPrompt, .pc-prompt {
  flex: 1; border: 0; outline: 0; background: transparent; resize: none;
  color: #ececf0; font-size: inherit; line-height: inherit; min-height: 96px; max-height: 150px;
  font-family: inherit; min-width: 0; padding-top: 3px;
}
#genPrompt::placeholder, .pc-prompt::placeholder { color: #5c5c66; }

.gb-bar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.gb-mode, .gb-model, .gb-params, .gb-refmode { position: relative; }
.gb-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: #c8c8d0;
  background: #18181d; border: 1px solid #26262e; border-radius: 9px; padding: 6px 11px;
  cursor: pointer; white-space: nowrap; transition: border-color .15s, color .15s;
}
.gb-pill:hover { border-color: #3a3a46; color: #fff; }
.gb-pill > i:last-child { font-size: 8px; opacity: .55; }
.gb-pill .pill-ic { font-size: 11px; color: #8ab4ff; }
.gb-pill .pill-txt { overflow: hidden; text-overflow: ellipsis; max-width: 170px; }

.gb-pop {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 75;
  background: #202026; border: 1px solid #34343e; border-radius: 12px;
  box-shadow: 0 -10px 34px rgba(0,0,0,.55); display: none;
}
.gb-pop.show { display: block; }
/* 上方空间不足时由 JS 翻到下方，阴影方向随之调整 */
.gb-pop.pop-down { box-shadow: 0 12px 34px rgba(0,0,0,.55); }

.gb-mode-menu { min-width: 176px; padding: 5px; }
.gb-mode-item {
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent;
  color: #cfcfd6; font-size: 11.5px; padding: 7px 10px; border-radius: 7px; cursor: pointer; text-align: left;
}
.gb-mode-item:hover { background: #2c2c34; color: #fff; }
.gb-mode-item.on { color: #8ab4ff; }
.gb-mode-item.disabled { opacity: .35; cursor: not-allowed; }
.gb-mode-item.disabled:hover { background: transparent; color: #cfcfd6; }
.gb-mode-item .soon { margin-left: auto; font-size: 9.5px; color: #6f6f78; }

.gb-param-pop { min-width: 288px; padding: 10px 12px; }
.gb-param-sec { margin-bottom: 10px; }
.gb-param-sec:last-child { margin-bottom: 2px; }
.gb-param-label { font-size: 10px; color: #6f6f78; margin-bottom: 6px; }
.gb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gb-chip {
  border: 1px solid #2c2c34; background: #1a1a1f; color: #a8a8b0; font-size: 11px;
  padding: 4px 10px; border-radius: 7px; cursor: pointer; transition: all .14s;
}
.gb-chip:hover { border-color: #3a3a46; color: #e0e0e6; }
.gb-chip.on { border-color: #4d7cff; background: #1c2536; color: #cfe0ff; }
.gb-chip.disabled { opacity: .3; pointer-events: none; }
.gb-dur-row { display: flex; align-items: center; gap: 10px; }
.gb-dur-row input[type="range"] { flex: 1; accent-color: #4d7cff; min-width: 120px; }
.gb-dur-val { font-size: 11.5px; color: #cfe0ff; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }

/* 单列列表：宽度不变，保证模型名称与介绍完整展示；当前模型右侧对钩 + 浅色选中底 */
.gb-model-pop {
  width: 560px; max-width: min(560px, 88vw); max-height: 360px; overflow-y: auto;
  padding: 6px;
}
.gb-model-pop.show { display: block; }
.model-card {
  position: relative; width: 100%; text-align: left; border: 1px solid transparent;
  background: transparent; border-radius: 9px; padding: 7px 30px 7px 9px; cursor: pointer;
  display: flex; flex-direction: column; gap: 3px;
  color: #cfcfd6; transition: border-color .15s, background .15s; min-width: 0; box-sizing: border-box;
}
.model-card + .model-card { margin-top: 2px; }
.model-card:hover { background: #26262d; }
.model-card.on { background: #1e2230; border-color: #2f3648; }
.model-card .m-check {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: #8ab4ff; display: none;
}
.model-card.on .m-check { display: block; }
.model-card .m-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.model-card .m-name {
  flex: 0 1 auto; min-width: 0; font-size: 12.5px; color: #fff; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.model-card .m-tags { flex: 0 0 auto; margin-left: auto; display: flex; flex-wrap: nowrap; gap: 4px; }
.model-card .m-tag {
  font-size: 9.5px; color: #8ab4ff; background: #1b2537; padding: 1px 6px;
  border-radius: 5px; white-space: nowrap;
}
/* 计费规则与尺寸/时长同排展示，不再单独占一行 */
.model-card .m-tag.price { color: #ffc24d; background: #2a2416; }
/* 介绍最多两行完整展示，不再单行截断 */
.model-card .m-desc {
  font-size: 10.5px; color: #8a8a94; line-height: 1.5; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}

.gb-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.gb-polish {
  border: 1px solid #2a2a33; background: #18181d; color: #a8a8b0; font-size: 11.5px;
  padding: 6px 10px; border-radius: 9px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; transition: all .15s;
}
.gb-polish:hover { border-color: #3d4a6b; color: #cfe0ff; }
.gb-polish.loading { opacity: .6; pointer-events: none; }
.gb-polish i { font-size: 10px; color: #8ab4ff; }
/* 仅图标形态：紧凑对称内边距，文案在 title 上，给胶囊条让位 */
.gb-polish.icon-only { padding: 6px 8px; }
.gb-polish.icon-only i { font-size: 11.5px; }
.gb-quote { font-size: 11px; color: #7c7c86; font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.gb-quote i { font-size: 10px; color: #ffc24d; opacity: .85; }
.gb-quote b { color: #ffc24d; font-weight: 500; }
.gb-send {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #4d7cff, #6a5cff); color: #fff; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: filter .18s, transform .12s;
}
.gb-send:hover { filter: brightness(1.12); }
/* 未登录：置灰禁用 */
.gb-send.is-guest {
  background: #34343e; color: #7c7c86; cursor: not-allowed; filter: none;
}

/* ================= 移动端（≤820px）：胶囊条一列平铺 =================
   组件级通用能力：模式/模型/参考/参数逐个占满整行，方便点选；操作组收尾右对齐。
   首页与生成页共用此规则（生成页另有一份内联等价实现，改动需两边同步） */
@media (max-width: 820px) {
  .gb-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .gb-bar > div { width: 100%; }
  .gb-pill { width: 100%; box-sizing: border-box; }
  .gb-pill .pill-txt { max-width: none; }
  .gb-actions { margin-left: 0; justify-content: flex-end; }
  .gb-pop { left: 0; right: auto; }
}
.gb-send.is-guest:hover { filter: none; }
.gb-guest-tip { font-size: 10.5px; color: #8a8a92; white-space: nowrap; }
.gb-send:active { transform: scale(.94); }
.gb-send.loading { pointer-events: none; opacity: .65; }
.gb-send.not-enough { background: linear-gradient(135deg, #8a4a4a, #a8534a); }

/* 「+」添加菜单：fixed 定位，在 + 号右侧展开 */
.gb-plus-menu {
  position: fixed; z-index: 103; min-width: 150px;
  background: #202026; border: 1px solid #34343e; border-radius: 10px; padding: 5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.55); display: none;
}
.gb-plus-menu.show { display: block; }
.gb-plus-item {
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent;
  color: #cfcfd6; font-size: 11.5px; padding: 7px 10px; border-radius: 7px; cursor: pointer; text-align: left;
}
.gb-plus-item:hover { background: #2c2c34; color: #fff; }
.gb-plus-item i { width: 14px; font-size: 11px; color: #8a8a92; }

/* @ 菜单：按 @ 字符位置定位（fixed），条目 + 底部「添加图片 / 添加主体」 */
.gb-at-menu {
  position: fixed; top: 0; left: 0; z-index: 9000; min-width: 248px; max-width: 420px;
  background: #202026; border: 1px solid #34343e; border-radius: 10px; padding: 5px;
  box-shadow: 0 12px 34px rgba(0,0,0,.55); display: none; max-height: 300px; overflow-y: auto;
}
.gb-at-menu.show { display: block; }
.gb-at-sec { font-size: 9.5px; color: #6f6f78; padding: 5px 10px 2px; }
/* 图片 / 主体两组：上下两行 */
.gb-at-groups { display: block; }
.gb-at-group { display: flex; flex-direction: column; min-width: 0; }
.gb-at-group + .gb-at-group { margin-top: 2px; padding-top: 3px; border-top: 1px solid #2a2a33; }
.gb-at-cap { font-size: 9.5px; color: #6f6f78; padding: 4px 8px 3px; letter-spacing: .4px; }
.gb-at-item {
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent;
  color: #cfcfd6; font-size: 11.5px; padding: 6px 8px; border-radius: 7px; cursor: pointer; text-align: left;
}
.gb-at-item:hover { background: #2c2c34; }
.gb-at-item img, .gb-at-item .at-ic {
  width: 26px; height: 26px; border-radius: 6px; object-fit: cover; flex: 0 0 auto;
}
.gb-at-item .at-ic {
  display: flex; align-items: center; justify-content: center;
  background: #1b2233; border: 1px solid #2a3550; color: #8ab4ff; font-size: 11px;
}
.gb-at-item .at-meta { min-width: 0; display: flex; flex-direction: column; }
.gb-at-item .at-meta b { font-weight: 500; color: #e6e6ec; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-at-item .at-meta span { font-size: 9.5px; color: #6f6f78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-at-empty { font-size: 10.5px; color: #6f6f78; line-height: 1.7; padding: 8px 10px 6px; }
.gb-at-empty b { color: #8ab4ff; font-weight: 500; }
/* 底部「资产库 / 主体库」：上下两行，不做左右并排 */
.gb-at-add { display: flex; flex-direction: column; gap: 4px; padding: 6px 2px 2px; margin-top: 4px; border-top: 1px solid #2c2c34; }
.gb-at-add button {
  width: 100%; display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px;
  border: 1px solid #2c2c34; background: #1a1a1f; color: #b9b9c2; font-size: 10.5px;
  padding: 7px 9px; border-radius: 7px; cursor: pointer; white-space: nowrap; box-sizing: border-box;
}
.gb-at-add button:hover { border-color: #4d7cff; color: #cfe0ff; background: #1c2536; }
.gb-at-add button i { font-size: 10px; color: #8ab4ff; }

/* 提示词框内的引用标签：镜像层之上用实底胶囊盖住 token 文本，
   宽度 = token 文本宽度（保证后续文字与光标对齐），内部放缩略图 + 类型 icon + 名称 */
.gb-mirror {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2;
  color: transparent; font-size: inherit; line-height: inherit; font-family: inherit;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word;
  padding-top: 3px; padding-right: 2px;
}
.gb-mirror .pc-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 19px; margin: 0;
  /* 左右各 5px 透明边框：胶囊底色内缩，左侧正好盖住 token 开头的 @，右侧给光标留出空隙 */
  padding: 0 2px; border: 0 solid transparent; border-left-width: 5px; border-right-width: 5px;
  border-radius: 8px; box-sizing: border-box; overflow: hidden;
  background: #232a3a; background-clip: padding-box; box-shadow: inset 0 0 0 1px #34405c;
  color: #cfe0ff; font-size: 11px; line-height: 13px; vertical-align: top; white-space: nowrap;
  font-weight: 500; letter-spacing: .1px;
}
.gb-mirror .pc-chip img { width: 14px; height: 14px; border-radius: 4px; object-fit: cover; display: block; flex: 0 0 auto; }
.gb-mirror .pc-chip > i { font-size: 9px; color: #8ab4ff; flex: 0 0 auto; }
.gb-mirror .pc-chip .chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.gb-mirror .pc-chip.subj { background: #2a2336; box-shadow: inset 0 0 0 1px #4a3a62; color: #dccbff; }
.gb-mirror .pc-chip.subj > i { color: #b18aff; }

/* 弹窗头部刷新按钮的转动反馈 */
.refpick-head button.spin i { animation: rpSpin .7s linear infinite; }
@keyframes rpSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* 参考图选择弹窗（+ → 资产库/主体库） */
.refpick-mask {
  position: fixed; inset: 0; z-index: 9997; background: rgba(5,5,7,.8);
  display: none; align-items: center; justify-content: center; padding: 30px;
}
.refpick-mask.show { display: flex; }
.refpick-modal {
  width: 860px; max-width: 94vw; height: min(640px, 86vh); background: #16161a;
  border: 1px solid #2c2c34; border-radius: 14px; display: flex; flex-direction: column; overflow: hidden;
}
.refpick-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #222228; flex: 0 0 auto; }
.refpick-head b { flex: 1; font-size: 13.5px; color: #fff; }
.refpick-head button { border: 0; background: transparent; color: #8a8a92; cursor: pointer; font-size: 13px; }
.refpick-tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid #222228; overflow-x: auto; flex: 0 0 auto; }
.refpick-tab {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: #9a9aa4; font-size: 12px; white-space: nowrap;
  padding: 10px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.refpick-tab i { font-size: 11px; color: #7c7c86; }
.refpick-tab:hover { color: #d8d8de; }
.refpick-tab:hover i { color: #b8b8c0; }
.refpick-tab.on { color: #fff; border-bottom-color: #4d7cff; }
.refpick-tab.on i { color: #8ab4ff; }
.refpick-subbar { display: none; align-items: center; gap: 6px; padding: 10px 16px 0; }
.refpick-subbar.show { display: flex; }
.refpick-subbar .rp-chip {
  border: 1px solid #2c2c34; background: #1a1a1f; color: #a8a8b0; font-size: 10.5px;
  padding: 3px 10px; border-radius: 7px; cursor: pointer;
}
.refpick-subbar .rp-chip.on { border-color: #4d7cff; background: #1c2536; color: #cfe0ff; }
.refpick-cell.rp-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; min-height: 130px; border-style: dashed; color: #8a8a92; font-size: 11px;
}
.refpick-cell.rp-add i { font-size: 18px; }
.refpick-cell.rp-add:hover { border-color: #4d7cff; color: #8ab4ff; }
.refpick-grid {
  flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px;
  align-content: start; grid-auto-rows: max-content;
}
.refpick-cell {
  position: relative; border: 1px solid #26262c; border-radius: 9px; overflow: hidden;
  background: #101013; cursor: pointer; transition: border-color .15s;
}
.refpick-cell:hover { border-color: #3a3a46; }
.refpick-cell.sel { border-color: #4d7cff; box-shadow: 0 0 0 1px #4d7cff; }
.refpick-cell.sel::after {
  content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%;
  background: #4d7cff; color: #fff; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
}
.refpick-cell .c-img { position: relative; width: 100%; height: 104px; overflow: hidden; background: #15151a; }
.refpick-cell .c-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 素材选择模式（剪辑器）：视频时长角标 + 无缩略图占位 */
.refpick-cell .rp-dur {
  position: absolute; right: 6px; bottom: 6px; font-size: 9.5px; color: #fff;
  background: rgba(0,0,0,.72); padding: 1px 6px; border-radius: 5px;
}
.refpick-cell .rp-novid {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: #4a4a55; font-size: 22px;
}
.refpick-cell .c-name {
  font-size: 10.5px; color: #cfcfd6; padding: 5px 7px 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.refpick-foot {
  display: none; align-items: center; gap: 12px; justify-content: flex-end;
  padding: 10px 16px; border-top: 1px solid #222228; font-size: 11.5px; color: #8a8a92;
}
.refpick-foot.show { display: flex; }
.refpick-more {
  grid-column: 1 / -1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 0 16px; font-size: 11px; color: #6f6f78;
}
.refpick-more .fm-spin {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid #33333c; border-top-color: #7aa2ff; animation: fmSpin .7s linear infinite;
}
@keyframes fmSpin { to { transform: rotate(360deg); } }
.refpick-foot b { color: #8ab4ff; }
.refpick-ok {
  border: 0; border-radius: 8px; padding: 7px 16px; cursor: pointer;
  background: linear-gradient(135deg, #4d7cff, #6a5cff); color: #fff; font-size: 12px;
}

/* 生成中排队条（生成页用） */
.gen-queue { display: flex; flex-direction: column; gap: 6px; }

/* 首页轻提示（底部居中） */
.pc-toast {
  position: fixed; left: 50%; bottom: 42px; z-index: 12000;
  transform: translateX(-50%) translateY(10px);
  background: #232329; color: #eaeaef; border: 1px solid #34343e; border-radius: 10px;
  padding: 9px 16px; font-size: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.55);
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
}
.pc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pc-toast.err { border-color: #5a2b2b; color: #ffb3a4; }

/* ============ 时长滑块刻度（范围语义：min~max 任意整数秒） ============ */
.gb-dur-scale { display: flex; justify-content: space-between; font-size: 9.5px; color: #5f5f68; padding: 2px 2px 0; }

/* ============ 参考能力菜单（全能参考 / 首尾帧） ============ */
.gb-refmode-menu { min-width: 152px; padding: 5px; }

/* ============ 首尾帧图位（rail 内，与全能参考互斥） ============ */
.gb-rail.fl-mode { flex: 0 0 auto; width: auto; display: flex; gap: 8px; align-items: center; }
.gb-rail.fl-mode .gb-rail-add { display: none; }
.gb-frame-slot {
  position: relative; width: 50px; height: 50px; border-radius: 10px; cursor: pointer;
  border: 1px dashed #3a3a44; background: #16161a; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: #6f6f78; font-size: 9.5px; transition: border-color .16s, color .16s;
}
.gb-frame-slot:hover { border-color: #4d7cff; color: #8ab4ff; }
.gb-frame-slot.filled { border-style: solid; border-color: #2c2c34; }
.gb-frame-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.gb-frame-slot .fs-tag { position: relative; z-index: 1; pointer-events: none; }
.gb-frame-slot.filled .fs-tag {
  position: absolute; left: 3px; bottom: 3px; font-size: 8.5px; color: #fff; z-index: 1;
  background: rgba(10,10,14,.72); border-radius: 5px; padding: 0 4px; line-height: 14px;
}
.gb-frame-slot .fs-del {
  position: absolute; top: -5px; right: -5px; z-index: 2; width: 15px; height: 15px;
  border-radius: 50%; background: #2c2c34; color: #cfcfd6; font-size: 8px;
  display: none; align-items: center; justify-content: center; border: 1px solid #44444e;
}
.gb-frame-slot.filled:hover .fs-del { display: flex; }

/* 参考图弹窗单选模式（首尾帧选图）：点一张即选定，隐藏底部确认栏 */
.refpick-mask.single .refpick-foot { display: none !important; }
