/* 模块 entities 的样式（角色/场景/物品/造型生成/虚拟声源）。尺寸照 observations §9 与截图（截图像素 ÷ 0.8167）。 */

/* ---------- 中栏列表 ---------- */
.ent-list { display: flex; flex-direction: column; }
.ent-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 0; }
.ent-title { font-size: 13.5px; font-weight: 600; }
.ent-cnt { color: var(--text-muted); font-weight: 500; }
.ent-head-btn { width: 34px; height: 24px; padding: 0; font-size: 12px; }
.ent-tools { gap: 4px; margin: 6px 0 8px; }
.ent-tools .btn-xs { padding: 3px 7px; font-size: 10.5px; }
.ent-num { color: #60a5fa; margin: 0 2px; }
.ent-tall { align-self: stretch; }
.ent-selbox { display: inline-flex; flex-direction: column; justify-content: center; gap: 1px; border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; font-size: 10px; color: var(--text-muted); line-height: 1.3; }
.ent-selbox select { background: transparent; border: 0; outline: none; color: var(--text); font: 600 11px var(--font); padding: 0; min-width: 104px; cursor: pointer; }
.ent-selbox select option { background: var(--bg-input); }
.ent-selbox select:disabled { cursor: not-allowed; opacity: .7; }
.ent-search { margin-bottom: 8px; flex: none; }
.ent-items { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ent-bottom-btn { margin-top: 8px; flex: none; }
.ent-thumb { position: relative; width: 38px; height: 38px; flex: none; border-radius: 7px; background: #000; }
.ent-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
/* 有图的在图出来之前是一块深灰渐变（10-20 起列表小图走服务端缩略图，第一次要现做），和没图、图坏了的纯黑分得开 */
.ent-thumb:has(> img) { background: linear-gradient(135deg, #2e2e35, #1c1c21); }
.ent-thumb-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 17px; }
.ent-thumb-ok { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; background: var(--success); color: #fff; font-size: 8px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 1.5px var(--bg-card); }
.ent-del { flex: none; width: 15px; height: 15px; border-radius: 3px; border: 0; padding: 0; background: rgba(239, 68, 68, .22); color: #f87171; font-size: 10px; line-height: 15px; cursor: pointer; }
.ent-del:hover { background: var(--danger); color: #fff; }

/* ---------- 主区 ---------- */
.ent-none { color: var(--text-muted); font-size: 13px; }
.ent-top { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.ent-top.ch-top-gap { margin-bottom: 41px; }  /* 角色页没有历史条时：形象图框底到「名称」约 41（截图 03 / 34） */
.ent-imgbox { position: relative; flex: none; border: 2px dashed #52525b; border-radius: 10px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.ent-imgbox.sq { width: 120px; height: 120px; }
.ent-imgbox.wide { width: 278px; height: 157px; }
.ent-imgbox img { width: 100%; height: 100%; object-fit: cover; }
.ent-ok { position: absolute; top: 6px; left: 6px; }
.ent-ph { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-dim); font-size: 11.5px; }
.ent-ph-ico { font-size: 30px; filter: grayscale(1); opacity: .55; }
.ent-side { flex: 1; min-width: 0; }
.ent-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.6; }
.ent-pill.p3d { background: rgba(91, 107, 140, .15); border: 1px solid rgba(91, 107, 140, .6); color: #9fb0cc; }
.ent-pill.real { background: #27272a; border: 1px solid #52525b; color: #d4d4d8; }
.ent-check3d { margin-top: 10px; color: var(--text-muted); font-size: 12px; }
.ent-type { margin-top: 10px; font-size: 12px; color: var(--text-muted); }

/* 历史记录条 */
.ent-hist { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px 12px; margin-bottom: 18px; }
.ent-hist-t { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.ent-hist-tip { margin-left: 10px; font-size: 11px; color: var(--text-dim); }
.ent-hist-list { display: flex; gap: 10px; flex-wrap: wrap; }
.ent-hist-item { position: relative; width: 72px; height: 72px; border-radius: 6px; border: 2px solid transparent; overflow: hidden; cursor: pointer; background: #000; }
.ent-hist-item.wide { width: 96px; height: 54px; }  /* 场景：原站 96 宽 16:9 */
.ent-hist-item.cur { border-color: var(--accent); }
.ent-hist-item img { width: 100%; height: 100%; object-fit: cover; }
.ent-hist-cur { position: absolute; right: 2px; bottom: 2px; background: var(--accent); color: #09090b; font-size: 9.5px; font-weight: 700; padding: 0 4px; border-radius: 3px; line-height: 1.5; }
.ent-hist-x { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; font-size: 10px; display: none; align-items: center; justify-content: center; cursor: pointer; }
.ent-hist-item:hover .ent-hist-x { display: flex; }

/* 表单：左标签右输入，约 600 宽 */
.ent-form { max-width: 600px; }
.ent-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; margin-bottom: 14px; }
.ent-row > label { font-size: 12.5px; color: var(--text-muted); }
.ent-row-top { align-items: start; }
.ent-lab-pad { padding-top: 8px; }
.ent-row .input { height: 34px; }
.ent-sel { height: 34px; padding: 6px 10px; }
.ent-ta { min-height: 80px; }
.ent-prompt { min-height: 125px; font-size: 12.5px; }
.ent-hint { font-size: 11px; color: var(--text-dim); margin-top: 6px; line-height: 1.5; }
.ent-wide-btn { height: 34px; }
.ent-btn-red { color: var(--danger); border-color: rgba(239, 68, 68, .6); }
.ent-audio { width: 100%; height: 36px; }
.ent-lab-col { padding-right: 8px; }
.ent-lab-main { font-size: 12.5px; color: var(--text-muted); }
.ent-lab-sub { font-size: 10px; color: var(--text-dim); line-height: 1.5; margin-top: 4px; }
.ent-lab-auto { font-size: 12px; line-height: 1.5; margin-top: 2px; }

/* 声纹锚卡片 */
.ent-anchor { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 4px 0 16px; }
.ent-anchor-t { font-size: 13px; font-weight: 700; }
.ent-anchor-sw { color: var(--text-muted); }
.ent-anchor-desc { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; }
.ent-anchor-video { width: 240px; max-height: 160px; border-radius: 6px; background: #000; }
.ent-sep { border-top: 1px solid var(--border); margin: 10px 0; }
.ent-sub-t { font-size: 11.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }

/* ---------- 穿搭造型 ---------- */
.ch-outfits { margin-top: 26px; }
.ch-of-title { font-size: 13.5px; font-weight: 700; }
.ch-of-eps { font-size: 12px; margin-top: 8px; }
.ch-of-eps b { font-weight: 700; }
.ch-of-cover { font-size: 12px; margin-top: 4px; }
.ch-warn { color: var(--warning); }
.ch-of-grid { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 14px; align-items: flex-start; }
.ch-of-card { width: 138px; }
.ch-of-img { position: relative; width: 138px; height: 178px; border-radius: 8px; overflow: hidden; background: #000; cursor: pointer; border: 1px solid var(--border); }
.ch-of-img img { width: 100%; height: 100%; object-fit: cover; }
.ch-of-empty { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--text-dim); font-size: 11.5px; }
.ch-of-ok { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; font-size: 12px; }
.ch-of-warn { position: absolute; top: 6px; right: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.ch-of-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); }
.ch-of-ep { color: var(--primary); font-size: 11px; font-weight: 600; text-align: center; margin-top: 4px; }
.ch-of-desc { color: var(--text-muted); font-size: 10px; text-align: center; }
.ch-of-actions { display: flex; gap: 3px; margin-top: 3px; align-items: center; }
.ch-of-actions .btn { flex: 1; justify-content: flex-start; }
.ch-of-add { width: 138px; height: 178px; border: 1.5px dashed #52525b; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text-muted); font: 400 11.5px var(--font); background: transparent; cursor: pointer; }
.ch-of-add:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.ch-of-add:disabled { opacity: .45; cursor: not-allowed; }
.ch-of-add .plus { font-size: 22px; line-height: 1; }

/* ---------- 场景 / 物品（照原站 .scene-* / .trust-btn-big / .upload-overlay） ---------- */
.sc-dim { opacity: .4; }
.sc-spin { width: 8px; height: 8px; border-width: 1.5px; vertical-align: -1px; }
.sc-search { position: relative; margin-bottom: 8px; flex: none; }
.sc-search .ent-search { width: 100%; margin-bottom: 0; padding-right: 26px; }
.sc-search-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--text-muted); font-size: 13px; line-height: 1; }
.sc-ok-inline { color: #22c55e; font-size: 10px; flex: none; }
.sc-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 12.5px; line-height: 1.6; }
.sc-bottom { flex: none; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--border); }
.sc-batch-t { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; text-align: center; }
.sc-paused { color: var(--warning); }
.sc-progress { width: 100%; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.sc-progress .fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 3px; transition: width .3s; }
.sc-none { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 200px; color: var(--text-muted); font-size: 13.5px; }
.sc-imgbox { cursor: pointer; transition: border-color .15s; }
.sc-imgbox:hover { border-color: var(--primary); }
.sc-ph-ico { display: inline-flex; color: var(--text-muted); }
.sc-upmask { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0, 0, 0, .6); backdrop-filter: blur(2px); }
.sc-up-text { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.sc-up-bar { width: 70%; height: 4px; background: rgba(255, 255, 255, .2); border-radius: 2px; overflow: hidden; }
.sc-up-bar .fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .2s; }
.sc-trust { position: absolute; top: 6px; left: 6px; z-index: 5; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .8);
  cursor: pointer; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); transition: transform .15s, box-shadow .15s; }
.sc-trust:hover:not(:disabled) { transform: scale(1.2); box-shadow: 0 3px 10px rgba(0, 0, 0, .5); }
.sc-trust:disabled { cursor: default; }
.sc-trust.trusted { background: #22c55e; }
.sc-trust.untrusted { background: #ef4444; animation: scTrustPulse 1.5s ease-in-out infinite; }
.sc-trust.trusting { background: #f59e0b; }
.sc-trust-spin { width: 10px; height: 10px; border-width: 1.5px; }
@keyframes scTrustPulse { 0%, 100% { box-shadow: 0 2px 6px rgba(0, 0, 0, .5); } 50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, .35); } }
.sc-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .5); }
.sc-refbox { margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 6px; }
.sc-refrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-ref-lab { font-size: 11.5px; color: var(--text-muted); }
.sc-ref-img { width: 52px; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: 4px; border: 1px solid var(--accent, #f59e0b); cursor: pointer; }
.sc-ref-text { font-size: 10px; color: #F59E0B; }
.sc-ref-off { font-size: 10px; color: var(--text-muted); }
.sc-picker { margin-top: 8px; }
.sc-picker-t { font-size: 10px; color: var(--text-muted); margin: 8px 0 4px; }
.sc-picker-list { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-picker-list img { width: 64px; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); cursor: pointer; }
.sc-picker-list img:hover { border-color: var(--accent); }
.sc-ro { opacity: .7; }
.sc-mono { font-family: var(--mono, ui-monospace, monospace); font-size: 12px; line-height: 1.5; }

/* 添加场景 / 物品弹窗（原站 .add-modal-box，400 宽） */
.sc-add-box { width: 400px; max-width: 90vw; padding: 24px; }
.sc-add-x { position: absolute; top: 12px; right: 12px; }
.sc-add-t { text-align: center; font-size: 16px; font-weight: 700; margin: 0 0 16px; }
.sc-add-f { margin-bottom: 12px; }
.sc-add-f2 { margin-bottom: 16px; }
.sc-add-f label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.sc-add-f .input, .sc-add-f .textarea { width: 100%; }
.sc-add-acts { justify-content: flex-end; }

/* 自动匹配图片弹窗（原站 680 宽、最高 85vh） */
.am-mask { z-index: 1200; }
.am-box { width: 680px; max-width: 94vw; max-height: 85vh; overflow-y: auto; padding: 22px 24px; }
.am-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.am-title { margin: 0; font-size: 16px; font-weight: 700; display: flex; align-items: center; }
.am-ico { margin-right: 6px; }
.am-loading { text-align: center; padding: 40px; }
.am-phase { margin-top: 12px; }
.am-muted { color: var(--text-muted); }
.am-bar { width: 80%; margin: 8px auto 0; }
.am-pct { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.am-sum { font-size: 12.5px; color: var(--text-muted); margin-bottom: 12px; }
.am-acc { color: var(--accent); }
.am-red { color: #ef4444; }
.am-sec { margin-bottom: 16px; }
.am-sec-t { font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.am-row { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; }
.am-lab { display: flex; align-items: center; gap: 6px; cursor: pointer; flex: 1; min-width: 0; }
.am-lab img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); flex: none; }
.am-info { min-width: 0; flex: 1; }
.am-fn { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-meta { font-size: 11px; color: var(--text-muted); }
.am-portrait { color: #10b981; font-weight: 600; }
.am-outfit { color: var(--accent); font-weight: 600; }
.am-new { color: #f59e0b; font-size: 9.5px; }
.am-fuzzy { color: #f59e0b; font-size: 9.5px; }
.am-un { font-size: 11px; color: var(--text-muted); max-height: 120px; overflow-y: auto; padding: 8px; background: var(--bg-card); border-radius: 6px; line-height: 1.7; }
.am-acts { justify-content: flex-end; }

/* ---------- 造型生成弹窗（约 500 宽） ---------- */
.of-modal { width: 500px; max-height: calc(100vh - 80px); padding: 14px 22px 18px; }
.of-ok { position: absolute; top: 8px; left: 8px; }
.of-x { position: absolute; top: 12px; right: 14px; }
.of-title { text-align: center; font-size: 17px; font-weight: 700; margin: 4px 0 6px; }
.of-label { font-size: 11.5px; color: var(--text-muted); font-weight: 600; margin: 14px 0 6px; }
.of-label-row { margin: 16px 0 6px; gap: 8px; }
.of-input { background: var(--bg); height: 34px; }
.of-ta { min-height: 80px; }
.of-refbox { background: #1c1c20; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-top: 16px; }
.of-ref-t { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.of-refs { display: flex; gap: 12px; margin-top: 8px; }
.of-ref { position: relative; width: 118px; height: 150px; border-radius: 10px; overflow: hidden; background: #202024; flex: none; }
.of-ref img { width: 100%; height: 100%; object-fit: cover; }
.of-ref.face { border: 2px solid #3f3f46; }
.of-ref.face.on { border-color: var(--success); }
.of-ref.add { border: 1.5px dashed #52525b; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-muted); font: 400 11px var(--font); cursor: pointer; background: transparent; }
.of-ref.add:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.of-ref.add:disabled { opacity: .45; cursor: not-allowed; }
.of-plus { font-size: 22px; line-height: 1; }
.of-ref-x { position: absolute; top: 4px; right: 4px; }
.of-face-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; color: var(--text-muted); background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
.of-face-check { color: var(--success); font-weight: 700; font-size: 11px; }
.of-face-check.off { color: var(--text-muted); }
.of-face-check input { accent-color: var(--success); }
.of-ref-tip { font-size: 10.5px; color: var(--text-dim); margin-top: 8px; }
.of-prompt { font-family: var(--mono); font-size: 12px; min-height: 104px; }
.of-actions { display: flex; gap: 10px; margin-top: 16px; }
.of-gen { flex: 1; justify-content: flex-start; height: 40px; font-size: 13px; padding: 0 14px; }
.of-up { height: 40px; padding: 0 14px; }
.of-hist { margin: 16px 0 0; }

/* ---------- 虚拟声源弹窗 ---------- */
.vv-modal { width: 900px; height: min(660px, calc(100vh - 60px)); display: flex; flex-direction: column; overflow: hidden; }
.vv-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 20px 12px; border-bottom: 1px solid var(--border); flex: none; }
.vv-title { font-size: 15px; font-weight: 700; }
.vv-subt { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.vv-body { flex: 1; min-height: 0; display: flex; }
.vv-list { width: 220px; flex: none; border-right: 1px solid var(--border); overflow-y: auto; padding: 8px; }
.vv-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 12.5px; border: 1px solid transparent; }
.vv-item:hover { background: var(--bg-card-hover); }
.vv-item.active { background: var(--primary-light); border-color: var(--primary); }
.vv-st { font-size: 10.5px; flex: none; font-weight: 600; }
.vv-st.ok { color: var(--success); }
.vv-st.warn { color: var(--warning); }
.vv-empty { font-size: 12px; color: var(--text-dim); padding: 10px 6px; line-height: 1.7; }
.vv-detail { flex: 1; min-width: 0; overflow-y: auto; padding: 16px 20px; }
.vv-anchor { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 4px 0 14px; }
.vv-tpl-t { font-size: 12px; color: var(--text-muted); }
.vv-tpls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* ================= 第三轮：角色页 / 造型弹窗 / 虚拟声源逐按钮对齐原站 ================= */
/* 列表工具条 */
.ch-dim { opacity: .4; }
.ch-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.ch-spin { width: 8px; height: 8px; border-width: 1.5px; vertical-align: -1px; }
.ch-search { position: relative; }
.ch-search .ent-search { padding-right: 26px; }
.ch-search-x { position: absolute; right: 8px; top: 50%; transform: translateY(-75%); cursor: pointer; color: var(--text-muted); font-size: 14px; line-height: 1; }
.ch-empty-list { padding: 20px; text-align: center; color: var(--text-muted); font-size: 12.5px; line-height: 1.6; }
.ch-batch { padding: 6px 4px 0; border-top: 1px solid var(--border); margin-top: 8px; flex: none; }
.ch-batch-num { font-size: 11px; color: var(--text-muted); text-align: center; margin-bottom: 4px; }
.ch-bar { height: 4px; border-radius: 2px; background: var(--bg-card-hover); overflow: hidden; margin-bottom: 4px; }
.ch-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .2s; }
.ch-none { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 300px; color: var(--text-muted); font-size: 13.5px; }

/* 形象图：可点看大图；左上报白徽标（✓ 已报白 / ! 未报白 / 报白中） */
.ch-avatar.has-img { cursor: zoom-in; }
.ch-avatar:hover { border-color: var(--primary); }
.ch-up { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0, 0, 0, .6); border-radius: inherit; }
.ch-up-t { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.ch-up-bar { width: 70%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.ch-trust { position: absolute; top: 4px; left: 4px; z-index: 5; width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .8); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); transition: transform .15s, box-shadow .15s; }
.ch-trust.big { top: 6px; left: 6px; width: 28px; height: 28px; font-size: 12px; }
.ch-trust:hover:not(:disabled) { transform: scale(1.2); }
.ch-trust:disabled { cursor: default; }
.ch-trust.trusted { background: var(--success); }
.ch-trust.untrusted { background: var(--danger); animation: chTrustPulse 1.5s ease-in-out infinite; }
.ch-trust.trusting { background: #f59e0b; animation: chTrustBlink 1s ease-in-out infinite; }
.ch-trust-spin { width: 10px; height: 10px; border-width: 1.5px; }
@keyframes chTrustPulse { 0%, 100% { box-shadow: 0 2px 6px rgba(239, 68, 68, .4); } 50% { box-shadow: 0 2px 12px rgba(239, 68, 68, .8); } }
@keyframes chTrustBlink { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.ch-acts { margin-bottom: 10px; align-items: center; }

/* 声纹锚 */
.ch-on-text { color: var(--success); font-weight: 600; }
.ch-anchor-row { align-items: center; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ch-tag { padding: 1px 6px; border-radius: 3px; font-size: 11px; }
.ch-tag.ok { background: rgba(67, 193, 98, .15); color: #43c162; }
.ch-tag.warn { background: rgba(255, 170, 40, .15); color: #ffaa28; }
.ch-tiny { font-size: 10px; padding: 1px 6px; }
.ch-anchor-video { width: 100%; max-height: 180px; border-radius: 6px; border: 1px solid var(--border); background: #000; display: block; }
.ch-anchor-video.preview { border: 2px solid var(--primary); }
.ch-small { font-size: 10.5px; }
.ch-preview-t { font-size: 11px; color: var(--primary); font-weight: 600; margin-bottom: 4px; }
.ch-anchor-fail { font-size: 11px; color: var(--danger); margin-top: 4px; }

/* 穿搭：出场集数 / 覆盖校验；造型卡（悬停「✎ 编辑造型」、右上图片数、生成中遮罩） */
.ch-of-eps-box { margin-top: 8px; font-size: 12px; line-height: 1.5; }
.ch-eps-b { font-weight: 600; color: var(--text); }
.ch-gap { margin-top: 4px; padding: 4px 8px; background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .4); border-radius: 6px; color: #b45309; }
.ch-gap b { font-weight: 600; }
.ch-covered { margin-top: 4px; color: var(--success); }
.ch-of-img:hover { border-color: var(--primary); }
.ch-of-empty { flex-direction: column; gap: 4px; background: var(--bg); text-align: center; padding: 0 4px; font-size: 10.5px; }
.ch-of-empty-ico { font-size: 24px; }
.ch-of-gen { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: rgba(0, 0, 0, .55); color: var(--accent); font-size: 10px; }
.ch-of-over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .5); color: #fff; font-size: 10.5px; opacity: 0; transition: opacity .2s; }
.ch-of-img:hover .ch-of-over { opacity: 1; }
.ch-of-count { position: absolute; top: 4px; right: 4px; z-index: 3; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ch-of-actions .ch-of-x { flex: none; padding: 2px 5px; }

/* 造型生成弹窗：参考图卡（启用人脸参考 = 绿实线框）、当前使用、历史图片 */
.of-ref, .of-ref.face { width: 120px; height: auto; min-height: 140px; border: 2px dashed var(--border); background: rgba(0, 0, 0, .15); }
.of-ref.on, .of-ref.face.on { border: 2px solid var(--success); }
.of-ref img { height: 100px; display: block; cursor: zoom-in; }
.of-ref-lab { font-size: 10px; text-align: center; padding: 4px 0 2px; color: var(--text-muted); }
.of-face-check { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 10px; padding: 2px 0 4px; cursor: pointer; font-weight: 400; }
.of-ref-none { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 136px; padding: 10px; text-align: center; font-size: 11px; color: var(--text-muted); }
.of-ref-none-ico { font-size: 24px; margin-bottom: 4px; }
.of-ref-del { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.of-ref:hover .of-ref-del { opacity: 1; }
.of-ref-add { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 136px; color: var(--text-muted); font-size: 11px; cursor: pointer; }
.of-ref-add:hover { color: var(--accent); background: rgba(227, 197, 143, .08); }
.of-ref-add.off { pointer-events: none; opacity: .45; }
.of-ref-up .ch-up-t { margin: 0; }
.of-refstate { margin: 12px 0 0; padding: 8px 12px; border-radius: 8px; background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .3); color: var(--success); font-size: 11.5px; display: flex; align-items: center; gap: 6px; }
.of-t-accent { color: var(--accent); }
.of-t-primary { color: var(--primary); }
.of-cur { text-align: center; margin-top: 4px; }
.of-cur .of-label { text-align: center; }
.of-cur-box { position: relative; display: inline-block; max-width: 140px; border-radius: 10px; overflow: hidden; border: 2px solid var(--danger); }
.of-cur-box.ok { border-color: var(--success); }
.of-cur-box img { width: 140px; height: 140px; object-fit: cover; display: block; cursor: zoom-in; }
.of-cur-st { margin-top: 4px; font-size: 11px; }
.of-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; margin-top: 8px; }
.of-thumb { position: relative; border: 2px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; transition: all .15s; }
.of-thumb:hover { border-color: var(--primary); transform: translateY(-2px); }
.of-thumb.active { border-color: var(--success); }
.of-thumb img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.of-thumb-info { display: flex; justify-content: space-between; gap: 2px; padding: 3px 5px; font-size: 9.5px; font-weight: 600; color: var(--text-muted); background: var(--bg); }
.of-thumb-time { font-size: 8.5px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.of-use-tag { position: absolute; bottom: 20px; left: 0; right: 0; background: var(--success); color: #fff; text-align: center; padding: 2px; font-size: 9.5px; font-weight: 700; }
.of-thumb-del { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-size: 10px; cursor: pointer; display: none; align-items: center; justify-content: center; line-height: 1; }
.of-thumb:hover .of-thumb-del { display: flex; }
.of-empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: 13px; }
.of-empty-ico { margin-bottom: 8px; opacity: .3; }

/* 虚拟声源：列表项第二行是类型；声纹锚行；模板区虚线分隔；删除靠右 */
.vv-item { flex-direction: column; align-items: stretch; gap: 2px; }
.vv-item-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-weight: 600; }
.vv-item-sub { font-size: 10.5px; color: var(--text-muted); }
.vv-none { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 240px; color: var(--text-muted); font-size: 13.5px; }
.vv-anchor-row { align-items: center; min-width: 0; font-size: 11px; color: var(--text-muted); }
.vv-anchor-url { flex: 1; min-width: 0; }
.vv-tpl-box { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.vv-del-row { margin-top: 14px; display: flex; justify-content: flex-end; }

/* ---------- 复刻版独有（业主 10-20）：「☑ 多选」批量删除、「N 镜 / 未引用」、撤销提示条、已删除名单 ---------- */
.ent-multi-on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.ent-ign-btn { color: var(--text-muted); border-style: dashed; }
/* 多选操作条：照素材库 .lib-batch-bar，左栏只有 250 宽，排不下就换行。整栏一起滚，所以贴顶（sticky）：
   往下滚去勾后面的，「已选 N 个」「🗑 删除选中」还在眼前；底色不透明（橙色淡层叠在卡片底色上），下面的行别透上来 */
.ent-batch-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 6px 8px; margin: 0 0 8px; border: 1px solid var(--primary);
  border-radius: 8px; background: linear-gradient(var(--primary-light), var(--primary-light)), var(--bg-card); font-size: 11px; flex: none;
  position: sticky; top: 0; z-index: 2; }
.ent-batch-bar .btn-xs { padding: 2px 6px; font-size: 10.5px; }
.ent-batch-n { font-weight: 600; margin-right: 2px; }
.ch-of-batch { margin: 12px 0 0; }   /* 穿搭区的贴顶只在「穿搭造型」这一块里（父元素是 .ch-outfits），滚出这块就跟着走 */
/* 行首 / 卡角的勾选框 */
.ent-pick { flex: none; width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid #71717a; color: transparent; font-size: 10px; font-weight: 700;
  line-height: 12px; text-align: center; }
.ent-pick.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.char-list-item.ent-picked { background: var(--primary-light); border-color: rgba(207, 169, 104, .45); }
.ch-of-pick { position: absolute; right: 6px; bottom: 6px; z-index: 3; width: 20px; height: 20px; line-height: 17px; font-size: 12px;
  background: rgba(0, 0, 0, .45); border-color: #fff; }
.ch-of-card.ent-picked .ch-of-img { border: 2px solid var(--primary); }
/* 「N 镜 / 未引用」：灰色小字，不抢名字的位置 */
.ent-use { flex: none; font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.ent-use.none { color: var(--text-dim); }
.ch-of-use { text-align: center; margin-top: 1px; }
/* 撤销提示条：底部正中（让开左侧导航），在后台任务条上面 */
.ent-undo { position: fixed; bottom: 44px; left: calc(var(--sidebar-w) + (100vw - var(--sidebar-w)) / 2); transform: translateX(-50%); z-index: 950;
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: #18181b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5); font-size: 12.5px; white-space: nowrap; }
.ent-undo-dot { color: var(--text-dim); }
/* 「撤销」只有 10 秒：点击区域做大些（触屏再大一点），别点不中 */
.ent-undo-btn { border: 0; border-radius: 6px; background: transparent; color: var(--primary); font: 700 12.5px var(--font); cursor: pointer;
  padding: 4px 12px; min-height: 28px; margin: -4px 0; }
.ent-undo-btn:hover { text-decoration: underline; background: var(--primary-light); }
@media (hover: none) { .ent-undo-btn { padding: 8px 16px; min-height: 36px; margin: -8px 0; font-size: 14px; } }
.ent-undo-left { color: var(--text-dim); font-variant-numeric: tabular-nums; }
/* 已删除名单弹窗 */
.ent-ign-box { width: 460px; max-width: calc(100vw - 40px); }
.ent-ign-tip { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-bottom: 10px; }
.ent-ign-list { max-height: 50vh; overflow-y: auto; border-top: 1px solid var(--border); }
.ent-ign-row { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.ent-ign-kind { flex: none; padding: 0 6px; border-radius: 4px; background: #27272a; color: var(--text-muted); font-size: 10.5px; line-height: 1.7; }
.ent-ign-empty { padding: 18px 0; text-align: center; color: var(--text-muted); font-size: 12.5px; }
