/* ============================================================
   跳跃视界 复刻版 · 设计系统
   ============================================================ */

:root {
  --bg: #08080f;
  --bg-soft: #0d0d18;
  --bg-elevated: #12121f;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f2f7;
  --text-2: #a8a8bd;
  --text-3: #71718a;
  --primary: #7c5cff;
  --primary-2: #a78bfa;
  --primary-soft: rgba(124, 92, 255, 0.14);
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --rose: #fb7185;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 8px 26px rgba(0, 0, 0, 0.35);
  --grad: linear-gradient(120deg, #7c5cff, #a78bfa 45%, #22d3ee);
  --nav-h: 60px;
  /* 交互缓动：out 用于位移/淡入，back 带一点回弹，用于缩放与光晕弹入 */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Source Han Sans SC', sans-serif;
}

* { box-sizing: border-box; }

html, body, #app { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(124, 92, 255, 0.22), transparent 62%),
    radial-gradient(780px 480px at 88% 4%, rgba(34, 211, 238, 0.13), transparent 60%),
    radial-gradient(700px 700px at 50% 108%, rgba(124, 92, 255, 0.1), transparent 65%);
}

#app { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.13);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); background-clip: padding-box; }

/* ------------------------- 排版 ------------------------- */
.h1 { font-size: 34px; line-height: 1.25; font-weight: 700; letter-spacing: -0.4px; margin: 0; }
.h2 { font-size: 22px; font-weight: 650; margin: 0; letter-spacing: -0.2px; }
.h3 { font-size: 16px; font-weight: 600; margin: 0; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.tiny { font-size: 12px; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ------------------------- 布局 ------------------------- */
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap8 { gap: 8px; }
.gap10 { gap: 10px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.gap20 { gap: 20px; } .gap24 { gap: 24px; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.page { max-width: 1320px; margin: 0 auto; padding: 26px 28px 80px; }
.page-narrow { max-width: 1080px; }
.page-wide { max-width: 1560px; }

/* ------------------------- 顶部导航 ------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  backdrop-filter: blur(20px);
  background: rgba(8, 8, 15, 0.78);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  height: 100%; max-width: 1560px; margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; gap: 22px;
}
/* 桌面端频道栏移到左侧后，右侧那组（积分 / 商务合作 / 用户中心）要靠右贴齐 */
.topbar-right { margin-left: auto; flex: none; }
.account-menu {
  position: absolute; right: 0; top: 42px; z-index: 80; width: 200px; padding: 8px;
  background: #151521; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 14px;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.62), 0 5px 16px rgba(0, 0, 0, 0.34);
}
.account-menu .side-item { display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; white-space: nowrap; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; font-size: 15px; color: #fff;
  box-shadow: 0 4px 16px rgba(124, 92, 255, 0.5);
}
.brand-mark svg { width: 16px; height: 16px; display: block; }

/* ------------------------- 统一图标 -------------------------
 * 全站图标都来自 /lib/icons.js 的同一套 24×24 线稿，
 * 颜色继承文字色，大小默认 1em（跟随 font-size），需要时用容器 CSS 覆盖。
 */
.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; line-height: 0; vertical-align: -0.125em; }
.ico svg { width: 1em; height: 1em; display: block; }
.ico.spin-ico svg { animation: spin 0.8s linear infinite; }
/* 个别容器原先是靠字形撑开的，换成 SVG 后把尺寸/对齐补齐 */
.canvas-act .ico svg { width: 18px; height: 18px; }
.ad-full { display: grid; place-items: center; font-size: 16px; }
.ad-back, .cf-btn, .case-nav { display: grid; place-items: center; }
.ce-icon { display: inline-flex; }
.case-badge { display: inline-flex; align-items: center; gap: 4px; }
/* 积分图标统一走琥珀色，和「积分/扣费」相关的数字放在一起好认 */
.ico-points { color: var(--amber); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 7px 13px; border-radius: 9px; color: var(--text-2);
  font-size: 14px; transition: 0.16s; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: #fff; background: var(--primary-soft); }

.announce {
  height: 34px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12.5px; color: #cdc4ff;
  background: linear-gradient(90deg, rgba(124, 92, 255, 0.16), rgba(34, 211, 238, 0.12));
  border-bottom: 1px solid var(--border);
  overflow: hidden; white-space: nowrap;
}

/* ------------------------- 按钮 ------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 8px 15px; border-radius: 10px; font-size: 13.5px; cursor: pointer;
  transition: 0.16s; white-space: nowrap; user-select: none;
}
.btn:hover:not(:disabled) { background: var(--surface-3); border-color: var(--border-strong); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: var(--grad); border: none; color: #fff; font-weight: 600;
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); background: var(--grad); }
.btn-ghost { background: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 11px 22px; font-size: 15px; border-radius: 12px; }
.btn-danger { color: var(--rose); border-color: rgba(251, 113, 133, 0.3); }
.btn-danger:hover:not(:disabled) { background: rgba(251, 113, 133, 0.12); }
.btn-block { width: 100%; }

/* ------------------------- 表单 ------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
/*
 * 表单行：同一行里的输入框 / 下拉 / 按钮统一高度。
 * 默认 .input 约 42px、.btn-sm 约 30px，混在一行会一高一矮很难看。
 */
.form-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.form-row .input, .form-row .select, .form-row .btn { height: 40px; }
.form-row .btn { padding-top: 0; padding-bottom: 0; }
.form-row label { display: inline-flex; align-items: center; gap: 6px; height: 40px; }

/* ------------------- 自绘下拉（团队选择） ------------------- */
.team-picker { position: relative; flex: none; }
.team-picker-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; min-width: var(--tp-width, 220px);
  padding: 0 12px; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 13.5px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--border); color: var(--text);
  transition: 0.16s;
}
.team-picker-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.team-picker-btn.on { border-color: rgba(124, 92, 255, 0.6); background: var(--primary-soft); }
.tp-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--text-3); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.tp-dot.is-team { background: var(--primary-2); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18); }
.tp-current { flex: 1; text-align: left; }
.tp-caret { display: block; line-height: 0; opacity: 0.65; transition: transform 0.18s ease; }
.tp-caret svg { width: 13px; height: 13px; display: block; }
.team-picker-btn:hover .tp-caret { opacity: 1; }
.team-picker-btn.on .tp-caret { transform: rotate(180deg); opacity: 1; }

.team-picker-menu {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 40;
  min-width: 280px; max-height: 320px; overflow: auto;
  padding: 6px; border-radius: 12px; background: #16161f;
  border: 1px solid var(--border-strong); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  display: flex; flex-direction: column; gap: 2px;
}
.team-picker-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: none; border-radius: 9px; background: none; cursor: pointer;
  color: var(--text-2); font-family: inherit; text-align: left; transition: 0.14s;
}
.team-picker-item:hover { background: var(--surface-2); color: var(--text); }
.team-picker-item.on { background: var(--primary-soft); color: var(--text); }
.team-picker-item > svg { width: 15px; height: 15px; flex: none; color: var(--primary-2); }
.tp-avatar {
  width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(140deg, var(--primary), var(--cyan));
}
.tp-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.tp-name { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: inherit; }
.tp-sub { font-size: 11.5px; color: var(--text-3); }
.team-picker-sep { height: 1px; background: var(--border); margin: 4px 2px; }
.tp-empty { padding: 10px; font-size: 12px; color: var(--text-3); }
/* 团队项目卡片：可点击打开（画布 / 项目详情） */
.team-case { cursor: pointer; transition: transform 0.16s, box-shadow 0.16s; }
.team-case:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45); }
.team-case:hover .case-cover { border-color: var(--primary); }
.team-project-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  color: rgba(196, 181, 253, 0.9); font-size: 44px;
  background:
    radial-gradient(circle at 50% 42%, rgba(124, 92, 255, 0.2), transparent 34%),
    linear-gradient(155deg, rgba(124, 92, 255, 0.09), rgba(255, 255, 255, 0.015));
}
.team-project-placeholder .ico svg { width: 1em; height: 1em; }
/*
 * 卡片上的「只读」小标。
 * 必须写成 .case-stat.team-case-ro：单类权重和后面的 .case-stat 一样，
 * 而 .case-stat 又排在文件后面，会把这里的 top/right/background 全盖掉 ——
 * 结果 left + right 同时生效，绝对定位被拉成一条通栏的紫色长条。
 * 再加 width: max-content 兜底，内容多宽就多宽，永远不会被拉宽。
 */
.case-stat.team-case-ro {
  top: 38px; left: 9px; right: auto;
  width: max-content; max-width: calc(100% - 18px);
  background: rgba(0, 0, 0, 0.62); border: 1px solid rgba(255, 255, 255, 0.18); color: #d6d6dd;
}
/* 团队项目卡片上的「作者」一行 */
.team-case-owner {
  position: absolute; left: 0; right: 0; bottom: 30px; padding: 0 12px;
  font-size: 11.5px; color: rgba(255, 255, 255, 0.68);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/*
 * 生成记录缩略图的悬浮预览：鼠标移上去在旁边浮一张大图。
 * fixed 定位 + 高 z-index，不会被表格 / 卡片的裁剪或层级吃掉；不吃鼠标事件。
 */
.thumb-preview {
  position: fixed; z-index: 120; pointer-events: none;
  border-radius: 10px; overflow: hidden;
  background: #0b0b0d; border: 1px solid var(--border-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.65);
}
.thumb-preview img, .thumb-preview video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* 画布的参考素材预览：盒子按原图比例算，用 contain 保证整张图都露出来、不裁切 */
.thumb-preview.is-fit img, .thumb-preview.is-fit video {
  object-fit: contain;
}
/* 顶栏用的紧凑版：和旁边的 btn-sm 齐高 */
.team-picker.is-sm .team-picker-btn { height: 32px; font-size: 12.5px; padding: 0 10px; border-radius: 9px; }
.team-picker.is-sm .tp-caret svg { width: 12px; height: 12px; }
.team-picker.is-sm .team-picker-menu { min-width: 240px; }
.team-picker.is-right .team-picker-menu { left: auto; right: 0; }
.input, .textarea, .select {
  width: 100%; background: rgba(255, 255, 255, 0.045); border: 1px solid var(--border);
  color: var(--text); padding: 9px 12px; border-radius: 10px; font-size: 13.5px;
  font-family: inherit; transition: 0.16s; outline: none;
}
.textarea { resize: vertical; line-height: 1.6; min-height: 84px; }
.input:focus, .textarea:focus, .select:focus {
  border-color: rgba(124, 92, 255, 0.65);
  background: rgba(124, 92, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
/* 原生下拉列表项：显式给出行高与内边距，避免 Windows 下选项文字被截断 */
.select option {
  background: #16162a; color: var(--text);
  line-height: 1.6; padding: 5px 8px; font-size: 13.5px;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 6px 13px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font-size: 12.5px; cursor: pointer; transition: 0.15s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.on {
  background: var(--primary-soft); border-color: rgba(124, 92, 255, 0.6); color: #cbbcff; font-weight: 600;
}
/* 当前这一档下没有对应档位（点它会自动跳到有档位的那一档） */
.chip.is-off { opacity: 0.42; }
.chip.is-off:hover { opacity: 0.72; }
.chip.is-off.on { opacity: 1; }

/*
 * 画面比例选择器（图片 / 视频组件的参数面板共用）：
 * 一格一个比例 —— 格子里画一个等比例的小方框（横竖一眼能看出来），下面写比例文字。
 */
.ratio-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.ratio-item {
  width: 58px; padding: 7px 4px 5px; border-radius: 9px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: inherit; font-size: 10.5px; line-height: 1; white-space: nowrap;
  background: none; border: 1px solid transparent; color: var(--text-3); transition: 0.15s;
}
.ratio-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.ratio-item.on {
  color: #fff; font-weight: 600;
  background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.22);
}
.ratio-item.is-off { opacity: 0.4; }
.ratio-item.is-off:hover { opacity: 0.75; }
.ratio-box {
  display: block; border: 1.5px solid currentColor; border-radius: 3px; opacity: 0.8;
}
.ratio-item.on .ratio-box { border-width: 2px; opacity: 1; }

.switch {
  width: 40px; height: 22px; border-radius: 99px; background: rgba(255, 255, 255, 0.13);
  border: none; position: relative; cursor: pointer; transition: 0.2s; flex: none;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: 0.2s;
}
.switch.on { background: var(--primary); }
.switch.on::after { transform: translateX(18px); }

input[type='range'] { width: 100%; accent-color: var(--primary); }

/* ------------------------- 卡片 ------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px;
}
.card-flat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-hover { transition: 0.18s; }
.card-hover:hover { border-color: var(--border-strong); background: var(--surface-2); }

/* ------------------------- 徽标 ------------------------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px;
  font-size: 11.5px; background: var(--surface-3); color: var(--text-2); font-weight: 500;
}
.tag-primary { background: var(--primary-soft); color: #b8a5ff; }
.tag-green { background: rgba(52, 211, 153, 0.14); color: var(--green); }
.tag-amber { background: rgba(251, 191, 36, 0.14); color: var(--amber); }
.tag-rose { background: rgba(251, 113, 133, 0.14); color: var(--rose); }
.tag-cyan { background: rgba(34, 211, 238, 0.14); color: var(--cyan); }

.dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.dot-run { background: var(--cyan); animation: pulse 1.4s infinite; }
.dot-ok { background: var(--green); }
.dot-err { background: var(--rose); }
.dot-wait { background: var(--text-3); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ------------------------- 进度条 ------------------------- */
.bar { height: 5px; background: rgba(255, 255, 255, 0.09); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width 0.5s; }
/* 多图生成：进度条按张数分段（4 张就是 4 段，各走各的） */
.bar.is-seg { display: flex; gap: 3px; background: none; }
.bar-seg {
  flex: 1; min-width: 0; height: 100%; border-radius: 99px;
  background: rgba(255, 255, 255, 0.12); overflow: hidden;
}
.bar-seg > i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width 0.5s; }

/* ------------------------- 弹层 ------------------------- */
.mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(4, 4, 10, 0.72);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 22px;
  animation: fade 0.18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl); box-shadow: var(--shadow);
  width: 100%; max-width: 440px; padding: 30px; animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  max-height: 88vh; overflow: auto;
}
.modal-lg { max-width: 820px; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }

.drawer-mask { position: fixed; inset: 0; z-index: 190; background: rgba(4, 4, 10, 0.6); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 92vw); z-index: 195;
  background: var(--bg-elevated); border-left: 1px solid var(--border-strong);
  padding: 24px; overflow: auto; animation: slideIn 0.24s ease;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------- Toast ------------------------- */
.toasts {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  padding: 9px 18px; border-radius: 10px; font-size: 13px;
  background: rgba(24, 24, 40, 0.96); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft); animation: toastIn 0.22s ease;
}
.toast.ok { border-color: rgba(52, 211, 153, 0.4); color: #a7f3d0; }
.toast.err { border-color: rgba(251, 113, 133, 0.4); color: #fecdd3; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ------------------------- 空状态 / 加载 ------------------------- */
.empty { padding: 60px 22px; text-align: center; color: var(--text-3); }
.empty-icon { font-size: 34px; opacity: 0.5; margin-bottom: 10px; }
.spin {
  width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 10px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------- 首页 ------------------------- */
.hero { padding: 74px 0 56px; text-align: center; }
.hero--after-carousel { padding-top: 34px; }
.hero-life-stage { position: relative; isolation: isolate; }
.hero-content { position: relative; z-index: 3; }
.hero-cinematic-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(146, 130, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(146, 130, 255, 0.09) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at 50% 54%, #000 0%, transparent 72%);
}
.hero-cinema-effect {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.hero-aurora,
.hero-light-sweep,
.hero-dust { display: block; position: absolute; }
.hero-aurora {
  width: 520px;
  height: 260px;
  border-radius: 50%;
  filter: blur(52px);
  opacity: 0.32;
  mix-blend-mode: screen;
}
.hero-aurora.aurora-a {
  left: 12%;
  top: 16%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.55), transparent 66%);
  animation: heroAuroraDrift 12s ease-in-out infinite alternate;
}
.hero-aurora.aurora-b {
  right: 8%;
  bottom: -4%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.38), transparent 68%);
  animation: heroAuroraDrift 15s ease-in-out -5s infinite alternate-reverse;
}
.hero-light-sweep {
  top: -25%;
  left: -28%;
  width: 18%;
  height: 150%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(204, 193, 255, 0.13), transparent);
  filter: blur(10px);
  animation: heroLightSweep 8.5s ease-in-out infinite;
}
.hero-dust {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c4b5fd;
  box-shadow: 0 0 10px 2px rgba(124, 92, 255, 0.34);
  animation: heroDustFloat 7s ease-in-out infinite;
}
.hero-dust.dust-1 { left: 12%; top: 34%; animation-delay: -0.6s; }
.hero-dust.dust-2 { left: 18%; top: 68%; width: 2px; height: 2px; animation-delay: -2.1s; }
.hero-dust.dust-3 { left: 27%; top: 24%; animation-delay: -4.2s; }
.hero-dust.dust-4 { left: 36%; top: 78%; animation-delay: -1.4s; }
.hero-dust.dust-5 { left: 46%; top: 18%; width: 2px; height: 2px; animation-delay: -3.2s; }
.hero-dust.dust-6 { left: 52%; top: 83%; animation-delay: -5.1s; }
.hero-dust.dust-7 { left: 61%; top: 29%; animation-delay: -2.7s; }
.hero-dust.dust-8 { left: 68%; top: 70%; width: 2px; height: 2px; animation-delay: -0.9s; }
.hero-dust.dust-9 { left: 74%; top: 18%; animation-delay: -4.8s; }
.hero-dust.dust-10 { left: 82%; top: 52%; animation-delay: -1.8s; }
.hero-dust.dust-11 { left: 88%; top: 76%; width: 2px; height: 2px; animation-delay: -3.7s; }
.hero-dust.dust-12 { left: 93%; top: 27%; animation-delay: -5.6s; background: #67e8f9; }
@keyframes heroAuroraDrift {
  0% { transform: translate3d(-24px, 12px, 0) scale(0.9); opacity: 0.2; }
  100% { transform: translate3d(34px, -18px, 0) scale(1.12); opacity: 0.42; }
}
@keyframes heroLightSweep {
  0%, 25% { transform: translateX(0) rotate(18deg); opacity: 0; }
  42% { opacity: 0.9; }
  70%, 100% { transform: translateX(780%) rotate(18deg); opacity: 0; }
}
@keyframes heroDustFloat {
  0%, 100% { transform: translate3d(0, 8px, 0) scale(0.7); opacity: 0.18; }
  50% { transform: translate3d(10px, -16px, 0) scale(1.25); opacity: 0.8; }
}
.hero h1 { font-size: 48px; line-height: 1.18; font-weight: 700; letter-spacing: -1px; margin: 0 0 18px; }
.hero p { color: var(--text-2); font-size: 16px; max-width: 660px; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) {
  .hero-aurora,
  .hero-light-sweep,
  .hero-dust { animation: none; }
  .hero-light-sweep { display: none; }
}

.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px;
}

/* ------------------- 首页 4 张快捷卡（对齐 tiaoyue.com） ------------------- */
.feature-grid.quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick-card {
  position: relative; --beam-angle: 0deg;
  height: 108px; padding: 14px 16px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: linear-gradient(150deg, rgba(124, 92, 255, 0.09), rgba(255, 255, 255, 0.02));
  display: flex; align-items: center; gap: 12px; cursor: pointer; transition: 0.2s; overflow: hidden;
}
.quick-card:hover {
  transform: translateY(-3px); border-color: rgba(124, 92, 255, 0.4);
  box-shadow: 0 12px 34px rgba(124, 92, 255, 0.22);
}
.quick-icon {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  background: var(--primary-soft); display: grid; place-items: center;
  color: var(--primary-2);
}
.quick-icon svg { width: 20px; height: 20px; display: block; }
.quick-title { font-weight: 650; font-size: 18.5px; }
.quick-desc { color: var(--text-2); font-size: 12px; margin-top: 3px; }
.quick-card--split { padding: 12px; gap: 10px; align-items: stretch; }
.quick-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.quick-sub {
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  border-left: 1px solid var(--border); padding-left: 10px; min-width: 96px;
}
.quick-subitem {
  background: none; border: none; cursor: pointer; font-family: inherit; text-align: left;
  display: flex; flex-direction: column; gap: 1px; padding: 2px 6px; border-radius: 8px;
  color: var(--text-2); font-size: 12.5px; transition: 0.16s;
}
.quick-subitem:hover { color: var(--text); background: var(--surface-2); }
.quick-subicon { display: inline-flex; color: var(--primary-2); flex: none; }
.quick-subicon svg { width: 14px; height: 14px; display: block; }
.quick-subitem .tiny { padding-left: 20px; }

/*
 * 悬停特效：光子沿卡片边框游动。
 * ::before 是贴在边框上的一圈光弧（锥形渐变 + mask 只留 2px 边框），
 * ::after 是同一道光的柔化版：环带加宽到 8px 再轻微模糊，糊出一圈辉光。
 * 光弧靠 @property 注册的 --beam-angle 旋转；浏览器不支持时退化成静态光圈。
 */
@property --beam-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.quick-card::before,
.quick-card::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--beam-angle),
    rgba(124, 92, 255, 0) 0turn,
    rgba(124, 92, 255, 0) 0.68turn,
    rgba(124, 92, 255, 0.45) 0.78turn,
    rgba(34, 211, 238, 0.95) 0.86turn,
    #ffffff 0.9turn,
    rgba(167, 139, 250, 0.8) 0.95turn,
    rgba(124, 92, 255, 0) 1turn);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0; transition: opacity 0.26s ease;
  animation: quick-beam-run 3.6s linear infinite;
  animation-play-state: paused;
}
.quick-card::before { padding: 2px; }            /* 贴着边框的光弧本体 */
.quick-card::after { padding: 8px; filter: blur(3px); }  /* 同一道光晕开一点，糊在边框内侧 */
.quick-card:hover::before { opacity: 1; animation-play-state: running; }
.quick-card:hover::after { opacity: 0.45; animation-play-state: running; }

@keyframes quick-beam-run {
  to { --beam-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
  .quick-card::before, .quick-card::after { animation: none; }
  /* 侧边栏的位移 / 缩放 / 扫光全部关掉，只保留颜色变化 */
  .app-sidebar .nav-item, .app-sidebar .nav-item::before, .app-sidebar .nav-item::after,
  .app-sidebar .nav-icon, .admin-nav-item, .admin-nav-item::before, .admin-nav-item::after,
  .admin-nav-item .ico, .rail-btn, .rail-btn .ri { transition: none; }
  .app-sidebar .nav-item:hover, .app-sidebar .nav-item:hover .nav-icon,
  .admin-nav-item:hover, .admin-nav-item:hover .ico,
  .rail-btn:hover, .rail-btn:hover .ri { transform: none; }
  .app-sidebar .nav-item:hover::after, .admin-nav-item:hover::after { opacity: 0; }
  .app-sidebar:hover .nav-item:not(:hover):not(.on),
  .admin-side:hover .admin-nav-item:not(:hover):not(.on) { opacity: 1; }
}
@media (max-width: 1100px) {
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .quick-grid { grid-template-columns: 1fr; }
}

/* ------------------- 首页顶部轮播（原站样式 · 铺满整屏宽度） ------------------- */
.hero-carousel {
  position: relative; width: 100%; max-width: none; margin: 0 auto; padding: 30px 28px 0;
}
.hc-stage {
  position: relative; width: 100%; aspect-ratio: 1024 / 196; max-height: 420px;
  touch-action: pan-y; user-select: none;
}
.hc-card {
  position: absolute; top: 50%; left: 13.2%;
  width: 26.5%; height: 85%; border-radius: 18px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border); cursor: pointer;
  transform: translate(-50%, -50%);
  transition: left 0.55s cubic-bezier(0.4, 0, 0.2, 1), width 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.45s, transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.hc-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hc-card.is-active {
  left: 50%; width: 44.1%; height: 88%; z-index: 3; opacity: 1;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
}
.hc-card.is-prev {
  left: 13.2%; z-index: 2; opacity: 0.38;
  transform: translate(-50%, -50%) perspective(1000px) rotateY(18deg);
}
.hc-card.is-next {
  left: 86.8%; z-index: 2; opacity: 0.38;
  transform: translate(-50%, -50%) perspective(1000px) rotateY(-18deg);
}
.hc-card.is-far { z-index: 1; opacity: 0; pointer-events: none; }
.hc-card.is-far--left { left: 13.2%; }
.hc-card.is-far--right { left: 86.8%; }

.hc-fallback {
  position: absolute; inset: 0; padding: 0 12%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center; color: #fff;
}
.hc-fallback-title { font-size: clamp(14px, 1.5vw, 26px); font-weight: 700; letter-spacing: -0.3px; }
.hc-fallback-sub { font-size: clamp(11px, 0.9vw, 15px); color: rgba(255, 255, 255, 0.82); }

.hc-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 40px; height: 40px; padding: 0; border-radius: 12px; cursor: pointer;
  display: grid; place-items: center; color: var(--text-2);
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px); transition: 0.18s;
}
.hc-nav:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.hc-nav svg { width: 18px; height: 18px; display: block; }
.hc-nav--prev { left: 22px; }
.hc-nav--next { right: 22px; }

