/* ai-server 剧创工作台 — 设计语言仿 storyboardworkflow(暗色主题) */
:root {
  /* 暗色主题:原生控件(下拉列表、数字微调按钮、滚动条)跟随暗色渲染 */
  color-scheme: dark;
  --bg: #0f1117;
  --bg-surface: #181b25;
  --bg-elev: #1f2330;
  --border: #2a2f3f;
  --text: #e6e8ee;
  --muted: #8b91a3;
  --primary: #6366f1;
  --primary-2: #4f46e5;
  --green: #34c98e;
  --red: #e5534b;
  --orange: #d9a53a;
  --blue: #4f8cff;
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* 隐藏所有滚动条(宽高 0,保留滚动能力) */
* { scrollbar-width: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }
html, body { height: 100%; }
/* 内联 SVG 图标:跟随文字颜色、与文字基线对齐 */
.ic { vertical-align: -0.18em; flex: none; pointer-events: none; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }

/* ===== 顶栏 & 侧栏 ===== */
#shell { display: flex; flex-direction: column; height: 100vh; }
.topbar {
  height: 56px; flex: none; display: flex; align-items: center; gap: 16px;
  padding: 0 20px; background: var(--bg-surface); border-bottom: 1px solid var(--border);
}
.logo { font-size: 16px; font-weight: 700; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.logo .ico { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6366f1, #a855f7); font-size: 14px; }
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--muted); font-size: 13px; }
.body { flex: 1; display: flex; min-height: 0; }
.sider {
  width: 200px; flex: none; background: var(--bg-surface); border-right: 1px solid var(--border);
  padding: 12px 10px; overflow-y: auto;
}
.sider .grp { color: var(--muted); font-size: 11px; padding: 10px 10px 4px; letter-spacing: .08em; }
.sider a {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px; margin: 2px 0;
  border-radius: 8px; color: var(--text); font-size: 14px; cursor: pointer;
}
.sider a:hover { background: var(--bg-elev); }
.sider a.active { background: rgba(99,102,241,.16); color: #a5b4fc; font-weight: 600; }
#view { flex: 1; min-width: 0; overflow-y: auto; padding: 20px 24px 60px; }
#view.full { padding: 0; overflow: hidden; display: flex; flex-direction: column; }

/* ===== 通用 ===== */
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 12px; }
.page-header { margin-bottom: 16px; }
.page-header h2 { font-size: 20px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.page-header h2 .muted { font-weight: 400; }
.page-header--row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.back-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--text); cursor: pointer; font-size: 15px; display: inline-flex; align-items: center; justify-content: center;
}
.back-btn:hover { border-color: var(--primary); color: var(--primary); }
.section-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 4px; font-size: 17px; font-weight: 700; }
.section-title .ico { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.section-meta { color: var(--muted); font-size: 12px; margin: 0 0 12px 40px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 16px; font-size: 13px; cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.btn:hover { border-color: var(--muted); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(99,102,241,.25); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: #7678f5; border-color: #7678f5; }
.btn.primary:active { background: var(--primary-2); }
.btn.danger { color: var(--red); }
.btn.big { padding: 10px 22px; font-size: 14px; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.text { background: none; border: none; color: var(--muted); padding: 4px 8px; }
.btn.text:hover { color: var(--text); }

input[type=text], input[type=number], input[type=password], textarea, select {
  width: 100%; background: var(--bg-elev); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; font-size: 14px; outline: none; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: #565d72; }
input:hover, textarea:hover, select:hover { border-color: #3d4663; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(99,102,241,.18); }
textarea { resize: vertical; min-height: 72px; }
/* 下拉框(仿 Ant):隐藏原生箭头,自绘 chevron */
select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b91a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
select option { background: var(--bg-elev); color: var(--text); }
/* 多选框(仿 Ant):自绘方框 + 对勾 */
input[type=checkbox] {
  appearance: none; -webkit-appearance: none; width: 16px; height: 16px; flex: none; margin: 0;
  border: 1px solid #3d4663; border-radius: 4px; background: var(--bg-elev); cursor: pointer;
  position: relative; vertical-align: -3px; transition: all .18s;
}
input[type=checkbox]:hover { border-color: var(--primary); }
input[type=checkbox]:checked { background: var(--primary); border-color: var(--primary); }
input[type=checkbox]:checked::after {
  content: ""; position: absolute; left: 30%; top: 12%; width: 26%; height: 50%;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg);
}
input[type=checkbox]:focus-visible { box-shadow: 0 0 0 2px rgba(99,102,241,.25); outline: none; }
/* Ant 风格下拉框:触发器同输入框;弹层圆角+阴影+行悬停/选中态,空间不足自动向上 */
.dd { position: relative; width: 100%; }
.dd-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg-elev); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-size: 14px; cursor: pointer; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.dd-btn:hover { border-color: #3d4663; }
.dd-btn:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(99,102,241,.18); }
.dd-btn .dd-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn .ic { color: var(--muted); }
.dd-pop {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 95;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.5); padding: 4px; max-height: 244px; overflow-y: auto;
  animation: mpop .15s ease-out;
}
.dd-pop--up { top: auto; bottom: calc(100% + 4px); }
.dd-opt { padding: 7px 10px; border-radius: 6px; font-size: 13px; color: var(--text); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .12s; }
.dd-opt:hover { background: var(--bg-surface); }
.dd-opt.on { color: var(--primary); background: rgba(99,102,241,.14); font-weight: 500; }
.dd-group { position: sticky; top: -4px; z-index: 1; padding: 6px 10px 4px; margin-top: 2px;
  background: var(--bg-elev); font-size: 11px; letter-spacing: .04em; color: var(--muted); }
.dd-group:first-child { margin-top: 0; }
.cfg-dd { flex: 1; min-width: 0; }
.cfg-row .dd-btn { padding: 5px 10px; font-size: 13px; }
/* 单选框(仿 Ant):自绘圆点 */
input[type=radio] {
  appearance: none; -webkit-appearance: none; width: 16px; height: 16px; flex: none; margin: 0;
  border: 1px solid #3d4663; border-radius: 50%; background: var(--bg-elev); cursor: pointer;
  position: relative; vertical-align: -3px; transition: all .18s;
}
input[type=radio]:hover { border-color: var(--primary); }
input[type=radio]:checked { border-color: var(--primary); }
input[type=radio]:checked::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary);
}
label.f { display: block; color: var(--muted); font-size: 12px; margin: 12px 0 4px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 120px; }

.tag { display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 11px; line-height: 18px; white-space: nowrap; }
.tag-gray { background: rgba(139,145,163,.15); color: var(--muted); }
.tag-blue { background: rgba(79,140,255,.15); color: var(--blue); }
.tag-green { background: rgba(52,201,142,.15); color: var(--green); }
.tag-orange { background: rgba(217,165,58,.15); color: var(--orange); }
.tag-purple { background: rgba(99,102,241,.18); color: #a5b4fc; }
.tag-red { background: rgba(229,83,75,.15); color: var(--red); }

.empty { text-align: center; color: var(--muted); padding: 48px 0; font-size: 13px; }
.sk { background: linear-gradient(90deg, var(--bg-elev) 25%, #262b3a 50%, var(--bg-elev) 75%); background-size: 200% 100%;
  animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff;
  border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ===== 卡片网格 ===== */
.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(240px, calc((100% - 48px)/4)), 1fr)); gap: 16px; }
.card--link { cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; display: block; color: inherit; }
.card--link:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.proj-cover { width: calc(100% + 40px); margin: -20px -20px 12px; aspect-ratio: 16/9; object-fit: cover;
  border-radius: 12px 12px 0 0; background: var(--bg-elev); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.proj-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px 12px 0 0; }
.card h3 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.card .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; margin-top: 8px; }

