/* ---------- 生成面板 ---------- */
.gen-panel { position: fixed; z-index: 60; width: 560px; max-width: calc(100vw - 90px); padding: 10px; border-radius: 14px;
  background: rgba(23, 27, 33, .97); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.gp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.gp-chips:empty { display: none; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 40px; border-radius: 8px; border: 1px solid var(--line2);
  background: var(--bg2); color: var(--dim); font-size: 12px; overflow: hidden; }
.chip.img { width: 40px; }
.chip.img img, .chip.img video { width: 100%; height: 100%; object-fit: cover; }
.chip.unused { border-style: dashed; place-content: center; color: var(--dim); }
.chip.unused video { opacity: .45; }
.chip.unused .chip-tag { color: var(--dim); }
.chip.txt { padding: 0 8px; max-width: 160px; white-space: nowrap; }
.chip.add { padding: 0 10px; border-style: dashed; cursor: pointer; }
.chip.add:hover { color: var(--accent); border-color: var(--accent); }
.chip-x { position: absolute; top: 1px; right: 1px; width: 16px; height: 16px; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; opacity: .55; cursor: pointer; }
.chip:hover .chip-x { opacity: 1; }
.chip-x:hover { background: var(--danger); }
.chip[data-tag] { cursor: pointer; }
.chip[data-tag]:hover { border-color: var(--accent); }
.chip.txt { padding-right: 20px; }
.chip.txt .chip-x { top: 50%; transform: translateY(-50%); }
.chip-sn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-tag { flex: none; color: var(--accent); font-weight: 600; font-size: 11px; }
.chip.img .chip-tag { position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 0; text-align: center; font-size: 10px;
  background: rgba(0, 0, 0, .65); color: #fff; pointer-events: none; }
.mention-pop { position: absolute; z-index: 5; width: 280px; max-height: 240px; overflow-y: auto; padding: 4px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.mp-item { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px; border-radius: 7px; cursor: pointer; font-size: 12px; }
.mp-item.on, .mp-item:hover { background: var(--panel2); }
.mp-item.on b { color: var(--accent); }
.mp-item img { width: 30px; height: 30px; border-radius: 5px; object-fit: cover; flex: none; }
.mp-ico { width: 30px; height: 30px; display: grid; place-items: center; flex: none; color: var(--dim); }
.mp-item b { flex: none; }
.mp-sub { color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-empty { padding: 10px; color: var(--mute); font-size: 12px; line-height: 1.6; }
.gp-prompt-wrap { position: relative; background: var(--bg2); border-radius: 9px; }
.gp-prompt-hl { position: absolute; inset: 0; padding: 8px 10px; border: 1px solid transparent; border-radius: 9px;
  white-space: pre-wrap; word-break: break-word; overflow: hidden; pointer-events: none;
  font: inherit; line-height: 1.6; color: var(--text); }
.gp-prompt { position: relative; width: 100%; min-height: 76px; max-height: 220px; padding: 8px 10px; border: 1px solid transparent; border-radius: 9px; resize: vertical;
  background: transparent; outline: none; line-height: 1.6; color: transparent; caret-color: var(--text); }
.gp-prompt::placeholder { color: var(--mute); }
.gp-prompt:focus { border-color: #34404d; }
.mt { font-weight: 600; }
.mt-image { color: #60a5fa; }
.mt-video { color: #a78bfa; }
.mt-text { color: #34d399; }
.mt-audio { color: #fbbf24; }
.gp-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.grow { flex: 1; }
.pill { height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font-size: 12px;
  outline: none; display: inline-flex; align-items: center; gap: 4px; }
.pill:hover { border-color: #4a5260; }
.pill.model { max-width: 170px; }
.pill.check input { accent-color: var(--accent); margin: 0; }
select.pill option { background: var(--panel); }
.pill.vset { cursor: pointer; }
.pill.vset svg { opacity: .6; }
.pill.mode-ref { border-color: rgba(96, 165, 250, .45); background: rgba(96, 165, 250, .12); color: #93c5fd; cursor: help; }
.chip.video { border-color: rgba(96, 165, 250, .45); }
.chip.audio { border-color: rgba(167, 139, 250, .45); }
.chip-ico { width: 100%; height: 100%; display: grid; place-items: center; padding-bottom: 10px; color: #c4b5fd; }
.mp-item video { width: 30px; height: 30px; border-radius: 5px; object-fit: cover; flex: none; }
.gen-panel:has(.vset-pop) { z-index: 62; }  /* 设置面板向上弹出时盖住节点工具条 */
.vset-pop { position: absolute; z-index: 6; width: 340px; padding: 12px; border-radius: 12px; display: grid; gap: 12px;
  background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 12px; }
.vs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vs-row.col { flex-direction: column; align-items: stretch; gap: 6px; }
.vs-l { color: var(--dim); display: flex; align-items: baseline; gap: 6px; }
.vs-l em { font-style: normal; color: var(--mute); font-size: 11px; }
.vs-l b { color: var(--text); font-weight: 600; }
.vs-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.vs-seg button { min-width: 48px; height: 26px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line2); background: var(--bg2);
  color: var(--text); font-size: 12px; cursor: pointer; }
.vs-seg button:hover:not(:disabled) { border-color: #4a5260; }
.vs-seg button.on { border-color: var(--accent); background: rgba(45, 212, 191, .12); color: var(--accent); }
.vs-seg button:disabled { opacity: .4; cursor: not-allowed; }
.vs-range { width: 100%; accent-color: var(--accent); }
.vs-ticks { display: flex; justify-content: space-between; color: var(--mute); font-size: 11px; font-variant-numeric: tabular-nums; }
.send { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--accent); color: #062420; }
.send:hover { background: #5eead4; }
.gp-empty { color: var(--mute); padding: 10px; }
/* 文本节点的「选择角色」 */
.pill.role { cursor: pointer; }
.pill.role.on { padding: 0; gap: 0; border-color: rgba(45, 212, 191, .45); background: rgba(45, 212, 191, .1); color: var(--accent); max-width: 170px; }
.pill.role.on > button { display: inline-flex; align-items: center; gap: 4px; height: 100%; padding: 0 4px 0 8px; border: 0; background: none; color: inherit;
  font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.pill.role.on > .role-x { flex: none; padding: 0 7px 0 3px; opacity: .7; }
.pill.role.on > .role-x:hover { opacity: 1; color: var(--danger); }

/* ---------- 角色管理 ---------- */
.rl-modal .modal-head { position: absolute; right: 8px; top: 8px; padding: 0; }
.rl-modal { position: relative; }
.rl-modal .modal-body { padding: 18px 20px 20px; }
.rl-head { display: flex; align-items: center; gap: 12px; padding-right: 30px; }
.rl-head b { font-size: 16px; }
.rl-hico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--panel2); color: var(--dim); flex: none; }
.rl-sub { color: var(--mute); font-size: 12px; margin-top: 2px; }
.rl-tabs { display: flex; gap: 6px; margin: 16px -20px 14px; padding: 10px 20px 0; border-top: 1px solid var(--line); }
.rl-tab { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: none; color: var(--dim); font-size: 13px; cursor: pointer; }
.rl-tab:hover { color: var(--text); background: var(--panel2); }
.rl-tab.on { color: var(--accent); background: rgba(45, 212, 191, .1); }
.rl-view { max-height: min(560px, calc(100vh - 220px)); overflow-y: auto; margin-right: -8px; padding-right: 8px; }
.rl-hint { color: var(--mute); font-size: 12px; margin-bottom: 10px; }
.rl-item { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px;
  border: 1px solid var(--line2); background: var(--bg2); cursor: pointer; transition: border-color .12s, background .12s; }
.rl-item:hover { border-color: #4a5260; background: #191d23; }
.rl-item.on { border-color: var(--accent); background: rgba(45, 212, 191, .07); }
.rl-item .icon-btn { opacity: 0; }
.rl-item:hover .icon-btn { opacity: 1; }
.rl-none { color: var(--dim); font-size: 13px; min-height: 44px; border-style: dashed; }
.rl-av { flex: none; border-radius: 50%; object-fit: cover; display: grid; place-items: center; color: #fff; font-weight: 700; }
.rl-txt { flex: 1; min-width: 0; }
.rl-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.rl-intro { color: var(--mute); font-size: 12px; margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rl-tag { padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; color: #fcd34d; background: rgba(250, 204, 21, .12); }
.rl-tag.on { color: var(--accent); background: rgba(45, 212, 191, .14); }
.rl-tip { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 16px; border-radius: 9px; font-size: 12px;
  color: #fcd34d; background: rgba(250, 204, 21, .08); border: 1px solid rgba(250, 204, 21, .25); }
.rl-form { display: grid; grid-template-columns: 96px 1fr; gap: 20px; margin-bottom: 14px; }
.rl-fields { display: flex; flex-direction: column; gap: 6px; }
.rl-fields .input { margin-bottom: 8px; }
.rl-label { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 12px; margin-bottom: 6px; }
.rl-label i { color: var(--danger); font-style: normal; margin-left: -4px; }
.rl-chip { padding: 1px 8px; border-radius: 6px; font-size: 11px; background: var(--panel2); color: var(--dim); }
.rl-up { width: 96px; height: 96px; border-radius: 12px; border: 1px dashed var(--line2); background: var(--bg2); color: var(--dim);
  display: grid; place-items: center; align-content: center; gap: 4px; font-size: 11px; cursor: pointer; padding: 0; }
.rl-up:hover { border-color: var(--accent); color: var(--accent); }
.rl-up .rl-av { border-radius: 10px; }
.rl-link { display: block; margin: 6px auto 0; border: 0; background: none; color: var(--mute); font-size: 11px; cursor: pointer; }
.rl-link:hover { color: var(--danger); }
.rl-ta { position: relative; }
.rl-ta textarea { min-height: 200px; resize: vertical; line-height: 1.6; padding-bottom: 24px; }
.rl-count { position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: var(--mute); pointer-events: none; }
.rl-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.rl-foot .btn { justify-content: center; height: 40px; }
/* 积分、放大、发送 三个固定在右边，换行时一起换，不会把发送键单独挤下去 */
.gp-end { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.gp-cost { display: inline-flex; align-items: center; gap: 3px; color: #fcd34d; font-size: 12px; font-variant-numeric: tabular-nums; cursor: help; }
.gp-cost b { font-weight: 600; }

/* ---------- 节点工具条 ---------- */
.nodebar { position: fixed; z-index: 60; display: flex; gap: 2px; padding: 4px; border-radius: 10px; background: rgba(23, 27, 33, .97);
  border: 1px solid var(--line2); box-shadow: var(--shadow); }
.nb-btn { display: flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent;
  color: var(--dim); font-size: 12px; white-space: nowrap; }
.nb-btn:hover { background: #262c35; color: var(--text); }
.nb-btn.danger:hover { color: var(--danger); }
.nb-count { display: flex; align-items: center; height: 28px; padding: 0 8px; color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nb-sep { width: 1px; height: 14px; margin: auto 2px; background: var(--line2); }
.nb-btn.on { background: rgba(45, 212, 191, .14); color: var(--accent); }
.nb-btn.off { opacity: .4; }
.nb-btn.off:hover { background: transparent; color: var(--dim); }

/* ---------- 节点工具（宫格切分 / 背景去除 / 画质增强） ---------- */
.ntool { position: fixed; z-index: 61; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 4px; border-radius: 12px; white-space: nowrap;
  background: rgba(23, 27, 33, .97); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 12px; }
.nt-title { font-size: 13px; }
.nt-sep { width: 1px; height: 16px; background: var(--line2); }
.nt-dim { color: var(--dim); }
.nt-dim b { color: var(--accent); }
.nt-free { color: #86efac; font-size: 11px; }
.ntool .gp-cost { cursor: help; }
.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line2); }
.seg button { height: 24px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--dim); font-size: 12px; }
.seg button.on { background: var(--panel2); color: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.grid-ov { position: fixed; z-index: 45; display: grid; pointer-events: none; outline: 2px solid var(--accent); }
.gcell { pointer-events: auto; display: grid; place-items: center; padding: 0; border: 1px dashed rgba(255, 255, 255, .75); border-radius: 0;
  background: rgba(0, 0, 0, .68); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .1s; }
.gcell span { min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; border-radius: 11px; background: rgba(0, 0, 0, .55); }
.gcell.on { background: rgba(45, 212, 191, .06); border-color: var(--accent); }
.gcell.on span { background: var(--accent); color: #062420; }
.gcell:hover { background: rgba(45, 212, 191, .25); }
.node.grid-mode .media { object-fit: contain; background: #07080a; }
.swap-btn { position: absolute; top: 8px; right: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px;
  border: 0; border-radius: 6px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px; opacity: 0; transition: opacity .12s; }
.node:hover .swap-btn, .node.selected .swap-btn { opacity: 1; }
.swap-btn:hover { background: rgba(0, 0, 0, .85); color: var(--accent); }
.node.grid-mode .swap-btn { display: none; }

/* ---------- 提示词库 ---------- */
.pl-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pl-tabs { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.pl-tabs button { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--dim); font-size: 13px; }
.pl-tabs button:hover { background: var(--panel2); color: var(--text); }
.pl-tabs button.on { background: rgba(45, 212, 191, .12); color: var(--accent); }
.pl-search { width: 200px; flex: none; }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; min-height: 360px; max-height: min(600px, calc(100vh - 200px));
  overflow-y: auto; align-content: start; padding-right: 4px; }
.pl-card { position: relative; display: flex; flex-direction: column; border-radius: 11px; border: 1px solid var(--line); background: var(--bg2); overflow: hidden;
  cursor: pointer; text-align: left; padding: 0; transition: border-color .12s, transform .12s; }
.pl-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.pl-cover { height: 74px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--pc); font-size: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pc) 26%, transparent), color-mix(in srgb, var(--pc) 6%, transparent)); }
.pl-info { padding: 8px 10px 10px; }
.pl-info b { display: block; font-size: 13px; margin-bottom: 3px; }
.pl-info p { margin: 0; color: var(--mute); font-size: 11px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-star, .pl-del { position: absolute; top: 6px; width: 26px; height: 26px; border: 0; border-radius: 7px; background: rgba(0, 0, 0, .45); color: #fff;
  display: grid; place-items: center; font-size: 14px; line-height: 1; }
.pl-star { right: 6px; }
.pl-star.on { color: #fcd34d; }
.pl-del { left: 6px; opacity: 0; }
.pl-card:hover .pl-del { opacity: 1; }
.pl-del:hover { background: var(--danger); }
.pl-new { align-items: center; justify-content: center; gap: 8px; min-height: 140px; border-style: dashed; color: var(--dim); }
.pl-new span { font-size: 12px; padding: 0 12px; text-align: center; }
.pl-new:hover { color: var(--accent); }
.pl-empty { grid-column: 1 / -1; padding: 80px 0; text-align: center; color: var(--mute); }
.asset { position: relative; }
.asset-star { position: absolute; top: 6px; right: 6px; z-index: 1; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px;
  background: rgba(0, 0, 0, .6); color: #fcd34d; }

/* ---------- 左侧面板 ---------- */
.side-panel, .task-panel { position: fixed; z-index: 55; display: flex; flex-direction: column; border-radius: 14px; background: rgba(23, 27, 33, .97);
  border: 1px solid var(--line2); box-shadow: var(--shadow); }
.side-panel { left: 80px; top: 64px; bottom: 64px; width: 320px; }
.task-panel { right: 12px; top: 64px; bottom: 12px; width: 340px; }
.sp-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 6px 16px; }
.sp-body, .tp-list { flex: 1; overflow: auto; padding: 4px 14px 14px; }
.sp-empty, .sp-loading { padding: 30px 10px; text-align: center; color: var(--mute); }
.tabs { display: flex; gap: 4px; padding: 3px; margin-bottom: 12px; border-radius: 9px; background: var(--bg2); }
.tabs button { flex: 1; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--dim); }
.tabs button.on { background: var(--panel2); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.tpl-list { display: flex; flex-direction: column; gap: 10px; }
.tpl-card { position: relative; padding: 10px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; }
.tpl-card:hover { border-color: var(--accent); }
.tpl-cover { height: 110px; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.tpl-cover img { width: 100%; height: 100%; object-fit: cover; }
.tpl-mini { display: flex; align-items: center; justify-content: center; height: 64px; margin-bottom: 8px; border-radius: 8px;
  background-image: radial-gradient(#252b33 1px, transparent 1px); background-size: 10px 10px; }
.tpl-mini i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; background: var(--panel2); border: 1px solid currentColor; }
.tpl-mini b { width: 18px; height: 1.5px; background: #4b5563; }
.tpl-mini .t-text { color: var(--c-text); } .tpl-mini .t-image { color: var(--c-image); } .tpl-mini .t-video { color: var(--c-video); }
.tpl-mini .t-audio { color: var(--c-audio); } .tpl-mini .t-note { color: var(--c-note); }
.tpl-name { font-weight: 600; }
.tpl-desc { color: var(--mute); font-size: 12px; }
.tpl-del { position: absolute; right: 6px; bottom: 6px; }
.hist-tip { color: var(--mute); font-size: 12px; margin-bottom: 10px; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.hist-item { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid #20252d; }
.hist-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--panel2); color: var(--accent); }
.hist-main { flex: 1; min-width: 0; }
.hist-title { font-weight: 600; }
.hist-detail { color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-time { color: var(--mute); font-size: 11px; font-variant-numeric: tabular-nums; }
.side-panel h4 { margin: 10px 0 6px; color: var(--dim); font-weight: 500; }
.help-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #20252d; }
.help-row span { color: var(--dim); text-align: right; font-size: 12px; }

/* ---------- 任务日志 ---------- */
.tp-item { padding: 10px; margin-bottom: 8px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); border-left: 3px solid var(--line2); }
.tp-item.s-running, .tp-item.s-queued { border-left-color: var(--accent); }
.tp-item.s-succeeded { border-left-color: #22c55e; }
.tp-item.s-failed { border-left-color: var(--danger); }
.tp-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.tp-kind { padding: 1px 6px; border-radius: 5px; background: var(--panel2); color: var(--dim); }
.tp-model { flex: 1; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-status { color: var(--mute); }
.s-failed .tp-status { color: var(--danger); }
.s-running .tp-status { color: var(--accent); }
.tp-prompt { margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-err { margin-top: 6px; color: #fca5a5; font-size: 12px; word-break: break-all; }
.tp-out { margin-top: 6px; color: var(--dim); font-size: 12px; }
.tp-files { display: flex; gap: 6px; margin-top: 8px; }
.tp-files img, .tp-files video { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.tp-time { margin-top: 6px; color: var(--mute); font-size: 11px; }

/* ---------- 资产库 / 灯箱 ---------- */
.asset-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.asset-bar .tabs { flex: 1; margin: 0; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; min-height: 300px; max-height: 62vh; overflow: auto; align-content: start; }
.asset-grid .sp-empty, .asset-grid .sp-loading { grid-column: 1 / -1; }
.asset { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; }
.asset:hover { border-color: var(--accent); }
.asset-thumb { aspect-ratio: 1; display: grid; place-items: center; color: var(--c-audio); background: #0f1216; }
.asset-thumb img, .asset-thumb video { width: 100%; height: 100%; object-fit: cover; }
.asset-meta { display: flex; flex-direction: column; padding: 6px 8px; color: var(--mute); font-size: 11px; }
.lightbox { display: grid; place-items: center; background: #07080a; border-radius: 10px; }
.lightbox img, .lightbox video { max-width: 100%; max-height: calc(100vh - 200px); display: block; }
.lightbox audio { width: 100%; margin: 40px 20px; }

/* ---------- API 设置 ---------- */
.input.sm { padding: 6px 9px; font-size: 12px; }
.st-sec { padding: 12px 14px; margin-bottom: 12px; border-radius: 11px; background: var(--bg2); border: 1px solid var(--line); }
.st-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.st-state { padding: 1px 8px; border-radius: 10px; font-size: 11px; color: var(--mute); background: var(--panel2); }
.st-state.on { color: #22c55e; background: rgba(34, 197, 94, .12); }
.st-field { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.st-field > span { width: 64px; flex: none; color: var(--dim); font-size: 12px; }
.st-key { flex: 1; display: flex; align-items: center; gap: 6px; }
.st-models { margin-top: 10px; padding-top: 8px; border-top: 1px solid #20252d; }
.st-sub { display: flex; align-items: center; gap: 3px; margin-bottom: 8px; color: var(--mute); font-size: 12px; }
.st-mrow { margin-bottom: 6px; }
.st-mline { display: grid; grid-template-columns: 72px 150px 1fr 30px 30px; gap: 6px; align-items: center; }
.st-mline select.input { height: 30px; padding: 0 6px; }
.st-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 6px 0 4px 78px; padding: 8px 10px;
  border-radius: 8px; background: var(--panel); font-size: 12px; }
.st-opts label { display: inline-flex; align-items: center; gap: 4px; }
.st-opts input[type=checkbox] { accent-color: var(--accent); margin: 0; }
.st-olabel { color: var(--mute); }
.st-sep { width: 1px; height: 14px; background: var(--line2); }
.st-dur { width: 110px; }
.st-prow { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.st-price { width: 72px; }
.st-empty { padding: 8px 0; color: var(--mute); font-size: 12px; }
.st-models > .btn { margin-top: 4px; }
.st-tip { color: var(--mute); font-size: 12px; line-height: 1.8; }
.st-tip code { color: var(--dim); word-break: break-all; }
#modeBadge { cursor: pointer; }