.hc-dots { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }
.hc-dot {
  width: 22px; height: 3px; padding: 0; border: none; border-radius: 2px; cursor: pointer;
  background: rgba(255, 255, 255, 0.24); transition: 0.25s;
}
.hc-dot:hover { background: rgba(255, 255, 255, 0.5); }
.hc-dot.on { width: 40px; height: 4px; background: #fff; }

@media (max-width: 820px) {
  .hero-carousel { padding-top: 16px; }
  .hc-stage { aspect-ratio: 16 / 9; }
  .hc-card.is-prev, .hc-card.is-next, .hc-card.is-far--left, .hc-card.is-far--right { display: none; }
  .hc-card.is-active { left: 50%; width: 100%; height: 100%; }
  .hc-nav { width: 32px; height: 32px; border-radius: 10px; }
  .hc-nav--prev { left: 10px; }
  .hc-nav--next { right: 10px; }
}

/* ------------------- 左侧竖排固定频道栏（对齐 tiaoyue.com） ------------------- */
.app-sidebar {
  position: fixed; left: 16px; z-index: 55;
  /* 上下居中：以「头部以下的可视区域」为基准，永远落在顶栏下面 */
  top: calc(var(--nav-h) + (100vh - var(--nav-h)) / 2);
  transform: translateY(-50%);
  /* 视口太矮时栏内滚动，不会顶到头部、也不会被裁掉最后一项 */
  max-height: calc(100vh - var(--nav-h) - 32px);
  overflow-y: auto;
  scrollbar-width: none;
  width: 70px; padding: 4px; border-radius: 100px;
  background: rgba(194, 204, 241, 0.08);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  display: flex; flex-direction: column; align-items: center;
}
.app-sidebar::-webkit-scrollbar { display: none; }
/*
 * 频道项悬停：光晕「弹」出来 + 一道斜光扫过 + 图标上浮放大，全部走缓动曲线
 * （--ease-out / --ease-back 定义在 :root）。
 */
.app-sidebar .nav-item {
  position: relative; isolation: isolate;
  width: 60px; height: 82px; flex: none; border-radius: 100px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  color: var(--text-3); font-size: 11.5px;
  transition: color 0.3s var(--ease-out), opacity 0.3s var(--ease-out),
              transform 0.38s var(--ease-out);
}
.app-sidebar .nav-item > * { position: relative; z-index: 1; }
.app-sidebar .nav-item > span:last-child { transition: letter-spacing 0.34s var(--ease-out); }

/* 悬停时的柔光底 */
.app-sidebar .nav-item::before {
  content: ''; position: absolute; inset: 2px; border-radius: inherit; z-index: 0;
  background: radial-gradient(88% 68% at 50% 14%,
    rgba(148, 116, 255, 0.72), rgba(34, 211, 238, 0.2) 60%, transparent 100%);
  opacity: 0; transform: scale(0.8) translateY(6px);
  transition: opacity 0.3s var(--ease-out), transform 0.46s var(--ease-back);
  pointer-events: none;
}
/* 斜向扫光：默认停在右侧，悬停时滑到左侧 */
.app-sidebar .nav-item::after {
  content: ''; position: absolute; inset: 2px; border-radius: inherit; z-index: 0;
  background: linear-gradient(112deg,
    transparent 36%, rgba(255, 255, 255, 0.32) 50%, transparent 64%);
  background-size: 260% 100%; background-position: 152% 0;
  opacity: 0; pointer-events: none;
  transition: background-position 0.76s var(--ease-out), opacity 0.26s ease;
}

.app-sidebar:hover .nav-item:not(:hover):not(.on) { opacity: 0.62; }

.app-sidebar .nav-item:hover {
  color: #fff;
  transform: translateX(2px) scale(1.03);
}
.app-sidebar .nav-item:hover::before { opacity: 1; transform: none; }
.app-sidebar .nav-item:hover::after { opacity: 1; background-position: -72% 0; }
.app-sidebar .nav-item:hover > span:last-child { letter-spacing: 0.5px; }

.app-sidebar .nav-icon {
  font-size: 26px;
  line-height: 1;
  transition: transform 0.44s var(--ease-back);
}
.app-sidebar .nav-icon svg {
  width: 27px;
  height: 27px;
  display: block;
  stroke-width: 2.35;
}
.app-sidebar .nav-item:hover .nav-icon {
  transform: translateY(-3px) scale(1.08);
  filter: drop-shadow(0 5px 12px rgba(124, 92, 255, 0.6));
}

.app-sidebar .nav-item.on { color: #fff; }
.app-sidebar .nav-item.on::before {
  opacity: 1; transform: none;
  background: radial-gradient(88% 68% at 50% 14%,
    rgba(124, 92, 255, 0.9), rgba(124, 92, 255, 0.34) 62%, transparent 100%);
}

/* ------------------- 创意页（对齐 tiaoyue.com/creative） ------------------- */
.creative-page { max-width: 1112px; margin: 0 auto; padding: 0 0 90px; }
.creative-hero { display: flex; flex-direction: column; align-items: center; padding-top: 64px; }
.creative-title {
  font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.4px;
  margin: 0 0 40px; text-align: center;
}
.cib {
  width: 100%; max-width: 860px; min-height: 190px; padding: 16px; border-radius: 20px;
  background: #18161b; border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; flex-direction: column; gap: 10px;
}
.cib-editor {
  flex: 1; min-height: 100px; background: none; border: none; outline: none; resize: none;
  color: var(--text); font-family: inherit; font-size: 14.5px; line-height: 1.7;
}
.cib-editor::placeholder { color: var(--text-3); }
.cib-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cib-tools-left, .cib-tools-right { display: flex; align-items: center; gap: 8px; }
.cib-round {
  width: 32px; height: 32px; border-radius: 10px; cursor: pointer; font-size: 14px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); color: var(--text-2);
  display: grid; place-items: center; transition: 0.16s;
}
.cib-round:hover { color: var(--text); border-color: var(--border-strong); }
.cib-icon { display: grid; place-items: center; line-height: 1; }
.cib-icon svg { width: 17px; height: 17px; display: block; }

/* 输入框内的已选参考素材 / Skill */
.cib-refs { display: flex; flex-wrap: wrap; gap: 8px; }
.cib-ref {
  display: inline-flex; align-items: center; gap: 6px; max-width: 230px;
  padding: 3px 8px 3px 4px; border-radius: 999px; font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.cib-ref img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; display: block; flex: none; }
.cib-ref .ellipsis { max-width: 150px; }
.cib-ref--skill { padding-left: 9px; color: #cbbcff; background: var(--primary-soft); border-color: transparent; }
.cib-ref--skill .cib-icon svg { width: 14px; height: 14px; }
.cib-ref-x { cursor: pointer; opacity: 0.55; font-size: 11px; }
.cib-ref-x:hover { opacity: 1; }

/* 挑选弹窗（资产 / Skill） */
.pick-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pick-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px;
  max-height: 50vh; overflow: auto; padding: 2px;
}
.pick-grid--skill { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.pick-item {
  position: relative; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--surface); cursor: pointer; transition: 0.16s;
}
.pick-item:hover { border-color: var(--border-strong); background: var(--surface-2); }
.pick-item.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.pick-item__cover { aspect-ratio: 16 / 10; background: var(--surface-2); }
.pick-item__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-item__body { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.pick-item__check {
  position: absolute; right: 8px; top: 8px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 11px;
}

/* 对话消息里的参考素材缩略图 */
.msg-refs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg-refs img {
  width: 68px; height: 68px; border-radius: 8px; object-fit: cover; display: block;
  border: 1px solid var(--border);
}

/* Agent 流水线步骤卡片 */
.msg-bubble--step {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; white-space: normal;
}
.as-head {
  display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 13.5px;
  margin-bottom: 8px; color: var(--text);
}
.as-body { white-space: pre-wrap; font-size: 13px; line-height: 1.75; color: var(--text-2); }
.as-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip-static { cursor: default; }
.as-shots { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.as-shot-row {
  display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px;
  padding: 5px 8px; border-radius: 8px; background: var(--surface-2);
}
.as-cost {
  margin-top: 10px; padding: 10px; border-radius: 10px;
  background: var(--surface-2); display: flex; flex-direction: column; gap: 5px;
}
.as-warn { margin-top: 6px; font-size: 12.5px; color: var(--rose); }

/* Agent 问答选择卡（手动模式） */
.ask-card {
  width: min(660px, 100%); padding: 16px 18px; border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-strong);
}
.ask-tag {
  display: inline-block; padding: 2px 9px; border-radius: 7px; font-size: 11.5px;
  background: var(--primary-soft); color: #cbbcff;
}
.ask-title { margin-top: 10px; font-size: 16px; font-weight: 650; }
.ask-hint { margin-top: 6px; font-size: 12.5px; color: var(--text-3); }
.ask-options { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ask-loading {
  display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 14px 0;
  color: var(--text-2); font-size: 13px;
}
.ask-refs {
  display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 10px;
  border-radius: 10px; background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25); min-width: 0;
}
.ask-refs-tag { font-size: 12px; color: #7fe3f5; white-space: nowrap; }
.as-refs {
  display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 10px;
  border-radius: 10px; background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25); min-width: 0;
}
.as-refs-tag { font-size: 12px; color: #7fe3f5; white-space: nowrap; }
.ask-option {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px;
  border-radius: 12px; cursor: pointer; text-align: left; font-family: inherit;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); transition: 0.15s;
}
.ask-option:hover { border-color: var(--border-strong); color: var(--text); }
.ask-option.on { border-color: var(--primary); background: var(--primary-soft); color: var(--text); }
.ask-key {
  width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: var(--surface-3); font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.ask-option.on .ask-key { background: var(--primary); color: #fff; }
.ask-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); }
.ask-desc { display: block; margin-top: 3px; font-size: 12px; color: var(--text-3); }
.ask-check { color: #cbbcff; font-size: 14px; }
.cib-mode {
  display: flex; align-items: center; gap: 2px; padding: 2px;
  border-radius: 10px; background: rgba(255, 255, 255, 0.05);
}
.cib-mode button {
  height: 28px; padding: 0 12px; border-radius: 8px; border: none; cursor: pointer;
  background: none; color: var(--text-3); font-family: inherit; font-size: 13px; transition: 0.16s;
}
.cib-mode button.on { background: var(--primary-soft); color: #fff; }
.cib-send {
  height: 32px; padding: 0 18px; border-radius: 10px; border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-family: inherit; font-size: 13.5px; font-weight: 600;
}
.creative-section { margin-top: 40px; }
.creative-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.creative-section-head h2 { font-size: 18px; font-weight: 600; margin: 0; }
.creative-section-actions { display: flex; align-items: center; gap: 10px; }
.link-btn {
  background: none; border: none; color: var(--text-2); cursor: pointer;
  font-family: inherit; font-size: 13px; padding: 4px 2px;
}
.link-btn:hover { color: var(--text); }
.creative-empty {
  min-height: 140px; border-radius: var(--radius-lg); border: 1px dashed var(--border-strong);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 13.5px;
}
.creative-project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.creative-project-card {
  text-align: left; cursor: pointer; font-family: inherit; padding: 14px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: linear-gradient(150deg, rgba(124, 92, 255, 0.08), rgba(255, 255, 255, 0.02));
  display: flex; flex-direction: column; gap: 6px; transition: 0.2s; color: var(--text);
}
.creative-project-card:hover { transform: translateY(-2px); border-color: rgba(124, 92, 255, 0.4); }
.creative-project-tag { font-size: 11.5px; color: #cdc4ff; }
.creative-project-title { font-size: 14px; font-weight: 600; }
.creative-project-time { font-size: 11.5px; color: var(--text-3); }
.hot-skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.creative-skill-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px; cursor: pointer;
  border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface);
  transition: 0.2s; min-height: 129px;
}
.creative-skill-card:hover { transform: translateY(-2px); border-color: rgba(124, 92, 255, 0.45); }
.creative-skill-card__cover {
  width: 140px; height: 103px; flex: none; border-radius: 12px; overflow: hidden;
  background: linear-gradient(150deg, #7c5cff, #22d3ee);
}
.creative-skill-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.creative-skill-card__body { display: flex; flex-direction: column; min-height: 103px; min-width: 0; }
.creative-skill-card__title { font-size: 14px; font-weight: 600; }
.creative-skill-card__desc { color: var(--text-2); font-size: 12px; line-height: 1.55; margin-top: 5px; }
.creative-skill-card__meta { margin-top: auto; font-size: 11.5px; color: var(--text-3); }
@media (max-width: 1100px) {
  .creative-page { padding: 0 16px 60px; }
  .hot-skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creative-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .creative-title { font-size: 24px; line-height: 32px; }
  .hot-skills-grid, .creative-project-grid { grid-template-columns: 1fr; }
}
@media (min-width: 1200px) {
  main { padding-left: 88px; }
  .nav { display: none; }
}
@media (max-width: 1199px) {
  .app-sidebar { display: none; }
}
.feature {
  position: relative; overflow: hidden; padding: 20px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: linear-gradient(150deg, rgba(124, 92, 255, 0.09), rgba(255, 255, 255, 0.02));
  transition: 0.2s; cursor: pointer;
}
.feature:hover { transform: translateY(-3px); border-color: rgba(124, 92, 255, 0.4); }
.feature-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--primary-soft); font-size: 17px; margin-bottom: 12px;
}

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tabs button {
  background: none; border: none; color: var(--text-2); font-size: 14.5px; padding: 10px 15px;
  cursor: pointer; border-bottom: 2px solid transparent; transition: 0.16s; font-family: inherit;
}
.tabs button:hover { color: var(--text); }
.tabs button.on { color: #fff; border-bottom-color: var(--primary); font-weight: 600; }

.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
/* 首页「爆款案例」：固定 5 个一列（宽屏），窄屏逐级降为 4 / 3 / 2 列 */
.case-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1400px) { .case-grid--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .case-grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .case-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.case {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-soft); transition: 0.2s;
}
.case:hover { transform: translateY(-4px); border-color: rgba(124, 92, 255, 0.45); box-shadow: var(--shadow-soft); }
.case-cover { position: relative; aspect-ratio: 3 / 4; overflow: hidden; }
.case-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: 0.4s; }
.case-cover video { width: 100%; height: 100%; object-fit: cover; display: block; transition: 0.4s; }
.case:hover .case-cover img { transform: scale(1.06); }
.case-cover .ov {
  position: absolute; inset: auto 0 0 0; padding: 30px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.86)); font-size: 13px; font-weight: 600;
}
.case-badge {
  position: absolute; top: 9px; left: 9px; padding: 3px 8px; border-radius: 6px; font-size: 11px;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.16);
}
.case-stat {
  position: absolute; top: 9px; right: 9px; padding: 3px 8px; border-radius: 6px;
  font-size: 11px; background: rgba(124, 92, 255, 0.85);
}
.case-meta { padding: 10px 12px; }