/* ===== 资产统计卡 ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.stat-card { border-radius: 14px; padding: 18px 20px; cursor: pointer; display: flex; align-items: center; gap: 14px;
  color: #fff; transition: transform .15s, box-shadow .15s; border: none; text-align: left; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.4); }
.stat-card.purple { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.stat-card.green { background: linear-gradient(135deg, #059669, #34d399); }
.stat-card.amber { background: linear-gradient(135deg, #b45309, #f59e0b); }
.stat-card.blue { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.stat-card .num { font-size: 30px; font-weight: 800; line-height: 1.1; }
.stat-card .lbl { font-size: 13px; opacity: .92; }
.fan { display: flex; margin-left: auto; }
.fan img { width: 52px; height: 70px; object-fit: cover; border-radius: 6px; border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 4px 12px rgba(0,0,0,.35); background: #000; }
.fan img:nth-child(1) { transform: rotate(-9deg) translateX(10px); }
.fan img:nth-child(3) { transform: rotate(9deg) translateX(-10px); }
.fan .ph { width: 52px; height: 70px; border-radius: 6px; border: 2px dashed rgba(255,255,255,.5); }

/* ===== 剧集卡 ===== */
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.ep-new {
  min-height: 150px; border-radius: var(--radius); cursor: pointer; display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: center; color: #fff; font-size: 15px; font-weight: 600;
  background: linear-gradient(135deg, rgba(147,51,134,.75), rgba(67,97,238,.75));
  border: 1px solid transparent; transition: transform .15s, box-shadow .15s;
}
.ep-new:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.4); }
.ep-new .plus { font-size: 26px; }
.ep-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; position: relative; }
.ep-card:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.ep-cover { aspect-ratio: 16/9; background: var(--bg-elev); display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 26px; position: relative; }
.ep-cover img, .ep-cover video { width: 100%; height: 100%; object-fit: cover; }
.ep-card .status { position: absolute; top: 8px; left: 8px; z-index: 2; }
.ep-body { padding: 10px 12px; }
.ep-body .t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-body .d { color: var(--muted); font-size: 11px; margin-top: 2px; display: flex; justify-content: space-between; }
.card-menu { position: absolute; top: 6px; right: 6px; z-index: 3; }

