/* FrameLeap 臻悦 · 专业剪辑风（浅色 / 深色主题，默认按时间自动切换） */
:root, :root[data-theme="dark"] {
  --bg: #0c1018;        /* 页面底 */
  --bg-1: #10151f;      /* 侧栏 / 顶栏 */
  --bg-2: #151c27;      /* 卡片 / 面板 */
  --bg-3: #1c2533;      /* 悬停 / 输入框 */
  --bg-4: #283448;      /* 选中 */
  --line: #293446;
  --line-2: #3c4b63;
  --ink: #f1f5fb;
  --muted: #afbbce;
  --dim: #95a4ba;
  --accent: #b69cff;       /* 品牌紫（深色底文字） */
  --accent-2: #7c4dff;     /* 品牌紫（按钮底） */
  --accent-soft: rgba(150, 110, 255, .16);
  --keep: #3dd598;
  --keep-soft: rgba(61, 213, 152, .14);
  --cut: #ff5c6f;
  --cut-soft: rgba(255, 92, 111, .13);
  --warn: #f4b740;
  --warn-soft: rgba(244, 183, 64, .13);
  --radius: 14px;
  --nav-w: 216px;
  --toolbar-h: 80px;
  --titlebar-h: 0px;
  --top-h: calc(var(--toolbar-h) + var(--titlebar-h));
  --link-hover: #c8b6ff;
  --scroll: #2b3039;
  --code-ink: #d6caff;
  --err-ink: #ffb3bc;
  --warn-ink: #ffd98a;
  --ok-ink: #9ff0cd;
  --toast-bg: #f1f3f8;
  --toast-ink: #12141a;
  --overlay: rgba(5, 6, 8, .66);
  --playhead: #ffffff;
  --tick: rgba(255, 255, 255, .07);
  --pop-shadow: 0 12px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
/* 浅色主题：白天默认 */
:root[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-1: #ffffff;
  --bg-2: #ffffff;
  --bg-3: #f0f3f9;
  --bg-4: #e5eaf4;
  --line: #dfe5ef;
  --line-2: #c2ccdc;
  --ink: #1b2538;
  --muted: #52617a;
  --dim: #59677d;
  --accent: #5b2ee6;       /* 品牌紫加深：白底对比度 7:1 */
  --accent-2: #5b2ee6;
  --accent-soft: rgba(110, 59, 255, .10);
  --keep: #087b55;
  --keep-soft: rgba(17, 160, 104, .12);
  --cut: #c82c44;
  --cut-soft: rgba(227, 55, 78, .09);
  --warn: #926000;
  --warn-soft: rgba(232, 160, 20, .14);
  --link-hover: #4a1fd0;
  --scroll: #c8cdd7;
  --code-ink: #4a1fd0;
  --err-ink: #b3213a;
  --warn-ink: #8a5800;
  --ok-ink: #0b7a4e;
  --toast-bg: #1a1e26;
  --toast-ink: #ffffff;
  --overlay: rgba(20, 24, 32, .38);
  --playhead: #1a1e26;
  --tick: rgba(0, 0, 0, .08);
  --pop-shadow: 0 12px 36px rgba(20, 24, 32, .16);
  color-scheme: light;
}
:root[data-theme="light"] .card, :root[data-theme="light"] .kpi, :root[data-theme="light"] .sec,
:root[data-theme="light"] .idcard, :root[data-theme="light"] .thumb { box-shadow: 0 1px 2px rgba(20, 24, 32, .04); }
:root[data-theme="light"] .center { background: #e9ebf0; }
/* 切换主题时的过渡（只在切换瞬间加，避免平时拖慢渲染） */
.theme-switching, .theme-switching * { transition: background-color .3s, border-color .3s, color .3s !important; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 13.5px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--link-hover); }
svg.ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.ic.fill { fill: currentColor; }                                   /* 实心：播放 / 暂停等 */
svg.ic.ic-i { width: 1.15em; height: 1.15em; vertical-align: -.2em; } /* 跟文字同行的小图标 */
svg.ic.ok { color: var(--keep); } svg.ic.warn { color: var(--warn); } svg.ic.bad { color: var(--err-ink); }
button { font: inherit; color: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 外壳 ---------- */
.app { display: grid; grid-template-columns: var(--nav-w) 1fr; height: 100vh; }
.app.collapsed, .app.editor-mode { --nav-w: 60px; }
.nav { background: var(--bg-1); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.brand { display: flex; align-items: center; justify-content: center; gap: 12px; height: var(--toolbar-h); flex: none; padding: 0 20px; color: var(--ink); border-bottom: 1px solid var(--line); }
.brand:hover { color: var(--ink); }
.logo { width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: conic-gradient(from 210deg, var(--accent), #c06cff, var(--keep), var(--accent)); position: relative; }
.logo::after { content: ""; position: absolute; inset: 8px 7px 8px 10px; background: var(--bg-1); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.brand-name { font-weight: 700; font-size: 14px; line-height: 1.25; white-space: nowrap; overflow: hidden; }
.brand-name small { display: block; margin-top: 3px; font-weight: 500; color: var(--muted); font-size: 11px; }
.menu { padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.menu a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: var(--muted); white-space: nowrap; position: relative; }
.menu a:hover { background: var(--bg-3); color: var(--ink); }
.menu a.active { background: var(--accent-soft); color: var(--ink); }
.menu a.active svg { color: var(--accent); }
.menu .count { margin-left: auto; background: var(--nav-badge-bg, #f4b740); color: var(--nav-badge-fg, #1b1300); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 6px; line-height: 17px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
/* 侧栏角标：深色底亮黄黑字；浅色底实心橙红白字（对比度约 4.6:1，原 #926000 底近黑字看不清） */
:root, :root[data-theme="dark"] { --nav-badge-bg: #f4b740; --nav-badge-fg: #1b1300; }
:root[data-theme="light"] { --nav-badge-bg: #d9480f; --nav-badge-fg: #fff; }
.menu .sep { height: 1px; background: var(--line); margin: 8px 6px; }
.nav-foot { padding: 8px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 4px; }
.nav-ver { flex: 1; min-width: 0; padding: 0 10px; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; -webkit-user-select: text; user-select: text; }
.nav-ver:not([hidden]) + .nav-toggle { width: auto; flex: none; }
.app.collapsed .nav-ver, .app.editor-mode .nav-ver { display: none; }
.app.collapsed .nav-toggle, .app.editor-mode .nav-toggle { width: 100%; flex: 1; }
.nav-toggle { width: 100%; background: none; border: 0; color: var(--dim); padding: 8px; border-radius: 8px; cursor: pointer; display: flex; justify-content: center; }
.nav-toggle:hover { background: var(--bg-3); color: var(--ink); }
.app.collapsed .brand-name, .app.editor-mode .brand-name, .app.collapsed .menu .lbl, .app.editor-mode .menu .lbl { display: none; }
.app.collapsed .menu a, .app.editor-mode .menu a { justify-content: center; padding: 10px 0; }
.app.collapsed .menu .count, .app.editor-mode .menu .count { position: absolute; top: 3px; right: 6px; padding: 0 4px; font-size: 10px; line-height: 14px; }
.app.collapsed .brand, .app.editor-mode .brand { padding: 0; }

.shell { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar { height: var(--toolbar-h); flex: none; display: flex; align-items: center; gap: 16px; padding: 0 24px; background: var(--bg-1); border-bottom: 1px solid var(--line); }
.ws { display: flex; flex: none; align-items: center; gap: 8px; height: 42px; max-width: 200px; background: var(--bg-3); border: 1px solid var(--line); padding: 0 12px; border-radius: 10px; cursor: pointer; color: var(--ink); white-space: nowrap; }
.ws-name { overflow: hidden; text-overflow: ellipsis; }
.ws-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--keep); box-shadow: 0 0 0 3px var(--keep-soft); }
.ws .caret { flex: none; }
.caret { width: 0; height: 0; border: 4px solid transparent; border-top-color: var(--muted); margin-top: 4px; }
.search { flex: 1; min-width: 120px; max-width: 560px; height: 42px; display: flex; align-items: center; gap: 10px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; color: var(--dim); }
.search:focus-within { border-color: var(--accent); }
.search input[type=search] { flex: 1; min-width: 0; border: 0; width: 100%; background: none; color: var(--ink); padding: 0; font: inherit; outline: none; }
.top-actions { margin-left: auto; display: flex; flex: none; align-items: center; gap: 8px; }
.top-actions .btn { min-height: 42px; border-radius: 10px; }
.top-actions .icon-btn { width: 38px; height: 38px; border-radius: 10px; }
.top-actions .avatar { width: 34px; height: 34px; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--bg-3); color: var(--ink); }
.dot-count { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--warn); color: #1b1300; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; border: 0; background: linear-gradient(135deg, #5d6ef5, #c06cff); color: #fff; font-weight: 700; font-size: 12px; cursor: pointer; margin-left: 4px; }
.main { flex: 1; overflow-y: auto; padding: 24px 28px 64px; min-width: 0; }
.app.editor-mode .main { padding: 0; overflow: hidden; }
.page { max-width: 1240px; margin: 0 auto; }

/* macOS 原生按钮叠放在左上角，品牌在下方居中，和顶栏共用同一行高度。 */
html.frameleap-mac .app { --nav-w: 252px; }
html.frameleap-mac .app .brand { padding-top: 26px; }
html.frameleap-mac .brand-name small { margin-top: 2px; }
html.frameleap-mac .app.collapsed, html.frameleap-mac .app.editor-mode { --nav-w: 84px; }
html.frameleap-mac .topbar { -webkit-user-select: none; user-select: none; }
html.frameleap-mac .topbar input, html.frameleap-mac .topbar textarea { -webkit-user-select: text; user-select: text; }
/* 登录页 / 专注编辑等铺满窗口的界面：给左上角原生按钮留出空间 */
html.frameleap-mac .app.login-mode .main { padding-top: 48px; }
html.frameleap-mac #main .ve-workspace.ve-focused { inset: 0 0 0 0; height: 100dvh; padding-top: 44px; background: var(--bg-1); box-sizing: border-box; }
@media (max-width: 980px) {
  html.frameleap-mac .app { --nav-w: 84px; grid-template-columns: var(--nav-w) 1fr; }
  html.frameleap-mac .app.login-mode { grid-template-columns: 1fr; }
}

/* ---------- 通用组件 ---------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.page-head h1 { font-size: 20px; margin: 0; font-weight: 650; letter-spacing: .2px; }
.page-head .sub { color: var(--muted); margin-top: 2px; }
.page-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
/* 分隔线内绘，避免标签的负边距造成 1px 纵向溢出。窄窗口仅允许横向滚动。 */
.tabs { display: flex; gap: 2px; box-shadow: inset 0 -1px 0 var(--line); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; }
.tabs a { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; display: flex; align-items: center; gap: 6px; flex: none; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); border-bottom-color: var(--accent); }
.phase { font-size: 10.5px; font-weight: 700; letter-spacing: .3px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 4px; line-height: 15px; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card h2, .h2 { margin: 0 0 12px; font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card h2 .more, .h2 .more { margin-left: auto; font-weight: 400; font-size: 12.5px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.hint { color: var(--muted); margin: 0 0 12px; }
.muted { color: var(--muted); } .dim { color: var(--dim); }
.ok { color: var(--keep); } .warn { color: var(--warn); } .bad { color: var(--cut); }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--ink);
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font: inherit; white-space: nowrap; line-height: 1.4; }
.btn:hover { background: var(--bg-4); color: var(--ink); }
.btn.primary { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn.good { background: #1f9e6e; border-color: #1f9e6e; color: #fff; }
.btn.good:hover { background: var(--keep); border-color: var(--keep); color: #06261a; }
.btn.danger { color: var(--cut); border-color: rgba(255, 92, 111, .45); background: transparent; }
.btn.danger:hover { background: var(--cut-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--bg-3); color: var(--ink); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.plus { width: 12px; height: 12px; position: relative; }
.plus::before, .plus::after { content: ""; position: absolute; background: currentColor; border-radius: 1px; }
.plus::before { left: 5px; top: 0; width: 2px; height: 12px; } .plus::after { top: 5px; left: 0; height: 2px; width: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
textarea, input[type=text], input[type=password], input[type=number], input[type=search], select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-3); color: var(--ink); font: inherit; outline: none; }
textarea:focus, input:focus, select:focus { border-color: var(--accent); }
textarea { min-height: 64px; resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent-2); }
label .lb, .lb { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.field { margin-bottom: 14px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--bg-4); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.done { background: var(--keep-soft); color: var(--keep); }
.badge.failed, .badge.interrupted { background: var(--cut-soft); color: var(--cut); }
.badge.waiting_review, .badge.needs_attention { background: var(--warn-soft); color: var(--warn); }
.badge.running, .badge.resuming, .badge.queued { background: var(--accent-soft); color: var(--accent); }
.chip { display: inline-block; padding: 0 7px; border-radius: 5px; font-size: 11.5px; background: var(--bg-4); color: var(--muted); line-height: 19px; margin: 1px 4px 1px 0; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chips button { border: 1px solid var(--line-2); background: transparent; color: var(--muted); padding: 4px 11px; border-radius: 999px; cursor: pointer; font-size: 12.5px; }
.chips button:hover { color: var(--ink); }
.chips button.on { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.chips button b { font-weight: 600; margin-left: 4px; color: var(--dim); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--dim); font-weight: 500; font-size: 12px; text-transform: none; }
tr.rowlink { cursor: pointer; } tr.rowlink:hover td { background: var(--bg-3); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.jt { font-weight: 600; color: var(--ink); }
tr.child .jt::before { content: "↳ "; color: var(--dim); font-weight: 400; }
.empty { color: var(--muted); padding: 36px 12px; text-align: center; }
.empty .big { font-size: 15px; color: var(--ink); margin-bottom: 6px; }
.err { background: var(--cut-soft); color: var(--err-ink); border: 1px solid rgba(255, 92, 111, .3); border-radius: 8px; padding: 10px 12px; }
.warnbox { background: var(--warn-soft); color: var(--warn-ink); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
code { background: var(--bg-3); padding: 1px 6px; border-radius: 4px; }
pre.code { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; margin: 0; color: var(--code-ink); }
.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--bg-4); border-top-color: var(--accent); border-radius: 50%; animation: s 1s linear infinite; vertical-align: -2px; }
@keyframes s { to { transform: rotate(360deg); } }
.progress { height: 5px; background: var(--bg-4); border-radius: 3px; overflow: hidden; }
.progress div { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); width: 0; transition: width .3s; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--toast-bg); color: var(--toast-ink); padding: 10px 18px; border-radius: 8px; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.modal { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; z-index: 40; }
.modal .box { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 22px 24px; width: min(520px, 92vw); max-height: calc(100dvh - 32px); overflow-y: auto; min-height: 0; }
.modal h3 { margin: 0 0 12px; }
.kbd { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--ink); background: var(--bg-3); }
.dl { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; margin: 0; }
.dl dt { color: var(--dim); } .dl dd { margin: 0; word-break: break-all; }

/* ---------- 工作台 ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .k { color: var(--muted); font-size: 12px; }
.kpi .v { font-size: 22px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.kpi.hot .v { color: var(--warn); }
.drop { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 26px; display: flex; align-items: center; gap: 18px; cursor: pointer; transition: .15s;
  background: radial-gradient(600px 120px at 20% 0%, rgba(123, 140, 255, .08), transparent); }
.drop:hover, .drop.over { border-color: var(--accent); background-color: var(--accent-soft); }
.drop .ico { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); flex: none; }
.drop .ico svg { width: 24px; height: 24px; }
.drop b { font-size: 15px; display: block; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.list .m { color: var(--muted); font-size: 12px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.thumb { background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: var(--ink); display: block; }
.thumb:hover { border-color: var(--line-2); color: var(--ink); }
.thumb .pic { aspect-ratio: 16/10; background: #050608 center/cover no-repeat; display: grid; place-items: center; color: var(--dim); position: relative; }
.thumb .pic .ar { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; border-radius: 4px; padding: 0 5px; }
.thumb .meta { padding: 8px 10px; }
.thumb .meta .t { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb .meta .m { color: var(--muted); font-size: 11.5px; display: flex; justify-content: space-between; gap: 6px; }

/* ---------- 新建作业 ---------- */
.wizard { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.sec { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.sec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 650; }
.sec-h .n { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.upload { border: 1.5px dashed var(--line-2); border-radius: 10px; padding: 18px; display: flex; gap: 14px; align-items: center; cursor: pointer; }
.upload:hover, .upload.over { border-color: var(--accent); background: var(--accent-soft); }
.upload input[type=file] { display: none; }
.or { color: var(--dim); text-align: center; margin: 10px 0; font-size: 12px; }
.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pf { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; display: flex; gap: 12px; align-items: center; cursor: pointer; background: var(--bg-3); }
.pf:hover { border-color: var(--dim); }
.pf input { display: none; }
.pf.on { border-color: var(--accent); background: var(--accent-soft); }
.pf .shape { border: 1.5px solid var(--muted); border-radius: 3px; flex: none; }
.pf.on .shape { border-color: var(--accent); background: rgba(123,140,255,.2); }
.pf .nm { font-weight: 600; } .pf .ds { color: var(--muted); font-size: 11.5px; }
.g2f { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.g2f .full { grid-column: 1 / -1; }
details.adv summary { cursor: pointer; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 6px; }
details.adv summary::before { content: "▸"; font-size: 11px; }
details.adv[open] summary::before { content: "▾"; }
details.adv[open] summary { margin-bottom: 14px; color: var(--ink); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.summary { position: sticky; top: 0; }
.summary .row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.summary .row span:first-child { color: var(--muted); }
.summary .row span:last-child { text-align: right; }
.upbar { margin-top: 10px; }

/* ---------- 字幕风格 / 平台预设 ---------- */
.idgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.idcard { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.idcard .stage { aspect-ratio: 16/9; background: linear-gradient(160deg, #39404d 0%, #1a1e25 55%, #0b0c0f 100%); position: relative; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12%; overflow: hidden; }
.idcard .stage::before { content: ""; position: absolute; width: 34%; aspect-ratio: 1; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 50% 40%, #8a7a6c, #4d4239 70%); top: 14%; left: 33%; opacity: .55; }
.idcard .stage::after { content: ""; position: absolute; width: 60%; height: 40%; border-radius: 50% 50% 0 0; background: #2c3442; bottom: -6%; left: 20%; opacity: .8; }
.cap { position: relative; z-index: 2; font-size: 19px; padding: 2px 10px; border-radius: 6px; letter-spacing: .5px; }
.cap .hl { display: inline-block; }
.idcard:hover .cap.anim-pop .hl { animation: pop .6s ease-in-out infinite alternate; }
.idcard:hover .cap.anim-fade { animation: fade 1.4s ease-in-out infinite alternate; }
.idcard:hover .cap.anim-slide { animation: slide 1s ease-in-out infinite alternate; }
.idcard:hover .cap.anim-karaoke .w { animation: kara 2s steps(1) infinite; }
@keyframes pop { to { transform: scale(1.22); } }
@keyframes fade { from { opacity: .25; } }
@keyframes slide { from { transform: translateY(8px); opacity: .5; } }
@keyframes kara { 0% { color: inherit; } 50% { color: var(--kc); } }
.idcard .body { padding: 12px 14px; }
.idcard .nm { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.idcard .ds { color: var(--muted); font-size: 12.5px; margin-top: 3px; min-height: 38px; }
.swatches { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.sw { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-2); }
.ratio { display: inline-block; border: 1.5px solid var(--muted); border-radius: 2px; vertical-align: middle; margin-right: 8px; }

/* ---------- 占位页 ---------- */
.placeholder { border: 1px dashed var(--line-2); border-radius: 12px; padding: 28px; display: grid; grid-template-columns: 56px 1fr; gap: 18px; background: var(--bg-2); }
.placeholder .ico { width: 56px; height: 56px; border-radius: 14px; background: var(--bg-3); display: grid; place-items: center; color: var(--muted); }
.placeholder .ico svg { width: 26px; height: 26px; }
.placeholder h3 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.placeholder ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.placeholder li { margin: 3px 0; }
.placeholder .now { margin-top: 12px; color: var(--ink); background: var(--bg-3); border-radius: 8px; padding: 8px 12px; }

/* ---------- 设置 ---------- */
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chain .node { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 8px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.chain .node i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.chain .node.on i { background: var(--keep); }
.chain .node.off { color: var(--dim); }
.chain .arr { color: var(--dim); }
.banner { display: flex; gap: 12px; align-items: center; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--line-2); background: var(--bg-2); }
.banner.warn { background: var(--warn-soft); border-color: rgba(244, 183, 64, .3); color: var(--warn-ink); }
.banner.ok { background: var(--keep-soft); border-color: rgba(61, 213, 152, .3); color: var(--ok-ink); }
.seg { display: inline-flex; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 8px; padding: 2px; }
.seg span { padding: 4px 12px; border-radius: 6px; color: var(--muted); }
.seg span.on { background: var(--bg-4); color: var(--ink); }

/* ---------- 编辑器 ---------- */
.editor { display: grid; grid-template-rows: auto 1fr; height: calc(100vh - var(--top-h)); }
.ed-head { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg-1); min-width: 0; }
.ed-head .back { color: var(--muted); display: flex; align-items: center; }
.ed-head .back:hover { color: var(--ink); }
.ed-title { min-width: 0; }
.ed-title h1 { font-size: 15px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 10px; }
.ed-title .sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.stepper .st { display: flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 8px; color: var(--dim); font-size: 12.5px; white-space: nowrap; }
.stepper .st i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-style: normal; font-size: 10.5px; font-weight: 700; }
.stepper .st.done { color: var(--muted); } .stepper .st.done i { background: var(--keep); border-color: var(--keep); color: #06261a; }
.stepper .st.cur { color: var(--ink); background: var(--accent-soft); } .stepper .st.cur i { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.stepper .st.wait.cur { background: var(--warn-soft); } .stepper .st.wait.cur i { background: var(--warn); border-color: var(--warn); color: #1b1300; }
.stepper a.st:hover { background: var(--bg-3); color: var(--ink); }
.stepper .ln { width: 14px; height: 1px; background: var(--line-2); }
.ed-body { display: grid; grid-template-columns: 340px minmax(0, 1fr) 320px; min-height: 0; }
.pane { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg-1); }
.pane:last-child { border-right: 0; border-left: 1px solid var(--line); }
.pane-h { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 12.5px; flex: none; }
.pane-h .r { margin-left: auto; font-weight: 400; color: var(--muted); }
.pane-b { flex: 1; overflow-y: auto; min-height: 0; }
.pane-tabs { display: flex; border-bottom: 1px solid var(--line); flex: none; }
.pane-tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 0; color: var(--muted); cursor: pointer; font-size: 12.5px; }
.pane-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.center { min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.stage-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 18px; position: relative; }
.stage-wrap video { max-width: 100%; max-height: 100%; background: #000; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.stage-empty { color: var(--dim); text-align: center; }
.ctrl { flex: none; border-top: 1px solid var(--line); background: var(--bg-1); padding: 10px 16px 12px; }
.ctrl-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tc { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tc b { color: var(--ink); font-weight: 600; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
.stats span { color: var(--muted); font-size: 12px; }
.stats b { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; margin-left: 3px; }
.stats b.ok { color: var(--keep); }
.timeline { position: relative; height: 38px; margin: 10px 0 4px; background: var(--keep-soft); border-radius: 6px; cursor: pointer; overflow: hidden; border: 1px solid var(--line); }
.timeline .seg-cut { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(255,92,111,.55) 0 4px, rgba(255,92,111,.3) 4px 8px); }
.timeline .seg-cut.user { background: rgba(255,92,111,.75); }
.timeline .seg-sent { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--tick); }
.timeline .head { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--playhead); box-shadow: 0 0 6px var(--playhead); pointer-events: none; }
.tl-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--dim); }
.tl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); font-size: 12.5px; user-select: none; }
.switch input { display: none; }
.switch .tr { width: 30px; height: 17px; border-radius: 9px; background: var(--bg-4); position: relative; transition: .15s; }
.switch .tr::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--muted); transition: .15s; }
.switch input:checked + .tr { background: var(--accent-2); }
.switch input:checked + .tr::after { left: 15px; background: #fff; }
.decide { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; }
.decide textarea { min-height: 38px; height: 38px; flex: 1; }
.decide .btns { display: flex; gap: 8px; flex: none; }
/* 句子稿 */
.sents { list-style: none; padding: 0; margin: 0; }
.sents li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 9px 14px 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.sents li:hover { background: var(--bg-3); }
.sents .t { color: var(--dim); font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; padding-top: 2px; }
.sents .txt { color: var(--ink); }
.sents .tag { display: block; font-size: 11px; color: var(--warn); margin-top: 2px; }
.sents li.cut { background: var(--cut-soft); }
.sents li.cut .txt { text-decoration: line-through; text-decoration-color: var(--cut); color: var(--dim); }
.sents li.cut .tag { color: var(--cut); }
.sents li.partial { background: var(--warn-soft); }
.sents li.changed::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.sents li.playing { box-shadow: inset 0 0 0 1px var(--accent); }
.sents li.hidden { display: none; }
.pane-tools { padding: 8px 12px; border-bottom: 1px solid var(--line); display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.pane-tools .chips { margin: 0; }
.pane-tools .chips button { padding: 2px 9px; font-size: 12px; }
/* 右侧面板 */
.agent { display: flex; flex-direction: column; height: 100%; }
.msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { background: var(--bg-3); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
.msg.me { background: var(--accent-soft); align-self: flex-end; }
.msg .who { font-size: 11px; color: var(--dim); margin-bottom: 3px; display: flex; gap: 6px; align-items: center; }
.msg ul { margin: 4px 0 0; padding-left: 16px; }
.composer { border-top: 1px solid var(--line); padding: 10px 12px; flex: none; }
.composer textarea { min-height: 54px; }
.composer .note { font-size: 11.5px; color: var(--dim); margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sugg span { font-size: 11.5px; border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 9px; color: var(--dim); }
.info { padding: 14px; }
.info h4 { margin: 14px 0 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.info h4:first-child { margin-top: 0; }
.log { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--muted); padding: 12px 14px; white-space: pre-wrap; word-break: break-all; }
.log .n { color: var(--accent); }
.qa-item { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.qa-item .h { display: flex; justify-content: space-between; font-weight: 600; }
.qa-item ul { margin: 6px 0 0; padding-left: 16px; color: var(--muted); font-size: 12px; }
.issue { padding: 9px 14px; border-bottom: 1px solid var(--line); cursor: pointer; display: grid; grid-template-columns: 48px 1fr; gap: 8px; }
.issue:hover { background: var(--bg-3); }
.frames { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 4px; margin-top: 10px; }
.frames img { height: 64px; border-radius: 4px; border: 1px solid var(--line); flex: none; }
.proc { width: min(520px, 90%); text-align: left; }
.proc .now { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.proc ol { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.proc ol li { color: var(--dim); font-size: 12.5px; display: flex; gap: 8px; align-items: center; }
.proc ol li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.proc ol li.done { color: var(--muted); } .proc ol li.done::before { background: var(--keep); border-color: var(--keep); }
.proc ol li.cur { color: var(--ink); } .proc ol li.cur::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.out-list li { cursor: pointer; padding: 10px 14px; }
.out-list li.on { background: var(--accent-soft); }
.deliver { overflow-y: auto; padding: 18px 22px 40px; }
.deliver .player { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; background: #000; border-radius: 8px; margin-bottom: 16px; }
.deliver .player video { max-height: 46vh; width: auto; max-width: 100%; }
.covers { display: flex; gap: 10px; margin-top: 12px; align-items: flex-start; flex-wrap: wrap; }
.covers img { height: 120px; border-radius: 6px; border: 1px solid var(--line); }

@media (max-width: 1180px) { .stepper .st span { display: none; } }
@media (max-width: 1280px) {
  .ed-body { grid-template-columns: 300px minmax(0, 1fr) 280px; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .app { grid-template-columns: 60px 1fr; }
  .app .brand { padding: 0; }
  .app .brand-name, .app .menu .lbl { display: none; }
  .app .menu a { justify-content: center; padding: 10px 0; }
  .wizard, .g-main, .g2, .g3 { grid-template-columns: 1fr; }
  .ed-body { grid-template-columns: 1fr; overflow-y: auto; }
  .editor { height: auto; }
  .app.editor-mode .main { overflow-y: auto; }
  .pane { max-height: 50vh; }
  .search { display: none; }
  .ed-head { flex-wrap: wrap; }
  .stepper { margin-left: 0; width: 100%; overflow-x: auto; }
  .decide { flex-direction: column; align-items: stretch; }
  .decide > .hint { display: none; }
  .decide .btns { justify-content: flex-end; }
  .stage-wrap video { max-height: 50vh; }
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .main { padding: 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2f { grid-template-columns: 1fr; }
  .ws-name { display: none; }
  .page-head { flex-wrap: wrap; align-items: flex-start; gap: 10px; }
  .page-head > div:first-child { flex: 1 1 100%; min-width: 0; }
  .page-head .right { margin-left: 0; flex-wrap: wrap; }
  .topbar { gap: 8px; padding: 0 10px; }
  .top-actions { gap: 2px; }
  .top-actions .icon-btn { width: 30px; }
  .top-actions .btn { padding: 6px 9px; font-size: 12px; }
  .top-actions #bell, .top-actions #avatarBtn { display: none; }
}

/* 设置 › 后台配置（settings.js） */
.chain-edit .chain .node { gap: 4px; }
.chain-edit .mini { border: 0; background: none; color: var(--dim); cursor: pointer; padding: 0 2px; font-size: 12px; }
.chain-edit .mini:hover { color: var(--ink); }
.chain-edit .add-row { display: flex; gap: 6px; margin-top: 8px; }
.chain-edit .add-row input { flex: 1; min-width: 220px; }
table .mini { border: 0; background: none; color: var(--dim); cursor: pointer; }
tr.dimrow td { opacity: .55; }
.ok-dot { color: var(--keep); }
.err-t { color: var(--cut); word-break: break-all; }
table.keys td { vertical-align: middle; }
.chip.good { color: var(--keep); border-color: rgba(61, 213, 152, .35); }
.chip.dim { color: var(--dim); }

/* 主题切换弹层 */
.theme-wrap { position: relative; }
.theme-pop { position: absolute; right: 0; top: 40px; width: min(300px, calc(100vw - 96px)); max-height: calc(100dvh - 80px); overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--pop-shadow); padding: 8px; z-index: 30; }
.theme-pop .opt { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; color: var(--ink); }
.theme-pop .opt:hover { background: var(--bg-3); }
.theme-pop .opt.on { background: var(--accent-soft); }
.theme-pop .opt .ds { display: block; font-size: 11.5px; color: var(--muted); }
.theme-pop .opt .tick { margin-left: auto; color: var(--accent); visibility: hidden; }
.theme-pop .opt.on .tick { visibility: visible; }
.theme-pop .hours { display: flex; align-items: center; gap: 6px; padding: 8px 10px 4px; border-top: 1px solid var(--line); margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.theme-pop .hours span { white-space: nowrap; }
.theme-pop .hours input { flex: 1; min-width: 0; padding: 4px 6px; }
.theme-pop .now { padding: 4px 10px 6px; font-size: 11.5px; color: var(--dim); }

/* ---------- 声音 ---------- */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.vcard { display: block; color: var(--ink); text-decoration: none; margin: 0; transition: border-color .15s; }
.vcard:hover { border-color: var(--line-2); text-decoration: none; }
.vcard .nm { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; margin-bottom: 4px; }
.vcard.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); min-height: 120px; }
.chip.on { background: var(--keep-soft); color: var(--keep); }
.phrase { font-size: 20px; line-height: 1.6; font-weight: 600; padding: 14px 16px; border-radius: 10px; background: var(--bg-3); border: 1px dashed var(--line-2); margin: 8px 0 4px; }
table.eng td { vertical-align: top; padding-top: 10px; padding-bottom: 10px; }
tr.dim td, label.dim { color: var(--dim); }
.vres li audio { height: 34px; }
textarea { font: inherit; }

/* ---------- 模型 ---------- */
.ok { color: var(--keep); } .bad { color: var(--cut); } .warn { color: var(--warn); } .dim { color: var(--dim); }
.chip.on { background: var(--keep-soft); color: var(--keep); } .chip.warn { background: var(--warn-soft); color: var(--warn); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.pcard { margin: 0; display: flex; flex-direction: column; }
.pcard.off { opacity: .62; }
.pcard .ph { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pcard .nm { font-weight: 650; font-size: 15px; }
.pcard .actions { margin-top: auto; padding-top: 10px; flex-wrap: wrap; }
.pcard.add { align-items: center; justify-content: center; flex-direction: row; gap: 12px; cursor: pointer; color: var(--muted); border-style: dashed; min-height: 150px; text-align: left; font: inherit; }
.pcard.add:hover { border-color: var(--line-2); color: var(--ink); }
.pdl { display: grid; grid-template-columns: 64px 1fr; gap: 5px 10px; margin: 12px 0 0; font-size: 13px; }
.pdl dt { color: var(--muted); } .pdl dd { margin: 0; min-width: 0; }
.chain.edit .node { padding-right: 3px; }
.chain .nb { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 4px; font: inherit; border-radius: 4px; }
.chain .nb:hover:not(:disabled) { background: var(--bg-4); color: var(--ink); }
.chain .nb:disabled { opacity: .3; cursor: default; }
.chain .addt { display: inline-flex; gap: 6px; align-items: center; }
.chain .addt input { width: 240px; padding: 3px 8px; font-size: 12px; }
.tres { margin-top: 6px; font-size: 12.5px; } .tres:empty { display: none; }
.pform .field { margin-bottom: 12px; }
.modal .box.wide { width: min(920px, 94vw); max-width: none; }
.ubars { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 140px; border-bottom: 1px solid var(--line-2); }
.ub { flex: 1; height: 100%; display: flex; align-items: flex-end; outline: none; cursor: default; }
.ub i { display: block; width: 100%; max-width: 28px; margin: 0 auto; background: var(--accent); border-radius: 4px 4px 0 0; }
.ub:hover i, .ub:focus i { background: var(--accent-2); }
.ubx { display: flex; justify-content: space-between; color: var(--dim); font-size: 11.5px; margin-top: 6px; }
section.card { position: relative; }
.utip { position: absolute; top: 44px; background: var(--bg-4); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 8px; font-size: 12px; pointer-events: none; white-space: nowrap; }
@media (max-width: 640px) { .chain .addt input { width: 160px; } .pgrid { grid-template-columns: 1fr; } }
/* AI 服务 › 全局模型 */
.g-table td { vertical-align: top; padding-top: 12px; padding-bottom: 12px; }
.g-table .g-name { width: 220px; }
.g-table .g-field input[type=text], .g-table .g-field select { width: 100%; max-width: 520px; }
.g-table .g-st { width: 170px; text-align: right; }
.g-multi { display: grid; grid-template-columns: 190px 1fr 1fr; gap: 8px; max-width: 720px; }
.g-multi input, .g-multi select { width: 100%; min-width: 0; }
.g-check { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.g-sub { margin: 6px 0 0; font-size: 12px; }
.g-summary strong { font-weight: 600; }
@media (max-width: 760px) {
  .g-table tr { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .g-table td { border: 0; padding: 0; }
  .g-table .g-name, .g-table .g-st { width: auto; text-align: left; }
  .g-multi { grid-template-columns: 1fr; }
}

/* ===================== v0.6 ===================== */
.score { display: inline-block; min-width: 30px; padding: 1px 7px; margin-left: 6px; border-radius: 999px; font-size: 12px; font-weight: 700; text-align: center; vertical-align: middle; }
.score.good { background: var(--keep-soft); color: var(--keep); }
.score.mid { background: var(--warn-soft); color: var(--warn); }
.score.bad { background: var(--cut-soft); color: var(--cut); }
.chip.ok { color: var(--keep); border-color: var(--keep); }
/* 逐词编辑 */
.sents.wordmode li { cursor: default; }
.sents .wd { display: inline-block; padding: 1px 2px; margin: 1px 0; border-radius: 3px; cursor: pointer; }
.sents .wd:hover { background: var(--bg-4); }
.sents .wd.cut { color: var(--dim); text-decoration: line-through; text-decoration-color: var(--cut); background: var(--cut-soft); }
.sents .wd.edited { box-shadow: inset 0 -2px 0 var(--accent); }
.sents .wd.lowc, .tag.lowc { background: var(--warn-soft); }
.sents .wd.lowc.cut { background: var(--cut-soft); }
.wd-edit { font: inherit; padding: 0 3px; border: 1px solid var(--accent); border-radius: 3px; background: var(--bg-3); color: var(--ink); }
.sents .spk { display: inline-block; font-size: 11px; color: var(--accent); border: 1px solid var(--accent-soft); border-radius: 4px; padding: 0 4px; margin-right: 6px; }
.btn.revo { margin-left: 6px; padding: 1px 8px; font-size: 11.5px; }
.btn.revo.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.pane-tools { display: flex; align-items: center; gap: 8px; }
.pane-tools .undo { margin-left: auto; display: flex; gap: 4px; }
.pane-foot { padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; flex: none; }
.icon-btn.sm { width: 26px; height: 26px; font-size: 14px; }
/* 冷开场候选 */
.hooks { margin: 8px 12px 0; padding: 8px 10px; border: 1px dashed var(--line-2); border-radius: 8px; }
.hooks .h { font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.hook { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 0; font-size: 13px; border-top: 1px solid var(--line); }
.hook:first-of-type { border-top: 0; }
.hook .t { color: var(--dim); font-family: ui-monospace, monospace; font-size: 12px; }
.hook .tx { flex: 1 1 60%; }
.hook.on { background: var(--accent-soft); border-radius: 6px; padding: 5px 6px; }
.tl-img { display: block; width: 100%; margin-top: 8px; border-radius: 6px; border: 1px solid var(--line); background: #101114; min-height: 40px; }
/* 草稿审核：元素清单 */
.elems li { display: flex; align-items: center; gap: 8px; padding: 6px 12px; }
.elems li.removed .grow { text-decoration: line-through; color: var(--dim); }
.elems li.removed { background: var(--cut-soft); }
.issue.sev-high { border-left: 3px solid var(--cut); }
.issue.sev-medium { border-left: 3px solid var(--warn); }
.copy { padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
/* 预检 */
.preflight { margin-top: 10px; font-size: 12.5px; }
.preflight .warnbox { margin-bottom: 6px; }
.preflight ul { margin: 6px 0 0 16px; padding: 0; }
/* 登录 */
.app.login-mode .nav, .app.login-mode .topbar { display: none; }
.login { display: grid; place-items: center; min-height: 100vh; }
.login .card { width: min(420px, 92vw); padding: 28px; }
.login h1 { font-size: 20px; margin: 0 0 18px; }
.login label { display: block; margin-bottom: 12px; }
.login input { width: 100%; }
.dot-new { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.idcard.on { outline: 2px solid var(--accent); }
.thumb .m .score { margin-left: auto; }


/* ================= 表单控件统一（无 type 的 input、下拉箭头、滑块） ================= */
input:not([type]) { width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-3); color: var(--ink); font: inherit; outline: none; }
select { -webkit-appearance: none; appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%238a919e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
textarea:hover, input[type=text]:hover, input:not([type]):hover, input[type=number]:hover, select:hover { border-color: var(--dim); }
textarea:focus, input:focus, select:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 99px; background: var(--bg-4); outline: none; margin: 10px 0 6px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--accent-2); box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer; }
input[type=range]:focus { box-shadow: none; }
input[type=range]:focus::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-soft); }

/* ================= 品牌包 ================= */
.bk-gallery { margin-bottom: 18px; }
.bk-gh { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bk-gh h2 { margin: 0; font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.bk-gh .muted { font-size: 12.5px; }
.bk-kits { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 12px; }
.bk-kit { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.bk-kit:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--pop-shadow); }
.bk-kit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bk-kit.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bk-kit .meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.bk-kit .nm { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-kit .row { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; }
.bk-kit .sws { display: inline-flex; gap: 4px; }
.bk-kit .sws .sw { width: 12px; height: 12px; border-radius: 50%; }
.bk-kit .sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-kit.new { align-items: center; justify-content: center; gap: 6px; min-height: 170px; border: 1.5px dashed var(--line-2); background: transparent; color: var(--muted); text-align: center; }
.bk-kit.new:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); box-shadow: none; }
.bk-kit.new.on { border-style: solid; color: var(--accent); background: var(--accent-soft); }
.bk-kit.new b { color: inherit; font-weight: 600; }
.bk-kit.new .dim { font-size: 12px; }
.plus-ring { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); color: inherit; margin-bottom: 2px; }
.plus-ring svg { width: 18px; height: 18px; }

.bk-editor { padding: 0; overflow: visible; }
.bk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.bk-head h2 { margin: 0 0 4px; font-size: 15.5px; }
.bk-head .sub { color: var(--muted); font-size: 12.5px; }
.bk-dirty { color: var(--warn); font-size: 12px; background: var(--warn-soft); padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.bk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.bk-fields { padding: 6px 22px 8px; min-width: 0; }
.bk-sec { border: 0; margin: 0; padding: 16px 0 18px; border-bottom: 1px dashed var(--line); min-width: 0; }
.bk-sec:last-child { border-bottom: 0; }
.bk-sec legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; font-weight: 650; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.bk-sec legend + * { clear: both; }
.bk-sec legend .n { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11.5px; background: var(--accent-soft); color: var(--accent); }
.bk-editor .lb { display: flex; align-items: baseline; gap: 6px; }
.bk-editor .lb em { font-style: normal; color: var(--dim); font-size: 11.5px; }
.bk-editor .lb .cnt, .bk-editor .lb output { margin-left: auto; color: var(--dim); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.bk-editor .lb output { color: var(--ink); font-weight: 600; }
.bk-editor .req { color: var(--cut); font-weight: 400; }

.bk-pals { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.bk-pals .lb { margin: 0 6px 0 0; }
.bk-pal { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; transition: all .15s; }
.bk-pal:hover { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }
.bk-pal .dots { display: inline-flex; }
.bk-pal .dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--bg-2); margin-left: -4px; box-shadow: 0 0 0 .5px rgba(0,0,0,.15); }
.bk-pal .dots i:first-child { margin-left: 0; }
.bk-colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.bk-color .cf { display: flex; align-items: center; gap: 0; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-3); padding: 4px; transition: border-color .15s, box-shadow .15s; }
.bk-color .cf:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bk-color input[type=color] { -webkit-appearance: none; appearance: none; width: 34px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; flex: none; }
.bk-color input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.bk-color input[type=color]::-webkit-color-swatch { border: 1px solid rgba(0,0,0,.15); border-radius: 6px; }
.bk-color input.hex { border: 0; background: none; padding: 4px 10px; text-transform: uppercase; letter-spacing: .04em; box-shadow: none; }
.bk-color input.hex.bad { color: var(--cut); }
.bk-contrast { margin-top: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--muted); }
.bk-contrast b { color: var(--ink); font-variant-numeric: tabular-nums; }
.bk-contrast .pair i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font-style: normal; font-weight: 700; font-size: 13px; border: 1px solid var(--line-2); }
.chip.bad { background: var(--cut-soft); color: var(--cut); }

.bk-logo-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 16px; align-items: stretch; }
.bk-drop { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1.5px dashed var(--line-2); border-radius: 10px; cursor: pointer; transition: all .15s; background: var(--bg-2); }
.bk-drop:hover, .bk-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.bk-drop input { display: none; }
.bk-drop .pv { flex: none; width: 64px; height: 64px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); overflow: hidden;
  background: repeating-conic-gradient(var(--bg-4) 0 25%, var(--bg-3) 0 50%) 0 0 / 12px 12px; }
.bk-drop .pv img { max-width: 86%; max-height: 86%; object-fit: contain; }
.bk-drop .pv svg { width: 22px; height: 22px; }
.bk-drop .tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bk-drop .tx b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-drop .tx .dim { font-size: 12px; }
.bk-pos { position: relative; aspect-ratio: 16/10; border-radius: 8px; border: 1px solid var(--line-2); background: linear-gradient(160deg, var(--bg-3), var(--bg-4)); }
.bk-pos label { position: absolute; width: 50%; height: 50%; display: flex; padding: 7px; cursor: pointer; }
.bk-pos label.top-left { top: 0; left: 0; } .bk-pos label.top-right { top: 0; right: 0; justify-content: flex-end; }
.bk-pos label.bottom-left { bottom: 0; left: 0; align-items: flex-end; } .bk-pos label.bottom-right { bottom: 0; right: 0; justify-content: flex-end; align-items: flex-end; }
.bk-pos input { display: none; }
.bk-pos i { width: 22px; height: 14px; border-radius: 3px; border: 1.5px dashed var(--dim); transition: all .15s; }
.bk-pos label:hover i { border-color: var(--accent); }
.bk-pos input:checked + i { background: var(--accent-2); border: 1.5px solid var(--accent-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.bk-pos span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bk-ranges { margin-top: 14px; }

.bk-preview { border-left: 1px solid var(--line); background: var(--bg-1); border-radius: 0 var(--radius) 0 0; }
.bk-pv-in { position: sticky; top: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.bk-pv-tools { display: flex; justify-content: space-between; gap: 8px; }
.bk-pv-tools .seg span { cursor: pointer; user-select: none; font-size: 12.5px; transition: color .15s; }
.bk-pv-tools .seg span:hover { color: var(--ink); }
.bk-pv-stage { display: grid; place-items: center; min-height: 200px; padding: 6px 0; }
.bk-pv-note { font-size: 11.5px; text-align: center; margin: 0; }
.bk-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--bg-1); border-radius: 0 0 var(--radius) var(--radius); }
.bk-foot .sp { flex: 1; }

/* 示意画面 */
.bk-stage { position: relative; overflow: hidden; border-radius: 10px; container-type: inline-size; background: #11141a; box-shadow: 0 6px 24px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.04) inset; }
.bk-stage.r-h { width: 100%; aspect-ratio: 16/9; }
.bk-stage.r-v { width: 56%; aspect-ratio: 9/16; }
.bk-stage.mini { width: 100%; aspect-ratio: 16/9; border-radius: 0; box-shadow: none; }
.bk-bg { position: absolute; inset: 0; background: radial-gradient(120% 90% at 30% 10%, #4a5160 0%, #222731 50%, #0c0e12 100%); }
.bk-bg::before { content: ""; position: absolute; width: 30%; aspect-ratio: 1; border-radius: 50% 50% 46% 46%; left: 35%; top: 16%;
  background: radial-gradient(circle at 50% 38%, #9a8676, #4d4239 72%); opacity: .6; }
.bk-bg::after { content: ""; position: absolute; width: 58%; height: 42%; border-radius: 50% 50% 0 0; left: 21%; bottom: -8%; background: #2f3846; opacity: .9; }
.r-v .bk-bg::before { width: 46%; left: 27%; top: 24%; } .r-v .bk-bg::after { width: 90%; left: 5%; height: 34%; }
.bk-logo { position: absolute; z-index: 3; margin: 3.2%; display: grid; place-items: center; transition: all .2s; }
.bk-logo.top-left { top: 0; left: 0; } .bk-logo.top-right { top: 0; right: 0; } .bk-logo.bottom-left { bottom: 0; left: 0; } .bk-logo.bottom-right { bottom: 0; right: 0; }
.r-v .bk-logo { margin: 5%; }
.bk-logo img { width: 100%; height: auto; display: block; filter: drop-shadow(0 1px 3px rgba(0,0,0,.35)); }
.bk-logo .ph { width: 100%; aspect-ratio: 1; border-radius: 22%; display: grid; place-items: center; font-weight: 800; font-size: 3.4cqw; letter-spacing: -.02em; line-height: 1; overflow: hidden; }
.r-v .bk-logo .ph { font-size: 6cqw; }
.bk-cap { position: absolute; z-index: 2; left: 6%; right: 6%; bottom: 13%; text-align: center; }
.r-v .bk-cap { bottom: 24%; }
.bk-cap span { display: inline-block; padding: .2em .6em; border-radius: .25em; font-size: 5.2cqw; line-height: 1.35; transition: all .2s; }
.r-v .bk-cap span { font-size: 8.4cqw; }
.bk-cap b { font-weight: inherit; }
.bk-prog { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 1.6%; min-height: 3px; background: rgba(255,255,255,.18); }
.bk-prog i { display: block; height: 100%; width: 42%; }
.bk-intro, .bk-outro { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: 0 9%; gap: 1.6cqw; }
.bk-intro .bar { display: block; width: 9%; height: 1.4cqw; min-height: 3px; border-radius: 99px; }
.bk-intro .tt { font-size: 8.2cqw; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; word-break: break-word; }
.bk-intro .tg { font-size: 3.6cqw; opacity: .85; }
.r-v .bk-intro .tt { font-size: 12cqw; } .r-v .bk-intro .tg { font-size: 6cqw; } .r-v .bk-intro .bar { height: 2.4cqw; width: 16%; }
.bk-outro { align-items: center; text-align: center; }
.bk-outro .o1 { font-size: 6cqw; font-weight: 800; line-height: 1.25; }
.bk-outro .o2 { font-size: 3.2cqw; opacity: .7; }
.bk-outro .cta { margin-top: 1.4cqw; padding: .5em 1.6em; border-radius: 99px; font-weight: 700; font-size: 3.2cqw; }
.bk-outro .line { position: absolute; left: 0; right: 0; bottom: 0; height: 1.6%; min-height: 3px; }
.r-v .bk-outro .o1 { font-size: 9.5cqw; } .r-v .bk-outro .o2 { font-size: 5.4cqw; } .r-v .bk-outro .cta { font-size: 5.6cqw; }

/* ================= 风格模板 ================= */
.st-section h2 .more { font-size: 12.5px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mk-style-tools { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.mk-style-tools .chips { margin: 0; flex: 1; }
.mk-style-tools input { max-width: 280px; }
.mk-structure { font-size: 12px; line-height: 1.7; font-weight: 600; color: var(--text); }
.mk-materials { margin: 0; }
.st-params summary { font-size: 12px; cursor: pointer; color: var(--muted); }
.st-params[open] .st-meters { margin: 10px 0; }
.st-params .st-tags { margin-top: 10px; }
.mk-enable { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.mk-enable input { width: auto; }
.mk-review { padding: 12px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.mk-review h3 { font-size: 14px; margin: 0 0 8px; }
.draft-aspects { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.draft-confirm { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12px; }
.draft-confirm input { width: auto; }
.mk-review p, .mk-review ul { margin: 6px 0; font-size: 12px; line-height: 1.6; }
.st-card[hidden], #mkFields[hidden], #styleEmpty[hidden] { display: none; }
@media (max-width: 760px) { .mk-style-tools input { max-width: none; width: 100%; } }
.st-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.st-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--sc); }
.st-card:hover { border-color: color-mix(in srgb, var(--sc) 55%, var(--line)); box-shadow: var(--pop-shadow); transform: translateY(-1px); }
.st-top { display: flex; gap: 12px; align-items: flex-start; }
.st-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--sc); background: color-mix(in srgb, var(--sc) 14%, transparent); }
.st-ico svg { width: 19px; height: 19px; }
.st-hd { min-width: 0; }
.st-card .nm { font-weight: 650; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-card .nm .chip { margin: 0; }
.st-card .ds { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.5; }
.st-meters { display: flex; flex-direction: column; gap: 7px; padding: 10px 12px; border-radius: 8px; background: var(--bg-3); }
.st-m { display: grid; grid-template-columns: 32px minmax(0, 1fr) 92px; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.st-m b { font-weight: 500; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; font-size: 11.5px; }
.st-m .bar { height: 5px; border-radius: 99px; background: var(--bg-4); overflow: hidden; }
.st-m .bar i { display: block; height: 100%; border-radius: inherit; background: var(--sc); }
.st-m .dots { display: flex; gap: 4px; }
.st-m .dots i { flex: 1; height: 5px; border-radius: 99px; background: var(--bg-4); }
.st-m .dots i.on { background: var(--sc); }
.st-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.st-tags .chip { margin: 0; }
.st-foot { margin-top: auto; }
.st-foot .btn { width: 100%; justify-content: center; }
.st-card:hover .st-foot .btn { border-color: var(--sc); color: var(--sc); }

@media (max-width: 1100px) {
  .bk-layout { grid-template-columns: 1fr; }
  .bk-preview { border-left: 0; border-top: 1px solid var(--line); border-radius: 0; order: -1; }
  .bk-pv-in { position: static; max-width: 520px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .bk-colors, .bk-logo-row { grid-template-columns: 1fr; }
  .bk-fields, .bk-head, .bk-foot { padding-left: 16px; padding-right: 16px; }
}

/* ===================== 声音 · 路由与降级 ===================== */
.lnk { border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; font-size: 12.5px; padding: 0; }
.lnk:hover { color: var(--link-hover); text-decoration: underline; }
.rtop { margin-bottom: 16px; }
.rstat { margin: 0; display: flex; flex-direction: column; gap: 8px; min-height: 148px; }
.rstat .rh { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rstat .rh .lb { margin: 0; }
.rstat .big { font-size: 26px; font-weight: 700; letter-spacing: -.3px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rstat .big.sm { font-size: 17px; letter-spacing: 0; }
.rstat .sub { margin: auto 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.pseg { display: flex; gap: 4px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.pseg button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: none; border-radius: 7px; padding: 6px 8px; cursor: pointer; color: var(--muted); font: inherit; transition: background .15s, color .15s; }
.pseg button b { font-weight: 600; font-size: 13.5px; }
.pseg button small { font-size: 11px; font-variant-numeric: tabular-nums; }
.pseg button:hover { color: var(--ink); background: var(--bg-4); }
.pseg button.on { background: var(--bg-2); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 1px var(--line-2); }
.rbform { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rbform .pre { font-size: 20px; font-weight: 700; color: var(--muted); }
.rbform input { width: 96px; font-size: 16px; font-weight: 600; padding: 5px 8px; }

.rlanes h2 { flex-wrap: wrap; }
.lane { border-top: 1px solid var(--line); padding: 16px 0 18px; }
.lane:first-of-type { border-top: 0; padding-top: 4px; }
.lane-h { display: grid; grid-template-columns: minmax(180px, 230px) 1fr auto; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.lane-t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.lane-t b { font-size: 15px; }
.lane-t .chip { margin: 0; }
.lane-d { width: 100%; font-size: 12px; }
.lane-s { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.lane-s .rest { font-size: 12px; font-variant-numeric: tabular-nums; }
.lane-a { display: flex; gap: 6px; }
.rpill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px; font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.rpill .mono { font-size: 12px; }
.rpill.ok { background: var(--keep-soft); color: var(--keep); }
.rpill.warn { background: var(--warn-soft); color: var(--warn); }
.rpill.bad { background: var(--cut-soft); color: var(--cut); }

.vchain { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px 4px; }
.vnode { position: relative; display: flex; flex-direction: column; gap: 6px; width: 218px; padding: 10px 12px 8px; background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 10px; cursor: grab; transition: border-color .15s, box-shadow .15s, transform .15s, opacity .15s; }
.vnode:hover { border-color: var(--dim); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.vnode.first { border-color: var(--keep); box-shadow: 0 0 0 3px var(--keep-soft); }
.vnode.off { background: var(--bg-3); border-style: dashed; }
.vnode.off .vn-model, .vnode.off .vn-prov { color: var(--dim); }
.vnode.dragging { opacity: .4; }
.vnode.over { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); transform: translateY(-1px); }
.vn-top { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.vn-idx { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--bg-4); color: var(--muted); font-size: 11px; font-weight: 700; flex: none; }
.vnode.first .vn-idx { background: var(--keep); color: #fff; }
.vn-prov { color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vn-tag { margin-left: auto; font-size: 11px; font-weight: 600; padding: 0 7px; line-height: 18px; border-radius: 999px; background: var(--keep-soft); color: var(--keep); }
.vn-tag.soft { background: var(--bg-4); color: var(--muted); }
.vn-model { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.35; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vn-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vn-meta > span:first-child { margin-right: 2px; }
.cap { display: inline-block; font-size: 10.5px; line-height: 16px; padding: 0 5px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.vn-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 6px; margin-top: auto; }
.vn-st { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; }
.vn-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.vn-act { display: flex; gap: 1px; opacity: .55; transition: opacity .15s; }
.vnode:hover .vn-act, .vnode:focus-within .vn-act { opacity: 1; }
.vn-act .nb { display: inline-grid; place-items: center; min-width: 24px; height: 22px; border: 0; background: none; color: var(--muted); border-radius: 5px; cursor: pointer; font: inherit; font-size: 14px; padding: 0 4px; }
.vn-act .nb .ic { width: 13px; height: 13px; }
.vn-act .nb:hover:not(:disabled) { background: var(--bg-4); color: var(--ink); }
.vn-act .nb.rm:hover { background: var(--cut-soft); color: var(--cut); }
.vn-act .nb:disabled { opacity: .3; cursor: default; }
.vn-arr { display: grid; place-items: center; width: 18px; color: var(--dim); }
.vn-arr svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.vnode.add { flex-direction: row; align-items: center; justify-content: center; gap: 6px; width: 132px; margin-left: 8px; border: 1px dashed var(--line-2); background: transparent;
  color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; }
.vnode.add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); box-shadow: none; }
.vnode.add .ic { width: 15px; height: 15px; }
.vempty { display: grid; place-items: center; padding: 0 16px; min-height: 92px; border: 1px dashed var(--cut); border-radius: 10px; color: var(--cut); font-size: 12.5px; background: var(--cut-soft); }

.vtests { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-3); padding: 4px 12px 8px; }
.vt { display: grid; grid-template-columns: minmax(180px, 280px) minmax(140px, auto) minmax(180px, 1fr); align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.vt .mono { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt audio { width: 100%; height: 32px; }
.vt:last-of-type { border-bottom: 0; }
.vt.fail .mono { color: var(--cut); }
.vt.fail .bad { grid-column: 2 / -1; word-break: break-word; }
.vtests .lnk { margin-top: 6px; font-size: 12px; }

.vprovs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.vprov { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-3); font-size: 12.5px; min-width: 0; }
.vprov.on { background: var(--bg-2); }
.vp-h { display: flex; align-items: center; gap: 7px; min-width: 0; }
.vp-h i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.vprov.on .vp-h i { background: var(--keep); box-shadow: 0 0 0 3px var(--keep-soft); }
.vp-h b { font-size: 14px; }
.vp-h .mono { font-size: 11.5px; margin-left: auto; }
.vp-s code { font-size: 11px; word-break: break-all; }
.vp-r { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.vp-r .chip { margin: 0; }
.vp-r .dim { margin-left: auto; font-size: 11.5px; }
.vp-go { font-size: 12px; margin-top: 2px; }

.savebar { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; margin-top: 8px;
  background: var(--bg-2); border: 1px solid var(--accent); border-radius: 12px; box-shadow: var(--pop-shadow);
  transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform .2s, opacity .2s; }
.savebar.show { transform: none; opacity: 1; pointer-events: auto; }
.savebar .ic { width: 15px; height: 15px; vertical-align: -2px; color: var(--accent); }
.savebar .grow { flex: 1; }

.pk-bar { display: flex; align-items: center; gap: 12px; }
.pk-bar input[type=search] { flex: 1; }
.pk-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.pk-row { display: grid; grid-template-columns: 10px 96px minmax(0, 1fr) auto 104px 58px; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0;
  border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.pk-row:last-child { border-bottom: 0; }
.pk-row:hover:not(:disabled) { background: var(--accent-soft); }
.pk-row:disabled { cursor: default; opacity: .5; }
.pk-row.off .pk-m, .pk-row.off .pk-p { color: var(--dim); }
.pk-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.pk-row .dot.on { background: var(--keep); }
.pk-p { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pk-c { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; }
.pk-\$ { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-s { text-align: right; color: var(--accent); font-weight: 600; }
.pk-row.off .pk-s, .pk-row:disabled .pk-s { color: var(--dim); font-weight: 400; }
#oForm .field { display: block; margin-bottom: 14px; }
.pk-custom { display: flex; gap: 8px; margin-top: 12px; }
.pk-custom input { flex: 1; }

@media (max-width: 1100px) {
  .lane-h { grid-template-columns: 1fr auto; }
  .lane-s { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 640px) {
  .vnode { width: 100%; }
  .vn-arr { width: 100%; transform: rotate(90deg); height: 14px; }
  .vnode.add { width: 100%; margin: 4px 0 0; min-height: 44px; }
  .vt { grid-template-columns: 1fr; gap: 4px; }
  .pk-row { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .pk-row .pk-p, .pk-row .pk-c { display: none; }
}

/* ---------- 智能出片 ---------- */
.sd-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.sd-theme { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 6px; align-items: center; text-align: left; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-3); color: var(--ink); cursor: pointer; }
.sd-theme.on { border-color: var(--accent); background: var(--accent-soft); }
.sd-theme .sw { width: 14px; height: 14px; border-radius: 4px; }
.sd-theme small { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
/* 表单页右侧「最近生成」 */
.sd-mini { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 12.5px; }
.sd-mini:last-child { border-bottom: 0; }
.sd-mini:hover { color: var(--ink); } .sd-mini:hover .t { color: var(--accent); }
.sd-mini .nm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sd-mini .t, .sd-mini .m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-mini .t { font-weight: 600; } .sd-mini .m { color: var(--muted); font-size: 11.5px; }
.sd-mini .sd-th { width: 34px; height: 34px; border-radius: 7px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .4s; }
.progress.big { height: 8px; border-radius: 5px; }
/* 缩略图 / 类型图标 */
.sd-th { width: 52px; height: 52px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--bg-3) center/cover no-repeat; color: var(--muted); border: 1px solid var(--line); }
.sd-th.news_brief { background-color: rgba(192, 108, 255, .12); color: #b07cf5; border-color: transparent; }
.sd-th.software_demo { background-color: rgba(52, 168, 235, .12); color: #3aa3e0; border-color: transparent; }
.sd-th.failed { background-color: var(--cut-soft); color: var(--cut); }
.sd-th.cancelled { background-color: var(--bg-3); color: var(--dim); }  /* 取消是你的操作，不是报错：用中性灰 */
/* 生成记录：左列表 + 右详情 */
.sd-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
.sd-side { position: sticky; top: 0; display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.sd-filter { margin-bottom: 10px; }
.sd-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; padding-right: 2px; }
.sd-item { display: flex; gap: 11px; align-items: center; text-align: left; width: 100%; padding: 9px 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink); }
.sd-item:hover { background: var(--bg-2); border-color: var(--line); }
.sd-item.on { background: var(--bg-2); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sd-item-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sd-item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-item .m { display: flex; gap: 8px; align-items: center; color: var(--dim); font-size: 11.5px; flex-wrap: wrap; }
.sd-item .st { font-weight: 600; } .st.running { color: var(--accent); } .st.done { color: var(--keep); } .st.failed { color: var(--cut); } .st.cancelled { color: var(--muted); }
.sd-item .progress { height: 4px; }
.sd-detail { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; min-height: 420px; }
:root[data-theme="light"] .sd-detail { box-shadow: 0 1px 3px rgba(20, 24, 32, .05); }
.sd-dh { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.sd-dt { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 240px; }
.sd-dt h2 { margin: 0; font-size: 18px; font-weight: 650; }
.sd-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
/* 步骤条 */
.sd-steps { list-style: none; display: flex; margin: 0 0 18px; padding: 0; gap: 0; counter-reset: s; }
.sd-steps li { flex: 1; display: flex; align-items: center; gap: 8px; position: relative; color: var(--dim); font-size: 12.5px; min-width: 0; }
.sd-steps li:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--line-2); margin: 0 10px; border-radius: 2px; min-width: 12px; }
.sd-steps li.ok:not(:last-child)::after { background: var(--keep); }
.sd-steps .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 11.5px; font-weight: 700; background: var(--bg-3); border: 1.5px solid var(--line-2); color: var(--dim); }
.sd-steps li.ok .dot { background: var(--keep); border-color: var(--keep); color: #fff; }
.sd-steps li.now .dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 1.6s ease-in-out infinite; }
.sd-steps li.bad .dot { background: var(--cut); border-color: var(--cut); color: #fff; }
.sd-steps li.ok, .sd-steps li.now { color: var(--ink); } .sd-steps li.now .lb { font-weight: 650; }
.sd-steps .lb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-steps .lb small { margin-left: 5px; color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
/* 进行中 */
.sd-live { background: var(--accent-soft); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.sd-live-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sd-live-h b { flex: 1; font-weight: 600; }
.sd-live-h .pct { font-size: 20px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.sd-live .hint { margin: 10px 0 0; font-size: 12px; }
/* 结果 */
.sd-result { display: grid; gap: 20px; margin-bottom: 16px; align-items: start; }
.sd-result.v { grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); }
.sd-result.h { grid-template-columns: 1fr; }
.sd-player { display: flex; flex-direction: column; gap: 10px; }
.sd-player video { width: 100%; background: #000; border-radius: 12px; display: block; }
.sd-result.v .sd-player video { aspect-ratio: 9 / 16; max-height: max(440px, calc(100vh - 330px)); object-fit: contain; }
.sd-result.h .sd-player video { aspect-ratio: 16 / 9; max-height: 560px; }
.sd-files-h { font-weight: 650; margin-bottom: 8px; }
.sd-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--bg-3); border: 1px solid var(--line); color: var(--ink); margin-bottom: 6px; font-size: 12.5px; }
.sd-file:hover { border-color: var(--accent); color: var(--ink); }
.sd-file span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-file small { color: var(--dim); }
.sd-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.sd-imgs img { height: 132px; max-width: 220px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.sd-files .hint { margin-top: 10px; font-size: 12px; }
.sd-fail { background: var(--cut-soft); border: 1px solid rgba(255, 92, 111, .25); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.sd-fail b { color: var(--cut); }
.sd-fail .err-msg { color: var(--err-ink); margin-top: 4px; word-break: break-word; font-size: 12.5px; max-height: 120px; overflow: auto; }
.sd-tip { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(255, 92, 111, .25); color: var(--ink); font-size: 12.5px; }
.sd-tip svg { color: var(--warn); margin-top: 1px; }
.sd-warn { background: var(--warn-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; color: var(--warn-ink); font-size: 12.5px; }
.sd-warn summary { cursor: pointer; display: flex; gap: 6px; align-items: center; font-weight: 600; }
.sd-warn ul { margin: 8px 0 0; padding-left: 20px; } .sd-warn li { margin: 3px 0; }
.sd-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 14px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sd-meta div { display: flex; flex-direction: column; } .sd-meta dt { color: var(--dim); font-size: 11.5px; } .sd-meta dd { margin: 0; font-variant-numeric: tabular-nums; }
.sd-logbox { margin-bottom: 8px; }
.sd-logbox summary { cursor: pointer; color: var(--muted); padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 6px; }
.sd-logbox summary::before { content: "▸"; font-size: 11px; } .sd-logbox[open] summary::before { content: "▾"; }
.sd-logbox summary:hover { color: var(--ink); }
.sd-log { background: var(--bg-3); border-radius: 8px; padding: 10px 12px; font: 11.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-all; margin: 4px 0 0; color: var(--muted); }
.sd-log.params { max-height: 180px; }
.sd-log .s { color: var(--ink); font-weight: 600; } .sd-log .w { color: var(--warn); } .sd-log .e { color: var(--cut); } .sd-log .r { color: var(--dim); }
.tab-live { background: var(--accent); color: #fff; font-size: 11px; border-radius: 999px; padding: 0 7px; line-height: 17px; font-weight: 600; }
@media (max-width: 1100px) { .sd-layout { grid-template-columns: 1fr; } .sd-side { position: static; max-height: 300px; } .sd-result.v { grid-template-columns: 1fr; } .sd-result.v .sd-player video { max-height: 520px; } }
@media (max-width: 720px) { .sd-steps .lb { display: none; } .sd-steps li.now .lb { display: inline; } }

/* ---------- 任务中心（统一列表） ---------- */
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
a.kpi { color: var(--ink); display: block; transition: border-color .15s; } a.kpi[href]:hover { border-color: var(--line-2); color: var(--ink); }
.kpi.run .v { color: var(--accent); } .kpi.bad .v { color: var(--cut); }
.card.flush { padding: 6px 8px; }
.tk-filters { display: flex; flex-wrap: wrap; gap: 4px 18px; } .tk-filters .chips { margin-bottom: 12px; }
.tk-list { display: flex; flex-direction: column; }
.tk-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 150px auto; gap: 14px; align-items: center; padding: 12px 10px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
.tk-row:last-child { border-bottom: 0; }
.tk-row:hover { background: var(--bg-3); }
.tk-thumb { position: relative; width: 100%; height: 100%; border-radius: 9px; display: grid; place-items: center; overflow: hidden; background: var(--bg-3); color: var(--muted); }
.tk-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--bg-3); }
.tk-thumb.job { background-color: rgba(61, 213, 152, .12); color: var(--keep); }
.tk-thumb.news_brief { background-color: rgba(192, 108, 255, .12); color: #b07cf5; }
.tk-thumb.software_demo { background-color: rgba(52, 168, 235, .12); color: #3aa3e0; }
.tk-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tk-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tk-title b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-title b a { color: inherit; }
.tk-title b a:hover, .tk-title b a:focus-visible { color: var(--accent); text-decoration: underline; }
.tk-sub { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; }
.tk-sub > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-err { color: var(--cut); }
.tk-prog { display: flex; align-items: center; gap: 8px; max-width: 420px; } .tk-prog .progress { flex: 1; } .tk-prog span { font-size: 11.5px; color: var(--accent); font-variant-numeric: tabular-nums; width: 34px; }
.tk-time { font-size: 12px; text-align: right; color: var(--muted); white-space: nowrap; line-height: 1.6; }
.tk-act { display: flex; gap: 6px; justify-content: flex-end; align-items: center; min-width: 96px; }
.tk-kind { display: inline-flex; align-items: center; flex: none; font-size: 11px; font-weight: 600; padding: 0 7px; line-height: 19px; border-radius: 5px; margin-right: 6px; background: var(--bg-4); color: var(--muted); }
.tk-kind.job { background: var(--keep-soft); color: var(--keep); }
.tk-kind.news_brief { background: rgba(192, 108, 255, .14); color: #b07cf5; }
.tk-kind.software_demo { background: rgba(52, 168, 235, .14); color: #3aa3e0; }
:root[data-theme="light"] .tk-kind.news_brief, :root[data-theme="light"] .tk-thumb.news_brief, :root[data-theme="light"] .sd-th.news_brief { color: #8a3fd9; }
:root[data-theme="light"] .tk-kind.software_demo, :root[data-theme="light"] .tk-thumb.software_demo, :root[data-theme="light"] .sd-th.software_demo { color: #1679b8; }
.warn-chip { background: var(--warn-soft); color: var(--warn-ink); }
.badge.cancelled { background: var(--bg-4); color: var(--muted); }
.list .t .tk-kind { vertical-align: 1px; }
@media (max-width: 900px) { .tk-row { grid-template-columns: 56px minmax(0, 1fr); } .tk-time { display: none; } .tk-act { grid-column: 2; justify-content: flex-start; } .kpis.k4 { grid-template-columns: repeat(2, 1fr); } }

/* 菜单角标、可点提示、缩略图来源角标 */
.menu .count.bad { background: var(--cut); color: #fff; }
.menu .count.run { background: var(--accent-2); color: #fff; }
.live-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-soft); animation: live 1.4s ease-out infinite; }
.app.collapsed .live-dot, .app.editor-mode .live-dot { position: absolute; top: 7px; right: 12px; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(123, 140, 255, .55); } 100% { box-shadow: 0 0 0 8px rgba(123, 140, 255, 0); } }
.toast.link { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.thumb .pic .src { position: absolute; left: 6px; top: 6px; background: rgba(120, 60, 220, .88); color: #fff; font-size: 11px; border-radius: 4px; padding: 0 6px; }
.thumb .pic .src.software_demo { background: rgba(22, 121, 184, .9); }
.pb-src { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 0 5px; border-radius: 4px; margin-right: 5px; background: rgba(192, 108, 255, .16); color: #b07cf5; vertical-align: 1px; }

/* ---------- 作业模板（封面卡片） ---------- */
.tpl-bar { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.tpl-bar .hint { flex: 1; }
.tpl-bar .btn { flex-shrink: 0; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.tpl-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s; }
.tpl-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(20, 30, 70, .14); }
.tpl-card[hidden] { display: none; }
.tpl-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 22px 0 8px; }
.tpl-pager[hidden] { display: none; }
.tpl-pager .btn[data-tplpage] { min-width: 34px; }
.tpl-pager .dim { margin-left: 8px; font-size: 12px; }
.tpl-cover { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #0b1424; color: #fff; text-align: left; cursor: pointer; aspect-ratio: 16 / 9; overflow: hidden; container-type: inline-size; }
.tpl-cover:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.tpl-art { position: absolute; inset: 0; display: block; overflow: hidden; }
.tpl-art-image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .4s ease; }
.tpl-card:hover .tpl-art-image { transform: scale(1.035); }
.tpl-art-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,12,25,.8) 0%, rgba(5,12,25,.55) 34%, rgba(5,12,25,.06) 72%), linear-gradient(0deg, rgba(5,12,25,.25), transparent 55%); }
.tpl-art-category { position: absolute; top: 10%; left: 6.2%; color: rgba(255,255,255,.86); font-size: clamp(10px, 2.8cqw, 14px); font-weight: 550; letter-spacing: .1em; line-height: 1.4; }
.tpl-art-category::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 7px 2px 0; border-radius: 50%; background: #a4b8ff; }
.tpl-art-copy { position: absolute; left: 6.2%; bottom: 20%; width: 60%; display: flex; flex-direction: column; gap: 9px; }
.tpl-art-copy strong { color: #fff; font-size: clamp(19px, 6.3cqw, 44px); font-weight: 750; line-height: 1.25; letter-spacing: -.025em; overflow-wrap: anywhere; text-shadow: 0 2px 20px rgba(0,0,0,.18); }
.tpl-art-copy > span { color: rgba(255,255,255,.75); font-size: clamp(10px, 3cqw, 18px); font-weight: 400; line-height: 1.5; letter-spacing: .04em; }
.tpl-art-mark { position: absolute; bottom: 10%; left: 6.2%; display: flex; gap: 3px; align-items: center; height: 7px; }
.tpl-art-mark i { width: 3px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.55); }
.tpl-art-mark i:nth-child(2) { height: 7px; }
.tpl-art-mark i:nth-child(3) { height: 5px; }
@media (prefers-reduced-motion: reduce) { .tpl-art-image { transition: none; } .tpl-card:hover .tpl-art-image { transform: none; } }
/* 内置模板封面：图上不叠字，只留底部极淡的过渡，让图和卡片衔接 */
.tpl-art.clean::after { content: ""; position: absolute; inset: auto 0 0 0; height: 22%; background: linear-gradient(0deg, rgba(5,12,25,.18), transparent); pointer-events: none; }
.tpl-art-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s ease; }
.tpl-art.has-video:hover .tpl-art-video { opacity: 1; }
.tpl-cover.big { cursor: default; border-radius: 10px; margin: 0 0 14px; }
.tpl-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.tpl-card h3, .tpl-detail h3 { margin: 2px 0 0; font-size: 15px; font-weight: 650; }
.tpl-top { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; white-space: nowrap; }
.tpl-cat { font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 1px 8px; margin-right: auto; }
.tpl-meter { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.tpl-meter i { display: inline-flex; gap: 2px; }
.tpl-meter i b { width: 5px; height: 10px; border-radius: 1.5px; background: var(--bg-4); }
.tpl-meter i b.on { background: var(--accent); }
.tpl-sum { margin: 0; color: var(--ink); line-height: 1.55; }
.tpl-body .tpl-sum { color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-scn { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.tpl-scn b, .tpl-fill b { font-weight: 600; color: var(--ink); margin-right: 6px; }
.tpl-pf .chip { background: var(--accent-soft); color: var(--ink); }
.tpl-hl { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.tpl-hl li::marker { color: var(--accent); }
.tpl-act { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; }
.tpl-act .ghost { margin-left: auto; }
.modal .box.tpl-box { width: min(760px, 94vw); max-height: 88vh; overflow: auto; }
.tpl-detail h4 { margin: 16px 0 6px; font-size: 13px; }
.tpl-detail .tpl-sum { margin-top: 6px; }
.tpl-todo { margin: 0; padding-left: 20px; line-height: 1.7; font-size: 13px; }
.tpl-params table td { padding: 6px 10px; font-size: 12.5px; }
.tpl-params td:first-child { color: var(--muted); width: 180px; white-space: nowrap; }
.tpl-params tr.grp td { color: var(--ink); font-weight: 650; background: var(--bg-3); padding-top: 7px; }
.tpl-params tr.chg td:last-child { color: var(--accent); font-weight: 600; }
.tpl-info { background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; font-size: 12.5px; line-height: 1.6; }
.tpl-info ol { margin: 4px 0 0; padding-left: 18px; }
@media (max-width: 720px) { .tpl-bar { flex-direction: column; } .tpl-grid { grid-template-columns: 1fr; } }

/* 设置 › 语言与货币 */
.ui-opts { display: flex; gap: 12px; flex-wrap: wrap; }
.ui-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; min-width: 200px; }
.ui-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.ui-opt input { margin-top: 3px; }
.ui-opt b { display: block; }
.ui-opt small { display: block; opacity: .7; font-size: 12px; margin-top: 2px; }
.quick-studio { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; flex-wrap: wrap; }
.sd-detail .nb-steps { display: none; }  /* 旧的 AI 早报步骤条（brief.js）已由 .sd-steps 取代 */
/* 2026-10-31 流程优化：选中态、恢复条、时间线失败占位、状态徽章 */
.sents .wd.sel { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--bg-4); }
.sents li.sel { box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px var(--accent); }
.restorebar { margin: 8px 12px 0; display: flex; gap: 8px; align-items: center; }
.tl-img { max-height: 160px; width: 100%; object-fit: contain; }
.tl-err { font-size: 12px; color: var(--dim); padding: 8px 10px; border: 1px dashed var(--line); border-radius: 6px; margin: 6px 0; }
.st-chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; border: 1px solid var(--line); }
.st-chip.ok { color: var(--keep); border-color: var(--keep); }
.st-chip.warn { color: var(--warn, #d9a400); border-color: var(--warn, #d9a400); }
.st-chip.bad { color: var(--cut); border-color: var(--cut); }
.st-chip.dim { color: var(--dim); }
.fb-item { margin: 8px 12px; padding: 8px 10px; border-left: 3px solid var(--warn, #d9a400); background: var(--warn-soft); border-radius: 4px; font-size: 13px; }
.fb-item .dim { display: block; margin-top: 2px; }
.pk-row { display: flex; gap: 8px; padding: 4px 12px; font-size: 13px; }
.rp-row { display: flex; gap: 8px; padding: 4px 12px; font-size: 13px; }
.rp-row .grow { flex: 1; }
.pk-row .grow { flex: 1; }
.editor .pane { min-width: 0; }
.editor .center { min-width: 0; overflow: auto; }
.stage-wrap video { max-height: 52vh; }
.proof { margin: 8px 12px 0; border: 1px solid var(--line); border-radius: 6px; padding: 4px 0 8px; }
.proof summary { padding: 4px 12px; cursor: pointer; font-weight: 600; }
.proof .chips.hw { padding: 4px 12px; display: flex; flex-wrap: wrap; gap: 4px; }
.proof .fr { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; padding: 6px 12px; }
.proof .fr input { min-width: 0; }
.fr-learn { display: block; padding: 0 12px; font-size: 12px; color: var(--dim); }
.script-box { max-height: 160px; overflow: auto; padding: 6px 12px; font-size: 13px; white-space: pre-wrap; }
.src-preview video { width: 100%; max-height: 240px; background: #000; border-radius: 6px; margin-top: 8px; }
.preflight ul.roles { list-style: none; padding: 0; margin: 6px 0; font-size: 13px; }
.preflight ul.roles li { margin: 3px 0; }
.dl-state { border: 1px solid var(--line); border-radius: 6px; padding: 6px 0; margin-bottom: 10px; }
.dl-state .rp-row { align-items: flex-start; flex-wrap: wrap; }
.dl-state .rp-row .grow { flex: 0 0 88px; }
.dl-state .rp-row > span + span:not(.st-chip) { flex: 1 1 180px; min-width: 0; }
.dl-state .rp-row > .st-chip { margin-left: auto; }
.delivery-specs table { min-width: 540px; }
.delivery-specs th, .delivery-specs td { white-space: nowrap; }
.delivery-specs:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- 成员与角色 ---------- */
.app.login-mode { grid-template-columns: 1fr; }  /* 登录页：导航隐藏后主区域占满（之前被挤在导航列里） */
input[type=email] { width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-3); color: var(--ink); font: inherit; outline: none; }
.mb-head { display: flex; gap: 16px; align-items: flex-end; margin-bottom: 14px; }
.mb-head .grow { flex: 1; max-width: 420px; }
.mb-myrole { display: flex; flex-direction: column; align-items: flex-start; }
.mb-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0; }
.mb-role { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; line-height: 20px; white-space: nowrap; background: var(--bg-4); color: var(--muted); }
.mb-role.r-owner { background: rgba(244, 183, 64, .16); color: var(--warn); }
.mb-role.r-admin { background: var(--accent-soft); color: var(--accent); }
.mb-role.r-editor { background: var(--keep-soft); color: var(--keep); }
.mb-role.r-reviewer { background: rgba(192, 108, 255, .14); color: #b77cf0; }
.mb-av { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 650; font-size: 13px; color: #fff; flex: none;
  background: linear-gradient(135deg, #6b7383, #444b57); }
.mb-av.r-owner { background: linear-gradient(135deg, #f4b740, #e0782c); } .mb-av.r-admin { background: linear-gradient(135deg, #5d6ef5, #8b5cf6); }
.mb-av.r-editor { background: linear-gradient(135deg, #1fae79, #22a2b8); } .mb-av.r-reviewer { background: linear-gradient(135deg, #b46cf0, #e05fa8); }
.mb-who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.mb-who .nm { font-weight: 600; } .mb-who .em { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.mb-table tr.mb-me td { background: var(--accent-soft); }
.mb-sel { width: auto; min-width: 104px; padding: 5px 8px; }
.mb-ops { text-align: right; white-space: nowrap; }
.mb-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.mb-tools .search { max-width: 280px; padding: 0 10px; }
.mb-tools .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mb-tools .chips button { border: 1px solid var(--line-2); background: transparent; color: var(--muted); border-radius: 999px; padding: 3px 10px; cursor: pointer; font: inherit; font-size: 12.5px; }
.mb-invrow { grid-template-columns: 1fr 160px auto; align-items: end; }
.mb-invbtn { display: flex; align-items: flex-end; }
tr.mb-expired td { opacity: .6; }
.mb-links { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; }
.mb-link { display: flex; gap: 10px; align-items: center; background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.mb-link .grow { flex: 1; min-width: 0; } .mb-link .em { font-size: 12px; color: var(--muted); }
.mb-link code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.mb-matrix-wrap { overflow-x: auto; margin-top: 10px; }
.mb-matrix th.c, .mb-matrix td.c { text-align: center; width: 92px; }
.mb-matrix .me { background: var(--accent-soft); }
.mb-matrix tr.grp td { color: var(--dim); font-size: 12px; padding-top: 14px; border-bottom: 0; }
.mb-yes { color: var(--keep); font-weight: 700; } .mb-no { color: var(--dim); }
.mb-you { font-size: 11px; color: var(--accent); margin-top: 2px; }
.mb-dl { grid-template-columns: 96px 1fr; margin-top: 16px; }
.mb-acct { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mb-danger { display: flex; gap: 16px; align-items: center; margin-top: 18px; padding: 14px 16px; border: 1px solid rgba(255, 92, 111, .35); border-radius: 10px; }
.mb-danger .grow { flex: 1; }
.mb-steps { margin: 0; padding-left: 20px; line-height: 1.9; }
.mb-confirm p { margin: 0 0 8px; }
.mb-invite { max-width: 560px; margin: 48px auto; padding: 28px; }
.mb-invhead { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.mb-invhead .ic { width: 34px; height: 34px; color: var(--accent); }
.mb-invhead h2 { margin: 2px 0; }
@media (max-width: 860px) {
  .mb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mb-acct, .mb-invrow { grid-template-columns: 1fr; }
  .mb-table th:nth-child(4), .mb-table td:nth-child(4), .mb-table th:nth-child(5), .mb-table td:nth-child(5) { display: none; }
  .mb-head { flex-direction: column; align-items: stretch; }
}
.mb-tools .chips button.on { background: var(--accent-soft); border-color: transparent; color: var(--ink); }

/* 设置 › 数字人与口型（settings.js settingsAvatarHTML） */
.av-chain { display: flex; flex-direction: column; gap: 6px; }
.av-be { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.av-be.off b { color: var(--dim); }
.av-be .dim { font-size: 12px; }
.av-be .mini { border: 0; background: none; color: var(--dim); cursor: pointer; padding: 0 4px; font-size: 12px; }
.av-be .mini:hover { color: var(--ink); }

/* ---------- 交付中心：删除 / 批量删除 ---------- */
.dlv-card .pic .dlv-del { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border-radius: 7px; border: 0; padding: 0;
  display: grid; place-items: center; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; }
.dlv-card .pic .dlv-del svg { width: 15px; height: 15px; }
.dlv-card:hover .pic .dlv-del, .dlv-card .pic .dlv-del:focus-visible { opacity: 1; }
.dlv-card .pic .dlv-del:hover { background: #e5484d; }
.dlv-card .pic .dlv-ck { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 6px; border: 2px solid #fff;
  background: rgba(0,0,0,.35); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.dlv-card.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset, 0 0 0 1px var(--accent); }
.dlv-card.picked .pic .dlv-ck { background: var(--accent); border-color: var(--accent); }
.dlv-card.picked .pic::after { content: ""; position: absolute; inset: 0; background: rgba(80, 90, 255, .12); pointer-events: none; }
.dlv-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 14px; padding: 8px 12px; border-radius: 10px;
  background: var(--bg-3); border: 1px solid var(--line); position: sticky; top: 0; z-index: 5; font-size: 13px; }
.dlv-bar .btn svg { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.dlv-row { cursor: default; }
.dlv-row.picked td { background: var(--accent-soft, rgba(80, 90, 255, .08)); }
a.dlv-del-link { color: var(--cut); margin-left: 8px; }
.dlv-list { margin: 0 0 10px; padding-left: 18px; max-height: 200px; overflow: auto; font-size: 13px; line-height: 1.7; }
#dlvManage.on { border-color: var(--accent); color: var(--accent); }

/* ---------- 交付中心 › 质量盲评（platform.js ratingsBody） ---------- */
.qr-bar-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.qr-k2 { font-size: 12px; margin-top: 4px; }
.qr-delta { font-size: 12px; font-weight: 600; margin-left: 4px; }
.qr-delta.up { color: var(--keep); } .qr-delta.down { color: var(--cut); }
.qr-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.qr-grid2 > .card { margin-bottom: 16px; }
.qr-dim { display: grid; grid-template-columns: 116px minmax(0, 1fr) 82px; grid-template-areas: "l b v" "l d n"; gap: 4px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.qr-dim:first-of-type { border-top: 0; }
.qr-dim-l { grid-area: l; display: flex; flex-direction: column; font-size: 13px; }
.qr-dim-l .dim { font-size: 11.5px; }
.qr-bar { grid-area: b; position: relative; height: 10px; background: var(--bg-3); border-radius: 99px; }
.qr-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--accent); }
.qr-bar i.good { background: var(--keep); } .qr-bar i.mid { background: var(--warn); } .qr-bar i.bad { background: var(--cut); }
.qr-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; border-radius: 1px; }
.qr-dim-v { grid-area: v; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qr-dist { grid-area: d; display: flex; gap: 2px; height: 5px; border-radius: 3px; overflow: hidden; }
.qr-dim-n { grid-area: n; text-align: right; font-size: 11.5px; white-space: nowrap; }
.qr-dist .s1, .qr-legend .s1 { background: var(--cut); } .qr-dist .s2, .qr-legend .s2 { background: #f08a5d; }
.qr-dist .s3, .qr-legend .s3 { background: var(--warn); } .qr-dist .s4, .qr-legend .s4 { background: #8fd18b; }
.qr-dist .s5, .qr-legend .s5 { background: var(--keep); }
.qr-legend { display: flex; gap: 12px; font-size: 11.5px; margin-top: 10px; }
.qr-legend i { display: inline-block; width: 10px; height: 6px; border-radius: 2px; margin-right: 4px; vertical-align: 1px; }
.qr-chart { width: 100%; height: auto; display: block; }
.qr-chart .qr-grid { stroke: var(--line); stroke-width: 1; }
.qr-chart .qr-ax { fill: var(--dim); font-size: 10.5px; }
.qr-chart .qr-target { stroke: var(--keep); stroke-width: 1.5; stroke-dasharray: 4 4; }
.qr-chart .qr-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.qr-chart .qr-dot { fill: var(--accent); stroke: var(--bg-2); stroke-width: 2; }
.qr-chart .qr-hit { fill: transparent; cursor: default; }
.qr-chart .qr-hit:hover { fill: var(--accent-soft); }
.qr-focus { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.qr-fi { background: var(--bg-3); border-radius: 8px; padding: 12px 14px; }
.qr-fi p { margin: 6px 0; font-size: 13px; line-height: 1.6; }
.qr-fh { display: flex; align-items: center; gap: 6px; }
.qr-fh .dim { margin-left: auto; font-size: 12px; }
.qr-cell { display: inline-block; min-width: 34px; padding: 1px 6px; border-radius: 5px; text-align: center; }
.qr-cell.good { background: var(--keep-soft); } .qr-cell.mid { background: var(--warn-soft); } .qr-cell.bad { background: var(--cut-soft); }
.qr-li { padding: 9px 0; border-top: 1px solid var(--line); }
.qr-li:first-of-type { border-top: 0; padding-top: 0; }
.qr-lt { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.qr-lt a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-lm { font-size: 12px; margin-top: 2px; }
.qr-lnote { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.qr-notes { display: flex; flex-direction: column; gap: 10px; }
.qr-note { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.qr-note .score { margin-left: 0; flex: none; }
.qr-note.qr-more { display: none; }
.qr-prog { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qr-prog > div { flex: 1; height: 6px; background: var(--bg-3); border-radius: 99px; overflow: hidden; }
.qr-prog i { display: block; height: 100%; background: var(--keep); border-radius: 99px; }
.qr-form { display: grid; grid-template-columns: 1.4fr .7fr 1.2fr .9fr auto; gap: 12px; align-items: end; }
.qr-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.qr-form label.qr-ck { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 8px; white-space: nowrap; color: var(--ink); }
.qr-made { margin-top: 12px; padding: 12px 14px; background: var(--keep-soft); border-radius: 8px; }
.qr-made code { display: block; margin-top: 6px; word-break: break-all; }
.qr-intro .qr-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.qr-steps > div { background: var(--bg-3); border-radius: 8px; padding: 12px 14px; }
.qr-steps b { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; align-items: center; justify-content: center; font-size: 12px; margin-right: 6px; }
.qr-steps span { font-weight: 650; }
.qr-steps p { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.qr-flash { animation: qrflash .9s; }
@keyframes qrflash { from { box-shadow: 0 0 0 3px var(--accent); } to { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 1100px) { .qr-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .qr-grid2, .qr-intro .qr-steps { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* G-04：服务状态横幅（连不上 / 需要重启 / 需要刷新） */
.svc-banner { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 20; display: flex; gap: 12px; align-items: center;
  max-width: min(720px, calc(100vw - 32px)); padding: 10px 14px; border-radius: 10px; background: var(--bg-2); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--pop-shadow); font-size: 13px; line-height: 1.5; }
.svc-banner.warn { border-color: var(--warn); }
.svc-banner span { flex: 1; }

/* ===== 功能精简（docs/feature_audit_simplify_tasks_20261101.md） ===== */
/* 二级入口条：同一个一级菜单下的几个页面 */
.hub-tabs { display: flex; gap: 4px; margin: -4px 0 16px; overflow-x: auto; }
.hub-tabs a { padding: 6px 14px; border-radius: 999px; color: var(--muted); background: var(--bg-3); white-space: nowrap; font-size: 13px; }
.hub-tabs a:hover { color: var(--ink); }
.hub-tabs a.active { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
/* 作品状态徽章（5 种） */
.badge.ws-running { background: var(--accent-soft); color: var(--accent); }
.badge.ws-review { background: var(--warn-soft); color: var(--warn); }
.badge.ws-done { background: var(--keep-soft); color: var(--keep); }
.badge.ws-published { background: var(--keep-soft); color: var(--ok-ink, var(--keep)); }
.badge.ws-failed { background: var(--cut-soft); color: var(--cut); }
.tk-fix { margin-left: 8px; font-size: 12.5px; }
.chip-lbl { font-size: 12px; margin-right: 2px; align-self: center; }
/* 创作首页：顶部 3 个数字 + 制作类型卡片 */
.home-strip { display: flex; gap: 6px; margin-right: auto; margin-left: 12px; }
.home-strip .hs-item { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--bg-3); color: var(--muted); font-size: 12.5px; }
.home-strip .hs-item b { color: var(--ink); font-size: 14px; }
.home-strip .hs-item.hot { background: var(--warn-soft); } .home-strip .hs-item.hot b { color: var(--warn); }
.home-strip .hs-item.run b { color: var(--accent); }
.type-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px auto 6px; max-width: 760px; text-align: left; }
.type-card { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); display: flex; flex-direction: column; overflow: hidden; }
.type-card .tc-main { all: unset; cursor: pointer; padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 4px; }
.type-card .tc-main:hover { background: var(--bg-3); }
.type-card .tc-main b { font-size: 14px; color: var(--ink); }
.type-card .tc-main span { font-size: 12px; color: var(--muted); line-height: 1.45; }
.type-card .tc-form { font-size: 12px; padding: 6px 12px 10px; color: var(--dim); }
@media (max-width: 860px) { .type-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .home-strip { display: none; } }
.more-wrap { position: relative; }
.more-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--pop-shadow); padding: 4px; min-width: 150px; }
.more-pop button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--ink); padding: 8px 12px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 13px; }
.more-pop button:hover { background: var(--bg-3); }
.typing-stage { margin-left: 8px; color: var(--muted); font-size: 12.5px; }
/* 高级设置折叠 */
details.adv-sec > summary, details.adv-card > summary, details.sd-quality-wrap > summary { cursor: pointer; list-style: none; }
details.adv-sec > summary::-webkit-details-marker, details.adv-card > summary::-webkit-details-marker, details.sd-quality-wrap > summary::-webkit-details-marker { display: none; }
details.adv-sec > summary::after, details.adv-card > summary::after, details.sd-quality-wrap > summary::after { content: "展开"; margin-left: auto; font-size: 12px; color: var(--accent); font-weight: 400; }
details[open].adv-sec > summary::after, details[open].adv-card > summary::after, details[open].sd-quality-wrap > summary::after { content: "收起"; }
details.adv-sec > summary.sec-h, details.adv-card > summary { display: flex; align-items: center; gap: 8px; }
details.adv-card { padding: 12px 16px; }
details.adv-card > summary { font-weight: 600; }
details.adv-card > summary .dim { font-weight: 400; font-size: 12.5px; }
details.adv-card[open] > summary { margin-bottom: 12px; }
details.sd-quality-wrap { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
details.sd-quality-wrap > summary { display: flex; font-size: 13px; color: var(--muted); }
/* 成片：首屏动作条、低置信词、文件异常修复 */
.dl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 14px; }
.lc-words { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-words .chip { cursor: pointer; border: 1px solid var(--line-2); background: transparent; }
.lc-words .chip.on { background: var(--keep-soft); }
.fix-row { display: flex; align-items: center; gap: 8px; padding: 0 10px 10px; font-size: 12px; }
.fix-row .dim { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-confirm { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); font-size: 13px; }
.pb-confirm span { flex: 1; display: inline-flex; align-items: center; gap: 6px; }
.pb-unc { color: var(--warn); font-size: 11.5px; margin-right: 4px; }
/* 定时出片 / 浏览器登录 / 框选打码 / 附加素材拖放 */
.nb-sched { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.nb-days { display: inline-flex; gap: 4px; }
.nb-days .day { display: inline-flex; } .nb-days .day input { display: none; }
.nb-days .day span { padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line-2); font-size: 12px; color: var(--muted); cursor: pointer; }
.nb-days .day input:checked + span { background: var(--accent-soft); color: var(--ink); border-color: transparent; }
.sd-login { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mask-pick { position: relative; user-select: none; cursor: crosshair; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mask-pick img { display: block; width: 100%; }
.mp-rect { position: absolute; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); pointer-events: none; }
.mp-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mp-list .chip button { border: 0; background: none; color: var(--muted); cursor: pointer; }
.pe-drop { display: flex; align-items: center; gap: 12px; padding: 14px; margin-top: 12px; border: 1.5px dashed var(--line-2); border-radius: 10px; cursor: pointer; color: var(--muted); }
.pe-drop.over, .pe-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.pe-drop b { color: var(--ink); display: block; } .pe-drop .dim { font-size: 12.5px; }

/* 服务状态横幅 v2：右下角紧凑卡片，不遮挡页面中间的输入框和入口 */
.svc-banner { left: auto; right: 20px; bottom: 20px; transform: none; max-width: min(380px, calc(100vw - 40px));
  flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; border-radius: 12px; }
.svc-banner .btn { align-self: flex-end; }
.shell > .svc-banner { position: static; transform: none; max-width: none; flex: none; margin: 8px 20px;
  flex-direction: row; align-items: center; }
.shell > .svc-banner .btn { align-self: center; flex: none; }
.sm-page .sm-run{display:flex;justify-content:space-between;gap:16px;padding:16px 0;border-bottom:1px solid var(--border,#293448)}
.sm-page .sm-run .actions{align-self:center;flex-shrink:0}
.sm-page details summary{cursor:pointer;color:var(--muted,#a1adc2)}
.sm-page input[type=search]{margin-bottom:6px}
.sm-page [hidden]{display:none!important}
@media(max-width:700px){.sm-page .sm-run{flex-direction:column}.sm-page .g2f{grid-template-columns:1fr}.sm-page .sm-run .actions{align-self:flex-start}}

/* News plans and platform editions share the existing studio form. */
.nb-platform-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.nb-platform{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;cursor:pointer;min-width:0}.nb-platform:has(input:checked){border-color:var(--acc);background:color-mix(in srgb,var(--acc) 9%,transparent)}.nb-platform input{width:auto;flex-shrink:0}.nb-platform span{min-width:0}.nb-platform b{display:block;font-size:13px}.nb-platform small{display:block;font-size:11px;color:var(--dim);margin-top:4px}.nb-target{display:grid;grid-template-columns:110px minmax(0,1fr);align-items:center;gap:12px;margin-top:10px}.nb-target span{font-size:13px}#nbSched .g2f{row-gap:16px}#nbSched .full.hint{margin:0}#nbSched .actions{justify-content:flex-start}.nb-screen{height:auto} @media(max-width:620px){.nb-platform-grid{grid-template-columns:1fr}.nb-target{grid-template-columns:1fr}}

/* K-01 分镜（镜头列表） */
.sd-shots .sd-shots-meta { display: flex; gap: 14px; flex-wrap: wrap; margin: 6px 0 8px; font-size: 12.5px; }
.sd-shot-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; max-height: 360px; overflow: auto; }
.sd-shot-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--bg-3); font-size: 13px; }
.sd-shot-t { font-variant-numeric: tabular-nums; color: var(--dim); min-width: 86px; }
.sd-shot-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-shot-3d { border-color: var(--accent) !important; color: var(--ink); }

/* ---------- 配音顺序（2026-11-06 重排：角色卡 → 竖排尝试顺序 → 其它设置） ---------- */
.vr-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.vr-role { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; transition: border-color .15s, box-shadow .15s, background .15s; }
.vr-role:hover { border-color: var(--line-2); }
.vr-role:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vr-role.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.vr-role-h { display: flex; align-items: center; gap: 8px; }
.vr-role-h b { font-size: 15px; font-weight: 650; }
.vr-dirty { margin-left: auto; font-size: 11px; font-weight: 600; padding: 0 7px; line-height: 18px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.vr-role-d { font-size: 12px; color: var(--muted); line-height: 1.5; }
.vr-role-use { display: flex; align-items: baseline; gap: 6px; min-width: 0; margin-top: 4px; padding: 7px 10px; border-radius: 9px; font-size: 12.5px; background: var(--bg-3); }
.vr-role-use i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; align-self: center; }
.vr-role-use .lbl { flex: none; font-weight: 600; }
.vr-role-use b { flex: none; color: var(--ink); font-weight: 600; }
.vr-role-use .mono { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11.5px; }
.vr-role-use.ok { color: var(--keep); } .vr-role-use.warn { color: var(--warn); } .vr-role-use.bad { color: var(--cut); background: var(--cut-soft); }
.vr-role-p { font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }

.vr-chain { padding-bottom: 16px; }
.vr-chain-h { display: flex; align-items: flex-start; gap: 16px; }
.vr-chain-t { flex: 1; min-width: 0; }
.vr-chain-t h2 { margin-bottom: 4px; }
.vr-chain-t p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.vr-chain-a { display: flex; gap: 6px; flex: none; }
.vr-src { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 14px; padding: 9px 12px; border-radius: 9px; background: var(--bg-3); font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.vr-src .ic { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--dim); }

.vr-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.vr-row { display: grid; grid-template-columns: 16px 22px minmax(0, 1fr) auto 92px 64px auto; align-items: center; gap: 12px; padding: 10px 12px 10px 8px;
  border-top: 1px solid var(--line); background: var(--bg-2); transition: background .12s; }
.vr-row:first-child { border-top: 0; }
.vr-row:hover { background: var(--bg-3); }
.vr-row.using { background: var(--keep-soft); }
.vr-row.off .vr-name b, .vr-row.off .vr-model, .vr-row.off .vr-price { color: var(--dim); }
.vr-row.dragging { opacity: .4; }
.vr-row.over { box-shadow: inset 0 2px 0 var(--accent); }
.vr-grip { display: grid; place-items: center; color: var(--dim); cursor: grab; opacity: .5; }
.vr-row:hover .vr-grip { opacity: 1; }
.vr-grip svg { width: 14px; height: 14px; fill: currentColor; }
.vr-idx { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-4); color: var(--muted); font-size: 11.5px; font-weight: 700; }
.vr-row.using .vr-idx { background: var(--keep); color: #fff; }
.vr-main { min-width: 0; }
.vr-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vr-name b { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.vr-model { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.vr-tag { flex: none; font-size: 11px; font-weight: 600; padding: 0 7px; line-height: 18px; border-radius: 999px; background: var(--bg-4); color: var(--muted); text-decoration: none; }
.vr-tag.use { background: var(--keep); color: #fff; }
a.vr-tag:hover { color: var(--accent); }
.vr-caps { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.vr-price { text-align: right; font-size: 12.5px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vr-st { font-size: 12px; white-space: nowrap; }
.vr-st > * { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.vr-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.vr-act { display: flex; gap: 2px; }
.vr-act .nb { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; background: none; color: var(--muted); border-radius: 7px; cursor: pointer; padding: 0; }
.vr-act .nb svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vr-act .nb .ic { width: 14px; height: 14px; }
.vr-act .nb:hover:not(:disabled) { background: var(--bg-4); color: var(--ink); }
.vr-act .nb.rm:hover:not(:disabled) { background: var(--cut-soft); color: var(--cut); }
.vr-act .nb:disabled { opacity: .28; cursor: default; }
.vr-act .nb:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.vr-fold { border-top: 1px solid var(--line); background: var(--bg-3); }
.vr-fold button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 14px; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; text-align: left; }
.vr-fold button:hover { color: var(--ink); }
.vr-fold .ic { width: 14px; height: 14px; transition: transform .15s; }
.vr-fold.open .ic { transform: rotate(-90deg); }
.vr-fold:not(.open) .ic { transform: rotate(90deg); }
.vr-add { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 10px; padding: 9px; border: 1px dashed var(--line-2); border-radius: 10px;
  background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.vr-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.vr-add .ic { width: 15px; height: 15px; }
.vr-chain .vempty { min-height: 64px; }
.vtests-h { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.vtests-h .muted { font-size: 12px; }
.vtests-h .lnk { margin: 0 0 0 auto; }
.vt-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-n .mono { color: var(--muted); font-size: 11.5px; }

.vr-more h2 { margin-bottom: 2px; }
.vr-set { display: flex; align-items: center; gap: 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.vr-more h2 + .vr-set { border-top: 0; }
.vr-set:last-child { padding-bottom: 2px; }
.vr-set-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.vr-set-l b { font-size: 13.5px; font-weight: 600; }
.vr-set-l > span { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.vr-set-l .lnk { margin-top: 2px; }
.vr-set-r { flex: none; display: flex; align-items: center; gap: 12px; max-width: 58%; }
.vr-val { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; }
.vr-val b { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.vr-val .muted { font-size: 11.5px; }
.vr-prof { min-width: 420px; }
.vr-prof button { padding: 7px 10px; gap: 2px; }
.vr-prof button small { font-size: 11px; line-height: 1.35; text-align: center; }
.vr-prof button small.warn { color: var(--warn); } .vr-prof button small.dim { color: var(--dim); }
.vr-provs { flex-wrap: wrap; justify-content: flex-end; }
.vr-pchips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.vr-pchip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--dim); white-space: nowrap; }
.vr-pchip i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.vr-pchip.ok { color: var(--ink); background: var(--bg-3); }
.vr-pchip.ok i { background: var(--keep); }
.pk-more { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.pk-more summary { cursor: pointer; }
.pk-more .pk-custom { margin-top: 8px; }

@media (max-width: 1180px) {
  .vr-row { grid-template-columns: 16px 22px minmax(0, 1fr) 84px 58px auto; }
  .vr-caps { display: none; }
  .vr-set { flex-direction: column; align-items: stretch; gap: 10px; }
  .vr-set-r { max-width: none; justify-content: flex-start; }
  .vr-val { align-items: flex-start; text-align: left; }
  .vr-prof { min-width: 0; flex: 1; }
  .vr-provs, .vr-pchips { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .vr-roles { grid-template-columns: 1fr; gap: 8px; }
  .vr-role-d { display: none; }
  .vr-chain-h { flex-direction: column; gap: 10px; }
  .vr-row { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "idx main act" "idx meta act"; row-gap: 2px; padding: 10px; }
  .vr-grip, .vr-caps { display: none; }
  .vr-idx { grid-area: idx; } .vr-main { grid-area: main; } .vr-act { grid-area: act; }
  .vr-price { grid-area: meta; text-align: left; font-size: 11.5px; color: var(--muted); }
  .vr-st { display: none; }
  .vr-prof { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .vr-role, .vr-row, .vr-fold .ic { transition: none; } }
/* 添加模型弹窗：.pk-row 被后面一条通用规则改成了 flex，这里按列表恢复成对齐的网格 */
#pkList .pk-row { display: grid; grid-template-columns: 10px 96px minmax(0, 1fr) auto 92px 52px; gap: 10px; padding: 9px 12px; font-size: 12.5px; }
@media (max-width: 640px) { #pkList .pk-row { grid-template-columns: 10px minmax(0, 1fr) auto; } }

/* 作品：批量管理 + 存储位置图标 */
.tk-thumb-wrap { position: relative; display: block; height: 48px; }
.tk-store { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--bg-2); cursor: help; box-sizing: border-box; }
.tk-store svg { width: 11px; height: 11px; stroke-width: 2.4; }
.tk-store.cloud { color: #fff; background: #2f8fe0; }
.tk-store.sync { color: #fff; background: #2f8fe0; animation: tkStorePulse 1.4s ease-in-out infinite; }
.tk-store.fail { color: #fff; background: #e5484d; }
.tk-store.local { color: var(--ink); background: var(--bg-4, var(--bg-3)); }
.tk-row:hover .tk-store { border-color: var(--bg-3); }
@keyframes tkStorePulse { 50% { opacity: .5; } }

.fl-ck { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; border-radius: 5px; border: 1.5px solid var(--line-2, #9aa6b8);
  background: var(--bg-2); display: inline-grid; place-items: center; cursor: pointer; transition: border-color .12s; flex: none; }
.fl-ck:hover:not(:disabled) { border-color: var(--accent); }
.fl-ck:checked, .fl-ck:indeterminate { background: var(--accent); border-color: var(--accent); }
.fl-ck:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.fl-ck:indeterminate::after { content: ""; width: 8px; height: 2px; background: #fff; border-radius: 1px; }
.fl-ck:disabled { opacity: .35; cursor: not-allowed; }
.fl-ck:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wk-bar { position: sticky; top: 0; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 20px; min-height: 52px;
  background: var(--bg-2); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; font-size: 13px; margin: -6px -8px 4px; }
.wk-all { display: grid; place-items: center; width: 22px; }
.wk-count { white-space: nowrap; } .wk-count b { color: var(--accent); font-size: 15px; margin: 0 2px; } .wk-count .dim { font-size: 12px; }
.wk-link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: 12.5px; }
.wk-link:hover { text-decoration: underline; }
.wk-tip { margin-left: auto; font-size: 12px; white-space: nowrap; }
.wk-del { background: var(--cut, #e5484d); border-color: var(--cut, #e5484d); color: #fff; }
.wk-del:hover:not(:disabled) { filter: brightness(1.08); }
.wk-del:disabled { background: transparent; color: var(--muted); border-color: var(--line); opacity: 1; }
.wk-del svg, .wk-bar .btn svg { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
#wkManage svg { width: 15px; height: 15px; margin-right: 5px; vertical-align: -3px; }

.tk-list.manage { user-select: none; -webkit-user-select: none; }
.tk-list.manage .tk-row { grid-template-columns: 22px 72px minmax(0, 1fr) 150px; }
.tk-list.manage .tk-act { display: none; }
.tk-ck { display: grid; place-items: center; cursor: pointer; }
.tk-ck.off { cursor: not-allowed; }
.tk-row.picked, .tk-row.picked:hover { background: var(--accent-soft, rgba(91, 46, 230, .07)); box-shadow: inset 3px 0 0 var(--accent); }
.tk-list.manage .tk-row.locked { cursor: not-allowed; }
.tk-list.manage .tk-row.locked > :not(.tk-ck) { opacity: .5; }
.tk-list.manage .tk-row.locked:hover { background: transparent; }
@media (max-width: 900px) {
  .tk-list.manage .tk-row { grid-template-columns: 22px 56px minmax(0, 1fr); }
  .tk-thumb-wrap { height: 40px; }
  .wk-tip { display: none; } .wk-bar { padding: 10px 12px; gap: 8px; } .wk-bar .btn.ghost { margin-left: auto; }
}

/* 作品视图切换与封面网格 */
.wk-page .page-head, .wk-page .page-head .right { flex-wrap: wrap; }
.wk-views { flex: none; }
.wk-views button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.wk-views button:hover { color: var(--ink); }
.wk-views button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.wk-views .ic { width: 15px; height: 15px; }
.tk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr)); gap: 12px; padding: 4px; }
.tk-grid .tk-row { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0;
  min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.tk-grid .tk-row:hover, .tk-grid .tk-row:focus-within { border-color: var(--line-2); }
.tk-grid .tk-thumb-wrap { height: auto; aspect-ratio: 16 / 9; }
.tk-grid .tk-thumb { border-radius: 0; background-image: radial-gradient(ellipse at top right, var(--accent-soft), transparent 80%); }
.tk-grid .tk-thumb img { object-fit: contain; }
.tk-grid .tk-thumb .ic { width: 34px; height: 34px; }
.tk-grid .tk-store { bottom: 8px; right: 8px; }
.tk-grid .tk-main { flex: 1; gap: 6px; padding: 12px 12px 0; }
.tk-grid .tk-title, .tk-grid .tk-sub { flex-wrap: wrap; gap: 4px 6px; }
.tk-grid .tk-title b { flex: 1 1 100%; order: -1; }
.tk-grid .tk-sub > .muted:empty { display: none; }
.tk-grid .tk-time { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 8px 12px; text-align: left; }
.tk-grid .tk-time > div:empty, .tk-grid .tk-act:empty { display: none; }
.tk-grid .tk-act { justify-content: flex-start; flex-wrap: wrap; padding: 0 12px 12px; }
.tk-grid .tk-ck { position: absolute; z-index: 1; top: 8px; left: 8px; padding: 4px; border-radius: 7px; background: var(--bg-2); }
.tk-grid .tk-row.picked { border-color: var(--accent); }