/* 资产中心批量删除：卡片悬停显示选择框，选中后才出现底部操作栏 */
.asset-batch-card { transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.asset-lazy-media { opacity: 0; transition: opacity 0.18s ease; }
.asset-lazy-media[src] { opacity: 1; }
.asset-batch-card.is-selected {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), var(--shadow-soft);
}
.asset-batch-card.is-batch-mode { cursor: pointer; user-select: none; }
.asset-batch-card.is-batch-mode.is-selected {
  border-color: rgba(167, 139, 250, 0.86);
  box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.58), var(--shadow-soft);
}
.asset-batch-card.is-batch-mode .asset-select-check {
  opacity: 1; pointer-events: auto; transform: none;
}
.asset-batch-card .case-badge { top: auto; bottom: 9px; }
.asset-select-check {
  position: absolute; left: 9px; top: 9px; z-index: 4;
  width: 20px; height: 20px; padding: 0; display: grid; place-items: center;
  color: #171719; background: #f5f5f6; border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 5px; box-shadow: 0 2px 9px rgba(0, 0, 0, 0.45);
  cursor: pointer; opacity: 0; pointer-events: none; transform: scale(0.82);
  transition: opacity 0.14s, transform 0.14s, background-color 0.14s;
}
.asset-select-check:hover { background: #fff; transform: scale(1.06); }
.asset-select-check.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.asset-select-check:focus-visible {
  opacity: 1; pointer-events: auto; transform: none;
  outline: 2px solid rgba(167, 139, 250, 0.9); outline-offset: 2px;
}
.asset-select-check svg { width: 14px; height: 14px; display: block; stroke-width: 2.2; }
.asset-batch-card:hover .asset-select-check { opacity: 1; pointer-events: auto; transform: none; }
.asset-batchbar {
  position: fixed; left: 50%; bottom: 24px; z-index: 120;
  min-height: 54px; padding: 8px 10px 8px 16px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px;
  color: #d6d6da; background: #202023;
  border: 1px solid rgba(255, 255, 255, 0.11); border-radius: 12px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.52);
}
.canvas-asset-batchbar { z-index: 215; }
.asset-batch-count { font-size: 12px; color: #9d9da5; white-space: nowrap; }
.asset-batch-actions { display: flex; align-items: center; gap: 8px; }
.asset-batch-actions button {
  height: 38px; min-width: 68px; padding: 0 16px;
  color: #ededf0; background: #303033; border: 1px solid transparent;
  border-radius: 8px; font-family: inherit; font-size: 13px; cursor: pointer; transition: 0.15s;
}
.asset-batch-actions button:hover:not(:disabled) { background: #3a3a3e; }
.asset-batch-actions button.is-danger { color: #ff8d98; background: rgba(164, 44, 48, 0.28); }
.asset-batch-actions button.is-danger:hover:not(:disabled) { background: rgba(189, 49, 55, 0.38); }
.asset-batch-actions button:disabled { opacity: 0.55; cursor: wait; }
.asset-batch-enter-active, .asset-batch-leave-active { transition: opacity 0.16s, transform 0.16s; }
.asset-batch-enter-from, .asset-batch-leave-to { opacity: 0; transform: translate(-50%, 7px); }
.canvas-asset-batch-toggle { min-width: 96px; justify-content: center; }
.canvas-asset-batch-toggle.on {
  color: #e7e0ff; border-color: rgba(167, 139, 250, 0.42);
  background: rgba(124, 92, 255, 0.15);
}
.canvas-asset-head-actions { align-items: center; }
.canvas-asset-head-actions > .btn {
  height: 32px; min-height: 32px; padding: 0 11px; line-height: 1;
  align-items: center; vertical-align: middle;
}
.canvas-asset-head-actions > .btn-primary { border: 1px solid transparent; }
.canvas-asset-confirm-mask { z-index: 230; }
@media (hover: none) {
  .asset-select-check { opacity: 1; pointer-events: auto; transform: none; }
}
@media (max-width: 700px) {
  .asset-batchbar { left: 14px; right: 14px; bottom: 14px; transform: none; justify-content: space-between; }
  .asset-batch-actions { flex: 1; justify-content: flex-end; }
}

/* 案例详情浮层：左侧播放器 + 右侧信息 + 底部缩略图条 */
.case-modal {
  position: fixed; inset: 0; z-index: 120; padding: 22px 26px 16px;
  background: rgba(6, 6, 12, 0.94); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; gap: 14px;
}
.case-close {
  position: absolute; right: 18px; top: 16px; z-index: 2;
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 14px;
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.06); color: var(--text-2);
}
.case-close:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
.case-modal-main {
  flex: 1; min-height: 0; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 18px;
  /* 行高必须跟着可视高度收住：否则行高是 auto，舞台拿到的是不确定高度，
     <video> 就会按自身（或 poster）比例把盒子撑高，画面跑到舞台外面去 */
  grid-template-rows: minmax(0, 1fr);
}
.case-stage {
  position: relative; min-height: 0; border-radius: 14px; overflow: hidden;
  background: #000; display: grid; place-items: center;
}
/* 视频吃满舞台：绝对定位，脱离文档流，永远不会反向撑大舞台 */
.case-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #000; display: block;
}
.case-stage-empty { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.case-stage-empty img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.case-stage-empty .tiny { position: relative; z-index: 1; }
.case-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-2); user-select: none;
  background: rgba(10, 10, 18, 0.6); border: 1px solid var(--border-strong);
}
.case-nav:hover { color: #fff; background: rgba(124, 92, 255, 0.45); }
.case-nav.left { left: 12px; }
.case-nav.right { right: 12px; }
.case-side {
  min-height: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  padding: 18px 20px; border-radius: 14px;
  background: rgba(16, 16, 26, 0.92); border: 1px solid var(--border-strong);
}
.case-side-body { overflow: auto; }
.case-title { margin: 0 0 12px; font-size: 21px; line-height: 1.35; color: #fff; }
.case-author { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.case-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 12px; color: #fff;
  background: linear-gradient(135deg, #7c5cff, #22d3ee);
}
.case-desc { margin: 14px 0 0; font-size: 13px; line-height: 1.85; color: var(--text-2); white-space: pre-wrap; }
.case-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.case-tag {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: rgba(124, 92, 255, 0.16); border: 1px solid rgba(124, 92, 255, 0.35); color: #cbbcff;
}
.case-actions { display: flex; align-items: center; gap: 10px; }
.case-go { flex: none; min-width: 106px; }
.case-tut { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.case-tut-ic { font-size: 12px; opacity: 0.8; }
.case-icon-btn {
  width: 40px; height: 40px; flex: none; border-radius: 10px; cursor: pointer; font-size: 16px;
  border: 1px solid var(--border); background: none; color: var(--text-2);
}
.case-icon-btn:hover { color: #fff; border-color: var(--border-strong); }
.case-icon-btn.on { color: #ff5d8f; border-color: rgba(255, 93, 143, 0.5); }
.case-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.case-strip-item {
  position: relative; flex: none; width: 132px; height: 74px; padding: 0; cursor: pointer;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2);
}
.case-strip-item.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.case-strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-strip-title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 6px 4px;
  font-size: 10px; color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 900px) {
  .case-modal-main { grid-template-columns: 1fr; }
  .case-side { max-height: 38vh; }
}

/* ------------------------- 创作台 ------------------------- */
.studio { display: grid; grid-template-columns: minmax(340px, 400px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .studio { grid-template-columns: 1fr; } }

/*
 * Grid / Flex 子项默认 min-width:auto，会被内部替换元素（video / img）的固有宽度撑破，
 * 导致整列被顶出去、页面横向溢出。这里统一允许收缩。
 */
.studio > *,
.canvas-grid > *,
.creative-grid > *,
.team-grid > *,
.skill-detail-grid > *,
.settings-grid > *,
.dash-grid > * { min-width: 0; }

.model-list { display: flex; flex-direction: column; gap: 8px; max-height: 330px; overflow: auto; }
.model-item {
  padding: 11px 13px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; transition: 0.15s;
}
.model-item:hover { border-color: var(--border-strong); background: var(--surface-2); }
.model-item.on { border-color: rgba(124, 92, 255, 0.7); background: var(--primary-soft); }

.stage-list { display: flex; flex-direction: column; gap: 10px; }
.task-card { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 12px 14px; }
.media-box {
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border);
  background: #05050c; position: relative; display: grid; place-items: center; min-height: 260px;
  max-width: 100%;
}
.media-box img, .media-box video {
  width: 100%; max-width: 100%; height: auto; display: block;
  max-height: 62vh; object-fit: contain;
}

/* ------------------------- 画布 ------------------------- */
/* 画布模式：隐藏全局侧边栏与顶栏，主区全宽（工作台形态） */
.canvas-mode .app-sidebar,
.canvas-mode .topbar,
.canvas-mode .announce { display: none; }
.canvas-mode main { padding-left: 0 !important; }
.canvas-mode .page-wide { max-width: none; padding: 0; }
.canvas-mode .canvas-wrap {
  height: 100vh; border-radius: 0; border: none;
}
/* 创作工坊教程：全屏只读项目，不显示编辑器工具栏 */
.tutorial-page .canvas-wrap { height: 100vh; border: 0; border-radius: 0; }
.tutorial-head {
  position: absolute; inset: 0 0 auto 0; z-index: 60; height: 56px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 20px; padding: 0 18px;
  color: #f3f3f4; background: rgba(30, 30, 32, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}
.tutorial-head-title { min-width: 0; font-size: 16px; font-weight: 650; letter-spacing: 0.01em; }
.tutorial-head-center { display: flex; align-items: center; gap: 5px; padding: 4px; border-radius: 10px; background: rgba(255, 255, 255, 0.035); }
.tutorial-tool,
.tutorial-close {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  color: rgba(255, 255, 255, 0.72); background: transparent; border: 0; border-radius: 7px; cursor: pointer;
}
.tutorial-tool:hover,
.tutorial-close:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.tutorial-tool svg,
.tutorial-close svg { width: 16px; height: 16px; display: block; }
.tutorial-zoom { min-width: 42px; text-align: center; font-size: 12px; color: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums; }
.tutorial-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.tutorial-readonly { font-size: 12.5px; color: rgba(255, 255, 255, 0.82); white-space: nowrap; }
.tutorial-copy { display: inline-flex; align-items: center; gap: 7px; color: #fff !important; border-color: transparent !important; }
.tutorial-copy .ico svg { width: 16px; height: 16px; display: block; }
.tutorial-page .canvas-wrap { cursor: grab; }
.tutorial-page .canvas-wrap.grabbing { cursor: grabbing; }
.canvas-head {
  position: absolute; left: 14px; top: 14px; z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 6px 10px;
  border-radius: 12px; background: rgba(14, 14, 26, 0.72);
  border: 1px solid var(--border); backdrop-filter: blur(12px);
}
.canvas-head .back {
  /* 只留图标（去掉「首页」文字），做成略带底色的方形图标按钮，图标也放大一些 */
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  cursor: pointer; color: rgba(255, 255, 255, 0.78);
  background: none; border: none; font-family: inherit; padding: 0;
  transition: color 0.16s, background-color 0.16s;
}
.canvas-head .back:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.canvas-head .back svg { width: 20px; height: 20px; display: block; }
/* 只读画布（团队里别人的画布）的提示小胶囊 */
.canvas-ro-tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; color: #e7e0ff; background: rgba(124, 92, 255, 0.18);
  border: 1px solid rgba(124, 92, 255, 0.5);
}
.canvas-ro-tag svg { width: 13px; height: 13px; display: block; }
.canvas-head .proj { font-size: 13.5px; color: var(--text); font-weight: 600; }

/* 右上角：投稿（小飞机）+ 信息栏显隐，两个独立按钮 */
.canvas-actions {
  position: absolute; right: 14px; top: 14px; z-index: 21;
  display: flex; align-items: center; gap: 8px;
}
.canvas-act {
  width: 34px; height: 34px; padding: 0; border-radius: 11px; cursor: pointer;
  display: grid; place-items: center; font-size: 15px; font-family: inherit;
  background: rgba(14, 14, 26, 0.72); border: 1px solid var(--border);
  color: var(--text-2); backdrop-filter: blur(12px); transition: 0.16s;
}
.canvas-act .ri svg { width: 18px; height: 18px; display: block; }
.canvas-act:hover { color: #fff; border-color: var(--border-strong); background: var(--surface-2); }
.canvas-act.on {
  color: #e7e0ff; background: var(--primary-soft);
  border-color: rgba(124, 92, 255, 0.65);
}
.canvas-send {
  color: #cbbcff; background: rgba(124, 92, 255, 0.16);
  border-color: rgba(124, 92, 255, 0.5);
}
.canvas-send:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 顶栏「团队归属」：纯展示，不带点击、悬停或下拉引导。 */
.canvas-attribution {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  border-radius: 11px; pointer-events: none; font-size: 12.5px;
  background: rgba(38, 38, 41, 0.92); border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86); backdrop-filter: blur(12px);
  max-width: 240px; white-space: nowrap;
}
.canvas-attribution .ca-label { color: rgba(255, 255, 255, 0.45); }
.canvas-attribution .ca-name { color: #fff; font-weight: 600; min-width: 0; }
.canvas-attribution .ca-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, 0.42); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.canvas-attribution .ca-dot.is-team {
  background: var(--primary-2); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}

/* 画布选择仍沿用按钮式下拉，和团队归属的纯展示样式分开。 */
.canvas-attr {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  border-radius: 11px; cursor: pointer; font-family: inherit; font-size: 12.5px;
  background: rgba(38, 38, 41, 0.92); border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86); backdrop-filter: blur(12px);
  transition: background-color 0.16s, border-color 0.16s, color 0.16s;
  max-width: 240px; white-space: nowrap;
}
.canvas-attr:hover { background: rgba(54, 54, 58, 0.96); border-color: rgba(255, 255, 255, 0.26); color: #fff; }
.canvas-attr .ca-label { color: rgba(255, 255, 255, 0.45); }
.canvas-attr .ca-name { color: #fff; font-weight: 600; min-width: 0; }
.canvas-attr .ca-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, 0.42); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.canvas-attr .ca-dot.is-team { background: var(--primary-2); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2); }
.canvas-attr .ca-caret { display: block; line-height: 0; opacity: 0.55; transition: opacity 0.16s; }
.canvas-attr .ca-caret svg { width: 13px; height: 13px; display: block; }
.canvas-attr:hover .ca-caret { opacity: 0.9; }

/* 画布左右两栏：默认只有画布，信息栏打开时再让出右侧一列 */
.canvas-grid { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
.canvas-grid.is-panel { grid-template-columns: 1fr 320px; }
/* 顶部要给右上角的按钮组让出位置，否则信息栏标题会被压住 */
.canvas-panel { margin-top: 56px; max-height: calc(100vh - 80px); overflow: auto; }
@media (max-width: 1100px) {
  /* 窄屏放不下两栏：信息栏挪到画布下面 */
  .canvas-grid.is-panel { grid-template-columns: 1fr; }
  .canvas-grid.is-panel .canvas-panel { margin-top: 0; max-height: none; }
}

/*
 * 画布上的紧凑下拉框都是定高的，而 .select 默认带 9px 上下内边距，
 * 会把文字挤到只剩几像素，选中项与原生下拉列表里的字都会被裁掉。
 * 这里去掉上下内边距、固定行高，并留出箭头位置。
 */
/*
 * 顶栏的画布切换：自绘下拉（触发器沿用「团队归属」那颗胶囊的样式，菜单往下弹）。
 * 不用原生 <select> —— 它的弹层在深色主题下是系统绘制的浅色面板，文字几乎看不见。
 */
.cv-pick { position: relative; display: inline-flex; }
.cv-pick .cv-pick-menu {
  left: 0; right: auto; top: calc(100% + 6px); bottom: auto;
  min-width: 220px; max-width: 340px;
}
/* 重命名输入框 / 纯标题（没有画布列表时）*/
.canvas-rename { width: 190px; height: 30px; padding: 0 10px; border-radius: 9px; font-size: 13px; }
.canvas-title { max-width: 190px; font-size: 13px; color: var(--text); }
.canvas-head .canvas-rename-btn { width: 30px; height: 30px; }
.canvas-head .canvas-rename-btn:hover { color: #fff; }

/* 投稿弹窗 */
.submit-thumb {
  width: 96px; height: 64px; flex: none; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2); display: grid; place-items: center;
}
.submit-thumb img, .submit-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.submit-sources { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.submit-source {
  display: flex; flex-direction: column; gap: 4px; width: 110px; flex: none; cursor: pointer;
  padding: 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-family: inherit; font-size: 12px; text-align: left;
}
.submit-source:hover { border-color: var(--primary); color: var(--text); }
.submit-source.on {
  border-color: var(--primary); color: var(--text); background: var(--primary-soft);
  box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.28);
}
.submit-source img { width: 100%; height: 62px; object-fit: cover; border-radius: 6px; }
.submit-source-video {
  width: 100%; height: 62px; display: grid; place-items: center; border-radius: 6px;
  color: var(--text-2); background: var(--surface-2);
}
.submit-source-video svg { width: 24px; height: 24px; }
.canvas-wrap {
  position: relative; height: calc(100vh - var(--nav-h) - 44px); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  /*
   * 用 clip 而不是 hidden：hidden 仍然是滚动容器，节点层的 svg 会撑出滚动区域，
   * 点到节点 / 聚焦生成面板里的输入框时浏览器会悄悄滚动容器，整块画布跟着跳位。
   */
  overflow: hidden; overflow: clip;
  /* 深灰底；点阵网格改由 Konva 引擎画在 .canvas-konva 上（锚在世界原点，随视口平移 / 缩放） */
  background: #141414;
  cursor: grab;
}
/*
 * 组件拖动 / 拉连线 / 平移画布时，别让浏览器顺手做起原生选字。
 * 之前从端口往外拖线，指针扫过节点文字与生成面板，松手后会留下一大片蓝色高亮，
 * 看起来就像「所有组件都被选中了」。
 */
.canvas-wrap { user-select: none; -webkit-user-select: none; }
/* 生成面板里的输入框 / 文本框照旧可以正常选字编辑 */
/* 输入区要能选中复制：图片 / 视频组件的提示词是 contenteditable，别漏掉它 */
.canvas-wrap input, .canvas-wrap textarea, .canvas-wrap [contenteditable] {
  user-select: text; -webkit-user-select: text;
}
.canvas-wrap.grabbing { cursor: grabbing; }
.canvas-wrap.hand { cursor: grab; }
.canvas-wrap.hand .canvas-node { cursor: grab; }
/* 从系统拖文件进来时的提示（松手即落在鼠标位置） */
.canvas-wrap.drop-active::after {
  content: '松手放入画布'; position: absolute; inset: 10px; z-index: 60; pointer-events: none;
  border: 2px dashed rgba(124, 92, 255, 0.75); border-radius: 14px;
  background: rgba(124, 92, 255, 0.08); color: #cbbcff; font-size: 14px;
  display: grid; place-items: center;
}
/*
 * Konva (Canvas2D) 内容层：点阵网格 / 节点连线 / 吸附参考线都画在这块 canvas 上。
 * 铺在画布最底层（z-index 0），盖住 .canvas-wrap 的底色，节点 overlay 叠在它上面。
 */
.canvas-konva { position: absolute; inset: 0; z-index: 0; }
/*
 * Vue overlay 层：只放节点卡片、批量接点这些交互 UI。
 * 层本身不吃事件，空白处的点击穿透到下面的 Konva 画布（连线悬停 / 命中还在这层下面）。
 */
.canvas-layer { position: absolute; inset: 0; transform-origin: 0 0; z-index: 1; pointer-events: none; }
.canvas-node {
  position: absolute; width: 320px; cursor: move; pointer-events: auto;
}
.node-label {
  display: flex; align-items: center; gap: 8px; height: 22px; margin-bottom: 6px;
  padding: 0 2px; font-size: 13px; color: #ededed;
}
/* 标签最左边的类型小图标：浅色圆角方块 + 深色图形（对齐参考稿） */
.node-label-ico {
  flex: none; width: 17px; height: 17px; border-radius: 4px;
  display: grid; place-items: center;
  background: #e9e9ea; color: #141414;
}
.node-label-ico svg { width: 12px; height: 12px; display: block; }
.node-label-title { flex: 1; min-width: 0; }
/* 画面尺寸写在标签最右侧 */
.node-label-size { flex: none; font-size: 12.5px; color: #8a8a8a; }
/* 网格吸附的参考虚线：拖动时出现，若隐若现；画得比可视区大，任何缩放/平移都不会断 */
.canvas-guide { position: absolute; pointer-events: none; z-index: 0; opacity: 0.5; }
.guide-v { top: -10000px; height: 20000px; border-left: 1px dashed rgba(124, 92, 255, 0.8); }
.guide-h { left: -10000px; width: 20000px; border-top: 1px dashed rgba(124, 92, 255, 0.8); }
.node-card {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07); background: #262626;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
  display: flex; align-items: center; justify-content: center;
  /* 空态背景渐变的主色：浅蓝（rgb 分量） */
  --node-accent: 125, 211, 252;
}
.node-card--video, .node-card--text { aspect-ratio: 16 / 9; }
.node-card--image, .node-card--voice, .node-card--audio { aspect-ratio: 4 / 3; }
/*
 * 音频 / 语音卡片不留内边距：之前留了 12px / 18px，空态渐变只铺满内容盒，
 * 卡片四周会露出一圈底色，看起来就是「背景没占满」。改成让背景铺满整张卡，
 * 播放器自己用外边距留白。
 */
.node-card--audio, .node-card--voice { padding: 0; }
/* 所有节点共用同一套生成失败态（正文 / 图片 / 视频 / 音频 / 语音 / 调度台） */
.node-card--failure {
  border-color: rgba(255, 255, 255, 0.1);
  background: #242424;
}
.node-failure {
  width: 100%; height: 100%; min-height: 64px; padding: 20px 28px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; text-align: center; color: #fff;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 107, 112, 0.035), transparent 48%),
    #242424;
}
.node-failure-icon {
  display: block; line-height: 0; color: #ff686e;
  filter: drop-shadow(0 0 10px rgba(255, 104, 110, 0.16));
}
.node-failure-icon svg { width: 42px; height: 42px; display: block; stroke-width: 1.6; }
.node-failure-title {
  font-size: 15px; line-height: 1.35; font-weight: 650; color: #ff686e;
}
.node-failure-hint {
  max-width: 92%; font-size: 12px; line-height: 1.5; color: rgba(255, 255, 255, 0.72);
}
/* 双击后按 320×180 卡片的 3 倍（960×540）展开，视口不足时等比收纳 */
.failure-detail-mask { padding: 20px; }
.node-failure--preview {
  position: relative;
  width: min(960px, calc(100vw - 40px));
  height: min(540px, calc(100vh - 40px));
  aspect-ratio: 16 / 9; gap: 22px; padding: 56px 72px;
  border: 1px solid rgba(255, 255, 255, 0.11); border-radius: 22px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  overflow: hidden;
}
.node-failure--preview .node-failure-icon svg {
  width: clamp(58px, 6vw, 88px); height: clamp(58px, 6vw, 88px);
}
.node-failure--preview .node-failure-title {
  font-size: clamp(20px, 2vw, 30px); line-height: 1.25;
}
.node-failure-reason {
  width: min(86%, 1180px); max-height: 52%; overflow: auto;
  padding: 16px 20px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.035);
  font-size: clamp(14px, 1.3vw, 19px); line-height: 1.72;
  color: rgba(255, 255, 255, 0.82);
  white-space: pre-wrap; overflow-wrap: anywhere; user-select: text;
}
.node-failure-close {
  position: absolute; right: 20px; top: 20px; width: 38px; height: 38px; padding: 0;
  display: grid; place-items: center; cursor: pointer; color: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 50%;
  background: rgba(255, 255, 255, 0.04); font-family: inherit;
}
.node-failure-close:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.node-failure-close svg { width: 18px; height: 18px; display: block; }
/* 选中态：不描一圈硬边，改成边缘发光（内侧一圈柔光 + 外侧两层光晕） */
.canvas-node.is-active .node-card {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.45),
    0 0 18px rgba(255, 255, 255, 0.14),
    0 10px 26px rgba(0, 0, 0, 0.45);
}
.canvas-node.is-dimmed { opacity: 0.22; filter: grayscale(0.6); }
/* 框选矩形本身：屏幕坐标，不跟画布缩放 */
.canvas-marquee {
  position: absolute; z-index: 30; pointer-events: none;
  border: 1px solid rgba(124, 92, 255, 0.85);
  background: rgba(124, 92, 255, 0.14);
  border-radius: 4px;
}
/*
 * 框选完成后的区域：淡蓝底 + 虚线边（世界坐标，跟着画布缩放/平移）。
 * 区域里不再写提示文字（"已选 N 个…"那行），右边那个批量接点用 --sel-scale 反缩放。
 */
.canvas-group-frame {
  position: absolute; z-index: 1; pointer-events: auto; cursor: default;
  border: 1px solid var(--group-border, rgba(255, 255, 255, 0.3));
  border-radius: 18px; background: var(--group-bg, rgba(139, 143, 154, 0.2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}
.canvas-node { z-index: 2; }
.canvas-group-head {
  position: absolute; left: 10px; top: -40px; z-index: 2;
  display: flex; align-items: center; gap: 5px; min-height: 33px; padding: 3px 4px 3px 9px;
  border-radius: 8px; color: #f1f1f2; background: rgba(28, 28, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08); backdrop-filter: blur(10px);
  pointer-events: auto;
}
.canvas-group-name {
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0; border: 0; color: inherit; background: none; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 650; text-align: left;
}
.canvas-group-name:hover { color: #fff; }
.canvas-group-head-btn {
  display: grid; place-items: center; width: 21px; height: 21px; padding: 0;
  border: 0; border-radius: 6px; color: rgba(255, 255, 255, 0.5);
  background: transparent; cursor: pointer;
}
.canvas-group-head-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.canvas-group-head-btn svg { width: 13px; height: 13px; display: block; }
.canvas-group-rename-input {
  width: 180px; height: 29px; padding: 0 8px; border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.15); outline: none;
  color: #fff; background: rgba(255, 255, 255, 0.08);
  font: inherit; font-size: 15px; font-weight: 600;
}
.canvas-group-rename-input:focus { border-color: rgba(255, 255, 255, 0.35); }
.canvas-selection {
  position: absolute; z-index: 5; pointer-events: none;
  border: 1px dashed rgba(125, 211, 252, 0.85);
  background: rgba(125, 211, 252, 0.13);
  border-radius: 12px;
}
/* 右侧居中那个闪烁的批量连线接点：外观和组件出口一致，只是带呼吸动画 */
.canvas-batch-port {
  position: absolute; z-index: 6; width: 14px; height: 14px; padding: 0; pointer-events: auto;
  margin: 0; border: 2px solid #0b0b0d; border-radius: 50%; cursor: crosshair;
  background: #7dd3fc; box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.25);
  transform: translate(-50%, -50%) scale(var(--sel-scale, 1));
  animation: batch-port-pulse 1.1s ease-in-out infinite;
}
.canvas-batch-port:hover { background: #bae6fd; }
@keyframes batch-port-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.22); }
  50% { box-shadow: 0 0 0 7px rgba(125, 211, 252, 0.42); }
}
/* 多选后贴在选区上方的批量工具条 */
.canvas-multi-tools {
  position: absolute; z-index: 34; transform: translate(-50%, -100%);
  display: flex; align-items: center; gap: 2px; padding: 5px;
  color: rgba(255, 255, 255, 0.78); font-size: 12px;
  background: rgba(30, 30, 32, 0.96); border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 13px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
}
.cmt-menu-wrap { position: relative; }
.cmt-color-wrap { position: relative; }
.cmt-btn {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 6px 9px; border: 0; border-radius: 9px;
  color: inherit; background: transparent; cursor: pointer; white-space: nowrap;
  font: inherit; transition: color 0.15s, background-color 0.15s;
}
.cmt-btn:hover:not(:disabled), .cmt-btn.on { color: #fff; background: rgba(255, 255, 255, 0.09); }
.cmt-btn:disabled { color: rgba(255, 255, 255, 0.3); cursor: not-allowed; }
.cmt-icon { display: block; line-height: 0; }
.cmt-icon svg { width: 16px; height: 16px; display: block; }
.cmt-label { display: flex; align-items: center; gap: 3px; }
.cmt-caret { display: block; line-height: 0; opacity: 0.55; }
.cmt-caret svg { width: 11px; height: 11px; display: block; }
.cmt-btn.on .cmt-caret { transform: rotate(180deg); opacity: 1; }
.cmt-count {
  display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; color: #111; background: rgba(255, 255, 255, 0.78);
  font-size: 9.5px; font-weight: 700; line-height: 1;
}
.cmt-swatch {
  display: block; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.04);
}
.cmt-color-pop {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 4; width: 214px;
  display: grid; grid-template-columns: repeat(5, 28px); gap: 10px 12px; padding: 13px;
  border-radius: 12px; background: rgba(32, 32, 34, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
}
.cmt-color-choice {
  width: 28px; height: 28px; padding: 0; border: 2px solid transparent; border-radius: 50%;
  background: var(--swatch); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.cmt-color-choice:hover { transform: scale(1.1); }
.cmt-color-choice.on {
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16);
}
.cmt-menu {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 4; width: 158px; padding: 5px;
  border-radius: 11px; background: rgba(32, 32, 34, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
}
.cmt-menu button {
  width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 9px;
  border: 0; border-radius: 8px; color: rgba(255, 255, 255, 0.75);
  background: transparent; cursor: pointer; font: inherit; text-align: left;
}
.cmt-menu button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
/* 拖连线时悬停到的目标节点：高亮一下，线也会吸附到它的入口 */
.canvas-node.is-link-target .node-card {
  border-color: rgba(96, 165, 250, 0.75);
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.55),
    0 0 20px rgba(96, 165, 250, 0.45),
    0 12px 28px rgba(0, 0, 0, 0.4);
}
/* 卡片宽高比已经跟着画面比例走，这里用 contain 保证任何比例都不被裁切 */
.node-media { width: 100%; height: 100%; object-fit: contain; display: block; background: #262626; }
/*
 * 媒体懒加载占位：节点本身和尺寸都提前存在，真实 <img>/<video> 只在靠近视口时挂载。
 * 不用循环动画，避免画布上大量屏幕外占位持续消耗渲染资源。
 */
.node-media-placeholder {
  width: 100%; height: 100%; min-height: 64px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: rgba(255, 255, 255, 0.22); background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 58%),
    #242424;
}
/* 多图收起时，占位层必须保持和真实叠图一样的让步尺寸，不能盖住露出的层边。 */
.node-img-ghost.node-media-placeholder {
  width: calc(100% - var(--stack-x, 0px));
  height: calc(100% - var(--stack-y, 0px));
  min-height: 0;
}
.node-media-placeholder .node-empty-icon svg { width: 34px; height: 34px; }
.node-media-placeholder-text {
  font-size: 11px; line-height: 1; color: rgba(255, 255, 255, 0.24);
}
/* 音频 / 语音组件共用播放器：上面是动态声纹，下面是播放控制条 */
.voice-node-player {
  width: 100%; height: 100%; padding: 16px 18px 13px;
  display: flex; flex-direction: column; gap: 10px; user-select: none; cursor: move;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 0%, rgba(124, 92, 255, 0.1), transparent 46%),
    linear-gradient(145deg, #262629, #202023 62%, #1b1b1e);
}
.voice-node-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.voice-node-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 9px; font-weight: 650; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.48);
}
.voice-node-kicker svg { width: 13px; height: 13px; display: block; }
.voice-node-status {
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 8.5px; letter-spacing: 0.11em; color: rgba(255, 255, 255, 0.28);
}
.voice-node-status.live { color: #b8a8ff; }
.voice-wave-control {
  flex: 1 1 auto; min-height: 92px; width: 100%; padding: 12px 9px;
  display: flex; align-items: center; gap: 2px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent),
    rgba(9, 9, 12, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  cursor: pointer; font-family: inherit;
}
.voice-wave-control:hover { border-color: rgba(167, 139, 250, 0.26); }
.voice-wave-bar {
  flex: 1 1 3px; min-width: 2px; max-width: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transform: scaleY(0.92); transform-origin: center;
  transition: background 0.16s, opacity 0.16s, transform 0.16s;
}
.voice-wave-bar.on {
  background: linear-gradient(180deg, #d5ccff, #8f79ea 58%, #62c8de);
  box-shadow: 0 0 7px rgba(124, 92, 255, 0.2);
}
.voice-wave-control.is-playing .voice-wave-bar {
  animation: voice-wave-breathe 1.05s ease-in-out infinite alternate;
  animation-delay: calc(var(--bar-i, 0) * -28ms);
}
@keyframes voice-wave-breathe {
  from { transform: scaleY(0.74); opacity: 0.72; }
  to { transform: scaleY(1.06); opacity: 1; }
}
.voice-transport {
  display: flex; align-items: center; gap: 9px; min-height: 34px;
}
.voice-play-btn {
  width: 34px; height: 34px; flex: none; padding: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #151518;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(244, 244, 247, 0.94);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 0.18s, box-shadow 0.18s;
}
.voice-play-btn:hover { transform: scale(1.04); background: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.34); }
.voice-play-btn svg { width: 17px; height: 17px; display: block; }
.voice-play-btn .spin { width: 13px; height: 13px; border-width: 1.5px; }
.voice-time-now, .voice-time-total {
  flex: none; min-width: 31px; font-size: 9.5px; line-height: 1;
  color: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums;
}
.voice-time-total { color: rgba(255, 255, 255, 0.3); text-align: right; }
.voice-seek-track {
  flex: 1 1 auto; height: 12px; padding: 0; border: none; background: none;
  position: relative; cursor: pointer;
}
.voice-seek-track::before {
  content: ''; position: absolute; left: 0; right: 0; top: 5px; height: 2px;
  border-radius: 99px; background: rgba(255, 255, 255, 0.11);
}
.voice-seek-track > span {
  position: absolute; left: 0; top: 5px; height: 2px; min-width: 0;
  border-radius: 99px; background: linear-gradient(90deg, #9b86f5, #67c7dc);
}
.voice-node-download {
  width: 28px; height: 28px; flex: none; padding: 0; border-radius: 9px;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.5); font-family: inherit;
}
.voice-node-download:hover { color: #ddd6fe; border-color: rgba(167, 139, 250, 0.24); }
.voice-node-download svg { width: 14px; height: 14px; display: block; }
/* 隐藏的共用播放引擎，不占画布布局 */
.voice-audio-engine { display: none; }
.node-empty {
  display: grid; place-items: center; width: 100%; height: 100%;
  color: rgba(255, 255, 255, 0.3);
  /* 空态就是一块深灰底 + 类型图标（对齐参考稿的视频节点） */
  background: #262626;
}
.node-empty-icon {
  display: block; line-height: 0;
  color: rgba(255, 255, 255, 0.3);
}
.node-empty-icon svg { width: 42px; height: 42px; display: block; }

/* 文字节点生成出来的文案：直接铺在卡片上 */
.node-text-body {
  width: 100%; height: 100%; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.12), rgba(5, 5, 12, 0.9));
}
.node-text-title { font-size: 11.5px; color: #cbbcff; font-weight: 600; }
.node-text {
  flex: 1; overflow: hidden; font-size: 12.5px; line-height: 1.65; color: var(--text-2);
  white-space: pre-wrap;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical;
}
.node-text-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.node-text-copy {
  padding: 3px 8px; border-radius: 7px; cursor: pointer; font-family: inherit; font-size: 11.5px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.node-text-copy:hover { color: #fff; border-color: var(--border-strong); }

/* ------------------- 文字节点的「尝试」引导（空态） ------------------- */
.node-try {
  width: 100%; height: 100%; padding: 18px 18px 14px;
  display: flex; flex-direction: column; background: #262626;
}
.node-try-icon {
  display: block; line-height: 0; margin: 4px auto 16px; color: rgba(255, 255, 255, 0.28);
}
.node-try-icon svg { width: 40px; height: 40px; display: block; }
.node-try-label { font-size: 12.5px; color: #8a8a8a; margin-bottom: 8px; }
.node-try-list { display: flex; flex-direction: column; gap: 4px; }
.node-try-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 5px 6px; border: none; border-radius: 8px; background: none;
  color: #ededed; font-family: inherit; font-size: 13px; text-align: left; cursor: pointer;
  transition: background 0.15s;
}
.node-try-item:hover { background: rgba(255, 255, 255, 0.07); }
.node-try-ico {
  flex: none; width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center;
  background: rgba(146, 106, 255, 0.9); color: #fff;
}
.node-try-ico svg { width: 13px; height: 13px; display: block; }
.node-try-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------- 图片节点：单图 / 多图 ------------------- */
.node-imgs { position: relative; display: flex; width: 100%; height: 100%; gap: 8px; }
/* 多图展开：2 列网格（2 张一行；4 张就是 2×2 四宫格），行高均分卡片高度 */
.node-imgs.is-multi {
  display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; gap: 8px;
}
/*
 * 收起状态下的多图：后面那几张叠成「卡片摞」——
 * 主图往左上让出位置，后面的层（真实的图，不是空卡片）往右下错开，
 * 只在右边 / 下边露出一条边（对齐参考稿）。层本身不接鼠标，别挡着拖组件。
 * 让出多少（--stack-x / --stack-y，每层 7px）由 JS 按层数算：生成 4 张就是 3 层，
 * 第 2/3/4 张的边角都能看到。
 */
.node-imgs.is-stack .node-img {
  /* 主图这层铺满整张卡片（含摞出来的那几条边）：鼠标落在任何一条边上，
     命中的都是主图，不是那几张垫在下面的图 —— 热区统一算主图的 */
  z-index: 3; overflow: visible; border-radius: 0; background: none;
}
.node-imgs.is-stack .node-img .node-img-media {
  width: calc(100% - var(--stack-x, 0px)); height: calc(100% - var(--stack-y, 0px));
  border-radius: 12px; object-fit: cover;
}
.node-img-ghost {
  /* <img> 是替换元素：宽高得给死，不能靠 left/right 拉（否则按图片原始像素尺寸渲染）；
     分隔用一条暗线（不用亮边），免得最外面那层在卡片边上描出一圈很碍眼的亮框 */
  position: absolute; left: 0; top: 0;
  width: calc(100% - var(--stack-x, 0px)); height: calc(100% - var(--stack-y, 0px));
  /* 垫在下面的那几张稍微透一点（0.9），和主图分层更清楚 */
  pointer-events: none; opacity: 0.9;
  object-fit: cover; border-radius: 12px; background: #1b1b1e;
  border: 1px solid rgba(0, 0, 0, 0.5);
}
/*
 * 多图（收起摞起来 / 展开成网格）：卡片自己的底色和边框都透明 ——
 * 画面就是那几张图，外面不要再套一层框；层次感交给每张图自己的投影。
 */
.node-card.has-multi { background: transparent; border-color: transparent; box-shadow: none; }
/* 投影只给「垫在下面 / 网格里」的图：主图不投影，免得把那 7px 的边压暗 */
.node-card.has-multi .node-img-ghost,
.node-card.has-multi .node-imgs.is-multi .node-img { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35); }
/* 选中：卡片那圈边框已经没了，高亮改画在图上 —— 收起时只亮主图那张 */
.canvas-node.is-active .node-card.has-multi { border-color: transparent; box-shadow: none; }
.canvas-node.is-active .node-card.has-multi .node-imgs.is-stack .node-img-media {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5),
    0 0 18px rgba(255, 255, 255, 0.16);
}
/* 展开成网格时每格都是可见的"主图"：整片一起亮 */
.canvas-node.is-active .node-card.has-multi .node-imgs.is-multi .node-img {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5),
    0 0 18px rgba(255, 255, 255, 0.16),
    0 8px 22px rgba(0, 0, 0, 0.35);
}
/* 连线吸附到多图组件时同样亮在图上（卡片的边已经透明，那条规则看不出效果） */
.canvas-node.is-link-target .node-card.has-multi .node-imgs.is-stack .node-img-media,
.canvas-node.is-link-target .node-card.has-multi .node-imgs.is-multi .node-img {
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.6),
    0 0 20px rgba(96, 165, 250, 0.4);
}
.node-img {
  position: relative; flex: 1 1 0; min-width: 0; height: 100%;
  overflow: hidden; border-radius: 12px; background: #1c1c1c;
}
.node-img-media { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 单图：按原比例完整显示（宽高比未知的导入图不会被裁）；多图并排时才铺满每一格 */
.node-imgs:not(.is-multi) .node-img-media { object-fit: contain; }
/* 每张图右上角的悬浮工具条：下载 / 收起 / 设为主图 */
.node-img-tools {
  position: absolute; right: 8px; top: 8px; display: flex; gap: 6px;
  opacity: 0; transform: translateY(-2px); transition: opacity 0.16s ease, transform 0.16s ease;
}
.node-img:hover .node-img-tools { opacity: 1; transform: none; }
/* 多图展开时按钮常显（对齐参考图 2：每张图上都挂着「下载 / 收起 / 设为主图」） */
.node-imgs.is-multi .node-img-tools { opacity: 1; transform: none; }
.node-img-tools button {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px;
  border: none; border-radius: 8px; cursor: pointer; font-family: inherit;
  font-size: 12px; line-height: 1.4; color: #fff; background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px); transition: background 0.15s;
}
.node-img-tools button:hover { background: rgba(0, 0, 0, 0.82); }
.node-img-tools .nit-ico { display: block; line-height: 0; }
.node-img-tools .nit-ico svg { width: 13px; height: 13px; display: block; }
/* 收起状态下右上角的「N 张」展开角标 */
.node-img-count {
  /*
   * 挂在**主图**的右上角，不是卡片的右上角：多图收起时主图右侧还压着几层摞边
   * （--stack-x），角标要跟着往里让，不然会搭在摞出来的那几条边上。
   */
  position: absolute; right: calc(var(--stack-x, 0px) + 8px); top: 8px; z-index: 4;
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px;
  border: none; border-radius: 8px; cursor: pointer; font-family: inherit;
  font-size: 12px; line-height: 1.4; color: #fff; background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}
.node-img-count:hover { background: rgba(0, 0, 0, 0.82); }
.node-img-count svg { width: 13px; height: 13px; display: block; }

/* 未连线图片盖住已连线图片 50% 以上：只在最上层图片显示替换确认 */
.node-image-replace-layer {
  position: absolute; inset: 0; z-index: 9; padding: 18px 30px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(8, 10, 18, 0.52);
  backdrop-filter: blur(2px) saturate(0.85);
}
.node-image-replace-actions {
  width: min(220px, 100%); display: flex; flex-direction: column; gap: 8px;
}
.node-image-replace-btn {
  width: 100%; height: 44px; padding: 0 18px; border-radius: 11px;
  color: rgba(255, 255, 255, 0.92); background: rgba(25, 26, 38, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.24); cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 650;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38);
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
}
.node-image-replace-btn:hover {
  background: rgba(44, 45, 62, 0.98); border-color: rgba(255, 255, 255, 0.42);
}
.node-image-replace-btn.is-primary {
  color: #fff; background: var(--grad); border-color: transparent;
}
.node-image-replace-btn.is-primary:hover {
  background: var(--grad); filter: brightness(1.08); transform: translateY(-1px);
}
.canvas-node.is-image-replace-moving {
  transition: left 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              top 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 文字组件文案的放大预览：超长时内部滚动 */
.text-preview {
  max-height: min(62vh, 620px); overflow: auto; white-space: pre-wrap; word-break: break-word;
  font-size: 13px; line-height: 1.8; color: var(--text-2);
  padding: 14px 16px; border-radius: 12px;
  background: rgba(5, 5, 12, 0.6); border: 1px solid var(--border);
}
/* 选中节点的四角控制点（对齐参考图里的蓝色小方块） */
.nh {
  position: absolute; width: 9px; height: 9px; border-radius: 2px; z-index: 5;
  background: #4d8dff; border: 1px solid #fff; display: none; pointer-events: none;
}
.canvas-node.is-active .nh { display: block; }
.nh-tl { left: -5px; top: 21px; }
.nh-tr { right: -5px; top: 21px; }
.nh-bl { left: -5px; bottom: -5px; }
.nh-br { right: -5px; bottom: -5px; }
.node-card .bar { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; }

/* 节点连线 */
.canvas-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.edge-path { fill: none; stroke: rgba(255, 255, 255, 0.42); stroke-width: 2; }
.edge-path--temp { stroke: var(--cyan); stroke-dasharray: 6 5; }
/* 连线加粗的透明命中区：细线也好点中 */
.edge-hit { fill: none; stroke: transparent; stroke-width: 16; pointer-events: stroke; cursor: pointer; }
.edge-path.is-hover { stroke: rgba(203, 188, 255, 0.85); stroke-width: 2.5; }
.edge-path.is-selected { stroke: var(--primary); stroke-width: 3; }
/* 刚连好的线：虚线流动一小段，一次连好几条时看得清是哪几条 */
.edge-path.is-fresh {
  stroke: #7dd3fc; stroke-width: 2.4;
  stroke-dasharray: 7 6;
  animation: edge-fresh-flow 0.55s linear infinite;
}
@keyframes edge-fresh-flow {
  to { stroke-dashoffset: -26; }
}

/*
 * 光子特效：选中某个组件时，它的输出连线变成一束流动的光。
 * edge-beam-halo 是托底的光晕，edge-beam 是跑动的光点（dasharray + dashoffset 动画）。
 * 两者都 pointer-events:none，不挡下面那条加粗的点击命中区。
 */
.edge-beam-halo {
  fill: none; pointer-events: none;
  stroke: rgba(124, 92, 255, 0.45); stroke-width: 7; stroke-linecap: round;
  filter: blur(3px);
}
.edge-beam {
  fill: none; pointer-events: none;
  stroke: #e9e2ff; stroke-width: 2.6; stroke-linecap: round;
  stroke-dasharray: 3 25;
  filter: drop-shadow(0 0 6px rgba(203, 188, 255, 0.95)) drop-shadow(0 0 12px rgba(124, 92, 255, 0.8));
  animation: photon-flow 1.15s linear infinite;
}
@keyframes photon-flow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -28; }
}

/* 选中节点上方的工具条 */
.node-tools {
  /* z-index 要高于下方生成面板（18），否则贴在一起时工具条被面板盖住点不到 */
  position: absolute; z-index: 30; display: flex; align-items: stretch; gap: 2px;
  padding: 6px; border-radius: 14px; background: rgba(32, 32, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}
.node-tools button {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 10px; border: none; border-radius: 10px; background: none; cursor: pointer;
  color: rgba(255, 255, 255, 0.78); font-size: 11px; font-family: inherit; white-space: nowrap; transition: 0.15s;
  position: relative;
}
.node-tools button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); color: #fff; }
.node-tools button.on { background: rgba(255, 255, 255, 0.15); color: #fff; }
.node-tools button:disabled { opacity: 0.42; cursor: not-allowed; }
.node-tools .nt-icon { display: block; line-height: 0; }
.node-tools .nt-icon svg { width: 17px; height: 17px; display: block; }
.node-tools .nt-sep { width: 1px; background: rgba(255, 255, 255, 0.12); margin: 4px 4px; }
/* 「重命名」按钮下面弹出的输入小框：回车确认，点空白放弃 */
.nt-rename {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 9; width: 216px;
  padding: 10px; border-radius: 12px; background: rgba(32, 32, 34, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  display: flex; flex-direction: column; gap: 8px;
}
.nt-rename .input { width: 100%; height: 32px; }
.nt-rename .row { justify-content: flex-end; }
/* 带下拉的按钮（裁切）：小箭头跟文字同一行，展开时翻上去 */
.node-tools .nt-label { display: flex; align-items: center; gap: 3px; }
.node-tools .nt-caret { display: block; line-height: 0; opacity: 0.6; transition: transform 0.18s ease, opacity 0.18s ease; }
.node-tools .nt-caret svg { width: 12px; height: 12px; display: block; }
.node-tools button:hover .nt-caret { opacity: 0.85; }
.node-tools button.on .nt-caret { transform: rotate(180deg); opacity: 1; }
/* 工具条里的下拉菜单（图片组件的「裁切」） */
.nt-menu-wrap { position: relative; display: flex; }
.nt-menu {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 8; min-width: 210px;
  padding: 6px; border-radius: 12px; background: rgba(32, 32, 34, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  display: flex; flex-direction: column; gap: 2px;
}
.nt-menu button {
  flex-direction: row; justify-content: flex-start; gap: 8px;
  padding: 7px 10px; text-align: left; border-radius: 8px;
}
.nt-menu button .tiny { margin-left: auto; }
.nt-menu-sep { height: 1px; background: var(--border); margin: 4px 2px; }
.nt-menu-row { display: flex; gap: 4px; padding: 2px; }
.nt-menu-row button { justify-content: center; padding: 6px 8px; font-size: 12px; }
/* 裁剪弹窗：图片 + 可拖动裁剪框 */
/* 提取帧弹窗里的预览画面 */
.frame-preview {
  position: relative; border-radius: 10px; overflow: hidden;
  background: #000; margin-bottom: 12px; border: 1px solid var(--border);
}
.frame-preview video { width: 100%; display: block; max-height: 320px; object-fit: contain; background: #000; }
.frame-preview-time {
  position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 6px;
  font-size: 12px; color: #fff; background: rgba(0, 0, 0, 0.62); font-variant-numeric: tabular-nums;
}
/* 音频截取：声纹上高亮当前保留区间，下面用起止两个时间条精调 */
.audio-trim-modal { width: min(620px, calc(100vw - 32px)); max-width: 620px; }
.audio-trim-head { margin-bottom: 16px; }
.audio-trim-title {
  min-width: 0; display: flex; align-items: center; gap: 10px;
}
.audio-trim-title-icon {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border-radius: 10px; color: #d9d0ff;
  background: rgba(124, 92, 255, 0.16); border: 1px solid rgba(167, 139, 250, 0.2);
}
.audio-trim-title-icon svg { width: 17px; height: 17px; display: block; }
.audio-trim-wave {
  position: relative; height: 104px; padding: 18px 14px;
  display: flex; align-items: center; gap: 2px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    #111114;
}
.audio-trim-bar {
  position: relative; z-index: 1; flex: 1 1 2px; min-width: 2px; max-width: 5px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.17);
}
.audio-trim-selection {
  position: absolute; z-index: 2; top: 6px; bottom: 6px; pointer-events: none;
  border-left: 1px solid rgba(211, 199, 255, 0.95);
  border-right: 1px solid rgba(211, 199, 255, 0.95);
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.2), rgba(103, 199, 220, 0.12));
  box-shadow:
    inset 0 0 0 1px rgba(167, 139, 250, 0.12),
    0 0 24px rgba(124, 92, 255, 0.13);
}
.audio-trim-legend {
  margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  color: rgba(255, 255, 255, 0.42); font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.audio-trim-legend strong {
  color: #cbbcff; font-size: 11.5px; font-weight: 600;
}
.audio-trim-controls {
  margin-top: 16px; display: flex; flex-direction: column; gap: 13px;
}
.audio-trim-control {
  display: grid; grid-template-columns: 38px 54px minmax(0, 1fr);
  align-items: center; gap: 9px; color: var(--text-2); font-size: 12px;
}
.audio-trim-control b {
  color: #e7e7ea; font-size: 11.5px; font-weight: 550; font-variant-numeric: tabular-nums;
}
.audio-trim-control input { width: 100%; min-width: 0; }
.audio-trim-format {
  margin-top: 16px; display: flex; align-items: center; gap: 12px;
}
.audio-trim-format-label {
  flex: none; color: var(--text-2); font-size: 12px;
}
.audio-trim-format-options {
  flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
}
.audio-trim-format-options button {
  min-width: 0; padding: 9px 11px; display: flex; align-items: baseline; gap: 8px;
  color: rgba(255, 255, 255, 0.58); background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px;
  font-family: inherit; text-align: left; cursor: pointer; transition: 0.15s;
}
.audio-trim-format-options button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.065); }
.audio-trim-format-options button.on {
  color: #eeeaff; background: rgba(124, 92, 255, 0.17);
  border-color: rgba(167, 139, 250, 0.42);
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.08);
}
.audio-trim-format-options button:disabled { opacity: 0.55; cursor: wait; }
.audio-trim-format-options b { font-size: 12px; font-weight: 650; }
.audio-trim-format-options small {
  overflow: hidden; color: rgba(255, 255, 255, 0.36); font-size: 10.5px;
  text-overflow: ellipsis; white-space: nowrap;
}
.audio-trim-note {
  margin-top: 17px; padding: 10px 12px; border-radius: 10px;
  color: rgba(255, 255, 255, 0.58); font-size: 12px; line-height: 1.65;
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.065);
}
.audio-trim-state {
  margin-top: 10px; display: flex; align-items: center; gap: 7px;
  color: var(--text-3); font-size: 12px;
}
.audio-trim-state.is-error { color: #ff9aa3; }
.audio-trim-engine { display: none; }
.audio-trim-actions {
  margin-top: 18px; display: flex; align-items: center; gap: 8px;
}
.audio-trim-preview-btn { color: #d8d0ff; border-color: rgba(167, 139, 250, 0.2); }

/* 画布上的 3D 调度台节点：3D 预览 + 打开入口 */
.node-scene-body { position: relative; display: flex; flex-direction: column; height: 100%; }
.node-scene-canvas { width: 100%; flex: 1; min-height: 0; display: block; border-radius: 12px; background: #0b0b14; }
.node-scene-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 8px; padding: 0 2px;
}
.node-scene-open {
  padding: 5px 12px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--primary-soft); color: #cbbcff; font-size: 12px; cursor: pointer; font-family: inherit;
}
.node-scene-open:hover { background: rgba(124, 92, 255, 0.34); }

/* 3D 调度台编辑面板 */
.scene-mask { align-items: center; justify-content: center; }
.scene-console {
  width: min(1200px, 96vw); height: min(760px, 92vh); display: flex; flex-direction: column;
  border-radius: 18px; overflow: hidden; background: rgba(14, 14, 24, 0.98);
  border: 1px solid var(--border-strong); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.sc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.sc-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 200px 1fr 220px; }
.sc-tools { padding: 12px; border-right: 1px solid var(--border); overflow: auto; display: flex; flex-direction: column; gap: 6px; }
/* 分区标题（人物资产 / 镜头机位 / 空间环境）：同一个样式，点一下折叠展开 */
.sc-section-head { cursor: pointer; user-select: none; }
.sc-section-head:hover { color: var(--text); }
/* 左栏的「加模特 / 加机位」：用图标库里的线性加号，别用全角 ＋ */
.sc-add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.sc-add .nt-icon { display: block; line-height: 0; opacity: 0.9; }
.sc-add .nt-icon svg { width: 14px; height: 14px; display: block; }
.sc-caret { display: block; line-height: 0; opacity: 0.6; transition: transform 0.18s ease, opacity 0.18s ease; }
.sc-caret svg { width: 12px; height: 12px; display: block; }
.sc-section-head:hover .sc-caret { opacity: 0.9; }
.sc-caret.up { transform: rotate(180deg); opacity: 1; }
/* 空间环境：已连接全景图 + 天空颜色 / 水平旋转 / 球形半径 */
.sc-env {
  display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding: 8px;
  border-radius: 10px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
}
.sc-env-thumb {
  width: 100%; height: 84px; border-radius: 8px; overflow: hidden;
  background: #191922; display: grid; place-items: center;
}
.sc-env-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-env-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-2);
}
.sc-env-val { color: var(--text); font-variant-numeric: tabular-nums; }

