/* ================= 基础 ================= */
* { margin:0; padding:0; box-sizing:border-box; }
:root{
  --bg:#111113; --bg2:#161618; --panel:#1c1c1f; --panel2:#222226;
  --line:#2a2a2e; --line2:#3a3a40;
  --text:#e8e6e3; --text2:#9a9890; --text3:#5c5a55;
  --accent:#d4a853; --accent2:#e8c47a;
  --ok:#4ade80; --warn:#fbbf24; --err:#f87171;
  --text-node:#8b9cf7; --image-node:#e07bc4; --video-node:#f0954a; --audio-node:#4ade80;
  --script-node:#f0c95c; --stage-node:#56c8d8; --export-node:#b98ae0; --check-node:#f0879e;
  --radius:8px; --shadow:0 4px 16px rgba(0,0,0,.35);
  --mono:"Consolas","JetBrains Mono",monospace;
}
html,body{ height:100%; overflow:hidden; background:var(--bg); color:var(--text);
  font:13px/1.5 "PingFang SC","Microsoft YaHei",system-ui,sans-serif; user-select:none; }
button{ font-family:inherit; }
::-webkit-scrollbar{ width:7px; height:7px; }
::-webkit-scrollbar-thumb{ background:#333338; border-radius:4px; }
::-webkit-scrollbar-track{ background:transparent; }

#app{ display:flex; flex-direction:column; height:100vh; }
kbd{ background:#28282c; border:1px solid #3a3a40; border-radius:3px; padding:0 5px; font-size:11px; color:var(--text2); }
/* 线条图标统一对齐 */
.lc-ic{ display:inline-block; vertical-align:-3px; flex:none; }

/* ================= 顶栏 ================= */
#topbar{ display:flex; align-items:center; gap:12px; height:46px; padding:0 14px;
  background:var(--bg2); border-bottom:1px solid var(--line); flex:none; z-index:50; }
.brand{ display:flex; align-items:center; gap:8px; }
.logo{ font-size:20px; font-weight:500; line-height:1; cursor:pointer; display:flex; align-items:center;
  transition:filter .15s, transform .15s; }
.logo img{ width:26px; height:26px; border-radius:7px; display:block;
  box-shadow:0 0 0 1px rgba(47,107,255,.35), 0 2px 10px rgba(47,107,255,.25);
  pointer-events:none; -webkit-user-drag:none; user-drag:none; }
.logo:hover{ opacity:.9; transform:scale(1.1); }
.project-name{ background:transparent; border:1px solid transparent; color:var(--text); font-size:13px;
  padding:4px 8px; border-radius:5px; width:220px; outline:none; }
.project-name:hover{ border-color:var(--line2); }
.project-name:focus{ border-color:var(--accent); background:#1e1e22; }
.save-status{ font-size:11px; color:var(--text3); }
.save-status.dirty{ color:var(--warn); }
.menu{ display:flex; gap:1px; flex:1; }
.menu-item{ position:relative; padding:5px 10px; border-radius:5px; cursor:pointer; color:var(--text2); font-size:12.5px; }
.menu-item:hover{ background:#26262a; color:var(--text); }
.menu-item .dropdown{ display:none; position:absolute; top:110%; left:0; min-width:220px; background:var(--panel2);
  border:1px solid var(--line2); border-radius:7px; padding:4px; box-shadow:var(--shadow); z-index:200; }
.menu-item.open .dropdown{ display:block; }
.dropdown button{ display:flex; width:100%; align-items:center; justify-content:space-between; gap:8px;
  background:transparent; border:none; color:var(--text2); padding:6px 10px; border-radius:5px; cursor:pointer; font-size:12.5px; text-align:left; }
.dropdown button:hover{ background:#2e2e33; color:var(--text); }
.dropdown hr{ border:none; border-top:1px solid var(--line); margin:4px 4px; }
.view-toggle-row{ display:flex; align-items:center; justify-content:space-between; padding:6px 10px; font-size:12.5px; color:var(--text2); }
.top-actions{ display:flex; gap:6px; }
.btn{ background:#26262a; border:1px solid var(--line2); color:var(--text); padding:6px 13px; border-radius:6px; cursor:pointer; font-size:12.5px; transition:.12s; }
.btn:hover{ background:#2e2e33; border-color:#4a4a50; }
.btn.primary{ background:var(--accent); border-color:transparent; color:#111; font-weight:600; }
.btn.primary:hover{ background:var(--accent2); }
.btn.accent{ border-color:#4a4a50; }

/* ================= 工作区 ================= */
#workspace{ display:flex; flex:1; overflow:hidden; position:relative; }
#left-panel{ flex:none; display:flex; flex-direction:column; width:232px;
  background:linear-gradient(180deg,#101728 0%,#0b1120 100%); border-right:1px solid rgba(88,116,220,.18); }
.panel-tabs{ display:flex; gap:4px; padding:8px 10px; border-bottom:1px solid rgba(88,116,220,.14);
  background:rgba(47,107,255,.04); flex:none; }
.ptab{ flex:1; text-align:center; padding:7px 0; font-size:12px; letter-spacing:.5px; color:var(--text3);
  cursor:pointer; border-radius:9px; border:1px solid transparent; transition:all .18s ease; user-select:none; }
.ptab:hover{ color:var(--text2); background:rgba(47,107,255,.08); }
.ptab.active{ color:#fff; font-weight:600; background:linear-gradient(145deg,#3b76ff,#0e7fc0);
  box-shadow:0 3px 12px rgba(47,107,255,.35), inset 0 1px 0 rgba(255,255,255,.2); }
.panel-body{ flex:1; overflow-y:auto; }
.tab-body{ display:none; }
.tab-body.active{ display:block; animation:tabIn .22s ease; }
@keyframes tabIn{ from{ opacity:0; transform:translateY(5px); } to{ opacity:1; transform:none; } }

/* 节点库 · 深蓝玻璃风 */
.lib-section{ padding:14px 14px 6px; font-size:10.5px; color:#7f96c9; letter-spacing:1.5px; text-transform:uppercase;
  display:flex; align-items:center; gap:7px; }
.lib-section::before{ content:''; width:3px; height:11px; border-radius:2px;
  background:linear-gradient(180deg,#3b76ff,#22d3ee); box-shadow:0 0 6px rgba(47,107,255,.6); }
.lib-grid{ display:grid; grid-template-columns:1fr 1fr; gap:7px; padding:3px 12px; }
.lib-card{ position:relative; background:linear-gradient(165deg,rgba(30,44,82,.75),rgba(18,28,56,.75));
  border:1px solid rgba(88,116,220,.2); border-radius:12px; padding:10px 8px 9px; text-align:center;
  cursor:grab; transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease; overflow:hidden; }
.lib-card::after{ content:''; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(70% 55% at 50% 0%,rgba(59,118,255,.12),transparent 70%); }
.lib-card:hover{ transform:translateY(-2px); border-color:rgba(88,140,255,.65);
  box-shadow:0 6px 18px rgba(47,107,255,.3); background:linear-gradient(165deg,rgba(36,54,102,.85),rgba(20,32,66,.85)); }
.lib-card:active{ cursor:grabbing; transform:translateY(0) scale(.97); }
.lib-card .ic{ width:34px; height:34px; margin:0 auto 6px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(145deg,rgba(59,118,255,.28),rgba(14,127,192,.22));
  border:1px solid rgba(88,140,255,.3); color:#9ec4ff; }
.lib-card .ic svg, .lib-card .ic i{ width:18px; height:18px; }
.lib-card .nm{ font-size:11.5px; color:#c9d6f5; letter-spacing:.3px; }
.lib-tip{ margin:14px 12px; padding:10px 12px; font-size:11px; color:#7f96c9; line-height:1.7;
  background:rgba(47,107,255,.07); border:1px dashed rgba(88,116,220,.3); border-radius:11px; }

/* 分镜大纲 · 深蓝玻璃风 */
.outline-list{ padding:10px; }
.outline-empty{ color:#66799f; font-size:12px; text-align:center; padding:32px 14px; line-height:2;
  background:rgba(47,107,255,.04); border:1px dashed rgba(88,116,220,.25); border-radius:12px; margin:6px; }
.outline-item{ position:relative; background:linear-gradient(165deg,rgba(30,44,82,.7),rgba(18,28,56,.7));
  border:1px solid rgba(88,116,220,.2); border-radius:12px; padding:9px 11px; margin-bottom:8px; cursor:pointer;
  transition:transform .15s ease, border-color .15s ease, box-shadow .15s ease; overflow:hidden; }
.outline-item::before{ content:''; position:absolute; left:0; top:0; bottom:0; width:3px;
  background:linear-gradient(180deg,#3b76ff,#22d3ee); opacity:0; transition:opacity .15s ease; }
.outline-item:hover{ transform:translateX(2px); border-color:rgba(88,140,255,.6); box-shadow:0 5px 16px rgba(47,107,255,.25); }
.outline-item:hover::before{ opacity:1; }
.outline-item .oi-head{ display:flex; gap:6px; align-items:center; font-size:11.5px; font-weight:600; color:#8fb8ff; margin-bottom:3px; }
.outline-item .oi-txt{ font-size:11.5px; color:#aebbdb; line-height:1.6; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.outline-item .oi-tags{ margin-top:5px; display:flex; gap:4px; flex-wrap:wrap; }
.outline-item .oi-tags span{ font-size:10px; color:#8fa5d4; background:rgba(47,107,255,.14);
  border:1px solid rgba(88,116,220,.22); padding:1px 7px; border-radius:99px; }
.outline-head{ padding:10px 13px; font-size:11.5px; color:#8fa5d4; border-bottom:1px solid rgba(88,116,220,.14);
  background:rgba(47,107,255,.05); letter-spacing:.3px; }

/* ================= 画布 ================= */
#canvas-wrap{ flex:1; position:relative; overflow:hidden; background:#000; touch-action:none; overscroll-behavior:none; }
.canvas{ position:absolute; inset:0; cursor:grab; touch-action:none; overscroll-behavior:none; }
.canvas.panning{ cursor:grabbing; }
.world{ position:absolute; top:0; left:0; width:0; height:0; transform-origin:0 0; z-index:1;
  /* 不加 will-change：world 含 N 节点 + 200000×200000 SVG，加 will-change 会形成过大合成层，
     画布操作（平移/缩放）后 GPU 重新光栅化整个合成层需要几帧，导致后续拖动节点前几次卡顿。
     视口剔除已保证 world 内 DOM 元素少（只视口内 20-30 个节点），平移/缩放重绘成本低 */
}
/* SVG 铺在 (-100000,-100000) 起 200000×200000：世界坐标全部落在视口内，绘制万无一失 */
#edges-svg{ position:absolute; top:-100000px; left:-100000px; width:200000px; height:200000px; pointer-events:none; z-index:3; }
#nodes-layer{ position:absolute; top:0; left:0; width:0; height:0; z-index:5; }
#groups-layer{ position:absolute; top:0; left:0; width:0; height:0; z-index:1; }
.grid-bg{ position:absolute; inset:-800px; pointer-events:none; z-index:0; will-change:transform;
  /* 点阵网格：跟随视口平移用 transform（GPU 合成，零重绘）；
     inset 扩出 800px + 按点阵周期(280*z)取模偏移，保证任何缩放级下平移都不露白边 */  }

/* 选区框 */
.selection-rect{ position:absolute; background:rgba(212,168,83,.10); border:1px solid var(--accent);
  border-radius:3px; pointer-events:none; z-index:60; }

/* ================= 节点 ================= */
.node{ position:absolute; min-width:240px; background:#1e1e1e; border:1px solid #3e3e44;
  border-radius:12px; z-index:10; transition:border-color .12s;
  contain:layout style;          /* 隔离节点内部布局/样式计算，N 大时减少重排范围 */
}
.node:hover{ border-color:#4e4e54; }
.node.selected{ border-color:#7aa2f7; box-shadow:0 0 0 2px #7aa2f7; }
.node.running{ border-color:var(--accent2); }
.node.running .n-head{ animation:pulse 1.2s infinite; }
@keyframes pulse{ 0%,100%{ border-bottom:2px solid transparent; } 50%{ border-bottom:2px solid var(--accent2); } }
.node.error{ border-color:var(--err); }
.node.collapsed .n-body{ display:none; }
.node.collapsed .n-foot{ display:none; }
.node.collapsed .n-sub{ display:none; }
/* 图片/视频节点：控件区默认收起，点击提示词输入框后展开 */
.node.ctrl-collapsed .n-sub{ display:none; }
/* 折叠态底部摘要栏：仅 ctrl-collapsed 时显示 */
.node.ctrl-collapsed .n-cfoot{ display:flex; }
.node:not(.ctrl-collapsed) .n-cfoot{ display:none; }
.n-cfoot{ display:none; align-items:center; justify-content:space-between; gap:6px;
  padding:6px 9px; border-top:1px solid var(--line); cursor:pointer; transition:background .12s; }
.n-cfoot:hover{ background:#1e1e22; }
.n-cfoot-info{ font-size:10px; color:var(--text3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.n-cfoot-hint{ font-size:9px; color:var(--text3); opacity:.5; flex:none; }
/* 折叠态预览区更大、更突出 */
.node.ctrl-collapsed .n-preview{ min-height:160px; }
.node.ctrl-collapsed .n-body{ padding-bottom:0; }

/* 预览区“尝试：”功能选项 */
.n-try{ position:absolute; bottom:12px; left:12px; display:flex; flex-direction:column; align-items:flex-start; gap:4px; z-index:2; }
.n-try-label{ font-size:10px; color:#7a7a7a; }
.n-try-btns{ display:flex; flex-direction:column; gap:4px; }
.n-try-opt{ display:inline-flex; align-items:center; gap:5px; background:#2a2a2a; border:1px solid #3a3a3a;
  color:#e6e6e6; font-size:11px; font-weight:500; padding:3px 9px; border-radius:5px; cursor:pointer; transition:.12s; white-space:nowrap; }
.n-try-opt:hover{ border-color:#6a6a6a; color:#fff; background:#323232; }
.n-try-opt .lc-ic{ vertical-align:-2px; }
/* 第二盒子：提示词+控件的独立大盒子（与上方节点盒分离，中间留缝隙） */
.n-sub{ margin-top:14px; background:#1d1d20; border:1px solid #3e3e46;
  border-radius:10px; padding:8px 9px; display:flex; flex-direction:column; gap:7px;
  box-shadow:0 3px 14px rgba(0,0,0,.4); }
.n-sub .n-prompt{ margin-top:0; }
.n-sub .n-ctrl{ padding:0; }
.n-sub .n-foot{ border-top:1px solid var(--line); }
/* 展开态：第一盒子底部内边距收窄，两盒缝隙由 .n-sub 的 margin-top 决定 */
.node:not(.ctrl-collapsed) .n-body{ padding-bottom:0; }

.n-head{ display:flex; align-items:center; gap:6px; padding:6px 0; cursor:move;
  background:transparent; position:absolute; bottom:100%; left:0; margin-bottom:4px; }
.n-tc{ display:none; }
.n-title{ flex:1; font-size:18px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:move;
  color:#9a9a9a; display:inline-flex; align-items:center; gap:5px; }
.n-title::before{ content:''; width:18px; height:18px; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9a9a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='12' rx='2'/%3E%3Ccircle cx='8.5' cy='10.5' r='1.5'/%3E%3Cpath d='M21 14.5l-5-5-4 4-3-3-6 6.5'/%3E%3C/svg%3E") center/contain no-repeat; }
.n-t-txt{ cursor:text; }
.n-t-txt:hover{ text-decoration:underline; text-decoration-style:dotted; text-underline-offset:2px; }
.n-status{ font-size:10px; color:var(--text3); display:none; }
.n-run{ display:none; }
.n-run.busy{ display:none; }
@keyframes spin{ to{ transform:rotate(360deg); } }
.n-fold,.n-del{ display:none; }

.n-body{ padding:10px; display:flex; flex-direction:column; }
.n-body-fill{ padding:0; }   /* 图片/视频节点：预览图贴满节点，无四周留白 */
.n-body-fill .n-preview{ border-radius:20px; }
.node-media{ border-radius:20px; }   /* 图片/视频节点：外框 20px 圆角；截图由预览区自身 overflow 处理，避免裁掉外突端口 */
/* 分栏式节点（文本/音频/脚本/字幕）：与媒体节点同构——外框 20px 圆角，显示框贴满、固定 16:9（比例由 applyPaneAspect 设置） */
.node-pane{ border-radius:20px; }
.node-pane .n-preview{ min-height:0; border-radius:0; }
.node-pane .n-preview .ph{ gap:8px; }
.node-pane .n-preview img,
.node-pane .n-preview video{ width:100%; height:100%; object-fit:cover; background:#000; }
/* 文本节点显示框：内容居中展示，超长省略 */
.pane-text{ background:#141416; }
.pane-text-body{ max-width:92%; max-height:86%; overflow:hidden; font-size:13px; line-height:1.7; color:var(--text2);
  white-space:pre-wrap; word-break:break-word; display:-webkit-box; -webkit-line-clamp:6; -webkit-box-orient:vertical; }
/* 音频节点显示框：波形居中 */
.pane-audio{ background:#141416; }
.pane-audio .waveform{ width:82%; height:auto; flex:1; }
/* 脚本节点显示框：分镜列表预览 */
.pane-script{ background:#141416; align-items:flex-start; justify-content:flex-start;
  padding:10px 12px; box-sizing:border-box; }
.node-pane.pane-script .shot-preview{ width:100%; height:100%; overflow:hidden; display:flex; flex-direction:column; gap:6px; justify-content:center; }
.shot-line{ font-size:11.5px; line-height:1.5; color:var(--text2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.shot-line b{ color:var(--accent); font-weight:600; margin-right:3px; }
.shot-line span{ color:var(--text3); margin-left:4px; }
.shot-more{ font-size:10px; color:var(--text3); margin-top:2px; }
/* 字幕节点显示框：黑底白字 */
.pane-subtitle{ background:#000; }
/* 节点内提示词输入框：独立块，与上方预览区留出缝隙 */
.n-prompt{ width:100%; margin-top:8px; box-sizing:border-box; resize:vertical; min-height:68px; max-height:150px;
  background:#141416; border:1px solid var(--line); border-radius:5px; color:var(--text2);
  font-size:12px; line-height:1.6; font-family:inherit; padding:7px 9px; outline:none; cursor:text; }
.n-prompt:focus{ border-color:var(--accent); background:#18181a; }
.n-prompt::placeholder{ color:var(--text3); font-size:11px; }
.n-preview{ width:100%; min-height:180px; border-radius:8px; background:transparent; border:none;
  display:flex; align-items:center; justify-content:center; overflow:hidden; position:relative; cursor:pointer; }
.n-preview img{ width:100%; display:block; object-fit:cover; background:#000; }
.media-missing{ opacity:.25; filter:grayscale(1); }
.n-preview .ph{ color:var(--text3); font-size:12px; padding:0; text-align:center; line-height:1.7;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; }
.n-preview .ph > svg{ display:block; margin:0 auto; }
.ph-scene{ color:#5a5a5a; display:block; }
.ph-txt{ color:var(--text2); font-size:12.5px; }
.n-desc{ font-size:11px; color:var(--text2); margin-top:6px; line-height:1.6;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; white-space:pre-wrap; }
.n-foot{ display:flex; gap:4px; padding:7px 9px; border-top:1px solid var(--line); flex-wrap:wrap; }
.n-foot:empty{ display:none; }
.n-chip{ font-size:10px; color:var(--text2); background:#26262a; border:1px solid var(--line2);
  padding:2px 7px; border-radius:8px; }
.n-chip.hot{ color:var(--accent2); border-color:#5a4a2a; }

/* ===== 节点内嵌控件区（替代右侧属性面板） ===== */
.n-ctrl{ display:flex; flex-direction:column; gap:4px; padding:7px 8px 2px; }
.nc-row{ display:flex; gap:4px; width:100%; }
.nc-row .n-field{ flex:1; min-width:0; }
.nc-dual .n-field{ flex:1; }
/* 时长滑块容器：range 占主，数字标签固定宽度 */
.nc-dur{ display:flex; align-items:center; gap:4px; flex:1; min-width:0; }
.nc-dur-range{ flex:1; min-width:0; height:18px; accent-color:var(--accent); cursor:pointer; }
.nc-dur-val{ flex:0 0 auto; min-width:26px; text-align:right; font-size:10px; color:var(--text2);
  background:#1a1a1e; border:1px solid var(--line2); border-radius:4px; padding:1px 4px; }
.nc-tri .n-field{ flex:1; }
.n-ctrl select.n-field{
  background:#1a1a1e; border:1px solid var(--line2); color:var(--text2);
  border-radius:4px; padding:1px 3px; font-size:10px; cursor:pointer; appearance:auto; }
.n-ctrl select.n-field:hover{ border-color:#5a5a60; }
.n-ctrl input[type="text"].n-field{
  background:#1a1a1e; border:1px solid var(--line2); color:var(--text2);
  border-radius:4px; padding:2px 6px; font-size:10px; }
.n-ctrl input[type="range"].n-field{ accent-color:var(--accent); height:24px; }
.n-ctrl textarea.n-field{
  background:#1a1a1e; border:1px solid var(--line2); color:var(--text2);
  border-radius:4px; padding:4px 6px; font-size:10px; line-height:1.55; resize:vertical; }
.n-ctrl .n-field:focus{ border-color:var(--accent); outline:none; }
/* 模式 chips */
.nc-chips{ display:flex; flex-wrap:wrap; gap:3px; }
.nc-chip{ font-size:10px; color:var(--text3); background:#1e1e22; border:1px solid var(--line2);
  padding:2px 7px; border-radius:6px; cursor:pointer; user-select:none; transition:.1s; }
.nc-chip:hover{ color:var(--text); border-color:#5a5a60; }
.nc-chip.on{ color:#111; background:var(--accent); border-color:transparent; font-weight:600; }
/* 按钮类 */
.nc-btn{ font-size:10px; color:var(--accent); background:rgba(212,168,83,.10);
  border:1px solid #5a4a2a; border-radius:4px; padding:2px 7px; cursor:pointer; transition:.12s;
  white-space:nowrap; }
.nc-btn:hover{ background:rgba(212,168,83,.20); }
.nc-btn.primary{ background:var(--accent); color:#111; border:none; font-weight:600; }
/* ⛶ 放大查看按钮（预览区左上角，悬停显示） */
.n-zoom{ position:absolute; top:5px; left:5px; width:24px; height:24px; border-radius:5px; z-index:3;
  background:rgba(14,14,16,.80); border:1px solid var(--line2); color:var(--text2); font-size:12px;
  cursor:pointer; opacity:0; transition:.12s; display:flex; align-items:center; justify-content:center; }
.n-preview:hover .n-zoom{ opacity:1; }
.n-zoom:hover{ color:#fff; border-color:var(--accent); }
/* 视频时长角标（预览区右下角） */
.dur-badge{ position:absolute; right:6px; bottom:6px; font-size:10px; color:#fff;
  background:rgba(14,14,16,.82); border:1px solid rgba(255,255,255,.16);
  padding:1px 6px; border-radius:4px; z-index:3; pointer-events:none; }
/* 灯箱：全屏居中放大查看 */
#lightbox{ position:fixed; inset:0; z-index:9999; background:rgba(8,8,10,.92);
  display:flex; align-items:center; justify-content:center; cursor:zoom-out; }
#lightbox img{ max-width:92vw; max-height:92vh; border-radius:6px; box-shadow:0 16px 60px rgba(0,0,0,.5); }
#lightbox video{ max-width:92vw; max-height:92vh; border-radius:6px; box-shadow:0 16px 60px rgba(0,0,0,.5); background:#000; }
/* 提示词框右上角 ⛶ 放大编辑按钮 */
.n-prompt-wrap{ position:relative; width:100%; }
.n-prompt-zoom{ position:absolute; top:4px; right:4px; width:20px; height:20px; border-radius:5px;
  background:rgba(14,14,16,.80); border:1px solid var(--line2); color:var(--text3); font-size:11px;
  cursor:pointer; opacity:0; transition:.12s; display:flex; align-items:center; justify-content:center; z-index:2; }
.n-prompt-wrap:hover .n-prompt-zoom{ opacity:1; }
.n-prompt-zoom:hover{ color:#fff; border-color:var(--accent); }
/* 提示词放大编辑器（居中大窗） */
#prompt-editor{ position:fixed; inset:0; z-index:9999; background:rgba(8,8,10,.82);
  display:flex; align-items:center; justify-content:center; }
#prompt-editor .pe-panel{ width:min(740px,86vw); height:min(500px,80vh); background:var(--panel2);
  border:1px solid var(--line2); border-radius:10px; display:flex; flex-direction:column; overflow:hidden;
  box-shadow:0 20px 70px rgba(0,0,0,.45); }
.pe-head{ display:flex; justify-content:space-between; align-items:center; padding:11px 15px;
  font-size:13px; font-weight:600; color:var(--text); border-bottom:1px solid var(--line); }
.pe-count{ font-size:11px; color:var(--text3); font-weight:400; }
.pe-ta{ flex:1; border:none; outline:none; resize:none; background:transparent;
  color:var(--text2); font-size:13px; line-height:1.8; padding:13px 15px; font-family:inherit; }
.pe-ta::placeholder{ color:var(--text3); }
.pe-foot{ display:flex; justify-content:space-between; align-items:center; padding:9px 15px;
  border-top:1px solid var(--line); }
.pe-tip{ font-size:11px; color:var(--text3); }
.pe-done{ font-size:12px; color:#111; background:var(--accent);
  border:none; border-radius:6px; padding:6px 16px; cursor:pointer; font-weight:600; }
.pe-done:hover{ background:var(--accent2); }
.nc-nomodel{ font-size:10px; color:var(--warn); background:rgba(251,191,36,.06);
  border:1px dashed #6a5a2a; border-radius:4px; padding:3px 7px; cursor:pointer; }
.nc-nomodel:hover{ background:rgba(251,191,36,.12); border-style:solid; }
/* 高级参数折叠 */
.nc-adv-tg{ align-self:flex-start; background:transparent; border:none; color:var(--text3);
  font-size:10px; cursor:pointer; padding:2px 0; }
.nc-adv-tg:hover{ color:var(--accent2); }
.nc-adv{ display:flex; flex-direction:column; gap:5px; padding-top:4px;
  border-top:1px dashed var(--line2); width:100%; }
/* 图片节点 · 模型行（模型+画幅一行，画幅下拉加宽显示完整比例名） */
.nc-model-row select.n-field:first-child{ flex:1.35; min-width:0; }
.nc-model-row select.n-field:last-child{ flex:1.15; min-width:112px; }
/* 预设按钮（图片节点模式入口） */
.nc-btn.preset{ flex:1; text-align:center; }
/* 预设弹出菜单（挂在 body 上，fixed 定位） */
.nc-preset-pop{ position:fixed; z-index:9999; background:#222226; border:1px solid var(--line2);
  border-radius:8px; padding:4px; display:flex; flex-direction:column; gap:2px; min-width:128px;
  box-shadow:0 8px 24px rgba(0,0,0,.45); animation:ncPop .1s ease; }
@keyframes ncPop{ from{ opacity:0; transform:translateY(-3px); } to{ opacity:1; transform:none; } }
.nc-pm-item{ font-size:12px; color:var(--text2); padding:5px 9px; border-radius:5px; cursor:pointer;
  white-space:nowrap; transition:.08s; }
.nc-pm-item:hover{ background:rgba(212,168,83,.12); color:#fff; }
.nc-pm-item.on{ color:#111; background:var(--accent); font-weight:600; }
.nc-pm-sub{ display:flex; gap:5px; padding:4px 8px 3px; margin-top:3px;
  border-top:1px dashed var(--line2); align-items:center; }
.nc-pm-sub::before{ content:'宫格'; font-size:10px; color:var(--text3); }
/* 节点正文 textarea（文本/脚本节点） */
.n-bodyta{ width:100%; background:#18181a; border:1px solid var(--line2); color:var(--text2);
  border-radius:6px; padding:6px 8px; font-size:12px; line-height:1.7; resize:vertical; }
.n-bodyta:focus{ border-color:var(--accent); outline:none; }

/* 节点内本地上传：预览区右上角迷你按钮组 */
.n-preview{ position:relative; }
.n-progress{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:24px; font-weight:600; color:#fff; background:rgba(0,0,0,.5); border-radius:inherit; pointer-events:none; z-index:5; letter-spacing:1px; }
/* 报错信息条：上游报什么错就原样显示在节点显示框正中间（图片/视频节点通用） */
.n-errbox{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:calc(100% - 12px); max-height:80%; z-index:6; padding:8px 10px; border:1px solid rgba(255,80,80,.55); border-radius:6px; background:rgba(42,10,12,.92); color:#ff9b9b; font-size:11px; line-height:1.55; word-break:break-all; white-space:pre-wrap; overflow:auto; text-align:center; }
/* 视频超清：底部紫色渐变横向进度条 */
.n-progress-track{ position:absolute; left:12px; right:12px; bottom:10px; height:6px; border-radius:99px; background:rgba(255,255,255,.16); overflow:hidden; z-index:6; pointer-events:none; }
.n-progress-fill{ display:block; height:100%; width:0%; border-radius:99px; background:linear-gradient(90deg,#8b5cf6,#6366f1); transition:width .35s ease; }
.n-up-cnr{ position:absolute; top:5px; right:5px; display:flex; gap:4px; z-index:4; }
.n-up-mini{ width:24px; height:24px; display:flex; align-items:center; justify-content:center;
  font-size:12px; color:var(--accent); background:rgba(18,18,20,.85); border:1px solid #5a4a2a;
  border-radius:6px; cursor:pointer; transition:.12s; padding:0; }
.n-up-mini:hover{ background:rgba(212,168,83,.25); border-color:var(--accent); color:#fff; }
.n-up-clear{ width:24px; height:24px; display:flex; align-items:center; justify-content:center;
  font-size:11px; color:var(--text3); background:rgba(18,18,20,.85); border:1px solid var(--line2);
  border-radius:6px; cursor:pointer; transition:.12s; padding:0; }
.n-up-clear:hover{ color:var(--err); border-color:var(--err); }
/* 图片/视频节点收起态：提示词输入框一并隐藏（点击节点主体展开） */
.node.ctrl-collapsed .n-prompt{ display:none; }
/* 本地封面角标 */
.cover-tag{ position:absolute; left:5px; top:5px; font-size:9px; color:#fff; background:rgba(30,30,34,.85);
  padding:2px 6px; border-radius:6px; z-index:3; }
/* 节点内嵌本地视频（封面 = 首帧，可播放） */
.n-preview video{ position:absolute; inset:0; width:100%; height:100%; display:block; background:#000; object-fit:cover; }

/* 端口（单端口·居中·带光晕，跟随节点缩放，缩小画布时不会变大） */
.port{ position:absolute; top:50%; width:20px; height:20px; margin-top:-10px; border-radius:50%;
  background:#0d1530; border:1.5px solid #3d5a9e; cursor:crosshair; z-index:30;
  transition:border-color .12s, background .12s, box-shadow .12s, transform .12s;
  transform:scale(var(--pz,1)); touch-action:none; display:flex; align-items:center; justify-content:center;
  box-shadow:0 0 0 3px rgba(47,107,255,.08); }
.port::before{ content:'+'; font-size:13px; line-height:1; font-weight:600; color:#7d9bd8; }
.port:hover{ border-color:#2f6bff; background:#152759; transform:scale(calc(var(--pz,1) * 1.25));
  box-shadow:0 0 0 5px rgba(47,107,255,.16), 0 0 14px rgba(47,107,255,.45); }
.port:hover::before{ color:#bcd2ff; }
.port.in{ left:-10px; }
.port.out{ right:-10px; }
.port.connected{ background:#10254d; border-color:#2f6bff; box-shadow:0 0 0 3px rgba(47,107,255,.14), 0 0 10px rgba(47,107,255,.3); }
.port.connected::before{ content:''; width:6px; height:6px; border-radius:50%; background:#4d8bff; box-shadow:0 0 6px #4d8bff; }
.port.drag-over{ background:#1a3a8a; border-color:#6ea8ff; transform:scale(calc(var(--pz,1) * 1.4));
  box-shadow:0 0 0 6px rgba(47,107,255,.22), 0 0 18px rgba(47,107,255,.55); }

/* @ 引用节点菜单 */
.mention-menu{ position:fixed; z-index:9999; width:256px; max-height:230px; overflow:auto;
  background:rgba(28,28,32,.95); border:1px solid var(--line2); border-radius:8px;
  box-shadow:0 10px 32px rgba(0,0,0,.45); backdrop-filter:blur(8px); }
.mention-hint{ padding:6px 9px; font-size:10px; color:var(--text3); border-bottom:1px solid var(--line); position:sticky; top:0; background:#1c1c20; }
.mention-item{ display:flex; align-items:center; gap:7px; padding:7px 9px; cursor:pointer; }
.mention-item:hover,.mention-item.active{ background:rgba(212,168,83,.10); }
.mi-icon{ width:18px; height:18px; border-radius:5px; display:flex; align-items:center; justify-content:center; font-size:10px; flex:none; }
.mi-thumb{ display:block; width:18px; height:18px; border-radius:5px; object-fit:contain; flex:none; background:#171719; }
.mi-title{ flex:1; font-size:11.5px; color:var(--text2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mi-state{ font-size:10px; color:var(--text3); flex:none; }
/* 连线拖动中的全局光标 */
body.linking{ cursor:crosshair !important; }
body.linking .node{ pointer-events:none; }
body.linking .port{ pointer-events:auto; }
.n-preview img{ -webkit-user-drag:none; user-select:none; }

/* 连线组：灰色细实线 + 细箭头；相连节点生成中时（.edge-active）出现流动动画（与本地画布一致） */
.edge-g{ cursor:pointer; }
.edge-base{ fill:none; stroke:#77777e; stroke-width:calc(1.4px * var(--iz,1));
  pointer-events:stroke; marker-end:url(#edge-arrow); transition:stroke .15s; }
.edge-flow{ fill:none; stroke:#9ea4c8; stroke-width:calc(1.2px * var(--iz,1));
  stroke-dasharray:2 10; stroke-linecap:round; animation:edge-flow 1s linear infinite;
  pointer-events:none; opacity:0; transition:opacity .2s; }
/* 连线命中层：透明 stroke + pointer-events:stroke，只命中描边（约4px，略宽于线便于点选），不命中弓形填充区 */
.edge-hit{ stroke-width:calc(4px * var(--iz,1)); pointer-events:stroke; }
@keyframes edge-flow{ to{ stroke-dashoffset:-24; } }
/* 生成中：线变亮 + 流动动画显现（executor 通过 syncActive 切换类名） */
.edge-g.edge-active .edge-base{ stroke:#a9adc9; stroke-width:calc(1.6px * var(--iz,1)); }
.edge-g.edge-active .edge-flow{ opacity:.9; }
.edge-g:hover .edge-base{ stroke:#ececf2; stroke-width:calc(2px * var(--iz,1)); }
.edge-g.selected .edge-base{ stroke:#c9c9ce; }
/* 新建连线：灰色闪烁确认 */
@keyframes edge-new{ 0%,100%{ stroke:#77777e; } 50%{ stroke:#e8e8ec; } }
.edge-g.edge-new .edge-base{ animation:edge-new .4s ease 2; }
.edge-ghost{ fill:none; stroke:#9a9aa0; stroke-width:calc(1.6px * var(--iz,1));
  stroke-dasharray:7 5; stroke-linecap:round; pointer-events:none; }

/* 连接线右键菜单 */
.edge-menu{ position:fixed; z-index:9999; background:#222226; border:1px solid var(--line2);
  border-radius:8px; box-shadow:0 6px 20px rgba(0,0,0,.4); padding:3px; transform:translateY(-100%); margin-top:-3px; }
.edge-menu button{ display:flex; align-items:center; gap:6px; width:100%;
  background:transparent; border:none; color:var(--text); padding:7px 12px;
  border-radius:5px; cursor:pointer; font-size:12.5px; white-space:nowrap; transition:.12s; }
.edge-menu button:hover{ background:rgba(248,113,113,.12); color:var(--err); }

/* 编组框：深灰实色背景，在节点下层；可拖动整组 */
.node-group{ position:absolute; border:1px solid #333338; border-radius:8px;
  background:#2b2b30; z-index:1; pointer-events:auto; cursor:grab; }
.node-group:active{ cursor:grabbing; }
.node-group.collapsed{ background:rgba(43,43,48,.35); border-style:dashed; border-color:#3a3a40; }
.node-group .g-title{ position:absolute; top:-10px; left:14px; display:inline-flex; align-items:center; gap:5px;
  background:#33333a; color:#e8e6e3; font-size:10.5px; padding:1px 4px 1px 9px; border-radius:5px;
  border:1px solid #44444c; cursor:text; white-space:nowrap; pointer-events:auto; }
.node-group .g-title-text{ user-select:none; }
.node-group .g-fold{ position:absolute; top:-12px; right:9px; width:22px; height:22px; border-radius:50%;
  background:#33333a; border:1px solid #44444c; color:#e8e6e3; cursor:pointer; font-size:11px; pointer-events:auto; }
.node-group .g-rename{ display:inline-flex; align-items:center; justify-content:center;
  width:16px; height:16px; border-radius:3px; background:transparent; border:none;
  color:var(--text3); cursor:pointer; font-size:9px; pointer-events:auto; transition:.12s; }
.node-group .g-rename:hover{ color:var(--accent); background:rgba(212,168,83,.12); }

/* 迷你地图 & 缩放 */
.minimap{ position:absolute; right:12px; bottom:12px; width:180px; height:112px; background:rgba(18,18,20,.88);
  border:1px solid var(--line2); border-radius:8px; overflow:hidden; z-index:90; cursor:pointer; }
.minimap canvas{ width:100%; height:100%; display:block; }
.zoom-ctrl{ position:absolute; left:12px; bottom:12px; display:flex; align-items:center; gap:2px; background:rgba(18,18,20,.88);
  border:1px solid var(--line2); border-radius:8px; padding:3px; z-index:90; }
.zoom-ctrl button{ width:28px; height:28px; background:transparent; border:none; color:var(--text2); font-size:15px; cursor:pointer; border-radius:6px; }
.zoom-ctrl button:hover{ background:#2e2e33; color:var(--text); }
#zoom-label{ font-size:11px; color:var(--text2); min-width:42px; text-align:center; }

/* ================= 属性面板 ================= */
.props-empty{ text-align:center; color:var(--text3); padding:56px 20px; }
.pe-icon{ font-size:34px; margin-bottom:10px; }
.pe-sub{ font-size:11px; margin-top:7px; color:var(--text3); opacity:.7; }
.props-body{ padding:11px; }
.p-section{ font-size:10.5px; color:var(--accent2); letter-spacing:1.5px; margin:12px 2px 7px; text-transform:uppercase; }
.p-section:first-child{ margin-top:3px; }
.p-row{ margin-bottom:9px; }
.p-row label{ display:block; font-size:11.5px; color:var(--text2); margin-bottom:4px; }
.p-row input[type=text],.p-row input[type=number],.p-row textarea,.p-row select{
  width:100%; background:#18181a; border:1px solid var(--line2); color:var(--text); border-radius:6px;
  padding:6px 8px; font-size:12.5px; outline:none; font-family:inherit; }
.p-row textarea{ resize:vertical; min-height:60px; line-height:1.6; }
.p-row input:focus,.p-row textarea:focus,.p-row select:focus{ border-color:var(--accent); }
.p-row .inline{ display:flex; gap:7px; align-items:center; }
.p-row .inline > *{ flex:1; }
.p-hint{ font-size:11px; color:var(--text3); margin-top:3px; line-height:1.6; }
.p-btn{ width:100%; margin-top:5px; background:#26262a; border:1px solid var(--line2); color:var(--accent2);
  padding:7px; border-radius:6px; cursor:pointer; font-size:12.5px; }
.p-btn:hover{ background:#2e2e33; }
.p-btn.primary{ background:var(--accent); color:#111; border:none; font-weight:600; }
.p-btn.danger{ background:#3a1a1a; border-color:#6a2a2a; color:#f87171; }

/* 设置中心（模型 API 管理） */
.set-wrap{ display:flex; flex-direction:column; gap:0; }
.set-tabs{ display:flex; gap:3px; border-bottom:1px solid var(--line); padding-bottom:0; }
.set-tab{ background:transparent; border:none; color:var(--text2); font-size:12px; padding:8px 13px;
  cursor:pointer; border-bottom:2px solid transparent; border-radius:5px 5px 0 0; }
.set-tab:hover{ color:var(--text); background:rgba(212,168,83,.06); }
.set-tab.active{ color:var(--accent2); border-bottom-color:var(--accent2); }
.set-body{ padding:13px 4px; min-height:200px; max-height:46vh; overflow:auto; }
.set-grid-head{ display:none; }
/* 模型配置卡片：行1 名称+协议+删除；行2 模型ID+地址；行3 Key */
.set-card{ border:1px solid var(--line2); border-radius:8px; padding:8px; margin-bottom:8px;
  background:rgba(24,24,28,.4); }
.sc-r1{ display:grid; grid-template-columns:1.2fr 130px 30px; gap:7px; margin-bottom:6px; align-items:center; }
.sc-r2{ display:grid; grid-template-columns:1fr 1.2fr; gap:7px; margin-bottom:6px; }
.sc-r2:has(> input:only-child){ grid-template-columns:1fr; }
.sc-r3{ display:grid; grid-template-columns:1fr; gap:7px; }
.set-card input, .set-card select{ width:100%; background:#1a1a1e; border:1px solid var(--line2); color:var(--text);
  border-radius:6px; padding:6px 8px; font-size:12px; }
.set-card input:focus, .set-card select:focus{ border-color:var(--accent); outline:none; }
.set-card select{ cursor:pointer; }
.s-del{ background:transparent; border:1px solid var(--line2); color:var(--text3); border-radius:6px;
  padding:4px 0; cursor:pointer; font-size:12px; }
.s-del:hover{ color:var(--err); border-color:var(--err); }
.set-empty{ text-align:center; color:var(--text3); font-size:12px; padding:32px 0 20px; line-height:2; }
.set-foot{ display:flex; justify-content:space-between; align-items:center; gap:11px;
  border-top:1px solid var(--line); padding-top:11px; }
.set-hint{ font-size:10px; color:var(--text3); line-height:1.6; max-width:320px; }
.model-empty{ display:flex; align-items:center; gap:7px; justify-content:space-between;
  color:var(--text3); font-size:11px; }
.model-empty .p-btn{ width:auto; margin:0; padding:4px 9px; font-size:11px; }
.p-chip-row{ display:flex; flex-wrap:wrap; gap:5px; }
.p-chip{ font-size:11px; background:#222226; border:1px solid var(--line2); color:var(--text2);
  padding:3px 9px; border-radius:12px; cursor:pointer; }
.p-chip.active{ background:#2a2a2e; border-color:var(--accent); color:var(--accent2); }
.p-tags{ display:flex; flex-wrap:wrap; gap:5px; }
.p-tag{ font-size:10.5px; background:#26262a; color:var(--text2); padding:2px 8px; border-radius:4px; }

/* ================= 资产库 ================= */
/* 生成记录 · 深蓝玻璃风 */
.assets-filter{ display:flex; gap:6px; padding:10px 12px 4px; }
.assets-filter .af-btn{ flex:1; background:rgba(47,107,255,.06); border:1px solid rgba(88,116,220,.22); color:#8fa5d4;
  border-radius:99px; padding:5px 0; font-size:11.5px; cursor:pointer; transition:all .18s ease; }
.assets-filter .af-btn:hover{ color:#cfe0ff; border-color:rgba(88,140,255,.6); background:rgba(47,107,255,.14); }
.assets-filter .af-btn.active{ background:linear-gradient(145deg,#3b76ff,#0e7fc0); border-color:transparent;
  color:#fff; font-weight:600; box-shadow:0 3px 10px rgba(47,107,255,.35); }
.assets-list{ padding:10px; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.asset-card{ background:linear-gradient(165deg,rgba(30,44,82,.7),rgba(18,28,56,.7)); border:1px solid rgba(88,116,220,.2);
  border-radius:12px; overflow:hidden; cursor:grab; transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease;
  /* 视口外的卡片跳过布局/绘制：滚动资产库不再对全部卡片做合成，显著减卡顿 */
  content-visibility:auto; contain-intrinsic-size:auto 96px; }
.asset-card:hover{ transform:translateY(-2px); border-color:rgba(88,140,255,.6); box-shadow:0 6px 16px rgba(47,107,255,.28); }
.asset-card:active{ cursor:grabbing; transform:translateY(0); }
.asset-card .ac-thumb{ height:74px; background:rgba(8,12,26,.8); display:flex; align-items:center; justify-content:center; overflow:hidden; position:relative; }
.asset-card .ac-thumb img{ width:100%; height:100%; object-fit:cover; }
.asset-card .ac-thumb video{ width:100%; height:100%; object-fit:cover; background:#000; pointer-events:none; }
.asset-card .ac-thumb .ph{ font-size:18px; color:#5b6f9e; }
.asset-card .ac-badge{ position:absolute; right:4px; bottom:4px; display:inline-flex; align-items:center; gap:3px; padding:1px 6px; border-radius:99px; font-size:9px; line-height:1.5; color:#cfe0ff; background:rgba(10,16,34,.9); border:1px solid rgba(88,116,220,.35); }
.asset-card .ac-badge.bad-video{ color:#ffd28a; border-color:rgba(255,210,138,.45); }
.asset-card .ac-badge.bad-audio{ color:#9fd0ff; border-color:rgba(159,208,255,.4); }
.asset-card .ac-badge.bad-image{ color:#b9e6a8; border-color:rgba(185,230,168,.4); }
.asset-card .ac-info{ padding:6px 8px; }
.asset-card .ac-name{ font-size:10.5px; color:#c9d6f5; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.asset-card .ac-name .ac-ext{ font-size:9px; color:#7f96c9; }
.asset-card .ac-meta{ font-size:9.5px; color:#66799f; margin-top:1px; }
.assets-empty{ color:#66799f; font-size:11.5px; text-align:center; padding:36px 14px; line-height:2;
  background:rgba(47,107,255,.04); border:1px dashed rgba(88,116,220,.25); border-radius:12px; margin:8px; }

/* ================= 右键菜单 ================= */
.ctx-menu{ position:fixed; min-width:180px; background:var(--panel2); border:1px solid var(--line2);
  border-radius:7px; padding:4px; box-shadow:var(--shadow); z-index:300; }
.ctx-menu button{ display:block; width:100%; background:transparent; border:none; color:var(--text2);
  padding:6px 10px; border-radius:5px; cursor:pointer; font-size:12.5px; text-align:left; }
.ctx-menu button:hover{ background:#2e2e33; color:var(--text); }
.ctx-menu hr{ border:none; border-top:1px solid var(--line); margin:3px; }

/* ================= 弹层 ================= */
.modal-mask{ position:fixed; inset:0; background:rgba(8,8,10,.70); z-index:400; display:flex; align-items:center; justify-content:center; }
.modal{ background:var(--panel2); border:1px solid var(--line2); border-radius:10px; box-shadow:var(--shadow);
  min-width:400px; max-width:74vw; max-height:84vh; display:flex; flex-direction:column; overflow:hidden; }
.modal-head{ display:flex; align-items:center; padding:13px 16px; border-bottom:1px solid var(--line); }
.modal-head h3{ flex:1; font-size:14px; }
.modal-close{ background:transparent; border:none; color:var(--text3); font-size:17px; cursor:pointer; }
.modal-close:hover{ color:var(--text); }
.modal-body{ padding:14px 16px; overflow-y:auto; }
.modal-foot{ padding:11px 16px; border-top:1px solid var(--line); display:flex; gap:9px; justify-content:flex-end; }
.modal input[type=text],.modal textarea,.modal select{ width:100%; background:#18181a; border:1px solid var(--line2);
  color:var(--text); border-radius:6px; padding:7px 9px; font-size:12.5px; outline:none; font-family:inherit; }
.modal textarea{ min-height:76px; resize:vertical; }
.modal label{ display:block; font-size:11.5px; color:var(--text2); margin:9px 0 4px; }

/* 重命名组模态框 */
.modal.rename-group{ min-width:360px; max-width:400px; }
.modal.rename-group .modal-head h3{ font-size:13px; }
.modal.rename-group .modal-body{ padding:18px 20px; }
.modal.rename-group input[type=text]{
  width:100%; background:#141416; border:1.5px solid var(--line2); color:var(--text);
  border-radius:8px; padding:11px 13px; font-size:14px; outline:none; font-family:inherit;
  transition:border-color .15s;
}
.modal.rename-group input[type=text]:focus{ border-color:var(--accent); }
.modal.rename-group .modal-foot{ padding:13px 20px; }
.modal.rename-group .btn.primary{
  background:var(--accent); border:none;
  color:#111; border-radius:6px; padding:7px 20px; font-size:12.5px; cursor:pointer; font-weight:600;
}
.modal.rename-group .btn:not(.primary){
  background:transparent; border:1px solid var(--line2); color:var(--text2);
  border-radius:6px; padding:7px 16px; font-size:12.5px; cursor:pointer;
}


/* 模板库 */
.tpl-grid{ display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.tpl-card{ background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:11px; cursor:grab; transition:.12s; }
.tpl-card:hover{ border-color:var(--accent); }
.tpl-card:active{ cursor:grabbing; }
.tpl-card .tc-name{ font-size:12.5px; font-weight:600; }
.tpl-card .tc-info{ font-size:10.5px; color:var(--text3); margin:4px 0 8px; }
.tpl-card .tc-actions{ display:flex; gap:5px; }
.tpl-card .tc-actions button{ flex:1; font-size:11px; padding:4px; border-radius:5px; cursor:pointer; }
.tpl-empty{ grid-column:1/-1; color:var(--text3); text-align:center; padding:32px 10px; font-size:12.5px; line-height:2; }

/* 历史 */
.hist-list{ display:flex; flex-direction:column; gap:7px; }
.hist-item{ display:flex; align-items:center; gap:9px; background:var(--panel); border:1px solid var(--line);
  padding:8px 11px; border-radius:7px; }
.hist-item .hi-time{ font-size:10.5px; color:var(--text3); width:145px; flex:none; }
.hist-item .hi-name{ flex:1; font-size:12px; color:var(--text2); }
.hist-item button{ background:#26262a; border:1px solid var(--line2); color:var(--accent2); font-size:11px;
  padding:3px 11px; border-radius:5px; cursor:pointer; }
.hist-item button:hover{ background:#2e2e33; }
.rev-logs{ margin-top:12px; }
.rev-log{ font-size:11px; color:var(--text3); padding:3px 0; border-bottom:1px dashed var(--line); }

/* ================= 3D 导演台 ================= */
.stage-modal{ width:96vw; height:92vh; max-width:1400px; }
.stage-layout{ display:flex; flex:1; min-height:0; }
.stage-view{ flex:1; position:relative; background:#0e0e10; border-radius:0 0 0 0; }
.stage-view canvas{ position:absolute; inset:0; }
.stage-panel{ width:280px; flex:none; border-left:1px solid var(--line); display:flex; flex-direction:column; }
.stage-panel .sp-body{ flex:1; overflow-y:auto; padding:11px; }
.stage-tools{ display:flex; flex-wrap:wrap; gap:5px; padding:9px; border-bottom:1px solid var(--line); }
.stage-tools button{ flex:1; min-width:84px; background:#222226; border:1px solid var(--line2); color:var(--text2);
  border-radius:6px; padding:6px 4px; font-size:11px; cursor:pointer; }
.stage-tools button.active{ background:#2a2a2e; border-color:var(--accent); color:var(--accent2); }
.stage-tools button:hover{ color:var(--text); }
.sp-obj{ display:flex; align-items:center; gap:7px; background:var(--panel); border:1px solid var(--line);
  border-radius:6px; padding:6px 8px; margin-bottom:6px; cursor:pointer; }
.sp-obj.active{ border-color:var(--accent); }
.sp-obj .so-ic{ font-size:15px; }
.sp-obj .so-nm{ flex:1; font-size:12px; }
.sp-obj .so-del{ background:transparent; border:none; color:var(--text3); cursor:pointer; }
.sp-obj .so-del:hover{ color:var(--err); }
.stage-hint{ font-size:10.5px; color:var(--text3); line-height:1.8; margin-top:9px; padding:9px;
  border:1px dashed var(--line2); border-radius:6px; }

/* ================= Toast ================= */
#toast-root{ position:fixed; top:56px; right:14px; z-index:600; display:flex; flex-direction:column; gap:7px; }
.toast{ background:var(--panel2); border:1px solid var(--line2); border-left:3px solid var(--accent);
  border-radius:7px; padding:9px 14px; font-size:12.5px; box-shadow:var(--shadow); animation:tin .2s ease; min-width:190px; max-width:320px; }
.toast.ok{ border-left-color:var(--ok); }
.toast.warn{ border-left-color:var(--warn); }
.toast.err{ border-left-color:var(--err); }
@keyframes tin{ from{ transform:translateX(24px); opacity:0; } to{ transform:none; opacity:1; } }
.toast.out{ opacity:0; transition:.25s; }

/* 视频节点预览的 Ken Burns 动画 */
.kenburns{ animation:kb 4s ease-in-out infinite alternate; }
@keyframes kb{ from{ transform:scale(1.05) translate(1.5%,1%); } to{ transform:scale(1.22) translate(-2.5%,-2%); } }

/* 音频波形 */
.waveform{ display:flex; align-items:flex-end; gap:2px; height:42px; padding:4px 6px; }
.waveform i{ flex:1; background:var(--audio-node); border-radius:2px; min-height:2px; opacity:.8; }
.waveform.play i{ animation:wv 1s ease-in-out infinite alternate; }
.waveform.play i:nth-child(2n){ animation-delay:.12s; }
.waveform.play i:nth-child(3n){ animation-delay:.24s; }
@keyframes wv{ from{ transform:scaleY(.3); } to{ transform:scaleY(1); } }

/* ================= 首页视图 ================= */
.home-view{ position:fixed; inset:0; z-index:200; overflow-y:auto; background:#0d0d0f; }
.home-view::before{ content:''; position:fixed; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(circle, rgba(255,255,255,.035) 1px, transparent 1.6px),
    radial-gradient(1000px 520px at 76% -12%, rgba(150,140,120,.14), transparent 60%),
    radial-gradient(820px 500px at -8% 110%, rgba(58,58,64,.5), transparent 60%);
  background-size: 26px 26px, 100% 100%, 100% 100%; }
.home-inner{ position:relative; z-index:1; max-width:1280px; margin:0 auto; padding:76px 48px 96px; min-height:100%;
  display:flex; flex-direction:column; }

.home-hero{ position:relative; overflow:hidden; display:flex; flex-direction:column; align-items:center; text-align:center;
  padding:80px 16px 62px; }
.home-watermark{ position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  font-size:150px; font-weight:800; letter-spacing:.06em; line-height:1;
  color:rgba(255,255,255,.065); white-space:nowrap; pointer-events:none; user-select:none; }
.home-logo-row{ display:flex; align-items:center; justify-content:center; gap:22px; width:100%; margin-bottom:26px; }
.home-logo{ font-size:58px; line-height:1; font-weight:300;
  background:linear-gradient(135deg, #f0ece2 0%, #cbb88b 55%, #94876c 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent; -webkit-text-fill-color:transparent; }
.hero-line{ flex:1; height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.30)); }
.hero-line:last-child{ background:linear-gradient(90deg, rgba(255,255,255,.30), transparent); }
.home-eyebrow{ font-size:11px; letter-spacing:.42em; color:#8b857a; margin-bottom:18px; text-transform:uppercase; }
.home-title{ display:flex; align-items:center; justify-content:center; gap:26px; width:100%;
  font-size:52px; font-weight:700; color:var(--text); letter-spacing:1px; line-height:1.08; }
.home-desc{ font-size:15.5px; color:var(--text2); margin:15px 0 32px; letter-spacing:.5px; }
.home-new-btn{ display:inline-flex; align-items:center; gap:8px; font-size:14px; font-weight:600;
  color:#e7d7b0; background:rgba(210,185,135,.07); border:1px solid rgba(216,192,142,.42); border-radius:10px; padding:12px 28px;
  cursor:pointer; transition:all .18s; }
.home-new-btn:hover{ background:#e8d8b0; color:#16161a; border-color:#e8d8b0; box-shadow:0 8px 26px rgba(200,175,120,.32); }
.home-new-btn .lc-ic{ width:15px; height:15px; }

.home-stats{ display:flex; align-items:center; justify-content:center;
  border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:30px 20px; }
.stat{ display:flex; flex-direction:column; align-items:center; gap:5px; padding:0 48px; }
.stat-num{ font-size:28px; font-weight:650; color:var(--text); letter-spacing:.5px; }
.stat-label{ font-size:12px; color:var(--text3); letter-spacing:1px; }
.stat-sep{ width:1px; height:34px; background:var(--line); }

.home-list-head{ padding:36px 0 18px; }
.home-sec-title{ font-size:14px; font-weight:600; color:var(--text2); letter-spacing:.5px; }

.home-body{ flex:1; }
.home-list{ display:grid; grid-template-columns:repeat(auto-fill, minmax(272px, 1fr)); gap:20px; }

.hc-card{ display:flex; flex-direction:column; background:var(--panel); border:1px solid var(--line);
  border-radius:15px; overflow:hidden; cursor:pointer;
  transition:border-color .16s, transform .12s ease-out, box-shadow .16s; }
.hc-card:hover{ border-color:#3a3a42; box-shadow:0 16px 40px rgba(0,0,0,.46); }
.hc-cover{ position:relative; aspect-ratio:16/9; display:flex; align-items:center; justify-content:center;
  background:
    radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1.6px),
    linear-gradient(150deg, #202027, #141418);
  background-size: 20px 20px, 100% 100%;
  border-bottom:1px solid var(--line); overflow:hidden; }
.hc-cover::after{ content:''; position:absolute; inset:0;
  background:radial-gradient(360px 120px at 50% 0%, rgba(200,190,165,.10), transparent 72%); }
.hc-figure{ position:relative; z-index:1; width:150px; height:66px; max-width:72%;
  transition:transform .16s; }
.hc-card:hover .hc-figure{ transform:scale(1.04); }
.hc-card-body{ display:flex; flex-direction:column; gap:4px; padding:15px 16px 12px; }
.hc-name{ font-size:15px; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hc-meta{ font-size:12px; color:var(--text3); }
.hc-actions{ display:flex; align-items:center; gap:6px; padding:0 12px 15px; opacity:0; transform:translateY(4px);
  transition:opacity .16s, transform .16s; }
.hc-card:hover .hc-actions{ opacity:1; transform:none; }
.hc-btn{ display:inline-flex; align-items:center; gap:5px; font-size:12px; color:var(--text2);
  background:transparent; border:1px solid transparent; border-radius:7px; padding:6px 11px; cursor:pointer; transition:all .13s; }
.hc-btn:hover{ color:var(--text); background:#242429; }
.hc-btn.primary{ color:#e7d7b0; background:rgba(210,185,135,.08); border:1px solid rgba(216,192,142,.35); font-weight:600; }
.hc-btn.primary:hover{ background:#e8d8b0; color:#16161a; border-color:#e8d8b0; }
.hc-btn.danger{ color:#9a6a6e; }
.hc-btn.danger:hover{ color:#ff9aa3; background:#241a1d; }

.home-empty{ padding:120px 20px 40px; display:flex; flex-direction:column; align-items:center; gap:16px; }
.home-empty-icon{ color:#34343c; }
.home-empty-text{ font-size:14px; color:var(--text3); }
.home-empty-btn{ font-size:13.5px; font-weight:600; color:#16161a; background:#e8d8b0; border:none;
  border-radius:10px; padding:11px 26px; cursor:pointer; transition:all .18s; }
.home-empty-btn:hover{ background:#f0e4c2; transform:translateY(-1px); box-shadow:0 8px 22px rgba(200,175,120,.28); }

.home-prompt input{ font-size:14px; }

/* ================= 首页特效（克制的入场动效 + 卡片光斑） ================= */
@keyframes homeRise{ from{ opacity:0; transform:translateY(16px); } to{ opacity:1; transform:none; } }
@keyframes logoFloat{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-8px); } }
.home-logo{ animation:homeRise .7s ease-out both, logoFloat 4.5s 1.2s ease-in-out infinite; }
.home-eyebrow{ animation:homeRise .7s .1s ease-out both; }
.home-title{ animation:homeRise .7s .2s ease-out both; }
.home-desc{ animation:homeRise .7s .3s ease-out both; }
.home-new-btn{ animation:homeRise .7s .42s ease-out both; }
.home-stats{ animation:homeRise .7s .55s ease-out both; }
.hc-card{ position:relative; }
.hc-card::before{ content:''; position:absolute; inset:0; z-index:2; pointer-events:none;
  background:radial-gradient(340px circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,.14), transparent 60%);
  opacity:0; transition:opacity .25s; }
.hc-card:hover::before{ opacity:1; }

/* 左右侧竖排装饰字（填充留白，克制的 editorial 注记） */
.home-side{ position:fixed; z-index:0; top:50%; transform:translateY(-50%);
  writing-mode:vertical-rl; text-orientation:mixed;
  font-size:11px; letter-spacing:.45em; font-weight:500;
  color:rgba(255,255,255,.16); text-transform:uppercase;
  pointer-events:none; user-select:none; white-space:nowrap; }
.home-side-l{ left:30px; }
.home-side-r{ right:30px; transform:translateY(-50%) rotate(180deg); }

/* 背景光晕跟随鼠标（柔和的暖光，跟着光标缓慢漂移） */
.home-glow{ position:fixed; top:0; left:0; width:720px; height:720px; border-radius:50%;
  background:radial-gradient(circle, rgba(222,198,150,.13), transparent 62%);
  pointer-events:none; z-index:0; transition:transform .5s ease-out; }

/* ================= 登录视图（未登录强制显示） ================= */
.auth-view{ position:fixed; inset:0; z-index:300; display:flex; align-items:center; justify-content:center;
  background:#0d0d0f; }
.auth-view[hidden]{ display:none; }
.auth-view::before{ content:''; position:fixed; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(circle, rgba(255,255,255,.035) 1px, transparent 1.6px),
    radial-gradient(900px 480px at 50% -10%, rgba(150,140,120,.16), transparent 62%);
  background-size: 26px 26px, 100% 100%; }
.auth-card{ position:relative; z-index:1; width:360px; max-width:92vw; box-sizing:border-box;
  background:rgba(24,24,28,.92); border:1px solid #2a2a2e; border-radius:18px; padding:40px 36px 30px;
  box-shadow:0 24px 70px rgba(0,0,0,.55); display:flex; flex-direction:column; align-items:center; }
.auth-logo{ font-size:52px; line-height:1; font-weight:300;
  background:linear-gradient(135deg, #f0ece2 0%, #cbb88b 55%, #94876c 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent; -webkit-text-fill-color:transparent; }
.auth-title{ font-size:24px; font-weight:700; color:var(--text); margin-top:14px; letter-spacing:2px; }
.auth-sub{ font-size:12px; color:var(--text3); margin-top:6px; letter-spacing:.5px; }
.auth-tabs{ display:flex; gap:6px; margin:24px 0 18px; width:100%; background:#1c1c20;
  border:1px solid var(--line); border-radius:10px; padding:4px; box-sizing:border-box; }
.auth-tab{ flex:1; background:transparent; border:none; color:var(--text3); font-size:13px;
  padding:8px 0; border-radius:7px; cursor:pointer; transition:all .15s; }
.auth-tab.on{ color:#16161a; background:#e8d8b0; font-weight:600; }
.auth-form{ display:flex; flex-direction:column; gap:10px; width:100%; }
.auth-form[hidden]{ display:none; }
.auth-input{ background:#141416; border:1px solid var(--line2); border-radius:9px; color:var(--text);
  font-size:13.5px; padding:11px 13px; outline:none; width:100%; box-sizing:border-box; transition:border-color .15s; }
.auth-input:focus{ border-color:#c9a86a; }
.auth-input::placeholder{ color:var(--text3); }
.auth-btn{ border:none; border-radius:9px; padding:12px 0; font-size:14px; font-weight:600;
  color:#16161a; background:#e8d8b0; cursor:pointer; transition:all .18s; }
.auth-btn:hover{ background:#f0e4c2; box-shadow:0 8px 22px rgba(200,175,120,.25); }
.auth-btn:disabled{ opacity:.6; cursor:default; }
.auth-msg{ min-height:18px; font-size:12px; color:var(--text2); margin-top:12px; text-align:center; }
.auth-msg.err{ color:#ff9aa3; }
.auth-foot{ margin-top:14px; font-size:11px; color:var(--text3); letter-spacing:.5px; }

/* 顶栏当前用户 */
.auth-user{ font-size:12px; color:var(--text2); padding:2px 10px; border:1px solid var(--line2);
  border-radius:99px; white-space:nowrap; }
.auth-user:empty{ display:none; }

/* ================= 智能对齐参考线 ================= */
.align-guides{ position:absolute; inset:0; pointer-events:none; z-index:60; overflow:hidden; }
.ag-line{ position:absolute; }
.ag-v{ width:1px; background:var(--accent2); box-shadow:none; }
.ag-h{ height:1px; background:var(--accent2); box-shadow:none; }

/* ================= 提示词面板（Agent 智能体 · 深蓝黑调，跟随节点） ================= */
.prompt-panel{ position:absolute; left:0; top:0; z-index:80; width:560px; box-sizing:border-box; cursor:default; }
.pp-inner{ box-sizing:border-box; background:linear-gradient(180deg, #101729 0%, #0b1020 100%); border:1px solid #2a3d6e; border-radius:16px;
  box-shadow:0 8px 36px rgba(0,0,0,.6), 0 0 0 1px rgba(47,107,255,.06), inset 0 1px 0 rgba(110,160,255,.08); overflow:hidden; width:100%; }
/* 面板所属节点标题：明确"这个面板在编辑谁 / ▶ 会生成谁"，避免点生成跑错节点 */
.pp-node-title{ display:flex; align-items:center; gap:6px; padding:7px 12px 0;
  font-size:11.5px; color:#c9a86a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pp-node-title .lc-ic{ color:#6ea8ff; flex:none; }
.pp-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px 4px; }
.pp-tags{ display:flex; align-items:center; gap:6px; flex-wrap:nowrap; }
.pp-tag{ display:inline-flex; align-items:center; gap:4px; background:#141d38; border:1px solid #2a3d6e; white-space:nowrap;
  color:#a8bce0; font-size:11px; padding:4px 10px; border-radius:99px; cursor:pointer; transition:.12s; }
.pp-tag:hover{ border-color:#3d5a9e; color:#dbe9ff; background:#1a2750; }
.pp-tag .lc-ic{ vertical-align:-2px; }
.pp-plus{ font-weight:500; margin-right:1px; color:#6ea8ff; }
.pp-tag-style.on{ color:#fff; background:rgba(47,107,255,.22); border-color:#3d6bd8; }
.pp-style-now{ display:inline-flex; align-items:center; font-size:11px; color:#9ec0ff;
  padding:2px 7px; border-radius:5px; background:rgba(47,107,255,.14); white-space:nowrap; }
.pp-modes{ display:flex; align-items:center; gap:6px; padding:0 10px 8px; flex-wrap:nowrap; overflow-x:auto; }
.pp-chip{ font-size:10.5px; color:#8ea3c8; background:#141d38; border:1px solid #2a3d6e; white-space:nowrap; flex:none;
  padding:3px 12px; border-radius:99px; cursor:pointer; user-select:none; transition:.1s; }
.pp-chip:hover{ color:#dbe9ff; border-color:#3d5a9e; background:#1a2750; }
.pp-chip.on{ color:#fff; border-color:#3b82f6; background:rgba(59,130,246,.16); }
.pp-zoom{ flex:none; background:transparent; border:none; color:#6b7fa3;
  cursor:pointer; padding:4px; border-radius:5px; display:flex; align-items:center; }
.pp-zoom:hover{ color:#dbe9ff; background:#1a2750; }
.pp-input{ width:100%; box-sizing:border-box; background:transparent; border:none; outline:none; resize:none;
  color:#dbe9ff; font-size:13px; line-height:1.6; font-family:inherit; padding:6px 14px; min-height:60px; max-height:140px;
  overflow-y:auto; white-space:pre-wrap; word-break:break-word; cursor:text; }
.pp-input::placeholder{ color:#4a5d85; font-size:12.5px; }
.pp-input:empty::before{ content:attr(data-placeholder); color:#4a5d85; font-size:12.5px; pointer-events:none; }
/* 语音输入按钮：提示词输入框右下角，单色线条风格 */
.pp-input-wrap{ position:relative; }
.pp-voice{
  position:absolute; right:6px; bottom:6px;
  width:26px; height:26px;
  background:transparent; border:1px solid #2e2e32; border-radius:6px;
  color:#8a8a8a; display:flex; align-items:center; justify-content:center;
  cursor:pointer; padding:0;
  transition:color .15s, border-color .15s, background .15s;
}
.pp-voice:hover{ color:#d0b88a; border-color:#5a5a52; }
.pp-voice.recording{
  background:#b3261e; color:#fff; border-color:#b3261e;
  animation:pp-voice-pulse 1.2s ease-in-out infinite;
}
@keyframes pp-voice-pulse{
  0%,100%{ box-shadow:0 0 0 0 rgba(179,38,30,.55); }
  50%   { box-shadow:0 0 0 6px rgba(179,38,30,0); }
}
/* 资产拖拽期间隐藏列表所有 img，浏览器不再解码大图，主线程腾出来响应 dragover/drop，避免拖快了放不下 */
#assets-list.dragging .ac-thumb img,
#assets-list.dragging .ac-thumb video{ visibility:hidden; }
#assets-list.dragging .ac-thumb{ background:#1a1a1a; }
/* 提示词内嵌 @ 引用块：图片缩略图 + 名称，等比例显示不裁切 */
.pp-mention{ display:inline-flex; align-items:center; gap:5px; vertical-align:middle; margin:0 2px;
  background:#242424; border:1px solid #343434; border-radius:6px; padding:2px 7px 2px 2px;
  font-size:12px; color:#c9c9c9; cursor:text; user-select:text; white-space:nowrap; }
.pp-mention-img{ width:20px; height:20px; object-fit:contain; border-radius:4px; background:#171719; flex:none; }
.pp-mention-vid{ display:block; width:20px; height:20px; object-fit:cover; border-radius:4px; background:#171719; flex:none; pointer-events:none; }
.pp-bar{ display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:8px 10px; border-top:1px solid #252525; }
.pp-bar-left{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; flex:1; min-width:0; }
/* 统一自定义下拉：按钮 + 弹层（符号 ▾、深色、hover 一致） */
.pp-drop{ display:inline-flex; align-items:center; gap:4px; background:#222; border:1px solid #2e2e32;
  color:#c4c4c4; border-radius:6px; padding:4px 8px; font-size:11px; cursor:pointer; white-space:nowrap; }
.pp-drop:hover{ background:#222; border-color:#4a4a4a; color:#d0d0d0; }
.pp-drop-sm{ padding:3px 6px; }
.pp-caret{ font-size:9px; color:#7a7a7a; }
.pp-drop-pop{ position:fixed; top:0; left:0; padding:6px; background:#1a1a1a;
  border:1px solid #2e2e32; border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.5);
  z-index:99999; min-width:120px; }
.pp-drop-grid{ display:grid; grid-template-columns:repeat(5,1fr); gap:5px; width:250px; }
.pp-drop-item{ display:flex; align-items:center; justify-content:center; height:24px; padding:0 10px;
  background:transparent; border:1px solid transparent; border-radius:6px; color:#b0b0b0; font-size:11px;
  cursor:pointer; user-select:none; white-space:nowrap; }
.pp-drop-grid .pp-drop-item{ background:#242424; border-color:#2e2e32; color:#9a9a9a; font-size:10.5px; padding:0 5px; height:22px; }
.pp-drop-item:hover{ background:#242424; color:#c9c9c9; }
.pp-drop-grid .pp-drop-item:hover{ background:#242424; border-color:#3a3a3e; color:#c9c9c9; }
.pp-drop-item.on{ color:#fff; background:#2e2e2e; }
.pp-drop-grid .pp-drop-item.on{ background:#2e2e2e; border-color:#5a5a5a; color:#fff; }
.pp-drop-dis{ color:#5a5a5a !important; cursor:not-allowed !important; opacity:.6 !important; }
.pp-drop-dis:hover{ background:transparent !important; color:#5a5a5a !important; }
.pp-bar-right{ display:flex; align-items:center; gap:6px; flex:none; }
.pp-model{ display:inline-flex; align-items:center; gap:5px; }
.pp-model-ic{ color:#9a9a9a; display:inline-flex; }
.pp-sep{ width:1px; height:16px; background:#2e2e2e; flex:none; }
.pp-mid{ color:#4a4a4a; font-size:11px; flex:none; }
/* 视频时长迷你滑块 */
.pp-dur-slider{ display:flex; align-items:center; gap:5px; flex:none; }
.pp-dur-range{ width:90px; height:16px; accent-color:var(--accent); cursor:pointer; }
.pp-dur-val{ font-size:11px; color:var(--text2); background:#1a1a1e; border:1px solid var(--line2);
  border-radius:4px; padding:1px 5px; min-width:30px; text-align:center; }
.pp-nomodel{ background:rgba(248,113,113,.12); border:1px solid rgba(248,113,113,.3); color:var(--err); white-space:nowrap;
  border-radius:6px; padding:4px 10px; font-size:11px; cursor:pointer; }
.pp-run{ flex:none; width:32px; height:32px; border-radius:50%; background:#7a7a7a; border:none; cursor:pointer;
  color:#111; display:flex; align-items:center; justify-content:center; transition:.12s; padding:0; }
.pp-run:hover{ background:#9a9a9a; }
.pp-bar-right{ display:flex; align-items:center; gap:4px; flex:none; }
.pp-tool{ flex:none; width:26px; height:26px; border-radius:6px; background:transparent; border:none; cursor:pointer;
  color:#9a9a9a; display:flex; align-items:center; justify-content:center; padding:0; position:relative; }
.pp-tool:hover{ color:#c9c9c9; background:#222222; }
.pp-tool-dot::after{ content:''; position:absolute; top:3px; right:3px; width:5px; height:5px; border-radius:50%; background:#3b82f6; }
.pp-count{ font-size:11px; color:#7a7a7a; padding:0 2px; }
.pp-run.busy{ opacity:.6; cursor:wait; animation:spin 1s linear infinite; }
.pp-run:disabled{ cursor:wait; }

/* 风格选择弹层 */
.pp-style-pop{ position:fixed; z-index:9999; width:320px; max-height:380px; overflow-y:auto;
  background:#1d1d20; border:1px solid #3e3e46; border-radius:10px; box-shadow:0 12px 40px rgba(0,0,0,.6); padding:8px; }
.pp-style-head{ font-size:11px; color:var(--text3); padding:4px 6px 8px; }
.pp-style-grid{ display:grid; grid-template-columns:1fr 1fr; gap:5px; }
.pp-style-item{ font-size:11px; color:var(--text2); background:#26262c; border:1px solid var(--line2);
  padding:6px 8px; border-radius:6px; cursor:pointer; text-align:center; white-space:nowrap; transition:.1s; }
.pp-style-item:hover{ border-color:var(--accent); color:var(--text); }
.pp-style-item.on{ color:var(--accent); border-color:rgba(212,168,83,.6); background:rgba(212,168,83,.10); }
/* ================= 积分系统（云端充值入口） ================= */
#credit-btn.credit-low{ color:#ff8ba7; border-color:rgba(255,139,167,.4); }
.credit-box{ font-size:13px; }
.credit-bal{ color:var(--text2); margin-bottom:10px; display:flex; align-items:center; gap:8px; }
.credit-bal b{ color:#d0b88a; font-size:16px; }
.credit-rate{ font-size:11px; color:var(--text3); background:#222226; border:1px solid var(--line2); padding:1px 8px; border-radius:99px; }
.credit-qr-tip{ font-size:11.5px; color:var(--text3); margin-top:8px; line-height:1.8; }
.credit-qrs{ display:flex; gap:12px; justify-content:center; margin-bottom:6px; }
.credit-qr{ text-align:center; flex:1; }
.credit-qr img{ width:180px; height:180px; object-fit:contain; background:#fff; border-radius:10px; border:1px solid var(--line); }
.credit-qr-label{ font-size:12px; color:var(--text2); margin-top:6px; }
.credit-row{ display:flex; gap:8px; align-items:center; }
.credit-row .mp-input{ flex:1; }
.credit-row .btn{ flex:none; }
.credit-prices{ font-size:11px; color:var(--text3); margin-top:10px; line-height:1.7; }

/* 视频节点「下载成片」直连按钮 */
.n-dlbtn{
  position:absolute; right:6px; bottom:6px; z-index:3;
  display:inline-flex; align-items:center; gap:3px;
  padding:3px 8px; border-radius:6px;
  background:rgba(20,20,26,.78); color:#d9c9a8;
  font-size:11px; text-decoration:none; line-height:1.4;
  border:1px solid rgba(217,201,168,.35);
  backdrop-filter:blur(4px); cursor:pointer;
}
.n-dlbtn:hover{ background:rgba(40,40,52,.9); color:#fff; border-color:#d9c9a8; }

/* ================= 公告栏（多行排版：手动回车换行 + 自动换行，高度自适应） ================= */
:root{ --notice-h:38px; }
.notice-bar{
  position:fixed; top:0; left:0; right:0; min-height:38px; z-index:650;
  display:flex; align-items:center; justify-content:center; gap:10px;
  background:linear-gradient(90deg, #3a2f14, #2c2413 45%, #3a2f14);
  border-bottom:1px solid rgba(212,168,83,.4);
  padding:6px 46px 6px 14px; box-sizing:border-box;
}
.notice-bar[hidden]{ display:none; }
.notice-body{ display:flex; align-items:flex-start; justify-content:center; gap:8px; min-width:0; flex:1; }
.notice-badge{
  flex:none; margin-top:2px; background:var(--accent); color:#16161a; font-size:11px; font-weight:600;
  border-radius:3px; padding:2px 7px; letter-spacing:1px;
}
#notice-text{
  color:var(--accent2); font-size:12.5px; line-height:1.6; text-align:center;
  white-space:pre-wrap; word-break:break-word; max-width:100%; max-height:96px; overflow:auto;
}
.notice-close{
  position:absolute; right:12px; top:16px;
  background:transparent; border:none; color:var(--text2); font-size:13px;
  cursor:pointer; padding:4px 7px; border-radius:4px;
}
.notice-close:hover{ color:var(--text); background:rgba(255,255,255,.06); }
body.has-notice #app{ padding-top:var(--notice-h,38px); }
body.has-notice .auth-view, body.has-notice .home-view{ top:var(--notice-h,38px); }
body.has-notice #toast-root{ top:calc(var(--notice-h,38px) + 56px); }

/* ================= 全屏公告（遮罩弹层，用户自行关闭） ================= */
.notice-full{
  position:fixed; inset:0; z-index:7500;
  background:rgba(8,8,10,.86); backdrop-filter:blur(6px);
  display:flex; align-items:center; justify-content:center; padding:24px;
}
.notice-full[hidden]{ display:none; }
.notice-full-card{
  width:min(560px, 100%); max-height:72vh; display:flex; flex-direction:column;
  background:linear-gradient(160deg, #24201a, #1c1c1f);
  border:1px solid rgba(212,168,83,.45); border-radius:14px;
  box-shadow:0 18px 60px rgba(0,0,0,.6); padding:22px 24px 18px;
}
.notice-full-head{
  font-size:15px; font-weight:600; color:var(--accent);
  letter-spacing:3px; text-align:center; padding-bottom:12px;
  border-bottom:1px solid rgba(212,168,83,.25); margin-bottom:14px;
}
.notice-full-text{
  flex:1; overflow:auto; color:var(--text); font-size:13.5px; line-height:1.8;
  white-space:pre-wrap; word-break:break-word; text-align:left;
  padding:2px 4px;
}
.notice-full-actions{ display:flex; justify-content:center; margin-top:16px; }
.notice-full-btn{
  background:var(--accent); border:1px solid var(--accent); color:#16161a;
  padding:9px 34px; border-radius:8px; font-size:13.5px; font-weight:600; cursor:pointer;
}
.notice-full-btn:hover{ background:var(--accent2); border-color:var(--accent2); }

/* ================= 客服弹层（顶栏入口，二维码联系） ================= */
.kefu-modal{
  position:fixed; inset:0; z-index:7600;
  background:rgba(8,8,10,.86); backdrop-filter:blur(6px);
  display:flex; align-items:center; justify-content:center; padding:24px;
}
.kefu-modal[hidden]{ display:none; }
.kefu-card{
  width:min(340px, 100%); display:flex; flex-direction:column; align-items:center;
  background:linear-gradient(160deg, #24201a, #1c1c1f);
  border:1px solid rgba(212,168,83,.45); border-radius:14px;
  box-shadow:0 18px 60px rgba(0,0,0,.6); padding:20px 24px;
}
.kefu-head{
  font-size:15px; font-weight:600; color:var(--accent); letter-spacing:3px;
  padding-bottom:10px; margin-bottom:12px; width:100%; text-align:center;
  border-bottom:1px solid rgba(212,168,83,.25);
}
.kefu-qr{ width:220px; height:220px; border-radius:10px; background:#fff; padding:8px; box-sizing:border-box; object-fit:contain; }
.kefu-tip{ margin-top:10px; font-size:12px; color:var(--text2); }
.kefu-card .notice-full-btn{ margin-top:14px; }

/* ================= 在线购卡 ================= */
.credit-buy{ margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.credit-buy-title{ font-size:12.5px; color:var(--accent); margin-bottom:8px; }
.credit-tier{ background:#2b2b30; border:1px solid var(--line2); color:var(--text2);
  padding:5px 12px; border-radius:7px; cursor:pointer; font-size:12.5px; }
.credit-tier:hover{ border-color:var(--accent); color:var(--text); }
.credit-tier.on{ background:var(--accent); border-color:var(--accent); color:#16161a; font-weight:600; }
.credit-buy-status{ font-size:11.5px; color:var(--text3); max-width:250px; }
.credit-codes{ margin-top:10px; display:flex; flex-direction:column; gap:6px; }
.credit-code-item{ display:flex; align-items:center; gap:8px; background:#17171a;
  border:1px solid var(--line); border-radius:8px; padding:7px 10px; }
.credit-code-val{ flex:1; font-family:var(--mono); font-size:12px; color:var(--accent2);
  word-break:break-all; user-select:text; }

/* ============ 生成历史面板（genhistory.js） ============ */
.gh-mask{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:1200;display:none;align-items:stretch;justify-content:flex-end}
.gh-mask.on{display:flex}
.gh-panel{width:min(560px,94vw);height:100%;background:#16181d;color:#e8e8ec;display:flex;flex-direction:column;box-shadow:-12px 0 40px rgba(0,0,0,.5);animation:ghIn .22s ease}
@keyframes ghIn{from{transform:translateX(40px);opacity:.6}to{transform:none;opacity:1}}
.gh-head{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid #26292f;flex-wrap:wrap}
.gh-title{font-size:16px;font-weight:700}
.gh-tabs{display:flex;gap:6px;margin-left:6px}
.gh-tab{border:1px solid #33384a;background:transparent;color:#aab;padding:5px 12px;border-radius:16px;cursor:pointer;font-size:13px}
.gh-tab.on{background:#3b4bd8;border-color:#3b4bd8;color:#fff}
.gh-head-ops{margin-left:auto;display:flex;gap:8px}
.gh-btn{border:1px solid #33384a;background:transparent;color:#ccd;padding:5px 10px;border-radius:8px;cursor:pointer;font-size:13px}
.gh-btn:hover{background:#23262d}
.gh-hint{font-size:12px;color:#7d8496;padding:8px 16px;border-bottom:1px solid #202329}
.gh-body{flex:1;overflow-y:auto;padding:12px 16px;display:flex;flex-direction:column;gap:10px}
.gh-empty{color:#7d8496;text-align:center;padding:40px 0;font-size:14px}
.gh-card{border:1px solid #262a33;border-radius:10px;background:#1b1e24;overflow:hidden;flex-shrink:0}
.gh-card-top{display:flex;gap:10px;padding:10px}
.gh-media{width:120px;height:120px;object-fit:cover;border-radius:8px;background:#111;flex-shrink:0}
.gh-nourl{display:flex;align-items:center;justify-content:center;color:#7d8496;font-size:12px;text-align:center}
video.gh-media{object-fit:contain}
.gh-card-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.gh-name{font-size:13px;font-weight:600;color:#eef}
.gh-time{font-size:12px;color:#7d8496}
.gh-prompt{font-size:12px;color:#bfc6d8;max-height:64px;overflow-y:auto;white-space:pre-wrap;word-break:break-all;background:#14161b;border-radius:6px;padding:6px}
.gh-err{font-size:12px;color:#f87171;max-height:56px;overflow-y:auto;white-space:pre-wrap;word-break:break-all}
.gh-charge{font-size:12px;color:#d4a853}
.gh-refunded{display:inline-block;margin-left:10px;padding:2px 8px;border-radius:99px;font-size:12px;font-weight:600;color:#4ade80;background:rgba(74,222,128,.12)}
.gh-st{font-size:11px;padding:1px 6px;border-radius:8px;margin-right:2px}
.gh-run{color:#e0b341}
.gh-fail{color:#f87171}
.gh-ok{color:#4caf7d}
.gh-card-ops{display:flex;gap:10px;padding:0 10px 10px;flex-wrap:wrap}
.gh-op{color:#7ea2ff;text-decoration:underline;font-size:13px}
.gh-tip{color:#7d8496;font-size:12px}
.gh-row{display:flex;justify-content:space-between;gap:10px;border:1px solid #262a33;border-radius:10px;background:#1b1e24;padding:10px;flex-shrink:0}
.gh-row-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.gh-row-side{text-align:right;display:flex;flex-direction:column;gap:4px;white-space:nowrap}
.gh-price{color:#f87171;font-weight:700}
.gh-price.gh-plus{color:#4caf7d}
.gh-bal{font-size:12px;color:#7d8496}

/* 生成等待计时 */
.gh-timer{display:inline-block;margin-left:10px;font-size:13px;font-variant-numeric:tabular-nums;color:#7ea2ff;font-weight:600}
.gh-timer.gh-run{color:#e0b341;animation:ghBlink 1.2s ease-in-out infinite}
@keyframes ghBlink{0%,100%{opacity:1}50%{opacity:.55}}

/* ================= 首页视图 v20261016（浅蓝清爽 · 新版场景卡片 UI） ================= */
/* ================= 首页视图（浅蓝清爽 · 轻量不卡） ================= */
.home-view{ position:fixed; inset:0; z-index:200; overflow-y:auto; scroll-behavior:smooth;
  background:
    radial-gradient(1000px 520px at 12% -8%, rgba(59,130,246,.16), transparent 62%),
    radial-gradient(860px 480px at 88% -4%, rgba(139,92,246,.10), transparent 62%),
    radial-gradient(1100px 560px at 50% 118%, rgba(14,165,217,.13), transparent 62%),
    linear-gradient(180deg, #eef4ff 0%, #e6efff 52%, #dce8fc 100%); }
.home-view::before{ content:''; position:fixed; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(circle, rgba(37,99,235,.07) 1px, transparent 1.5px),
    radial-gradient(760px 340px at 50% -6%, rgba(59,130,246,.14), transparent 64%);
  background-size: 30px 30px, 100% 100%; }
/* 鼠标跟随光晕（transform-only 合成层动画 · 满帧流畅） */
.home-cursor-glow{ position:fixed; top:0; left:0; width:820px; height:820px; border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,.75), rgba(190,218,255,.35) 45%, transparent 68%);
  pointer-events:none; z-index:0; will-change:transform; opacity:0; transition:opacity .5s; }
.home-cursor-glow.on{ opacity:1; }

.home-inner{ position:relative; z-index:1; max-width:1200px; margin:0 auto; padding:72px 48px 64px; min-height:100%;
  display:flex; flex-direction:column; }

/* ---- Hero ---- */
.home-hero{ position:relative; display:flex; flex-direction:column; align-items:center; text-align:center;
  padding:56px 16px 44px; }
.hero-beam{ width:560px; max-width:80%; height:1px; margin:0 auto 44px;
  background:linear-gradient(90deg, transparent, rgba(37,99,235,.55), transparent); }
.home-watermark{ display:none; }
/* 广告徽章环绕标题 · 浮动漂浮（transform 动画 = GPU 合成，不卡） */
.hero-float-row{ display:flex; align-items:center; justify-content:center; gap:40px; width:100%; }
.hero-float{ display:flex; flex-direction:column; gap:14px; }
.fl-l{ align-items:flex-end; }
.fl-r{ align-items:flex-start; }
.fl-l .fp-2, .fl-r .fp-4{ margin-top:34px; }
.home-pill{ display:inline-flex; align-items:center; gap:8px; font-size:12.5px; font-weight:500; letter-spacing:.3px;
  color:#2c4a85; background:rgba(255,255,255,.78); border:1px solid rgba(37,99,235,.20);
  border-radius:999px; padding:8px 17px; box-shadow:0 3px 14px rgba(37,99,235,.10); }
.float-pill{ animation:floatY 4.6s ease-in-out infinite; will-change:transform; }
.fp-1{ animation-duration:4.2s; }
.fp-2{ animation-duration:5.2s; animation-delay:-1.6s; }
.fp-3{ animation-duration:4.8s; animation-delay:-.9s; }
.fp-4{ animation-duration:5.6s; animation-delay:-2.4s; }
@keyframes floatY{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-11px); } }
.hp-dot{ width:6px; height:6px; border-radius:50%; background:var(--d,#2f6bff);
  box-shadow:0 0 6px var(--d,#2f6bff); }
.home-title{ display:flex; align-items:center; justify-content:center; width:100%;
  font-size:72px; font-weight:750; letter-spacing:-.02em; line-height:1.06; }
.home-title-text{ background:linear-gradient(180deg, #123a8f 10%, #2f6bff 90%);
  -webkit-background-clip:text; background-clip:text;
  color:transparent; -webkit-text-fill-color:transparent;
  filter:drop-shadow(0 3px 10px rgba(37,99,235,.22)); }
.home-desc{ font-size:16px; color:#5b6f94; margin:20px 0 36px; letter-spacing:.3px; line-height:1.85; }
.home-desc b{ font-weight:600; color:#2563eb; }
.home-cta-row{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:center; }
.home-new-btn{ display:inline-flex; align-items:center; gap:8px; font-size:14px; font-weight:600; letter-spacing:.2px;
  color:#fff; background:linear-gradient(135deg, #2f6bff, #0ea5d9); border:1px solid rgba(37,99,235,.5); border-radius:10px; padding:12px 28px;
  cursor:pointer; transition:filter .15s, box-shadow .15s; box-shadow:0 6px 22px rgba(47,107,255,.32); }
.home-new-btn:hover{ filter:brightness(1.1); box-shadow:0 8px 28px rgba(47,107,255,.45); }
.home-new-btn .lc-ic{ width:15px; height:15px; }
.home-ghost-btn{ display:inline-flex; align-items:center; gap:6px; font-size:13.5px; font-weight:500; color:#33589e;
  background:rgba(255,255,255,.7); border:1px solid rgba(37,99,235,.24); border-radius:10px; padding:11px 22px;
  cursor:pointer; text-decoration:none; transition:border-color .15s, color .15s, background .15s; }
.home-ghost-btn:hover{ color:#1d4ed8; border-color:rgba(37,99,235,.5); background:#fff; }

/* ---- 能力标签行（静态 · 淡雅） ---- */
.home-ticker{ display:flex; justify-content:center; margin:10px 0 8px; padding:16px 0;
  border-top:1px solid rgba(37,99,235,.14); border-bottom:1px solid rgba(37,99,235,.14);
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 15%,#000 85%,transparent);
  mask-image:linear-gradient(90deg,transparent,#000 15%,#000 85%,transparent); }
.ticker-track{ display:flex; flex-wrap:nowrap; justify-content:center; overflow:hidden; gap:36px; max-width:100%; }
.ticker-half{ display:flex; gap:36px; padding-right:0; }
.ticker-half span{ font-size:12.5px; font-weight:500; letter-spacing:1.5px; color:#7c92b8; white-space:nowrap; }

/* ---- 数据 ---- */
.home-stats{ display:flex; align-items:center; justify-content:center;
  border-top:1px solid rgba(37,99,235,.14); border-bottom:1px solid rgba(37,99,235,.14); padding:26px 20px; }
.stat{ display:flex; flex-direction:column; align-items:center; gap:5px; padding:0 48px; }
.stat-num{ font-size:28px; font-weight:700; letter-spacing:.2px;
  background:linear-gradient(180deg, #123a8f, #2f6bff); -webkit-background-clip:text; background-clip:text;
  color:transparent; -webkit-text-fill-color:transparent; }
.stat-label{ font-size:12px; color:#6b7fa3; letter-spacing:2px; }
.stat-sep{ width:1px; height:32px; background:rgba(37,99,235,.18); }

/* ---- AI 视频 · 应用场景 ---- */
.home-scenes{ padding:48px 0 6px; }
.home-sec-head{ display:flex; align-items:baseline; gap:14px; padding:0 2px 20px; flex-wrap:wrap; }
.home-sec-title{ font-size:16px; font-weight:650; color:#16294f; letter-spacing:.5px; }
.home-sec-sub{ font-size:13px; color:#6b7fa3; letter-spacing:.3px; }
.scene-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; }
.scene-card{ position:relative; display:flex; flex-direction:column; gap:10px;
  background:rgba(255,255,255,.82); border:1px solid rgba(37,99,235,.16); border-radius:14px; padding:22px 22px 20px;
  cursor:pointer; transition:border-color .15s, transform .15s, box-shadow .15s; }
.scene-card:hover{ transform:translateY(-3px); border-color:rgba(37,99,235,.45); box-shadow:0 14px 32px rgba(37,99,235,.16); background:#fff; }
.scene-ic{ width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  color:#fff; background:linear-gradient(135deg, #2f6bff, #14b8d4);
  box-shadow:0 5px 16px rgba(47,107,255,.30); transition:filter .15s, transform .15s; }
.scene-ic svg{ width:20px; height:20px; }
.scene-card:hover .scene-ic{ filter:brightness(1.12); transform:scale(1.05); }
.scene-name{ font-size:15.5px; font-weight:650; color:#16294f; letter-spacing:.3px; }
.scene-desc{ font-size:13px; line-height:1.8; color:#5b6f94; }
.scene-tags{ display:flex; flex-wrap:wrap; gap:6px; margin-top:auto; padding-top:6px; }
.scene-tags i{ font-style:normal; font-size:11px; color:#2c5db8; background:rgba(47,107,255,.07);
  border:1px solid rgba(37,99,235,.18); border-radius:999px; padding:3px 10px; }
.scene-go{ position:absolute; top:18px; right:18px; font-size:12px; font-weight:600; color:#2563eb;
  opacity:0; transform:translateX(-6px); transition:opacity .16s, transform .16s; }
.scene-card:hover .scene-go{ opacity:1; transform:none; }

/* ---- 最近创作 ---- */
.home-list-head{ padding:44px 0 18px; display:flex; align-items:baseline; gap:14px; }
.home-body{ flex:1; }
.home-list{ display:grid; grid-template-columns:repeat(auto-fill, minmax(272px, 1fr)); gap:14px; }

.hc-card{ display:flex; flex-direction:column; background:rgba(255,255,255,.82); border:1px solid rgba(37,99,235,.16);
  border-radius:14px; overflow:hidden; cursor:pointer;
  transition:border-color .15s, transform .12s ease-out, box-shadow .15s; }
.hc-card:hover{ border-color:rgba(37,99,235,.45); box-shadow:0 14px 34px rgba(37,99,235,.18); background:#fff; }
.hc-cover{ position:relative; aspect-ratio:16/9; display:flex; align-items:center; justify-content:center;
  background:
    radial-gradient(circle, rgba(37,99,235,.08) 1px, transparent 1.5px),
    linear-gradient(160deg, #edf3fe, #e2ecfd);
  background-size: 24px 24px, 100% 100%;
  border-bottom:1px solid rgba(37,99,235,.12); overflow:hidden; }
.hc-cover::after{ content:''; position:absolute; inset:0;
  background:radial-gradient(360px 120px at 50% 0%, rgba(47,107,255,.10), transparent 72%); }
.hc-figure{ position:relative; z-index:1; width:150px; height:66px; max-width:72%;
  transition:transform .16s; }
.hc-card:hover .hc-figure{ transform:scale(1.04); }
.hc-card-body{ display:flex; flex-direction:column; gap:4px; padding:15px 16px 12px; }
.hc-name{ font-size:15px; font-weight:600; color:#16294f; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hc-meta{ font-size:12px; color:#6b7fa3; }
.hc-actions{ display:flex; align-items:center; gap:6px; padding:0 12px 15px; opacity:0; transform:translateY(4px);
  transition:opacity .16s, transform .16s; }
.hc-card:hover .hc-actions{ opacity:1; transform:none; }
.hc-btn{ display:inline-flex; align-items:center; gap:5px; font-size:12px; color:#5b6f94;
  background:transparent; border:1px solid transparent; border-radius:7px; padding:6px 11px; cursor:pointer; transition:background .13s, color .13s; }
.hc-btn:hover{ color:#1d4ed8; background:rgba(47,107,255,.08); }
.hc-btn.primary{ color:#fff; background:linear-gradient(135deg, #2f6bff, #0ea5d9); border:1px solid rgba(37,99,235,.5); font-weight:600; }
.hc-btn.primary:hover{ filter:brightness(1.1); background:linear-gradient(135deg, #2f6bff, #0ea5d9); }
.hc-btn.danger{ color:#98647a; }
.hc-btn.danger:hover{ color:#dc2668; background:rgba(220,38,104,.08); }

.home-empty{ padding:100px 20px 40px; display:flex; flex-direction:column; align-items:center; gap:16px; }
.home-empty-icon{ color:#b9ccec; }
.home-empty-text{ font-size:14px; color:#6b7fa3; }
.home-empty-btn{ font-size:13.5px; font-weight:600; color:#fff; background:linear-gradient(135deg, #2f6bff, #0ea5d9); border:1px solid rgba(37,99,235,.5);
  border-radius:10px; padding:11px 26px; cursor:pointer; transition:filter .15s, box-shadow .15s; box-shadow:0 6px 20px rgba(47,107,255,.28); }
.home-empty-btn:hover{ filter:brightness(1.1); box-shadow:0 8px 26px rgba(47,107,255,.42); }

.home-prompt input{ font-size:14px; }

.home-foot{ margin-top:56px; padding-top:22px; border-top:1px solid rgba(37,99,235,.14);
  text-align:center; font-size:11px; letter-spacing:.35em; color:#8ea3c8; text-transform:uppercase; }

/* ================= 首页特效（一次性入场动效，无持续动画 · 不卡） ================= */
@keyframes homeRise{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }
.hero-beam{ animation:homeRise .8s ease-out both; }
.hero-float-row{ animation:homeRise .7s .08s ease-out both; }
.home-title{ animation:none; }
.home-desc{ animation:homeRise .7s .24s ease-out both; }
.home-cta-row{ animation:homeRise .7s .32s ease-out both; }
.home-ticker{ animation:homeRise .7s .4s ease-out both; }
.home-stats{ animation:homeRise .7s .48s ease-out both; }

/* 左右侧竖排装饰字 */
.home-side{ position:fixed; z-index:0; top:50%; transform:translateY(-50%);
  writing-mode:vertical-rl; text-orientation:mixed;
  font-size:11px; letter-spacing:.45em; font-weight:500;
  color:rgba(37,99,235,.25); text-transform:uppercase;
  pointer-events:none; user-select:none; white-space:nowrap; }
.home-side-l{ left:30px; }
.home-side-r{ right:30px; transform:translateY(-50%) rotate(180deg); }

/* 首页响应式 */
@media (max-width: 960px){
  .scene-grid{ grid-template-columns:repeat(2, 1fr); }
  .home-inner{ padding:52px 28px 56px; }
  .home-title{ font-size:52px; }
  .hero-float-row{ flex-direction:column; gap:16px; }
  .hero-float{ flex-direction:row; align-items:center; gap:12px; }
  .fl-l{ align-items:center; }
  .fl-r{ align-items:center; }
  .fl-l .fp-2, .fl-r .fp-4{ margin-top:0; }
}
@media (max-width: 640px){
  .scene-grid{ grid-template-columns:1fr; }
  .home-title{ font-size:38px; }
  .home-inner{ padding:40px 18px 48px; }
  .home-side{ display:none; }
  .stat{ padding:0 22px; }
}