/* ===== 弹窗(仿 Ant Modal:遮罩淡入 + 卡片缩放入场,无分隔线) ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px);
  z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; animation: mfade .18s ease-out; }
.modal { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px; width: 480px; max-width: 96vw;
  max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0,0,0,.55); animation: mpop .2s ease-out; }
.modal-head { padding: 18px 24px 10px; display: flex; align-items: center; justify-content: space-between; flex: none; }
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-body { padding: 6px 24px 18px; overflow-y: auto; }
.modal-foot { padding: 4px 24px 20px; display: flex; justify-content: flex-end; gap: 10px; flex: none; }
.x-btn { background: none; border: none; color: var(--muted); cursor: pointer; width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; transition: all .18s; }
.x-btn:hover { color: var(--text); background: var(--bg-elev); }
@keyframes mfade { from { opacity: 0; } }
@keyframes mpop { from { opacity: 0; transform: scale(.96) translateY(8px); } }

/* ===== 资产库 ===== */
.pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pill { padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg-elev);
  color: var(--muted); cursor: pointer; font-size: 13px; }
.pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pill.sm { padding: 3px 12px; font-size: 12px; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.asset-card { aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; position: relative; background: var(--bg-elev);
  border: 1px solid var(--border); cursor: pointer; }
.asset-card img, .asset-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-card .nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.8)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-card .ck { position: absolute; top: 6px; left: 6px; z-index: 2; width: 18px; height: 18px; accent-color: var(--primary); }
.asset-card .del, .asset-card .rn { position: absolute; top: 4px; z-index: 2; background: rgba(0,0,0,.55); border: none; color: #fff;
  border-radius: 6px; width: 24px; height: 24px; cursor: pointer; opacity: 0; }
.asset-card .del { right: 4px; }
.asset-card .rn { right: 32px; }
.asset-card:hover .del, .asset-card:hover .rn { opacity: 1; }
.asset-card .play-ico { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: rgba(255,255,255,.9); text-shadow: 0 2px 8px rgba(0,0,0,.6); pointer-events: none; }
.batch-bar { position: sticky; bottom: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 14px; display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: 13px; }
.import-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.import-row .thumb { width: 46px; height: 46px; border-radius: 8px; background: var(--bg-elev); flex: none;
  display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 18px; }
.import-row .thumb img, .import-row .thumb video { width: 100%; height: 100%; object-fit: cover; }
.import-row input { flex: 1; }
.import-row .st { width: 110px; flex: none; font-size: 12px; color: var(--muted); text-align: right; }
.import-row .st.ok { color: var(--green); }
.import-row .st.err { color: var(--red); }