/* 折叠说明：平时只占一个 ⓘ 图标，点开才把说明文字展开 */
.info-tip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.info-tip-btn {
  width: 17px; height: 17px; padding: 0; border-radius: 50%; cursor: pointer; font-family: inherit;
  display: grid; place-items: center; color: var(--text-3);
  background: transparent; border: 1px solid var(--border); transition: 0.15s;
}
.info-tip-btn:hover, .info-tip.is-open .info-tip-btn {
  color: #fff; border-color: var(--border-strong); background: var(--surface-2);
}
.info-tip-text {
  font-size: 11.5px; line-height: 1.6; color: var(--text-3);
  padding: 6px 8px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
}
.sc-env-color { display: flex; align-items: center; gap: 8px; }
.sc-swatch {
  width: 44px; height: 30px; flex: none; padding: 0; cursor: pointer;
  background: none; border: 1px solid var(--border-strong); border-radius: 8px;
}
.sc-swatch::-webkit-color-swatch-wrapper { padding: 2px; }
.sc-swatch::-webkit-color-swatch { border: none; border-radius: 6px; }
.sc-pano { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.sc-pano-item {
  display: flex; align-items: center; gap: 8px; padding: 5px; border-radius: 8px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
  font-size: 12px; font-family: inherit; text-align: left;
}
.sc-pano-item:hover { border-color: var(--primary); color: var(--text); }
.sc-pano-item img, .sc-pano-ph { width: 34px; height: 24px; object-fit: cover; border-radius: 5px; flex: none; background: #191922; }
.sc-obj {
  display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 8px; cursor: pointer;
  background: none; border: 1px solid transparent; color: var(--text-2); font-size: 12px;
  font-family: inherit; text-align: left;
}
.sc-obj:hover { background: var(--surface-2); }
.sc-obj.on { background: var(--primary-soft); border-color: var(--primary); color: #cbbcff; }
.sc-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
/*
 * 预览画布：位图固定 1280×720（16:9），显示时也必须保持 16:9。
 * 之前写的是 width/height 都 100%，被塞进一个更高的格子里 → 画面被纵向拉伸，
 * 和「存为图片组件」导出的 16:9 图对不上。
 */
.sc-canvas {
  width: 100%; height: auto; aspect-ratio: 16 / 9; align-self: center;
  display: block; background: #0b0b14; cursor: grab; touch-action: none;
}
.sc-canvas:active { cursor: grabbing; }
.sc-props { padding: 12px; border-left: 1px solid var(--border); overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.sc-props input[type="range"] { width: 100%; accent-color: var(--primary); }
.sc-preview { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; border: 1px solid var(--border); background: #0b0b14; display: block; }

.crop-canvas {
  position: relative; width: 100%; max-height: 46vh; margin: 0 auto;
  border-radius: 12px; overflow: hidden; background: #0b0b14;
}
.crop-canvas > img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  user-select: none; -webkit-user-drag: none;
}
.crop-box {
  position: absolute; box-sizing: border-box; border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55); cursor: move; touch-action: none;
}
.crop-handle {
  position: absolute; right: -8px; bottom: -8px; width: 15px; height: 15px;
  border-radius: 4px; background: #fff; border: 2px solid var(--primary);
  cursor: nwse-resize; touch-action: none;
}
.nt-badge {
  position: absolute; top: -6px; right: 0; font-size: 9px; line-height: 1.4; padding: 0 4px;
  border-radius: 6px; background: rgba(251, 113, 133, 0.9); color: #fff; white-space: nowrap;
}
.port {
  position: absolute; width: 16px; height: 16px; border-radius: 50%;
  /* 深色圆底 + 中间的「＋」（对齐参考稿的 ⊕ 端口） */
  background-color: rgba(26, 26, 26, 0.94);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cg stroke='%23ffffff' stroke-opacity='0.78' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M6 2v8'/%3E%3Cpath d='M2 6h8'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 9px 9px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(20, 20, 20, 0.7);
  cursor: crosshair; z-index: 3;
  transition: border-color 0.16s, background-color 0.16s;
}
.port:hover { border-color: rgba(255, 255, 255, 0.9); background-color: rgba(40, 40, 40, 0.96); }
.port-in { left: -8px; top: 50%; margin-top: -8px; }
.port-out { right: -8px; top: 50%; margin-top: -8px; }
/*
 * 拖线热区（组件右侧输出端口）：命中范围比圆点大一圈，
 * 鼠标移到附近时缓缓淡入一个虚线小白圈做提示（最终透明度 0.7）。
 */
.port-out::after {
  content: ''; position: absolute; inset: -24px; border-radius: 50%;
}
.port-out::before {
  content: ''; position: absolute; inset: -16px; border-radius: 50%;
  border: 1px dashed #fff; opacity: 0;
  transition: opacity 0.35s ease; pointer-events: none;
}
.port-out:hover::before { opacity: 0.7; }
.canvas-toolbar {
  /* 竖排工具条垂直居中（原来是从顶部往下 74px 起排） */
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 15;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px; border-radius: 14px; background: rgba(30, 30, 32, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.09); backdrop-filter: blur(12px);
}
/* 画布工具条的按钮：悬停时是浅色方块 + 图标微微放大（对齐参考稿的白/灰图标） */
.rail-btn {
  position: relative; isolation: isolate;
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 16px;
  display: grid; place-items: center; background: none; border: none; color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s var(--ease-out), background-color 0.2s var(--ease-out),
              transform 0.3s var(--ease-back);
}
.rail-btn > * { position: relative; z-index: 1; }
.rail-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.09); transform: scale(1.06); }
.rail-sep { width: 22px; height: 1px; background: rgba(255, 255, 255, 0.12); margin: 3px 0; }

/* 空画布：提示 + 示例工作流卡片 */
.canvas-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 34px; pointer-events: none;
}
.ce-hint { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--text-2); }
.ce-cards { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; pointer-events: auto; }
.ce-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-width: 250px;
  border-radius: 14px; cursor: pointer; font-family: inherit; text-align: left;
  color: var(--text); background: linear-gradient(150deg, rgba(124, 92, 255, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-strong); transition: 0.18s;
}
.ce-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.ce-icon { font-size: 20px; }
.ce-text { display: flex; flex-direction: column; }
.ce-title { font-size: 14.5px; font-weight: 650; }
.ce-desc { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* 左下角工具条（排版不变，只把外观换成参考稿的中性深灰） */
.canvas-foot {
  /* 底部工具条水平居中（原来贴着左下角） */
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 15;
  display: flex; align-items: center; gap: 8px;
}
.cf-pill {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(30, 30, 32, 0.92); border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px); color: #ededed; font-size: 13px;
}
.cf-btn {
  width: 22px; height: 22px; border-radius: 6px; cursor: pointer; background: none; border: none;
  color: rgba(255, 255, 255, 0.72); font-size: 15px; line-height: 1;
}
.cf-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.cf-zoom { min-width: 42px; text-align: center; font-size: 12.5px; }
.cf-points {
  display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  background: rgba(30, 30, 32, 0.92); border: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.72); font-size: 13px;
}
.cf-points:hover { color: #fff; border-color: rgba(255, 255, 255, 0.22); }
.canvas-help-wrap { position: relative; display: flex; align-items: center; }
.canvas-help-pop {
  position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%);
  width: min(330px, calc(100vw - 28px)); padding: 14px; border-radius: 16px;
  color: #ededed; background: rgba(24, 24, 27, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(18px);
  animation: canvasHelpIn 0.18s var(--ease-out);
}
.canvas-toolbar .canvas-help-wrap { width: 38px; height: 38px; }
.canvas-toolbar .canvas-help-pop {
  left: calc(100% + 12px); top: 50%; bottom: auto;
  transform: translateY(-50%);
  animation-name: canvasHelpInLeft;
}
.canvas-toolbar .canvas-help-pop::after {
  left: -6px; top: calc(50% - 6px); bottom: auto;
  border-right: 0; border-bottom: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.canvas-help-pop::after {
  content: ''; position: absolute; left: calc(50% - 6px); bottom: -6px;
  width: 10px; height: 10px; background: inherit;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transform: rotate(45deg);
}
.canvas-help-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.canvas-help-title {
  display: flex; align-items: center; gap: 8px; color: #fff;
  font-size: 13.5px; font-weight: 650; letter-spacing: 0.01em;
}
.canvas-help-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #d7d7dc; background: rgba(255, 255, 255, 0.07); }
.canvas-help-ico svg { width: 16px; height: 16px; display: block; }
.canvas-help-close {
  display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border-radius: 8px;
  color: rgba(255, 255, 255, 0.55); background: transparent; border: 0; cursor: pointer;
}
.canvas-help-close:hover { color: #fff; background: rgba(255, 255, 255, 0.09); }
.canvas-help-close svg { width: 14px; height: 14px; display: block; }
.canvas-help-list { display: flex; flex-direction: column; gap: 2px; }
.canvas-help-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 37px; padding: 7px 8px; border-radius: 9px;
  color: rgba(255, 255, 255, 0.66); font-size: 12.5px;
}
.canvas-help-row:nth-child(odd) { background: rgba(255, 255, 255, 0.025); }
.canvas-help-keys { display: flex; align-items: center; gap: 4px; flex: none; color: rgba(255, 255, 255, 0.38); }
.canvas-help-keys kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 6px;
  color: #f4f4f5; background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  font-family: inherit; font-size: 11.5px; line-height: 1;
  white-space: nowrap;
}
.canvas-help-keys i { color: rgba(255, 255, 255, 0.34); font-style: normal; font-size: 10px; }

