/* ═══ LibTV Canvas 复刻 — 全部 token 采样自目标截图 ═══ */
:root {
  --bg: #141414;
  --dot: #373737;
  --card: #171717;
  --card-border: #232323;
  --card-border-hi: #333333;
  --label: #9e9e9e;
  --text: #d9d9d9;
  --text-hi: #ebebeb;
  --text-dim: #5d5d5d;
  --pill: #1e1e1e;
  --circle: #222222;
  --dock: #1c1c1c;
  --line: #262626;
  --teal: #15a1b1;
  --warm: #ffe3ab;
  --edge: #4a4a4a;
  --accent: #15a1b1;
  --sel: #3d84ff;
  --scroll: #87919d;
  /* 圆角三级（xs 控件 / sm 卡片 / md 面板 / lg 抽屉 / xl 大浮层） */
  --r-xs: 7px;
  --r-sm: 8px;
  --r: 10px;
  --r-md: 12px;
  --r-lg: 14px;
  --r-xl: 16px;

  /* 深色语系描边三级（近底 / 常态 / 抬起-hover） */
  --line-1: #202020;
  --line-2: #2a2a2a;
  --line-hi: #333333;
  /* 深色填充：hover 面 / 抬起面（与 line 同族值，语义区分） */
  --fill-hover: #2a2a2a;
  --fill-raise: #333333;

  /* 深色浮层阴影四级（elevation：inline → 弹层 → 抽屉/面板 → 模态） */
  --sh-1: 0 2px 10px rgba(0,0,0,.35);
  --sh-2: 0 10px 30px rgba(0,0,0,.46);
  --sh-3: 0 16px 46px rgba(0,0,0,.52);
  --sh-4: 0 28px 80px rgba(0,0,0,.64);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  /* 图片编辑浮层语系 = 深色（与全站统一，不再用浅色纸白）
     --lv-ink 同时用于「文本」与「主按钮底色」：深色下即浅色文本 + 浅底深字主按钮 */
  --lv-surface: #1e1e1e;      /* 浮层底 */
  --lv-raise: #313131;        /* 分段控件浮起的激活块 */
  --lv-sunken: #151515;       /* 分段控件凹陷轨 */
  --lv-hover: #2b2b2b;        /* hover 填充（比 surface 亮一档） */
  --lv-ink: #eae8e3;          /* 文本 / 主按钮浅底 */
  --lv-ink-soft: #9a938a;     /* 次级文本 */
  --lv-line: #333333;         /* 描边 */
  --lv-shadow-lg: 0 16px 46px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.4);
  --lv-shadow-md: 0 10px 30px rgba(0,0,0,.46);
  --lv-ring: 0 0 0 1px rgba(255,255,255,.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  font-family: var(--font);
  color: var(--text);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
button { font-family: inherit; background: none; border: none; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
svg { display: block; }

/* ═══ 顶栏 ═══ */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; z-index: 40; pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.tb-pill {
  display: flex; align-items: center; gap: 2px;
  background: var(--pill); border-radius: var(--r); padding: 4px 6px;
  box-shadow: var(--sh-1);
}
.tb-item {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 9px; border-radius: var(--r-xs); color: var(--text-hi);
  font-size: 13px; transition: background .12s var(--ease);
}
.tb-item:hover { background: var(--fill-hover); }
.tb-logo { color: #fff; padding: 6px 7px; }
.tb-logo .chev, .tb-canvas .chev { color: #8a8a8a; margin-top: 1px; }
.tb-divider { width: 1px; height: 16px; background: #303030; margin: 0 3px; }
.tb-project span { font-weight: 500; }
.tb-project span[contenteditable="true"] { outline: 1px solid var(--teal); border-radius: 4px; padding: 0 4px; user-select: text; }
.tb-canvas { color: #c7c7c7; }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.tb-circle {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--circle); color: #d3d3d3;
  display: grid; place-items: center;
  box-shadow: var(--sh-1);
  transition: background .12s var(--ease), transform .12s var(--ease);
}
.tb-circle:hover { background: var(--fill-hover); }
.tb-circle:active { transform: scale(.94); }
.tb-market { background: var(--teal); color: #eafcff; }
.tb-market:hover { background: #17b2c3; }

.tb-member-wrap { position: relative; }
.member-badge {
  position: absolute; top: -11px; left: 4px;
  background: linear-gradient(180deg, #ffd98f, #f2b04b);
  color: #5b3a05; font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: var(--r-xs) var(--r-xs) var(--r-xs) 2px;
  white-space: nowrap; z-index: 2; pointer-events: none;
}
.tb-member-pill {
  display: flex; align-items: center; gap: 4px;
  background: var(--pill); border-radius: 20px; padding: 3px 4px 3px 10px;
  box-shadow: var(--sh-1);
}
.member-cta { display: flex; align-items: center; gap: 5px; color: var(--warm); font-size: 12.5px; font-weight: 500; padding: 4px 2px; }
.member-cta:hover { filter: brightness(1.12); }
.member-credit { display: flex; align-items: center; gap: 3px; color: #e8e8e8; font-size: 12.5px; padding: 4px 5px; border-radius: var(--r); }
.member-credit:hover { background: var(--fill-hover); }
.member-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #ffb35c, #f07c2e 70%);
  position: relative; overflow: hidden; border: 1.5px solid var(--line-hi);
}
.avatar-dot { position: absolute; left: 7px; top: 9px; width: 16px; height: 9px; border-radius: 50%; background: #fff3; }
.member-avatar::after {
  content: ''; position: absolute; right: 1px; top: 1px; width: 7px; height: 7px;
  border-radius: 50%; background: #f04438; border: 1.5px solid var(--pill);
}

/* ═══ 画布 ═══ */
.canvas-viewport {
  position: fixed; inset: 0; overflow: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--dot) 0.75px, transparent 0.9px);
  background-size: 16.7px 16.7px;
  cursor: default;
}
.canvas-viewport.panning { cursor: grabbing; }
.canvas-viewport.space-pan { cursor: grab; }
.canvas-viewport.connecting { cursor: crosshair; }

.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.edges-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
.edges-layer path.edge { pointer-events: stroke; cursor: pointer; }

.marquee {
  position: absolute; z-index: 30;
  border: 1px solid rgba(61,132,255,.7); background: rgba(61,132,255,.08);
  pointer-events: none;
}

/* ═══ 节点 ═══ */
.node { position: absolute; z-index: 2; }
.node-label {
  display: flex; align-items: center; gap: 5px;
  color: var(--label); font-size: 12px; margin: 0 2px 6px;
  white-space: nowrap;
}
.node-label svg { flex: none; }
.node-label .nl-name { user-select: text; }
.node-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
  position: relative;
}
.node:hover .node-card { border-color: var(--line-2); }
.node.selected .node-card { border-color: var(--sel); box-shadow: 0 0 0 1px var(--sel), 0 8px 24px rgba(0,0,0,.35); }
.node.selected { z-index: 8; }
.node.dragging { z-index: 10; }
.node.dragging .node-card { box-shadow: var(--sh-3); }

/* 端口 */
.port {
  position: absolute; top: 50%; width: 11px; height: 11px;
  border-radius: 50%; background: #202020; border: 1.5px solid #4d4d4d;
  transform: translateY(-50%); z-index: 5;
  opacity: 0; transition: opacity .12s var(--ease), border-color .12s, background .12s;
  cursor: crosshair;
}
.port-in  { left: -6px; }
.port-out { right: -6px; }
.node:hover .port, .node.selected .port, .canvas-viewport.connecting .port { opacity: 1; }
.port:hover, .port.port-hot { border-color: var(--teal); background: #12343a; box-shadow: 0 0 0 4px rgba(21,161,177,.18); }

/* 剧本节点 */
.node-script .node-card { width: 360px; height: 206px; padding: 14px 6px 14px 18px; }
.script-scroll {
  height: 100%; overflow-y: auto; padding-right: 12px;
  user-select: text; cursor: text; outline: none;
  font-size: 13px; line-height: 1.95; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.script-scroll b, .script-scroll strong { color: var(--text-hi); font-weight: 600; }
.script-scroll::-webkit-scrollbar { width: 5px; }
.script-scroll::-webkit-scrollbar-thumb { background: #454b52; border-radius: 3px; }
.script-scroll::-webkit-scrollbar-thumb:hover { background: var(--scroll); }
.script-scroll:focus { caret-color: var(--teal); }

/* 生成器节点 */
.node-gen .node-card {
  width: 364px; height: 360px;
  border-color: var(--card-border-hi);
  display: grid; place-items: center;
}
.gen-skeleton { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.gen-skeleton i { display: block; height: 9px; border-radius: 4.5px; background: var(--fill-hover); }
.gen-skeleton i:nth-child(1) { width: 46px; }
.gen-skeleton i:nth-child(2) { width: 88px; }
.gen-skeleton i:nth-child(3) { width: 88px; }
.gen-skeleton i:nth-child(4) { width: 60px; align-self: flex-start; margin-left: calc(50% - 44px); }
.node-gen.generating .gen-skeleton i { animation: pulse 1.1s ease-in-out infinite; }
.node-gen.generating .gen-skeleton i:nth-child(2) { animation-delay: .12s; }
.node-gen.generating .gen-skeleton i:nth-child(3) { animation-delay: .24s; }
.node-gen.generating .gen-skeleton i:nth-child(4) { animation-delay: .36s; }
@keyframes pulse { 50% { opacity: .35; } }

.gen-output {
  position: absolute; inset: 0; padding: 16px 8px 16px 18px; display: none;
}
.node-gen.done .gen-output { display: block; }
.node-gen.done .gen-skeleton { display: none; }
.gen-output .script-scroll { height: 100%; }

.gen-run {
  position: absolute; right: 10px; bottom: 10px;
  display: flex; align-items: center; gap: 5px;
  background: #202020; border: 1px solid #313131; color: #cfcfcf;
  font-size: 12px; padding: 5px 12px; border-radius: var(--r-sm);
  opacity: 0; transition: opacity .12s var(--ease), background .12s;
}
.node:hover .gen-run, .node.selected .gen-run { opacity: 1; }
.gen-run:hover { background: var(--teal); border-color: var(--teal); color: #eafcff; }
.node-gen.generating .gen-run { opacity: 1; pointer-events: none; color: var(--teal); background: #16282b; border-color: #1d4a52; }

/* ═══ 左下角 ═══ */
.corner-bl {
  position: fixed; left: 14px; bottom: 14px; z-index: 40;
  display: flex; align-items: center; gap: 6px;
}
.cb-item {
  display: flex; align-items: center; gap: 7px;
  color: #b9b9b9; font-size: 12.5px; padding: 8px 10px; border-radius: var(--r-sm);
  transition: background .12s var(--ease), color .12s;
}
.cb-item:hover { background: #1f1f1f; color: #e6e6e6; }
.cb-item.active { color: var(--teal); }
.cb-icon {
  width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center;
  color: #9a9a9a; transition: background .12s var(--ease), color .12s;
}
.cb-icon:hover { background: #1f1f1f; color: #e0e0e0; }
.cb-icon.cb-active { color: #cfcfcf; background: #232323; }
.cb-zoom {
  min-width: 52px; text-align: center; color: #9e9e9e; font-size: 12.5px;
  padding: 8px 8px; border-radius: var(--r-sm); font-variant-numeric: tabular-nums;
  transition: background .12s var(--ease), color .12s;
}
.cb-zoom:hover { background: #1f1f1f; color: #e0e0e0; }

/* ═══ 底部工具条 ═══ */
.dock {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; z-index: 40;
}
.dock-plus {
  width: 44px; height: 44px; border-radius: 13px;
  background: #f2f2f2; color: #141414;
  display: grid; place-items: center;
  margin-right: 6px;
  transition: background .12s var(--ease), transform .15s var(--ease);
}
.dock-plus:hover { background: #ffffff; transform: scale(1.04); }
.dock-plus:active { transform: scale(.95); }
.dock-plus.menu-open { background: var(--teal); color: #eafcff; }
.dock-pill {
  display: flex; align-items: center; gap: 4px;
  background: var(--dock); border: 1px solid var(--line);
  border-radius: 18px; padding: 7px 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.45);
}
.dock-divider { width: 1px; height: 22px; background: #333; margin: 0 5px; }
.dock-item {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: #b5b5b5; position: relative;
  transition: background .12s var(--ease), color .12s;
}
.dock-item:hover { background: var(--fill-hover); color: #eee; }
.dock-item.active { background: var(--fill-hover); color: var(--teal); }
.dot-badge {
  position: absolute; right: 7px; top: 7px; width: 6px; height: 6px;
  border-radius: 50%; background: #27b3e0; border: 1.5px solid var(--dock);
}

/* ═══ tooltip ═══ */
.tooltip {
  position: fixed; z-index: 90; pointer-events: none;
  background: #060606; color: #ddd; font-size: 12px;
  padding: 5px 9px; border-radius: 6px; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.5);
  opacity: 0; transform: translateY(3px);
  transition: opacity .12s var(--ease), transform .12s var(--ease);
}
.tooltip.show { opacity: 1; transform: translateY(0); }

/* ═══ 菜单 ═══ */
.ctx-menu {
  position: fixed; z-index: 88; min-width: 180px;
  background: #1d1d1d; border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 5px; box-shadow: var(--sh-2);
  animation: menuIn .14s var(--ease);
}
@keyframes menuIn { from { opacity: 0; transform: translateY(5px); } }
.ctx-title { font-size: 11.5px; color: #7a7a7a; padding: 6px 10px 4px; }
.ctx-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 7px 10px; border-radius: var(--r-xs); font-size: 12.5px; color: #d6d6d6;
  transition: background .1s;
}
.ctx-item:hover { background: var(--fill-hover); }
.ctx-item svg { color: #9a9a9a; flex: none; }
.ctx-item .kbd { margin-left: auto; color: #6c6c6c; font-size: 11px; }
.ctx-item.danger { color: #e06c5f; }
.ctx-item.danger svg { color: #e06c5f; }
.ctx-sep { height: 1px; background: var(--fill-hover); margin: 4px 6px; }
.ctx-item.disabled { opacity: .38; pointer-events: none; }

/* ═══ toast ═══ */
.toast-wrap {
  position: fixed; top: 68px; left: 50%; transform: translateX(-50%);
  z-index: 95; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: #202020; border: 1px solid var(--line-2); color: #e2e2e2;
  font-size: 12.5px; padding: 8px 16px; border-radius: var(--r-sm);
  box-shadow: var(--sh-2);
  display: flex; align-items: center; gap: 7px;
  animation: toastIn .18s var(--ease);
}
.toast.out { opacity: 0; transform: translateY(-6px); transition: all .22s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }
.toast .tick { color: #35c07e; }

/* ═══ 抽屉 ═══ */
.drawer {
  position: fixed; top: 64px; bottom: 76px; width: 300px; z-index: 60;
  background: #191919; border: 1px solid #272727; border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  display: flex; flex-direction: column;
  animation: drawerIn .18s var(--ease);
}
.drawer-left { left: 14px; }
.drawer-right { right: 14px; }
@keyframes drawerIn { from { opacity: 0; transform: translateX(var(--slide, -10px)); } }
.drawer-right { --slide: 10px; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 10px; font-size: 13.5px; font-weight: 600; color: #ececec;
}
.drawer-head-actions { display: flex; gap: 4px; }
.drawer-close, .drawer-mini {
  width: 26px; height: 26px; border-radius: var(--r-xs); display: grid; place-items: center;
  color: #8d8d8d; font-size: 13px; transition: background .1s, color .1s;
}
.drawer-close:hover, .drawer-mini:hover { background: #282828; color: #ddd; }
.drawer-tabs { display: flex; gap: 4px; padding: 0 12px 10px; }
.dtab { font-size: 12px; color: #9a9a9a; padding: 4px 10px; border-radius: var(--r-lg); transition: all .1s; }
.dtab:hover { color: #ddd; }
.dtab-active { background: var(--fill-hover); color: #eee; }
.drawer-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: #7c7c7c; font-size: 13px;
}
.drawer-empty .sub { font-size: 11.5px; color: #565656; }

.history-list { flex: 1; overflow-y: auto; padding: 4px 10px 12px; display: none; flex-direction: column; gap: 8px; }
.history-list.has-items { display: flex; }
.drawer:has(.history-list.has-items) #historyEmpty { display: none; }
.history-item {
  background: #1f1f1f; border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 10px 12px; font-size: 12px; color: #c9c9c9;
  display: flex; flex-direction: column; gap: 3px;
}
.history-item .hi-meta { color: #6d6d6d; font-size: 11px; display: flex; justify-content: space-between; }
.history-item .hi-ok { color: #35c07e; }

/* Agent 抽屉 */
.drawer-agent { width: 340px; }
.agent-msgs { flex: 1; overflow-y: auto; padding: 6px 14px; display: flex; flex-direction: column; gap: 10px; }
.agent-msg { max-width: 86%; padding: 9px 12px; border-radius: var(--r-md); font-size: 12.5px; line-height: 1.65; user-select: text; }
.agent-msg-ai { background: #222222; color: #d8d8d8; align-self: flex-start; border-bottom-left-radius: 4px; }
.agent-msg-me { background: #14424a; color: #d9f4f8; align-self: flex-end; border-bottom-right-radius: 4px; }
.agent-msg.typing i { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #8b8b8b; margin: 0 1.5px; animation: pulse .9s infinite; }
.agent-msg.typing i:nth-child(2) { animation-delay: .15s; }
.agent-msg.typing i:nth-child(3) { animation-delay: .3s; }
.agent-input-wrap {
  margin: 10px 12px 12px; display: flex; align-items: flex-end; gap: 6px;
  background: #202020; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 8px 8px 8px 12px;
  transition: border-color .12s;
}
.agent-input-wrap:focus-within { border-color: #3a5a60; }
.agent-input {
  flex: 1; background: none; border: none; outline: none; resize: none;
  color: #e0e0e0; font-size: 12.5px; font-family: inherit; line-height: 1.5;
  max-height: 90px; user-select: text;
}
.agent-input::placeholder { color: #5c5c5c; }
.agent-send {
  width: 28px; height: 28px; border-radius: var(--r-sm); flex: none;
  background: var(--teal); color: #eafcff; display: grid; place-items: center;
  transition: filter .12s, transform .12s;
}
.agent-send:hover { filter: brightness(1.15); }
.agent-send:active { transform: scale(.92); }

/* ═══ 快捷键面板 ═══ */
.modal-mask {
  position: fixed; inset: 0; z-index: 85; background: rgba(0,0,0,.45);
  display: grid; place-items: center;
  animation: fadeIn .15s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: #1c1c1c; border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--sh-4);
  animation: menuIn .16s var(--ease);
}
.keys-modal { width: 520px; max-width: calc(100vw - 40px); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 8px; font-size: 14px; font-weight: 600; color: #ececec;
}
.keys-grid { padding: 8px 18px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 26px; }
.key-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; font-size: 12.5px; color: #c4c4c4; }
.key-caps { display: flex; gap: 4px; }
kbd {
  font-family: inherit; font-size: 11px; color: #d0d0d0;
  background: var(--fill-hover); border: 1px solid var(--line-hi); border-bottom-width: 2px;
  border-radius: 5px; padding: 2px 7px; min-width: 21px; text-align: center;
}

/* 临时连线 */
.edge-temp { stroke: var(--teal); stroke-width: 1.6; fill: none; stroke-dasharray: 5 4; }
path.edge { stroke: var(--edge); stroke-width: 1.6; fill: none; transition: stroke .12s; }
path.edge:hover { stroke: #6d6d6d; }
path.edge.selected { stroke: var(--sel); stroke-width: 2; }
path.edge-hit { stroke: transparent; stroke-width: 14; fill: none; pointer-events: stroke; cursor: pointer; }

/* ═══ v2：分组容器 ═══ */
.group-box { position: absolute; z-index: 1; }
.group-label { color: #8a8a8a; font-size: 12.5px; margin: 0 2px 8px; white-space: nowrap; }
.group-body {
  position: absolute; inset: 24px 0 0 0;
  background: #1d1d1d; border: 1px solid var(--line-2); border-radius: var(--r-lg);
  transition: border-color .12s var(--ease);
}
.group-box:hover .group-body { border-color: #333; }
.group-box.selected .group-body { border-color: var(--sel); }

/* ═══ v2：媒体节点通用 ═══ */
.node-media .node-card { background: #202020; border-color: var(--line-2); }
.node-media .node-label svg { color: #9e9e9e; }

/* 图片节点 */
.node-imgmedia .node-card { width: 204px; height: 290px; padding: 0; overflow: hidden; border-radius: var(--r); }
.img-art { position: absolute; inset: 0; }
.img-art-base {
  position: absolute; inset: 0;
  background:
    radial-gradient(90px 60px at 72% 16%, rgba(255,255,255,.28), transparent 70%),
    linear-gradient(168deg, #9db2c4 0%, #7e93a8 34%, #5a6d82 62%, #3c4a5c 100%);
}
.img-art-trees {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 55%, rgba(20,26,34,.35) 100%),
    radial-gradient(140px 200px at 8% 30%, rgba(44,58,72,.55), transparent 70%),
    radial-gradient(120px 190px at 96% 38%, rgba(44,58,72,.5), transparent 70%);
}
.img-art-figure {
  position: absolute; left: 50%; bottom: -12px; width: 128px; height: 190px;
  transform: translateX(-52%);
  background:
    radial-gradient(34px 26px at 50% 13%, #2a2e33 60%, transparent 62%),
    radial-gradient(46px 40px at 50% 8%, #23262b 55%, transparent 60%),
    linear-gradient(178deg, transparent 16%, #23262c 20%, #1b1e23 70%);
  border-radius: 42% 42% 8% 8% / 26% 26% 4% 4%;
}
.img-art-scarf {
  position: absolute; left: 50%; bottom: 96px; width: 62px; height: 46px;
  transform: translateX(-54%) rotate(-4deg);
  background: linear-gradient(172deg, #7fa3c7, #567b9e 70%);
  border-radius: var(--r-lg) var(--r-xl) var(--r) var(--r-md);
}
.img-art-scarf::after {
  content: ''; position: absolute; left: 8px; top: 32px; width: 20px; height: 52px;
  background: linear-gradient(178deg, #6f95ba, #4d7194);
  border-radius: var(--r-sm);
}
.img-art-snow {
  position: absolute; inset: 0; opacity: .9;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, #fff 50%, transparent 55%),
    radial-gradient(1.2px 1.2px at 34% 9%, #fff 50%, transparent 55%),
    radial-gradient(1.8px 1.8px at 55% 24%, #fff 50%, transparent 55%),
    radial-gradient(1.1px 1.1px at 78% 12%, #fff 50%, transparent 55%),
    radial-gradient(1.5px 1.5px at 90% 30%, #fff 50%, transparent 55%),
    radial-gradient(1.3px 1.3px at 22% 42%, #fff 50%, transparent 55%),
    radial-gradient(1.7px 1.7px at 66% 48%, #fff 50%, transparent 55%),
    radial-gradient(1.2px 1.2px at 44% 62%, #fff 50%, transparent 55%),
    radial-gradient(1.6px 1.6px at 85% 66%, #fff 50%, transparent 55%),
    radial-gradient(1.1px 1.1px at 8% 74%, #fff 50%, transparent 55%),
    radial-gradient(1.4px 1.4px at 30% 88%, #fff 50%, transparent 55%),
    radial-gradient(1.5px 1.5px at 60% 82%, #fff 50%, transparent 55%);
}
.img-chip {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  background: rgba(10,10,10,.55); color: #ddd; font-size: 10.5px;
  padding: 3px 7px; border-radius: 5px; backdrop-filter: blur(4px);
}
.img-action {
  position: absolute; right: 8px; top: 8px; z-index: 2;
  width: 26px; height: 26px; border-radius: var(--r-xs);
  background: rgba(14,14,14,.6); color: #ddd; display: grid; place-items: center;
  opacity: 0; transition: opacity .12s var(--ease), background .12s;
  backdrop-filter: blur(4px);
}
.node:hover .img-action { opacity: 1; }
.img-action:hover { background: rgba(40,40,40,.85); }

/* 高清节点 */
.node-hd .node-card {
  width: 200px; height: 200px;
  display: grid; place-items: center;
}
.hd-empty { color: #9e9e9e; font-size: 12px; padding: 0 20px; text-align: center; line-height: 1.7; }
.node-hd.done .hd-empty { display: none; }
.hd-result { position: absolute; inset: 0; border-radius: var(--r); overflow: hidden; display: none; }
.node-hd.done .hd-result { display: block; }
.hd-badge {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  background: rgba(10,10,10,.55); color: #ddd; font-size: 10.5px;
  padding: 3px 7px; border-radius: 5px;
}
.node-hd.generating .hd-empty { color: var(--teal); }

/* 视频节点 */
.node-vidmedia .node-card {
  width: 356px; height: 197px;
  background: #202020; border-color: #303030;
  border-radius: var(--r-md); overflow: hidden;
}
.node-vidmedia.selected .node-card { border-color: var(--sel); }
.vid-play {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  color: #525252; transition: color .15s var(--ease);
}
.node-vidmedia:hover .vid-play { color: #6a6a6a; }
.vid-try { position: absolute; left: 14px; bottom: 12px; display: flex; flex-direction: column; gap: 7px; }
.vid-try-label { color: #8a8a8a; font-size: 11px; }
.vid-try-item {
  display: flex; align-items: center; gap: 6px;
  color: #9f9f9f; font-size: 11.5px; text-align: left;
  transition: color .12s;
}
.vid-try-item:hover { color: #e0e0e0; }
.vid-try-item svg { flex: none; color: #8a8a8a; }
.vid-poster { position: absolute; inset: 0; display: none; }
.node-vidmedia.done .vid-poster { display: block; }
.node-vidmedia.done .vid-try, .node-vidmedia.done .vid-play { display: none; }
.vid-poster-art {
  position: absolute; inset: 0;
  background:
    radial-gradient(220px 120px at 30% 76%, rgba(226,170,92,.32), transparent 70%),
    radial-gradient(260px 150px at 78% 24%, rgba(96,134,190,.28), transparent 70%),
    linear-gradient(160deg, #2b3038 0%, #1d2026 55%, #15171b 100%);
}
.vid-poster .vid-play2 {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff;
  display: grid; place-items: center; backdrop-filter: blur(3px);
}
.vid-dur {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(10,10,10,.6); color: #ddd; font-size: 10.5px;
  padding: 2px 6px; border-radius: 4px; font-variant-numeric: tabular-nums;
}
.node-vidmedia.generating .vid-play { display: none; }
.node-vidmedia.generating .vid-try { display: none; }
.vid-loading {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center; flex-direction: column; gap: 10px;
  color: #9e9e9e; font-size: 12px;
}
.node-vidmedia.generating .vid-loading { display: flex; }
.vid-loading .bar {
  width: 150px; height: 3px; border-radius: 2px; background: var(--fill-hover); overflow: hidden; position: relative;
}
.vid-loading .bar i {
  position: absolute; inset: 0; width: 40%;
  background: var(--teal); border-radius: 2px;
  animation: slide 1.1s ease-in-out infinite alternate;
}
@keyframes slide { to { transform: translateX(150%); } }

/* ⊕ 连接端口（视频节点常显样式） */
.port-plus { opacity: 1 !important; background: #1c1c1c; border-color: #4a4a4a; }
.port-plus::before, .port-plus::after {
  content: ''; position: absolute; background: #8a8a8a; border-radius: 1px;
}
.port-plus::before { left: 2.5px; right: 2.5px; top: 50%; height: 1.2px; margin-top: -0.6px; }
.port-plus::after { top: 2.5px; bottom: 2.5px; left: 50%; width: 1.2px; margin-left: -0.6px; }

/* ═══ v2：生成参数面板 ═══ */
.gen-panel {
  position: fixed; z-index: 55; width: 656px;
  background: #262626; border: 1px solid #333; border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  padding: 12px 14px 10px;
  display: flex; flex-direction: column; gap: 10px;
  animation: menuIn .16s var(--ease);
}
.gp-tabs { display: flex; align-items: center; gap: 7px; }
.gp-tab {
  font-size: 12.5px; color: #969696; padding: 5px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line-hi); transition: all .12s var(--ease);
}
.gp-tab:hover { color: #d5d5d5; border-color: #4a4a4a; }
.gp-tab-active { background: #3c3c3c; border-color: #3c3c3c; color: #f0f0f0; font-weight: 500; }
.gp-expand { margin-left: auto; width: 26px; height: 26px; border-radius: var(--r-xs); display: grid; place-items: center; color: #8d8d8d; }
.gp-expand:hover { background: #303030; color: #ddd; }
.gen-panel.expanded { width: 860px; }
.gen-panel.expanded .gp-input { min-height: 130px; }

.gp-slots { display: flex; gap: 8px; }
.gp-slot {
  width: 74px; height: 54px; border-radius: 9px;
  border: 1px dashed #454545; color: #8a8a8a; font-size: 11px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: all .12s;
}
.gp-slot:hover { border-color: #5c5c5c; color: #c9c9c9; }
.gp-slot.filled { border-style: solid; border-color: var(--line-hi); background: #1f1f1f; color: #d5d5d5; }

.gp-tools { display: flex; gap: 8px; }
.gp-tool {
  width: 54px; height: 48px; border-radius: 9px;
  background: var(--fill-hover); border: 1px solid var(--line-hi); color: #b9b9b9;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; transition: all .12s var(--ease);
}
.gp-tool:hover { background: var(--fill-raise); color: #e6e6e6; }
.gp-tool svg { color: #a5a5a5; }

.gp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gp-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: #16333a; border: 1px solid #1d4a52; color: #9fd6de;
  font-size: 11.5px; padding: 3px 8px; border-radius: var(--r-xs);
}
.gp-chip button { color: #6fa9b2; font-size: 11px; line-height: 1; }
.gp-chip button:hover { color: #d6f2f6; }

.gp-input {
  background: none; border: none; outline: none; resize: none;
  color: #e3e3e3; font-size: 13px; font-family: inherit; line-height: 1.6;
  min-height: 58px; user-select: text; padding: 2px 2px 0;
}
.gp-input::placeholder { color: #6f6f6f; }

.gp-bottom { display: flex; align-items: center; gap: 6px; }
.gp-ctl {
  display: flex; align-items: center; gap: 5px;
  color: #c9c9c9; font-size: 12px; padding: 6px 9px; border-radius: var(--r-sm);
  transition: background .12s;
  white-space: nowrap;
}
.gp-ctl:hover { background: #303030; }
.gp-ctl .chev { color: #7c7c7c; }
.gp-flex { flex: 1; }
.gp-icon {
  width: 30px; height: 30px; border-radius: var(--r-sm); display: grid; place-items: center;
  color: #a2a2a2; transition: all .12s;
}
.gp-icon:hover { background: #303030; color: #e4e4e4; }
.gp-cost { display: flex; align-items: center; gap: 3px; color: #d5d5d5; font-size: 12px; padding: 0 4px; font-variant-numeric: tabular-nums; }
.gp-submit {
  width: 34px; height: 34px; border-radius: 50%; margin-left: 2px;
  background: #585858; color: #cfcfcf; display: grid; place-items: center;
  transition: all .15s var(--ease);
}
.gp-submit:not(:disabled) { background: #f2f2f2; color: #141414; }
.gp-submit:not(:disabled):hover { background: #fff; transform: scale(1.06); }
.gp-submit:disabled { cursor: not-allowed; }

/* 面板弹出层（模型/规格/运镜/数量） */
.gp-popover {
  position: fixed; z-index: 82; min-width: 230px;
  background: #1d1d1d; border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 10px; box-shadow: var(--sh-3);
  animation: menuIn .14s var(--ease);
}
.gpp-title { font-size: 11px; color: #7a7a7a; padding: 2px 4px 7px; }
.gpp-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.gpp-opt {
  font-size: 12px; color: #c4c4c4; padding: 5px 10px; border-radius: var(--r-xs);
  border: 1px solid var(--line-hi); transition: all .1s;
}
.gpp-opt:hover { border-color: #4a4a4a; color: #eee; }
.gpp-opt.on { background: #16333a; border-color: #1d6470; color: #7fd0dc; }
.gpp-model {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 9px; border-radius: var(--r-sm); font-size: 12.5px; color: #d6d6d6;
  transition: background .1s; text-align: left;
}
.gpp-model:hover { background: var(--fill-hover); }
.gpp-model.on { background: #16333a; }
.gpp-model .m-tag { margin-left: auto; font-size: 10.5px; color: #f2b04b; }
.gpp-model .m-cost { font-size: 11px; color: #8a8a8a; }
.gpp-search {
  width: 100%; background: #262626; border: 1px solid #333; border-radius: var(--r-sm);
  color: #ddd; font-size: 12px; padding: 6px 9px; outline: none; margin-bottom: 9px;
  font-family: inherit;
}
.gpp-search::placeholder { color: #666; }
.gpp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 210px; overflow-y: auto; }
.gpp-cam {
  font-size: 11.5px; color: #c0c0c0; padding: 7px 4px; border-radius: var(--r-xs);
  background: #262626; border: 1px solid #333; transition: all .1s;
}
.gpp-cam:hover { border-color: #4a4a4a; color: #eee; }
.gpp-cam.on { background: #16333a; border-color: #1d6470; color: #7fd0dc; }
.gpp-foot { display: flex; gap: 6px; margin-top: 9px; }
.gpp-foot button {
  flex: 1; font-size: 11.5px; color: #b9b9b9; padding: 6px 0; border-radius: var(--r-xs);
  border: 1px dashed #404040;
}
.gpp-foot button:hover { color: #eee; border-color: #555; }
.gpp-switch { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; }
.gpp-switch span { font-size: 12px; color: #c4c4c4; }
.gpp-toggle {
  width: 34px; height: 19px; border-radius: var(--r); background: var(--fill-raise); position: relative;
  transition: background .15s;
}
.gpp-toggle::after {
  content: ''; position: absolute; left: 2.5px; top: 2.5px; width: 14px; height: 14px;
  border-radius: 50%; background: #cfcfcf; transition: transform .15s var(--ease);
}
.gpp-toggle.on { background: var(--teal); }
.gpp-toggle.on::after { transform: translateX(15px); background: #fff; }

/* ═══ 灯箱 ═══ */
.lightbox {
  position: fixed; inset: 0; z-index: 96; background: rgba(0,0,0,.75);
  display: grid; place-items: center; animation: fadeIn .15s var(--ease);
}
.lightbox-body {
  width: 408px; height: 580px; border-radius: var(--r-lg); overflow: hidden; position: relative;
  box-shadow: var(--sh-4);
}
.lightbox-close {
  position: absolute; right: 24px; top: 20px; width: 34px; height: 34px;
  border-radius: 50%; background: #ffffff18; color: #eee; font-size: 15px;
}
.lightbox-close:hover { background: #ffffff2e; }

/* ═══ v3：媒体节点 hover 工具栏 ═══ */
.media-toolbar {
  position: absolute; left: 50%; top: -36px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px;
  background: #1d1d1d; border: 1px solid var(--line-2); border-radius: 9px;
  padding: 3px 4px; z-index: 6; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .13s var(--ease), transform .13s var(--ease);
  box-shadow: 0 6px 20px rgba(0,0,0,.45);
}
.node:hover .media-toolbar, .node.selected .media-toolbar {
  opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(-3px);
}
.mt-video { display: none; }
.node-vidmedia.done .mt-video { display: flex; }
.mt-btn {
  display: flex; align-items: center; gap: 4px;
  color: #c4c4c4; font-size: 11.5px; padding: 5px 8px; border-radius: 6px;
  transition: background .1s, color .1s;
}
.mt-btn:hover { background: var(--fill-hover); color: #f0f0f0; }
.mt-btn.danger:hover { color: #e06c5f; }
.mt-sep { width: 1px; height: 14px; background: #333; margin: 0 2px; }

/* ═══ v3：通用确认弹窗 ═══ */
.confirm-modal { width: 380px; padding: 18px 18px 14px; }
.confirm-title { font-size: 14px; font-weight: 600; color: #ececec; margin-bottom: 10px; }
.confirm-text { font-size: 12.5px; color: #b9b9b9; line-height: 1.7; margin-bottom: 16px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn-ghost, .btn-primary {
  font-size: 12.5px; padding: 7px 16px; border-radius: var(--r-sm);
  transition: all .12s var(--ease);
}
.btn-ghost { color: #b9b9b9; border: 1px solid var(--line-hi); }
.btn-ghost:hover { color: #eee; border-color: #4c4c4c; }
.btn-primary { background: var(--teal); color: #eafcff; }
.btn-primary:hover { filter: brightness(1.12); }

/* ═══ v3：灵感对话框 ═══ */
.inspire-modal { width: 480px; padding: 18px; }
.inspire-modes { display: flex; gap: 10px; margin: 12px 0 14px; }
.inspire-mode {
  flex: 1; text-align: left; padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--line-hi); transition: all .12s var(--ease);
}
.inspire-mode:hover { border-color: #4a4a4a; }
.inspire-mode.on { border-color: var(--teal); background: #14282c; }
.inspire-mode b { display: block; font-size: 13px; color: #ececec; font-weight: 600; margin-bottom: 4px; }
.inspire-mode span { font-size: 11.5px; color: #8f8f8f; line-height: 1.5; }
.inspire-input {
  width: 100%; background: #202020; border: 1px solid #333; border-radius: var(--r);
  color: #e0e0e0; font-size: 12.5px; font-family: inherit; line-height: 1.6;
  padding: 10px 12px; outline: none; resize: none; min-height: 74px;
  user-select: text; margin-bottom: 14px;
}
.inspire-input::placeholder { color: #5c5c5c; }
.inspire-input:focus { border-color: #3a5a60; }

/* ═══ v3：剧本全屏编辑器 ═══ */
.script-modal { width: 720px; height: 78vh; display: flex; flex-direction: column; }
.script-modal .modal-head { flex: none; }
.script-editor {
  flex: 1; margin: 4px 18px 18px; overflow-y: auto;
  background: #202020; border: 1px solid #303030; border-radius: var(--r-md);
  padding: 18px 20px; outline: none; user-select: text; cursor: text;
  font-size: 13.5px; line-height: 2.05; color: var(--text);
  white-space: pre-wrap;
}
.script-editor b { color: var(--text-hi); font-weight: 600; }
.script-editor::-webkit-scrollbar { width: 6px; }
.script-editor::-webkit-scrollbar-thumb { background: #454b52; border-radius: 3px; }
.script-hint { flex: none; font-size: 11px; color: #6a6a6a; padding: 0 20px 14px; }

/* ═══ v4：对齐参考线 ═══ */
.guide { position: absolute; background: #e0524d; z-index: 40; pointer-events: none; }
.guide-v { width: 1px; top: -100000px; height: 200000px; }
.guide-h { height: 1px; left: -100000px; width: 200000px; }

/* ═══ v4：资产网格 ═══ */
.asset-grid {
  flex: 1; overflow-y: auto; padding: 4px 12px 14px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start;
}
.asset-card { cursor: pointer; }
.asset-thumb {
  position: relative; height: 88px; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--line-2); transition: border-color .12s;
}
.asset-card:hover .asset-thumb { border-color: #4a4a4a; }
.asset-thumb .vid-poster-art, .asset-thumb .img-art { position: absolute; inset: 0; }
.asset-tag {
  position: absolute; left: 5px; top: 5px; background: rgba(10,10,10,.6);
  color: #ccc; font-size: 9.5px; padding: 1.5px 5px; border-radius: 4px;
}
.asset-name { font-size: 11px; color: #b0b0b0; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-time { font-size: 10px; color: #616161; margin-top: 1px; }

/* ═══ v4：Agent 设置 / 拖入聊天 ═══ */
.agent-settings { min-width: 250px; }
.agset-row { padding: 7px 9px; border-radius: var(--r-sm); cursor: pointer; transition: background .1s; }
.agset-row:hover { background: var(--fill-hover); }
.agset-row b { display: block; font-size: 12.5px; color: #d9d9d9; font-weight: 500; margin-bottom: 2px; }
.agset-row span { font-size: 11px; color: #8a8a8a; line-height: 1.5; }
.agset-row.on { background: #16333a; }
.agset-row.on b { color: #8fd8e2; }
.drawer-agent.droptarget { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(21,161,177,.25), 0 14px 44px rgba(0,0,0,.5); }
.agent-ctx-chip {
  align-self: flex-end; display: inline-flex; align-items: center; gap: 6px;
  background: #1d2f33; border: 1px solid #1d4a52; color: #9fd6de;
  font-size: 11.5px; padding: 5px 10px; border-radius: 9px;
}

/* ═══ v4：会员弹窗 / 发布弹窗 ═══ */
.vip-modal { width: 420px; padding: 20px; }
.vip-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.vip-head b { font-size: 16px; color: #ffe3ab; }
.vip-head span { font-size: 11px; color: #f2b04b; background: #3a2f1a; padding: 2px 8px; border-radius: 6px; }
.vip-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.vip-list li { list-style: none; display: flex; gap: 8px; font-size: 12.5px; color: #c9c9c9; }
.vip-list li::before { content: '·'; color: #f2b04b; font-weight: 700; }
.btn-vip {
  width: 100%; padding: 10px 0; border-radius: var(--r); font-size: 13.5px; font-weight: 600;
  background: linear-gradient(180deg, #ffb45c, #f07c2e); color: #4a2500;
  transition: filter .12s;
}
.btn-vip:hover { filter: brightness(1.08); }
.publish-input {
  width: 100%; background: #202020; border: 1px solid #333; border-radius: 9px;
  color: #e0e0e0; font-size: 12.5px; font-family: inherit; padding: 9px 11px;
  outline: none; margin-bottom: 12px; user-select: text;
}
.publish-input:focus { border-color: #3a5a60; }
.publish-note { font-size: 11.5px; color: #8a8a8a; line-height: 1.6; margin-bottom: 14px; }

/* ═══ v5：分镜脚本表格节点 ═══ */
.node-storyboard .node-card { width: 620px; min-height: 240px; padding: 10px 12px 12px; }
.sb-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.sb-table th {
  color: #8a8a8a; font-weight: 500; text-align: left; padding: 6px 8px;
  border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
.sb-table td {
  color: #c9c9c9; padding: 7px 8px; border-bottom: 1px solid #232323;
  vertical-align: top; line-height: 1.55;
}
.sb-table td[contenteditable] { outline: none; cursor: text; user-select: text; border-radius: 4px; }
.sb-table td[contenteditable]:focus { background: #202020; box-shadow: inset 0 0 0 1px #3a5a60; }
.sb-table .sb-num { color: #7a7a7a; white-space: nowrap; }
.sb-table .sb-dur { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sb-row-stale td:first-child::after { content: ' ⟳'; color: #d9a24a; font-size: 10px; }
.sb-footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.sb-btn {
  font-size: 11.5px; color: #b9b9b9; padding: 5px 11px; border-radius: var(--r-xs);
  border: 1px solid var(--line-hi); transition: all .12s;
}
.sb-btn:hover { color: #eee; border-color: #4a4a4a; }
.sb-btn.primary { background: var(--teal); border-color: var(--teal); color: #eafcff; }
.sb-btn.primary:hover { filter: brightness(1.12); }
.sb-total { margin-left: auto; font-size: 11px; color: #7a7a7a; font-variant-numeric: tabular-nums; }
.sb-ok { color: #35c07e; margin-right: 3px; }

/* ═══ v5：图片节点待生成态 ═══ */
.img-pending {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: #1e1e1e; z-index: 1;
}
.node-imgmedia.done .img-pending { display: none; }
.node-imgmedia:not(.done) .img-chip, .node-imgmedia:not(.done) .img-action { display: none; }
.node-imgmedia.generating .img-pending .gen-skeleton i { animation: pulse 1.1s ease-in-out infinite; }

/* 分镜图组工具行 */
.group-tools {
  position: absolute; top: -4px; right: 0; display: flex; gap: 6px;
  opacity: 0; transition: opacity .12s var(--ease);
}
.group-box:hover .group-tools, .group-box.selected .group-tools { opacity: 1; }
.group-tools .sb-btn { background: #1d1d1d; }

/* ═══ v5：图片生成器成图网格 ═══ */
.gen-grid { position: absolute; inset: 12px; display: none; grid-template-columns: 1fr 1fr; gap: 8px; }
.node-gen.done .gen-grid { display: grid; }
.node-gen.done .gen-output { display: none; }
.node-gen.gen-image.done .gen-skeleton { display: none; }
.gen-grid .cell { position: relative; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line-2); }
.gen-grid .cell .img-art { position: absolute; inset: 0; }
.gen-grid .cell:nth-child(2) .img-art-base { filter: hue-rotate(14deg) brightness(1.06); }
.gen-grid .cell:nth-child(3) .img-art-base { filter: hue-rotate(-16deg) brightness(.95); }
.gen-grid .cell:nth-child(4) .img-art-base { filter: saturate(.7) brightness(1.1); }

/* ═══ v6：导演台 ═══ */
.node-director .node-card { width: 420px; height: 320px; overflow: hidden; }
.dt-stage {
  position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(180deg, #1a1d22 0%, #16181c 55%, #101113 100%);
}
.dt-floor {
  position: absolute; left: -60%; right: -60%; bottom: -110px; height: 300px;
  background-image:
    linear-gradient(#2c3038 1px, transparent 1px),
    linear-gradient(90deg, #2c3038 1px, transparent 1px);
  background-size: 44px 44px;
  transform: perspective(340px) rotateX(62deg);
  transform-origin: 50% 0;
}
.dt-empty {
  position: absolute; left: 0; right: 0; top: 42%; text-align: center;
  color: #8a8a8a; font-size: 12px;
}
.dt-actor {
  position: absolute; width: 34px; height: 74px;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 6px 4px rgba(0,0,0,.5));
}
.dt-actor::before {
  content: ''; position: absolute; left: 50%; top: 0; width: 18px; height: 18px;
  border-radius: 50%; background: #b9bec7; transform: translateX(-50%);
}
.dt-actor::after {
  content: ''; position: absolute; left: 50%; top: 19px; width: 24px; height: 55px;
  background: linear-gradient(180deg, #a6acb8, #7c828e);
  border-radius: var(--r) var(--r) var(--r-xs) var(--r-xs); transform: translateX(-50%);
}
.dt-prop {
  position: absolute; width: 40px; height: 30px; transform: translate(-50%, -100%);
  background: linear-gradient(160deg, #6f7681, #4c525c);
  border-radius: 5px; box-shadow: 0 6px 5px rgba(0,0,0,.45);
}
.dt-toolbar {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 2;
}
.dt-toolbar .sb-btn { background: rgba(20,20,20,.75); backdrop-filter: blur(4px); }
.dt-actions { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; z-index: 2; }
.dt-actions .sb-btn { background: rgba(20,20,20,.75); font-size: 11px; padding: 4px 9px; }

/* ═══ v6：音频节点 ═══ */
.node-audio .node-card { width: 360px; height: 118px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.au-play {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--fill-hover); color: #ddd; display: grid; place-items: center;
  transition: background .12s;
}
.au-play:hover { background: #353535; }
.au-play.playing { background: var(--teal); color: #eafcff; }
.au-wave { flex: 1; display: flex; align-items: center; gap: 2.5px; height: 44px; }
.au-wave i { flex: 1; background: #4b525c; border-radius: 2px; height: var(--h, 30%); transition: background .12s; }
.node-audio .playing ~ .au-wave i, .au-wave.playing i { background: #79cfdb; animation: wavebob 0.9s ease-in-out infinite alternate; }
.au-wave.playing i:nth-child(2n) { animation-delay: .12s; }
.au-wave.playing i:nth-child(3n) { animation-delay: .24s; }
@keyframes wavebob { to { transform: scaleY(1.5); } }
.au-dur { flex: none; color: #8a8a8a; font-size: 11px; font-variant-numeric: tabular-nums; }

/* ═══ v6：时间轴合成弹窗 ═══ */
.tl-modal { width: 780px; padding: 0 0 16px; }
.tl-tracks { margin: 6px 18px 12px; display: flex; flex-direction: column; gap: 8px; }
.tl-track { display: flex; align-items: center; gap: 10px; }
.tl-track-label { flex: none; width: 52px; font-size: 11px; color: #8a8a8a; text-align: right; }
.tl-lane {
  flex: 1; height: 52px; background: #1f1f1f; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  display: flex; align-items: center; gap: 4px; padding: 5px; overflow-x: auto;
}
.tl-clip {
  height: 100%; border-radius: 6px; overflow: hidden; position: relative;
  border: 1px solid var(--line-hi); flex: none; cursor: grab;
}
.tl-clip .vid-poster-art { position: absolute; inset: 0; }
.tl-clip span {
  position: absolute; left: 5px; bottom: 3px; font-size: 9.5px; color: #ddd;
  background: rgba(0,0,0,.5); padding: 1px 4px; border-radius: 3px;
}
.tl-clip-audio { background: repeating-linear-gradient(90deg, #1d3a40 0 5px, #16292d 5px 10px); }
.tl-lane-empty { color: #5c5c5c; font-size: 11px; padding-left: 8px; }
.tl-toolbar { display: flex; gap: 8px; margin: 0 18px 12px; }
.tl-meta { margin-left: auto; font-size: 11.5px; color: #8a8a8a; align-self: center; font-variant-numeric: tabular-nums; }
.tl-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 0 18px; }

/* ═══ v6：通知中心 ═══ */
.notif-wrap { position: relative; }
.notif-dot {
  position: absolute; right: 8px; top: 8px; width: 7px; height: 7px;
  border-radius: 50%; background: #f04438; border: 1.5px solid var(--circle);
}
.notif-panel {
  position: fixed; z-index: 70; width: 300px; max-height: 380px;
  background: #1d1d1d; border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  display: flex; flex-direction: column;
  animation: menuIn .14s var(--ease);
}
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; font-size: 13px; font-weight: 600; color: #ececec; }
.notif-readall { font-size: 11px; color: #8fb9c2; }
.notif-readall:hover { color: #b8e2ea; }
.notif-empty { padding: 34px 0 38px; text-align: center; color: #6a6a6a; font-size: 12px; }
.notif-list { overflow-y: auto; padding: 0 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.notif-item { padding: 9px 10px; border-radius: var(--r-sm); font-size: 12px; color: #c4c4c4; line-height: 1.55; }
.notif-item:hover { background: #262626; }
.notif-item.unread { position: relative; padding-left: 20px; }
.notif-item.unread::before { content: ''; position: absolute; left: 8px; top: 15px; width: 5px; height: 5px; border-radius: 50%; background: #27b3e0; }
.notif-item .nt-time { display: block; color: #666; font-size: 10.5px; margin-top: 2px; }

/* ═══ v6：协作成员/邀请 ═══ */
.tb-collab { display: flex; align-items: center; gap: 0; margin-right: 2px; }
.collab-avatar {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid #141414;
  background: radial-gradient(circle at 35% 32%, #7fc5ff, #2f6fb8 70%);
  margin-left: -8px; position: relative;
}
.collab-avatar:first-child { margin-left: 0; }
.collab-avatar.me { background: radial-gradient(circle at 35% 32%, #ffb35c, #f07c2e 70%); }
.collab-invite {
  height: 28px; padding: 0 12px; margin-left: 6px; border-radius: var(--r-lg);
  background: var(--pill); color: #c9c9c9; font-size: 12px;
  box-shadow: var(--sh-1);
  transition: background .12s, color .12s;
}
.collab-invite:hover { background: var(--fill-hover); color: #eee; }
.invite-modal { width: 430px; padding: 18px; }
.invite-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 12.5px; color: #c4c4c4; }
.invite-link {
  flex: 1; background: #202020; border: 1px solid #303030; border-radius: var(--r-sm);
  padding: 8px 11px; font-size: 12px; color: #9e9e9e;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 8px;
  user-select: all;
}

/* ═══ v6：会员超市 ═══ */
.market-modal { width: 640px; padding: 20px; }
.market-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.market-card {
  border: 1px solid #303030; border-radius: var(--r-md); overflow: hidden;
  transition: border-color .12s, transform .12s var(--ease);
  cursor: pointer;
}
.market-card:hover { border-color: #4a4a4a; transform: translateY(-2px); }
.market-thumb { position: relative; height: 96px; }
.market-thumb .img-art, .market-thumb .vid-poster-art { position: absolute; inset: 0; }
.market-tag {
  position: absolute; right: 6px; top: 6px; font-size: 10px; color: #5b3a05;
  background: linear-gradient(180deg, #ffd98f, #f2b04b); padding: 2px 7px; border-radius: 6px; font-weight: 600;
}
.market-body { padding: 10px 11px 11px; }
.market-body b { display: block; font-size: 12.5px; color: #e6e6e6; font-weight: 600; margin-bottom: 3px; }
.market-body span { font-size: 11px; color: #8a8a8a; }
.market-try {
  margin-top: 8px; width: 100%; padding: 6px 0; border-radius: var(--r-xs); font-size: 11.5px;
  border: 1px solid #1d6470; color: #7fd0dc; transition: all .12s;
}
.market-try:hover { background: #16333a; }

/* ═══ v7：跟随视角横幅 ═══ */
.follow-banner {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  z-index: 75; display: flex; align-items: center; gap: 10px;
  background: #14333a; border: 1px solid #1d5560; color: #a7dde6;
  font-size: 12.5px; padding: 7px 8px 7px 14px; border-radius: 20px;
  box-shadow: 0 8px 26px rgba(0,0,0,.45);
  animation: menuIn .16s var(--ease);
}
.follow-banner .btn-ghost { padding: 4px 12px; font-size: 11.5px; border-color: #2a6570; color: #a7dde6; }
.follow-banner .btn-ghost:hover { border-color: #3d8896; color: #d4f2f7; }
.canvas-viewport.following { outline: 2px solid #1d5560; outline-offset: -2px; }

/* ═══ v7：充值弹窗 ═══ */
.recharge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 12px 0 14px; }
.recharge-opt {
  border: 1px solid var(--line-hi); border-radius: var(--r); padding: 12px 6px 10px;
  text-align: center; transition: all .12s;
}
.recharge-opt:hover { border-color: #4a4a4a; }
.recharge-opt.on { border-color: #f2b04b; background: #2a2214; }
.recharge-opt b { display: block; font-size: 15px; color: #ffe3ab; font-weight: 700; }
.recharge-opt i { display: block; font-style: normal; font-size: 10.5px; color: #8a8a8a; margin-top: 3px; }
.recharge-opt .bonus { color: #f2b04b; }
.pay-methods { display: flex; gap: 8px; margin-bottom: 16px; }
.pay-method {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line-hi); border-radius: 9px; padding: 9px 0;
  font-size: 12.5px; color: #c4c4c4; transition: all .12s;
}
.pay-method.on { border-color: #1d6470; background: #14282c; color: #8fd8e2; }

/* ═══ v7：配音面板 ═══ */
.dub-modal { width: 520px; padding: 18px; }
.dub-text {
  width: 100%; min-height: 96px; background: #202020; border: 1px solid #333;
  border-radius: var(--r); color: #e0e0e0; font-size: 12.5px; font-family: inherit;
  line-height: 1.8; padding: 10px 12px; outline: none; resize: none; user-select: text;
}
.dub-text:focus { border-color: #3a5a60; }
.dub-tools { display: flex; gap: 8px; margin: 10px 0 4px; }
.dub-voice-row { display: flex; gap: 8px; margin: 10px 0 16px; flex-wrap: wrap; }
.dub-tag { color: #79cfdb; }

/* ═══ v8：协作幽灵光标 ═══ */
.peer-cursor { position: absolute; z-index: 45; pointer-events: none; transition: transform .6s linear; }
.peer-cursor svg { filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.peer-cursor .pc-name {
  position: absolute; left: 14px; top: 16px; white-space: nowrap;
  background: #2f6fb8; color: #eaf4ff; font-size: 10.5px;
  padding: 2px 7px; border-radius: 3px var(--r-sm) var(--r-sm) var(--r-sm);
}

/* ═══ v8：特效节点 ═══ */
.node-fx .node-card { width: 280px; height: 170px; overflow: hidden; }
.fx-preview {
  position: absolute; inset: 0;
  background:
    radial-gradient(120px 70px at 30% 65%, rgba(133,96,224,.35), transparent 70%),
    radial-gradient(150px 90px at 75% 30%, rgba(64,150,238,.3), transparent 70%),
    linear-gradient(160deg, #1c1e26, #141519);
}
.fx-preview::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, #cfe0ff 50%, transparent 55%),
    radial-gradient(1.2px 1.2px at 55% 60%, #e6d4ff 50%, transparent 55%),
    radial-gradient(1.8px 1.8px at 80% 25%, #cfe0ff 50%, transparent 55%),
    radial-gradient(1.2px 1.2px at 38% 78%, #e6d4ff 50%, transparent 55%);
  animation: pulse 1.6s ease-in-out infinite;
}
.fx-name {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font-size: 13px; color: #ececec; font-weight: 600;
}
.fx-swap {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  font-size: 11px; color: #c4c4c4; background: rgba(20,20,20,.7);
  padding: 4px 10px; border-radius: var(--r-xs); border: 1px solid var(--line-hi);
  opacity: 0; transition: opacity .12s;
}
.node:hover .fx-swap { opacity: 1; }
.fx-swap:hover { color: #fff; border-color: #555; }

/* 无声视频标记 */
.vid-mute-chip {
  position: absolute; left: 8px; top: 8px; z-index: 3;
  background: rgba(10,10,10,.6); color: #ddd; font-size: 10px;
  padding: 2px 6px; border-radius: 4px;
}

/* ═══ v9：空画布快速开始区 ═══ */
.canvas-hero {
  position: fixed; left: 50%; top: 44%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 34px;
  z-index: 5; pointer-events: none;
}
.canvas-hero > * { pointer-events: auto; }
.hero-hint { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.hero-hint svg { color: #e8e8e8; }
.hero-hint b { color: #d6d6d6; font-weight: 600; }
.hero-hint span { color: #6f6f6f; }
.hero-cards { display: flex; gap: 12px; }
.hero-card {
  position: relative; width: 215px; height: 48px; border-radius: var(--r);
  background: #191919; border: 1px solid #262626; overflow: hidden;
  display: flex; align-items: center; gap: 9px; padding: 0 12px;
  transition: border-color .15s var(--ease), transform .18s var(--ease), background .15s;
}
.hero-card:hover { border-color: var(--line-hi); transform: translateY(-2px); background: #1d1d1d; }
.hero-card:active { transform: translateY(0); }
.hc-icon {
  width: 26px; height: 26px; border-radius: var(--r-xs); flex: none;
  background: var(--fill-hover); color: #f0f0f0; display: grid; place-items: center;
  position: relative; z-index: 2;
}
.hc-label { position: relative; z-index: 2; font-size: 12.5px; color: #ececec; white-space: nowrap; }
.hc-thumb {
  position: absolute; right: 0; top: 0; bottom: 0; width: 96px;
  mask-image: linear-gradient(90deg, transparent, #000 45%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
  transition: filter .18s;
}
.hero-card:hover .hc-thumb { filter: brightness(1.15); }
.hc-t1 { background: radial-gradient(30px 30px at 62% 42%, #cfd8e6 0 26%, #8494ad 34%, transparent 60%), radial-gradient(60px 46px at 78% 60%, #2b3d5e, transparent 75%), linear-gradient(115deg, transparent 30%, #0d1524 60%, #1a2c4e 100%); }
.hc-t2 { background: radial-gradient(26px 34px at 66% 46%, #e8b8a8 0 30%, #a2453a 55%, transparent 72%), linear-gradient(115deg, transparent 30%, #240b0e 58%, #7a1c22 100%); }
.hc-t3 { background: radial-gradient(20px 42px at 64% 55%, #1a1108 0 40%, transparent 66%), linear-gradient(115deg, transparent 30%, #3d2410 58%, #c96a1e 100%); }
.hc-t4 { background: radial-gradient(22px 40px at 62% 50%, #d8e8ea 0 22%, #5a8b93 48%, transparent 70%), linear-gradient(115deg, transparent 30%, #0c2224 58%, #1e5a63 100%); }

/* ═══ v10：流动连线（有待生成下游时） ═══ */
path.edge-live {
  stroke: #5aa4ff; stroke-width: 2; fill: none;
  stroke-dasharray: 10 14;
  animation: edgeflow 1.1s linear infinite;
  filter: drop-shadow(0 0 3px rgba(90,164,255,.55));
}
@keyframes edgeflow { to { stroke-dashoffset: -24; } }

/* ═══ v10：上传替换按钮常显 + 引导气泡 ═══ */
.node-media .img-action { opacity: 1; }
.guide-bubble {
  position: absolute; left: calc(100% - 22px); top: 4px; z-index: 9;
  transform: translateX(14px);
  background: #bfe9f2; color: #0d3a44; font-size: 11.5px; white-space: nowrap;
  padding: 6px 11px; border-radius: 4px var(--r) var(--r) var(--r);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
  animation: menuIn .18s var(--ease);
}
.guide-bubble::before {
  content: ''; position: absolute; left: -5px; top: 9px;
  border: 5px solid transparent; border-right-color: #bfe9f2; border-left: 0;
}
.img-action.guided { outline: 2px solid #37c4dc; outline-offset: 1px; }

/* ═══ v10：音频节点重设计（顶部波形+播放头+时间行） ═══ */
.node-audio .node-card {
  width: 348px; height: 148px; padding: 12px 12px 10px;
  display: flex; flex-direction: column; align-items: stretch; gap: 0;
}
.au-wavebox {
  position: relative; height: 74px; border-radius: var(--r-sm); background: #262626;
  display: flex; align-items: center; gap: 2px; padding: 0 10px; overflow: hidden;
}
.au-playhead { position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: #e05c50; border-radius: 1px; }
.au-wavebox i { flex: 1; background: #6b7178; border-radius: 1.5px; height: var(--h, 30%); min-width: 2px; max-width: 3px; }
.au-wavebox.playing i { background: #9fd6de; animation: wavebob .9s ease-in-out infinite alternate; }
.au-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.au-time { color: #9e9e9e; font-size: 12px; font-variant-numeric: tabular-nums; }
.au-play { width: 30px; height: 30px; }

/* ═══ v10：角色三视图节点（白底） ═══ */
.node-tviews .node-card { width: 466px; height: 345px; background: #f5f4f2; border-color: #e4e2de; overflow: hidden; }
.tv-figures { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-evenly; padding: 26px 18px 14px; }
.tv-fig { position: relative; width: 92px; height: 270px; }
.tv-fig::before {
  content: ''; position: absolute; left: 50%; top: 0; width: 30px; height: 30px;
  border-radius: 50% 50% 46% 46%; background: #2c2620; transform: translateX(-50%);
}
.tv-fig::after {
  content: ''; position: absolute; left: 50%; top: 26px; width: 78px; height: 240px;
  transform: translateX(-50%);
  background: linear-gradient(178deg, #9db89b 4%, #86a687 30%, #728f74 70%, #62805f 100%);
  border-radius: 34% 34% 12% 14% / 10% 10% 3% 3%;
}
.tv-fig .tv-hair {
  position: absolute; left: 50%; top: 6px; width: 44px; height: 130px; z-index: 2;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #241f1a, #17130f 80%);
  border-radius: 45% 45% 30% 30% / 24% 24% 60% 60%;
}
.tv-fig-side::after { width: 52px; }
.tv-fig-side .tv-hair { width: 38px; transform: translateX(-62%); }
.tv-fig-back::before { background: #241f1a; }
.tv-fig-back .tv-hair { height: 190px; }

/* ═══ v10：富图片工具栏 ═══ */
.media-toolbar .mt-chev { color: #7c7c7c; margin-left: 1px; }
.mt-new {
  font-size: 8.5px; font-weight: 700; color: #0d3a44; background: #62d2e4;
  border-radius: 4px; padding: 1px 4px; margin-left: 3px;
}
.mt-btn svg { color: #b5b5b5; }

/* ═══ v10：面板素材缩略图 chips ═══ */
.gp-media-chips { display: flex; gap: 8px; }
.gp-mchip {
  position: relative; width: 48px; height: 48px; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--line-hi); flex: none;
}
.gp-mchip .img-art, .gp-mchip .vid-poster-art { position: absolute; inset: 0; }
.gp-mchip .mchip-audio {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--fill-hover); color: #d5d5d5;
}
.gp-mchip .mchip-badge {
  position: absolute; right: 2px; top: 2px; min-width: 13px; height: 13px;
  border-radius: var(--r-xs); background: #141414cc; color: #ddd; font-size: 9px;
  display: grid; place-items: center; padding: 0 3px;
}
.gp-tab.gp-tab-disabled { opacity: .38; cursor: not-allowed; }
.gp-tab.gp-tab-disabled:hover { color: #969696; border-color: var(--line-hi); }

/* ═══ v11 融合：Mark 标记 ═══ */
.mark-dot {
  position: absolute; width: 22px; height: 22px; z-index: 8;
  transform: translate(-50%, -50%);
  background: rgba(21,161,177,.92); color: #fff;
  border: 2px solid #fff; border-radius: 50% 50% 50% 4px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  box-shadow: 0 3px 10px rgba(0,0,0,.45);
  cursor: pointer;
  animation: menuIn .16s var(--ease);
}
.mark-dot:hover { background: #e05c50; }
.canvas-viewport.markmode, .canvas-viewport.markmode .node-card { cursor: crosshair !important; }

/* ═══ v11 融合：Quick Edit 面板（Tab） ═══ */
.qe-panel {
  position: fixed; z-index: 56; width: 400px;
  background: #262626; border: 1px solid #333; border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  padding: 12px 13px 11px;
  display: flex; flex-direction: column; gap: 9px;
  animation: menuIn .15s var(--ease);
}
.qe-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #ececec; font-weight: 600; }
.qe-head .kbd-hint { font-size: 10px; color: #7a7a7a; font-weight: 400; }
.qe-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.qe-preset {
  font-size: 11.5px; color: #c4c4c4; padding: 5px 11px; border-radius: var(--r-sm);
  border: 1px solid var(--line-hi); transition: all .1s;
}
.qe-preset:hover { border-color: #4c4c4c; color: #eee; }
.qe-preset.on { background: #16333a; border-color: #1d6470; color: #7fd0dc; }
.qe-marks { display: flex; flex-wrap: wrap; gap: 5px; }
.qe-input {
  background: #202020; border: 1px solid #303030; border-radius: 9px;
  color: #e0e0e0; font-size: 12px; font-family: inherit; padding: 8px 10px;
  outline: none; resize: none; min-height: 40px; user-select: text;
}
.qe-input:focus { border-color: #3a5a60; }
.qe-foot { display: flex; align-items: center; gap: 6px; }
.qe-run {
  margin-left: auto; display: flex; align-items: center; gap: 5px;
  background: #f2f2f2; color: #141414; font-size: 12px; font-weight: 600;
  padding: 6px 16px; border-radius: var(--r-sm); transition: all .12s;
}
.qe-run:hover { background: #fff; }
.qe-run:disabled { background: var(--fill-raise); color: #8a8a8a; cursor: not-allowed; }

/* ═══ v11 融合：Adjust 调整面板（真实滑块） ═══ */
.adj-panel { min-width: 260px; }
.adj-row { display: flex; align-items: center; gap: 9px; padding: 5px 4px; }
.adj-row label { flex: none; width: 44px; font-size: 11.5px; color: #b9b9b9; }
.adj-row input[type=range] {
  flex: 1; -webkit-appearance: none; height: 3px; border-radius: 2px;
  background: var(--fill-raise); outline: none;
}
.adj-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: #e8e8e8; cursor: pointer; border: none;
  transition: transform .1s;
}
.adj-row input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.adj-row .adj-val { flex: none; width: 30px; text-align: right; font-size: 10.5px; color: #7c7c7c; font-variant-numeric: tabular-nums; }
.adj-effects { display: flex; gap: 6px; padding: 7px 4px 3px; }
.adj-reset { font-size: 11px; color: #8fb9c2; padding: 5px 4px 1px; }
.adj-reset:hover { color: #b8e2ea; }

/* 抠图结果棋盘格底 */
.img-cutout-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(45deg, var(--line-2) 25%, transparent 25%, transparent 75%, var(--line-2) 75%),
    linear-gradient(45deg, var(--line-2) 25%, #232323 25%, #232323 75%, var(--line-2) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 9px 9px;
}

/* 橡皮擦涂抹痕迹 */
.erase-stroke {
  position: absolute; border-radius: 50%;
  background: rgba(224,92,80,.4); border: 1px solid rgba(224,92,80,.7);
  pointer-events: none; z-index: 7;
  transform: translate(-50%, -50%);
}

/* ═══ v11 融合：Agent 步骤清单 ═══ */
.agent-steps { display: flex; flex-direction: column; gap: 5px; align-self: flex-start; padding: 2px 0 2px 4px; }
.agent-step { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: #8a8a8a; opacity: 0; transform: translateY(3px); transition: all .3s var(--ease); }
.agent-step.show { opacity: 1; transform: none; }
.agent-step .st-ic { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-hi); display: grid; place-items: center; flex: none; }
.agent-step.done .st-ic { border-color: #2e6b5e; background: #14322c; }
.agent-step.done .st-ic::after { content: '✓'; font-size: 8px; color: #56c9a8; }
.agent-step.done { color: #b9b9b9; }

/* Agent 上下文 chips（选中即入上下文） */
.agent-ctx-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 12px 6px; }
.agent-ctx-item {
  display: inline-flex; align-items: center; gap: 5px;
  background: #1d2f33; border: 1px solid #1d4a52; color: #9fd6de;
  font-size: 11px; padding: 3px 8px; border-radius: var(--r-xs);
}
.agent-ctx-item button { color: #6fa9b2; font-size: 10px; }
.agent-ctx-item button:hover { color: #d6f2f6; }

/* 模型面板 Auto 行 */
.gpp-auto-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 9px; margin-bottom: 7px;
  background: #232323; border-radius: 9px;
}
.gpp-auto-row b { font-size: 12.5px; color: #e0e0e0; font-weight: 600; }
.gpp-auto-row span { display: block; font-size: 10.5px; color: #8a8a8a; margin-top: 1px; }
.gpp-model.dim { opacity: .45; pointer-events: none; }

/* ═══ 融合新交互指南卡 ═══ */
.fusion-guide {
  position: fixed; right: 16px; top: 70px; z-index: 65; width: 320px;
  background: #1d1d1d; border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 13px 14px 14px; box-shadow: var(--sh-3);
  display: flex; flex-direction: column; gap: 9px;
  animation: menuIn .2s var(--ease);
}
.fg-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: #ececec; }
.fg-row { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: #b9b9b9; }
.fg-row .key-caps { flex: none; min-width: 74px; }
.fg-try { margin-top: 3px; padding: 8px 0; font-size: 12px; border-radius: 9px; }

/* 富工具栏防溢出：沿节点左缘向右展开 */
.node-imgmedia .media-toolbar { left: 0; transform: none; max-width: calc(100vw - 40px); }
.node-imgmedia:hover .media-toolbar, .node-imgmedia.selected .media-toolbar { transform: translateY(-3px); }

/* ════════ v16：打磨——半调点阵显影生成态 + 微交互统一 ════════ */

/* 生成态：暖灰点阵覆盖 + 进度胶囊（Lovart 签名动效，证据 v03/v04/v10） */
.gen-dither {
  position: absolute; inset: 0; z-index: 5; border-radius: inherit; overflow: hidden;
  background:
    radial-gradient(circle at 1.2px 1.2px, rgba(236,233,226,.24) 1.2px, transparent 1.7px) 0 0 / 9px 9px,
    linear-gradient(#2b2a28, #232220);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 16px;
  animation: ditherIn .3s var(--ease), ditherDrift 1.5s linear infinite;
}
@keyframes ditherIn { from { opacity: 0; } }
@keyframes ditherDrift { to { background-position: 9px 9px, 0 0; } }
.gd-pill {
  background: #0e0e0e; color: #f0efec; font-size: 11.5px; letter-spacing: .04em;
  padding: 5px 12px; border-radius: var(--r-xs); box-shadow: 0 4px 14px rgba(0,0,0,.45);
  font-variant-numeric: tabular-nums;
}
.gd-num { font-weight: 600; color: #fff; }

/* 显影：出图瞬间 模糊→清晰 + 点阵退散 */
.gen-grid.just-revealed .cell img,
.gen-grid.just-revealed .cell .img-art { animation: imgReveal .9s var(--ease) both; }
@keyframes imgReveal { from { filter: blur(14px) brightness(.8) saturate(.6); transform: scale(1.05); } }
.gen-grid.just-revealed .cell::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(circle at 1.2px 1.2px, rgba(240,238,232,.5) 1.2px, transparent 1.7px) 0 0 / 9px 9px;
  animation: ditherOut .9s var(--ease) forwards;
}
@keyframes ditherOut { to { opacity: 0; background-size: 18px 18px; } }

/* 按压反馈（Lovart 按压缩小态，证据 v06#004） */
.gp-submit:not(:disabled):active { transform: scale(.9); }
.tb-circle:active, .dock-item:active, .lv-btn:active, .gp-tool:active,
.gp-icon:active, .gen-run:active, .lv-run:active, .lv-ghost:active { transform: scale(.93); }
.gp-tab:active, .gpp-opt:active, .lv-chip:active, .gp-ctl:active { transform: scale(.96); }

/* 键盘焦点环（统一 teal） */
:focus-visible { outline: 2px solid rgba(21,161,177,.6); outline-offset: 2px; }
.gp-input:focus, .gp-input:focus-visible { outline: none; }

/* 输入聚焦时面板描边微亮 */
.gen-panel:focus-within { border-color: var(--line-hi); }

/* toast：入场缩放 + 对勾弹出 */
.toast { animation: toastIn .22s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) scale(.95); } }
.toast .tick { animation: tickPop .4s var(--ease); }
@keyframes tickPop { 0% { transform: scale(0); } 70% { transform: scale(1.3); } }

/* lightbox：背景淡入 + 内容缩放入场 */
.lightbox { animation: lbIn .2s var(--ease); }
.lightbox-body { animation: lbBody .28s var(--ease); }
@keyframes lbIn { from { opacity: 0; } }
@keyframes lbBody { from { opacity: 0; transform: scale(.96); } }

@media (prefers-reduced-motion: reduce) {
  .gen-dither { animation: none; }
  .gen-grid.just-revealed .cell img, .gen-grid.just-revealed .cell .img-art,
  .gen-grid.just-revealed .cell::after { animation: none; }
}

/* ════════ v15：真实生图结果格 ════════ */
.gen-grid-real { grid-template-columns: 1fr !important; }
.gen-grid-real .cell { aspect-ratio: 1; overflow: hidden; }
.gen-grid-real .cell img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ════════ v14：开屏 W 墨迹一笔画出 ════════ */
.splash {
  position: fixed; inset: 0; z-index: 999; background: #141414;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  animation: splashOut .55s var(--ease) 2.35s forwards;
}
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }
.splash-w { width: min(300px, 56vw); overflow: visible; }
.sw-main, .sw-core {
  fill: none; stroke: #f2efe8; stroke-linecap: round; stroke-linejoin: round;
  filter: url(#splashInk); stroke-dasharray: 1200; stroke-dashoffset: 1200;
}
.sw-main { stroke-width: 30; animation: swdraw 1.4s var(--ease) .25s forwards; }
.sw-core { stroke-width: 13; opacity: .5; animation: swdraw 1.4s var(--ease) .35s forwards; }
@keyframes swdraw { to { stroke-dashoffset: 0; } }
.sw-splat { fill: #37c4dc; opacity: 0; animation: swsplat .4s var(--ease) 1.6s forwards; }
.sw-splat + .sw-splat { animation-delay: 1.72s; }
@keyframes swsplat { from { opacity: 0; transform: scale(.2); transform-origin: center; } to { opacity: .9; transform: scale(1); } }
.splash-word {
  font-size: 21px; letter-spacing: .14em; color: #d9d5cc; font-weight: 600;
  opacity: 0; transform: translateY(10px);
  animation: swword .5s var(--ease) 1.75s forwards;
}
.splash-word span { color: #37c4dc; font-weight: 400; }
@keyframes swword { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .splash { display: none; } }

/* ════════════ v12：Lovart 图片编辑系（白色语系） ════════════ */

/* 选中框：蓝色描边 + 四角白方块手柄（Figma 语汇） */
.node-imgmedia.selected .node-card, .node-tviews.selected .node-card {
  border-color: #3d84ff; box-shadow: 0 0 0 1px #3d84ff;
}
.sel-handles { position: absolute; inset: -1px; pointer-events: none; z-index: 9; display: none; }
.node.selected .sel-handles { display: block; }
.sel-handles i {
  position: absolute; width: 9px; height: 9px;
  background: #fff; border: 1.5px solid #3d84ff; border-radius: 2px;
}
.sel-handles i:nth-child(1) { left: -5px; top: -5px; }
.sel-handles i:nth-child(2) { right: -5px; top: -5px; }
.sel-handles i:nth-child(3) { left: -5px; bottom: -5px; }
.sel-handles i:nth-child(4) { right: -5px; bottom: -5px; }

/* Lovart 白色工具栏：悬浮于图片下方 */
.lv-toolbar {
  position: absolute; left: 50%; top: calc(100% + 14px);
  transform: translateX(-50%) translateY(4px);
  display: flex; align-items: center;
  background: var(--lv-surface); border-radius: var(--r-xl);
  box-shadow: var(--lv-shadow-lg), var(--lv-ring);
  padding: 5px; z-index: 2; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .16s var(--ease), transform .18s var(--ease);
}
.node.selected .lv-toolbar { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.lv-btn {
  display: flex; align-items: center; gap: 7px;
  color: var(--lv-ink); font-size: 13px; font-weight: 500;
  padding: 8px 13px; border-radius: 11px; position: relative;
  transition: background .1s;
}
.lv-btn:hover { background: var(--lv-hover); }
.lv-btn svg { color: var(--lv-ink); flex: none; }
.lv-btn .lv-kbd { color: var(--lv-ink-soft); font-weight: 400; font-size: 12px; }
.lv-btn .lv-dot { position: absolute; right: 5px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: #f04438; }
.lv-sep { width: 1px; height: 22px; background: var(--lv-line); margin: 0 3px; flex: none; }
.lv-download {
  position: absolute; left: calc(50% + var(--lvw, 0px)); top: calc(100% + 14px);
  width: 44px; height: 44px; border-radius: var(--r-lg); background: var(--lv-surface);
  box-shadow: var(--lv-shadow-lg), var(--lv-ring); color: var(--lv-ink);
  display: grid; place-items: center; z-index: 2;
  opacity: 0; pointer-events: none; transition: opacity .16s var(--ease);
}
.node.selected .lv-download { opacity: 1; pointer-events: auto; }

/* Lovart 白色浮层面板（Multi-Angles / Edit Text / Quick Edit） */
.lv-panel {
  position: fixed; z-index: 62; width: 340px;
  background: var(--lv-surface); border-radius: var(--r-xl);
  box-shadow: var(--lv-shadow-lg), var(--lv-ring);
  padding: 15px 16px 14px; color: var(--lv-ink);
  display: flex; flex-direction: column; gap: 11px;
  animation: menuIn .18s var(--ease);
}
.lv-panel-head { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; font-weight: 600; }
.lv-panel-head .lv-x { width: 26px; height: 26px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--lv-ink-soft); }
.lv-panel-head .lv-x:hover { background: var(--lv-hover); color: var(--lv-ink); }
.lv-panel-head .lv-hint { font-size: 11px; color: var(--lv-ink-soft); font-weight: 400; }
.lv-modes { display: flex; background: var(--lv-sunken); border-radius: var(--r); padding: 3px; }
.lv-mode {
  flex: 1; text-align: center; font-size: 12px; color: var(--lv-ink-soft);
  padding: 6px 0; border-radius: var(--r-sm); transition: all .15s var(--ease);
}
.lv-mode.on { background: var(--lv-raise); color: var(--lv-ink); font-weight: 600; box-shadow: 0 1px 4px rgba(24,20,12,.14); }
.lv-slider-row { display: flex; align-items: center; gap: 10px; }
.lv-slider-row label { flex: none; width: 38px; font-size: 12px; color: var(--lv-ink-soft); }
.lv-slider-row input[type=range] {
  flex: 1; -webkit-appearance: none; height: 4px; border-radius: 2px; background: var(--lv-line); outline: none;
}
.lv-slider-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--lv-ink); cursor: pointer; transition: transform .1s;
}
.lv-slider-row input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.lv-slider-row .lv-val { flex: none; width: 38px; text-align: right; font-size: 11px; color: var(--lv-ink-soft); font-variant-numeric: tabular-nums; }
.lv-actions { display: flex; gap: 8px; justify-content: flex-end; }
.lv-ghost { font-size: 12.5px; color: var(--lv-ink-soft); padding: 8px 15px; border-radius: var(--r); border: 1px solid var(--lv-line); }
.lv-ghost:hover { background: var(--lv-hover); color: var(--lv-ink); }
.lv-run {
  font-size: 12.5px; font-weight: 600; color: var(--lv-surface); background: var(--lv-ink);
  padding: 8px 20px; border-radius: var(--r); transition: all .12s;
}
.lv-run:hover { background: #fff; }
.lv-run:disabled { background: var(--lv-hover); cursor: not-allowed; }
.lv-input {
  width: 100%; background: var(--lv-raise); border: 1px solid var(--lv-line); border-radius: var(--r);
  color: var(--lv-ink); font-size: 13px; font-family: inherit; padding: 9px 11px;
  outline: none; resize: none; user-select: text;
}
.lv-input:focus { border-color: var(--lv-ink); }
.lv-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.lv-chip {
  font-size: 12px; color: var(--lv-ink-soft); padding: 6px 12px; border-radius: 9px;
  border: 1px solid var(--lv-line); transition: all .1s;
}
.lv-chip:hover { border-color: var(--lv-line); }
.lv-chip.on { background: var(--lv-ink); border-color: var(--lv-ink); color: var(--lv-surface); }

/* Multi-Angles 实时 3D 预览 */
.node-imgmedia .img-art { transition: transform .25s var(--ease), filter .2s; transform-style: preserve-3d; }
.node-imgmedia .node-card { perspective: 700px; }

/* Edit Text 文字层 */
.img-textlayer {
  position: absolute; left: 8%; right: 8%; z-index: 4; text-align: center;
  color: var(--lv-surface); font-weight: 700; letter-spacing: .04em;
  text-shadow: 0 2px 12px rgba(0,0,0,.65);
  pointer-events: none; line-height: 1.3;
}
.img-textlayer.pos-top { top: 8%; }
.img-textlayer.pos-mid { top: 46%; }
.img-textlayer.pos-bottom { bottom: 8%; }

/* Edit Elements 拆层模式 */
.node-imgmedia.layers-mode .node-card { outline: 1.5px dashed #3d84ff; outline-offset: 4px; }
.layers-mode .img-art > div { cursor: grab; pointer-events: auto; }
.layers-mode .img-art > div:hover { outline: 1.5px dashed rgba(61,132,255,.9); outline-offset: -1px; }
.layers-badge {
  position: absolute; left: 50%; top: -40px; transform: translateX(-50%);
  background: #3d84ff; color: var(--lv-surface); font-size: 11px; font-weight: 600;
  padding: 5px 12px; border-radius: 9px; z-index: 13; white-space: nowrap;
  display: flex; gap: 10px; align-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.layers-badge button { color: #dce9ff; font-size: 11px; }
.layers-badge button:hover { color: var(--lv-surface); text-decoration: underline; }

/* Eraser 笔刷条（暖纸白悬浮） */
.eraser-bar {
  position: fixed; z-index: 63; display: flex; align-items: center; gap: 11px;
  background: var(--lv-surface); border-radius: var(--r-lg); padding: 9px 14px;
  box-shadow: var(--lv-shadow-lg), var(--lv-ring); color: var(--lv-ink); font-size: 12px;
  animation: menuIn .16s var(--ease);
}
.eraser-bar input[type=range] {
  width: 110px; -webkit-appearance: none; height: 4px; border-radius: 2px; background: var(--lv-line);
}
.eraser-bar input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--lv-ink); cursor: pointer;
}

/* Quick Edit 面板改白色语系 */
.qe-panel { background: var(--lv-surface); border: none; box-shadow: var(--lv-shadow-lg), var(--lv-ring); }
.qe-head { color: var(--lv-ink); }
.qe-head .kbd-hint { color: var(--lv-ink-soft); }
.qe-preset { color: var(--lv-ink-soft); border-color: var(--lv-line); }
.qe-preset:hover { border-color: var(--lv-line); color: var(--lv-ink); }
.qe-preset.on { background: var(--lv-ink); border-color: var(--lv-ink); color: var(--lv-surface); }
.qe-input { background: var(--lv-raise); border-color: var(--lv-line); color: var(--lv-ink); }
.qe-input:focus { border-color: var(--lv-ink); }
.qe-input::placeholder { color: var(--lv-ink-soft); }
.qe-panel .gp-cost { color: var(--lv-ink-soft); }
.qe-run { background: var(--lv-ink); color: var(--lv-surface); }
.qe-run:hover { background: #fff; }
.qe-run:disabled { background: var(--lv-hover); color: var(--lv-ink-soft); }

/* ════════ v13：Lovart 精修（对照真实 UI 截图） ════════ */

/* 选中标签：左上 Image N + 右上尺寸（蓝字，框外） */
.sel-meta {
  position: absolute; left: 0; right: 0; top: -24px; z-index: 9;
  display: none; align-items: center; justify-content: space-between;
  font-size: 12px; color: #3d84ff; pointer-events: none; white-space: nowrap;
}
.node.selected .sel-meta { display: flex; }
.sel-meta .sm-name { display: flex; align-items: center; gap: 5px; font-weight: 500; }
.sel-meta svg { flex: none; }

/* Lovart 面板通用微调 */
.lv-panel-head .lv-ic {
  width: 26px; height: 26px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--lv-ink-soft);
}
.lv-panel-head .lv-ic:hover { background: var(--lv-hover); color: var(--lv-ink); }
.lv-head-actions { display: flex; gap: 2px; }

/* Multi-Angles 3D 立方体预览 */
.ma-stage {
  height: 190px; border-radius: var(--r-md); background: var(--lv-sunken);
  display: grid; place-items: center; overflow: hidden;
  perspective: 520px;
}
.ma-cube { position: relative; width: 92px; height: 118px; transform-style: preserve-3d; transition: transform .18s var(--ease); }
.ma-face { position: absolute; inset: 0; border-radius: 6px; }
.ma-face-front { overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.ma-face-front .img-art { position: absolute; inset: 0; }
.ma-face-side { background: #2c2c2c; transform: rotateY(90deg) translateZ(46px); width: 92px; }
.ma-face-side2 { background: #232323; transform: rotateY(-90deg) translateZ(46px); }
.ma-face-top { background: #383838; height: 92px; width: 92px; transform: rotateX(90deg) translateZ(46px); }
.ma-front-holder { transform: translateZ(46px); position: absolute; inset: 0; }

/* Lovart 滑块行（标签+数值右对齐同一行） */
.lvs-row { display: flex; flex-direction: column; gap: 7px; padding: 4px 0; }
.lvs-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--lv-ink); }
.lvs-head .lvs-val { color: var(--lv-ink-soft); font-variant-numeric: tabular-nums; }
.lvs-row input[type=range] {
  width: 100%; -webkit-appearance: none; height: 3px; border-radius: 2px; background: var(--lv-line); outline: none;
}
.lvs-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: var(--lv-ink); border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer;
}
.lvs-row input.grad-temp { background: linear-gradient(90deg, #4a90e2, var(--lv-line) 50%, #f0c419); }
.lvs-row input.grad-tint { background: linear-gradient(90deg, #e649c1, var(--lv-line) 50%, #4caf50); }

/* Adjust 分组 tab（图标分段器） */
.adj-tabs { display: flex; background: var(--lv-hover); border-radius: var(--r); padding: 3px; }
.adj-tab { flex: 1; display: grid; place-items: center; padding: 6px 0; border-radius: var(--r-sm); color: var(--lv-ink-soft); }
.adj-tab.on { background: var(--lv-raise); color: var(--lv-ink); box-shadow: 0 1px 4px rgba(24,20,12,.14); }

/* Crop 面板 */
.crop-wh { display: flex; align-items: center; gap: 7px; }
.crop-wh .crop-field {
  flex: 1; display: flex; align-items: center; gap: 6px;
  background: var(--lv-hover); border: 1px solid var(--lv-line); border-radius: 9px; padding: 7px 10px;
}
.crop-field span { color: var(--lv-ink-soft); font-size: 11.5px; }
.crop-field input { border: none; background: none; outline: none; width: 100%; font-size: 12.5px; color: var(--lv-ink); font-family: inherit; }
.crop-preset-title { font-size: 11.5px; color: var(--lv-ink-soft); margin-top: 2px; }
.crop-group { display: flex; flex-direction: column; }
.crop-group-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--lv-ink-soft); padding: 7px 2px; cursor: pointer; }
.crop-group-head .chev { transition: transform .15s; color: var(--lv-ink-soft); }
.crop-group.open .crop-group-head .chev { transform: rotate(90deg); }
.crop-items { display: none; flex-direction: column; }
.crop-group.open .crop-items { display: flex; }
.crop-item {
  display: flex; align-items: center; gap: 9px; padding: 6px 4px 6px 20px;
  font-size: 12.5px; color: var(--lv-ink-soft); border-radius: var(--r-sm); text-align: left;
}
.crop-item:hover { background: var(--lv-hover); }
.crop-item .ck { width: 14px; color: var(--lv-ink); flex: none; }
.crop-item .ratio-ic { width: 14px; height: 14px; border: 1.5px solid #8a8a8a; border-radius: 3px; flex: none; }
.crop-item .ratio-ic.tall { width: 10px; height: 15px; }
.crop-item .ratio-ic.wide { width: 16px; height: 11px; }

/* 裁剪覆盖层（三分网格 + 暗角 + 圆柄） */
.crop-overlay { position: absolute; inset: 0; z-index: 8; }
.crop-shade { position: absolute; left: 0; right: 0; background: rgba(0,0,0,.45); }
.crop-box { position: absolute; border: 1.5px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.28); }
.crop-box::before, .crop-box::after {
  content: ''; position: absolute; background: rgba(255,255,255,.55);
}
.crop-box::before { left: 33.33%; right: 33.33%; top: 0; bottom: 0; border-left: 1px solid rgba(255,255,255,.55); border-right: 1px solid rgba(255,255,255,.55); background: none; }
.crop-box::after { top: 33.33%; bottom: 33.33%; left: 0; right: 0; border-top: 1px solid rgba(255,255,255,.55); border-bottom: 1px solid rgba(255,255,255,.55); background: none; }
.crop-box i {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.4);
}
.crop-box i:nth-child(1) { left: -6px; top: -6px; }
.crop-box i:nth-child(2) { right: -6px; top: -6px; }
.crop-box i:nth-child(3) { left: -6px; bottom: -6px; }
.crop-box i:nth-child(4) { right: -6px; bottom: -6px; }

/* Move Object：Rectangle/Lasso 切换 + 对象 chip */
.mo-switch {
  position: absolute; left: 50%; top: -52px; transform: translateX(-50%);
  display: flex; gap: 2px; background: var(--lv-surface); border-radius: var(--r-md); padding: 4px;
  box-shadow: var(--lv-shadow-md), var(--lv-ring); z-index: 13;
}
.mo-switch button {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--lv-ink-soft);
  padding: 6px 13px; border-radius: 9px;
}
.mo-switch button.on { background: var(--lv-hover); color: var(--lv-ink); font-weight: 600; }
.mo-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--lv-hover); border-radius: 9px; padding: 7px 10px; font-size: 12.5px; color: var(--lv-ink);
}
.mo-chip .mo-thumb { width: 22px; height: 22px; border-radius: 5px; overflow: hidden; position: relative; flex: none; }
.mo-chip .mo-thumb .img-art { position: absolute; inset: 0; }
.mo-hint { font-size: 11px; color: var(--lv-ink-soft); }

/* 多选工具栏 */
.msel-toolbar {
  position: fixed; z-index: 58; display: flex; align-items: center;
  background: var(--lv-surface); border-radius: var(--r-lg); padding: 5px;
  box-shadow: var(--lv-shadow-lg), var(--lv-ring);
  animation: menuIn .16s var(--ease);
}
.msel-toolbar .lv-sep { margin: 0 4px; }

/* Customize Toolbar 弹窗 */
.ct-modal { width: 660px; background: var(--lv-surface); color: var(--lv-ink); border: none; }
.ct-preview {
  border-radius: var(--r-md); padding: 26px 12px; margin: 4px 18px 12px;
  background: linear-gradient(120deg, #dbe7dd, #cfdfe8 45%, #e8e2d5);
  display: flex; justify-content: center; overflow-x: auto;
}
.ct-preview .lv-toolbar { position: static; transform: none; opacity: 1; pointer-events: auto; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.ct-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; padding: 0 18px; }
.ct-item {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--lv-line); border-radius: var(--r); padding: 9px 11px;
  font-size: 12.5px; color: var(--lv-ink);
}
.ct-item .ct-pin { margin-left: auto; color: var(--lv-line); cursor: pointer; }
.ct-item.pinned .ct-pin { color: var(--lv-ink); }
.ct-foot { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 18px; }
.ct-foot .gpp-switch span { color: var(--lv-ink-soft); }
.ct-modal .modal-head { color: var(--lv-ink); }
.ct-sub { font-size: 12px; color: var(--lv-ink-soft); padding: 0 18px 8px; margin-top: -6px; }

/* 选中时用 Lovart 蓝标签替代 LibTV 灰标签（避免双标签叠加） */
.node-imgmedia.selected > .node-label, .node-tviews.selected > .node-label { visibility: hidden; }