/* ===== 分镜工作台 ===== */
.ws-crumb { flex: none; padding: 12px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ws-crumb .ep-name { font-size: 15px; font-weight: 700; }
.ws-full { flex: 1; min-height: 0; display: flex; gap: 16px; padding: 0 16px 16px; }
.ws-col { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; min-height: 0; }
.ws-col--left { width: 176px; flex: none; }
.ws-col--mid { flex: 1; min-width: 320px; }
.ws-col--right { width: 600px; flex: none; display: flex; flex-direction: column; overflow: hidden; }
.ws-scroll { flex: 1; overflow-y: auto; min-height: 0; padding-right: 2px; }
.sb-col-header { font-size: 13px; font-weight: 700; margin-bottom: 10px; flex: none; }
/* 分镜卡:宽固定为列宽,高度随项目画幅变化(内联 aspect-ratio;无画幅默认 3/4,与 web-app 一致) */
.sb-vcard {
  position: relative; aspect-ratio: 3 / 4; border-radius: 10px; border: 2px solid var(--border); overflow: hidden; cursor: pointer;
  background: var(--bg-elev); display: flex; align-items: center; justify-content: center; color: var(--muted);
  transition: border-color .12s;
}
.sb-vcard img, .sb-vcard video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.sb-vcard--selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(99,102,241,.3); }
.sb-vcard.dragover { border-color: var(--orange); }
.sb-vcard__num { position: absolute; top: 4px; left: 6px; z-index: 2; font-size: 13px; font-weight: 600;
  color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.sb-vcard .del { position: absolute; top: 4px; right: 4px; z-index: 3; background: rgba(0,0,0,.55); border: none; color: #fff;
  border-radius: 6px; width: 22px; height: 22px; cursor: pointer; opacity: 0; font-size: 12px; }
.sb-vcard:hover .del { opacity: 1; }
.sb-insert-zone { height: 18px; display: flex; align-items: center; justify-content: center; }
.sb-insert-btn { width: 20px; height: 20px; border-radius: 50%; border: none; background: var(--bg-elev); color: var(--muted);
  cursor: pointer; opacity: .45; display: inline-flex; align-items: center; justify-content: center; }
.sb-insert-btn:hover { opacity: 1; background: var(--primary); color: #fff; }
.add-sb { height: 48px; flex: none; margin-top: 10px; }

.g-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: none; }
.g-desc { flex: none; color: var(--muted); font-size: 12px; margin: 8px 0 4px; display: flex; gap: 6px; align-items: center; }
.g-desc input { max-width: 420px; padding: 4px 8px; font-size: 12px; }
.g-group-t { font-size: 12px; color: var(--muted); margin: 12px 0 8px; font-weight: 600; }
/* 画廊列数随画幅:竖屏等每行最多 4 张;横屏项目(16:9 / 21:9)每行最多 3 张 */
.g-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(max(140px, calc((100% - 36px) / 4)), 1fr)); }
.g-grid--wide { grid-template-columns: repeat(auto-fill, minmax(max(176px, calc((100% - 24px) / 3)), 1fr)); }
.g-card { border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-elev);
  position: relative; cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