/* 左侧「精品工作流」：沿用快捷键弹层的位置与动效，列表换成可复制的画布模板。 */
.canvas-toolbar .canvas-help-pop.canvas-featured-pop {
  width: min(560px, calc(100vw - 28px)); padding: 16px;
  max-height: min(620px, calc(100vh - 34px)); display: flex; flex-direction: column;
}
.canvas-featured-intro {
  margin: -2px 0 10px; padding: 0 2px; color: rgba(255, 255, 255, 0.42);
  font-size: 11.5px; line-height: 1.55;
}
.canvas-featured-state {
  min-height: 112px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 9px; color: rgba(255, 255, 255, 0.42); font-size: 12px;
}
.canvas-featured-state .ico { width: 22px; height: 22px; color: rgba(245, 202, 114, 0.72); }
.canvas-featured-list {
  min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  overflow: auto; overscroll-behavior: contain;
}
.canvas-featured-item {
  position: relative; width: 100%; min-width: 0; display: flex; flex-direction: column;
  align-items: stretch; gap: 9px; padding: 9px; border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  color: #ededf0; background: rgba(255, 255, 255, 0.025); text-align: left;
  font-family: inherit; cursor: pointer; transition: background-color 0.16s, border-color 0.16s, transform 0.16s;
}
.canvas-featured-item:hover {
  background: rgba(255, 255, 255, 0.07); border-color: rgba(245, 202, 114, 0.26);
  transform: translateY(-2px);
}
.canvas-featured-cover {
  width: 100%; aspect-ratio: 16 / 9; flex: none; overflow: hidden; display: grid; place-items: center;
  color: rgba(255, 255, 255, 0.4); border-radius: 9px; background: #26262a;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.canvas-featured-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.canvas-featured-cover .ico { width: 18px; height: 18px; }
.canvas-featured-copy {
  min-width: 0; width: 100%; display: flex; flex-direction: column; gap: 4px;
  padding: 0 18px 2px 2px;
}
.canvas-featured-copy strong { min-width: 0; color: #f4f4f5; font-size: 13px; font-weight: 600; }
.canvas-featured-copy small { min-width: 0; color: rgba(255, 255, 255, 0.4); font-size: 10.5px; }
.canvas-featured-arrow {
  position: absolute; right: 11px; bottom: 14px; width: 14px; height: 14px;
  flex: none; color: rgba(255, 255, 255, 0.3);
}
.canvas-featured-foot {
  padding: 9px 2px 0; color: rgba(255, 255, 255, 0.32); font-size: 10.5px; text-align: right;
}
.canvas-featured-dialog-icon { color: #f5ca72; background: rgba(245, 202, 114, 0.1); }
@media (max-width: 600px) {
  .canvas-toolbar .canvas-help-pop.canvas-featured-pop {
    left: calc(100% + 8px); width: calc(100vw - 86px);
    max-height: calc(100vh - 28px);
  }
}
@keyframes canvasHelpIn {
  from { opacity: 0; transform: translate(-50%, 7px) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes canvasHelpInLeft {
  from { opacity: 0; transform: translate(-7px, -50%) scale(0.98); }
  to { opacity: 1; transform: translate(0, -50%) scale(1); }
}
.rail-btn.on { background: rgba(255, 255, 255, 0.14); color: #fff; }
.rail-btn .ri { display: block; line-height: 0; transition: transform 0.4s var(--ease-back); }
.rail-btn:hover .ri { transform: scale(1.1); }
.rail-btn .ri svg { width: 19px; height: 19px; display: block; }
.canvas-toolbar .rail-btn .ri svg { width: 21px; height: 21px; }
.cf-help .ri svg { width: 15px; height: 15px; display: block; }

/* ----------------------------------------------------------------------
   画布创作历史：顶部「我的 / 团队记录」，下方按素材类型与日期归档
   ---------------------------------------------------------------------- */
.canvas-history-mask {
  z-index: 220; padding: 18px;
  background: rgba(4, 4, 7, 0.7); backdrop-filter: blur(4px);
}
.canvas-history-modal {
  position: relative; isolation: isolate; width: min(1240px, 96vw); height: min(780px, 90vh);
  padding: 22px 28px 18px; display: flex; flex-direction: column; overflow: hidden;
  color: #f3f3f5; background: #1b1b1d;
  border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.66);
  animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.canvas-history-close {
  position: absolute; top: 18px; right: 20px; z-index: 2;
  width: 30px; height: 30px; padding: 0; display: grid; place-items: center;
  color: rgba(255, 255, 255, 0.56); background: transparent;
  border: 1px solid transparent; border-radius: 8px; cursor: pointer;
}
.canvas-history-close:hover {
  color: #fff; background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}
.canvas-history-close svg { width: 17px; height: 17px; display: block; }
.canvas-history-close.is-inline {
  position: static; flex: none; margin: -3px -5px -3px 0;
}
.canvas-history-tabs {
  flex: none; display: flex; align-items: center; gap: 28px;
  padding: 0 48px 14px 0;
}
.canvas-history-tabs button {
  position: relative; padding: 2px 0 8px; border: 0; background: none;
  color: #85858c; font-family: inherit; font-size: 17px; font-weight: 650;
  line-height: 1.4; cursor: pointer; transition: color 0.16s;
}
.canvas-history-tabs button:hover { color: #d5d5d9; }
.canvas-history-tabs button.on { color: #fff; }
.canvas-history-tabs button.on::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; border-radius: 99px; background: #dedee2;
}
.canvas-history-kindbar {
  flex: none; display: flex; align-items: center; gap: 14px;
  min-height: 42px; margin: 9px 0 7px;
}
.canvas-history-kinds {
  display: flex; align-items: center; gap: 5px; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
.canvas-history-kinds::-webkit-scrollbar { display: none; }
.canvas-history-kinds button {
  height: 38px; padding: 0 13px; display: inline-flex; align-items: center; gap: 7px;
  flex: none; color: #8f8f96; background: transparent; border: 1px solid transparent;
  border-radius: 999px; font-family: inherit; font-size: 13.5px; cursor: pointer;
  transition: color 0.16s, background-color 0.16s, border-color 0.16s;
}
.canvas-history-kinds button:hover { color: #d1d1d5; background: rgba(255, 255, 255, 0.04); }
.canvas-history-kinds button.on {
  color: #fff; background: #303033; border-color: rgba(255, 255, 255, 0.09);
}
.canvas-history-count { color: #73737b; font-size: 11.5px; }
.canvas-history-kinds button.on .canvas-history-count { color: #c4c4ca; }
.canvas-history-sort {
  width: 34px; height: 34px; flex: none; margin-left: auto; display: grid; place-items: center;
  color: #85858c; background: transparent; border: 1px solid transparent;
  border-radius: 9px; cursor: pointer;
}
.canvas-history-sort:hover {
  color: #fff; background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}
.canvas-history-sort svg { width: 18px; height: 18px; display: block; }
.canvas-history-context {
  flex: none; width: max-content; max-width: 100%; margin: 0 0 6px;
  padding: 4px 9px; display: flex; align-items: center; gap: 6px;
  color: #a9a9b0; background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 8px;
  font-size: 11.5px;
}
.canvas-history-context svg { width: 13px; height: 13px; display: block; }
.canvas-history-context span {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.canvas-history-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 4px 5px 20px 0;
}
.canvas-history-modal.has-selection .canvas-history-scroll { padding-bottom: 92px; }
.canvas-history-group + .canvas-history-group { margin-top: 24px; }
.canvas-history-date-row {
  min-height: 28px; margin: 10px 0 12px; display: flex; align-items: center; gap: 9px;
}
.canvas-history-date {
  color: #d9d9dd;
  font-size: 15px; font-weight: 650; letter-spacing: 0.01em;
}
.canvas-history-check {
  width: 19px; height: 19px; padding: 0; flex: none; display: grid; place-items: center;
  color: #161618; background: #f4f4f5; border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 5px; cursor: pointer; opacity: 0; pointer-events: none;
  transform: scale(0.82); transition: opacity 0.14s, transform 0.14s, background-color 0.14s;
}
.canvas-history-check:hover { background: #fff; transform: scale(1.06); }
.canvas-history-check.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.canvas-history-check:focus-visible {
  opacity: 1; pointer-events: auto; transform: none;
  outline: 2px solid rgba(167, 139, 250, 0.9); outline-offset: 2px;
}
.canvas-history-check svg { width: 13px; height: 13px; display: block; stroke-width: 2.2; }
.canvas-history-group:hover .canvas-history-group-check { opacity: 1; pointer-events: auto; transform: none; }
.canvas-history-grid,
.canvas-history-loading {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 185px));
  gap: 12px; align-items: start;
}
.canvas-history-card {
  position: relative; width: 100%; aspect-ratio: 1; padding: 0; overflow: visible;
  display: grid; place-items: center; color: #9a9aa2;
  background: #242427; border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px; cursor: pointer;
  transition: transform 0.18s var(--ease-out), border-color 0.18s, box-shadow 0.18s;
}
.canvas-history-card:hover {
  transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.36);
}
.canvas-history-card:focus-visible {
  outline: none; border-color: rgba(167, 139, 250, 0.8);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.22);
}
.canvas-history-card.is-selected {
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.canvas-history-card-check {
  position: absolute; left: 9px; top: 9px; z-index: 5;
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.45);
}
.canvas-history-card:hover .canvas-history-card-check { opacity: 1; pointer-events: auto; transform: none; }
.canvas-history-card img,
.canvas-history-card video {
  position: absolute; inset: 0; min-width: 0; min-height: 0;
  width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit;
}
.canvas-history-card video { pointer-events: none; }
.canvas-history-card-icon { display: grid; place-items: center; font-size: 34px; opacity: 0.7; }
.canvas-history-card-type {
  position: absolute; left: 9px; bottom: 9px;
  padding: 3px 7px; display: inline-flex; align-items: center; gap: 4px;
  color: #f1f1f3; background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 7px;
  backdrop-filter: blur(7px); font-size: 10.5px; line-height: 1.3;
}
.canvas-history-card-type svg { width: 11px; height: 11px; display: block; }
.canvas-history-more-wrap { position: absolute; right: 8px; top: 8px; z-index: 6; }
.canvas-history-more {
  height: 25px; padding: 0 7px; display: inline-flex; align-items: center; gap: 3px;
  color: #f2f2f4; background: rgba(0, 0, 0, 0.66); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px; backdrop-filter: blur(8px); font-family: inherit;
  font-size: 10.5px; cursor: pointer; opacity: 0; transform: translateY(-2px);
  transition: opacity 0.15s, transform 0.15s, background-color 0.15s;
}
.canvas-history-more:hover, .canvas-history-more.on { background: rgba(0, 0, 0, 0.84); }
.canvas-history-more svg { width: 10px; height: 10px; display: block; transition: transform 0.15s; }
.canvas-history-more.on svg { transform: rotate(180deg); }
.canvas-history-card:hover .canvas-history-more,
.canvas-history-card.is-selected .canvas-history-more,
.canvas-history-more.on { opacity: 1; transform: none; }
.canvas-history-more-menu {
  position: absolute; right: 0; top: calc(100% + 5px); z-index: 9; width: 128px; padding: 5px;
  border-radius: 9px; background: rgba(22, 22, 25, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  animation: pop 0.14s var(--ease-out);
}
.canvas-history-more-menu button {
  width: 100%; padding: 7px; display: flex; align-items: center; gap: 6px;
  color: #e4e4e7; background: transparent; border: 0; border-radius: 6px;
  font-family: inherit; font-size: 11.5px; text-align: left; cursor: pointer;
}
.canvas-history-more-menu button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); }
.canvas-history-more-menu button:disabled { opacity: 0.48; cursor: default; }
.canvas-history-more-menu button.is-danger { color: #ff8b97; }
.canvas-history-more-menu button.is-danger:hover { background: rgba(251, 113, 133, 0.12); }
.canvas-history-more-menu svg { width: 13px; height: 13px; display: block; }
.canvas-history-loading > .skeleton { width: 100%; aspect-ratio: 1; border-radius: 18px; }
.canvas-history-empty {
  min-height: 100%; padding: 54px 20px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; text-align: center; color: #77777f;
}
.canvas-history-empty-icon {
  width: 52px; height: 52px; margin-bottom: 4px; display: grid; place-items: center;
  color: #a1a1a9; background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; font-size: 23px;
}
.canvas-history-empty-title { color: #e4e4e7; font-size: 15px; font-weight: 600; }
.canvas-history-empty-desc { max-width: 410px; font-size: 12.5px; line-height: 1.7; }
.canvas-history-empty .btn { margin-top: 8px; }
.canvas-history-load-more,
.canvas-asset-load-more {
  padding: 18px 0 8px; display: flex; align-items: center; justify-content: center;
  gap: 8px; color: var(--text-3); font-size: 12px;
}
.canvas-history-load-more .spin,
.canvas-asset-load-more .spin { width: 13px; height: 13px; }

/* 画布资产选择：一级筛归属，二级筛类型，两层保持清晰分离。 */
.canvas-asset-tabs { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.canvas-asset-scope-tabs {
  display: inline-flex; gap: 3px; padding: 3px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--border);
}
.canvas-asset-scope-tabs button {
  min-width: 60px; padding: 6px 14px; border: 0; border-radius: 7px;
  color: var(--text-2); background: transparent;
  font: inherit; font-size: 13px; cursor: pointer; transition: 0.16s;
}
.canvas-asset-scope-tabs button:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }
.canvas-asset-scope-tabs button.on {
  color: #fff; font-weight: 600; background: var(--primary);
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.24);
}
.canvas-asset-kind-tabs button { padding-top: 7px; padding-bottom: 7px; }

.canvas-history-batchbar {
  position: absolute; right: 26px; bottom: 17px; z-index: 12;
  min-height: 54px; padding: 8px 10px 8px 16px; display: flex; align-items: center; gap: 16px;
  color: #d3d3d7; background: #202023;
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.48);
}
.canvas-history-selected-count { font-size: 12px; color: #9d9da5; white-space: nowrap; }
.canvas-history-batch-actions { display: flex; align-items: center; gap: 7px; }
.canvas-history-batch-actions button {
  height: 38px; padding: 0 16px; color: #ededf0; background: #303033;
  border: 1px solid transparent; border-radius: 8px; font-family: inherit;
  font-size: 13px; cursor: pointer; transition: 0.15s;
}
.canvas-history-batch-actions button:hover:not(:disabled) { background: #3a3a3e; }
.canvas-history-batch-actions button.is-danger { color: #ff8d98; background: rgba(164, 44, 48, 0.28); }
.canvas-history-batch-actions button.is-danger:hover:not(:disabled) { background: rgba(189, 49, 55, 0.38); }
.canvas-history-batch-actions button.is-primary { color: #fff; background: var(--grad); font-weight: 600; }
.canvas-history-batch-actions button:disabled { opacity: 0.55; cursor: wait; }
.canvas-history-batch-enter-active, .canvas-history-batch-leave-active { transition: opacity 0.16s, transform 0.16s; }
.canvas-history-batch-enter-from, .canvas-history-batch-leave-to { opacity: 0; transform: translateY(7px); }

.canvas-history-preview-mask { z-index: 230; }
.canvas-history-preview {
  width: min(860px, 94vw); max-height: 90vh; padding: 18px; overflow: auto;
  background: #1b1b1d; border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px; box-shadow: 0 28px 90px rgba(0, 0, 0, 0.7);
  animation: pop 0.2s var(--ease-out);
}
.canvas-history-preview-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.canvas-history-preview-title { flex: 1; min-width: 0; color: #f4f4f5; font-size: 15px; font-weight: 650; }
.canvas-history-preview-media {
  min-height: 180px; max-height: 62vh; padding: 12px; display: grid; place-items: center;
  overflow: hidden; background: #09090b; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
}
.canvas-history-preview-media img,
.canvas-history-preview-media video {
  max-width: 100%; max-height: calc(62vh - 24px); display: block; object-fit: contain;
}
.canvas-history-preview-media audio { width: min(520px, 100%); }
.canvas-history-preview-meta {
  margin-top: 11px; display: flex; align-items: center; gap: 12px;
  color: #85858d; font-size: 11.5px;
}
.canvas-history-preview-prompt {
  max-height: 112px; margin-top: 10px; padding: 10px 12px; overflow: auto;
  color: #aaaab1; background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 10px;
  font-size: 12px; line-height: 1.7; white-space: pre-wrap;
}
.canvas-history-preview-actions {
  margin-top: 14px; display: flex; justify-content: flex-end; gap: 8px;
}
@media (max-width: 700px) {
  .canvas-history-mask { padding: 10px; }
  .canvas-history-modal { width: 100%; height: min(90vh, 800px); padding: 18px 16px 14px; border-radius: 15px; }
  .canvas-history-close { top: 15px; right: 13px; }
  .canvas-history-tabs { gap: 20px; padding-right: 38px; }
  .canvas-history-tabs button { font-size: 16px; }
  .canvas-history-kinds button { padding: 0 10px; }
  .canvas-history-grid,
  .canvas-history-loading { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 9px; }
  .canvas-history-card { border-radius: 14px; }
  .canvas-history-preview { padding: 14px; border-radius: 15px; }
  .canvas-history-batchbar {
    left: 12px; right: 12px; bottom: 12px; justify-content: space-between; gap: 8px;
  }
  .canvas-history-selected-count { display: none; }
  .canvas-history-batch-actions { width: 100%; justify-content: flex-end; }
  .canvas-history-batch-actions button { flex: 1; padding: 0 9px; }
}
@media (hover: none) {
  .canvas-history-check,
  .canvas-history-more { opacity: 1; pointer-events: auto; transform: none; }
}

/* 拖线到空白处松手：在落点弹出的「新建哪种组件并连线」小菜单 */
.link-menu {
  position: absolute; z-index: 30; width: 232px; padding: 8px;
  display: flex; flex-direction: column; gap: 8px;
  border-radius: 14px; background: rgba(16, 16, 26, 0.96);
  border: 1px solid var(--border-strong); backdrop-filter: blur(14px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}
.link-menu-list { display: flex; flex-direction: column; }
.link-menu-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: none; border-radius: 10px; background: none; color: var(--text);
  font-family: inherit; text-align: left; cursor: pointer;
}
.link-menu-item:hover { background: var(--surface-2); }
.lm-icon { flex: none; width: 18px; height: 18px; line-height: 0; color: var(--text-2); }
.lm-icon svg { width: 18px; height: 18px; display: block; }
.lm-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lm-title { font-size: 13.5px; font-weight: 600; }
.lm-desc { font-size: 11.5px; color: var(--text-3); }
.link-menu-close {
  padding: 8px; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 13px;
  color: var(--text-2); background: none; border: 1px solid var(--border);
}
.link-menu-close:hover { color: #fff; border-color: var(--border-strong); }
/* 选中组件后的右键菜单 */
.node-context-menu {
  position: absolute; z-index: 42; width: 176px; padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  background: rgba(30, 30, 33, 0.98); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px; box-shadow: 0 18px 42px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(16px); animation: pop 0.14s var(--ease-out);
}
.node-context-menu button {
  width: 100%; min-height: 36px; padding: 7px 9px;
  display: flex; align-items: center; gap: 9px;
  color: #e8e8eb; background: transparent; border: 0; border-radius: 8px;
  font-family: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.node-context-menu button:hover:not(:disabled) { color: #fff; background: rgba(255, 255, 255, 0.08); }
.node-context-menu button:disabled { opacity: 0.42; cursor: default; }
.node-context-menu button.is-danger { color: #ff8d98; }
.node-context-menu button.is-danger:hover:not(:disabled) { background: rgba(251, 113, 133, 0.12); }
.node-context-menu svg { width: 16px; height: 16px; display: block; }
.node-context-sep { height: 1px; margin: 3px 2px; background: rgba(255, 255, 255, 0.08); }
/*
 * 小地图：挂在底部工具条里「小地图」按钮的正上方（按钮外再包一层 .map-wrap 做定位参考），
 * 水平居中在按钮上；颜色跟画布一致的中性深灰。
 */
.map-wrap { position: relative; display: flex; }
.canvas-map {
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%);
  z-index: 16; width: 210px; padding: 5px; border-radius: 12px;
  background: rgba(30, 30, 32, 0.96); border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
/* 手型：提示这里可以按住拖动画布（按下去时握拳） */
.map-svg { width: 200px; height: 140px; display: block; cursor: grab; }
.map-svg:active { cursor: grabbing; }
.map-edge { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; }
/* 当前可视范围框：画布是中性配色，这里用白描边（原来是紫色，和整体不搭） */
.map-view { fill: rgba(255, 255, 255, 0.06); stroke: rgba(255, 255, 255, 0.75); stroke-width: 1.2; }
.map-tip { text-align: center; padding-bottom: 2px; }

/* 画布生成面板：位置由节点位置算出来（见 canvas.js 的 panelStyle），这里只管外观 */
.gen-panel {
  position: absolute; z-index: 18;
  width: min(920px, 88%); padding: 12px 14px; border-radius: 18px;
  max-height: calc(100% - 24px);
  /* 默认不裁剪：@ 浮层要能弹到面板外一点；只有分镜/展开全部参数那种高面板才内部滚动 */
  overflow: visible;
  background: rgba(20, 20, 30, 0.94); border: 1px solid var(--border-strong);
  backdrop-filter: blur(16px); box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column; gap: 10px;
}
.gp-refs { display: flex; align-items: center; gap: 8px; }
/* 生成模式：全能参考（默认选中）/ 首尾帧 / 文生视频 */
.gp-modes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.gp-mode {
  padding: 6px 14px; border-radius: 10px; cursor: pointer; font-family: inherit;
  font-size: 13px; color: var(--text-2); background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border); transition: 0.16s;
}
.gp-mode:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); }
.gp-mode.on {
  color: #fff; font-weight: 600; background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.36);
}
.gp-mode:disabled { opacity: 0.38; cursor: not-allowed; }
.gp-mode-note { font-size: 11.5px; color: var(--text-3); }
.gp-add {
  width: 40px; height: 40px; flex: none; border-radius: 12px; cursor: pointer;
  display: grid; place-items: center; font-size: 20px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border);
  font-family: inherit; padding: 0; line-height: 1;
}
.gp-add:hover { color: #fff; border-color: var(--border-strong); }
/* 图片组件的参考图用量（已用 / 当前模型上限） */
.gp-ref-limit {
  flex: none; padding: 3px 8px; border-radius: 999px; font-size: 11px; line-height: 1.4;
  color: var(--text-3); background: var(--surface-2); border: 1px solid var(--border);
  white-space: nowrap;
}
.gp-ref-limit.over {
  color: #fff; background: rgba(244, 63, 94, 0.22); border-color: rgba(244, 63, 94, 0.55);
}
/* 固定在生成面板右上角的用量胶囊（.gen-panel 本身是 absolute，天然是定位参考系） */
.gp-usage-badge {
  /*
   * 往左让一让：右上角那枚「放大 / 还原」按钮要占位。
   * 高度、上边距都跟那颗按钮对齐（都是 32 高、top 16），文字用 flex 竖向居中，
   * 这样「参考图 3/4 · 参考视频 1/2」和按钮是同一条中轴，不会一高一低。
   */
  position: absolute; top: 16px; right: 62px; z-index: 5;
  height: 32px; padding: 0 12px; display: inline-flex; align-items: center;
  pointer-events: none;
}
/* 顶部那一行给胶囊留位置，别被压住 */
.gen-panel .gp-modes, .gen-panel .gp-refs { padding-right: 52px; }   /* 右上角那枚放大按钮的位置 */
/* 有用量胶囊时再往左让一截（胶囊长短随模型变，宁可多留一点，行内内容是左对齐的不显空） */
.gen-panel.has-usage.has-modes .gp-modes { padding-right: 250px; }
.gen-panel.has-usage:not(.has-modes) .gp-refs { padding-right: 250px; }
.gp-ref { position: relative; width: 40px; height: 40px; border-radius: 12px; overflow: hidden; }
.gp-ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gp-ref video { width: 100%; height: 100%; object-fit: cover; display: block; background: #05050c; }
.gp-ref-label {
  position: absolute; left: 2px; bottom: 2px; padding: 1px 4px; border-radius: 4px;
  background: rgba(0, 0, 0, 0.68); color: #fff; font-size: 8px; line-height: 1.25;
  pointer-events: none; max-width: calc(100% - 4px); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.gp-ref i {
  position: absolute; right: 1px; top: 1px; width: 14px; height: 14px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 9px; display: grid; place-items: center;
  cursor: pointer; font-style: normal;
}
.gp-ref-x { cursor: pointer; }

/* 上游连过来的素材：还没生成就先占位 */
.gp-ref--up { border-style: dashed; }
.gp-ref--up.is-pending { background: rgba(255, 255, 255, 0.02); }
.gp-ref-ph {
  width: 100%; height: 100%; display: grid; place-items: center; gap: 4px;
  color: var(--text-3); background: rgba(0, 0, 0, 0.25);
}
/* 连进来的语音组件：音符图标 + 序号角标（音频不是参考素材，只是提示连线已建立） */
.gp-ref--audio { background: #16281f; border: 1px solid rgba(52, 211, 153, 0.35); }
.gp-ref--audio.is-pending { background: rgba(255, 255, 255, 0.03); border-color: var(--border); }
.gp-ref--audio .gp-ref-doc { color: var(--green); }
.gp-ref-doc {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--text-2); line-height: 0;
}
.gp-ref-doc svg { width: 18px; height: 18px; display: block; }

/* 主输入框的 @ 引用浮层 */
.gp-input-wrap { position: relative; }
/* 连进来的文字组件：输入框里的可关闭胶囊（前 10 个字 + ✕） */
.gp-text-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.gp-text-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 290px;
  padding: 3px 4px 3px 10px; border-radius: 999px; font-size: 12px; line-height: 1.5;
  color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border);
}
.gp-text-chip.is-pending { color: var(--text-3); border-style: dashed; }
.gp-text-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-text-chip-x {
  display: grid; place-items: center; flex: none; width: 16px; height: 16px;
  border-radius: 50%; color: var(--text-3); font-size: 11px; font-style: normal; cursor: pointer;
}
.gp-text-chip-x:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
.gp-mention--prompt { left: 6px; }
/*
 * 分镜（镜头列表）时面板会很高：这时让它内部滚动，并且高度要避开顶部工具条（60px）
 * 和底部留白，否则最下面的「运行」会被裁掉。
 */
.gen-panel.is-scroll { overflow: auto; max-height: calc(100% - 76px); }
/*
 * 生成面板右上角那枚「放大 / 还原控制器」按钮（所有组件都有）：
 * 放大后宽度 = 屏幕宽的 80%、高度 = 收起时的高度 ×1.25（都写在行内样式里，见 panelStyle）。
 * 这里不要 overflow:auto —— 那会把参数弹框（浮在面板上方）裁掉，放大后参数选择的样式
 * 就跟没放大时不一样了。只有分镜模式下才让面板自己滚（那条规则在上面 .is-scroll）。
 */
.gen-panel.is-expanded:not(.is-scroll) { overflow: visible; }
/* 多出来的那截高度给输入框吃（输入区撑开，写长提示词），「运行」那行仍留在最下面 */
.gen-panel.is-expanded .gp-input-wrap { flex: 1 1 auto; display: flex; flex-direction: column; }
.gen-panel.is-expanded .gp-input { flex: 1 1 auto; min-height: 110px; overflow: auto; }
.gp-zoom {
  /* 和面板第一行（模式胶囊 / 素材条）同一条中轴：行高 40、上边距 12 → 中心 32 */
  position: absolute; top: 16px; right: 14px; z-index: 6;
  width: 40px; height: 32px; padding: 0; border-radius: 9px; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-2); transition: 0.16s;
}
.gp-zoom:hover { color: #fff; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.24); }
.gp-zoom.on { color: #fff; background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.28); }
.gp-zoom svg { width: 16px; height: 16px; display: block; }
/* 语音组件的面板第一行就是输入框，给按钮让出右边一条，文字别钻到按钮底下 */
.gen-panel.is-voice .gp-input-wrap { padding-right: 56px; }
.gp-input {
  width: 100%; background: none; border: none; outline: none; resize: none;
  color: var(--text); font-family: inherit; font-size: 14px; line-height: 1.7; min-height: 40px;
  /*
   * 输入框最多长到 15 行（行高 1.7 → 25.5em，跟着字号走），再多就在框里滚动 ——
   * 否则写长了整个生成面板会被一直往下撑，把「运行」挤到屏幕外。
   */
  max-height: calc(15 * 1.7em); overflow: auto;
}
.gp-input::placeholder { color: var(--text-3); }
/* 语音组件：文本框下面那排控件（语气标签 / 音色 / 语言 / 音量 / 语速） */
.voice-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border);
}
.voice-item-wrap { position: relative; flex: none; }
.voice-item {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: 10px; max-width: 210px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; font-family: inherit; cursor: pointer;
  transition: 0.15s;
}
.voice-item:hover { color: var(--text); border-color: var(--border-strong); }
.voice-item.on {
  color: var(--text); border-color: var(--primary);
  background: var(--primary-soft);
}
.voice-ico { opacity: 0.65; font-size: 12px; line-height: 1; flex: none; }
.voice-cur { max-width: 150px; }
.voice-caret { opacity: 0.55; font-size: 10px; flex: none; }
.voice-avatar {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #4da6ff, #f27159);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
}
.voice-avatar--button { width: 16px; height: 16px; }
.voice-num {
  width: 52px; background: none; border: none; outline: none;
  color: inherit; font: inherit; text-align: center;
}
/*
 * 自绘下拉（画布切换 / 模型选择 / 语音音色…）：限高可滚动，默认向上弹（贴在面板底部）。
 * 颜色跟画布整体走**中性深灰**（对齐 .nt-menu / .link-menu 那套），
 * 不用站内那套紫调（#16161f 底 + --primary-soft 选中）。
 */
.voice-menu {
  position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 40;
  min-width: 230px; max-width: 360px; max-height: 260px; overflow: auto;
  padding: 5px; border-radius: 12px;
  background: rgba(32, 32, 34, 0.98); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}
.voice-menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 7px 9px; border: none; border-radius: 8px;
  background: none; color: rgba(255, 255, 255, 0.78); font: inherit; font-size: 12.5px;
  text-align: left; cursor: pointer;
}
.voice-menu-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.voice-menu-item.on { background: rgba(255, 255, 255, 0.14); color: #fff; font-weight: 600; }
.voice-menu-item > .ellipsis { flex: 1 1 auto; min-width: 0; }
/* 下拉展开时别被面板的 overflow:auto 裁掉 */
.gen-panel.menu-open { overflow: visible !important; }
/* 文字节点的输入框：右下角可以拖拽调高（分镜 Prompt 很长，需要看全） */
.gp-input--resize {
  /* 文字节点可以手动拖高，但一样不超过 15 行（上限用 .gp-input 那条） */
  resize: vertical; overflow: auto;
  min-height: 96px;
}
/*
 * 提示词里的「@图片N」胶囊：缩略图 + 编号，和素材条上的编号一一对应。
 * 默认显示胶囊，点一下切成普通文本框编辑（中文输入法、光标、选区都不受影响）。
 */
/* 富文本提示词（图片 / 视频组件）：和 rows=4 的文本框差不多高，空的时候显示占位文案 */
.gp-input--rich {
  min-height: 98px; white-space: pre-wrap; word-break: break-word; cursor: text; line-height: 1.9;
  /* 富文本的行高是 1.9（比普通输入框松一点），15 行的上限跟着它算 */
  max-height: calc(15 * 1.9em);
}
.gp-input--rich:empty::before {
  content: attr(data-placeholder);
  color: var(--text-3);
  pointer-events: none;
}
.gp-token {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: -4px;
  margin: 0 2px; padding: 1px 8px 2px 3px; border-radius: 999px;
  font-size: 13px; line-height: 1.5; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-strong);
}
.gp-token img {
  width: 18px; height: 18px; border-radius: 50%; object-fit: cover; display: block;
  background: #0b0b0d;
}
.gp-token.is-audio { padding-left: 8px; }
/* 文字节点右侧面板的「生成文案」结果框：同样可拖拽调高 */
.text-result {
  padding: 10px; white-space: pre-wrap; line-height: 1.75; font-size: 13px;
  overflow: auto; resize: vertical; min-height: 96px; max-height: 52vh;
}
.gp-row { display: flex; align-items: center; gap: 10px; }
.gp-skill-wrap { position: relative; flex: none; }
.gp-skill-btn { max-width: 190px; min-width: 92px; }
.gp-skill-btn .ellipsis { min-width: 0; max-width: 132px; }
.gp-skill-btn .ico { width: 13px; height: 13px; color: var(--primary-2); }
.gp-skill-btn.selected { color: #e5dcff; border-color: rgba(124, 92, 255, 0.48); }
.gp-skill-pop {
  position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 24;
  width: min(660px, calc(100vw - 24px)); max-height: min(390px, 62vh);
  padding: 12px; display: flex; flex-direction: column; gap: 9px; overflow: auto;
  color: var(--text); background: rgba(24, 24, 27, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 15px;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(18px); transform: translateX(-50%);
  animation: imageSkillIn 0.18s var(--ease-out);
}
.gp-skill-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.gp-skill-title {
  display: flex; align-items: center; gap: 7px; color: #f4f4f5;
  font-size: 13px; font-weight: 650;
}
.gp-skill-title .ico { width: 14px; height: 14px; color: #b9a5ff; }
.gp-skill-head p { margin: 3px 0 0; color: var(--text-3); font-size: 10.5px; line-height: 1.5; }
.gp-skill-close {
  width: 25px; height: 25px; padding: 0; flex: none; display: grid; place-items: center;
  color: var(--text-3); background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.gp-skill-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.gp-skill-close .ico { width: 14px; height: 14px; }
.gp-skill-state {
  min-height: 104px; display: flex; align-items: center; justify-content: center;
  gap: 9px; color: var(--text-3); font-size: 12px;
}
.gp-skill-state .ico { width: 20px; height: 20px; color: #b9a5ff; }
.gp-skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gp-skill-card {
  position: relative; min-width: 0; padding: 6px; display: flex; flex-direction: column;
  gap: 6px; color: var(--text); background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px;
  font-family: inherit; text-align: left; cursor: pointer;
  transition: background-color 0.16s, border-color 0.16s, transform 0.16s;
}
.gp-skill-card:hover {
  transform: translateY(-2px); background: rgba(255, 255, 255, 0.065);
  border-color: rgba(124, 92, 255, 0.38);
}
.gp-skill-card.on { border-color: rgba(124, 92, 255, 0.72); background: rgba(124, 92, 255, 0.1); }
.gp-skill-cover {
  width: 100%; aspect-ratio: 16 / 9; display: grid; place-items: center;
  overflow: hidden; border-radius: 7px; color: var(--text-3);
  background: var(--surface-2); border: 1px solid rgba(255, 255, 255, 0.06);
}
.gp-skill-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gp-skill-cover .ico { width: 22px; height: 22px; }
.gp-skill-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 0 16px 1px 1px; }
.gp-skill-copy strong { color: #f4f4f5; font-size: 11.5px; font-weight: 650; }
.gp-skill-copy small {
  min-height: 27px; color: var(--text-3); font-size: 9.5px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gp-skill-check {
  position: absolute; right: 8px; bottom: 9px; width: 16px; height: 16px;
  display: grid; place-items: center; color: #fff; border-radius: 50%;
  background: var(--primary);
}
.gp-skill-check .ico { width: 11px; height: 11px; }
.gp-skill-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 1px; color: var(--text-3); font-size: 10px;
}
.gp-skill-foot button {
  padding: 0; color: #b9a5ff; background: none; border: 0; font-family: inherit;
  font-size: 10px; cursor: pointer;
}
@keyframes imageSkillIn {
  from { opacity: 0; transform: translate(-50%, 10px) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@media (max-width: 640px) {
  .gp-skill-pop {
    width: calc(100vw - 18px); max-height: 58vh; padding: 10px;
  }
  .gp-skill-grid { gap: 6px; }
  .gp-skill-card { padding: 5px; }
  .gp-skill-copy strong { font-size: 10.5px; }
  .gp-skill-copy small { font-size: 9px; }
}
/* 模型选择：自绘下拉（触发器是胶囊样，菜单往上弹，见 .voice-menu） */
.gp-model-wrap { position: relative; flex: none; }
.gp-model-btn { max-width: 240px; min-width: 140px; justify-content: space-between; }
.gp-model-btn > .ellipsis { flex: 1 1 auto; min-width: 0; }
.gp-model-wrap .gp-model-menu {
  left: 0; bottom: calc(100% + 6px); min-width: 220px; max-width: 340px;
}
.gp-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 6px 12px; border-radius: 10px; font-size: 13px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border);
  font-family: inherit; cursor: pointer; transition: 0.16s;
}
.gp-chip:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); }
.gp-chip.on { color: #cbbcff; background: var(--primary-soft); border-color: rgba(124, 92, 255, 0.6); }
.gp-chip:disabled { opacity: 0.55; cursor: default; }
/* 参数胶囊上的小箭头：和工具条那套一样，展开时翻上来 */
.gp-caret {
  display: block; line-height: 0; color: var(--text-3);
  opacity: 0.85; transition: transform 0.18s ease, opacity 0.18s ease;
}
.gp-caret svg { width: 12px; height: 12px; display: block; }
.gp-chip:hover:not(:disabled) .gp-caret { opacity: 1; }
.gp-chip.on .gp-caret { transform: rotate(180deg); opacity: 1; }
.gp-badge {
  display: inline-flex; align-items: center; flex: none; padding: 6px 12px; border-radius: 10px;
  font-size: 13px; color: #cbbcff; background: var(--primary-soft);
  border: 1px solid rgba(124, 92, 255, 0.6);
}

/*
 * 参数弹框：点参数胶囊弹出来的一块浮层，**贴着那颗胶囊**（底边留 10px 缝、水平居中在胶囊上），
 * 盖在组件卡片上，不再把面板撑高、也不推着「运行」按钮往下跑 —— 对齐参考稿的参数弹框。
 * 具体的 left / bottom / width / max-height 由 JS 实测胶囊位置算好后内联进来
 * （见 paramsPopStyle）；下面这几条只是没量到之前的兜底。
 * 尺寸按参考稿的 90% 收过一圈（宽 504 / 比例格子 58px），比原来紧凑一点。
 */
.gp-params {
  position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 24;
  width: min(504px, 100%); padding: 11px 12px 12px; border-radius: 14px;
  background: rgba(32, 32, 35, 0.99); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
  max-height: min(62vh, 414px); overflow: auto;
  /* 生成比例 / 分辨率 / 生成张数 一块一块竖着排，中间留空，别糊成一片 */
  display: flex; flex-direction: column; gap: 12px;
}
.gp-params > * { flex: none; }
/* 分区标题（生成比例 / 分辨率 / 生成张数）也跟着小一号 */
.gp-params .field > label { font-size: 11.5px; }
/*
 * 分镜模式下面板是滚动容器（overflow:auto 会把浮层裁掉），参数弹框只能退回面板内排布 ——
 * 但样式保持和浮层一模一样（同样的深色底 / 边框 / 圆角 / 投影 / 宽度），只是不浮起来。
 */
.gen-panel.is-scroll .gp-params {
  position: static; margin: 0 auto; width: min(504px, 100%); max-height: none;
}
/* 比例方格：参考稿里这一块有自己的浅色底 */
.gp-params .ratio-grid { padding: 7px 9px; border-radius: 11px; background: rgba(255, 255, 255, 0.04); }
/* 分辨率 / 生成张数：胶囊铺满整行，不再是挤在左边的小药丸 */
.gp-params .chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 7px; }
.gp-params .chip { width: 100%; padding: 10px 7px; border-radius: 9px; font-size: 11.5px; text-align: center; }

/* ------------------- 画布的中性配色覆盖（对齐参考稿） -------------------
 * 参考稿的画布是「近黑底 + 深灰卡片 + 白/灰图标」，没有紫色点缀。
 * 这里只覆盖画布里的控件，站内其它页面仍保留原来的紫蓝主题。
 */
.canvas-mode .canvas-head { background: rgba(28, 28, 30, 0.74); border-color: rgba(255, 255, 255, 0.08); }
.canvas-mode .canvas-act { background: rgba(28, 28, 30, 0.74); border-color: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.75); }
.canvas-mode .canvas-act:hover { background: rgba(46, 46, 50, 0.9); border-color: rgba(255, 255, 255, 0.18); color: #fff; }
.canvas-mode .canvas-act.on { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.canvas-mode .canvas-act.canvas-send { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: #ededed; }
.canvas-mode .canvas-act.canvas-send:hover { background: #ededee; border-color: transparent; color: #141414; }

.canvas-wrap .gen-panel {
  background: rgba(30, 30, 32, 0.96); border-color: rgba(255, 255, 255, 0.08);
  border-radius: 16px; box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}
.canvas-wrap .gen-panel .gp-input { font-size: 14.5px; }
.canvas-wrap .gen-panel .gp-input::placeholder { color: #74747a; }
/* 生成按钮做成浅色圆角方块（对齐参考稿右下角的发送键） */
.canvas-wrap .gen-panel .gp-run {
  background: #ededee; color: #141414; border: none; box-shadow: none; font-weight: 600;
}
.canvas-wrap .gen-panel .gp-run:hover:not(:disabled) { background: #fff; filter: none; }
.canvas-wrap .gen-panel .gp-run:disabled { background: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.45); }
/* 胶囊（模型选择 / 参数胶囊）的常态也用画布的中性配色，别混进站内的紫灰调 */
.canvas-wrap .gen-panel .gp-chip {
  background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.78);
}
.canvas-wrap .gen-panel .gp-chip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.24); }
/* 选中态放最后：open 的胶囊即便悬停也保持"已展开"的样子 */
.canvas-wrap .gen-panel .gp-chip.on {
  background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.3); color: #fff;
}
.canvas-wrap .gen-panel .gp-mode.on {
  background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.38);
}
/* 参数区（画面比例 / 分辨率 / 生成张数…）也用画布的中性配色，别混进站内的紫色选中态 */
.canvas-wrap .gen-panel .chip {
  background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
}
.canvas-wrap .gen-panel .chip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.24); }
.canvas-wrap .gen-panel .chip.on {
  background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.34);
  color: #fff; font-weight: 600;
}
.canvas-wrap .canvas-map { background: rgba(30, 30, 32, 0.94); border-color: rgba(255, 255, 255, 0.09); }
.canvas-wrap .link-menu { background: rgba(32, 32, 34, 0.97); border-color: rgba(255, 255, 255, 0.1); }

/* ------------------- 自定义分镜 ------------------- */
.gp-sb { display: flex; flex-direction: column; gap: 10px; }
.gp-sb-bar { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.gp-sb-back {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 8px;
  background: none; border: none; color: var(--text-2); font-family: inherit; font-size: 13px; cursor: pointer;
}
.gp-sb-back:hover { color: #fff; background: var(--surface-2); }
.gp-sb-arrow { font-size: 15px; line-height: 1; }
.gp-sb-alloc { color: var(--text-2); }
.gp-sb-alloc.over { color: var(--rose); }
.gp-sb-alloc.short { color: var(--amber); }
.gp-sb-even {
  padding: 3px 8px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.gp-sb-even:hover { color: #fff; border-color: var(--border-strong); }

.gp-shots { display: flex; flex-direction: column; gap: 8px; }
.gp-shot {
  border: 1px solid var(--border); border-radius: 14px; background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px 10px;
}
.gp-shot.dragging { opacity: 0.5; border-color: var(--primary); }
.gp-shot-head { display: flex; align-items: center; gap: 8px; }
.gp-shot-handle {
  color: var(--text-3); cursor: grab; font-size: 14px; line-height: 1; letter-spacing: -1px;
  padding: 4px 6px; border-radius: 6px; touch-action: none; user-select: none;
}
.gp-shot-handle:hover { color: var(--text); background: var(--surface-2); }
.gp-shot.dragging .gp-shot-handle { cursor: grabbing; }
.gp-shot-name { font-size: 13.5px; color: var(--text); font-weight: 600; }
.gp-shot-dur {
  display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; color: var(--text-2);
  padding: 2px 6px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border);
}
.gp-shot-dur-input {
  width: 34px; background: none; border: none; outline: none; color: var(--text);
  font-family: inherit; font-size: 12.5px; text-align: right; padding: 0;
  -moz-appearance: textfield; appearance: textfield;
}
.gp-shot-dur-input::-webkit-outer-spin-button,
.gp-shot-dur-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gp-shot-del {
  width: 28px; height: 28px; padding: 0; border-radius: 8px; cursor: pointer;
  background: none; border: none; color: var(--text-3); display: grid; place-items: center;
}
.gp-shot-del .ri svg { width: 15px; height: 15px; display: block; }
.gp-shot-del:hover { color: var(--rose); background: var(--surface-2); }
.gp-shot-body { position: relative; }
.gp-shot-ta {
  width: 100%; margin-top: 6px; min-height: 46px; resize: vertical;
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); font-family: inherit; font-size: 13.5px; line-height: 1.6; padding: 9px 11px; outline: none;
}
.gp-shot-ta:focus { border-color: rgba(124, 92, 255, 0.6); background: rgba(124, 92, 255, 0.06); }
.gp-shot-ta::placeholder { color: var(--text-3); }
.gp-mention {
  position: absolute; left: 10px; top: calc(100% - 4px); z-index: 40;
  min-width: 190px; max-height: 260px; overflow: auto; padding: 5px; border-radius: 12px;
  background: rgba(24, 24, 36, 0.98); border: 1px solid var(--border-strong);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}
/* 下方空间不够时往上弹（由脚本判断后加这个类），免得被输入框 / 下面的行挡住 */
.gp-mention--up { top: auto; bottom: calc(100% - 4px); }
.gp-mention-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 5px 8px; border-radius: 8px;
  background: none; border: none; color: var(--text); font-family: inherit; font-size: 13px;
  cursor: pointer; text-align: left;
}
.gp-mention-item:hover { background: var(--primary-soft); }
.gp-mention-item img { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; display: block; }
/* 音频 / 视频的缩略位：跟图片一样大，音频用音符图标（别拿 .wav 当图片渲染） */
.gp-mention-item video { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; display: block; background: #05050c; }
.gp-mention-ico {
  width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center;
  background: #16281f; color: var(--green); flex: none;
}
.gp-mention-ico svg { width: 17px; height: 17px; display: block; }
.gp-shot-add {
  width: 100%; padding: 9px; border-radius: 12px; cursor: pointer; font-family: inherit; font-size: 13.5px;
  background: rgba(255, 255, 255, 0.03); border: 1px dashed var(--border-strong); color: var(--text-2);
}
.gp-shot-add:hover { color: #fff; border-color: var(--primary); background: var(--primary-soft); }
.gp-count { font-size: 12.5px; color: var(--text-3); }
.gp-run { min-width: 92px; border-radius: 12px; }
.gp-link {
  background: none; border: none; color: var(--text-2); font-size: 13px; cursor: pointer;
  font-family: inherit; padding: 4px 6px; border-radius: 8px; white-space: nowrap;
}
.gp-link:hover { color: #fff; background: var(--surface-2); }

/* ------------------- 剧集创作首屏（一键流第一步） ------------------- */
.flow-hero { text-align: center; padding: 34px 0 22px; }
.flow-title { margin: 0; font-size: 46px; font-weight: 700; letter-spacing: 2px; line-height: 1.15; }
.flow-sub { margin-top: 10px; font-size: 17px; letter-spacing: 1.5px; color: var(--text-2); }
.flow-drop {
  position: relative; border-radius: 22px; padding: 58px 24px 62px; text-align: center;
  border: 1px solid rgba(124, 92, 255, 0.45);
  background:
    radial-gradient(680px 260px at 50% 0%, rgba(124, 92, 255, 0.16), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  transition: 0.2s;
  width: 90%;
  margin: auto;
}
.flow-drop.on { border-color: var(--primary); background-color: rgba(124, 92, 255, 0.08); }
.flow-drop-icon { position: relative; width: 84px; height: 84px; margin: 0 auto 22px; }
.fd-shadow, .fd-file { position: absolute; left: 0; top: 0; width: 62px; height: 74px; border-radius: 10px; }
.fd-shadow { transform: translate(14px, 10px); background: rgba(255, 255, 255, 0.07); }
.fd-file {
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--text-2); background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.12);
}
.flow-drop-title { font-size: 17.5px; font-weight: 650; }
.flow-drop-hint { margin-top: 10px; font-size: 13.5px; color: var(--text-3); }
.flow-paste { position: relative; text-align: left; }

/* ------------------------- 资产详情页 ------------------------- */
.ad-page { max-width: 1560px; margin: 0 auto; padding: 18px 22px 40px; }
.ad-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ad-back {
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 16px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
}
.ad-back:hover { color: #fff; border-color: var(--border-strong); }
.ad-title { font-size: 19px; font-weight: 650; }
.ad-body {
  display: grid; grid-template-columns: 220px minmax(320px, 1fr) 460px;
  border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--bg-soft);
}
.ad-thumbs { padding: 14px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--border); }
.ad-thumb {
  width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; cursor: pointer;
  background: #05050c; border: 1px solid var(--border); padding: 0;
}
.ad-thumb.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-thumb-hint { margin-top: auto; font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.ad-preview { position: relative; display: grid; place-items: center; padding: 18px; }
.ad-preview-img { max-width: 100%; max-height: 70vh; display: block; border-radius: 8px; }
.ad-full {
  position: absolute; right: 16px; bottom: 16px; width: 34px; height: 34px; cursor: pointer;
  border-radius: 10px; background: rgba(10, 10, 18, 0.72); border: 1px solid var(--border-strong); color: #fff;
}
.ad-side { padding: 22px 24px; border-left: 1px solid var(--border); }
.ad-ai { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.ad-name { font-size: 22px; font-weight: 700; margin: 0 0 12px; }
.ad-desc {
  margin: 14px 0 4px; font-size: 13.5px; line-height: 1.8; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ad-desc.open { -webkit-line-clamp: unset; }
.ad-more { background: none; border: none; color: var(--text-3); font-size: 12px; cursor: pointer; font-family: inherit; }
.ad-block { margin-top: 16px; padding: 14px; border-radius: 12px; background: var(--surface); }
.ad-block-title { font-size: 13px; color: var(--text-2); }
.ad-check {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 10px;
  background: rgba(52, 211, 153, 0.12); color: var(--green); font-size: 13px;
}
.ad-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ad-meta b { display: block; margin-top: 4px; font-size: 14px; color: var(--text); }
.ad-brand { display: flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 13.5px; color: var(--text-2); }

/* ------------------------- 表格 ------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 10px 12px; color: var(--text-3); font-weight: 500; font-size: 12px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.table tbody tr:hover { background: var(--surface); }

/* ------------------------- 资产瀑布 ------------------------- */
.waterfall { columns: 5 180px; column-gap: 14px; }
.waterfall > * { break-inside: avoid; margin-bottom: 14px; }

/* ------------------------- Skill 广场 ------------------------- */
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.skill-card {
  border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); transition: 0.2s;
  display: flex; flex-direction: column;
}
.skill-card:hover { transform: translateY(-3px); border-color: rgba(124, 92, 255, 0.45); box-shadow: var(--shadow-soft); }
.skill-cover {
  position: relative; aspect-ratio: 8 / 5; background-size: cover; background-position: center;
  background-color: var(--bg-soft);
}
.skill-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.55));
}
.skill-cat, .skill-hot {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 3px 9px; border-radius: 7px; font-size: 11.5px;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.skill-hot { left: auto; right: 44px; background: rgba(251, 113, 133, 0.85); border-color: transparent; }
.skill-fav {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff; font-size: 15px; line-height: 1; display: grid; place-items: center; transition: 0.15s;
}
.skill-fav:hover { background: rgba(0, 0, 0, 0.75); }
.skill-fav.on { color: var(--amber); border-color: rgba(251, 191, 36, 0.5); }
.skill-body { padding: 13px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.skill-name { font-weight: 650; font-size: 14.5px; }
.skill-desc { color: var(--text-2); font-size: 12.5px; line-height: 1.6; margin-top: 5px; min-height: 40px; }

/* 剧本详情：接近全屏，信息按纵向区块排列 */
.script-detail-mask { z-index: 250; padding: 16px; }
.script-detail-modal {
  width: min(1440px, calc(100vw - 32px));
  height: calc(100vh - 32px);
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 0%, rgba(34, 211, 238, 0.075), transparent 28%),
    radial-gradient(circle at 4% 100%, rgba(124, 92, 255, 0.09), transparent 34%),
    var(--bg-elevated);
}
.script-detail-header {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(18, 19, 31, 0.9);
}
.script-detail-close { width: 34px; height: 34px; padding: 0; flex: none; }
.script-detail-body {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 28px 30px;
}
.script-detail-modal .tiny,
.script-detail-modal .tag { font-size: 14px; }
.script-detail-modal .btn { font-size: 14px; }
.script-detail-sellpoint {
  padding: 16px 18px;
  border: 1px solid rgba(124, 92, 255, 0.24);
  border-radius: 13px;
  background: rgba(124, 92, 255, 0.065);
}
.script-detail-sellpoint span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-3);
  font-size: 14px;
}
.script-detail-sellpoint strong {
  display: block;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
}
.script-detail-section {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
}
.script-detail-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
}
.script-detail-section-title > .ico { width: 19px; height: 19px; color: #b8adff; }
.script-detail-section-title small {
  color: var(--text-3);
  font-size: 14px;
  font-weight: 400;
}
.script-detail-locked { margin-left: auto; color: #f4c95d; font-size: 14px; font-weight: 400; }
.script-detail-section > p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-wrap;
}
.script-detail-characters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.script-detail-character {
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}
.script-detail-character strong { font-size: 15px; }
.script-detail-character p {
  margin: 7px 0 0;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.65;
}
.script-detail-episodes {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.script-detail-episode {
  padding: 16px 17px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.024);
}
.script-detail-episode-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.script-detail-episode-head > span {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #d7d0ff;
  background: rgba(124, 92, 255, 0.12);
  font-size: 14px;
  font-weight: 700;
}
.script-detail-episode-head strong { font-size: 16px; }
.script-detail-episode > p {
  margin: 9px 0 0;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.75;
}
.script-detail-episode > pre {
  max-height: 420px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 14px;
  border: 1px solid rgba(124, 92, 255, 0.16);
  border-radius: 10px;
  color: var(--text-2);
  background: rgba(5, 6, 12, 0.5);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}
.script-detail-footer {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 28px;
  border-top: 1px solid var(--border);
  background: rgba(18, 19, 31, 0.96);
}
@media (max-width: 760px) {
  .script-detail-mask { padding: 0; }
  .script-detail-modal { width: 100%; height: 100dvh; border-radius: 0; }
  .script-detail-header { padding: 18px 16px 14px; }
  .script-detail-body { padding: 16px; }
  .script-detail-characters { grid-template-columns: 1fr; }
  .script-detail-footer { align-items: stretch; flex-direction: column; padding: 12px 16px; }
}

/* ------------------------- 一键流向导 ------------------------- */
.flow-steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.flow-step {
  display: flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font-size: 13.5px; cursor: pointer; transition: 0.16s;
}
.flow-step:disabled { opacity: 0.45; cursor: not-allowed; }
.flow-step .num {
  width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); font-size: 12px; font-weight: 700; flex: none;
}
.flow-step.on { border-color: rgba(124, 92, 255, 0.7); background: var(--primary-soft); color: #cbbcff; font-weight: 600; }
.flow-step.on .num { background: var(--primary); color: #fff; }
.flow-step.done .num { background: rgba(52, 211, 153, 0.9); color: #062; }
.flow-step.done { border-color: rgba(52, 211, 153, 0.35); }

.outline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .outline-grid { grid-template-columns: 1fr; } }

.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 5px 0; }
.kv > span:first-child { color: var(--text-3); flex: none; }
.kv > span:last-child { text-align: right; }

/* 角色卡 */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.char-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 13px; }

/* 分集手风琴 */
.ep-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.ep-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer;
  transition: 0.15s;
}
.ep-head:hover { background: var(--surface-2); }
.ep-body { padding: 0 14px 14px; border-top: 1px solid var(--border); }

/* 资产卡 */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.asset-card { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.asset-thumb {
  aspect-ratio: 3/4; background: var(--bg-soft); display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.asset-thumb img { width: 100%; height: 100%; object-fit: cover; }
.asset-thumb .ph { font-size: 28px; color: var(--text-3); }
.asset-badge { position: absolute; top: 8px; left: 8px; }
.asset-badge.tag-green {
  color: #fff; background: #16a34a; font-weight: 600;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.24);
}
.asset-preview-btn {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  width: 34px; height: 34px; padding: 0; border-radius: 10px;
  display: grid; place-items: center; cursor: pointer;
  color: #fff; border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(10, 10, 18, 0.72); backdrop-filter: blur(8px);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.32);
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
}
.asset-preview-btn:hover {
  background: rgba(124, 92, 255, 0.9); border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}
.asset-preview-btn .ico, .asset-preview-btn svg { width: 17px; height: 17px; display: block; }
.asset-body { padding: 10px 12px 12px; }

/* 角色 / 场景 / 道具设定图放大预览 */
.flow-asset-preview-mask { padding: 18px; }
.flow-asset-preview {
  width: min(1100px, 94vw); max-width: none; max-height: 92vh; padding: 18px;
  overflow: hidden;
}
.flow-asset-preview-head { margin-bottom: 14px; }
.flow-asset-preview-head .h3 { max-width: min(760px, 72vw); margin: 0; }
.flow-asset-preview-stage {
  min-height: 220px; max-height: calc(92vh - 150px); border-radius: 12px;
  border: 1px solid var(--border); background: #08080f;
  display: grid; place-items: center; overflow: auto; cursor: zoom-in;
  overscroll-behavior: contain;
}
.flow-asset-preview-stage img {
  display: block; max-width: 100%; max-height: calc(92vh - 154px);
  width: auto; height: auto; object-fit: contain;
  user-select: none; -webkit-user-drag: none;
}
.flow-asset-preview-stage.is-zoomed {
  display: block; cursor: grab; touch-action: none;
}
.flow-asset-preview-stage.is-zoomed img {
  margin: 0 auto;
}
.flow-asset-preview-stage.is-dragging {
  cursor: grabbing;
}
.flow-asset-preview-stage.is-dragging img {
  pointer-events: none;
}
.flow-asset-preview-controls {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}
.flow-asset-preview-step {
  width: 30px; height: 30px; padding: 0; flex: none; border-radius: 8px;
  display: grid; place-items: center; cursor: pointer;
  color: var(--text-2); border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.045); transition: 0.16s;
}
.flow-asset-preview-step:hover:not(:disabled) {
  color: #fff; border-color: rgba(124, 92, 255, 0.6); background: var(--primary-soft);
}
.flow-asset-preview-step:disabled { opacity: 0.35; cursor: not-allowed; }
.flow-asset-preview-step .ico, .flow-asset-preview-step svg {
  width: 15px; height: 15px; display: block;
}
.flow-asset-preview-range { flex: 1; min-width: 120px; margin: 0; cursor: pointer; }
.flow-asset-preview-range-value {
  width: 46px; flex: none; text-align: right; color: var(--text-2);
  font-size: 12px; font-variant-numeric: tabular-nums;
}

/* 分镜列表 */
.shot-row {
  display: grid; grid-template-columns: 34px 1fr 150px; gap: 12px; align-items: start;
  padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.shot-add-btn { flex: none; }
.shot-delete-btn { margin-top: 2px; }

/* 剧本广场：自定义生成参数 */
.script-custom-btn { flex: none; }
.script-custom-modal { max-width: 500px; }
.script-custom-mask { z-index: 320; }
.script-seed-custom-button { width: 100%; min-height: 36px; justify-content: flex-start; }
.script-genre-chips { align-items: center; overflow: visible; }
.script-genre-option { position: relative; display: inline-flex; }
.script-genre-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 4px;
  min-height: 34px;
}
.script-genre-chip img {
  width: 26px; height: 26px; border-radius: 7px; object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.script-genre-chip.on img {
  box-shadow: 0 0 0 1px rgba(203, 188, 255, 0.8), 0 4px 16px rgba(124, 92, 255, 0.32);
}
.script-genre-preview {
  position: absolute; left: 50%; top: calc(100% + 9px); z-index: 80;
  width: 228px; padding: 8px; border-radius: 13px;
  color: var(--text); background: #161623;
  border: 1px solid rgba(124, 92, 255, 0.38);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.46);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate(-50%, -4px); transition: 0.16s ease;
}
.script-genre-preview::before {
  content: ''; position: absolute; top: -5px; left: 50%; width: 9px; height: 9px;
  background: #161623; border-left: 1px solid rgba(124, 92, 255, 0.38);
  border-top: 1px solid rgba(124, 92, 255, 0.38); transform: translateX(-50%) rotate(45deg);
}
.script-genre-preview img {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 9px;
}
.script-genre-preview div { padding: 9px 3px 3px; }
.script-genre-preview strong { display: block; font-size: 13px; }
.script-genre-preview span {
  display: block; margin-top: 4px; color: var(--text-3); font-size: 11.5px; line-height: 1.55;
}
.script-genre-option:hover .script-genre-preview,
.script-genre-option:focus-within .script-genre-preview {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.script-custom-field {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}
.script-custom-field > span:first-child { min-width: 0; }
.script-custom-field b { display: block; color: var(--text); font-size: 13.5px; }
.script-custom-field small { display: block; margin-top: 4px; color: var(--text-3); font-size: 11.5px; }
.script-custom-number {
  display: flex; align-items: center; gap: 7px; width: 132px; flex: none;
}
.script-custom-number .input { height: 38px; padding: 0 10px; text-align: right; }
.script-custom-number em { color: var(--text-3); font-size: 12px; font-style: normal; }
.script-custom-actions {
  display: grid; grid-template-columns: 1fr 1.35fr; gap: 9px; margin-top: 22px;
}
.script-custom-total {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 11px; color: var(--text-2); font-size: 12px;
}
.script-custom-total span { color: var(--text-3); font-size: 11.5px; }
.script-custom-total.over { color: #fb7185; }
.script-custom-price {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 13px; padding: 11px 14px; border-radius: 10px;
  color: var(--text-3); background: var(--primary-soft); font-size: 12.5px;
}
.script-custom-price strong { color: #cbbcff; font-size: 14px; }

/* 剧本广场：大纲确认对话 */
.script-outline-notice {
  display: flex; align-items: flex-start; gap: 11px; margin-bottom: 14px; padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.28); border-radius: 12px;
  background: linear-gradient(120deg, rgba(245, 158, 11, 0.1), rgba(124, 92, 255, 0.08));
}
.script-outline-step {
  flex: none; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px;
  color: #fde68a; background: rgba(245, 158, 11, 0.15); font-size: 11px; font-weight: 800;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.script-outline-notice strong { display: block; font-size: 13px; }
.script-outline-notice p { margin: 4px 0 0; color: var(--text-2); font-size: 12px; line-height: 1.6; }
.script-outline-hook {
  display: flex; align-items: flex-start; gap: 5px; padding: 7px 9px; border-radius: 8px;
  color: #d9ccff; background: rgba(124, 92, 255, 0.09); font-size: 11.5px; line-height: 1.55;
}
.script-outline-hook .ico { flex: none; margin-top: 1px; }
.script-outline-dialogue {
  margin-top: 18px; padding: 15px; border-radius: 14px;
  border: 1px solid rgba(124, 92, 255, 0.3);
  background: linear-gradient(140deg, rgba(124, 92, 255, 0.08), rgba(255, 255, 255, 0.025));
}
.script-outline-message { display: flex; align-items: flex-start; gap: 10px; }
.script-outline-avatar {
  flex: none; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px;
  color: #fff; background: linear-gradient(145deg, #7c5cff, #22d3ee);
  font-size: 10px; font-weight: 800; letter-spacing: 0.04em;
}
.script-outline-message strong { display: block; font-size: 13.5px; }
.script-outline-message p { margin: 4px 0 0; color: var(--text-3); font-size: 12px; line-height: 1.65; }
.script-outline-feedback { display: block; margin-top: 13px; }
.script-outline-feedback > span {
  display: flex; align-items: center; gap: 5px; margin-bottom: 6px; color: var(--text-2); font-size: 12px;
}
.script-outline-feedback em {
  color: var(--text-3); font-size: 10.5px; font-style: normal; font-weight: 400;
}
.script-outline-feedback .textarea { min-height: 64px; }
.script-outline-actions {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  gap: 9px; margin-top: 11px;
}
.script-outline-actions .btn { min-height: 42px; }
.script-outline-actions small {
  margin-left: 3px; color: inherit; font-size: 10.5px; font-weight: 500; opacity: 0.7;
}
.script-outline-billing {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 10px;
  color: var(--text-3); font-size: 11.5px;
}
.script-outline-billing span { color: var(--text-2); white-space: nowrap; }

@media (max-width: 720px) {
  .script-genre-preview { left: 0; transform: translate(0, -4px); }
  .script-genre-preview::before { left: 34px; }
  .script-genre-option:hover .script-genre-preview,
  .script-genre-option:focus-within .script-genre-preview { transform: translate(0, 0); }
  .script-outline-actions { grid-template-columns: 1fr; }
  .script-outline-billing { align-items: flex-start; flex-direction: column; gap: 3px; }
}

/* 剧本广场：完整创作链路 */
.script-market-page {
  position: relative;
  isolation: isolate;
  --text-2: #b9bacb;
  --text-3: #85869d;
}
.script-market-page::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -24px -18px 0;
  pointer-events: none;
  border-radius: 30px;
  background:
    radial-gradient(680px 330px at 18% 10%, rgba(124, 92, 255, 0.09), transparent 68%),
    radial-gradient(560px 300px at 88% 2%, rgba(34, 211, 238, 0.055), transparent 70%);
}
.script-page-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.script-page-title-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(203, 188, 255, 0.26);
  border-radius: 13px;
  color: #eeeaff;
  background: linear-gradient(145deg, rgba(124, 92, 255, 0.78), rgba(34, 211, 238, 0.28));
  box-shadow: 0 9px 28px rgba(124, 92, 255, 0.2);
}
.script-page-title-icon .ico { width: 20px; height: 20px; }
.script-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.script-section-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.script-section-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 8px 16px 12px;
  border: 0;
  color: var(--text-2);
  background: transparent;
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
}
.script-section-tabs button::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, #7c5cff, #22d3ee);
  opacity: 0;
  transform: scaleX(0.55);
  transition: 0.18s ease;
}
.script-section-tabs button:hover { color: var(--text); background: rgba(255, 255, 255, 0.025); }
.script-section-tabs button.on { color: #fff; }
.script-section-tabs button.on::after { opacity: 1; transform: scaleX(1); }
.script-section-tabs button .ico { width: 19px; height: 19px; color: #baafff; }
.script-section-fire-gif {
  width: 24px;
  height: 24px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 0 7px rgba(255, 92, 20, 0.46));
}
.script-pipeline-entry {
  position: relative;
  z-index: 12;
  overflow: visible;
  border-color: rgba(143, 125, 255, 0.32);
  background:
    radial-gradient(circle at 90% 0%, rgba(34, 211, 238, 0.13), transparent 34%),
    radial-gradient(circle at 5% 115%, rgba(124, 92, 255, 0.2), transparent 43%),
    linear-gradient(135deg, rgba(34, 35, 53, 0.92), rgba(17, 18, 29, 0.96));
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}
.script-pipeline-entry::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 100% 34px;
  mask-image: linear-gradient(90deg, transparent, #000 48%, transparent);
  border-radius: inherit;
}
.script-pipeline-entry > * { position: relative; z-index: 1; }
.script-pipeline-entry-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.script-entry-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #cbbcff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.script-pipeline-entry-head p {
  max-width: 940px;
  margin: 7px 0 0;
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.75;
}
.script-entry-input-row { align-items: stretch; }
.script-entry-input-row .textarea {
  min-height: 64px;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  font-size: 14px;
  line-height: 1.7;
}
.script-entry-input-row .textarea:focus {
  border-color: rgba(151, 133, 255, 0.55);
  background: rgba(255, 255, 255, 0.07);
}
.script-entry-input-row .btn { min-width: 168px; }
.script-entry-tools { align-items: center; margin-top: 12px; }
.script-entry-draft {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
  color: #86efac;
  font-size: 11.5px;
}
.script-entry-draft .ico { width: 14px; height: 14px; }

.script-market-page .script-primary-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border-radius: 9px 9px 0 0;
}
.script-market-page .script-primary-tabs button .ico {
  width: 15px;
  height: 15px;
  color: #8f90a8;
}
.script-market-page .script-primary-tabs button:hover {
  background: rgba(255, 255, 255, 0.035);
}
.script-market-page .script-primary-tabs button.on {
  color: #fff;
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.12), transparent);
}
.script-market-page .script-primary-tabs button.on .ico { color: #cbbcff; }
.script-search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 238px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  transition: 0.16s ease;
}
.script-search-box:focus-within {
  border-color: rgba(142, 124, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
}
.script-search-box > .ico { width: 14px; height: 14px; color: #8c8da5; }
.script-search-box .input {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  outline: 0;
}
.script-market-page .skill-card {
  border-color: rgba(255, 255, 255, 0.105);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.028)),
    #141521;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}
.script-market-page .skill-card:hover {
  border-color: rgba(143, 125, 255, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(124, 92, 255, 0.045)),
    #171827;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(124, 92, 255, 0.08);
}
.script-market-page .skill-body { background: transparent; }
.script-card-price,
.script-card-usage {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.script-card-price .ico,
.script-card-usage .ico { width: 12px; height: 12px; }
.script-card-price.free { color: #8de2bb; }
.script-card-price.paid { color: #f4c95d; }
.script-project-status {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid rgba(52, 211, 153, 0.34);
  border-radius: 7px;
  color: #bbf7d0;
  background: rgba(8, 45, 31, 0.82);
  backdrop-filter: blur(7px);
  font-size: 10.5px;
  font-weight: 600;
}
.script-project-status .ico { width: 12px; height: 12px; }
.script-project-status.draft {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(59, 40, 7, 0.84);
}
.script-draft-delete {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fecaca;
  background: rgba(28, 12, 16, 0.78);
  backdrop-filter: blur(7px);
  cursor: pointer;
  transition: 0.16s ease;
}
.script-draft-delete:hover {
  color: #fff;
  border-color: rgba(248, 113, 113, 0.52);
  background: rgba(127, 29, 29, 0.86);
}
.script-draft-delete .ico { width: 14px; height: 14px; }

.script-workspace-mask {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(5, 6, 12, 0.84);
  backdrop-filter: blur(14px) saturate(0.85);
  animation: scriptWorkspaceFade 0.18s ease-out;
}
.script-workspace-active .topbar,
.script-workspace-active .announce,
.script-workspace-active .app-sidebar,
body:has(.script-workspace-mask) .topbar,
body:has(.script-workspace-mask) .announce,
body:has(.script-workspace-mask) .app-sidebar,
body:has(.script-detail-mask) .topbar,
body:has(.script-detail-mask) .announce,
body:has(.script-detail-mask) .app-sidebar {
  display: none;
}
@keyframes scriptWorkspaceFade { from { opacity: 0; } to { opacity: 1; } }
.script-workspace {
  width: min(1740px, 100%);
  height: calc(100dvh - 24px);
  overflow: hidden;
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr);
  color: var(--text);
  border: 1px solid rgba(159, 144, 255, 0.28);
  border-radius: 20px;
  background:
    radial-gradient(circle at 96% 0%, rgba(34, 211, 238, 0.09), transparent 28%),
    radial-gradient(circle at 0% 100%, rgba(124, 92, 255, 0.07), transparent 34%),
    #121420;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.script-workspace-head {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(160px, 320px) minmax(320px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(20, 22, 35, 0.94);
}
.script-workspace-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.script-workspace-logo {
  width: 37px;
  height: 37px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(203, 188, 255, 0.28);
  border-radius: 12px;
  color: #e5deff;
  background: linear-gradient(145deg, rgba(124, 92, 255, 0.8), rgba(34, 211, 238, 0.4));
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.28);
}
.script-workspace-logo .ico { width: 20px; height: 20px; }
.script-workspace-brand > div { min-width: 0; }
.script-workspace-brand strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
.script-workspace-brand span:not(.script-workspace-logo) {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-3);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.script-workspace-progress-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.script-workspace-progress-mini > span { white-space: nowrap; }
.script-workspace-progress-mini > i {
  height: 4px;
  flex: 1;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}
.script-workspace-progress-mini b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c5cff, #22d3ee);
  transition: width 0.3s ease;
}
.script-workspace-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.script-workspace-close { width: 34px; padding: 0; }
.script-save-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 5px;
  color: #86efac;
  font-size: 10.5px;
  white-space: nowrap;
}
.script-save-state.saving { color: #fcd34d; }
.script-save-state.local { color: var(--text-3); }
.script-save-state .ico { width: 14px; height: 14px; }
.script-save-state .spin { width: 12px; height: 12px; }

.script-workspace-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
}
.script-workspace-rail {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 21px 14px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.script-workspace-rail-title {
  padding: 0 10px 8px;
  color: var(--text-3);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.script-rail-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 57px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--text-3);
  transition: 0.16s ease;
}
.script-rail-step::after {
  content: '';
  position: absolute;
  left: 24px;
  top: 52px;
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.08);
}
.script-rail-step:last-of-type::after { display: none; }
.script-rail-step.active {
  color: var(--text);
  border-color: rgba(124, 92, 255, 0.36);
  background: linear-gradient(90deg, rgba(124, 92, 255, 0.14), rgba(124, 92, 255, 0.035));
}
.script-rail-step.done { color: var(--text-2); }
.script-rail-number {
  width: 29px;
  height: 29px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.025);
  font-size: 9.5px;
  font-weight: 750;
}
.script-rail-step.active .script-rail-number {
  color: #fff;
  border-color: rgba(124, 92, 255, 0.52);
  background: #6d4aff;
  box-shadow: 0 5px 18px rgba(124, 92, 255, 0.3);
}
.script-rail-step.done .script-rail-number {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.09);
}
.script-rail-number .ico { width: 13px; height: 13px; }
.script-rail-step strong {
  display: block;
  color: inherit;
  font-size: 12px;
  font-weight: 620;
}
.script-rail-step small {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 9.5px;
}
.script-workspace-rail-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  padding: 11px;
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 11px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.045);
}
.script-workspace-rail-note > .ico { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.script-workspace-rail-note strong { display: block; font-size: 10.5px; }
.script-workspace-rail-note span {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 9.5px;
  line-height: 1.55;
}

.script-workspace-main {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #10121c;
  background-size: 48px 48px;
}
.script-stage { max-width: 1300px; margin: 0 auto; padding: 34px 42px 70px; }
.script-stage-kicker {
  color: #a99cff;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.16em;
}
.script-stage-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}
.script-stage-heading h1 {
  margin: 7px 0 0;
  font-size: clamp(28px, 2.4vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.035em;
}
.script-stage-heading p {
  max-width: 800px;
  margin: 9px 0 0;
  color: var(--text-3);
  font-size: 14.5px;
  line-height: 1.75;
}
.script-confirm-badge {
  flex: none;
  padding: 8px 11px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 99px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.08);
  font-size: 12.5px;
  font-weight: 650;
}
.script-stage-error {
  position: sticky;
  top: 12px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 24px -8px;
  padding: 11px 13px;
  border: 1px solid rgba(248, 113, 113, 0.30);
  border-radius: 11px;
  color: #fecaca;
  background: rgba(69, 10, 10, 0.86);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.script-stage-error > .ico { width: 16px; height: 16px; flex: none; }
.script-stage-error > div { flex: 1; }
.script-stage-error strong { display: block; font-size: 11.5px; }
.script-stage-error p { margin: 2px 0 0; font-size: 10.5px; line-height: 1.55; }
.script-workspace-loading {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-3);
}
.script-workspace-loading .spin { width: 24px; height: 24px; }
.script-workspace-loading strong { color: var(--text); font-size: 14px; }
.script-workspace-loading p { margin: 0; font-size: 11px; }

.script-stage-seed {
  max-width: 920px;
  padding-top: clamp(40px, 8vh, 100px);
}
.script-stage-seed h1 {
  margin: 12px 0 0;
  font-size: clamp(39px, 5vw, 67px);
  line-height: 1.06;
  letter-spacing: -0.055em;
}
.script-stage-seed h1 em {
  color: transparent;
  background: linear-gradient(100deg, #efeaff, #9f8cff 55%, #67e8f9);
  background-clip: text;
  -webkit-background-clip: text;
  font-style: normal;
}
.script-stage-lead {
  max-width: 740px;
  margin: 18px 0 26px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.8;
}
.script-seed-field {
  position: relative;
  display: block;
  padding: 16px;
  border: 1px solid rgba(124, 92, 255, 0.31);
  border-radius: 16px;
  background: rgba(20, 20, 34, 0.86);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}
.script-seed-field > span {
  display: block;
  margin-bottom: 8px;
  color: #dcd5ff;
  font-size: 11px;
  font-weight: 650;
}
.script-seed-field .textarea {
  min-height: 138px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 15px;
  line-height: 1.8;
  resize: none;
  outline: 0;
}
.script-seed-field > small {
  position: absolute;
  right: 15px;
  bottom: 11px;
  color: var(--text-3);
  font-size: 9.5px;
}
.script-seed-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.script-seed-option {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.022);
}
.script-seed-option > span {
  display: block;
  margin-bottom: 7px;
  color: var(--text-3);
  font-size: 10px;
}
.script-seed-option .input {
  width: 100%;
  min-height: 36px;
  font-size: 11.5px;
}
.script-fixed-spec {
  display: flex;
  align-items: center;
  min-height: 36px;
  color: var(--text-2);
  font-size: 11.5px;
}
.script-resume-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 13px;
  padding: 11px 13px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 11px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.06);
}
.script-resume-card .ico { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.script-resume-card strong { display: block; font-size: 10.5px; }
.script-resume-card p { margin: 2px 0 0; color: var(--text-3); font-size: 10px; }
.script-stage-primary {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 20px;
}
.script-stage-primary .btn { min-width: 190px; }
.script-stage-primary > span { color: var(--text-3); font-size: 10.5px; }

.script-generation-wait {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 34px;
  border: 1px solid rgba(124, 92, 255, 0.20);
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 92, 255, 0.12), transparent 55%),
    rgba(255, 255, 255, 0.018);
}
.script-generation-wait-large { min-height: 440px; }
.script-generation-wait > strong {
  margin-top: 17px;
  font-size: 17px;
  letter-spacing: -0.015em;
}
.script-generation-wait > p {
  max-width: 650px;
  margin: 7px 0 0;
  color: var(--text-3);
  font-size: 11.5px;
  line-height: 1.7;
}
.script-wait-elapsed {
  margin-top: 9px;
  padding: 4px 8px;
  border-radius: 99px;
  color: #d9d1ff;
  background: rgba(124, 92, 255, 0.09);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.script-orbit {
  position: relative;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(124, 92, 255, 0.26);
  border-radius: 50%;
  animation: scriptOrbitTurn 2.6s linear infinite;
}
.script-orbit::before {
  content: '';
  width: 30px;
  height: 30px;
  border-radius: 11px;
  background: linear-gradient(145deg, #7c5cff, #22d3ee);
  box-shadow: 0 0 28px rgba(124, 92, 255, 0.45);
}
.script-orbit::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 28px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 29px 7px rgba(103, 232, 249, 0.24);
}
.script-orbit i {
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(203, 188, 255, 0.14);
  border-radius: 50%;
}
@keyframes scriptOrbitTurn { to { transform: rotate(360deg); } }
.script-wait-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 22px;
}
.script-wait-steps span {
  padding: 5px 9px;
  border-radius: 99px;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.035);
  font-size: 9.5px;
}
.script-wait-steps span.on { color: #d9d1ff; background: rgba(124, 92, 255, 0.14); }
.script-batch-progress {
  width: min(620px, 100%);
  margin-top: 18px;
  padding: 12px 13px;
  border: 1px solid rgba(124, 92, 255, 0.24);
  border-radius: 11px;
  background: rgba(124, 92, 255, 0.055);
  text-align: left;
}
.script-batch-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.script-batch-progress-head strong { font-size: 11.5px; }
.script-batch-progress-head > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 10px;
}
.script-batch-progress-head .spin { width: 12px; height: 12px; }
.script-batch-progress-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.script-batch-progress-ranges span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 6px;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.08);
  font-size: 9.5px;
}
.script-batch-progress-ranges .ico { width: 12px; height: 12px; }
.script-wait-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(620px, 100%);
  margin-top: 24px;
}
.script-wait-checklist > span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.02);
  font-size: 10.5px;
  text-align: left;
}
.script-wait-checklist > span.on {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.18);
  background: rgba(34, 197, 94, 0.045);
}
.script-wait-checklist .ico { width: 13px; height: 13px; }
.script-wait-checklist .spin { width: 12px; height: 12px; }

.script-form-grid,
.script-story-layout,
.script-output-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
.script-paper-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022));
}
.script-paper-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}
.script-paper-title .ico { width: 15px; height: 15px; color: #bbb0ff; }
.script-rule-list { margin: 13px 0 0; }
.script-rule-list > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}
.script-rule-list dt { color: var(--text-3); font-size: 12px; }
.script-rule-list dd { min-width: 0; margin: 0; color: var(--text-2); font-size: 13.5px; }
.script-rule-list input,
.script-rule-list select {
  width: 100%;
  height: 30px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-2);
  background: transparent;
  font: inherit;
  outline: 0;
}
.script-rule-list input:hover,
.script-rule-list input:focus,
.script-rule-list select:hover,
.script-rule-list select:focus {
  border-color: rgba(124, 92, 255, 0.3);
  background: rgba(124, 92, 255, 0.055);
}
.script-rule-list select {
  cursor: pointer;
  appearance: auto;
}
.script-rule-list select option {
  color: var(--text);
  background: #171925;
}
.script-rule-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.script-rule-blocks article {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.026);
}
.script-rule-blocks article > span {
  display: block;
  margin-bottom: 7px;
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 650;
}
.script-rule-blocks .textarea {
  min-height: 60px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.65;
  resize: none;
  outline: 0;
}
.script-rule-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.script-rule-columns > div {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.015);
}
.script-rule-columns b {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 12.5px;
}
.script-rule-columns span {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  color: var(--text-3);
  font-size: 11.5px;
  line-height: 1.5;
}
.script-rule-columns .ico { width: 12px; height: 12px; flex: none; margin-top: 1px; color: #9f8cff; }

.script-confirm-panel {
  margin-top: 18px;
  padding: 17px;
  border: 1px solid rgba(124, 92, 255, 0.31);
  border-radius: 15px;
  background:
    radial-gradient(circle at 0% 0%, rgba(124, 92, 255, 0.12), transparent 38%),
    rgba(20, 19, 34, 0.9);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.2);
}
.script-confirm-panel-sticky {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  backdrop-filter: blur(18px);
}
.script-confirm-copy { display: flex; align-items: flex-start; gap: 11px; }
.script-confirm-index {
  width: 33px;
  height: 33px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 10px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.09);
  font-size: 15px;
  font-weight: 780;
}
.script-confirm-copy strong { display: block; font-size: 12.5px; }
.script-confirm-copy p {
  margin: 3px 0 0;
  color: var(--text-3);
  font-size: 10.5px;
  line-height: 1.62;
}
.script-confirm-panel > .textarea { margin-top: 12px; min-height: 58px; }
.script-confirm-actions {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(260px, 1.45fr);
  gap: 9px;
  margin-top: 10px;
}
.script-confirm-actions .btn { min-height: 42px; }
.script-confirm-balance {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 9.5px;
  text-align: right;
}