/* 悬停仿 web-app:卡片轻微上浮 + 主色描边;标签隐藏,浮出底部定稿大按钮 */
.g-card:hover { border-color: var(--primary); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.g-card:hover .meta .tag { visibility: hidden; }
.g-card .cv { background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }  /* 宽高比随项目画幅(内联) */
.g-card .cv img, .g-card .cv video { width: 100%; height: 100%; object-fit: contain; }
.g-card .meta { padding: 6px 8px; font-size: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.g-card .meta:empty { display: none; }  /* 生成视频无名称时不留白条 */
.g-card .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* 底部定稿大按钮(仿 web-app ag-confirm):悬停才出现 */
.g-confirm { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 3; display: none;
  align-items: center; justify-content: center; height: 34px; border: none; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
.g-card:hover .g-confirm { display: flex; }
.g-confirm:hover { filter: brightness(1.15); }
/* 取消定稿:白底黑字 */
.g-confirm--cancel { background: #fff; color: #111; }
.g-confirm--cancel:hover { filter: none; background: #f3f4f6; }
/* 悬停浮层工具条(仿 web-app ag-toolbar):fixed 定位在卡片上方,JS 算坐标 */
.g-toolbar { position: fixed; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 2px;
  background: rgba(22,22,26,.96); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.45); white-space: nowrap; }
.g-toolbar button, .g-toolbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; border: none;
  background: transparent; color: rgba(230,237,243,.85); font-size: 11px; line-height: 1; padding: 4px 10px;
  border-radius: 8px; cursor: pointer; text-decoration: none; }
.g-toolbar button:hover, .g-toolbar a:hover { background: rgba(255,255,255,.12); color: #fff; }
.g-toolbar span { font-size: 16px; line-height: 1; }
.g-toolbar i { width: 1px; height: 24px; background: rgba(255,255,255,.2); margin: 0 6px; }
.g-card .dur { position: absolute; right: 6px; top: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px;
  padding: 1px 7px; border-radius: 10px; z-index: 2; }
/* 生成中遮罩:毛玻璃 + 大号加载圈 + 实时已用时 */
.g-card .gen-mask { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 7px; align-items: center; justify-content: center;
  background: rgba(15,17,23,.68); backdrop-filter: blur(3px); color: #c6cbd8; font-size: 12px; z-index: 2; }
.g-card .gen-mask .spin { width: 20px; height: 20px; border-width: 2.5px; }
.gen-t { font-weight: 500; }
.gen-elapsed { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.gen-failed { display: inline-flex; align-items: center; gap: 6px; color: var(--red); font-weight: 500; }
.gen-cancelled { color: var(--muted); }
.gen-cancel {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; padding: 3px 12px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.22); background: rgba(0,0,0,.35);
  color: #cfd3dd; font-size: 11px; cursor: pointer; transition: border-color .15s, color .15s;
}
.gen-cancel:hover { border-color: var(--red); color: var(--red); }

/* ===== 右栏生成面板(布局仿 web-app:内容滚动 + 底部固定参数条/生成按钮) ===== */
/* 右栏:整列不再整体滚动;「素材选择 / 提示词」两块各自内部滚动、平分剩余高度,标题常驻可见 */
.rp-scroll { flex: 1; overflow: hidden; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.rp-sec { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--bg-elev); flex: none; }
.rp-sec--fill, .rp-sec--grow { flex: 1 1 0; min-height: 120px; display: flex; flex-direction: column; }
.rp-sec--fill > .t, .rp-sec--grow > .t { flex: none; }
.rp-sec--fill .rp-counts { flex: none; }
.rp-sec--fill .mat-grid { flex: 1; min-height: 0; overflow-y: auto; margin-bottom: 0; }
.rp-sec--fill .mat-add { flex: none; margin-top: 8px; }
.rp-sec--grow .prompt-box { flex: 1; min-height: 0; height: auto; }
.rp-sec--grow > .muted { flex: none; }
.rp-sec > .t { font-size: 13px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.rp-sec > .t .rp-actions { margin-left: auto; }
.rp-ghost { border: none; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 3px 8px; border-radius: 6px; }
.rp-ghost:hover { color: var(--text); background: var(--bg-surface); }
.rp-counts { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.rp-counts b { color: var(--text); }
/* 底部参数条:摘要芯片(点击弹配置)+ 立即生成 */
.rp-foot { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); position: relative; flex: none; }
.cfg { flex: 1; display: flex; align-items: center; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elev); cursor: pointer; font-size: 13px; color: var(--text); }
.cfg:hover { border-color: var(--primary); }
.cfg-item { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); white-space: nowrap; }
.cfg-item:not(:last-child)::after { content: ""; width: 1px; height: 12px; background: var(--border); margin:0 5px; }
.ratio-ic { display: inline-block; border: 1.5px solid currentColor; border-radius: 2px; flex: none; }
.cfg-pop { position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; z-index: 80; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.5); padding: 8px 12px; }
.cfg-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.cfg-label { width: 52px; flex: none; font-size: 12px; color: var(--muted); }
.cfg-row select, .cfg-row input[type=number] { flex: 1; margin: 0; }
.cfg-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.cfg-check input { width: 16px; height: 16px; margin: 0; vertical-align: -3px; }
.ratio-group { display: flex; gap: 6px; flex: 1; }
.ratio-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border: 1px solid var(--border); border-radius: 8px; background: none; color: var(--muted); font-size: 11px; cursor: pointer; }
.ratio-btn:hover { border-color: var(--primary); color: var(--text); }
.ratio-btn.on { border-color: var(--primary); color: var(--primary); background: rgba(99,102,241,.12); }
.ratio-btn:disabled { opacity: .35; cursor: not-allowed; }
.ratio-btn:disabled:hover { border-color: var(--border); color: var(--muted); }
/* ---------- 素材选择区(仿 web-app) ---------- */
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin-bottom: 8px; }
.mat-grid .muted { grid-column: 1 / -1; }
.mat { position: relative; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #000; cursor: pointer; }
.mat:hover { border-color: var(--primary); }
.mat img, .mat video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mat-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; text-shadow: 0 1px 4px rgba(0,0,0,.8); pointer-events: none; }
.mat-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; font-size: 10px; color: #fff; background: rgba(0,0,0,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.mat-rm { position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; line-height: 15px; text-align: center; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 10px; cursor: pointer; opacity: 0; }
.mat:hover .mat-rm { opacity: 1; }
.mat-rm:hover { background: var(--red); }
/* 外部引用角标:重新编辑恢复的参考图不在两个素材库里,仅有 URL(左上角,避开右上移除钮) */
.mat-ext { position: absolute; top: 3px; left: 3px; padding: 1px 4px; border-radius: 4px; font-size: 9px; line-height: 1.5; color: #fff; background: rgba(99,102,241,.85); pointer-events: none; }
/* 音频素材占位:无缩略图,音符图标 + 渐变底(画廊/资产卡/素材格/@ 列表通用,填满父容器) */
.aud-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2a2140, #17131f); color: #9d86d9; }
.pick-item .aud-ph { width: 36px; height: 36px; border-radius: 6px; flex: none; }
.mat-add { display: flex; gap: 8px; position: relative; }
/* 素材选择弹窗在右栏底部 → 向上展开,避免被列/盒子裁掉 */
.mat-add .pick-pop { top: auto; bottom: calc(100% + 6px); }

/* 素材选择弹窗:搜索 + 候选列表;候选悬停 → 左侧 fixed 大图预览(视频直接播放) */
.pick-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 300px; max-height: 360px; display: flex; flex-direction: column;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.5); overflow: hidden; }
.pick-search { padding: 8px; border-bottom: 1px solid var(--border); }
.pick-search input { width: 100%; margin: 0; }
.pick-list { overflow-y: auto; padding: 4px; }
.pick-item { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px; border: none; border-radius: 8px; background: none; cursor: pointer; font-size: 13px; color: var(--text); text-align: left; }
.pick-item:hover, .pick-item.sel { background: var(--bg-surface); }
/* @ 弹窗实例:与右栏素材选择共用 .pick-pop 组件,但定位在光标处(fixed) */
.pick-pop--caret { position: fixed; top: auto; left: auto; z-index: 300; }
.pick-item img, .pick-item video { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; background: #000; flex: none; display: block; }
.pick-play { position: absolute; left: 14px; top: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 10px; text-shadow: 0 1px 3px rgba(0,0,0,.9); pointer-events: none; }
.pick-preview { position: fixed; z-index: 200; width: 240px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,.5); pointer-events: none; }
.pick-preview img, .pick-preview video { width: 100%; max-height: 300px; object-fit: contain; background: #000; display: block; }
.pick-preview-name { padding: 6px 10px; font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 抽帧弹窗 ---------- */
.ex-head { color: var(--muted); font-size: 12px; margin-bottom: 10px; line-height: 1.6; }
.ex-body { display: flex; gap: 14px; }
.ex-left { flex: 1.2; min-width: 0; }
.ex-stage { background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; }
.ex-stage video { width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.ex-timeline { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.ex-play { padding: 4px 10px; }
.ex-slider { flex: 1; width: auto; accent-color: var(--primary); }
.ex-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ex-right { flex: 1; min-width: 0; }
.ex-right-t { font-size: 13px; margin-bottom: 8px; }
.ex-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; max-height: 400px; overflow-y: auto; }
.ex-frame { position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg-surface); }
.ex-frame img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.ex-frame-t { position: absolute; left: 4px; top: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 4px; }
.ex-frame-x { position: absolute; right: 4px; top: 4px; width: 18px; height: 18px; line-height: 17px; text-align: center; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; cursor: pointer; }
.ex-frame-x:hover { background: var(--red); }
.ex-seg { display: flex; border-top: 1px solid var(--border); }
.ex-seg button { flex: 1; padding: 4px 0; border: none; font-size: 12px; background: none; color: var(--muted); cursor: pointer; }
.ex-seg button.on { color: var(--primary); font-weight: 600; }
.ex-busy { aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }

.media-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.media-chip { display: flex; align-items: center; gap: 6px; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 8px; font-size: 12px; cursor: pointer; }
.media-chip img { width: 30px; height: 30px; object-fit: cover; border-radius: 5px; }
.media-chip.off { opacity: .45; }
.media-chip .rm { color: var(--muted); cursor: pointer; padding: 0 2px; }
.media-chip .rm:hover { color: var(--red); }
/* 提示词输入:固定高度外框 + 内部滚动(粘贴仅纯文本,样式由 JS 剥离) */
.prompt-box { height: 172px; overflow-y: auto; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px;
  transition: border-color .2s, box-shadow .2s; }
.prompt-box:hover { border-color: #3d4663; }
.prompt-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(99,102,241,.18); }
#promptEditor, .prompt-editor {
  min-height: 100%; background: none; border: none; border-radius: 0;
  padding: 10px; font-size: 13px; line-height: 1.8; outline: none; white-space: pre-wrap; word-break: break-word;
  color: var(--text); caret-color: var(--primary);
}
#promptEditor:empty:before, .prompt-editor:empty:before { content: attr(data-ph); color: var(--muted); }
/* 放大编辑弹窗里的大编辑器:自带边框与内部滚动 */
.prompt-editor--expand {
  min-height: 46vh; max-height: 62vh; overflow-y: auto; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: 8px;
}
.prompt-editor--expand:focus { border-color: var(--primary); }
.capsule {
  display: inline-block; background: rgba(99,102,241,.22); color: #a5b4fc; border-radius: 6px;
  padding: 0 7px; margin: 0 2px; font-size: 12px; line-height: 20px; cursor: default; user-select: none;
}
#assetPop { position: fixed; z-index: 200; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px;
  max-height: 240px; overflow-y: auto; min-width: 280px; max-width: 460px; box-shadow: 0 6px 20px rgba(0,0,0,.45); }