.script-story-hero {
  padding: 24px;
  border: 1px solid rgba(124, 92, 255, 0.24);
  border-radius: 16px;
  background:
    radial-gradient(circle at 84% 20%, rgba(34, 211, 238, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(124, 92, 255, 0.12), rgba(255, 255, 255, 0.018));
}
.script-story-genre {
  color: #bdb1ff;
  font-size: 10px;
  font-weight: 700;
}
.script-story-hero h2 {
  margin: 7px 0 4px;
  font-size: clamp(27px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}
.script-story-hero p {
  max-width: 720px;
  margin: 8px 0 13px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.65;
}
.script-story-layout { margin-top: 13px; align-items: stretch; }
.script-story-summary > p {
  margin: 13px 0 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.9;
  white-space: pre-wrap;
}
.script-story-core {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}
.script-story-core > div {
  padding: 9px 10px;
  border-left: 2px solid rgba(124, 92, 255, 0.44);
  color: var(--text-2);
  background: rgba(124, 92, 255, 0.045);
  font-size: 10.5px;
  line-height: 1.55;
}
.script-story-core span { display: block; margin-bottom: 2px; color: var(--text-3); font-size: 9px; }
.script-story-core strong { font-weight: 500; }
.script-world-card dl { margin: 13px 0 0; }
.script-world-card dl > div { padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, 0.055); }
.script-world-card dt { color: var(--text-3); font-size: 9px; }
.script-world-card dd { margin: 3px 0 0; color: var(--text-2); font-size: 10.5px; line-height: 1.55; }
.script-world-keywords { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.script-world-keywords span {
  padding: 4px 7px;
  border-radius: 6px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.07);
  font-size: 9px;
}
.script-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 21px 0 10px;
}
.script-section-title > span { color: var(--text); font-size: 12px; font-weight: 650; }
.script-section-title small { color: var(--text-3); font-size: 9.5px; }
.script-character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.script-character-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.script-character-head { display: flex; align-items: center; gap: 9px; }
.script-character-head > span {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #e7e1ff;
  background: linear-gradient(145deg, rgba(124, 92, 255, 0.55), rgba(34, 211, 238, 0.24));
  font-size: 13px;
  font-weight: 750;
}
.script-character-head strong { display: block; font-size: 11.5px; }
.script-character-head small { display: block; margin-top: 2px; color: var(--text-3); font-size: 9px; }
.script-character-card > p {
  min-height: 31px;
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.55;
}
.script-character-card dl { margin: 8px 0 0; }
.script-character-card dl > div { margin-top: 5px; color: var(--text-3); font-size: 9.2px; line-height: 1.5; }
.script-character-card dt { display: inline; margin-right: 4px; color: #9f8cff; }
.script-character-card dd { display: inline; margin: 0; }

.script-episode-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--border);
}
.script-episode-summary > div {
  padding: 13px 15px;
  background: #11121c;
}
.script-episode-summary strong {
  display: block;
  color: #ded8ff;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.script-episode-summary span { display: block; margin-top: 2px; color: var(--text-3); font-size: 9px; }
.script-episode-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.script-episode-outline-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.016);
}
.script-episode-number {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(124, 92, 255, 0.18);
  border-radius: 10px;
  color: #cbbcff;
  background: rgba(124, 92, 255, 0.065);
  font-size: 10px;
  font-weight: 750;
}
.script-episode-fields { min-width: 0; }
.script-episode-title-input {
  height: 32px;
  padding: 0 7px;
  border-color: transparent;
  background: transparent;
  font-size: 11.5px;
  font-weight: 650;
}
.script-episode-fields .textarea {
  min-height: 66px;
  margin-top: 4px;
  padding: 7px;
  border-color: transparent;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.018);
  font-size: 10px;
  line-height: 1.6;
  resize: vertical;
}
.script-episode-title-input:hover,
.script-episode-title-input:focus,
.script-episode-fields .textarea:hover,
.script-episode-fields .textarea:focus {
  border-color: rgba(124, 92, 255, 0.24);
  background: rgba(124, 92, 255, 0.035);
}
.script-hook-input {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  margin-top: 5px;
}
.script-hook-input > span { color: #8b80c8; font-size: 8.5px; }
.script-hook-input .input {
  height: 29px;
  padding: 0 7px;
  border-color: transparent;
  color: #d8d0ff;
  background: rgba(124, 92, 255, 0.055);
  font-size: 9.5px;
}

.script-review-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px;
  border: 1px solid rgba(34, 197, 94, 0.20);
  border-radius: 16px;
  background:
    radial-gradient(circle at 3% 10%, rgba(34, 197, 94, 0.12), transparent 36%),
    rgba(255, 255, 255, 0.018);
}
.script-review-score {
  width: 112px;
  height: 112px;
  flex: none;
  display: flex;
  align-items: baseline;
  justify-content: center;
  padding-top: 31px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.06);
}
.script-review-score strong { font-size: 39px; line-height: 1; letter-spacing: -0.06em; }
.script-review-score span { margin-left: 3px; color: var(--text-3); font-size: 10px; }
.script-review-score.excellent strong { color: #86efac; }
.script-review-score.good strong { color: #fde68a; }
.script-review-score.attention strong { color: #fca5a5; }
.script-review-hero > div:last-child > span { color: #9f8cff; font-size: 9.5px; letter-spacing: 0.08em; }
.script-review-hero h2 { max-width: 900px; margin: 7px 0 7px; font-size: 18px; line-height: 1.45; }
.script-review-hero p { margin: 0; color: var(--text-3); font-size: 10.5px; }
.script-review-dimensions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}
.script-review-dimensions article {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.016);
}
.script-review-dimensions article > div { display: flex; justify-content: space-between; gap: 5px; }
.script-review-dimensions strong { font-size: 10.5px; }
.script-review-dimensions span { color: #d7d0ff; font-size: 12px; font-weight: 700; }
.script-review-dimensions i {
  display: block;
  height: 3px;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
}
.script-review-dimensions b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c5cff, #22d3ee);
}
.script-review-dimensions p { margin: 7px 0 0; color: var(--text-3); font-size: 9px; line-height: 1.5; }
.script-review-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.script-review-columns article {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.016);
}
.script-review-columns .script-section-title { margin-top: 0; }
.script-review-columns p {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 8px 0 0;
  color: var(--text-3);
  font-size: 10px;
  line-height: 1.55;
}
.script-review-columns p .ico { width: 13px; height: 13px; flex: none; color: #86efac; }
.script-review-advice p > span {
  width: 5px;
  height: 5px;
  flex: none;
  margin-top: 5px;
  border-radius: 50%;
  background: #9f8cff;
}
.script-review-issues { margin-top: 17px; }
.script-review-issues > article {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.014);
}
.script-review-issues > article + article { margin-top: 7px; }
.script-issue-severity {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.10);
  font-size: 9.5px;
  font-weight: 700;
}
.script-issue-severity.severity-高 { color: #fecaca; background: rgba(239, 68, 68, 0.12); }
.script-issue-severity.severity-低 { color: #a5f3fc; background: rgba(34, 211, 238, 0.08); }
.script-review-issues strong { display: block; font-size: 10.5px; }
.script-review-issues strong small { color: var(--text-3); font-size: 9px; font-weight: 400; }
.script-review-issues p { margin: 3px 0 0; color: var(--text-2); font-size: 10px; line-height: 1.55; }
.script-review-issues article > div > div {
  margin-top: 6px;
  color: var(--text-3);
  font-size: 9.5px;
  line-height: 1.55;
}
.script-review-issues article > div > div b { margin-right: 6px; color: #b6a9ff; }
.script-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 17px;
}
.script-review-error {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border: 1px solid rgba(248, 113, 113, 0.23);
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.035);
  text-align: center;
}
.script-review-error > .ico { width: 34px; height: 34px; color: #fca5a5; }
.script-review-error h3 { margin: 13px 0 0; font-size: 17px; }
.script-review-error p { max-width: 620px; margin: 6px 0 18px; color: var(--text-3); font-size: 11px; line-height: 1.65; }

.script-output-stage { max-width: 1180px; padding-top: 42px; }
.script-output-hero {
  position: relative;
  padding: 34px;
  overflow: hidden;
  border: 1px solid rgba(124, 92, 255, 0.27);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 5%, rgba(34, 211, 238, 0.15), transparent 34%),
    radial-gradient(circle at 7% 100%, rgba(124, 92, 255, 0.20), transparent 40%),
    rgba(20, 19, 34, 0.9);
}
.script-output-check {
  position: absolute;
  top: 28px;
  right: 30px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 50%;
  color: #86efac;
  background: rgba(34, 197, 94, 0.07);
}
.script-output-check .ico { width: 21px; height: 21px; }
.script-output-hero h1 {
  max-width: 850px;
  margin: 10px 0 8px;
  font-size: clamp(34px, 4.5vw, 61px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}
.script-output-hero > p {
  max-width: 780px;
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
}
.script-output-stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 24px;
}
.script-output-stats > div {
  min-width: 105px;
  padding: 0 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.script-output-stats > div:first-child { padding-left: 0; border-left: 0; }
.script-output-stats strong { display: block; color: #eeeaff; font-size: 22px; font-variant-numeric: tabular-nums; }
.script-output-stats span { display: block; margin-top: 3px; color: var(--text-3); font-size: 9px; }
.script-output-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 25px; }
.script-output-notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 13px;
  padding: 13px 15px;
  border: 1px solid rgba(34, 197, 94, 0.17);
  border-radius: 12px;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.035);
}
.script-output-notice > .ico { width: 16px; height: 16px; flex: none; }
.script-output-notice strong { display: block; font-size: 10.5px; }
.script-output-notice p { margin: 3px 0 0; color: var(--text-3); font-size: 9.5px; line-height: 1.6; }
.script-output-toolbar { display: flex; gap: 7px; margin-top: 13px; }
.script-output-story { margin-top: 15px; }
.script-output-story .script-paper-card > p {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 10.5px;
  line-height: 1.75;
}
.script-output-episodes { margin-top: 7px; }
.script-output-episode {
  overflow: hidden;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.014);
}
.script-output-episode summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}
.script-output-episode summary::-webkit-details-marker { display: none; }
.script-output-episode summary > span {
  color: #a99cff;
  font-size: 9.5px;
  font-weight: 750;
}
.script-output-episode summary strong { font-size: 10.5px; font-weight: 600; }
.script-output-episode summary small { color: var(--text-3); font-size: 9px; }
.script-output-episode summary .ico { width: 14px; height: 14px; color: var(--text-3); transition: 0.16s ease; }
.script-output-episode[open] summary .ico { transform: rotate(180deg); }
.script-output-episode-body {
  padding: 0 14px 14px 55px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}
.script-output-summary {
  margin: 11px 0;
  padding: 9px 10px;
  border-left: 2px solid rgba(124, 92, 255, 0.45);
  color: var(--text-3);
  background: rgba(124, 92, 255, 0.04);
  font-size: 10px;
  line-height: 1.65;
}
.script-output-episode-body pre {
  margin: 0;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 10.5px;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}

.script-primary-tabs {
  flex: 1;
  min-width: 510px;
}
.script-task-list { margin-top: 18px; }
.script-task-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.script-task-board-head .h3 { font-size: 19px; }
.script-task-rows {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 38px;
}
.script-task-row {
  position: relative;
  min-height: 172px;
  margin-left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: center;
  gap: 18px;
  padding: 21px 22px 21px 202px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% -20%, rgba(34, 211, 238, 0.08), transparent 34%),
    linear-gradient(105deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.032)),
    #1a1c29;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  margin-bottom:40px;
}
.script-task-row:hover {
  border-color: rgba(150, 132, 255, 0.42);
  background:
    radial-gradient(circle at 90% -20%, rgba(34, 211, 238, 0.11), transparent 34%),
    linear-gradient(105deg, rgba(255, 255, 255, 0.095), rgba(124, 92, 255, 0.045)),
    #1e2030;
}
.script-task-cover {
  position: absolute;
  left: 24px;
  top: -22px;
  width: 164px;
  height: 164px;
  overflow: hidden;
  border: 3px solid #252738;
  border-radius: 17px;
  background: #10111a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.script-task-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.script-task-row-body { min-width: 0; }
.script-task-card-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.script-task-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 6px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.09);
  font-size: 11px;
  font-weight: 650;
}
.script-task-category .ico { width: 12px; height: 12px; }
.script-task-genre {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid rgba(173, 158, 255, 0.2);
  border-radius: 7px;
  color: #c8beff;
  background: rgba(124, 92, 255, 0.075);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.script-task-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 10px;
}
.script-task-icon {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(203, 188, 255, 0.2);
  border-radius: 10px;
  color: #d9d1ff;
  background: rgba(124, 92, 255, 0.1);
}
.script-task-icon .ico { width: 16px; height: 16px; }
.script-task-title h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.35;
}
.script-task-row-body > p {
  margin: 7px 0 0;
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.7;
}
.script-task-requirement {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 13px;
  padding: 10px 12px;
  border-left: 2px solid rgba(124, 92, 255, 0.45);
  background: rgba(124, 92, 255, 0.055);
}
.script-task-requirement > .ico { width: 15px; height: 15px; flex: none; margin-top: 2px; color: #a99cff; }
.script-task-requirement span { display: block; color: var(--text-3); font-size: 11px; }
.script-task-requirement strong {
  display: block;
  margin-top: 2px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.55;
}
.script-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin-top: 11px;
  color: var(--text-3);
  font-size: 11.5px;
}
.script-task-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.script-task-meta .ico { width: 13px; height: 13px; color: #9d92dc; }
.script-task-meta b { color: #e1dcff; font-size: 12.5px; }
.script-task-participants {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}
.script-task-participant-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #a9abba;
  font-size: 12px;
}
.script-task-participant-label .ico { width: 14px; height: 14px; color: #9f94df; }
.script-task-avatars {
  display: flex;
  align-items: center;
  padding-left: 7px;
}
.script-task-avatars img,
.script-task-avatar-more {
  width: 32px;
  height: 32px;
  margin-left: -8px;
  border: 2px solid #202230;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.script-task-avatars img {
  display: block;
  object-fit: cover;
  background: #2a2c3a;
}
.script-task-avatars img:hover {
  position: relative;
  z-index: 3;
  transform: translateY(-3px) scale(1.08);
  border-color: rgba(186, 175, 255, 0.75);
}
.script-task-avatar-more {
  display: grid;
  place-items: center;
  color: #dcd7ff;
  background: #2a2c3b;
  font-size: 9.5px;
  font-weight: 700;
}
.script-task-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.script-task-action .btn {
  min-width: 138px;
  min-height: 44px;
  justify-content: center;
}
.script-task-action-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.script-task-my-status {
  text-align: center;
  color: #fde68a;
  font-size: 11.5px;
}
.script-task-my-status.status-approved { color: #86efac; }
.script-task-my-status.status-submitted { color: #a5f3fc; }
.script-task-my-status.status-rated,
.script-task-my-status.status-settled { color: #d8ccff; }
.task-enroll-modal { max-width: 650px; }
.task-enroll-hero {
  display: flex;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}
.task-enroll-hero img {
  width: 126px;
  height: 126px;
  flex: none;
  border-radius: 11px;
  object-fit: cover;
}
.task-enroll-hero > div { min-width: 0; }
.task-enroll-hero p {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.65;
}
.task-enroll-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.task-enroll-rewards span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 6px;
  color: #d8d0ff;
  background: rgba(124, 92, 255, 0.08);
  font-size: 10px;
}
.task-enroll-rewards .ico { width: 12px; height: 12px; }
.task-enroll-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 13px;
  padding: 11px 12px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 10px;
  color: var(--text-3);
  background: rgba(34, 211, 238, 0.035);
}
.task-enroll-note .ico { width: 15px; height: 15px; flex: none; color: #67e8f9; }
.task-enroll-note p { margin: 0; font-size: 11px; line-height: 1.65; }
.task-enroll-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 9px;
  margin-top: 17px;
}
.task-enroll-actions .btn { min-height: 42px; justify-content: center; }
.task-enroll-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 12px 8px;
  text-align: center;
}
.task-enroll-success-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
}
.task-enroll-success-icon .ico { width: 27px; height: 27px; }
.task-enroll-success h3 { margin: 13px 0 0; font-size: 19px; }
.task-enroll-success p {
  max-width: 440px;
  margin: 7px 0 0;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.7;
}
.task-enroll-mail {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 13px;
  color: #a5f3fc;
  font-size: 11px;
}
.task-enroll-mail .ico { width: 14px; height: 14px; }

@media (max-width: 1180px) {
  .script-workspace-head { grid-template-columns: minmax(210px, 1fr) minmax(130px, 220px) auto; gap: 14px; }
  .script-save-state { display: none; }
  .script-character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .script-review-dimensions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .script-task-row {
    margin-left: 0;
    padding-left: 188px;
    grid-template-columns: minmax(0, 1fr) 145px;
  }
  .script-task-cover { left: 20px; top: -18px; width: 148px; height: 148px; }
}
@media (max-width: 900px) {
  .script-workspace-mask { padding: 0; }
  .script-workspace {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    grid-template-rows: 62px minmax(0, 1fr);
  }
  .script-workspace-head { padding: 0 13px; grid-template-columns: minmax(180px, 1fr) auto; }
  .script-workspace-progress-mini { display: none; }
  .script-workspace-head-actions .btn span { display: none; }
  .script-workspace-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .script-workspace-rail {
    display: flex;
    flex-direction: row;
    gap: 5px;
    padding: 8px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
  }
  .script-workspace-rail::-webkit-scrollbar { display: none; }
  .script-workspace-rail-title,
  .script-workspace-rail-note { display: none; }
  .script-rail-step {
    min-width: fit-content;
    min-height: 40px;
    padding: 6px 8px;
    gap: 6px;
  }
  .script-rail-step::after { display: none; }
  .script-rail-number { width: 25px; height: 25px; }
  .script-rail-step strong { font-size: 10px; white-space: nowrap; }
  .script-rail-step small { display: none; }
  .script-stage { padding: 24px 20px 55px; }
  .script-stage-seed { padding-top: 40px; }
  .script-stage-heading h1 { font-size: 29px; }
  .script-form-grid,
  .script-story-layout,
  .script-output-story,
  .script-review-columns { grid-template-columns: 1fr; }
  .script-episode-list { grid-template-columns: 1fr; }
  .script-rule-columns { grid-template-columns: 1fr; }
  .script-output-hero { padding: 25px; }
  .script-output-check { top: 20px; right: 20px; }
  .script-primary-tabs { width: 100%; min-width: 0; overflow-x: auto; }
  .script-search-box { width: min(100%, 238px); }
  .script-section-head { align-items: stretch; flex-direction: column; gap: 8px; }
  .script-section-tabs { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .script-section-tabs::-webkit-scrollbar { display: none; }
  .script-section-head > .btn { align-self: flex-end; }
}
@media (max-width: 620px) {
  .script-pipeline-entry-head { display: block; }
  .script-entry-input-row .btn { width: 100%; }
  .script-pipeline-entry-head p { font-size: 11px; }
  .script-entry-tools { align-items: flex-start; }
  .script-entry-draft { width: 100%; margin-left: 0; }
  .script-seed-options,
  .script-rule-blocks,
  .script-episode-summary { grid-template-columns: 1fr 1fr; }
  .script-character-grid { grid-template-columns: 1fr; }
  .script-review-dimensions { grid-template-columns: 1fr 1fr; }
  .script-confirm-actions { grid-template-columns: 1fr; }
  .script-review-actions { flex-direction: column; }
  .script-review-actions .btn { width: 100%; }
  .script-wait-checklist { grid-template-columns: 1fr; }
  .script-stage-primary { align-items: flex-start; flex-direction: column; }
  .script-stage-primary .btn { width: 100%; }
  .script-review-hero { align-items: flex-start; flex-direction: column; }
  .script-review-score { width: 86px; height: 86px; padding-top: 25px; }
  .script-review-score strong { font-size: 31px; }
  .script-output-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 0; }
  .script-output-stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .script-output-hero h1 { padding-right: 42px; font-size: 34px; }
  .script-output-actions .btn { flex: 1 1 100%; }
  .script-output-episode-body { padding-left: 14px; }
  .script-task-row {
    min-height: 0;
    margin-left: 0;
    padding: 14px;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .script-task-cover {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: 210px;
    border-width: 1px;
  }
  .script-task-action { justify-content: stretch; }
  .script-task-action .btn { width: 100%; }
  .script-search-box { width: 100%; }
  .script-section-tabs button { min-height: 48px; padding: 7px 12px 10px; font-size: 17px; }
  .script-section-fire-gif { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .script-workspace-mask,
  .script-orbit { animation: none; }
}

.shot-idx {
  width: 26px; height: 26px; border-radius: 8px; background: var(--primary-soft); color: #cbbcff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.shot-preview { width: 100%; border-radius: 8px; }
.shot-preview--empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  aspect-ratio: 9 / 16; padding: 8px; text-align: center; line-height: 1.5;
  border: 1px dashed var(--border-strong); background: rgba(255, 255, 255, 0.03);
  color: var(--text-3);
}

/* 分镜提示词里的素材引用（角色 / 场景 / 道具设定图） */
.shot-prompt { position: relative; }
.shot-mention {
  position: absolute; left: 8px; bottom: 6px; transform: translateY(100%); z-index: 30;
  min-width: 190px; max-height: 210px; overflow: auto; padding: 5px; border-radius: 12px;
  background: rgba(24, 24, 36, 0.98); border: 1px solid var(--border-strong);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}
.shot-mention-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 5px 8px; border-radius: 8px;
  background: none; border: none; color: var(--text); font-family: inherit; font-size: 13px;
  cursor: pointer; text-align: left;
}
.shot-mention-item:hover { background: var(--primary-soft); }
.shot-mention-item img { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; display: block; }
.shot-refs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.shot-ref {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 6px 2px 3px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.shot-ref img { width: 20px; height: 20px; border-radius: 5px; object-fit: cover; display: block; }
.shot-ref-name { font-size: 12px; color: var(--text-2); }
.shot-ref-x {
  font-style: normal; font-size: 10px; color: var(--text-3); cursor: pointer; padding: 0 2px;
}
.shot-ref-x:hover { color: var(--rose); }

/* 分析中的进度 */
.analyzing { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px 20px; }
.analyzing .ring {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid rgba(124, 92, 255, 0.22); border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}

/* 创作台的 Skill 选择器 */
.skill-picker { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.skill-mini {
  flex: none; width: 152px; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); transition: 0.15s;
}
.skill-mini:hover { border-color: var(--border-strong); }
.skill-mini.on { border-color: rgba(124, 92, 255, 0.75); box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.3); }
.skill-mini-cover { aspect-ratio: 8 / 5; background-size: cover; background-position: center; background-color: var(--bg-soft); }
.skill-mini-body { padding: 8px 10px 10px; }

/* ------------------------- 底部 ------------------------- */
.footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 34px 28px 44px; }
.footer-inner { max-width: 1320px; margin: 0 auto; color: var(--text-3); font-size: 12.5px; line-height: 2; }
.footer a { color: var(--text-3); }
.footer a:hover { color: var(--text-2); }

/* ------------------------- 助手工具类 ------------------------- */
.scroll-y { overflow-y: auto; }
.pointer { cursor: pointer; }
.nowrap { white-space: nowrap; }
.center { display: grid; place-items: center; }

/* 后台通用分页条：左边总条数，中间页码，右边上一页 / 下一页 */
.admin-pager {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px;
}
.admin-pager-total { flex: none; white-space: nowrap; }
.pager-nav {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  flex: 1; min-width: 260px;
}
.pager-nums { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.pager-btn, .pager-num {
  font-family: inherit; cursor: pointer; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  transition: 0.16s;
}
.pager-btn { padding: 5px 12px; font-size: 12.5px; }
.pager-num { min-width: 28px; height: 28px; padding: 0 6px; font-size: 12.5px; }
.pager-btn:hover:not(:disabled), .pager-num:hover { color: var(--text); border-color: var(--border-strong); }
.pager-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pager-num.on {
  color: #fff; font-weight: 600;
  background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.36);
}
.pager-gap { padding: 0 2px; font-size: 12px; color: var(--text-3); }
.rel { position: relative; }
.badge-dot {
  position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--rose); border: 2px solid var(--bg);
}
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.avatar {
  border-radius: 50%; background: var(--grad); display: grid; place-items: center;
  color: #fff; font-weight: 600; flex: none; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-large {
  width: 64px;
  height: 64px;
  font-size: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 28px rgba(124, 92, 255, 0.24);
}
.profile-avatar-editor {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}
.profile-avatar-preview {
  width: 72px;
  height: 72px;
  font-size: 25px;
  border: 2px solid rgba(203, 188, 255, 0.3);
}
.profile-avatar-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.profile-avatar-copy > span { color: var(--text-3); font-size: 11.5px; }
.profile-avatar-input { display: none; }
.notice-list { display: flex; flex-direction: column; gap: 9px; }
.notice-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}
.notice-item.unread {
  border-color: rgba(124, 92, 255, 0.3);
  background: rgba(124, 92, 255, 0.055);
}
.notice-icon {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #cbbcff;
  background: rgba(124, 92, 255, 0.12);
}
.notice-icon .ico { width: 16px; height: 16px; }
.notice-item > div { min-width: 0; flex: 1; }
.notice-item strong { font-size: 13px; }
.notice-item p {
  margin: 5px 0 0;
  color: var(--text-3);
  font-size: 11.5px;
  line-height: 1.65;
}
.notice-unread {
  display: inline-block;
  margin-top: 6px;
  color: #fda4af;
  font-size: 9.5px;
}