#assetPop .opt { padding: 7px 12px; cursor: pointer; font-size: 13px; display: flex; gap: 8px; align-items: center; }
#assetPop .opt img { width: 28px; height: 28px; object-fit: cover; border-radius: 5px; }
#assetPop .opt:hover, #assetPop .opt.sel { background: var(--bg-surface); }
#assetPop .opt .hint { margin-left: auto; white-space: nowrap; color: var(--muted); font-size: 11px; }
#assetPop .empty { padding: 8px 12px; font-size: 12px; }
/* ===== 快速生成 ===== */
.urllist .item { display: flex; gap: 8px; margin-bottom: 6px; }
.urllist .item input { flex: 1; }
.del2 { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; padding: 0 6px; }
.del2:hover { color: var(--red); }
/* 状态徽章:彩色圆点 + 文字(进行中圆点呼吸) */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge.queued, .badge.downloading { background: #2a2f3f; color: var(--muted); }
.badge.running { background: rgba(217,165,58,.15); color: var(--orange); }
.badge.running::before { animation: bpulse 1.2s ease-in-out infinite; }
.badge.succeeded { background: rgba(52,201,142,.15); color: var(--green); }
.badge.failed { background: rgba(229,83,75,.15); color: var(--red); }
.badge.cancelled { background: #2a2f3f; color: var(--muted); }
@keyframes bpulse { 50% { opacity: .3; } }
video.player { width: 100%; border-radius: 8px; background: #000; margin-top: 10px; max-height: 420px; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab { padding: 8px 18px; border-radius: 8px; background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; font-size: 14px; }
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.hist-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.hist-item:hover { background: var(--bg-elev); }
.hist-item .p { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

/* ===== 登录 & 全局浮层 ===== */
#loginBox { max-width: 380px; margin: 12vh auto 0; }
#loginBox h2 { margin-bottom: 4px; }
#toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast .t { background: var(--bg-elev); border: 1px solid var(--border); color: var(--text); border-radius: 8px;
  padding: 9px 18px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.4); animation: tin .18s ease-out; max-width: 70vw; }
#toast .t.err { border-color: var(--red); color: #ffb4ae; }
#toast .t.ok { border-color: var(--green); color: #a7f3d0; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 1200px) {
  .ws-col--right { width: 460px; }
}

/* ===== AI 生图弹窗(双栏:左表单 + 右结果区) ===== */
.gagen { display: grid; grid-template-columns: 400px 1fr; gap: 0 18px; }
.gagen-left { display: flex; flex-direction: column; gap: 12px; max-height: 70vh; overflow-y: auto;
  border-right: 1px solid var(--border); padding-right: 16px; }
.gagen-right { max-height: 70vh; overflow-y: auto; min-height: 420px; }
.gagen-t { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.gagen-t .muted { font-weight: 400; margin-left: 6px; }
.gagen-namerow { display: flex; align-items: center; gap: 8px; }
.gagen-namerow input { flex: 1; margin: 0; }
.gagen-namerow .cnt { color: var(--muted); font-size: 12px; flex: none; }
.gagen .seg { display: flex; gap: 8px; }
.gagen .seg button { flex: 1; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; }
.gagen .seg button .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.gagen .seg button.on { border-color: var(--primary); color: var(--text); background: rgba(99,102,241,.12); }
.gagen .seg button.on .dot { border-color: var(--primary); box-shadow: inset 0 0 0 3px var(--bg-surface); background: var(--primary); }
.gagen textarea { width: 100%; }
.gagen-refs { display: flex; gap: 6px; flex-wrap: wrap; max-height: 120px; overflow-y: auto; }
.gagen-row { display: flex; gap: 12px; }
.gagen-row > div { flex: 1; }
.gagen-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.gagen-badge { font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 5px 9px; }
.gagen-empty { height: 100%; min-height: 400px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; color: var(--muted); }
.gagen-empty .ph { width: 76px; height: 92px; border-radius: 12px; background: linear-gradient(135deg, #34344e, #262637);
  display: flex; align-items: center; justify-content: center; color: #7a7aa0; }
.gagen-busy { height: 100%; min-height: 400px; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; color: var(--muted); }
.gagen-busy .spin { width: 26px; height: 26px; border-width: 3px; }
.gagen-fail { height: 100%; min-height: 400px; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; color: #ffb4ae; text-align: center; padding: 0 20px; word-break: break-all; }
.gagen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.gagen-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-elev); }
.gagen-hint { margin-top: 10px; color: var(--muted); font-size: 12px; }

/* ---------- 批量制作 tab ---------- */
.batch-zone { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 14px; }
.batch-zone textarea { width: 100%; }
.batch-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.batch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 14px; }
.batch-plan-wait { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.batch-stats { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.batch-stats b { font-size: 18px; color: var(--text); margin-right: 2px; }
.batch-warn { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(217,165,58,.08);
  border: 1px solid rgba(217,165,58,.25); font-size: 12px; color: var(--orange); line-height: 1.9; }
.batch-missing { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.batch-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 16px;
  background: rgba(229,83,75,.1); border: 1px solid rgba(229,83,75,.3); font-size: 12px; }
.batch-ep { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px dashed var(--border); }
.batch-ep:last-child { border-bottom: none; }
.batch-ephead { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.batch-bar { height: 55px; border-radius: 3px; background: var(--bg-elev); overflow: hidden; flex: 1; min-width: 140px; }
.batch-bar i { display: block; height: 100%; background: var(--primary); border-radius: 3px; transition: width .4s; }
.batch-items { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.batch-job { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px;
  cursor: pointer; font-size: 13px; border-bottom: 1px dashed var(--border); }
.batch-job:last-child { border-bottom: none; }
.batch-job:hover { background: var(--bg-elev); }
.batch-job.on { background: rgba(99,102,241,.1); }
.gagen-char { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.gagen-char .gc-name, .gagen-char .gc-desc { width: 100%; }
.gagen-char .gc-desc { resize: vertical; }
.gagen-char .gc-del { align-self: flex-end; }
#genStyleRefs .gagen-refs { flex-wrap: wrap; }