.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); }
.seg button {
  border: none; background: none; color: var(--text-2); padding: 6px 14px; border-radius: 8px;
  cursor: pointer; font-size: 13px; font-family: inherit; transition: 0.15s;
}
.seg button.on { background: var(--surface-3); color: #fff; font-weight: 600; }

.side-item {
  padding: 9px 12px; border-radius: 10px; cursor: pointer; transition: 0.15s; font-size: 13px;
  border: 1px solid transparent;
}
.side-item:hover { background: var(--surface-2); }
.side-item.on { background: var(--primary-soft); border-color: rgba(124, 92, 255, 0.35); color: #cbbcff; }

/* ------------------------- 聊天 ------------------------- */
.chat-list { display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 11px; }
.msg-avatar { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; font-size: 14px; }
.msg-avatar.user { background: var(--surface-3); }
.msg-avatar.ai { background: var(--grad); }
.msg-bubble {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 15px; max-width: min(720px, 100%); white-space: pre-wrap; word-break: break-word;
}
.msg.user .msg-bubble { background: var(--primary-soft); border-color: rgba(124, 92, 255, 0.28); }

/* ------------------------- 定价卡 ------------------------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 16px; }
.plan {
  padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  display: flex; flex-direction: column; gap: 14px; position: relative;
}
.plan.on { border-color: rgba(124, 92, 255, 0.6); box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.3); }
.plan-price { font-size: 32px; font-weight: 700; letter-spacing: -1px; }

/* ------------------------- 扫码支付弹窗 ------------------------- */
.pay-modal { position: relative; max-width: 460px; padding: 22px 22px 18px; text-align: center; }
.pay-x {
  position: absolute; right: 12px; top: 12px; width: 28px; height: 28px; border: none; border-radius: 8px;
  background: none; color: var(--text-3); cursor: pointer; display: grid; place-items: center;
}
.pay-x:hover { background: var(--surface-2); color: #fff; }
.pay-x svg { width: 14px; height: 14px; display: block; }
.pay-chip {
  display: inline-block; padding: 4px 12px; border-radius: 10px; font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.pay-order {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left;
  margin: 14px 0 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.pay-order-title { font-size: 14.5px; font-weight: 600; }
.pay-order-amount { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.pay-order-amount b { font-size: 22px; font-weight: 700; }
.pay-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.pay-tab {
  flex: 1; padding: 8px 0; border-radius: 10px; cursor: pointer; font-size: 13px; font-family: inherit;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); color: var(--text-2);
  transition: 0.16s;
}
.pay-tab:hover:not(:disabled) { border-color: var(--border-strong); color: var(--text); }
.pay-tab.on { background: var(--primary-soft); border-color: rgba(124, 92, 255, 0.6); color: #fff; font-weight: 600; }
.pay-tab:disabled { opacity: 0.6; cursor: default; }
.pay-tip { font-size: 13.5px; }
.pay-tip b { margin: 0 2px; }
.pay-tip-sub { margin-top: 4px; }
.pay-qr {
  width: 190px; height: 190px; margin: 14px auto 10px; border-radius: 12px; background: #fff;
  display: grid; place-items: center; overflow: hidden;
}
.pay-qr img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pay-qr-ph {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 16px; color: #6b6b6b; font-size: 12.5px; line-height: 1.5; text-align: center;
  overflow-wrap: anywhere;
}
.pay-notify { margin-top: 8px; word-break: break-all; }
.pay-qr-ok { color: #12b76a; }
.pay-qr-ok svg { width: 54px; height: 54px; display: block; }
.pay-expire { font-size: 13px; }
.pay-expire b { color: var(--primary-2); }
.pay-err { margin-top: 8px; color: var(--amber); }
.pay-warn {
  margin: 14px 0 10px; padding: 11px 0; border-radius: 10px; font-size: 13px; color: #fff;
  background: var(--grad);
}
.pay-terms { font-size: 11.5px; color: var(--text-3); }

/* ------------------------- 后台布局 ------------------------- */
.admin-shell { display: grid; grid-template-columns: 214px 1fr; min-height: 100vh; }
.admin-side {
  border-right: 1px solid var(--border); background: rgba(10, 10, 18, 0.7);
  padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow: auto;
}
.admin-main { padding: 22px 26px 60px; min-width: 0; }
/* 后台侧边栏：和前台频道栏同一套「光晕 + 扫光 + 图标弹出」手感 */
.admin-nav-item {
  position: relative; isolation: isolate;
  display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 10px;
  color: var(--text-2); cursor: pointer; font-size: 13.5px; margin-bottom: 2px;
  transition: color 0.3s var(--ease-out), opacity 0.3s var(--ease-out),
              transform 0.36s var(--ease-out);
}
.admin-nav-item > * { position: relative; z-index: 1; }
.admin-nav-item::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 0;
  background: linear-gradient(96deg,
    rgba(124, 92, 255, 0.45), rgba(34, 211, 238, 0.16) 70%, transparent 100%);
  opacity: 0; transform: scaleX(0.88); transform-origin: left center;
  transition: opacity 0.3s var(--ease-out), transform 0.46s var(--ease-back);
  pointer-events: none;
}
.admin-nav-item::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 0;
  background: linear-gradient(100deg,
    transparent 38%, rgba(255, 255, 255, 0.18) 50%, transparent 62%);
  background-size: 240% 100%; background-position: 158% 0;
  opacity: 0; pointer-events: none;
  transition: background-position 0.72s var(--ease-out), opacity 0.26s ease;
}
.admin-side:hover .admin-nav-item:not(:hover):not(.on) { opacity: 0.66; }

.admin-nav-item:hover { color: var(--text); transform: translateX(4px); }
.admin-nav-item:hover::before { opacity: 1; transform: none; }
.admin-nav-item:hover::after { opacity: 1; background-position: -62% 0; }

.admin-nav-item.on { color: #cbbcff; font-weight: 600; }
.admin-nav-item.on::before {
  opacity: 1; transform: none;
  background: linear-gradient(96deg, rgba(124, 92, 255, 0.55), rgba(124, 92, 255, 0.16));
}

.admin-nav-item .ico {
  font-size: 17px; opacity: 0.85;
  transition: transform 0.42s var(--ease-back), opacity 0.26s ease, filter 0.3s ease;
}
.admin-nav-item:hover .ico {
  opacity: 1; transform: scale(1.16);
  filter: drop-shadow(0 4px 10px rgba(124, 92, 255, 0.55));
}
.admin-nav-item.on .ico { opacity: 1; }
.admin-nav-group { margin-bottom: 2px; }
.admin-nav-chevron { margin-left: auto; transition: transform 0.18s ease; }
.admin-nav-group:has(.admin-task-subnav) .admin-nav-chevron { transform: rotate(180deg); }
.admin-task-subnav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 3px 4px 7px 18px;
  padding-left: 9px;
  border-left: 1px solid rgba(124, 92, 255, 0.22);
}
.admin-task-subnav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--text-3);
  font-size: 12.5px;
  cursor: pointer;
}
.admin-task-subnav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.035); }
.admin-task-subnav-item.on {
  color: #d8d0ff;
  background: rgba(124, 92, 255, 0.10);
}
.admin-task-subnav-item .ico { width: 14px; height: 14px; }
.task-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.task-admin-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.task-admin-form .field { margin: 0; }
.task-admin-form .field > span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-2);
  font-size: 11.5px;
}
.task-admin-wide { grid-column: 1 / -1; }
.task-date-field {
  position: relative;
  display: flex;
  align-items: center;
}
.task-date-field > .ico {
  position: absolute;
  left: 11px;
  z-index: 1;
  width: 15px;
  height: 15px;
  color: var(--text-3);
  pointer-events: none;
}
.task-date-field .input { padding-left: 34px; }
.task-admin-task-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px;
}
.task-admin-task-row > img {
  width: 92px;
  height: 92px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
}
.task-admin-task-row p {
  margin: 5px 0;
  color: var(--text-3);
  font-size: 11.5px;
  line-height: 1.55;
}
.task-admin-submission { position: relative; padding: 15px; overflow: hidden; }
.task-admin-submission strong { font-size: 13px; }
.task-admin-submission.is-stamping { animation: taskStampShake 0.46s ease-out; }
.task-grade-stamp-stage {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle, rgba(8, 8, 15, 0.08), rgba(8, 8, 15, 0.5));
  animation: taskStampStage 1.25s ease forwards;
}
.task-grade-stamp-seal {
  position: relative;
  width: 116px;
  height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 4px double currentColor;
  border-radius: 50%;
  color: #fb7185;
  background: rgba(24, 14, 21, 0.88);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.035), 0 14px 40px rgba(0, 0, 0, 0.42);
  transform-origin: center;
  animation: taskStampDrop 0.68s cubic-bezier(0.18, 1.4, 0.34, 1) both;
}
.task-grade-stamp-seal::before,
.task-grade-stamp-seal::after {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px dashed currentColor;
  border-radius: 50%;
  opacity: 0.55;
}
.task-grade-stamp-seal::after {
  inset: 16px;
  border-style: solid;
  opacity: 0.24;
}
.task-grade-stamp-seal strong {
  font-size: 52px;
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.08em;
  text-shadow: 0 0 12px currentColor;
}
.task-grade-stamp-seal small {
  margin-top: 5px;
  color: currentColor;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
}
.task-grade-stamp-seal.grade-s { color: #fbbf24; }
.task-grade-stamp-seal.grade-a { color: #fb7185; }
.task-grade-stamp-seal.grade-b { color: #67e8f9; }
.task-grade-stamp-seal.grade-c { color: #c4b5fd; }
.task-grade-stamp-ripple {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  animation: taskStampRipple 0.78s 0.24s ease-out both;
}
@keyframes taskStampDrop {
  0% { opacity: 0; transform: translateY(-90px) scale(2.4) rotate(-26deg); filter: blur(7px); }
  56% { opacity: 1; transform: translateY(5px) scale(0.88) rotate(-11deg); filter: blur(0); }
  74% { transform: translateY(-2px) scale(1.06) rotate(-13deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(-12deg); }
}
@keyframes taskStampRipple {
  0% { opacity: 0.7; transform: scale(0.48); }
  100% { opacity: 0; transform: scale(2.1); }
}
@keyframes taskStampShake {
  0%, 100% { transform: translateX(0); }
  24% { transform: translateX(-4px) rotate(-0.18deg); }
  42% { transform: translateX(4px) rotate(0.18deg); }
  62% { transform: translateX(-2px); }
  78% { transform: translateX(2px); }
}
@keyframes taskStampStage {
  0%, 68% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}
@media (max-width: 1080px) {
  .task-admin-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .task-admin-form { grid-template-columns: 1fr; }
  .task-admin-wide { grid-column: auto; }
  .task-admin-task-row { align-items: flex-start; flex-wrap: wrap; }
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.banner-thumb {
  width: 220px; flex: none; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2);
  display: grid; place-items: center;
}
.banner-thumb--lg { width: 300px; }
.banner-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 作品审核：一级列表只做浏览入口，完整成片与审核操作放在详情面板 */
.work-review-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.work-review-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.work-review-card {
  min-width: 0; overflow: hidden; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.work-review-card:hover {
  transform: translateY(-2px); border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.work-review-card.is-pending { border-color: rgba(251, 191, 36, 0.22); }
.work-review-cover {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  overflow: hidden; border: 0; padding: 0; cursor: pointer;
  color: var(--text); background: #090910; text-align: left;
}
.work-review-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.35s ease, filter 0.25s ease;
}
.work-review-cover:hover img { transform: scale(1.035); filter: brightness(0.82); }
.work-review-cover::after {
  content: ''; position: absolute; inset: auto 0 0; height: 45%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(5, 5, 12, 0.8));
}
.work-review-cover-empty {
  display: grid; place-items: center; width: 100%; height: 100%;
  color: var(--text-3); font-size: 12px; background: var(--surface-2);
}
.work-review-card-status { position: absolute; top: 10px; left: 10px; z-index: 2; }
.work-review-play {
  position: absolute; z-index: 2; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: rgba(8, 8, 16, 0.72); border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.work-review-play .ico { width: 17px; height: 17px; transform: translateX(1px); }
.work-review-cover-hint {
  position: absolute; z-index: 2; right: 11px; bottom: 9px;
  color: rgba(255, 255, 255, 0.82); font-size: 11.5px;
}
.work-review-card-body { padding: 12px 13px 11px; min-width: 0; }
.work-review-card-title { display: block; font-size: 14.5px; }
.work-review-card-meta {
  display: flex; align-items: center; gap: 5px; min-width: 0;
  margin-top: 5px; color: var(--text-3); font-size: 11.5px;
}
.work-review-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px;
}
.work-review-card-origin { display: flex; align-items: center; gap: 7px; min-width: 0; }
.work-review-featured-mark {
  display: inline-flex; align-items: center; gap: 3px; color: #f5ca72;
  font-size: 10.5px; font-weight: 600; white-space: nowrap;
}
.work-review-featured-mark .ico { width: 11px; height: 11px; }
.work-review-loading {
  min-height: 180px; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.work-review-mask {
  position: fixed; inset: 0; z-index: 240; display: flex; justify-content: flex-end;
  padding: 16px; background: rgba(4, 4, 10, 0.74); backdrop-filter: blur(6px);
  animation: fade 0.18s ease;
}
.work-review-panel {
  width: min(900px, 100%); height: calc(100vh - 32px); overflow: auto;
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl); box-shadow: var(--shadow);
  animation: slideIn 0.24s ease;
}
.work-review-head {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 18px; padding: 20px 24px 17px;
  background: rgba(17, 17, 29, 0.96); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
.work-review-kicker {
  margin-bottom: 4px; color: var(--text-3); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.work-review-title {
  margin: 0; color: var(--text); font-size: 20px; line-height: 1.35;
  font-weight: 650; letter-spacing: -0.2px;
}
.work-review-head-actions {
  display: flex; align-items: center; gap: 8px; flex: none;
}
.work-review-close { width: 34px; height: 34px; padding: 0; flex: none; }
.work-review-content { padding: 20px 24px 28px; }
.work-review-media {
  overflow: hidden; border: 1px solid var(--border); border-radius: 14px;
  background: #06060c;
}
.work-review-video {
  display: block; width: 100%; max-height: 52vh; aspect-ratio: 16 / 9;
  object-fit: contain; background: #05050a;
}
.work-review-video.is-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; min-height: 260px; color: var(--text-2);
}
.work-review-video.is-empty .ico { width: 34px; height: 34px; color: var(--text-3); }
.work-review-media-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; color: var(--text-3); font-size: 11.5px;
  background: rgba(255, 255, 255, 0.025); border-top: 1px solid var(--border);
}
.work-review-media-foot a { color: var(--cyan); }
.work-review-danger-text { color: var(--rose); }
.work-review-info-grid {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(180px, 0.55fr);
  gap: 14px; margin-top: 14px;
}
.work-review-summary, .work-review-cover-preview, .work-review-action, .work-review-history {
  min-width: 0; padding: 16px; border: 1px solid var(--border);
  border-radius: 14px; background: var(--surface);
}
.work-review-section-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.work-review-section-head h3 {
  margin: 0; color: var(--text); font-size: 14px; font-weight: 600;
}
.work-review-section-head p {
  margin: 4px 0 0; color: var(--text-3); font-size: 11.5px; line-height: 1.55;
}
.work-review-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 16px 0 0;
}
.work-review-meta div { min-width: 0; }
.work-review-meta dt { margin-bottom: 3px; color: var(--text-3); font-size: 11px; }
.work-review-meta dd {
  margin: 0; overflow: hidden; color: var(--text-2); font-size: 12.5px;
  text-overflow: ellipsis; white-space: nowrap;
}
.work-review-cover-frame {
  width: 100%; aspect-ratio: 16 / 9; margin-top: 12px; overflow: hidden;
  display: grid; place-items: center; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-2);
}
.work-review-cover-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.work-review-action, .work-review-history { margin-top: 14px; }
.work-review-note-label {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 15px; color: var(--text-2); font-size: 12.5px;
}
.work-review-action .textarea { min-height: 92px; margin-top: 7px; }
.work-review-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 9px;
  margin-top: 14px;
}
.work-review-actions .btn { min-width: 116px; height: 39px; }
.work-review-history-note {
  margin-top: 14px; padding: 11px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.035); font-size: 12px;
}
.work-review-history-note p { margin: 5px 0 0; color: var(--text-2); line-height: 1.6; }
.work-review-feature {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 14px; padding: 13px; border: 1px solid rgba(245, 202, 114, 0.2);
  border-radius: 11px; background: rgba(245, 202, 114, 0.055);
}
.work-review-feature-copy { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.work-review-feature-icon {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none;
  color: #f5ca72; border-radius: 9px; background: rgba(245, 202, 114, 0.1);
}
.work-review-feature-icon .ico { width: 15px; height: 15px; }
.work-review-feature-copy strong { color: var(--text); font-size: 12.5px; font-weight: 600; }
.work-review-feature-copy p { margin: 4px 0 0; color: var(--text-3); font-size: 11.5px; line-height: 1.55; }
.work-review-feature-btn { flex: none; color: #f5ca72; border-color: rgba(245, 202, 114, 0.3); }
.work-review-feature-btn:hover:not(:disabled) { background: rgba(245, 202, 114, 0.1); }
.work-review-feature-btn.is-featured { color: var(--text-2); border-color: var(--border); }
.work-review-feature-btn .ico { width: 13px; height: 13px; }
@media (max-width: 720px) {
  .work-review-mask { padding: 0; }
  .work-review-panel {
    width: 100%; height: 100vh; border-radius: 0; border: 0;
  }
  .work-review-head { padding: 16px 16px 14px; }
  .work-review-title { font-size: 18px; }
  .work-review-head-actions { gap: 6px; }
  .work-review-content { padding: 14px 16px 24px; }
  .work-review-info-grid { grid-template-columns: 1fr; }
  .work-review-video { max-height: 42vh; }
  .work-review-actions .btn { flex: 1; min-width: 0; }
  .work-review-feature { align-items: flex-start; flex-direction: column; }
  .work-review-feature-btn { width: 100%; }
}
.script-thumb {
  width: 168px; flex: none; aspect-ratio: 8 / 5; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2); display: grid; place-items: center;
}
.script-thumb--lg { width: 240px; }
.script-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat {
  padding: 16px 18px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}
.stat-value { font-size: 27px; font-weight: 700; letter-spacing: -0.6px; margin-top: 4px; }

.spark { display: flex; align-items: flex-end; gap: 3px; height: 56px; }
.spark i { flex: 1; background: linear-gradient(180deg, var(--primary-2), rgba(124, 92, 255, 0.22)); border-radius: 3px 3px 0 0; min-height: 3px; }

/* 接口调试输出 */
.dbg {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 4px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-2);
  max-height: 260px;
  overflow: auto;
}
code {
  background: var(--surface-3);
  padding: 1px 5px;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .hero h1 { font-size: 32px; }
  .page { padding: 18px 16px 60px; }
  .hero-carousel { padding: 20px 16px 0; }
  .nav { overflow-x: auto; }
}

/* ----------------------------------------------------------------------
   画布列表页：仿「项目墙」的卡片网格
   第一张是「创建画布」，其余每张 = 缩略图 + 画布名称 + 所属团队（个人=默认项目）+ 编辑于
   ---------------------------------------------------------------------- */
.canvas-cards {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
@media (min-width: 1500px) { .canvas-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.canvas-batch-toggle { min-width: 104px; justify-content: center; }
.canvas-batch-toggle.on {
  color: #e7e0ff; border-color: rgba(167, 139, 250, 0.42);
  background: rgba(124, 92, 255, 0.15);
}
.canvas-batch-toolbar {
  display: flex; align-items: center; gap: 14px; margin: -4px 0 16px;
  min-height: 52px; padding: 8px 10px 8px 14px; border-radius: 14px;
  background: rgba(21, 21, 31, 0.92); border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.canvas-batch-select-all {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 4px;
  border: 0; background: transparent; color: var(--text-2);
  font: inherit; font-size: 13px; cursor: pointer;
}
.canvas-batch-select-all:hover { color: var(--text); }
.canvas-batch-check {
  width: 19px; height: 19px; display: grid; place-items: center; flex: none;
  color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.28); border-radius: 6px;
  background: rgba(255, 255, 255, 0.035); transition: 0.16s;
}
.canvas-batch-check.on { border-color: var(--primary); background: var(--primary); }
.canvas-batch-check svg { width: 12px; height: 12px; display: block; }
.canvas-batch-selected { color: var(--text-3); font-size: 12.5px; }
.canvas-batch-selected b { color: #e9e2ff; font-weight: 650; }
.canvas-batch-delete {
  margin-left: auto; color: #ffc0c8; border-color: rgba(251, 113, 133, 0.3);
  background: rgba(251, 113, 133, 0.09);
}
.canvas-batch-delete:hover:not(:disabled) {
  color: #fff; border-color: rgba(251, 113, 133, 0.52);
  background: rgba(201, 77, 101, 0.78);
}

.canvas-new {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  aspect-ratio: 16 / 11; border-radius: var(--radius-lg); cursor: pointer;
  font-family: inherit; font-size: 14px; color: var(--text-2);
  background: rgba(255, 255, 255, 0.02); border: 1px dashed var(--border-strong);
  transition: 0.2s;
}
.canvas-new:hover { color: var(--text); border-color: rgba(124, 92, 255, 0.6); background: var(--primary-soft); }
.canvas-new-plus {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.05);
}
.canvas-new-plus svg { width: 20px; height: 20px; }
.canvas-new:hover .canvas-new-plus { border-color: rgba(124, 92, 255, 0.7); background: rgba(124, 92, 255, 0.18); }

.canvas-card {
  position: relative; isolation: isolate;
  border-radius: var(--radius-lg); cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-soft);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.canvas-card:hover {
  transform: translateY(-4px); border-color: rgba(124, 92, 255, 0.45); box-shadow: var(--shadow-soft);
}
.canvas-card.is-menu-open { z-index: 8; border-color: rgba(124, 92, 255, 0.5); box-shadow: var(--shadow-soft); }
.canvas-card.is-batch-mode { user-select: none; }
.canvas-card.is-selected {
  border-color: rgba(167, 139, 250, 0.82);
  box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.55), 0 13px 34px rgba(48, 32, 110, 0.3);
}
.canvas-card-cover {
  position: relative; aspect-ratio: 16 / 11; overflow: hidden;
  border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
  background: linear-gradient(140deg, rgba(124, 92, 255, 0.14), rgba(6, 182, 212, 0.1));
}
.canvas-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: 0.4s; }
.canvas-card:hover .canvas-card-cover img { transform: scale(1.05); }
.canvas-card-blank { display: grid; place-items: center; width: 100%; height: 100%; font-size: 30px; color: var(--text-3); }
.canvas-card-ro {
  position: absolute; top: 9px; right: 9px; display: inline-flex; align-items: center; gap: 4px;
  width: max-content; max-width: calc(100% - 18px);
  padding: 3px 8px; border-radius: 6px; font-size: 11px;
  background: rgba(0, 0, 0, 0.62); border: 1px solid rgba(255, 255, 255, 0.18); color: #d6d6dd;
}
.canvas-card-ro svg { width: 12px; height: 12px; }
.canvas-card-select-check {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  width: 24px; height: 24px; display: grid; place-items: center;
  color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.68); border-radius: 7px;
  background: rgba(8, 8, 14, 0.68); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px); transition: 0.16s;
}
.canvas-card-select-check.on {
  border-color: var(--primary); background: var(--primary);
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.4);
}
.canvas-card-select-check svg { width: 14px; height: 14px; display: block; }
.canvas-card-body {
  padding: 11px 13px 10px; display: flex; flex-direction: column; gap: 5px;
  border-radius: 0 0 calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px);
}
.canvas-card-title { font-size: 15px; font-weight: 600; color: var(--text); }
.canvas-card-space { font-size: 13px; color: var(--text-2); }
.canvas-card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-height: 30px; }
.canvas-card-date { padding-bottom: 6px; white-space: nowrap; }
.canvas-card-actions { position: relative; flex: none; margin: -3px -4px -4px 0; }
.canvas-card-menu-btn {
  width: 30px; height: 30px; display: grid; place-items: center; padding: 0;
  border: 1px solid transparent; border-radius: 9px; background: transparent;
  color: var(--text-3); cursor: pointer; transition: 0.16s;
}
.canvas-card-menu-btn svg { width: 17px; height: 17px; display: block; }
.canvas-card:hover .canvas-card-menu-btn { color: var(--text-2); }
.canvas-card-menu-btn:hover,
.canvas-card-menu-btn.is-open {
  color: #fff; border-color: var(--border-strong); background: var(--surface-3);
}
.canvas-card-menu-btn:focus-visible {
  outline: none; border-color: rgba(124, 92, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16);
}
.canvas-card-action-menu {
  position: absolute; right: 0; bottom: calc(100% + 7px); z-index: 12;
  width: 154px; padding: 6px; border-radius: 12px;
  background: rgba(19, 19, 31, 0.98); border: 1px solid var(--border-strong);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.58), 0 4px 12px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px); transform-origin: right bottom;
}
.canvas-card-action-item {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 8px 9px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-2); font-family: inherit;
  font-size: 13px; text-align: left; cursor: pointer; transition: 0.14s;
}
.canvas-card-action-item:hover { background: var(--surface-2); color: var(--text); }
.canvas-card-action-item.is-danger { color: #f5a3ae; }
.canvas-card-action-item.is-danger:hover { color: #ffd1d6; background: rgba(251, 113, 133, 0.12); }
.canvas-card-action-icon {
  width: 24px; height: 24px; display: grid; place-items: center; flex: none;
  border-radius: 7px; color: var(--text-3); background: rgba(255, 255, 255, 0.045);
}
.canvas-card-action-icon svg { width: 14px; height: 14px; display: block; }
.canvas-card-action-item.is-danger .canvas-card-action-icon {
  color: var(--rose); background: rgba(251, 113, 133, 0.1);
}
.canvas-card-action-sep { height: 1px; margin: 4px 6px; background: var(--border); }
.canvas-menu-pop-enter-active,
.canvas-menu-pop-leave-active { transition: opacity 0.14s ease, transform 0.14s var(--ease-out); }
.canvas-menu-pop-enter-from,
.canvas-menu-pop-leave-to { opacity: 0; transform: translateY(4px) scale(0.96); }

/* 画布名称修改 / 删除确认：和全站暗色视觉统一的非原生弹窗 */
.canvas-dialog-mask { padding: 18px; }
.canvas-manage-dialog {
  position: relative; max-width: 420px; padding: 26px;
  border-radius: 22px; background:
    radial-gradient(420px 180px at 12% -20%, rgba(124, 92, 255, 0.16), transparent 68%),
    var(--bg-elevated);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.62), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
.canvas-manage-dialog.is-danger {
  background:
    radial-gradient(420px 180px at 12% -20%, rgba(251, 113, 133, 0.14), transparent 68%),
    var(--bg-elevated);
}
.canvas-dialog-close {
  position: absolute; top: 17px; right: 17px; width: 30px; height: 30px;
  display: grid; place-items: center; padding: 0; border: 1px solid transparent;
  border-radius: 9px; background: transparent; color: var(--text-3); cursor: pointer;
  transition: 0.15s;
}
.canvas-dialog-close svg { width: 15px; height: 15px; display: block; }
.canvas-dialog-close:hover { color: var(--text); border-color: var(--border); background: var(--surface-2); }
.canvas-dialog-icon {
  width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 16px;
  border: 1px solid rgba(124, 92, 255, 0.26); border-radius: 15px;
  color: #d7ccff; background: linear-gradient(145deg, rgba(124, 92, 255, 0.24), rgba(34, 211, 238, 0.08));
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.14);
}
.canvas-dialog-icon svg { width: 21px; height: 21px; display: block; }
.canvas-manage-dialog.is-danger .canvas-dialog-icon {
  color: #ffc2c9; border-color: rgba(251, 113, 133, 0.25);
  background: linear-gradient(145deg, rgba(251, 113, 133, 0.2), rgba(124, 92, 255, 0.07));
  box-shadow: 0 8px 24px rgba(251, 113, 133, 0.1);
}
.canvas-dialog-eyebrow {
  margin-bottom: 4px; color: var(--primary-2); font-size: 11.5px;
  font-weight: 650; letter-spacing: 0.08em;
}
.canvas-manage-dialog.is-danger .canvas-dialog-eyebrow { color: #fda4af; }
.canvas-dialog-title { margin: 0; color: var(--text); font-size: 20px; line-height: 1.35; font-weight: 650; }
.canvas-dialog-desc {
  margin: 9px 0 20px; color: var(--text-2); font-size: 13px; line-height: 1.7;
}
.canvas-dialog-name {
  display: inline-block; max-width: 100%; margin-right: 2px; overflow: hidden;
  color: var(--text); font-weight: 600; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: bottom;
}
.canvas-dialog-label { display: block; margin-bottom: 7px; color: var(--text-2); font-size: 12.5px; font-weight: 550; }
.canvas-dialog-input { height: 44px; padding-inline: 13px; border-radius: 11px; font-size: 14px; }
.canvas-dialog-counter {
  display: flex; justify-content: space-between; margin-top: 7px;
  color: var(--text-3); font-size: 11px;
}
.canvas-dialog-warning {
  display: flex; align-items: flex-start; gap: 8px; margin: -2px 0 20px;
  padding: 10px 12px; border: 1px solid rgba(251, 113, 133, 0.16);
  border-radius: 10px; color: #d9a4ac; background: rgba(251, 113, 133, 0.055);
  font-size: 12px; line-height: 1.55;
}
.canvas-dialog-warning svg { width: 15px; height: 15px; display: block; flex: none; margin-top: 1px; }
.canvas-dialog-actions { display: grid; grid-template-columns: 0.9fr 1.2fr; gap: 9px; margin-top: 22px; }
.canvas-dialog-actions .btn { height: 40px; border-radius: 10px; font-size: 13.5px; }
.canvas-dialog-cancel { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.045); }
.canvas-dialog-submit { box-shadow: 0 7px 22px rgba(124, 92, 255, 0.28); }
.canvas-dialog-delete {
  border: 1px solid rgba(251, 113, 133, 0.38); color: #fff;
  background: linear-gradient(135deg, #c94d65, #a93851);
  box-shadow: 0 7px 22px rgba(201, 77, 101, 0.22);
}
.canvas-dialog-delete:hover:not(:disabled) {
  border-color: rgba(251, 113, 133, 0.58); background: linear-gradient(135deg, #d75a72, #b6435b);
}
@media (max-width: 520px) {
  .canvas-batch-toolbar { flex-wrap: wrap; gap: 8px 12px; }
  .canvas-batch-delete { margin-left: 0; width: 100%; justify-content: center; }
  .canvas-manage-dialog { padding: 23px 20px 20px; border-radius: 19px; }
  .canvas-dialog-title { font-size: 18px; }
  .canvas-dialog-actions { grid-template-columns: 1fr 1.15fr; }
}
@media (prefers-reduced-motion: reduce) {
  .canvas-card,
  .canvas-card-action-menu,
  .canvas-menu-pop-enter-active,
  .canvas-menu-pop-leave-active { transition: none; }
}

/* 剧本创作台：除页面主标题外，统一提高 2px 可读性 */
.script-workspace { font-size: 16px; }
.script-workspace-brand strong { font-size: 16px; }
.script-workspace-brand span:not(.script-workspace-logo) { font-size: 13px; }
.script-workspace-progress-mini,
.script-save-state { font-size: 12.5px; }
.script-workspace-rail-title { font-size: 11.5px; }
.script-rail-step strong { font-size: 14px; }
.script-rail-step small { font-size: 11.5px; }
.script-rail-number { font-size: 11.5px; }
.script-workspace-rail-note strong { font-size: 12.5px; }
.script-workspace-rail-note span { font-size: 11.5px; }
.script-workspace-loading strong { font-size: 16px; }
.script-workspace-loading p { font-size: 13px; }
.script-stage-kicker { font-size: 13.5px; }
.script-stage-heading p { font-size: 16.5px; }
.script-confirm-badge { font-size: 14.5px; }
.script-stage-error strong { font-size: 13.5px; }
.script-stage-error p { font-size: 12.5px; }
.script-stage-lead { font-size: 16px; }
.script-seed-field > span { font-size: 13px; }
.script-seed-field .textarea { font-size: 17px; }
.script-seed-field > small { font-size: 11.5px; }
.script-seed-option > span { font-size: 12px; }
.script-seed-option .input { font-size: 13.5px; }
.script-fixed-spec { font-size: 13.5px; }
.script-resume-card strong { font-size: 12.5px; }
.script-resume-card p { font-size: 12px; }
.script-stage-primary > span { font-size: 12.5px; }
.script-generation-wait > strong { font-size: 19px; }
.script-generation-wait > p { font-size: 13.5px; }
.script-wait-elapsed { font-size: 12.5px; }
.script-wait-steps span { font-size: 11.5px; }
.script-wait-checklist > span { font-size: 12.5px; }
.script-batch-progress-head strong { font-size: 13.5px; }
.script-batch-progress-head > span { font-size: 12px; }
.script-batch-progress-ranges span { font-size: 11.5px; }
.script-paper-title { font-size: 16px; }
.script-rule-list dt { font-size: 14px; }
.script-rule-list dd { font-size: 15.5px; }
.script-rule-list input,
.script-rule-list select { font-size: 15.5px; }
.script-rule-blocks article > span { font-size: 13.5px; }
.script-rule-blocks .textarea { font-size: 15px; }
.script-rule-columns b { font-size: 14.5px; }
.script-rule-columns span { font-size: 13.5px; }
.script-confirm-copy strong { font-size: 14.5px; }
.script-confirm-copy p { font-size: 12.5px; }
.script-confirm-panel > .textarea { font-size: 14.5px; }
.script-confirm-balance { font-size: 11.5px; }
.script-story-genre { font-size: 12px; }
.script-story-hero p { font-size: 15px; }
.script-story-summary > p { font-size: 14px; }
.script-story-core > div { font-size: 12.5px; }
.script-story-core span { font-size: 11px; }
.script-world-card dt { font-size: 11px; }
.script-world-card dd { font-size: 12.5px; }
.script-world-keywords span { font-size: 11px; }
.script-section-title > span { font-size: 14px; }
.script-section-title small { font-size: 11.5px; }
.script-character-head strong { font-size: 13.5px; }
.script-character-head small { font-size: 11px; }
.script-character-card > p { font-size: 12px; }
.script-character-card dl > div { font-size: 11.2px; }
.script-episode-summary strong { font-size: 22px; }
.script-episode-summary span { font-size: 11px; }
.script-episode-number { font-size: 14px; }
.script-episode-title-input { font-size: 13.5px; }
.script-episode-fields .textarea { font-size: 14px; }
.script-hook-input > span { font-size: 10.5px; }
.script-hook-input .input { font-size: 11.5px; }
.script-review-hero > div:last-child > span { font-size: 11.5px; }
.script-review-hero p { font-size: 12.5px; }
.script-review-score span { font-size: 12px; }
.script-review-dimensions strong { font-size: 12.5px; }
.script-review-dimensions span { font-size: 14px; }
.script-review-dimensions p { font-size: 11px; }
.script-review-columns p { font-size: 12px; }
.script-review-issues strong { font-size: 12.5px; }
.script-review-issues strong small { font-size: 11px; }
.script-review-issues p { font-size: 12px; }
.script-review-issues article > div > div { font-size: 11.5px; }
.script-review-error p { font-size: 13px; }
.script-output-stats span { font-size: 11px; }
.script-output-notice strong { font-size: 12.5px; }
.script-output-notice p { font-size: 11.5px; }
.script-output-story .script-paper-card > p { font-size: 12.5px; }
.script-output-episode summary strong { font-size: 12.5px; }
.script-output-episode summary small { font-size: 11px; }
.script-output-episode summary > span { font-size: 11.5px; }
.script-output-summary { font-size: 12px; }
.script-output-episode-body pre { font-size: 12.5px; }
.script-workspace .btn { font-size: 15px; }
.script-workspace .tag { font-size: 13.5px; }
