/* ===== 三套主题：黑白（默认深色）/ 白金 / 绿白 =====
   主题靠 body 上的 class 切换：无 class = 黑白，theme-gold = 白金，theme-green = 绿白。
   所有点缀色统一走 --accent / --accent-rgb / --accent-2，一处定义全局生效。 */
:root {
  /* 黑白（默认）：中性石墨黑底 + 白银点缀，不带冷蓝灰 */
  --bg: #0b0b0b;
  --sidebar: #131313;
  --panel: #1a1a1a;
  --panel-2: #212121;
  --panel-3: #2b2b2b;
  --border: #383838;
  --border-soft: rgba(255, 255, 255, .1);
  --text: #f5f5f5;
  --muted: #a6a6a6;
  --muted-2: #7a7a7a;
  --accent: #f2f2f2;
  --accent-rgb: 242, 242, 242;
  --accent-2: #c6c6c6;
  --purple: #c6c6c6;
  --green: #3ecf9b;
  --yellow: #e9b45f;
  --danger: #fb7185;
  --radius: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  /* 模块化字号比例（1.2x）：统一全站排版层级 */
  --fs-xs: 10px;   /* 角标、辅助 */
  --fs-sm: 11px;   /* 次要说明 */
  --fs-md: 12px;   /* 正文基准 */
  --fs-lg: 14px;   /* 强调正文 */
  --fs-xl: 16px;   /* 小标题 */
  --fs-2xl: 20px;  /* 区块标题 */
  --fs-3xl: 24px;  /* 页面标题 */
  --fs-4xl: 32px;  /* 大标题 */
  --fs-display: 48px; /* 展示标题 */
  /* 语义色：跨主题稳定的功能色 */
  --color-white: #ffffff;
  --color-success: #3ecf9b;
  --color-warning: #e9b45f;
  --color-danger: #fb7185;
  --color-info: #6aa9e0;
}

/* 白金：浅灰白底 + 香槟金点缀 */
body.theme-gold {
  --bg: #f6f4ee;
  --sidebar: #ffffff;
  --panel: #ffffff;
  --panel-2: #faf8f2;
  --panel-3: #f0ece2;
  --border: #e4ddcd;
  --border-soft: rgba(120, 96, 48, .1);
  --text: #2a2419;
  --muted: #6f6759;
  --muted-2: #948b7c;
  --accent: #b08a48;
  --accent-rgb: 176, 138, 72;
  --accent-2: #8f6d2c;
  --btn-on-accent: #ffffff;
  --purple: #9a7c4a;
  --shadow: 0 18px 50px rgba(80, 62, 30, .14);
}

/* 绿白：浅灰白底 + 翠绿点缀 */
body.theme-green {
  --bg: #f2f7f4;
  --sidebar: #ffffff;
  --panel: #ffffff;
  --panel-2: #f5faf7;
  --panel-3: #e6f1ea;
  --border: #d6e6dc;
  --border-soft: rgba(20, 130, 88, .1);
  --text: #16261f;
  --muted: #5b7368;
  --muted-2: #849a8f;
  --accent: #0f9d6e;
  --accent-rgb: 15, 157, 110;
  --accent-2: #0b7d58;
  --btn-on-accent: #ffffff;
  --purple: #3f9f8a;
  --shadow: 0 18px 50px rgba(20, 90, 60, .14);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* A/B 双端：管理端专用入口默认不渲染，用户端看不到任何核心配置 */
.admin-only { display: none !important; }
body.admin-mode .admin-only { display: flex !important; }

html, body { height: 100%; margin: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--t-fs-sm);
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; width: 18px; height: 18px; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.app { display: flex; height: 100vh; overflow: hidden; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 262px;
  flex: 0 0 262px;
  background: var(--sidebar);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: width .22s ease, flex-basis .22s ease;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 16px 14px 12px; }
.brand-mark {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #3a3020, #14120e 70%);
  border: 1px solid rgba(var(--accent-rgb), .35);
  display: grid; place-items: center;
  box-shadow: 0 0 18px rgba(var(--accent-rgb), .18);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
/* 品牌 LOGO 固定沿用黑金配色的金色羽毛，三套主题统一不随主题变色 */
.brand-text strong { font-size: 16px; letter-spacing: .06em; background: linear-gradient(90deg, #f4e3b8, #d4b26a 55%, #a07b39); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-text span { font-size: var(--t-fs-sm); color: var(--muted-2); margin-top: 3px; white-space: nowrap; }
.icon-btn, .round-btn { border: 1px solid var(--border); background: var(--panel); color: var(--muted); border-radius: 9px; display: grid; place-items: center; width: 30px; height: 30px; }
.icon-btn:hover, .round-btn:hover { color: var(--text); border-color: #394453; background: var(--panel-2); }
.collapse-btn { margin-left: auto; }

.new-task-btn {
  margin: 4px 14px 14px; height: 38px; border: 0; border-radius: 10px;
  background: linear-gradient(110deg, var(--accent), var(--accent-2));
  color: var(--btn-on-accent, #17130c); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 7px;
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), .22);
}
.new-task-btn:hover { filter: brightness(1.08); }
.new-task-btn svg { width: 16px; height: 16px; }

.side-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 0 10px 10px; border-bottom: 1px solid var(--border-soft); position: relative; }
.nav-item {
  border: 0; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 2px; border-radius: 9px; font-size: var(--t-fs-sm); white-space: nowrap;
}
.nav-item svg { width: 18px; height: 18px; }
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active { color: var(--accent); background: rgba(var(--accent-rgb), .09); }
/* 智能体放在第二行（第二行仅它一项，占据整行更醒目） */
.nav-item.agent-nav { flex-direction: column; justify-content: center; gap: 4px; padding: 8px 2px; margin-top: 0; background: rgba(var(--accent-rgb), .08); border: 1px solid rgba(var(--accent-rgb), .18); color: var(--accent); }
.nav-item.agent-nav em { font-style: normal; font-size: var(--t-fs-cap); color: var(--muted-2); }
.nav-item.agent-nav:hover { background: rgba(var(--accent-rgb), .18); }

/* 对话历史：侧栏右边缘正中间向右凸起的手柄 */
.chat-history-handle {
  position: absolute; top: 50%; right: -38px; transform: translateY(-50%);
  width: 38px; padding: 14px 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb),.22), rgba(var(--accent-rgb),.08));
  border: 1px solid rgba(var(--accent-rgb),.5); border-left: 0;
  border-radius: 0 14px 14px 0; color: var(--accent);
  box-shadow: 4px 2px 16px rgba(0,0,0,.3); cursor: pointer;
  transition: width .18s ease, right .18s ease, background .18s ease, box-shadow .18s ease;
}
.chat-history-handle:hover { width: 46px; right: -46px; background: linear-gradient(135deg, rgba(var(--accent-rgb),.38), rgba(var(--accent-rgb),.16)); box-shadow: 6px 2px 20px rgba(0,0,0,.38); }
.chat-history-handle svg { width: 18px; height: 18px; flex: 0 0 18px; }
.chat-history-handle span { writing-mode: vertical-rl; letter-spacing: 4px; font-size: var(--t-fs-sm); line-height: 1.2; font-weight: 600; }
.chat-history-handle .nav-badge { position: absolute; top: -8px; right: -8px; }
body.light .chat-history-handle { background: linear-gradient(135deg, #eaf3fb, var(--color-white)); border-color: var(--accent); box-shadow: 4px 2px 14px rgba(30,58,95,.16); }
body.light .chat-history-handle:hover { background: linear-gradient(135deg, var(--accent), #f0f8ff); }

.model-header { padding: 12px 14px 8px; }
.model-tabs { display: flex; gap: 16px; margin-bottom: 10px; }
.model-tab { border: 0; background: transparent; color: var(--muted-2); font-size: var(--t-fs-sm); padding: 2px 0; position: relative; }
.model-tab.active { color: var(--text); font-weight: 600; }
.model-tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px; border-radius: 2px; background: var(--accent); }
.search-box {
  display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px;
  background: #17150f; border: 1px solid var(--border); border-radius: 8px; color: var(--muted-2);
}
.search-box:focus-within { border-color: rgba(var(--accent-rgb), .5); }
.search-box svg { width: 14px; height: 14px; flex: 0 0 14px; }
.search-box input { border: 0; outline: 0; background: transparent; width: 100%; font-size: var(--t-fs-sm); }
.search-box input::placeholder { color: #7a7060; }

.model-list { flex: 1; overflow-y: auto; padding: 2px 8px 10px; min-height: 60px; }
.model-card {
  width: 100%; text-align: left; border: 1px solid transparent; background: transparent;
  border-radius: 10px; padding: 9px 9px; display: flex; gap: 9px; align-items: flex-start; margin-bottom: 3px;
}
.model-card:hover { background: var(--panel); }
.model-card.active { background: linear-gradient(100deg, rgba(var(--accent-rgb), .14), rgba(201, 165, 92, .06)); border-color: rgba(var(--accent-rgb), .3); }
.model-ico {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; display: grid; place-items: center;
  font-size: 14px; color: #fff; font-weight: 700; overflow: hidden;
}
.model-ico.long-icon { font-size: var(--t-fs-sm); letter-spacing: -.4px; }
.model-ico.svg-ico { background: transparent !important; }
.model-ico.svg-ico svg { width: 100%; height: 100%; display: block; }
.model-body { min-width: 0; flex: 1; }
.model-name-row { display: flex; align-items: center; gap: 5px; }
.model-name { font-size: var(--t-fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* 渠道标识：名字后的彩色胶囊（官方渠道），按需在 MODELS 里加 channel 字段 */
.model-channel { flex: 0 0 auto; font-style: normal; display: inline-flex; align-items: center; font-size: 10px; font-weight: 600; letter-spacing: .2px; line-height: 1.5; padding: 1px 6px; margin-right: 5px; border-radius: 999px; vertical-align: 1px; color: #fff; white-space: nowrap; background: linear-gradient(135deg, #7c5cff 0%, #3fc1ff 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 0 10px rgba(124, 92, 255, .3); }
body.light .model-channel { background: linear-gradient(135deg, #6a46f5 0%, #1ea7e6 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.model-rate { margin-left: auto; font-size: var(--t-fs-sm); color: var(--green); flex: 0 0 auto; }
.model-desc { font-size: var(--t-fs-sm); color: var(--muted-2); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.model-tag { font-size: var(--t-fs-cap); padding: 0 5px; border-radius: 4px; background: rgba(var(--accent-rgb), .16); color: var(--accent); flex: 0 0 auto; }
.model-mini-tag { font-style: normal; display: inline-flex; align-items: center; gap: 3px; font-size: var(--t-fs-cap); font-weight: 500; padding: 1px 6px 1px 4px; margin-right: 5px; border-radius: 4px; vertical-align: 1px; white-space: nowrap; line-height: 1.5; background: rgba(var(--accent-rgb), .14); color: var(--accent); border: 1px solid rgba(var(--accent-rgb), .2); }
.model-mini-tag svg { width: 12px; height: 12px; flex: 0 0 auto; }
.model-mini-tag.tone-sound { background: rgba(74, 176, 122, .16); color: #3fae77; border-color: rgba(74, 176, 122, .34); }
.model-mini-tag.tone-price { background: rgba(212, 178, 106, .16); color: var(--accent); border-color: rgba(212, 178, 106, .34); }
.model-mini-tag.tone-image { background: rgba(150, 122, 214, .16); color: #9a7ad6; border-color: rgba(150, 122, 214, .34); }
.model-mini-tag.tone-chat { background: rgba(90, 130, 210, .16); color: #6a90dc; border-color: rgba(90, 130, 210, .32); }
body.light .model-mini-tag.tone-sound { color: #278055; }
body.light .model-mini-tag.tone-image { color: #7a55c0; }
body.light .model-mini-tag.tone-chat { color: #3f63b5; }

/* 模型分组：横排 tab（视频 / 聊天 / 图片），点击切换 */
.group-tabs { display: flex; gap: 6px; margin-top: 11px; }
.group-tab {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 2px; border: 1px solid var(--border-soft); border-radius: 8px;
  background: rgba(255,255,255,.02); color: var(--muted-2);
  font-size: var(--t-fs-sm); font-weight: 500; cursor: pointer; transition: .18s;
}
.group-tab svg { width: 13px; height: 13px; flex: 0 0 13px; color: var(--muted-2); transition: .18s; }
.group-tab:hover { background: var(--panel); color: var(--text); }
.group-tab.active {
  color: var(--accent); border-color: rgba(var(--accent-rgb), .42);
  background: linear-gradient(100deg, rgba(var(--accent-rgb), .16), rgba(201, 165, 92, .06));
  font-weight: 600;
}
.group-tab.active svg { color: var(--accent); }
.model-group-empty {
  margin: 4px 6px 2px; padding: 18px 10px; border-radius: 8px;
  border: 1px dashed var(--border-soft); background: rgba(255,255,255,.02);
  font-size: var(--t-fs-sm); color: var(--muted-2); opacity: .8; text-align: center;
}

.sidebar-footer {
  display: flex; flex-direction: column; gap: 8px; padding: 10px 12px;
  border-top: 1px solid var(--border-soft); background: #100e0b;
}
.account-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.credit-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-left: 39px; }
.user-avatar { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; font-weight: 700; font-size: var(--t-fs-sm); }
.user-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.user-info strong, .user-info span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-info strong { font-size: var(--t-fs-sm); }
.user-info span { font-size: var(--t-fs-sm); color: var(--muted); }
.user-info b { color: var(--yellow); font-weight: 600; }
.recharge-btn { flex: 0 0 auto; border: 1px solid rgba(251, 191, 36, .45); background: rgba(251, 191, 36, .1); color: var(--yellow); border-radius: 7px; padding: 5px 9px; font-size: var(--t-fs-sm); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.recharge-btn svg { width: 13px; height: 13px; flex: 0 0 13px; }
.recharge-btn:hover { background: rgba(251, 191, 36, .2); }
/* 账号登录区 */
.user-login-btn { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.user-login-btn:hover .user-info strong { color: var(--accent); }
.user-credit-line { flex: 1; min-width: 0; font-size: var(--t-fs-sm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-credit-line b { color: var(--yellow); }
.logout-btn { flex: 0 0 auto; border: 1px solid var(--border-soft); background: transparent; color: var(--muted); border-radius: 6px; padding: 4px 7px; font-size: var(--t-fs-sm); cursor: pointer; white-space: nowrap; }
.logout-btn:hover { color: #f87171; border-color: rgba(248, 113, 113, .4); }
.sidebar.collapsed .credit-row, .sidebar.collapsed .logout-btn { display: none; }
/* 登录/注册弹窗 */
.auth-modal { max-width: 420px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; background: rgba(255,255,255,.04); padding: 4px; border-radius: 9px; }
.auth-tab { flex: 1; padding: 8px; text-align: center; font-size: var(--t-fs-sm); border-radius: 6px; cursor: pointer; color: var(--muted); border: 0; background: transparent; }
.auth-tab.active { background: rgba(var(--accent-rgb), .16); color: var(--accent); font-weight: 600; }
.auth-field { margin-bottom: 13px; }
.auth-field label { display: block; font-size: var(--t-fs-sm); color: var(--muted); margin-bottom: 5px; }
.auth-field input { width: 100%; padding: 10px 11px; border-radius: 8px; border: 1px solid var(--border-soft); background: rgba(255,255,255,.04); color: var(--text); font-size: var(--t-fs-sm); outline: 0; }
.auth-field input:focus { border-color: rgba(var(--accent-rgb),.6); }
/* 图形验证码：输入框 + 右侧可点的图片，点图换一张 */
.auth-captcha-row { display: flex; gap: 9px; align-items: stretch; }
.auth-captcha-row input { flex: 1; min-width: 0; letter-spacing: 2px; text-transform: uppercase; }
.auth-captcha-img { flex: 0 0 108px; width: 108px; height: 40px; padding: 0; border: 1px solid var(--border-soft); border-radius: 8px; background: #f4f7fc; cursor: pointer; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.auth-captcha-img svg { display: block; width: 108px; height: 38px; }
.auth-captcha-img span { font-size: 11.5px; color: #6b7280; }
.auth-captcha-img:disabled { opacity: .6; cursor: wait; }
.auth-captcha-tip { margin: -4px 0 12px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.auth-submit { width: 100%; margin-top: 6px; padding: 11px; border-radius: 8px; border: 0; background: linear-gradient(110deg, var(--accent), #b8913f); color: #17130c; font-weight: 700; font-size: var(--t-fs-sm); cursor: pointer; }
.auth-submit:disabled { opacity: .55; cursor: not-allowed; }
.auth-note { font-size: var(--t-fs-sm); color: var(--muted); margin-top: 12px; line-height: 1.6; }
/* 管理后台 */
.admin-pwd-row { display: flex; gap: 8px; margin-bottom: 14px; }
/* 后台密径误入提示：地址栏自动补全会把用户带进 qn-console 密径，
   此时页面直接弹口令框会让人误以为是前台坏了，所以先把「你在后台」讲清楚并给一键退出 */
.admin-gate-warn { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; margin-bottom: 14px; border-radius: 10px; border: 1px solid rgba(226,168,80,.55); border-left: 3px solid #e2a850; background: rgba(226,168,80,.16); color: var(--text); font-size: var(--t-fs-sm); line-height: 1.65; }
.admin-gate-warn > div { flex: 1; min-width: 0; }
.admin-gate-warn b { color: #e8b45f; }
.admin-gate-back { margin-top: 4px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border-soft); background: transparent; color: var(--text); font-size: var(--t-fs-sm); cursor: pointer; }
.admin-gate-back:hover { border-color: var(--accent); color: var(--accent); }
.admin-pwd-row input { flex: 1; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border-soft); background: rgba(255,255,255,.04); color: var(--text); font-size: var(--t-fs-sm); outline: 0; }
.admin-pwd-row button { padding: 9px 14px; border-radius: 8px; border: 0; background: linear-gradient(110deg, var(--accent), #b8913f); color: #17130c; font-weight: 700; font-size: var(--t-fs-sm); cursor: pointer; }
/* 后台登录（账号 + 密码）：替代旧的单条口令输入框 */
.admin-auth-form { display: grid; gap: 10px; margin-bottom: 14px; }
.admin-field { display: grid; gap: 6px; }
.admin-field > span { font-size: var(--t-fs-sm); color: var(--muted); }
.admin-field input { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border-soft); background: rgba(255,255,255,.04); color: var(--text); font-size: var(--t-fs-sm); outline: 0; }
.admin-field input:focus { border-color: var(--accent); }
.admin-auth-btn { padding: 10px 14px; border-radius: 8px; border: 0; background: linear-gradient(110deg, var(--accent), #b8913f); color: #17130c; font-weight: 700; font-size: var(--t-fs-sm); cursor: pointer; }
.admin-auth-btn:disabled { opacity: .6; cursor: default; }
/* 后台账号管理面板 */
.acct-who { margin-bottom: 10px; font-size: var(--t-fs-sm); color: var(--text); }
.acct-warn { color: #e8b45f; font-weight: 600; }
.acct-table td .acct-me { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: rgba(var(--accent-rgb), .2); color: var(--accent); }
.acct-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-mini { padding: 4px 9px; border-radius: 6px; border: 1px solid var(--border-soft); background: transparent; color: var(--text); font-size: 12px; cursor: pointer; }
.admin-mini:hover { border-color: var(--accent); color: var(--accent); }
.admin-mini.danger:hover { border-color: #e0605a; color: #e0605a; }
.acct-dash { color: var(--muted); }
.acct-sec { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.acct-sec h4 { margin: 0 0 8px; font-size: var(--t-fs-sm); color: var(--text); font-weight: 600; }
.acct-form { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-form input { flex: 1 1 150px; min-width: 120px; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border-soft); background: rgba(255,255,255,.04); color: var(--text); font-size: var(--t-fs-sm); outline: 0; }
.acct-form input:focus { border-color: var(--accent); }
.acct-foot { margin-top: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--t-fs-sm); margin-top: 8px; }
.admin-table th { text-align: left; padding: 8px 6px; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--border-soft); font-size: var(--t-fs-sm); }
.admin-table td { padding: 8px 6px; border-bottom: 1px solid var(--border-soft); }
.admin-table td.credit { color: var(--yellow); font-weight: 600; }
.admin-grant { display: flex; gap: 5px; }
.admin-grant input { width: 62px; padding: 5px 6px; border-radius: 6px; border: 1px solid var(--border-soft); background: rgba(255,255,255,.04); color: var(--text); font-size: var(--t-fs-sm); }
.admin-grant button { padding: 5px 9px; border-radius: 6px; border: 0; background: rgba(var(--accent-rgb),.2); color: var(--accent); font-size: var(--t-fs-sm); cursor: pointer; }
.admin-empty { padding: 24px; text-align: center; color: var(--muted); font-size: var(--t-fs-sm); }

.sidebar.collapsed { width: 72px; flex-basis: 72px; }
.sidebar.collapsed .brand { padding: 14px 10px 8px; flex-direction: column; gap: 9px; }
.sidebar.collapsed .collapse-btn { margin: 0; transform: rotate(180deg); }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .new-task-btn span, .sidebar.collapsed .nav-item span,
.sidebar.collapsed .model-header, .sidebar.collapsed .model-list,
.sidebar.collapsed .user-info, .sidebar.collapsed .recharge-btn, .sidebar.collapsed .credit-row { display: none; }
.sidebar.collapsed .new-task-btn { margin: 4px 15px 14px; }
.sidebar.collapsed .side-nav { grid-template-columns: 1fr; padding: 0 12px 12px; }
.sidebar.collapsed .nav-item { padding: 10px 0; }
.sidebar.collapsed .nav-item.agent-nav { flex-direction: column; gap: 4px; grid-column: auto; }
.sidebar.collapsed .nav-item.agent-nav em { display: none; }
.sidebar.collapsed .chat-history-handle { right: -38px; }
.sidebar.collapsed .chat-history-handle:hover { right: -46px; }
.sidebar.collapsed .sidebar-footer { justify-content: center; padding: 10px 0; }

/* ---------- 主区域 ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; background: radial-gradient(ellipse 60% 45% at 50% 42%, rgba(255, 255, 255, .045), transparent 70%), var(--bg); }
/* 全局环境画布：星点缓慢漂移、流星划过、点击泛起冷色水波纹 */
.ambient-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.topbar { height: 58px; flex: 0 0 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--border-soft); position: relative; z-index: 2; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }
.backend-chip { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); font-size: var(--t-fs-sm); color: var(--muted); white-space: nowrap; }
.backend-chip i { width: 7px; height: 7px; border-radius: 50%; background: #8a8070; }
.backend-chip.online { color: var(--green); border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.backend-chip.online i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.backend-chip.warn { color: var(--yellow); border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); }
.backend-chip.warn i { background: var(--yellow); }
.backend-chip.offline i { background: #8a8070; }
.pill-btn { height: 32px; border-radius: 18px; border: 1px solid rgba(251, 191, 36, .4); background: linear-gradient(100deg, rgba(251, 191, 36, .18), rgba(251, 191, 36, .06)); color: var(--yellow); padding: 0 14px; display: flex; align-items: center; gap: 6px; font-size: var(--t-fs-sm); font-weight: 600; position: relative; }
.pill-btn svg { width: 15px; height: 15px; }
.pill-btn:hover { background: rgba(251, 191, 36, .22); }
.task-dot { position: absolute; right: 6px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.top-link { height: 30px; border: 1px solid var(--border); background: var(--panel); border-radius: 8px; padding: 0 10px; display: flex; align-items: center; gap: 6px; font-size: var(--t-fs-sm); color: #cfc6b6; }
.top-link svg { width: 14px; height: 14px; }
.top-link:hover { border-color: #544b38; background: var(--panel-2); }
.top-link.purple { color: var(--accent); border-color: rgba(var(--accent-rgb), .35); background: rgba(var(--accent-rgb), .1); }
.top-link.teal { color: var(--accent); border-color: rgba(var(--accent-rgb), .32); background: rgba(var(--accent-rgb), .08); }

.stage { flex: 1; overflow-y: auto; display: flex; justify-content: center; align-items: center; padding: 24px; min-height: 0; position: relative; z-index: 1; }
/* safe center：内容高于舞台时改为顶部对齐并可滚动，避免矮屏下顶部 logo/标题被 topbar 裁切 */
@supports (align-items: safe center) { .stage { align-items: safe center; } }
.hero { width: min(720px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-emblem { width: 106px; height: 106px; position: relative; display: grid; place-items: center; margin-bottom: 18px; }
.hero-bird { width: 72px; height: 72px; filter: drop-shadow(0 0 16px rgba(212,178,106,.5)); z-index: 1; }
.orbit { position: absolute; inset: 8px; border-radius: 50%; border: 1px solid rgba(var(--accent-rgb), .22); }
.orbit-a { border-top-color: var(--accent); border-right-color: rgba(var(--accent-rgb), .5); animation: spin 12s linear infinite; }
.orbit-b { inset: 20px; border-bottom-color: rgba(var(--accent-rgb), .65); animation: spin 8s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-title { font-size: 16px; font-weight: 600; letter-spacing: .08em; color: var(--text); margin-bottom: 18px; }
.intro-card {
  width: 100%; text-align: left; padding: 17px 20px; border-radius: 15px;
  background: linear-gradient(135deg, rgba(44, 38, 28, .78), rgba(22, 20, 16, .75));
  border: 1px solid rgba(176, 164, 140, .14);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
  backdrop-filter: blur(8px);
}
.intro-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.intro-head h2 { font-size: 14px; margin: 0; font-weight: 650; }
.model-badge { font-size: var(--t-fs-sm); padding: 2px 7px; border-radius: 5px; background: rgba(var(--accent-rgb), .15); color: var(--accent); border: 1px solid rgba(var(--accent-rgb), .2); white-space: nowrap; }
.intro-card p { margin: 0; font-size: var(--t-fs-sm); color: #c9bfae; line-height: 1.75; }
.intro-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.intro-chip { font-size: var(--t-fs-sm); color: #a99e8a; border: 1px solid rgba(176, 164, 140, .18); background: rgba(176, 164, 140, .07); border-radius: 6px; padding: 3px 8px; }
.intro-chip.hot-chip { color: var(--color-success); border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.12); font-weight: 600; }
body.light .intro-chip.hot-chip { color: #0f9d6e; border-color: #8fd9bf; background: #eafaf3; }

/* ---------- 底部生成栏 ---------- */
/* 输入区只保留干净面板；流动金线改由主区域背景星轨画布承担 */
.composer-wrap { flex: 0 0 auto; padding: 0 28px 16px; display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; }
.composer {
  position: relative; isolation: isolate;
  width: min(940px, 100%); border-radius: 17px;
  background: linear-gradient(160deg, #1c1a15, #161410);
  border: 1px solid #333c4c;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .03);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.composer.dragging { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18), var(--shadow); }
/* 生图/视频视图：对话流加宽后，生成栏同步加宽，视觉对齐 */
body.gen-active .composer { width: min(1240px, 100%); }

/* ---------- 聊天视图 ---------- */
.chat-view { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; width: min(1120px, 100%); margin: 0 auto; position: relative; z-index: 1; }
.chat-view[hidden] { display: none; }
/* 聊天视图：去掉点阵背景，改用干净柔和的径向底色，避免廉价感 */
body.chat-active .main::before { opacity: 0 !important; }
body.chat-active .main { background: radial-gradient(ellipse 70% 55% at 50% 34%, rgba(var(--accent-rgb), .05), transparent 72%), var(--bg) !important; }
body.chat-active .chat-thread { padding-top: 20px; }
.chat-thread { flex: 1 1 auto; overflow-y: auto; min-height: 0; padding: 8px 2px 20px; display: flex; flex-direction: column; gap: 16px; }
.chat-thread::-webkit-scrollbar { width: 6px; }
.chat-thread::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb), .25); border-radius: 3px; }
.chat-welcome { margin: auto; text-align: center; padding: 32px 12px; }
.chat-welcome-ico { display: inline-flex; width: 62px; height: 62px; }
.chat-welcome-ico svg { width: 100%; height: 100%; }
.chat-welcome h2 { font-size: 20px; margin: 14px 0 6px; color: var(--text, #f0e8d5); letter-spacing: .3px; }
.chat-welcome p { font-size: var(--t-fs-sm); color: var(--muted-2, #8a93a5); margin: 0 0 20px; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chat-suggest button {
  font-size: var(--t-fs-sm); color: #d9c291; background: rgba(var(--accent-rgb), .06);
  border: 1px solid rgba(var(--accent-rgb), .22); border-radius: 16px; padding: 7px 13px; cursor: pointer;
  transition: all .18s ease;
}
.chat-suggest button:hover { background: rgba(var(--accent-rgb), .14); border-color: rgba(var(--accent-rgb), .5); }
.chat-messages { display: flex; flex-direction: column; gap: 16px; }
.chat-msg { display: flex; gap: 11px; align-items: flex-start; }
.chat-msg.user { flex-direction: row-reverse; }
.chat-msg > div { min-width: 0; max-width: min(74%, 880px); display: flex; flex-direction: column; }
.chat-msg.user > div { align-items: flex-end; }
.chat-avatar { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.chat-avatar.bot { background: linear-gradient(135deg,#4d7cff,#2b5bdb); }
.chat-avatar.bot svg { width: 100%; height: 100%; }
.chat-avatar.me { background: linear-gradient(135deg,var(--accent),var(--accent-2)); color: #1a1509; font-size: var(--t-fs-sm); font-weight: 700; }
.chat-bubble { width: fit-content; max-width: 100%; padding: 9px 13px; border-radius: 12px; font-size: var(--t-fs-sm); line-height: 1.68; white-space: pre-wrap; word-break: break-word; }
.chat-msg.bot .chat-bubble { background: rgba(255,255,255,.04); border: 1px solid rgba(var(--accent-rgb),.14); color: var(--text, #e8edf5); border-top-left-radius: 3px; }
.chat-msg.user .chat-bubble { background: linear-gradient(135deg, rgba(var(--accent-rgb),.2), rgba(var(--accent-rgb),.1)); border: 1px solid rgba(var(--accent-rgb),.3); color: var(--text, #f0e8d5); border-top-right-radius: 3px; }
.chat-msg .chat-meta-line { font-size: var(--t-fs-cap); color: var(--muted-2, #8a93a5); margin-top: 5px; }
.chat-msg.user .chat-meta-line { text-align: right; }
/* AI 思考过程：像 WorkBuddy 一样实时展示，可折叠 */
.chat-think { width: fit-content; max-width: 100%; }
.chat-think-head { display: flex; align-items: center; gap: 6px; font-size: var(--t-fs-sm); color: var(--muted, #a9b2c3); cursor: pointer; user-select: none; padding: 2px 0; }
.chat-think-head svg { width: 14px; height: 14px; }
.chat-think-head .think-arrow { transition: transform .18s ease; font-size: var(--t-fs-cap); }
.chat-think.open .chat-think-head .think-arrow { transform: rotate(90deg); }
.chat-think-body { display: none; margin-top: 6px; padding: 9px 12px; border-left: 2px solid rgba(var(--accent-rgb),.45); background: rgba(var(--accent-rgb),.045); border-radius: 0 9px 9px 0; font-size: var(--t-fs-sm); line-height: 1.7; color: var(--muted, #a9b2c3); white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow-y: auto; }
.chat-think.open .chat-think-body { display: block; }
.chat-think-thinking .chat-think-body { display: block; }
.chat-think-cursor::after { content: "▍"; color: var(--accent); animation: thinkBlink .9s steps(2) infinite; }
@keyframes thinkBlink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }
/* 轻量 Markdown 排版：去掉廉价感 */
.chat-md h3, .chat-md h4 { font-size: var(--t-fs-sm); margin: 10px 0 5px; color: var(--accent); font-weight: 700; line-height: 1.5; }
.chat-md h3:first-child, .chat-md h4:first-child { margin-top: 0; }
.chat-md p { margin: 6px 0; }
.chat-md strong { color: var(--text, #f0e8d5); font-weight: 700; }
.chat-md ul, .chat-md ol { margin: 6px 0; padding-left: 20px; }
.chat-md li { margin: 3px 0; }
.chat-md code { background: rgba(var(--accent-rgb),.12); padding: 1px 5px; border-radius: 4px; font-size: var(--t-fs-sm); }
.chat-md hr { border: 0; border-top: 1px solid rgba(var(--accent-rgb),.16); margin: 10px 0; }
.chat-composer { padding: 4px 0 0; }
.chat-composer .prompt-area { padding: 13px 15px 4px; }
.chat-composer .prompt-area textarea { border: none; background: transparent; }
.chat-toolbar { display: flex; align-items: center; gap: 8px; padding: 6px 14px 11px; }
.chat-toolbar .ghost-btn { font-size: var(--t-fs-sm); padding: 6px 11px; border-radius: 8px; color: var(--muted, #a9b2c3); border: 1px solid var(--border-soft, #333c4c); background: transparent; cursor: pointer; transition: all .18s ease; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; }
.chat-toolbar .ghost-btn:hover { color: var(--accent); border-color: rgba(var(--accent-rgb),.5); }
.chat-toolbar .ghost-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
/* 对话参考图：输入框上方的缩略图条 */
.chat-refs { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 2px; }
.chat-refs[hidden] { display: none; }
.chat-ref-thumb { position: relative; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-soft, #333c4c); background: rgba(255,255,255,.03); }
.chat-ref-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-ref-thumb button { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border: none; border-radius: 50%; background: rgba(0,0,0,.72); color: #fff; font-size: var(--t-fs-sm); line-height: 18px; text-align: center; cursor: pointer; padding: 0; }
.chat-ref-thumb button:hover { background: rgba(220,40,40,.9); }
/* 用户消息里随文本一起显示的参考图 */
.chat-user-refs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; justify-content: flex-end; }
.chat-user-refs img { width: 62px; height: 62px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(var(--accent-rgb),.3); cursor: zoom-in; }
.chat-typing::after { content: ""; animation: chatDots 1.2s steps(4, end) infinite; }
@keyframes chatDots { 0% { content: ""; } 25% { content: "·"; } 50% { content: "··"; } 75% { content: "···"; } 100% { content: ""; } }
body.light .chat-welcome h2, body.light .chat-msg.bot .chat-bubble, body.light .chat-msg.user .chat-bubble { color: #263449; }
body.light .chat-suggest button { color: var(--accent-2); }
body.light .chat-msg.bot .chat-bubble { background: var(--color-white); border-color: #e4dcc9; }

/* ===== 音频创作视图（qwen-audio-tts） ===== */
.audio-view { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; width: min(940px, 100%); margin: 0 auto; position: relative; z-index: 1; }
.audio-view[hidden] { display: none; }
.audio-thread { flex: 1 1 auto; overflow-y: auto; min-height: 0; padding: 8px 2px 20px; display: flex; flex-direction: column; gap: 16px; }
.audio-thread::-webkit-scrollbar { width: 6px; }
.audio-thread::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb), .25); border-radius: 3px; }
.audio-welcome { margin: auto; text-align: center; padding: 32px 12px; }
.audio-welcome-ico { display: inline-flex; width: 62px; height: 62px; color: #c58a4a; }
.audio-welcome-ico svg { width: 100%; height: 100%; }
.audio-welcome h2 { font-size: 20px; margin: 14px 0 6px; color: var(--text, #f0e8d5); letter-spacing: .3px; }
.audio-welcome p { font-size: var(--t-fs-sm); color: var(--muted-2, #8a93a5); margin: 0 0 20px; }
.audio-suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.audio-suggest button { font-size: var(--t-fs-sm); color: #d9c291; background: rgba(var(--accent-rgb), .06); border: 1px solid rgba(var(--accent-rgb), .22); border-radius: 16px; padding: 7px 13px; cursor: pointer; transition: all .18s ease; }
.audio-suggest button:hover { background: rgba(var(--accent-rgb), .14); border-color: rgba(var(--accent-rgb), .5); }
.audio-messages { display: flex; flex-direction: column; gap: 16px; }
.audio-msg { display: flex; }
.audio-msg.user { justify-content: flex-end; }
.audio-bubble { max-width: min(78%, 700px); padding: 11px 15px; border-radius: 12px; font-size: var(--t-fs-sm); line-height: 1.7; word-break: break-word; }
.audio-msg.bot .audio-bubble { background: rgba(255,255,255,.04); border: 1px solid rgba(var(--accent-rgb),.14); color: var(--text, #e8edf5); border-top-left-radius: 3px; }
.audio-msg.user .audio-bubble { background: linear-gradient(135deg, rgba(var(--accent-rgb),.2), rgba(var(--accent-rgb),.1)); border: 1px solid rgba(var(--accent-rgb),.3); color: var(--text, #f0e8d5); border-top-right-radius: 3px; }
.audio-msg-meta { font-size: var(--t-fs-sm); color: var(--muted-2, #8a93a5); margin-top: 6px; }
.audio-msg.user .audio-msg-meta { text-align: right; }
.audio-thinking { display: flex; align-items: center; gap: 8px; color: var(--muted, #a9b2c3); }
.audio-err { display: flex; align-items: center; gap: 8px; color: #e07a7a; }
.audio-err svg { width: 16px; height: 16px; flex: 0 0 16px; }
.audio-player { display: flex; align-items: center; gap: 10px; }
.audio-player > svg { width: 24px; height: 24px; color: #c58a4a; flex: 0 0 24px; }
.audio-player audio { flex: 1; min-width: 0; height: 40px; }
.audio-result-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.audio-result-actions .audio-msg-meta { margin-top: 0; }
.audio-compose { padding-top: 4px; }
.audio-composer { border: 1px solid rgba(var(--accent-rgb),.22); border-radius: 14px; background: linear-gradient(160deg, rgba(32,29,24,.96), rgba(20,19,16,.96)); box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.audio-voice-bar { display: flex; gap: 8px; padding: 12px 14px 4px; overflow-x: auto; scrollbar-width: thin; }
.audio-voice { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; padding: 7px 10px 7px 7px; border-radius: 11px; border: 1px solid rgba(var(--accent-rgb),.18); background: rgba(255,255,255,.03); color: var(--text, #e8edf5); cursor: pointer; transition: all .18s ease; }
.audio-voice:hover { border-color: rgba(var(--accent-rgb),.45); }
.audio-voice.active { border-color: var(--accent); background: rgba(var(--accent-rgb),.12); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),.18); }
.audio-voice-av { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.audio-voice-av svg { width: 18px; height: 18px; }
.audio-voice-meta { display: flex; flex-direction: column; line-height: 1.35; }
.audio-voice-meta b { font-size: var(--t-fs-sm); font-weight: 600; }
.audio-voice-meta small { font-size: var(--t-fs-cap); color: var(--muted-2, #8a93a5); }
.audio-voice-preview { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--accent-rgb),.1); color: #d9c291; transition: all .18s ease; }
.audio-voice-preview:hover, .audio-voice-preview.loading { background: rgba(var(--accent-rgb),.28); }
.audio-voice-preview svg { width: 14px; height: 14px; }
/* 音频页克隆音色入口 */
.audio-clone-add { border-style: dashed; border-color: rgba(var(--accent-rgb),.34); background: rgba(var(--accent-rgb),.05); }
.audio-clone-add:hover { border-color: var(--accent); background: rgba(var(--accent-rgb),.12); }
.audio-clone-av { background: linear-gradient(135deg, rgba(var(--accent-rgb),.38), rgba(var(--accent-rgb),.12)); color: var(--accent); border: 1px dashed rgba(var(--accent-rgb),.5); }
/* 音色栏改为左侧紧凑竖排列表：卡片更小，输入区在右侧 */
.audio-composer { display: grid; grid-template-columns: 196px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; padding: 10px 12px 10px 10px; }
.audio-voice-bar { grid-column: 1; grid-row: 1 / 3; flex-direction: column; gap: 4px; padding: 2px 8px 2px 2px; margin: 0; max-height: 200px; overflow-x: hidden; overflow-y: auto; border-right: 1px solid var(--border-soft); }
.audio-composer .prompt-area { grid-column: 2; grid-row: 1; padding: 2px 0 0; }
.audio-composer .prompt-area textarea { min-height: 92px; }
.audio-composer .audio-toolbar { grid-column: 2; grid-row: 2; padding: 2px 0 0; }
.audio-voice { width: 100%; min-width: 0; padding: 3px 5px; gap: 6px; border-radius: 8px; }
.audio-voice-av { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 6px; }
.audio-voice-av svg { width: 12px; height: 12px; }
.audio-voice-meta { min-width: 0; flex: 1; }
.audio-voice-meta b { font-size: var(--t-fs-cap); }
.audio-voice-meta small { font-size: var(--t-fs-cap); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audio-voice-preview { width: 19px; height: 19px; flex: 0 0 19px; }
.audio-voice-preview svg { width: 11px; height: 11px; }
@media (max-width: 900px) {
  .audio-composer { display: block; padding: 8px 10px; }
  .audio-voice-bar { flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 0 0 8px; border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .audio-voice { width: auto; flex: 0 0 auto; }
}
.audio-toolbar { display: flex; align-items: center; gap: 10px; padding: 6px 14px 12px; flex-wrap: wrap; }
.audio-param { display: flex; align-items: center; gap: 6px; font-size: var(--t-fs-sm); color: var(--muted, #a9b2c3); }
.audio-param select { font-size: var(--t-fs-sm); color: var(--text, #e8edf5); background: rgba(255,255,255,.05); border: 1px solid var(--border-soft, #333c4c); border-radius: 7px; padding: 5px 7px; outline: none; cursor: pointer; }
.audio-toolbar .ghost-btn { font-size: var(--t-fs-sm); padding: 6px 11px; border-radius: 8px; color: var(--muted, #a9b2c3); border: 1px solid var(--border-soft, #333c4c); background: transparent; cursor: pointer; transition: all .18s ease; }
.audio-toolbar .ghost-btn:hover { color: var(--accent); border-color: rgba(var(--accent-rgb),.5); }
.work-audio-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; width: 100%; }
.work-audio-ph > svg { width: 34px; height: 34px; color: #c58a4a; }
.work-audio-ph audio { width: 100%; max-width: 260px; height: 36px; }
body.light .audio-welcome h2, body.light .audio-bubble, body.light .audio-param select { color: #263449; }
body.light .audio-composer { background: #fff; }
body.light .audio-msg.bot .audio-bubble { background: #f6f2e8; border-color: #e4dcc9; }
body.light .audio-suggest button { color: var(--accent-2); }

.composer-main { display: flex; flex-direction: column; gap: 10px; padding: 13px 16px 10px; }
.ref-row { display: flex; align-items: center; gap: 9px; width: 100%; min-width: 0; flex-wrap: wrap; }
/* 四个上传入口（参考图 / 素材库 / 参考音色 / 参考视频）横向一排，缩略图单独一行滚动 */
.ref-row .voice-ref-row { margin: 0; }
.ref-row .asset-pick-btn[hidden] { display: none !important; }
.ref-thumbs-row { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.ref-thumbs-row:empty { display: none; }
/* 删光参考图/音色后，容器必须整行收起：:empty 只认「无子节点」，而这里子节点是空 div，
   所以三个缩略图容器各自 :empty 隐藏，整行再由 syncRefRows() 按「三个都空」隐藏，不留空框和空隙。 */
.thumbs:empty, .voice-thumbs:empty { display: none; }
.ref-thumbs-row > [hidden] { display: none !important; }
.ref-thumbs-row[hidden] { display: none !important; }
.upload-box {
  position: relative;
  width: 56px; height: 56px; flex: 0 0 56px; border-radius: 10px; border: 1px dashed #544b38;
  background: rgba(var(--accent-rgb), .05); color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; transition: all .18s ease;
}
.upload-box:hover { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb), .1); }
.upload-box svg { width: 17px; height: 17px; }
.upload-box span { font-size: var(--t-fs-cap); }
.asset-pick-btn { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 10px; border: 1px dashed rgba(var(--accent-rgb), .5); background: rgba(var(--accent-rgb), .06); color: var(--accent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; transition: all .18s ease; }
.asset-pick-btn:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), .14); }
.asset-pick-btn svg { width: 17px; height: 17px; }
.asset-pick-btn span { font-size: var(--t-fs-cap); }
.req-star { color: var(--accent); font-weight: 500; font-size: var(--t-fs-sm); margin-left: 2px; line-height: 1; }
.hidden { display: none !important; }
.upload-box.required { border-color: rgba(var(--accent-rgb), .72); background: rgba(var(--accent-rgb), .08); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .08); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
/* 单行横向滚动：参考图固定在输入框上方，数量再多也不会把输入框挤没 */
.thumbs { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; flex: 1; min-width: 0; padding: 2px 2px 4px; scrollbar-width: thin; scrollbar-color: rgba(var(--accent-rgb),.45) transparent; }
.thumbs::-webkit-scrollbar { height: 5px; }
.thumbs::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb),.45); border-radius: 4px; }
.thumb { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 9px; overflow: hidden; position: relative; border: 1px solid var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-label { position: absolute; left: 3px; bottom: 3px; padding: 2px 5px; border-radius: 5px; background: rgba(10,9,8,.82); color: var(--accent); font-size: var(--t-fs-sm); font-weight: 700; line-height: 1; border: 1px solid rgba(var(--accent-rgb),.3); pointer-events: none; }
.thumb button { position: absolute; right: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(8, 11, 18, .8); color: #fff; display: grid; place-items: center; padding: 0; }
.thumb button svg { width: 11px; height: 11px; }
.thumb button:hover { background: var(--danger); }
/* 参考图堆叠：多张时叠成一摞（像实体照片），悬停展开平铺，点单张把 @图N 插回提示词
   对标官方画布的「参考图框」手感；hover 大图预览由 .mention-preview 承担。 */
.thumbs.stacked { gap: 0; overflow-x: visible; align-items: center; padding-left: 6px; }
.thumbs.stacked .thumb {
  margin-left: -34px; cursor: pointer; z-index: 1;
  border: 2px solid var(--panel, #161412);
  box-shadow: 0 3px 12px rgba(0,0,0,.42);
  transition: transform .18s ease, margin-left .18s ease, z-index 0s;
  transform: rotate(-3deg);
}
.thumbs.stacked .thumb:nth-child(2n) { transform: rotate(2deg); }
.thumbs.stacked .thumb:first-child { margin-left: 0; }
.thumbs.stacked .thumb:nth-child(1) { z-index: 9; }
.thumbs.stacked .thumb:nth-child(2) { z-index: 8; }
.thumbs.stacked .thumb:nth-child(3) { z-index: 7; }
.thumbs.stacked .thumb:nth-child(4) { z-index: 6; }
.thumbs.stacked .thumb:nth-child(5) { z-index: 5; }
.thumbs.stacked:hover .thumb { margin-left: 6px; transform: rotate(0); }
.thumbs.stacked .thumb:hover { z-index: 12; transform: translateY(-4px) scale(1.06); border-color: var(--accent); }
/* 参考音色：与参考图同处生成栏，用波形色块与 @音色N 标签与图片区分 */
.voice-ref-row { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 2px 0 6px; }
.voice-ref-btn { flex: 0 0 auto; }
.voice-thumbs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; min-width: 0; flex: 1; scrollbar-width: thin; }
.voice-thumb { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: rgba(var(--accent-rgb), .08); color: var(--text); font-size: var(--t-fs-sm); white-space: nowrap; }
.voice-thumb button { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: rgba(8, 11, 18, .55); color: #fff; display: grid; place-items: center; }
.voice-thumb button svg { width: 11px; height: 11px; }
.voice-thumb button:hover { background: var(--danger); }
.prompt-area { flex: 1; min-width: 0; position: relative; }
.prompt-area textarea { width: 100%; min-height: 68px; max-height: 180px; resize: vertical; border: 0; outline: 0; background: transparent; font-size: var(--t-fs-sm); line-height: 1.65; padding: 4px 4px 0; }
.prompt-area textarea::placeholder { color: #8a8070; }
.prompt-meta { display: flex; gap: 7px; font-size: var(--t-fs-sm); color: var(--muted-2); padding: 0 4px; flex-wrap: wrap; }

/* @ 参考图锚点选择弹层 */
.mention-pop {
  position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 90;
  width: 300px; max-height: 260px; overflow-y: auto;
  background: linear-gradient(160deg, #171d27, #0e131b);
  border: 1px solid rgba(var(--accent-rgb), .35); border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 0 1px rgba(var(--accent-rgb),.06) inset;
  padding: 6px; color: var(--text);
}
.mention-pop[hidden] { display: none; }
.mention-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px 8px; font-size: var(--t-fs-sm); color: var(--accent); border-bottom: 1px solid rgba(var(--accent-rgb),.16); margin-bottom: 4px; }
.mention-head svg { width: 14px; height: 14px; }
.mention-head small { margin-left: auto; color: var(--muted-2); font-size: var(--t-fs-sm); }
.mention-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 7px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.mention-item:hover, .mention-item.active { background: rgba(var(--accent-rgb), .13); }
.mention-item img { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 7px; object-fit: cover; border: 1px solid var(--border); }
.mention-item .m-label { font-size: var(--t-fs-sm); font-weight: 700; color: var(--accent); }
.mention-item .m-name { display: block; font-size: var(--t-fs-sm); color: var(--muted-2); max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-empty { padding: 14px 10px; font-size: var(--t-fs-sm); color: var(--muted-2); text-align: center; line-height: 1.6; }

/* 全屏拖放遮罩 */
.drop-mask { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; background: rgba(10, 9, 8, .82); backdrop-filter: blur(6px); }
.drop-mask.show { display: flex; }
.drop-mask-inner { border: 2px dashed rgba(var(--accent-rgb), .6); border-radius: 20px; padding: 48px 72px; text-align: center; background: rgba(26, 24, 21, .9); box-shadow: 0 24px 70px rgba(0,0,0,.6); }
.drop-mask-inner svg { width: 54px; height: 54px; color: var(--accent); }
.drop-mask-inner h3 { margin: 16px 0 6px; font-size: 20px; color: var(--text); font-weight: 700; }
.drop-mask-inner p { margin: 0; font-size: var(--t-fs-sm); color: var(--muted-2); }
.dialogue-block { margin-top: 9px; border: 1px solid rgba(52,211,153,.28); background: rgba(52,211,153,.04); border-radius: 9px; padding: 8px 10px 7px; }
.dialogue-label { display: flex; align-items: center; gap: 5px; font-size: var(--t-fs-sm); color: var(--color-success); }
.dialogue-label svg { width: 13px; height: 13px; }
.dialogue-label b { font-weight: 600; }
.dialogue-optional { font-size: var(--t-fs-sm); color: var(--muted-2); font-weight: 400; }
.dialogue-block textarea { width: 100%; min-height: 40px; max-height: 110px; resize: vertical; border: 0; outline: 0; background: transparent; font-size: var(--t-fs-sm); line-height: 1.6; padding: 5px 2px 0; color: var(--text); }
.dialogue-block textarea::placeholder { color: #8a8070; }
.dialogue-meta { display: flex; align-items: center; gap: 7px; font-size: var(--t-fs-sm); color: var(--muted-2); padding: 2px 2px 0; flex-wrap: wrap; }
.dialogue-meta #applyDurationBtn { margin-left: auto; border: 1px solid rgba(52,211,153,.5); color: var(--color-success); background: rgba(52,211,153,.08); border-radius: 5px; font-size: var(--t-fs-sm); padding: 3px 8px; cursor: pointer; }
.dialogue-meta #applyDurationBtn:hover { background: rgba(52,211,153,.18); }
.dialogue-meta .duration-warn { color: #fbbf24; }
body.light .dialogue-block { background: #f2fbf7; border-color: #a7e2cb; }
body.light .dialogue-label { color: #0f9d6e; }
body.light .dialogue-meta #applyDurationBtn { color: #0f9d6e; }
body.light .dialogue-meta .duration-warn { color: #b45309; }
.meta-sep { opacity: .5; }

.toolbar { display: flex; align-items: center; gap: 7px; padding: 10px 14px 12px; border-top: 1px solid var(--border-soft); flex-wrap: wrap; }
.tool { position: relative; }
.tool-btn { height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--border); background: #1f1d17; color: #cfc6b6; font-size: var(--t-fs-sm); white-space: nowrap; }
.tool-btn:hover, .tool.open .tool-btn { border-color: #574d39; background: #26231c; color: #fff; }
.tool-btn svg { width: 14px; height: 14px; color: var(--accent); }
.tool-btn .chev { width: 12px; height: 12px; color: var(--muted-2); margin-left: 2px; }
.tool-btn.icon-only { width: 32px; padding: 0; justify-content: center; }
/* 按次模型时长固定：保留按钮展示秒数，禁用切换但仍显示正常视觉 */
.tool.no-pop .tool-btn { opacity: 1; cursor: default; }
.tool.no-pop .tool-btn:hover { border-color: var(--border); background: #1f1d17; color: #cfc6b6; }
.tool.no-pop .tool-btn .chev { display: none; }
body.light .tool.no-pop .tool-btn, body.light .tool.no-pop .tool-btn:hover { background: #eef3fa; color: #334860; border-color: #d5e1ef; }
.toolbar-spacer { flex: 1; min-width: 4px; }
.cost { display: flex; align-items: center; gap: 5px; color: var(--yellow); font-size: var(--t-fs-sm); white-space: nowrap; }
.cost svg { width: 14px; height: 14px; }
.generate-btn {
  height: 34px; padding: 0 16px; border: 0; border-radius: 9px; font-size: var(--t-fs-sm); font-weight: 700;
  background: linear-gradient(110deg, var(--accent), #b89352); color: #fff; display: flex; align-items: center; gap: 6px;
  box-shadow: 0 5px 16px rgba(var(--accent-rgb), .28);
}
.generate-btn:hover { filter: brightness(1.1); }
.generate-btn:active { transform: translateY(1px); }
.generate-btn svg { width: 15px; height: 15px; }
.composer-tip { font-size: var(--t-fs-sm); color: #6b6355; margin-top: 9px; }

/* ---------- 弹出面板 ---------- */
.popover {
  display: none; position: absolute; bottom: calc(100% + 10px); left: 0; z-index: 60;
  width: 232px; padding: 13px; border-radius: 13px;
  background: #1d1b16; border: 1px solid #4a4130;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
  animation: pop-in .16s ease-out;
}
.tool.open .popover { display: block; }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.pop-head { padding: 0 2px 10px; border-bottom: 1px solid var(--border-soft); margin-bottom: 7px; }
.pop-head b { display: block; font-size: var(--t-fs-sm); margin-bottom: 3px; }
.pop-head span { display: block; font-size: var(--t-fs-sm); color: var(--muted-2); line-height: 1.5; }
.pop-list { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow-y: auto; }
.pop-option {
  width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 9px;
  border-radius: 7px; border: 0; background: transparent; text-align: left; font-size: var(--t-fs-sm);
}
.pop-option:hover:not(:disabled) { background: #27241d; }
.pop-option.selected { background: #2b281f; color: #fff; }
.pop-option:disabled { opacity: .38; cursor: not-allowed; }
.pop-option .opt-label { flex: 1; }
.pop-option .opt-note { font-size: var(--t-fs-sm); color: var(--muted-2); }
.pop-option .opt-check { width: 15px; height: 15px; color: var(--accent); opacity: 0; }
.pop-option.selected .opt-check { opacity: 1; }
.pop-custom { border-top: 1px solid var(--border-soft); margin-top: 8px; padding-top: 10px; }
.pop-custom > span { font-size: var(--t-fs-sm); color: var(--muted); display: block; margin-bottom: 7px; }
.custom-row { display: flex; gap: 7px; }
.custom-row input { flex: 1; min-width: 0; height: 30px; border-radius: 7px; border: 1px solid var(--border); background: #17150f; padding: 0 9px; outline: 0; font-size: var(--t-fs-sm); }
.custom-row input:focus { border-color: var(--accent); }
.custom-row button { height: 30px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--border); background: #2b281f; font-size: var(--t-fs-sm); }
.custom-row button:hover { background: #31425c; }
.pop-duration { width: 310px; }
.pop-dubbing { width: 320px; }
.dubbing-panel { padding-top: 4px; }
.dub-switch-row { display: flex; align-items: center; justify-content: space-between; font-size: var(--t-fs-sm); color: var(--text); padding: 8px 0; cursor: pointer; }
.dub-switch-row input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.dub-status { font-size: var(--t-fs-sm); color: var(--muted); background: rgba(var(--accent-rgb),.07); border: 1px solid var(--border-soft); border-radius: 7px; padding: 6px 8px; margin-bottom: 10px; line-height: 1.5; }
.dub-status.ready { color: var(--color-success); }
.dub-status.error { color: #f87171; }
.dub-field { margin-bottom: 10px; }
.dub-field label { display: block; font-size: var(--t-fs-sm); color: var(--muted); margin-bottom: 5px; }
.dub-field textarea, .dub-field select { width: 100%; border-radius: 7px; border: 1px solid var(--border); background: #17150f; color: var(--text); padding: 7px 9px; font-size: var(--t-fs-sm); outline: 0; resize: vertical; font-family: inherit; }
.dub-field textarea:focus, .dub-field select:focus { border-color: var(--accent); }
.dub-use-prompt { font-size: var(--t-fs-sm); color: var(--accent); background: none; border: 0; padding: 4px 0 0; cursor: pointer; }
.dub-use-prompt:hover { text-decoration: underline; }
body.light .dub-status { background: #eef6ff; border-color: #d5e1ef; }
body.light .dub-status.ready { color: #0f9d6e; }
body.light .dub-field textarea, body.light .dub-field select { background: #fff; color: #232019; border-color: #d5e1ef; }
.duration-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.duration-cell { height: 34px; border-radius: 7px; border: 1px solid var(--border); background: #221f19; font-size: var(--t-fs-sm); color: #cfc6b6; }
.duration-cell:hover { border-color: #5e523b; }
.duration-cell.selected { background: rgba(var(--accent-rgb), .18); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.ratio-icon { width: 17px; height: 17px; border: 1.6px solid currentColor; border-radius: 2px; flex: 0 0 auto; }
.pop-mode { width: 268px; }
.mode-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.mode-dot.auto { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

/* ---------- 任务抽屉 ---------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(3, 6, 12, .6); opacity: 0; pointer-events: none; transition: opacity .22s ease; z-index: 80; }
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.task-drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: clamp(520px, 56vw, 760px); max-width: 94vw; z-index: 90;
  background: #15130f; border-left: 1px solid #373126; box-shadow: -20px 0 60px rgba(0, 0, 0, .5);
  transform: translateX(102%); transition: transform .25s ease; display: flex; flex-direction: column;
}
.task-drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 14px; border-bottom: 1px solid var(--border-soft); }
.drawer-head h3 { margin: 0; font-size: 15px; }
.drawer-head span { font-size: var(--t-fs-sm); color: var(--muted-2); }
.drawer-head-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.drawer-head-actions .ghost-btn { display: inline-flex; align-items: center; gap: 6px; }
.drawer-head-actions .ghost-btn svg { width: 13px; height: 13px; }
.task-list { flex: 1; overflow-y: auto; padding: 14px; }
.task-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.task-summary > div { border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2); padding: 8px 4px; text-align: center; }
.task-summary b { display: block; font-size: 15px; line-height: 1.2; }
.task-summary span { display: block; font-size: var(--t-fs-sm); color: var(--muted-2); margin-top: 3px; }
.task-summary .done b, .task-group-counts .done { color: var(--green); }
.task-summary .failed b, .task-group-counts .failed { color: var(--danger); }
.task-summary .active b, .task-group-counts .active { color: var(--accent); }
.task-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 2px 9px; padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); }
.task-group-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.task-group-title svg { width: 14px; height: 14px; color: var(--accent); flex: 0 0 14px; }
.task-group-title b { font-size: var(--t-fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-group-counts { display: flex; gap: 8px; flex: 0 0 auto; }
.task-group-counts span { font-size: var(--t-fs-sm); color: var(--muted-2); white-space: nowrap; }
.task-batch-dl { display: flex; align-items: center; gap: 4px; border: 1px solid rgba(var(--accent-rgb), .45); background: rgba(var(--accent-rgb), .08); color: var(--accent); border-radius: 6px; padding: 4px 8px; font-size: var(--t-fs-sm); cursor: pointer; white-space: nowrap; }
.task-batch-dl:hover:not(:disabled) { background: rgba(var(--accent-rgb), .16); }
.task-batch-dl:disabled { opacity: .45; cursor: not-allowed; }
.task-batch-dl svg { width: 12px; height: 12px; }
.empty-tasks { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted-2); text-align: center; }
.empty-tasks svg { width: 38px; height: 38px; margin-bottom: 12px; opacity: .45; }
.empty-tasks p { margin: 0 0 4px; font-size: var(--t-fs-sm); color: var(--muted); }
.empty-tasks span { font-size: var(--t-fs-sm); }
.task-card { border: 1px solid var(--border); background: var(--panel); border-radius: 11px; padding: 12px; margin-bottom: 10px; }
.task-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.task-status { font-size: var(--t-fs-sm); padding: 2px 7px; border-radius: 5px; background: rgba(251, 191, 36, .14); color: var(--yellow); }
.task-status.doing { background: rgba(var(--accent-rgb), .14); color: var(--accent); }
.task-status.done { background: rgba(52, 211, 153, .14); color: var(--green); }
.task-status.cancelled { background: rgba(176, 164, 140, .14); color: var(--muted); }
.task-time { margin-left: auto; font-size: var(--t-fs-sm); color: var(--muted-2); }
.task-prompt { font-size: var(--t-fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 8px; }
.task-line { display: flex; align-items: flex-start; gap: 10px; }
.task-line-main { flex: 1; min-width: 0; }
.task-thumb { position: relative; flex: 0 0 76px; width: 76px; height: 56px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel-2); cursor: zoom-in; }
.task-thumb:hover { z-index: 80; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .28); }
.task-thumb-inner { position: absolute; inset: 0; border-radius: 6px; overflow: hidden; }
.task-thumb img, .task-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.task-thumb-badge { position: absolute; left: 4px; bottom: 4px; z-index: 2; font-size: var(--t-fs-cap); line-height: 15px; padding: 0 5px; border-radius: 4px; color: #fff; background: rgba(0,0,0,.62); pointer-events: none; }
.task-thumb-empty { cursor: default; border-style: dashed; }
.task-thumb-empty:hover { border-color: var(--border); box-shadow: none; }
.task-thumb-empty .task-thumb-inner { display: flex; align-items: center; justify-content: center; color: var(--muted-2); }
.task-thumb-empty svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.6; }
/* 悬停放大：使用 body 下的独立 fixed 浮层，不受抽屉 overflow 裁剪，图片/视频完整显示 */
.thumb-hover-preview { position: fixed; z-index: 130; display: none; width: min(480px, 42vw); max-height: 70vh; padding: 6px; border-radius: 12px; border: 1px solid rgba(var(--accent-rgb), .55); background: var(--panel-2); box-shadow: 0 18px 54px rgba(0,0,0,.55); pointer-events: none; }
.thumb-hover-preview.show { display: block; }
.thumb-hover-preview img, .thumb-hover-preview video { display: block; width: 100%; max-height: calc(70vh - 12px); object-fit: contain; border-radius: 8px; background: #0b0b0b; }
@media (max-width: 900px) { .thumb-hover-preview { width: min(360px, 76vw); } }
.task-images { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 9px; }
.task-images span { position: relative; width: 42px; height: 42px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.task-ref-zoom { cursor: zoom-in; transition: border-color .15s, box-shadow .15s; }
.task-ref-zoom:hover { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .28); z-index: 80; }
.task-images img { width: 100%; height: 100%; object-fit: cover; display: block; }
.task-images em { position: absolute; left: 0; right: 0; bottom: 0; font-style: normal; font-size: var(--t-fs-cap); text-align: center; color: #fff; background: rgba(0,0,0,.62); line-height: 15px; }
.task-params { display: flex; flex-wrap: wrap; gap: 5px; }
.task-params span { font-size: var(--t-fs-sm); color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; }
.task-progress { height: 4px; border-radius: 4px; background: #373126; overflow: hidden; margin-top: 10px; }
.task-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .5s ease; }
.task-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.task-actions button { border: 0; background: transparent; color: var(--muted-2); font-size: var(--t-fs-sm); display: flex; align-items: center; gap: 4px; }
.task-actions button:hover { color: var(--danger); }
.task-actions svg { width: 12px; height: 12px; }
.download-link { display: flex; align-items: center; gap: 4px; font-size: var(--t-fs-sm); color: var(--accent); text-decoration: none; border: 1px solid rgba(var(--accent-rgb), .4); border-radius: 6px; padding: 5px 9px; }
.download-link:hover { background: rgba(var(--accent-rgb), .12); }
.task-dialogue { display: flex; align-items: flex-start; gap: 5px; margin-top: 6px; font-size: var(--t-fs-sm); line-height: 1.5; color: var(--color-success); background: rgba(52,211,153,.07); border-radius: 6px; padding: 5px 8px; }
.task-dialogue svg { width: 12px; height: 12px; flex: 0 0 auto; margin-top: 2px; }
body.light .task-dialogue { color: #0f9d6e; background: #effaf4; }
.task-note { margin-top: 9px; font-size: var(--t-fs-sm); line-height: 1.5; color: var(--muted-2); }
.task-note.error { color: var(--danger); }
.api-status-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.api-status-card { border: 1px solid var(--border); border-radius: 9px; padding: 10px; background: var(--panel-2); }
.api-status-card b { display: block; font-size: var(--t-fs-sm); }
.api-status-card span { display: block; font-size: var(--t-fs-sm); margin-top: 4px; }
.api-status-card.ready span { color: var(--green); }
.api-status-card.notready span { color: var(--muted-2); }
.api-status-card .active { color: var(--accent); font-size: var(--t-fs-sm); }
.config-editor { border: 1px solid var(--border); border-radius: 11px; padding: 13px; background: var(--panel-2); }
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.config-block h4 { margin: 0 0 8px; font-size: var(--t-fs-sm); }
.config-block.featured { border: 1px solid var(--accent); border-radius: 10px; padding: 12px; background: rgba(var(--accent-rgb),.05); }
.config-block h4 em { font-style: normal; font-size: var(--t-fs-cap); color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 1px 5px; margin-left: 6px; }
.config-hint { font-size: var(--t-fs-sm); color: var(--muted-2); line-height: 1.5; margin: 6px 0 0; }
.download-link.dubbed { color: var(--color-success); border-color: rgba(52,211,153,.4); }
.download-link.muted-link { color: var(--muted-2); border-color: var(--border); }
.download-link.muted-link:hover { color: var(--text); background: rgba(127,140,170,.1); }
body.light .config-block.featured { background: #f0f8ff; }
body.light .download-link.dubbed { color: #0f9d6e; }
.check-line { display: flex; align-items: center; gap: 7px; font-size: var(--t-fs-sm); color: var(--muted); margin-bottom: 6px; }
.check-line input { accent-color: var(--accent); }
.config-editor .field { margin-top: 8px; }
.route-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.route-grid label { display: flex; align-items: center; gap: 7px; font-size: var(--t-fs-sm); color: var(--muted); }
.route-grid label span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-grid select { border: 1px solid var(--border); background: var(--panel); border-radius: 6px; padding: 5px 6px; font-size: var(--t-fs-sm); outline: 0; }

/* ---------- 提示 ---------- */
.toast-stack { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #232019; border: 1px solid #3b4d68; color: #e2e9f2; border-radius: 9px; padding: 9px 15px; font-size: var(--t-fs-sm); box-shadow: var(--shadow); animation: toast-in .22s ease-out; }
.toast.error { border-color: rgba(251, 113, 133, .5); color: #fecdd3; }
.toast.success { border-color: rgba(52, 211, 153, .5); color: #a7f3d0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 质感优化 ---------- */
.sidebar { position: relative; }
.sidebar::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent); opacity: .65; }
/* 背景点阵网格：置于星轨画布下方，中心清晰、边缘渐隐，三套主题均可见 */
.main::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .82; background: radial-gradient(circle, rgba(var(--accent-rgb), .26) 1px, transparent 1.3px) 0 0 / 26px 26px, radial-gradient(ellipse 42% 34% at 18% 24%, rgba(var(--accent-rgb), .06), transparent 72%), radial-gradient(ellipse 38% 30% at 82% 70%, rgba(var(--accent-rgb), .05), transparent 72%); -webkit-mask-image: radial-gradient(ellipse 80% 74% at 50% 46%, #000 0%, rgba(0,0,0,.8) 52%, transparent 94%); mask-image: radial-gradient(ellipse 80% 74% at 50% 46%, #000 0%, rgba(0,0,0,.8) 52%, transparent 94%); }
.hero-title { background: linear-gradient(90deg, #faf1dc 10%, #e0c993 50%, #faf1dc 90%); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .14em; }
.composer:focus-within { border-color: rgba(var(--accent-rgb), .45); box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 0 3px rgba(var(--accent-rgb), .08); }
.generate-btn { position: relative; overflow: hidden; }
.generate-btn::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent); transform: skewX(-20deg); transition: left .55s ease; }
.generate-btn:hover::after { left: 120%; }
.sidebar-toggle { border-color: rgba(var(--accent-rgb), .28); color: var(--accent); }
.privacy-mode .thumb img { filter: blur(9px); }

/* ---------- 九宫格功能中心 ---------- */
.apps-panel {
  position: absolute; top: 52px; right: 18px; z-index: 75; display: none; flex-direction: column;
  width: 400px; max-height: calc(100vh - 84px); border-radius: 15px;
  background: #1a1814; border: 1px solid #32425c; box-shadow: 0 26px 70px rgba(0, 0, 0, .62);
  overflow: hidden; animation: pop-in .18s ease-out;
}
.apps-panel.open { display: flex; }
.apps-panel-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 15px; border-bottom: 1px solid var(--border-soft); }
.apps-panel-head b { font-size: 14px; display: block; }
.apps-panel-head span { font-size: var(--t-fs-sm); color: var(--muted-2); }
.apps-scroll { overflow-y: auto; padding: 6px 12px 14px; }
.apps-group { padding-top: 12px; }
.apps-group-title { display: flex; align-items: center; justify-content: space-between; padding: 0 3px 8px; }
.apps-group-title span { font-size: var(--t-fs-sm); font-weight: 600; color: #cfc6b6; }
.apps-group-title span::before { content: ""; display: inline-block; width: 3px; height: 11px; border-radius: 3px; background: var(--accent); margin-right: 7px; vertical-align: -1px; }
.apps-group-title em { font-style: normal; font-size: var(--t-fs-cap); letter-spacing: .1em; color: #7a7060; }
.apps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.apps-item {
  display: flex; align-items: center; gap: 8px; min-width: 0; text-align: left;
  padding: 9px; border-radius: 10px; border: 1px solid #373126; background: #1f1d17;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.apps-item:hover { transform: translateY(-1px); border-color: #574d39; background: #202c3e; }
.apps-item.wide { grid-column: span 2; }
.apps-item-ico { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; display: grid; place-items: center; }
.apps-item-ico svg { width: 16px; height: 16px; }
.apps-item-ico.blue { background: rgba(var(--accent-rgb), .14); color: var(--accent); }
.apps-item-ico.teal { background: rgba(45, 212, 191, .13); color: #5eead4; }
.apps-item-ico.indigo { background: rgba(201, 165, 92, .14); color: #e0c993; }
.apps-item-ico.amber { background: rgba(251, 191, 36, .13); color: #fcd34d; }
.apps-item-ico.orange { background: rgba(251, 146, 60, .14); color: #fdba74; }
.apps-item-ico.cyan { background: rgba(34, 211, 238, .13); color: var(--accent); }
.apps-item-ico.violet { background: rgba(var(--accent-rgb), .14); color: var(--accent); }
.apps-item-ico.rose { background: rgba(251, 113, 133, .13); color: #fda4af; }
.apps-item-ico.lime { background: rgba(163, 230, 53, .12); color: #bef264; }
.apps-item-ico.green { background: rgba(52, 211, 153, .13); color: #6ee7b7; }
.apps-item-text { min-width: 0; display: flex; flex-direction: column; }
.apps-item-text b { font-size: var(--t-fs-sm); font-weight: 600; white-space: nowrap; }
.apps-item-text small { font-size: var(--t-fs-sm); color: var(--muted-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apps-arrow { width: 14px; height: 14px; margin-left: auto; color: var(--muted-2); transform: rotate(-90deg); }
.apps-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); margin-left: 5px; vertical-align: 1px; }
.apps-dot[hidden] { display: none; }

/* ---------- 通用弹窗 ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 150; display: none; align-items: center; justify-content: center; background: rgba(3, 6, 12, .68); backdrop-filter: blur(5px); }
.modal-overlay.open { display: flex; }
.modal { width: min(620px, 92vw); max-height: 86vh; display: flex; flex-direction: column; border-radius: 17px; background: #171d27; border: 1px solid #394453; box-shadow: 0 30px 90px rgba(0, 0, 0, .6); animation: modal-in .2s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 17px 19px 14px; border-bottom: 1px solid var(--border-soft); }
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-head span { font-size: var(--t-fs-sm); color: var(--muted-2); }
.modal-body { padding: 18px 19px 20px; overflow-y: auto; }
.modal.variant-batch { width: min(820px, 94vw); }
.modal.variant-batch .modal-body { padding: 14px 18px 18px; }
.batch-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.batch-count { margin-left: auto; font-size: var(--t-fs-sm); color: var(--muted-2); }
.batch-groups { max-height: 54vh; overflow-y: auto; padding-right: 4px; }
.batch-group { margin-bottom: 14px; }
.batch-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.batch-group-head b { font-size: var(--t-fs-sm); color: var(--text); }
.batch-group-head span { font-size: var(--t-fs-cap); color: var(--muted-2); }
.batch-group-head button { margin-left: auto; border: 0; background: transparent; color: var(--accent); font-size: var(--t-fs-sm); cursor: pointer; }
.batch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.batch-item { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2); cursor: pointer; }
.batch-item:hover { border-color: rgba(var(--accent-rgb), .45); }
.batch-item input { width: 16px; height: 16px; flex: 0 0 16px; accent-color: var(--accent); }
.batch-thumb { width: 54px; height: 42px; flex: 0 0 54px; border-radius: 6px; overflow: hidden; background: var(--panel); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.batch-thumb img, .batch-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.batch-thumb svg { width: 18px; height: 18px; }
.batch-info { min-width: 0; flex: 1; }
.batch-info b { display: block; font-size: var(--t-fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-info small { display: block; font-size: var(--t-fs-cap); color: var(--muted-2); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.primary-btn:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 720px) { .batch-grid { grid-template-columns: 1fr; } }
.modal-tip { font-size: var(--t-fs-sm); color: var(--muted); line-height: 1.7; margin: 0 0 14px; }
.modal-tip.small { font-size: var(--t-fs-sm); text-align: center; color: var(--muted-2); margin: 12px 0 0; }
.modal-section { font-size: var(--t-fs-sm); font-weight: 600; margin: 18px 0 10px; padding-left: 8px; border-left: 3px solid var(--accent); }
.muted-center { text-align: center; color: var(--muted-2); padding: 24px; font-size: var(--t-fs-sm); }
.primary-btn { border: 0; border-radius: 8px; background: linear-gradient(110deg, var(--accent), #b89352); color: #fff; font-size: var(--t-fs-sm); font-weight: 600; padding: 9px 16px; }
.primary-btn:hover { filter: brightness(1.1); }
.primary-btn:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.5); }
.primary-btn.full { width: 100%; margin-top: 16px; height: 36px; }
.primary-btn.mini { padding: 6px 10px; font-size: var(--t-fs-sm); margin-top: 10px; }
.ghost-btn { border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); border-radius: 7px; font-size: var(--t-fs-sm); padding: 6px 11px; }
.ghost-btn:hover { color: var(--text); border-color: #574d39; }

.profile-head { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 11px; background: linear-gradient(100deg, rgba(var(--accent-rgb), .12), rgba(201, 165, 92, .07)); border: 1px solid rgba(var(--accent-rgb), .2); }
.profile-avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; font-size: 20px; font-weight: 700; }
.profile-meta { display: flex; flex-direction: column; }
.profile-meta b { font-size: 14px; }
.profile-meta span { font-size: var(--t-fs-sm); color: var(--muted); margin-top: 3px; }
.profile-credit { margin-left: auto; text-align: right; display: flex; flex-direction: column; }
.profile-credit small { font-size: var(--t-fs-sm); color: var(--muted-2); }
.profile-credit b { font-size: 16px; color: var(--yellow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 11px; }
.field > span { font-size: var(--t-fs-sm); color: var(--muted); }
.field input, .field textarea { width: 100%; border: 1px solid var(--border); background: var(--panel-2); border-radius: 8px; padding: 9px 10px; font-size: var(--t-fs-sm); outline: 0; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.record-list { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.record-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-bottom: 1px solid var(--border-soft); font-size: var(--t-fs-sm); }
.record-row:last-child { border-bottom: 0; }
.record-row > span:first-child { color: var(--muted-2); white-space: nowrap; }
.record-desc { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cfc6b6; }
.record-row b { color: var(--yellow); }

.device-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.device-row { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-bottom: 1px solid var(--border-soft); }
.device-row:last-child { border-bottom: 0; }
.device-ico { width: 32px; height: 32px; border-radius: 8px; background: rgba(var(--accent-rgb), .12); color: var(--accent); display: grid; place-items: center; }
.device-ico svg { width: 16px; height: 16px; }
.device-meta { display: flex; flex-direction: column; }
.device-meta b { font-size: var(--t-fs-sm); }
.device-meta em { font-style: normal; font-size: var(--t-fs-cap); color: var(--green); margin-left: 5px; }
.device-meta small { font-size: var(--t-fs-sm); color: var(--muted-2); margin-top: 2px; }
.device-current { margin-left: auto; font-size: var(--t-fs-sm); color: var(--green); }
.device-row .ghost-btn { margin-left: auto; }

.setting-row { display: flex; align-items: center; gap: 16px; padding: 15px; border: 1px solid var(--border); border-radius: 11px; background: var(--panel-2); }
.setting-row > div { flex: 1; }
.setting-row b { font-size: var(--t-fs-sm); }
.setting-row p { font-size: var(--t-fs-sm); color: var(--muted); line-height: 1.7; margin: 6px 0 0; }
.switch { position: relative; width: 42px; height: 23px; flex: 0 0 42px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: #374151; transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: linear-gradient(90deg, var(--accent), #b89352); }
.switch input:checked + span::after { transform: translateX(19px); }
.privacy-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 9px; background: rgba(201, 165, 92, .09); color: var(--muted); font-size: var(--t-fs-sm); }
.privacy-note svg { width: 15px; height: 15px; color: var(--accent-2); }

.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 520px) { .theme-grid { grid-template-columns: 1fr; } }
.theme-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: 11px; border: 1px solid var(--border); background: var(--panel-2); text-align: left; }
.theme-card:hover { border-color: #574d39; }
.theme-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .15); }
.theme-card b { font-size: var(--t-fs-sm); margin-top: 6px; }
.theme-card small { font-size: var(--t-fs-sm); color: var(--muted-2); }
.theme-preview { display: flex; gap: 4px; width: 100%; height: 62px; border-radius: 7px; padding: 7px; }
.theme-preview.dark { background: #0e0f11; }
.theme-preview.light { background: #f6f4ee; }
.theme-preview.green { background: #f2f7f4; }
.theme-preview i { border-radius: 4px; }
.theme-preview.dark i:nth-child(1) { background: #d6dde8; }
.theme-preview.light i:nth-child(1) { background: #b08a48; }
.theme-preview.green i:nth-child(1) { background: #0f9d6e; }
.theme-preview i:nth-child(2) { width: 46%; background: rgba(140, 140, 140, .25); }
.theme-preview i:nth-child(3) { width: 26%; background: rgba(140, 140, 140, .45); }

.checkin-banner { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 11px; background: linear-gradient(100deg, rgba(251, 191, 36, .16), rgba(251, 146, 60, .06)); border: 1px solid rgba(251, 191, 36, .3); }
.checkin-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(251, 191, 36, .18); color: var(--yellow); }
.checkin-banner b { font-size: var(--t-fs-sm); }
.checkin-banner p { margin: 4px 0 0; font-size: var(--t-fs-sm); color: var(--muted); }
.checkin-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 16px; }
.checkin-day { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 2px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel-2); color: var(--muted-2); }
.checkin-day span { font-size: var(--t-fs-sm); }
.checkin-day svg { width: 16px; height: 16px; }
.checkin-day.done { color: var(--green); border-color: rgba(52, 211, 153, .3); }
.checkin-day.today { border-color: var(--yellow); color: var(--yellow); background: rgba(251, 191, 36, .1); }

.chat-box { height: 240px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: rgba(0, 0, 0, .12); }
.cs-msg { max-width: 78%; padding: 8px 11px; border-radius: 10px; font-size: var(--t-fs-sm); line-height: 1.6; margin-bottom: 9px; }
.cs-msg.bot { background: var(--panel-3); border-top-left-radius: 3px; }
.cs-msg.me { margin-left: auto; background: linear-gradient(110deg, var(--accent), #b89352); color: #fff; border-top-right-radius: 3px; }
.cs-input { display: flex; gap: 8px; margin-top: 10px; }
.cs-input input { flex: 1; min-width: 0; border: 1px solid var(--border); background: var(--panel-2); border-radius: 8px; padding: 8px 10px; outline: 0; font-size: var(--t-fs-sm); }
.cs-input input:focus { border-color: var(--accent); }

.faq-list details { border: 1px solid var(--border); border-radius: 9px; margin-bottom: 8px; overflow: hidden; }
.faq-list summary { cursor: pointer; padding: 11px 13px; font-size: var(--t-fs-sm); font-weight: 600; background: var(--panel-2); }
.faq-list p { margin: 0; padding: 11px 13px; font-size: var(--t-fs-sm); color: var(--muted); line-height: 1.75; }
.msg-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.msg-row { width: 100%; display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px; border: 0; border-bottom: 1px solid var(--border-soft); background: transparent; }
.msg-row:last-child { border-bottom: 0; }
.msg-row:hover { background: var(--panel-2); }
.msg-dot { width: 7px; height: 7px; border-radius: 50%; background: transparent; margin-top: 5px; flex: 0 0 7px; }
.msg-row.unread .msg-dot { background: var(--accent); }
.msg-row b { font-size: var(--t-fs-sm); }
.msg-row p { font-size: var(--t-fs-sm); color: var(--muted); margin: 4px 0; }
.msg-row small { font-size: var(--t-fs-sm); color: var(--muted-2); }
.group-box { display: flex; gap: 18px; align-items: center; }
.qr-placeholder { width: 132px; height: 132px; flex: 0 0 132px; border-radius: 10px; background: repeating-conic-gradient(#e2e9f2 0% 25%, var(--color-white) 0% 50%) 0 0 / 12px 12px; border: 6px solid #fff; display: grid; place-items: center; }
.qr-logo { width: 38px; height: 38px; border-radius: 9px; background: #14120e; display: grid; place-items: center; }
.qr-logo svg { width: 26px; height: 26px; }
.group-info b { font-size: 14px; }
.group-info p { font-size: var(--t-fs-sm); color: var(--accent); margin: 8px 0; }
.group-info small { display: block; font-size: var(--t-fs-sm); color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.feedback-types { display: flex; gap: 8px; }
.feedback-type { border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); border-radius: 8px; padding: 7px 15px; font-size: var(--t-fs-sm); }
.feedback-type.selected { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb), .1); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.price-table { width: 100%; border-collapse: collapse; font-size: var(--t-fs-sm); min-width: 540px; }
.price-table th { text-align: left; padding: 9px 10px; background: var(--panel-2); color: var(--muted); font-weight: 600; }
.price-table td { padding: 9px 10px; border-top: 1px solid var(--border-soft); color: #cfc6b6; }
.price-table td b { display: block; }
.price-table td small { color: var(--muted-2); font-size: var(--t-fs-sm); }
.api-grid { display: flex; flex-direction: column; }
.api-endpoint { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; background: var(--panel-2); }
.api-endpoint span { font-size: var(--t-fs-sm); font-weight: 700; color: var(--green); }
.api-endpoint code { font-size: var(--t-fs-sm); word-break: break-all; }
.modal-tip code { background: var(--panel-3); padding: 1px 5px; border-radius: 4px; font-size: var(--t-fs-sm); }
.code-block { margin: 0; padding: 14px; border-radius: 10px; background: #13110d; border: 1px solid #373126; overflow-x: auto; }
.code-block code { font-size: var(--t-fs-sm); line-height: 1.7; color: var(--accent); white-space: pre; }
.api-actions { display: flex; gap: 8px; margin-top: 10px; }
.asset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.asset-card { display: flex; flex-direction: column; text-align: left; border: 1px solid var(--border); background: var(--panel-2); border-radius: 10px; padding: 7px; }
.asset-card:hover { border-color: var(--accent); }
.asset-thumb { height: 72px; border-radius: 7px; display: grid; place-items: center; color: #fff; }
.asset-thumb svg { width: 22px; height: 22px; }
.asset-card b { font-size: var(--t-fs-sm); margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-card small { font-size: var(--t-fs-sm); color: var(--muted-2); }
.asset-empty { display: flex; flex-direction: column; align-items: center; padding: 30px 0; color: var(--muted-2); }
.asset-empty svg { width: 36px; height: 36px; opacity: .5; margin-bottom: 10px; }
.asset-empty b { font-size: var(--t-fs-sm); color: var(--muted); }
.asset-empty span { font-size: var(--t-fs-sm); margin: 5px 0 14px; }
.client-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.client-card { position: relative; display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--border); background: var(--panel-2); border-radius: 11px; }
.client-ico { width: 36px; height: 36px; border-radius: 9px; background: rgba(var(--accent-rgb), .12); color: var(--accent); display: grid; place-items: center; }
.client-card b { font-size: var(--t-fs-sm); margin-top: 10px; }
.client-card small { font-size: var(--t-fs-sm); color: var(--muted); margin-top: 4px; }
.client-card em { position: absolute; top: 12px; right: 12px; font-style: normal; font-size: var(--t-fs-cap); color: var(--yellow); background: rgba(251, 191, 36, .13); padding: 2px 6px; border-radius: 4px; }
.notice-row { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.notice-row:last-child { border-bottom: 0; }
.notice-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.notice-tag { font-size: var(--t-fs-sm); color: var(--accent); background: rgba(var(--accent-rgb), .12); border-radius: 4px; padding: 2px 6px; }
.notice-head time { font-size: var(--t-fs-sm); color: var(--muted-2); }
.notice-row b { font-size: var(--t-fs-sm); }
.notice-row p { font-size: var(--t-fs-sm); color: var(--muted); line-height: 1.7; margin: 5px 0 0; }

/* ---------- 页面与切换动画 ---------- */
.topbar, .page-view, .stage, .chat-view, .audio-view, .composer-wrap { transition: opacity .18s ease, transform .24s cubic-bezier(.2,.8,.2,1), filter .24s ease; }
.main.page-switching .topbar,
.main.page-switching .page-view,
.main.page-switching .stage,
.main.page-switching .chat-view,
.main.page-switching .audio-view,
.main.page-switching .composer-wrap { opacity: 0; transform: translateY(14px) scale(.99); filter: blur(3px); }
.main.page-entering .page-view,
.main.page-entering .stage,
.main.page-entering .chat-view,
.main.page-entering .audio-view,
.main.page-entering .composer-wrap { animation: qnPageIn .42s cubic-bezier(.2,.8,.2,1) both; }
@keyframes qnPageIn {
  from { opacity: 0; transform: translateY(20px) scale(.985); filter: blur(7px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.page-view { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 34px 42px 44px; position: relative; z-index: 1; }
.page-shell { width: min(1180px, 100%); margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.page-kicker { display: block; font-size: var(--t-fs-sm); letter-spacing: .22em; color: var(--accent); margin-bottom: 6px; }
.page-head h2 { margin: 0; font-size: 24px; letter-spacing: .02em; color: var(--text); }
.page-sub { font-size: var(--t-fs-sm); color: var(--muted); margin: 10px 0 24px; }
.page-action { height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid rgba(var(--accent-rgb),.42); background: linear-gradient(110deg, rgba(var(--accent-rgb),.2), rgba(var(--accent-rgb),.06)); color: var(--accent); display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-fs-sm); font-weight: 600; }
.page-action svg { width: 14px; height: 14px; }
.page-action:hover { background: rgba(var(--accent-rgb),.24); }

/* ---------- 独立首页：全屏入口页 ---------- */
.landing { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; overflow: hidden; background: radial-gradient(ellipse 68% 60% at 50% 46%, #221c13 0%, #100e0b 58%, #080706 100%); color: #f4ead6; transition: opacity .3s ease, transform .3s ease, filter .3s ease; }
.landing[hidden] { display: none; }
.landing.leaving { opacity: 0; transform: scale(1.035); filter: blur(9px); pointer-events: none; }
.landing-glow { position: absolute; left: 50%; top: 47%; width: min(780px, 92vw); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb),.17), rgba(var(--accent-rgb),.05) 42%, transparent 70%); filter: blur(20px); animation: landingBreath 7s ease-in-out infinite alternate; }
@keyframes landingBreath { to { transform: translate(-50%, -50%) scale(1.14); opacity: .72; } }
/* 极光：canvas 绘制的柔性光带，像水一样缓慢流动 */
.landing-aurora { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; filter: blur(26px) saturate(138%); mix-blend-mode: screen; opacity: .95; -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 48%, transparent 0%, rgba(0,0,0,.28) 42%, #000 78%); mask-image: radial-gradient(ellipse 62% 58% at 50% 48%, transparent 0%, rgba(0,0,0,.28) 42%, #000 78%); }
.landing-stars { position: absolute; inset: -8%; opacity: .7; background-image: radial-gradient(1px 1px at 8% 14%, rgba(247,231,189,.8), transparent), radial-gradient(1px 1px at 22% 68%, rgba(247,231,189,.55), transparent), radial-gradient(1.5px 1.5px at 38% 22%, rgba(247,231,189,.7), transparent), radial-gradient(1px 1px at 54% 78%, rgba(247,231,189,.6), transparent), radial-gradient(1.5px 1.5px at 68% 32%, rgba(247,231,189,.75), transparent), radial-gradient(1px 1px at 82% 62%, rgba(247,231,189,.5), transparent), radial-gradient(1px 1px at 93% 18%, rgba(247,231,189,.65), transparent), radial-gradient(1.5px 1.5px at 14% 88%, rgba(247,231,189,.55), transparent); background-size: 100% 100%; animation: landingDrift 26s ease-in-out infinite alternate; }
@keyframes landingDrift { to { transform: translate3d(18px, -14px, 0); opacity: .95; } }
.landing-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px; }
.landing-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 38px; }
.landing-mark { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; border: 1px solid rgba(var(--accent-rgb),.42); background: linear-gradient(145deg, rgba(var(--accent-rgb),.2), rgba(var(--accent-rgb),.04)); box-shadow: 0 0 30px rgba(var(--accent-rgb),.16), inset 0 1px 0 rgba(255,255,255,.06); }
.landing-mark svg { width: 30px; height: 30px; color: #bfe0f7; filter: drop-shadow(0 0 10px rgba(236,215,164,.45)); }
.landing-name { font-size: 15px; letter-spacing: .14em; color: #dce5f2; }
.landing-name b { color: var(--accent); font-weight: 700; margin-left: 4px; }
.landing h1 { margin: 0 0 16px; font-size: clamp(36px, 5.4vw, 70px); line-height: 1.12; letter-spacing: .02em; font-weight: 760; color: #f8f0dd; text-shadow: 0 0 44px rgba(var(--accent-rgb),.15); }
.landing p { margin: 0; font-size: clamp(12px, 1.2vw, 15px); letter-spacing: .08em; color: #ad9f88; }
.landing-cta { position: relative; margin-top: 46px; height: 56px; min-width: 218px; padding: 0 28px; border: 1px solid rgba(247,231,189,.5); border-radius: 15px; background: linear-gradient(112deg, #d6e9f7 0%, var(--accent) 48%, var(--accent-2) 100%); color: #0b1420; font-size: 15px; font-weight: 780; letter-spacing: .06em; display: inline-flex; align-items: center; justify-content: center; gap: 12px; box-shadow: 0 18px 48px rgba(var(--accent-rgb),.32), inset 0 1px 0 rgba(255,255,255,.55); cursor: pointer; overflow: hidden; transition: transform .22s ease, box-shadow .22s ease; }
.landing-cta svg { width: 19px; height: 19px; transition: transform .22s ease; }
.landing-cta::after { content: ""; position: absolute; top: 0; left: -65%; width: 38%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-20deg); transition: left .7s ease; }
.landing-cta:hover { transform: translateY(-2px); box-shadow: 0 24px 60px rgba(var(--accent-rgb),.46), inset 0 1px 0 rgba(255,255,255,.65); }
.landing-cta:hover svg { transform: translateX(4px); }
.landing-cta:hover::after { left: 125%; }
.landing-hint { margin-top: 20px; font-size: var(--t-fs-sm); letter-spacing: .14em; color: #7f8da3; }
.landing-foot { position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; font-size: var(--t-fs-sm); letter-spacing: .16em; color: #68778e; }
body.show-landing .app { display: none; }
.app.studio-enter { animation: qnPageIn .46s cubic-bezier(.2,.8,.2,1) both; }

/* 星轨只在创作台出现，作品/素材库保持干净背景 */
.ambient-canvas { opacity: 0; transition: opacity .38s ease; }
body.page-create .ambient-canvas { opacity: 1; }

/* 我的作品 */
.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 14px; }
.works-grid > .empty-panel { grid-column: 1 / -1; min-height: 420px; }
.empty-panel { min-height: 330px; border: 1px dashed rgba(var(--accent-rgb),.18); border-radius: 14px; background: rgba(255,255,255,.018); display: grid; place-items: center; text-align: center; }
.empty-panel svg { width: 38px; height: 38px; margin: 0 auto 12px; color: #7e7465; }
.empty-panel b { display: block; font-size: 14px; color: #cabfa9; }
.empty-panel span { display: block; margin-top: 7px; font-size: var(--t-fs-sm); color: var(--muted-2); }
.empty-panel .ghost-btn { margin-top: 16px; }
.work-card { border: 1px solid rgba(var(--accent-rgb),.14); border-radius: 13px; overflow: hidden; background: rgba(255,255,255,.025); transition: transform .18s ease, border-color .18s ease; }
.work-card:hover { transform: translateY(-2px); border-color: rgba(var(--accent-rgb),.42); }
.work-thumb { aspect-ratio: 16 / 9; background: radial-gradient(circle at 50% 40%, rgba(var(--accent-rgb),.22), transparent 58%), linear-gradient(135deg,#1b1814,#0f0e0c); display: grid; place-items: center; overflow: hidden; position: relative; }
.work-thumb img, .work-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-thumb svg { width: 30px; height: 30px; color: #8d8069; }
.work-thumb em { position: absolute; right: 8px; bottom: 8px; font-style: normal; font-size: var(--t-fs-cap); padding: 2px 6px; border-radius: 5px; background: rgba(0,0,0,.55); color: #d9c291; }
.work-body { padding: 11px 12px 13px; }
.work-body b { display: block; font-size: var(--t-fs-sm); color: #ddd3c1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-body small { display: block; font-size: var(--t-fs-sm); color: var(--muted-2); margin-top: 5px; }
.work-download { margin-top: 10px; display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-fs-sm); color: var(--accent); text-decoration: none; }
.work-download svg { width: 12px; height: 12px; }
/* 作品页工具栏：类型 / 模型 / 排序 / 搜索 + 合计消耗 */
.works-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 8px; flex-wrap: wrap; }
/* 作者样式 display:flex 会盖掉 [hidden] 的 UA 样式，必须显式补一条，否则空作品页也会露出筛选器 */
.works-toolbar[hidden] { display: none; }
.works-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.works-filters button { padding: 6px 11px; border-radius: 8px; border: 1px solid var(--border-soft); background: rgba(255,255,255,.02); color: var(--muted); font-size: var(--t-fs-sm); }
.works-filters button.active { border-color: rgba(var(--accent-rgb),.42); color: var(--accent); background: rgba(var(--accent-rgb),.1); }
.works-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.works-tools select { height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border-soft); background: rgba(255,255,255,.03); color: var(--text-2, #ccc); font-size: var(--t-fs-sm); }
.works-search { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid var(--border-soft); border-radius: 8px; background: rgba(255,255,255,.02); color: var(--muted-2); }
.works-search svg { width: 13px; height: 13px; }
.works-search input { border: 0; outline: 0; background: transparent; width: 150px; font-size: var(--t-fs-sm); color: var(--text); }
.works-meta { font-size: var(--t-fs-sm); color: var(--muted-2); margin: 0 0 12px; }
.work-cost { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: var(--t-fs-cap); color: var(--accent); }
.work-cost svg { width: 11px; height: 11px; }
/* 模型卡：每秒单价 + 近 30 天成功率 */
.model-meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.model-price { font-style: normal; font-size: var(--t-fs-cap); color: #d9c291; white-space: nowrap; }
.model-stab { font-style: normal; font-size: var(--t-fs-cap); padding: 1px 5px; border-radius: 5px; white-space: nowrap; }
.model-stab.tone-ok { color: #6ee7a8; background: rgba(110,231,168,.1); }
.model-stab.tone-mid { color: #f0c674; background: rgba(240,198,116,.1); }
.model-stab.tone-low { color: #fb7185; background: rgba(251,113,133,.1); }
/* 生成前计费确认 */
.charge-sheet { border: 1px solid var(--border-soft); border-radius: 12px; padding: 6px 14px; background: rgba(255,255,255,.02); }
.charge-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed rgba(255,255,255,.06); font-size: var(--t-fs-sm); }
.charge-row:last-of-type { border-bottom: 0; }
.charge-row span { color: var(--muted-2); }
.charge-row b { font-weight: 600; color: var(--text); }
.charge-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 6px; padding: 12px 0 4px; border-top: 1px solid rgba(var(--accent-rgb),.24); }
.charge-total span { color: var(--muted-2); font-size: var(--t-fs-sm); }
.charge-total b { font-size: 18px; color: var(--accent); letter-spacing: .4px; }
.charge-note { margin: 10px 0 0; font-size: var(--t-fs-cap); color: var(--muted-2); line-height: 1.6; }

/* 素材库 */
.asset-drop { width: 100%; display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 13px; border: 1px dashed rgba(var(--accent-rgb),.32); background: rgba(var(--accent-rgb),.045); color: var(--text); text-align: left; }
.asset-drop:hover { background: rgba(var(--accent-rgb),.09); border-color: rgba(var(--accent-rgb),.6); }
.asset-drop > svg { width: 22px; height: 22px; color: var(--accent); transform: rotate(180deg); }
.asset-drop span { display: flex; flex-direction: column; }
.asset-drop b { font-size: var(--t-fs-sm); }
.asset-drop small { font-size: var(--t-fs-sm); color: var(--muted-2); margin-top: 4px; }
.asset-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 14px; }
.asset-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.asset-filters button { padding: 6px 11px; border-radius: 8px; border: 1px solid var(--border-soft); background: rgba(255,255,255,.02); color: var(--muted); font-size: var(--t-fs-sm); }
.asset-filters button.active { border-color: rgba(var(--accent-rgb),.42); color: var(--accent); background: rgba(var(--accent-rgb),.1); }
.asset-filters em { font-style: normal; opacity: .7; margin-left: 4px; }
.asset-search { height: 30px; min-width: 180px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,.02); color: var(--muted-2); }
.asset-search svg { width: 13px; height: 13px; }
.asset-search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: var(--t-fs-sm); }
.asset-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: 12px; }
.asset-card { border: 1px solid rgba(var(--accent-rgb),.13); border-radius: 12px; background: rgba(255,255,255,.025); overflow: hidden; }
.asset-preview { aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 45%, rgba(var(--accent-rgb),.16), transparent 60%), #14120f; }
.asset-preview img, .asset-preview video { width: 100%; height: 100%; object-fit: cover; }
.asset-preview svg { width: 28px; height: 28px; color: #9a8b73; }
.asset-card-body { padding: 9px 10px 11px; }
.asset-card-body b { display: block; font-size: var(--t-fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-card-body small { display: block; font-size: var(--t-fs-cap); color: var(--muted-2); margin-top: 4px; }
.asset-card-actions { display: flex; gap: 6px; margin-top: 9px; }
.asset-card-actions button { flex: 1; padding: 5px 6px; border-radius: 6px; border: 1px solid var(--border-soft); background: rgba(255,255,255,.03); color: var(--muted); font-size: var(--t-fs-sm); }
.asset-card-actions button:hover { color: var(--accent); border-color: rgba(var(--accent-rgb),.4); }
.asset-card-actions .asset-delete:hover { color: var(--danger); border-color: rgba(251,113,133,.4); }

/* 浅色主题适配 */
body.light .landing { background: radial-gradient(ellipse 68% 60% at 50% 46%, var(--color-white) 0%, #f4f7fc 58%, #e8eef7 100%); color: #1b2a40; }
body.light .landing-aurora { opacity: .3; filter: blur(62px) saturate(110%); }
body.light .landing h1 { color: #17233a; text-shadow: none; }
body.light .landing p { color: #53657d; }
body.light .landing-name { color: #31425a; }
body.light .landing-name b { color: var(--accent-2); }
body.light .landing-mark { background: linear-gradient(145deg, rgba(var(--accent-rgb),.22), rgba(var(--accent-rgb),.04)); border-color: rgba(163,124,52,.38); }
body.light .landing-mark svg { color: var(--accent-2); }
body.light .landing-hint { color: #7c8a9e; }
body.light .landing-foot { color: #8d9aab; }
body.light .work-thumb, body.light .asset-preview { background: radial-gradient(circle at 50% 40%, rgba(var(--accent-rgb),.2), transparent 58%), linear-gradient(135deg,#eef3fa,#dce6f3); }
body.light .work-body b, body.light .asset-card-body b { color: #24364d; }
body.light .empty-panel b { color: #24364d; }
body.light .asset-drop { background: #f6f9fd; }
body.light .asset-search { background: #f7fafe; }

/* ---------- 浅色主题基调标志 ----------
   body.light 只作为浅色适配规则的开关；具体配色变量由 body.theme-gold / body.theme-green 提供，
   避免旧变量在这里二次覆盖主题色。 */
body.light { --border-soft: rgba(30, 40, 20, .09); }
body.light .main { background: radial-gradient(ellipse 60% 45% at 50% 42%, rgba(var(--accent-rgb), .13), transparent 70%), var(--bg); }
body.light .main::before { opacity: .9; background: radial-gradient(circle, rgba(var(--accent-rgb), .3) 1px, transparent 1.3px) 0 0 / 26px 26px, radial-gradient(ellipse 42% 34% at 18% 24%, rgba(var(--accent-rgb), .07), transparent 72%), radial-gradient(ellipse 38% 30% at 82% 70%, rgba(var(--accent-rgb), .05), transparent 72%); }
body.light .search-box, body.light .custom-row input { background: #f7fafe; }
body.light .sidebar-footer { background: #f8fafd; }
body.light .intro-card { background: rgba(255, 255, 255, .9); border-color: #dbe5f1; box-shadow: 0 14px 40px rgba(30, 58, 95, .1); }
body.light .intro-card p { color: #53657d; }
body.light .intro-chip { color: #5c6f88; border-color: #dbe5f1; background: #f4f8fd; }
body.light .hero-title { background: linear-gradient(90deg, var(--accent-2) 10%, var(--accent-2) 50%, var(--accent-2) 90%); -webkit-background-clip: text; background-clip: text; }
body.light .composer { background: linear-gradient(160deg, var(--color-white), #f8fbff); }
body.light .tool-btn, body.light .tool.open .tool-btn { background: #eef3fa; color: #334860; border-color: #d5e1ef; }
body.light .tool-btn:hover { background: #e3ecf7; }
body.light .tool-btn svg { color: var(--accent-2); }
body.light .tool-btn .chev { color: #8092a8; }
body.light .popover { background: var(--color-white); border-color: #cbd9ea; box-shadow: 0 20px 50px rgba(30, 58, 95, .2); }
body.light .pop-option.selected { background: #e6f2fd; color: #6b5220; }
body.light .pop-option:hover:not(:disabled) { background: #f0f5fb; }
body.light .duration-cell { background: #f1f6fc; color: #334860; border-color: #d9e3f0; }
body.light .duration-cell.selected { background: #dbeefe; color: var(--accent-2); }
body.light .task-drawer { background: var(--color-white); }
body.light .apps-panel, body.light .modal { background: var(--color-white); border-color: #cbd9ea; box-shadow: 0 26px 70px rgba(30, 58, 95, .22); }
body.light .apps-item { background: #f6f9fd; border-color: #dce6f2; }
body.light .apps-item:hover { background: #edf4fc; border-color: #9dc4e8; }
body.light .apps-group-title span, body.light .apps-item-text b { color: #24364d; }
body.light .chat-box { background: #f7fafe; }
body.light .code-block { background: #142033; }
body.light .code-block code { color: var(--accent); }
body.light .qr-placeholder { background: repeating-conic-gradient(#dbe4ef 0% 25%, var(--color-white) 0% 50%) 0 0 / 12px 12px; }
body.light .model-card.active { background: linear-gradient(100deg, rgba(var(--accent-rgb), .14), rgba(201, 165, 92, .06)); }
body.light .group-tab { background: #f1f5fa; }
body.light .group-tab:hover { background: #e8eef6; }
body.light .model-group-empty { background: #f8fafd; }

@media (max-width: 900px) {
  /* 2026-12-02：原来这里把侧栏压成 72px 光轨、模型列表整块 display:none，
     浏览器放大到 150% 就「什么都看不见」。改成收窄 + 压缩说明文字，模型照常可选。 */
  :root { --qn-side-w: 246px; }
  .sidebar { width: var(--qn-side-w); flex-basis: var(--qn-side-w); }
  .brand-text span { display: none; }
  .model-name { font-size: 14px; }
  .model-desc { -webkit-line-clamp: 2; }
  .model-ico { width: 38px; height: 38px; flex: 0 0 38px; }
  .composer-wrap { padding: 0 12px 12px; }
  .thumbs { gap: 6px; }
  .page-view { padding: 24px 16px 32px; }
  .landing h1 { font-size: 48px; }
  .landing-cta { margin-top: 36px; height: 52px; min-width: 200px; }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .landing h1 { font-size: 48px; }
}

/* 矮屏适配：笔记本 / 缩放后高度不足时，收紧欢迎区，避免 logo 被裁或内容挤成一小块 */
@media (max-height: 760px) {
  .stage { padding: 14px 20px; }
  .hero-emblem { width: 82px; height: 82px; margin-bottom: 10px; }
  .hero-bird { width: 56px; height: 56px; }
  .hero-title { font-size: 15px; margin-bottom: 12px; }
  .intro-card { padding: 14px 18px; }
  .intro-card p { margin: 8px 0; }
}
@media (max-height: 640px) {
  .hero-emblem { width: 66px; height: 66px; margin-bottom: 6px; }
  .hero-bird { width: 46px; height: 46px; }
  .hero-title { font-size: 14px; margin-bottom: 8px; }
  .composer-wrap { padding-bottom: 10px; }
  .prompt-area textarea { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-stars, .landing-glow { animation: none !important; }
  .landing-aurora { opacity: .42; }
}

/* ============================================================
   专业管理控制台（Admin Console）—— 全屏独立黑金后台
   ============================================================ */

/* 左下角管理后台入口 */
.sidebar-admin-btn {
  display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 8px;
  padding: 9px 10px; border: 1px solid rgba(var(--accent-rgb), .22);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .1), rgba(var(--accent-rgb), .03));
  border-radius: 9px; color: var(--text); cursor: pointer; text-align: left; transition: .2s;
}
.sidebar-admin-btn:hover { border-color: var(--accent); background: linear-gradient(135deg, rgba(var(--accent-rgb), .2), rgba(var(--accent-rgb), .06)); }
.sa-ico { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: rgba(var(--accent-rgb), .16); color: var(--accent); }
.sa-ico svg { width: 16px; height: 16px; }
.sa-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sa-text b { font-size: var(--t-fs-sm); font-weight: 700; }
.sa-text small { font-size: var(--t-fs-sm); color: var(--muted); margin-top: 1px; }
.sa-arrow { width: 14px; height: 14px; color: var(--muted); flex: 0 0 14px; }
.sidebar.collapsed .sidebar-admin-btn { display: none; }

/* 控制台容器：默认隐藏 */
.admin-console { position: fixed; inset: 0; z-index: 400; display: none; }
.admin-console.open { display: block; }

/* 登录门 */
.ac-gate {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(1200px 700px at 50% 40%, #141a24 0%, #0e1116 62%);
}
.ac-gate::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(var(--accent-rgb),.035) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--accent-rgb),.035) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 45%, #000 0%, transparent 72%);
}
.ac-gate-card {
  position: relative; width: min(420px, 92vw); padding: 40px 38px 32px;
  background: linear-gradient(160deg, rgba(35,31,25,.96), rgba(20,18,15,.98));
  border: 1px solid rgba(var(--accent-rgb),.24); border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,.7), inset 0 1px 0 rgba(var(--accent-rgb),.08);
  text-align: center;
}
.ac-gate-logo { width: 58px; height: 58px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a1408; box-shadow: 0 8px 24px rgba(var(--accent-rgb),.28); }
.ac-gate-logo svg { width: 28px; height: 28px; }
.ac-gate-brand { font-size: var(--t-fs-sm); letter-spacing: 1.5px; color: var(--muted); font-weight: 600; }
.ac-gate-brand span { color: var(--accent); }
.ac-gate-card h2 { margin: 14px 0 6px; font-size: 24px; font-weight: 800; letter-spacing: 1px; }
.ac-gate-card > p { margin: 0 0 26px; font-size: var(--t-fs-sm); color: var(--muted); }
.ac-gate-form { display: flex; flex-direction: column; gap: 10px; }
.ac-gate-form input {
  width: 100%; min-width: 0; padding: 12px 14px; border-radius: 9px;
  border: 1px solid var(--border); background: #100f0d; color: var(--text); font-size: 14px; outline: none;
}
.ac-gate-form input:focus { border-color: var(--accent); }
.ac-remember {
  display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
  font-size: var(--t-fs-sm); color: var(--muted); margin: 2px 0 0;
}
.ac-remember input[type=checkbox] {
  flex: 0 0 auto; width: 15px; height: 15px; padding: 0; margin: 0;
  border-radius: 4px; border: 1px solid var(--border); background: #100f0d;
  accent-color: var(--accent); cursor: pointer;
}
.ac-remember:hover { color: var(--text); }
.ac-gate-btn {
  padding: 12px 20px; margin-top: 2px; border-radius: 9px; border: 0; cursor: pointer; white-space: nowrap;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a1408; font-weight: 800; font-size: var(--t-fs-sm);
}
.ac-gate-btn:hover { filter: brightness(1.08); }
.ac-gate-btn:disabled { opacity: .6; cursor: wait; }
.ac-gate-tip { margin-top: 16px; font-size: var(--t-fs-sm); color: var(--muted-2); }
.ac-gate-tip.error { color: var(--danger); }
.ac-gate-back { margin-top: 24px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: var(--t-fs-sm); }
.ac-gate-back:hover { color: var(--accent); }

/* 控制台主体 */
.ac-shell { position: absolute; inset: 0; display: flex; background: var(--bg); }
.ac-sidebar {
  width: 232px; flex: 0 0 232px; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #14120f, #0e0d0b); border-right: 1px solid var(--border);
}
.ac-brand { display: flex; align-items: center; gap: 11px; padding: 22px 20px; border-bottom: 1px solid var(--border-soft); }
.ac-brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a1408; }
.ac-brand-mark svg { width: 19px; height: 19px; }
.ac-brand b { display: block; font-size: 15px; letter-spacing: .5px; }
.ac-brand span { display: block; font-size: var(--t-fs-cap); letter-spacing: 2px; color: var(--accent); margin-top: 2px; }
.ac-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.ac-nav-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); cursor: pointer; font-size: var(--t-fs-sm); font-weight: 600; text-align: left; transition: .18s;
}
.ac-nav-item svg { width: 17px; height: 17px; }
.ac-nav-item:hover { background: rgba(var(--accent-rgb),.06); color: var(--text); }
.ac-nav-item.active { background: linear-gradient(135deg, rgba(var(--accent-rgb),.18), rgba(var(--accent-rgb),.06)); color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); }
.ac-sidebar-foot { padding: 16px 20px; border-top: 1px solid var(--border-soft); font-size: var(--t-fs-sm); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.ac-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

.ac-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-topbar {
  height: 64px; flex: 0 0 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; border-bottom: 1px solid var(--border); background: rgba(19,18,16,.7);
}
.ac-crumb { display: flex; align-items: center; gap: 10px; font-size: var(--t-fs-sm); color: var(--muted); }
.ac-crumb b { color: var(--text); font-size: 15px; }
.ac-crumb span::after { content: '/'; margin-left: 10px; color: var(--border); }
.ac-topbar-right { display: flex; align-items: center; gap: 10px; }
.ac-admin-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; background: rgba(var(--accent-rgb),.12); border: 1px solid rgba(var(--accent-rgb),.25); color: var(--accent); font-size: var(--t-fs-sm); font-weight: 700; }
.ac-admin-badge svg { width: 13px; height: 13px; }
.ac-icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); cursor: pointer; transition: .18s; }
.ac-icon-btn svg { width: 16px; height: 16px; }
.ac-icon-btn:hover { color: var(--accent); border-color: var(--accent); }

.ac-content { flex: 1; overflow-y: auto; padding: 26px 28px 40px; }
.ac-tab-panel { display: none; animation: acFade .28s ease; }
.ac-tab-panel.active { display: block; }
@keyframes acFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* 统计卡片 */
.ac-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 26px; }
.ac-stat {
  position: relative; padding: 20px 22px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(150deg, var(--panel-2), var(--panel)); border: 1px solid var(--border);
}
.ac-stat::after { content: ''; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb),.12), transparent 70%); }
.ac-stat-label { font-size: var(--t-fs-sm); color: var(--muted); display: flex; align-items: center; gap: 7px; }
.ac-stat-label svg { width: 15px; height: 15px; color: var(--accent); }
.ac-stat-value { font-size: 32px; font-weight: 800; margin-top: 10px; letter-spacing: .5px; }
.ac-stat-value.gold { color: var(--accent); }
.ac-stat-value.green { color: var(--green); }
.ac-stat-value.red { color: var(--danger); }
.ac-stat-sub { font-size: var(--t-fs-sm); color: var(--muted-2); margin-top: 6px; }

.ac-section-title { font-size: 16px; font-weight: 700; margin: 4px 0 16px; display: flex; align-items: center; gap: 9px; }
.ac-section-title svg { width: 18px; height: 18px; color: var(--accent); }
.ac-section-title .ac-count { font-size: var(--t-fs-sm); font-weight: 500; color: var(--muted); background: var(--panel-3); padding: 3px 9px; border-radius: 12px; }

/* 对账统计 */
.ac-rc-title { justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.ac-rc-actions { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ac-rg-btn, .ac-rg-export { font-size: var(--t-fs-sm); line-height: 1; padding: 7px 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); cursor: pointer; transition: .16s; }
.ac-rg-btn:hover, .ac-rg-export:hover { border-color: var(--accent); color: var(--accent); }
.ac-rg-btn.active { background: var(--accent); color: var(--btn-on-accent, var(--bg)); border-color: var(--accent); font-weight: 700; }
.ac-rg-export { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; border-color: rgba(var(--accent-rgb), .4); color: var(--accent); }
.ac-rg-export svg { width: 14px; height: 14px; }
.ac-rg-export:disabled { opacity: .5; cursor: default; }
.ac-rc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.ac-rc-card { padding: 16px 18px; border-radius: 13px; border: 1px solid var(--border); background: linear-gradient(150deg, var(--panel-2), var(--panel)); }
.ac-rc-card span { font-size: var(--t-fs-sm); color: var(--muted); }
.ac-rc-card b { display: block; font-size: 26px; font-weight: 800; margin-top: 7px; letter-spacing: .4px; }
.ac-rc-card b.gold { color: var(--accent); }
.ac-rc-card b.blue { color: #6b9df5; }
.ac-rc-card b.red { color: var(--danger); }
.ac-rc-card b.green { color: var(--green); }
.ac-rc-card small { font-size: var(--t-fs-cap); color: var(--muted-2); margin-top: 6px; display: block; }
.ac-rc-subtitle { font-size: var(--t-fs-base); font-weight: 700; margin: 20px 0 10px; display: flex; align-items: center; gap: 8px; }
.ac-rc-subtitle .ac-count { font-size: var(--t-fs-cap); font-weight: 500; color: var(--muted); background: var(--panel-3); padding: 2px 8px; border-radius: 12px; }
.ac-rc-subtitle + .ac-table-wrap { margin-bottom: 6px; }

/* 表格 */
.ac-table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.ac-table { width: 100%; border-collapse: collapse; font-size: var(--t-fs-sm); }
.ac-table thead th { padding: 14px 18px; text-align: left; font-size: var(--t-fs-sm); font-weight: 700; letter-spacing: .5px; color: var(--muted); background: rgba(var(--accent-rgb),.05); border-bottom: 1px solid var(--border); white-space: nowrap; }
.ac-table tbody td { padding: 14px 18px; border-bottom: 1px solid var(--border-soft); color: var(--text); }
.ac-table tbody tr:last-child td { border-bottom: 0; }
.ac-table tbody tr:hover { background: rgba(var(--accent-rgb),.035); }
.ac-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.ac-table .credit-num { font-weight: 800; color: var(--accent); }
.ac-table .delta-plus { color: var(--green); font-weight: 700; }
.ac-table .delta-minus { color: var(--danger); font-weight: 700; }
.ac-table .tag { display: inline-block; padding: 3px 9px; border-radius: 12px; font-size: var(--t-fs-sm); font-weight: 700; }
.ac-table .tag-admin { background: rgba(var(--accent-rgb),.14); color: var(--accent); }
.ac-table .tag-user { background: rgba(148,163,184,.12); color: var(--muted); }
.ac-table .tag-api { background: rgba(129,140,248,.16); color: #818cf8; }
.ac-table .ac-tail { color: var(--muted); font-size: var(--t-fs-sm); }
.ac-table .tag-in { background: rgba(52,211,153,.12); color: var(--green); }
.ac-table .tag-out { background: rgba(251,113,133,.12); color: var(--danger); }

.ac-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ac-btn { padding: 6px 11px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-size: var(--t-fs-sm); font-weight: 600; cursor: pointer; transition: .16s; white-space: nowrap; }
.ac-btn:hover { border-color: var(--accent); color: var(--accent); }
.ac-btn.gold { background: rgba(var(--accent-rgb),.14); border-color: rgba(var(--accent-rgb),.4); color: var(--accent); }
.ac-btn.red { background: rgba(251,113,133,.1); border-color: rgba(251,113,133,.35); color: var(--danger); }
.ac-btn.ghost { background: transparent; }
.ac-btn:disabled { opacity: .5; cursor: wait; }
.ac-inline-input { width: 74px; padding: 6px 8px; border-radius: 7px; border: 1px solid var(--border); background: #100f0d; color: var(--text); font-size: var(--t-fs-sm); outline: none; text-align: center; }
.ac-inline-input:focus { border-color: var(--accent); }

.ac-empty { padding: 48px 20px; text-align: center; color: var(--muted); font-size: var(--t-fs-sm); }
.ac-empty svg { width: 40px; height: 40px; color: var(--border); margin-bottom: 12px; }

/* 快捷操作条 */
.ac-quickbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ac-filter { display: flex; align-items: center; gap: 7px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; }
.ac-filter select, .ac-filter input { border: 0; background: transparent; color: var(--text); font-size: var(--t-fs-sm); outline: none; }
.ac-filter select option { background: var(--panel); }
.ac-filter svg { width: 15px; height: 15px; color: var(--muted); }
.ac-spacer { flex: 1; }

/* 详情抽屉 */
.ac-drawer-mask { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: .28s; z-index: 5; }
.ac-drawer-mask.open { opacity: 1; pointer-events: auto; }
.ac-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 94vw); z-index: 6;
  background: linear-gradient(180deg, #17150f, #0f0e0c); border-left: 1px solid var(--border);
  box-shadow: -20px 0 60px rgba(0,0,0,.6); transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
}
.ac-drawer.open { transform: translateX(0); }
.ac-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.ac-drawer-head h3 { margin: 0; font-size: 16px; }
.ac-drawer-head span { font-size: var(--t-fs-sm); color: var(--muted); }
.ac-drawer-body { flex: 1; overflow-y: auto; padding: 22px 24px; }
.ac-profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
/* 详情抽屉里是 4 个指标（当前积分/充值积分/累计消费/失败未计费），两列更均衡 */
#acDrawerBody .ac-profile-grid { grid-template-columns: repeat(2, 1fr); }
.ac-profile-item { padding: 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); }
.ac-profile-item label { display: block; font-size: var(--t-fs-sm); color: var(--muted); margin-bottom: 6px; }
.ac-profile-item b { font-size: 16px; color: var(--accent); }
.ac-profile-item b.green { color: var(--green); }
.ac-profile-item b.red { color: var(--danger); }
.ac-drawer-section-title { font-size: var(--t-fs-sm); font-weight: 700; margin: 0 0 12px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.ac-drawer-section-title svg { width: 15px; height: 15px; color: var(--accent); }
.ac-log-list { display: flex; flex-direction: column; gap: 8px; }
.ac-log-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 9px; background: var(--panel); border: 1px solid var(--border-soft); }
.ac-log-ico { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; display: grid; place-items: center; }
.ac-log-ico.in { background: rgba(52,211,153,.12); color: var(--green); }
.ac-log-ico.out { background: rgba(251,113,133,.12); color: var(--danger); }
.ac-log-ico svg { width: 15px; height: 15px; }
.ac-log-main { flex: 1; min-width: 0; }
.ac-log-main b { display: block; font-size: var(--t-fs-sm); }
.ac-log-main span { display: block; font-size: var(--t-fs-sm); color: var(--muted); margin-top: 2px; }
.ac-log-delta { font-size: 14px; font-weight: 800; }
.ac-log-delta.plus { color: var(--green); }
.ac-log-delta.minus { color: var(--danger); }

/* 后台口径说明 + 失败/未计费标记（累计消费只算实际扣款） */
.ac-note-line { font-size: var(--t-fs-sm); color: var(--muted-2); margin: -4px 0 12px; line-height: 1.6; }
.ac-table .tag-fail { background: rgba(251,113,133,.14); color: var(--danger); }
.ac-log-main .tag-fail { margin-left: 6px; vertical-align: 1px; }
.ac-log-item.is-failed { opacity: .62; }
.ac-log-item.is-failed .ac-log-delta { text-decoration: line-through; }
.ac-profile-item b.muted { color: var(--muted); }

@media (max-width: 820px) {
  .ac-sidebar { width: 68px; flex-basis: 68px; }
  .ac-brand { justify-content: center; padding: 18px 0; }
  .ac-brand > div:last-child { display: none; }
  .ac-nav-item { justify-content: center; font-size: 0; padding: 12px 0; }
  .ac-nav-item svg { width: 20px; height: 20px; }
  .ac-sidebar-foot { justify-content: center; font-size: 0; }
  .ac-sidebar-foot #acCloudStatus { display: none; }
  .ac-content { padding: 18px 14px; }
  .ac-topbar { padding: 0 14px; }
}

/* ============================================================
   认证 / 充值弹窗变体：窗口化（非全屏）、更大、实心不透明
   ============================================================ */
.modal.variant-auth, .modal.variant-recharge {
  width: min(680px, 94vw);
  max-height: 90vh;
  background: #1c1a16;
  border: 1px solid #6b5c3d;
  box-shadow: 0 32px 100px rgba(0,0,0,.75), 0 0 0 1px rgba(var(--accent-rgb),.12);
}
.modal.variant-auth .modal-head, .modal.variant-recharge .modal-head {
  background: #232019;
  border-bottom: 1px solid #5a4d33;
  padding: 20px 26px 17px;
}
.modal.variant-auth .modal-head h3, .modal.variant-recharge .modal-head h3 { font-size: 16px; }
.modal.variant-auth .modal-head span, .modal.variant-recharge .modal-head span { font-size: var(--t-fs-sm); }
.modal.variant-auth .modal-body, .modal.variant-recharge .modal-body {
  background: #1c1a16;
  padding: 24px 26px 26px;
}
body.light .modal.variant-auth, body.light .modal.variant-recharge { background: #fff; border-color: #b9a373; }
body.light .modal.variant-auth .modal-head, body.light .modal.variant-recharge .modal-head { background: #f6f1e6; border-bottom-color: #ded2b6; }
body.light .modal.variant-auth .modal-body, body.light .modal.variant-recharge .modal-body { background: #fff; }

/* 认证内容加大 */
.variant-auth .auth-modal { max-width: none; }
.variant-auth .auth-tabs { margin-bottom: 20px; }
.variant-auth .auth-tab { padding: 11px 0; font-size: 14px; }
.variant-auth .auth-field { margin-bottom: 16px; }
.variant-auth .auth-field label { font-size: var(--t-fs-sm); margin-bottom: 7px; }
.variant-auth .auth-field input {
  padding: 13px 14px; font-size: 14px;
  background: #12110e; border-color: #4a4130;
}
.variant-auth .auth-submit { padding: 14px; font-size: 14px; margin-top: 10px; }
.variant-auth .auth-note { font-size: var(--t-fs-sm); line-height: 1.6; }
.auth-service-card {
  margin-top: 18px; padding: 16px 18px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb),.12), rgba(var(--accent-rgb),.03));
  border: 1px solid rgba(var(--accent-rgb),.3);
}
.asc-title { display: flex; align-items: center; gap: 8px; font-size: var(--t-fs-sm); font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.asc-title svg { width: 16px; height: 16px; }
.asc-row { display: flex; align-items: center; gap: 10px; }
.asc-row span { font-size: var(--t-fs-sm); color: var(--muted); }
.asc-row b { font-size: 16px; letter-spacing: .5px; }
.asc-copy {
  margin-left: auto; padding: 6px 12px; border-radius: 7px; cursor: pointer;
  border: 1px solid rgba(var(--accent-rgb),.5); background: rgba(var(--accent-rgb),.15);
  color: var(--accent); font-size: var(--t-fs-sm); font-weight: 700;
}
.asc-copy:hover { background: rgba(var(--accent-rgb),.25); }
.auth-service-card p { margin: 10px 0 0; font-size: var(--t-fs-sm); color: var(--muted); line-height: 1.6; }

/* 充值内容 */
.rc-hero {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 13px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb),.16), rgba(var(--accent-rgb),.04));
  border: 1px solid rgba(var(--accent-rgb),.3); margin-bottom: 20px;
}
.rc-hero-ico { width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg,var(--accent),var(--accent-2)); color:#1a1408; }
.rc-hero-ico svg { width: 22px; height: 22px; }
.rc-hero div:last-child { display: flex; flex-direction: column; }
.rc-hero span { font-size: var(--t-fs-sm); color: var(--muted); }
.rc-hero b { font-size: 28px; font-weight: 800; color: var(--accent); line-height: 1.2; }
.rc-steps { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.rc-step { display: flex; align-items: flex-start; gap: 12px; }
.rc-step-n { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(var(--accent-rgb),.18); border: 1px solid rgba(var(--accent-rgb),.45); color: var(--accent); font-size: var(--t-fs-sm); font-weight: 800; }
.rc-step div { display: flex; flex-direction: column; }
.rc-step b { font-size: var(--t-fs-sm); }
.rc-step small { font-size: var(--t-fs-sm); color: var(--muted); margin-top: 3px; }
.rc-wechat {
  padding: 16px 18px; border-radius: 12px; background: #12110e; border: 1px solid #4a4130;
}
.rc-wechat-label { display: flex; align-items: center; gap: 7px; font-size: var(--t-fs-sm); color: var(--muted); margin-bottom: 10px; }
.rc-wechat-label svg { width: 15px; height: 15px; color: var(--accent); }
.rc-wechat-row { display: flex; align-items: center; gap: 12px; }
.rc-wechat-row b { font-size: 20px; letter-spacing: 1px; color: var(--text); }
.rc-copy {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border-radius: 8px; cursor: pointer; border: 0; background: linear-gradient(135deg,var(--accent),var(--accent-2));
  color: #1a1408; font-size: var(--t-fs-sm); font-weight: 800;
}
.rc-copy svg { width: 14px; height: 14px; }
.rc-copy:hover { filter: brightness(1.08); }
.rc-account { margin: 14px 0 16px; font-size: var(--t-fs-sm); color: var(--muted); text-align: center; }
.rc-account b { color: var(--accent); }
.rc-account.rc-warn { color: var(--color-warning); }
.variant-recharge .primary-btn.full { width: 100%; padding: 13px; font-size: 14px; background: linear-gradient(135deg, #d9b26a, #b78a3c); color: #201804; font-weight: 700; }
.variant-recharge .primary-btn.full:hover { filter: brightness(1.06); }
/* 充值弹窗：档位 / 收款码 / 复制 / 我已支付（人工确认） */
.rc-section-title { font-size: var(--t-fs-sm); font-weight: 700; color: var(--muted); margin: 16px 0 9px; }
.rc-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; }
.rc-tier { display: flex; align-items: baseline; justify-content: center; gap: 2px; padding: 11px 6px; border-radius: 9px; border: 1px solid rgba(var(--accent-rgb), .28); background: rgba(var(--accent-rgb), .05); color: var(--text); cursor: pointer; transition: .15s; }
.rc-tier b { font-size: 16px; font-weight: 800; }
.rc-tier span { font-size: var(--t-fs-cap); color: var(--muted); }
.rc-tier:hover { border-color: rgba(var(--accent-rgb), .6); }
.rc-tier.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a1408; border-color: transparent; }
.rc-tier.active span { color: #1a1408; opacity: .75; }
.rc-pay-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.rc-pay-tab { padding: 7px 20px; border-radius: 8px; border: 1px solid rgba(var(--accent-rgb), .3); background: transparent; color: var(--muted); font-size: var(--t-fs-sm); cursor: pointer; }
.rc-pay-tab.active { background: rgba(var(--accent-rgb), .16); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.rc-pay-body { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rc-qr { width: 168px; height: 168px; object-fit: contain; background: #fff; border: 1px solid rgba(var(--accent-rgb), .25); border-radius: 10px; padding: 6px; cursor: zoom-in; }
.rc-pay-account, .rc-uid-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px; background: rgba(var(--accent-rgb), .06); border: 1px solid rgba(var(--accent-rgb), .2); }
.rc-pay-account span, .rc-uid-row span { font-size: var(--t-fs-sm); color: var(--muted); flex: 0 0 auto; }
.rc-pay-account b, .rc-uid-row b { font-size: 15px; letter-spacing: .5px; color: var(--accent); flex: 1 1 auto; word-break: break-all; }
.rc-uid-row { margin-top: 14px; }
.rc-note { font-size: var(--t-fs-sm); color: var(--muted); text-align: center; line-height: 1.6; margin: 14px 0; }
body.light .rc-tier { background: #f6f1e6; border-color: #ded2b6; color: #1b2a40; }
body.light .rc-tier.active { color: #fff; }
body.light .rc-tier.active span { color: #fff; }
body.light .rc-pay-tab { color: #5b6b80; }
body.light .rc-pay-account, body.light .rc-uid-row { background: #f6f1e6; border-color: #ded2b6; }
body.light .rc-pay-account b, body.light .rc-uid-row b { color: var(--accent-2); }
/* 后台：充值收款设置块 */
.pay-qr-row { display: flex; align-items: center; gap: 8px; }
.pay-qr-row input { flex: 1 1 auto; min-width: 0; }
.pay-qr-upload { flex: 0 0 auto; padding: 7px 12px; border-radius: 7px; border: 1px solid rgba(var(--accent-rgb), .45); background: rgba(var(--accent-rgb), .1); color: var(--accent); font-size: var(--t-fs-sm); cursor: pointer; }
.pay-qr-upload:hover { background: rgba(var(--accent-rgb), .2); }
.pay-qr-preview { display: block; width: 84px; height: 84px; object-fit: contain; background: #fff; border-radius: 6px; margin-top: 8px; border: 1px solid rgba(var(--accent-rgb), .2); }

/* 个人中心：修改密码入口与表单 */
.profile-pwd-entry {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 16px 0; padding: 13px 15px; border-radius: 10px;
  background: var(--panel-2, rgba(255,255,255,.03)); border: 1px solid var(--border);
}
.profile-pwd-entry > div { display: flex; align-items: center; gap: 10px; }
.profile-pwd-entry svg { width: 17px; height: 17px; color: var(--accent); }
.profile-pwd-entry b { font-size: var(--t-fs-sm); display: block; }
.profile-pwd-entry small { font-size: var(--t-fs-sm); color: var(--muted); }
.pwd-form { display: flex; flex-direction: column; gap: 13px; margin-top: 8px; }
.pwd-form .field { display: flex; flex-direction: column; gap: 6px; }
.pwd-form .field span { font-size: var(--t-fs-sm); color: var(--muted); }
.pwd-form .field input {
  width: 100%; padding: 12px 13px; border-radius: 8px; font-size: 14px;
  background: #12110e; border: 1px solid #4a4130; color: var(--text); outline: none;
}
.pwd-form .field input:focus { border-color: var(--accent); }
body.light .pwd-form .field input { background: #fff; border-color: #cbd9ea; color: #1a1a1a; }

@media (max-width: 520px) {
  .modal.variant-auth, .modal.variant-recharge { width: 96vw; max-height: 94vh; }
  .modal.variant-auth .modal-head, .modal.variant-recharge .modal-head { padding: 16px 18px 14px; }
  .modal.variant-auth .modal-body, .modal.variant-recharge .modal-body { padding: 18px; }
  .rc-wechat-row { flex-wrap: wrap; }
  .rc-copy { margin-left: 0; width: 100%; justify-content: center; }
}

/* 后台账号搜索框 */
.ac-search { display: flex; align-items: center; gap: 8px; min-width: 280px; flex: 0 1 380px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; transition: border-color .18s; }
.ac-search:focus-within { border-color: var(--accent); }
.ac-search svg { width: 15px; height: 15px; color: var(--muted); flex: 0 0 15px; }
.ac-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font-size: var(--t-fs-sm); outline: none; }
.ac-search input::placeholder { color: var(--muted-2); }

/* 详情抽屉操作条 */
.ac-detail-actions { display: flex; gap: 8px; margin: 0 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft); }
.ac-detail-actions .ac-btn { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 520px) {
  .ac-search { min-width: 0; flex: 1 1 100%; }
}

/* 管理控制台打开时，内部触发的通用弹窗需覆盖控制台 */
body.admin-console-open .modal-overlay { z-index: 500; }

/* ============================================================
   商务合作：右上角入口 + 全屏招募界面
   ============================================================ */
.biz-co-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border-radius: 999px; border: 1px solid rgba(168,130,255,.5); cursor: pointer;
  background: linear-gradient(110deg, #7c5cff, #a855f7);
  color: #fff; font-size: var(--t-fs-sm); font-weight: 800; letter-spacing: .3px;
  box-shadow: 0 4px 16px rgba(124,92,255,.35); transition: .18s;
}
.biz-co-btn svg { width: 14px; height: 14px; }
.biz-co-btn:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 6px 22px rgba(124,92,255,.5); }

.biz-overlay { position: fixed; inset: 0; z-index: 480; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(4,4,6,.88); backdrop-filter: blur(8px); }
.biz-overlay.open { display: flex; animation: bizFade .25s ease; }
@keyframes bizFade { from { opacity: 0 } to { opacity: 1 } }
.biz-panel {
  position: relative; width: min(1160px, 96vw); max-height: 92vh; display: grid;
  grid-template-columns: 44% 56%; border-radius: 20px; overflow: hidden;
  background: linear-gradient(150deg, #14120e, #0b0a09);
  border: 1px solid rgba(var(--accent-rgb),.28);
  box-shadow: 0 40px 120px rgba(0,0,0,.8), inset 0 1px 0 rgba(var(--accent-rgb),.1);
  animation: bizIn .32s cubic-bezier(.2,.8,.2,1);
}
@keyframes bizIn { from { opacity: 0; transform: translateY(18px) scale(.98) } to { opacity: 1; transform: none } }
.biz-close { position: absolute; top: 16px; right: 18px; z-index: 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 1px solid rgba(var(--accent-rgb),.3); background: rgba(0,0,0,.4); color: #cfc6b6; cursor: pointer; transition: .18s; }
.biz-close:hover { color: var(--accent); border-color: var(--accent); }
.biz-close svg { width: 16px; height: 16px; }

/* 左侧装饰场景 */
.biz-visual { position: relative; min-height: 560px; overflow: hidden; background: radial-gradient(120% 90% at 30% 20%, #2a2013 0%, #120f0a 55%, #080706 100%); border-right: 1px solid rgba(var(--accent-rgb),.16); }
.biz-visual-glow { position: absolute; top: -80px; left: -60px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(232,208,154,.28), transparent 68%); filter: blur(10px); }
.biz-visual::after { content:''; position:absolute; inset:0; pointer-events:none; background: radial-gradient(ellipse at 50% 85%, rgba(var(--accent-rgb),.1), transparent 60%); }
.biz-deco { position: absolute; display: grid; place-items: center; border-radius: 16px; border: 1px solid rgba(232,208,154,.5); background: linear-gradient(145deg, rgba(232,208,154,.16), rgba(232,208,154,.03)); box-shadow: 0 14px 40px rgba(0,0,0,.5); color: var(--accent); transform: rotate(-8deg); animation: bizFloat 5s ease-in-out infinite; }
.biz-deco svg { width: 46%; height: 46%; }
.biz-deco.card-a { width: 118px; height: 92px; top: 12%; left: 8%; }
.biz-deco.card-b { width: 96px; height: 76px; top: 26%; left: 40%; transform: rotate(9deg); animation-delay: .8s; }
.biz-deco.card-c { width: 80px; height: 64px; top: 8%; left: 62%; transform: rotate(-14deg); animation-delay: 1.6s; }
@keyframes bizFloat { 0%,100% { translate: 0 0 } 50% { translate: 0 -12px } }
.biz-storefront { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); width: 320px; text-align: center; filter: drop-shadow(0 24px 40px rgba(0,0,0,.6)); }
.bz-roof { height: 26px; margin: 0 auto 4px; width: 90%; border-radius: 14px 14px 3px 3px; background: repeating-linear-gradient(90deg, var(--accent) 0 24px, #b08a48 24px 48px); box-shadow: 0 4px 14px rgba(var(--accent-rgb),.4); }
.bz-sign { display: inline-block; padding: 8px 26px; border-radius: 6px; background: linear-gradient(110deg, #f0dca8, #c39b52); color: #2a1e08; font-size: 20px; font-weight: 900; letter-spacing: 4px; box-shadow: 0 6px 20px rgba(var(--accent-rgb),.45), inset 0 1px 0 rgba(255,255,255,.5); }
.bz-body { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; padding: 14px 16px; height: 120px; background: linear-gradient(180deg, rgba(60,45,25,.9), rgba(30,24,15,.95)); border: 1px solid rgba(var(--accent-rgb),.35); border-bottom: 0; }
.bz-body span { display: block; border-radius: 4px; background: linear-gradient(180deg, rgba(232,208,154,.5), rgba(var(--accent-rgb),.14)); box-shadow: inset 0 0 18px rgba(232,208,154,.2); }
.bz-base { height: 16px; border-radius: 0 0 8px 8px; background: linear-gradient(180deg, #c9a45c, #7a5f31); box-shadow: 0 10px 30px rgba(0,0,0,.7); }
.biz-visual-caption { position: absolute; left: 0; right: 0; bottom: 4%; text-align: center; font-size: var(--t-fs-sm); letter-spacing: 5px; color: rgba(232,208,154,.7); }

/* 右侧文案 */
.biz-content { padding: 36px 42px 28px; overflow-y: auto; }
.biz-eyebrow { display: flex; align-items: center; gap: 8px; font-size: var(--t-fs-sm); letter-spacing: 2px; color: var(--accent); font-weight: 700; margin-bottom: 12px; }
.biz-eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.biz-content h2 { margin: 0 0 13px; font-size: 32px; line-height: 1.22; font-weight: 900; letter-spacing: 1px; color: #eaf0f8; }
.biz-content h2 em { font-style: normal; background: linear-gradient(110deg, #f0dca8, #c39b52); -webkit-background-clip: text; background-clip: text; color: transparent; }
.biz-lead { font-size: var(--t-fs-sm); line-height: 1.7; color: #b6ad9d; margin: 0 0 18px; max-width: 520px; }
.biz-points { display: flex; flex-direction: column; gap: 0; margin-bottom: 16px; }
.biz-point { display: flex; align-items: flex-start; gap: 14px; padding: 11px 0; border-top: 1px solid rgba(var(--accent-rgb),.14); }
.biz-point:last-child { border-bottom: 1px solid rgba(var(--accent-rgb),.14); }
.biz-point > span { font-size: var(--t-fs-sm); font-weight: 800; color: var(--accent); padding-top: 2px; }
.biz-point b { display: block; font-size: 15px; color: #f0e8d8; margin-bottom: 4px; }
.biz-point small { display: block; font-size: var(--t-fs-sm); color: #9d9486; line-height: 1.5; }
.biz-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.biz-tags span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: rgba(var(--accent-rgb),.07); border: 1px solid rgba(var(--accent-rgb),.16); font-size: var(--t-fs-sm); color: #c9bfac; }
.biz-tags svg { width: 13px; height: 13px; color: var(--accent); }
.biz-steps { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: var(--t-fs-sm); color: #9d9486; margin-bottom: 18px; }
.biz-steps b { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 50%; background: rgba(var(--accent-rgb),.16); border: 1px solid rgba(var(--accent-rgb),.4); color: var(--accent); font-size: var(--t-fs-sm); }
.biz-steps i { font-style: normal; color: #5a5040; }
.biz-actions { display: flex; gap: 12px; justify-content: flex-end; }
.biz-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px; font-size: var(--t-fs-sm); font-weight: 700; cursor: pointer; transition: .18s; }
.biz-btn.ghost { background: rgba(255,255,255,.04); border: 1px solid rgba(var(--accent-rgb),.25); color: #b6ad9d; }
.biz-btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.biz-btn.primary { background: linear-gradient(110deg, var(--accent), var(--accent-2)); border: 0; color: #1a1408; box-shadow: 0 8px 24px rgba(var(--accent-rgb),.28); }
.biz-btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.biz-btn svg { width: 16px; height: 16px; }
.biz-btn i { font-style: normal; }

@media (max-width: 900px) {
  .biz-panel { grid-template-columns: 1fr; max-height: 94vh; overflow-y: auto; }
  .biz-visual { min-height: 240px; border-right: 0; border-bottom: 1px solid rgba(var(--accent-rgb),.16); }
  .biz-storefront { transform: translateX(-50%) scale(.7); bottom: 4%; }
  .biz-content { padding: 28px 22px; }
  .biz-content h2 { font-size: 28px; }
  .biz-co-btn { padding: 6px 10px; font-size: var(--t-fs-sm); }
}

/* 联系客服弹窗 */
.cs-support { display: flex; flex-direction: column; gap: 16px; }
.cs-agent { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); }
.cs-avatar { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, #4a90d9, #2d6cb5); color: #fff; }
.cs-avatar svg { width: 24px; height: 24px; }
.cs-agent-meta b { display: block; font-size: 14px; }
.cs-online { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; font-size: var(--t-fs-sm); color: var(--green); }
.cs-online i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.cs-wx-card { padding: 20px; border-radius: 12px; background: linear-gradient(135deg, rgba(var(--accent-rgb),.1), rgba(var(--accent-rgb),.03)); border: 1px solid rgba(var(--accent-rgb),.3); text-align: center; }
.cs-wx-label { font-size: var(--t-fs-sm); color: var(--muted); margin-bottom: 8px; }
.cs-wx-number { font-size: 24px; font-weight: 800; letter-spacing: 2px; color: var(--accent); margin-bottom: 10px; }
.cs-wx-card p { font-size: var(--t-fs-sm); color: var(--muted); line-height: 1.7; margin: 0 0 14px; }
.cs-copy { display: inline-flex; align-items: center; gap: 7px; padding: 10px 20px; border-radius: 9px; border: 0; cursor: pointer; background: linear-gradient(135deg,var(--accent),var(--accent-2)); color: #1a1408; font-size: var(--t-fs-sm); font-weight: 800; }
.cs-copy svg { width: 15px; height: 15px; }
.cs-copy:hover { filter: brightness(1.08); }
.cs-hours { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); font-size: var(--t-fs-sm); color: var(--muted); }
.cs-hours svg { width: 16px; height: 16px; color: var(--accent); }
.cs-hours b { margin-left: auto; color: var(--text); font-size: var(--t-fs-sm); }
.cs-ok { padding: 13px; font-size: 14px; }

/* API 文档卡片可点击 + 配置块高亮 */
.api-status-card { cursor: pointer; position: relative; transition: .18s; }
.api-status-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 20px rgba(var(--accent-rgb),.18); }
.api-status-card .card-edit { display: block; margin-top: 6px; font-size: var(--t-fs-sm); font-style: normal; color: var(--accent); opacity: .7; }
.config-block.flash { animation: cfgFlash 1.6s ease; }
@keyframes cfgFlash { 0%,100% { box-shadow: none } 20%,60% { box-shadow: 0 0 0 2px var(--accent), 0 0 26px rgba(var(--accent-rgb),.35) } }

/* 版本升级提示 */
.version-refresh { text-align: center; padding: 6px 0; }
.vr-ico { width: 58px; height: 58px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, rgba(var(--accent-rgb),.2), rgba(var(--accent-rgb),.05)); border: 1px solid rgba(var(--accent-rgb),.35); color: var(--accent); }
.vr-ico svg { width: 26px; height: 26px; }
.version-refresh h3 { margin: 0 0 10px; font-size: 16px; }
.version-refresh p { font-size: var(--t-fs-sm); color: var(--muted); line-height: 1.7; margin: 0 0 8px; }
.version-refresh .vr-tip { color: var(--accent); font-size: var(--t-fs-sm); margin-bottom: 18px; }
.notice-ver { display: inline-block; margin-top: 8px; font-size: var(--t-fs-sm); color: var(--accent); background: rgba(var(--accent-rgb),.12); padding: 2px 8px; border-radius: 10px; }

/* 后台公告发布表单 */
.ac-announce-form { display: flex; flex-direction: column; gap: 9px; padding: 18px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); }
.ac-announce-form label { font-size: var(--t-fs-sm); color: var(--muted); }
.ac-announce-form input:not([type=checkbox]), .ac-announce-form textarea, .ac-announce-form select {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: #12110e; color: var(--text); font-size: var(--t-fs-sm); outline: none; font-family: inherit;
}
.ac-announce-form input:focus, .ac-announce-form textarea:focus, .ac-announce-form select:focus { border-color: var(--accent); }
.ac-announce-form textarea { resize: vertical; min-height: 76px; }
.anf-row { display: flex; align-items: center; gap: 12px; }
.anf-row label { white-space: nowrap; }
.anf-row select { width: 160px; }
.anf-check { display: inline-flex !important; align-items: center; gap: 6px; color: var(--text) !important; font-size: var(--t-fs-sm) !important; }
body.light .ac-announce-form input:not([type=checkbox]), body.light .ac-announce-form textarea, body.light .ac-announce-form select { background: #fff; color: #1a1a1a; border-color: #cbd9ea; }

/* ============================================================
   对话历史：侧栏入口 / 顶部新建对话 / 历史窗口列表
   ============================================================ */
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: inline-grid; place-items: center; font-style: normal; font-size: var(--t-fs-sm); font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a1408;
}
.sidebar.collapsed .nav-badge { display: none; }
.chat-pill { color: var(--accent); border-color: rgba(var(--accent-rgb),.4); background: linear-gradient(135deg, rgba(var(--accent-rgb),.14), rgba(var(--accent-rgb),.04)); }
.chat-pill:hover { border-color: var(--accent); background: rgba(var(--accent-rgb),.2); }
.chat-history-box { display: flex; flex-direction: column; gap: 14px; }
.ch-new { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; font-size: 14px; }
.ch-new svg { width: 16px; height: 16px; }
.ch-search {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2);
}
.ch-search svg { width: 15px; height: 15px; color: var(--muted); flex: 0 0 15px; }
.ch-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font-size: var(--t-fs-sm); outline: 0; }
.ch-search input::placeholder { color: var(--muted-2); }
.ch-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; padding-right: 2px; }
.ch-group-title { display: flex; align-items: center; gap: 6px; font-size: var(--t-fs-sm); color: var(--muted); padding: 4px 2px 2px; }
.ch-group-title svg { width: 14px; height: 14px; }
.ch-group-title span { font-size: var(--t-fs-cap); padding: 0 6px; border-radius: 8px; background: var(--secondary); color: var(--muted-foreground); }
.ch-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--border); transition: .16s;
}
.ch-item:hover { border-color: rgba(var(--accent-rgb),.55); background: var(--panel-3); }
.ch-item.current { border-color: rgba(var(--accent-rgb),.65); background: linear-gradient(100deg, rgba(var(--accent-rgb),.13), transparent); }
.ch-ico { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; background: rgba(var(--accent-rgb),.15); color: var(--accent); }
.ch-ico svg { width: 17px; height: 17px; }
.ch-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ch-main b { font-size: var(--t-fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-main b em { font-style: normal; font-size: var(--t-fs-cap); margin-left: 6px; padding: 1px 6px; border-radius: 8px; background: rgba(var(--accent-rgb),.18); color: var(--accent); }
.ch-main span { font-size: var(--t-fs-sm); color: var(--muted); }
.ch-main small { font-size: var(--t-fs-sm); color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.ch-actions button { padding: 6px 10px; border-radius: 7px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: var(--t-fs-sm); cursor: pointer; }
.ch-actions .ch-open:hover { border-color: var(--accent); color: var(--accent); }
.ch-actions .ch-del:hover { border-color: var(--danger); color: var(--danger); }
body.light .ch-item.current { background: #fbf6ea; }

/* ============================================================
   白金主题（body.light）：管理控制台 / 详情抽屉 / 弹窗深度适配
   ============================================================ */
body.light .ac-gate { background: radial-gradient(1200px 700px at 50% 40%, var(--color-white) 0%, #e9eff8 62%); }
body.light .ac-gate::before {
  background-image: linear-gradient(rgba(163,124,52,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(163,124,52,.07) 1px, transparent 1px);
}
body.light .ac-gate-card {
  background: linear-gradient(160deg, var(--color-white), #f7f9fd);
  border-color: #d9c79c; color: #1b2a40;
  box-shadow: 0 30px 80px rgba(30,58,95,.16), inset 0 1px 0 rgba(255,255,255,.9);
}
body.light .ac-gate-brand { color: #5a6b83; }
body.light .ac-gate-card h2 { color: #1b2a40; }
body.light .ac-gate-card > p { color: #5a6b83; }
body.light .ac-gate-form input { background: var(--color-white); border-color: #cbd9ea; color: #142033; }
body.light .ac-gate-form input:focus { border-color: #b08a48; }
body.light .ac-remember { color: #5a6b83; }
body.light .ac-remember input[type=checkbox] { background: #fff; border-color: #cbd9ea; }
body.light .ac-remember:hover { color: #1b2a40; }
body.light .ac-gate-btn { color: #1a1408; }
body.light .ac-gate-tip { color: #8494aa; }
body.light .ac-gate-back { color: #5a6b83; }
body.light .ac-gate-back:hover { color: var(--accent-2); }

body.light .ac-shell { background: #f3f6fb; }
body.light .ac-sidebar { background: linear-gradient(180deg, var(--color-white), #f7f9fd); border-right-color: #d9e3f0; }
body.light .ac-brand b { color: #1b2a40; }
body.light .ac-brand span { color: var(--accent-2); }
body.light .ac-nav-item:hover { background: #eef3fa; color: #1b2a40; }
body.light .ac-nav-item.active {
  color: var(--accent-2); background: linear-gradient(135deg, rgba(var(--accent-rgb),.26), rgba(var(--accent-rgb),.05));
  box-shadow: inset 2px 0 0 #b08a48;
}
body.light .ac-sidebar-foot { color: #5a6b83; border-top-color: #e3eaf4; }
body.light .ac-topbar { background: rgba(255,255,255,.92); border-bottom-color: #d9e3f0; }
body.light .ac-crumb { color: #5a6b83; }
body.light .ac-crumb b { color: #1b2a40; }
body.light .ac-crumb span::after { color: #a9b6c7; }
body.light .ac-admin-badge { background: #eef4fc; border-color: #c4d5e8; color: var(--accent-2); }
body.light .ac-icon-btn { background: var(--color-white); border-color: #d9e3f0; color: #5a6b83; }
body.light .ac-icon-btn:hover { color: var(--accent-2); border-color: #b08a48; }

body.light .ac-stat { background: linear-gradient(150deg, var(--color-white), #f7f9fd); border-color: #d9e3f0; box-shadow: 0 8px 26px rgba(30,58,95,.06); }
body.light .ac-stat-value.gold { color: var(--accent-2); }
body.light .ac-table-wrap { background: var(--color-white); border-color: #d9e3f0; box-shadow: 0 8px 26px rgba(30,58,95,.06); }
body.light .ac-table thead th { background: rgba(var(--accent-rgb),.1); color: #5a6b83; }
body.light .ac-table tbody td { border-bottom-color: #e8eef5; }
body.light .ac-table tbody tr:hover { background: rgba(var(--accent-rgb),.07); }
body.light .ac-table .mono { color: #5a6b83; }
body.light .ac-table .credit-num { color: var(--accent-2); }
body.light .ac-section-title .ac-count { background: #eef3fa; color: #5a6b83; }
body.light .ac-btn { background: #f3f7fc; border-color: #d9e3f0; color: #24364d; }
body.light .ac-btn.gold { background: #eef4fc; border-color: #c4d5e8; color: var(--accent-2); }
body.light .ac-btn.red { background: #fff0f3; border-color: #f0b9c5; color: #c84a63; }
body.light .ac-btn.ghost { background: transparent; }
body.light .ac-inline-input {
  background: var(--color-white); color: #142033; border-color: #cbd9ea;
  box-shadow: inset 0 1px 2px rgba(30,58,95,.04);
}
body.light .ac-inline-input:focus { border-color: #b08a48; box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.16); }
body.light .ac-filter, body.light .ac-search { background: var(--color-white); border-color: #d9e3f0; }
body.light .ac-filter select option { background: var(--color-white); color: #142033; }
body.light .ac-tag, body.light .ac-table .tag-in { color: #0f9d6e; }

body.light .ac-drawer {
  background: linear-gradient(180deg, var(--color-white), #f7f9fd); border-left-color: #d9e3f0;
  box-shadow: -20px 0 60px rgba(30,58,95,.18);
}
body.light .ac-drawer-head { border-bottom-color: #e3eaf4; }
body.light .ac-drawer-head h3 { color: #1b2a40; }
body.light .ac-profile-item { background: var(--color-white); border-color: #e3eaf4; }
body.light .ac-profile-item b { color: var(--accent-2); }
body.light .ac-profile-item label { color: #5a6b83; }
body.light .ac-drawer-section-title { color: #1b2a40; }
body.light .ac-log-item { background: var(--color-white); border-color: #e3eaf4; }
body.light .ac-log-main b { color: #24364d; }
body.light .ac-log-main span { color: #5a6b83; }
body.light .ac-log-ico.in { background: #eafaf3; color: #0f9d6e; }
body.light .ac-log-ico.out { background: #fff0f3; color: #c84a63; }
body.light .ac-log-delta.plus { color: #0f9d6e; }
body.light .ac-log-delta.minus { color: #c84a63; }

body.light .variant-auth .auth-field input,
body.light .pwd-form .field input,
body.light .variant-recharge input {
  background: var(--color-white); border-color: #cbd9ea; color: #142033;
}
body.light .auth-service-card { background: #fbf6ea; border-color: #c4d5e8; }
body.light .asc-row b { color: var(--accent-2); }
body.light .rc-wechat { background: var(--color-white); border-color: #cbd9ea; }
body.light .rc-wechat-row b { color: #1b2a40; }
body.light .rc-hero { background: linear-gradient(135deg, #eef4fc, var(--color-white)); border-color: #c4d5e8; }
body.light .rc-hero b { color: var(--accent-2); }
body.light .rc-step-n { color: var(--accent-2); }
body.light .ch-search { background: var(--color-white); }

/* ===== 智能体广场（截图2风格：顶部导航 + 分类 + 搜索 + 卡片网格） ===== */
.modal.variant-agent { width: min(880px, 95vw); max-height: 88vh; }
.modal.variant-agent .modal-head { padding: 16px 20px 13px; }
.modal.variant-agent .modal-body { padding: 0; }
body.light .modal.variant-agent { background: #fff; border-color: #b9a373; }
body.light .modal.variant-agent .modal-head { background: #f6f1e6; border-bottom-color: #ded2b6; }
body.light .modal.variant-agent .modal-body { background: #fff; }
.ag-gallery { padding: 4px 0 8px; }
.ag-toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 20px 12px; flex-wrap: wrap; }
.ag-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.ag-cat { border: 1px solid var(--border-soft); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 16px; font-size: var(--t-fs-sm); cursor: pointer; transition: .18s; }
.ag-cat:hover { color: var(--text); border-color: var(--accent); }
.ag-cat.active { background: var(--accent); color: #1a1408; border-color: var(--accent); font-weight: 700; }
.ag-search { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 220px; flex: 0 1 280px; border: 1px solid var(--border); background: var(--panel-2); border-radius: 999px; padding: 7px 13px; }
.ag-search svg { width: 15px; height: 15px; color: var(--muted-2); }
.ag-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: var(--t-fs-sm); }
.ag-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 4px 20px 16px; min-height: 260px; }
.ag-card { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--panel-2); text-align: left; cursor: pointer; transition: .18s; color: var(--text); }
.ag-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.ag-card-ico { flex: 0 0 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; background: var(--ag-ico-bg); color: var(--accent); font-size: 24px; }
.ag-card-ico svg { width: 24px; height: 24px; }
.ag-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ag-card-main b { font-size: 14px; }
.ag-card-main small { font-size: var(--t-fs-sm); color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ag-card-tag { flex: 0 0 auto; align-self: flex-start; font-style: normal; font-size: var(--t-fs-sm); color: var(--accent); border: 1px solid rgba(var(--accent-rgb),.4); border-radius: 6px; padding: 2px 7px; }
.ag-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.ag-empty-ico { width: 66px; height: 66px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(145deg, rgba(var(--accent-rgb),.2), rgba(var(--accent-rgb),.05)); border: 1px solid rgba(var(--accent-rgb),.3); color: var(--accent); margin-bottom: 16px; }
.ag-empty-ico svg { width: 32px; height: 32px; }
.ag-empty b { font-size: 16px; color: var(--text); margin-bottom: 8px; }
.ag-empty p { font-size: var(--t-fs-sm); color: var(--muted); line-height: 1.7; max-width: 440px; margin: 0 0 18px; }
.ag-empty-cta { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--accent); background: rgba(var(--accent-rgb),.1); color: var(--accent); border-radius: 9px; padding: 9px 18px; font-size: var(--t-fs-sm); font-weight: 600; cursor: pointer; transition: .18s; }
.ag-empty-cta:hover { background: rgba(var(--accent-rgb),.2); }
.ag-empty-cta svg { width: 15px; height: 15px; }
body.light .ag-cat { color: #5b6472; border-color: #dbe3ee; }
body.light .ag-cat.active { color: #fff; }
body.light .ag-search { background: #fff; }
body.light .ag-card { background: #fff; border-color: #e2e8f0; }
body.light .ag-card-main small { color: #6b7686; }
body.light .ag-empty-ico { background: linear-gradient(145deg, #fbf4e4, var(--color-white)); }

/* ---------- 创作台对话流：图片/视频生成像聊天一样原地输出 ---------- */
.stage.has-turns { align-items: flex-start; padding: 0; }
.gen-thread { width: 100%; max-width: 1320px; margin: 0 auto; height: 100%; display: flex; flex-direction: column; min-height: 0; }
.stage.has-turns .gen-thread { overflow-y: auto; padding: 14px 30px 26px; }
.gen-thread::-webkit-scrollbar { width: 6px; }
.gen-thread::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb),.25); border-radius: 3px; }
.stage:not(.has-turns) .gen-thread { width: min(720px, 100%); height: auto; }
.gen-messages { display: flex; flex-direction: column; gap: 20px; }
/* 保存时长提示：内容保留 3 天，到期自动清理 */
.gen-retention { display: flex; align-items: center; gap: 8px; align-self: center; max-width: 720px; margin: 0 auto 4px; padding: 8px 14px; border: 1px dashed rgba(var(--accent-rgb),.35); border-radius: 9px; background: rgba(var(--accent-rgb),.05); color: var(--muted); font-size: var(--t-fs-sm); line-height: 1.6; }
.gen-retention svg { width: 14px; height: 14px; flex: 0 0 14px; color: var(--accent); }
body.light .gen-retention { background: #fffaf0; border-color: #dcc99e; color: #6b6252; }
.gen-day { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: var(--t-fs-sm); margin: 2px 0 4px; }
.gen-day::before, .gen-day::after { content: ""; flex: 1; height: 1px; background: var(--border-soft); }
/* 保存提示的横线不铺满整个加宽后的容器 */
.gen-retention + .gen-day { max-width: 720px; width: 100%; margin-left: auto; margin-right: auto; }

.gen-turn { display: flex; flex-direction: column; gap: 14px; }
.gen-turn-user { display: flex; gap: 10px; align-items: flex-start; flex-direction: row-reverse; }
.gen-turn-ai { display: flex; gap: 10px; align-items: flex-start; }
.gen-avatar { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: var(--t-fs-sm); font-weight: 700; }
.gen-avatar.me { background: linear-gradient(135deg, var(--accent), #b89352); color: #1a1710; }
.gen-avatar.bot { background: linear-gradient(145deg, rgba(var(--accent-rgb),.18), rgba(var(--accent-rgb),.04)); border: 1px solid rgba(var(--accent-rgb),.3); color: var(--accent); }
.gen-avatar.bot svg { width: 20px; height: 20px; }
/* 外层对话容器加宽到 1320px，但气泡内文字与图片保持原窄宽度（只加宽对话框，不加宽内容） */
.gen-turn-user-body { max-width: min(78%, 660px); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.gen-turn-ai-body { flex: 1; min-width: 0; max-width: min(82%, 720px); }
.gen-bubble.user { padding: 11px 14px; border-radius: 13px 3px 13px 13px; font-size: var(--t-fs-sm); line-height: 1.7; white-space: pre-wrap; word-break: break-word; background: linear-gradient(135deg, rgba(var(--accent-rgb),.2), rgba(var(--accent-rgb),.1)); border: 1px solid rgba(var(--accent-rgb),.2); color: var(--text); }
.gen-user-imgs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.gen-user-imgs img { width: 68px; height: 68px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.gen-params { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.gen-params span { font-size: var(--t-fs-sm); color: var(--accent); border: 1px solid rgba(var(--accent-rgb),.28); background: rgba(var(--accent-rgb),.07); border-radius: 6px; padding: 2px 7px; }
.gen-ai-label { font-size: var(--t-fs-sm); color: var(--muted); margin-bottom: 7px; letter-spacing: .02em; }
.gen-medias { display: flex; flex-direction: column; gap: 10px; }
.gen-media { position: relative; border: 1px solid rgba(var(--accent-rgb),.2); border-radius: 10px; overflow: hidden; background: var(--panel); padding: 8px; }
.gen-media-title { display: flex; align-items: center; min-width: 0; margin: 0 0 7px; font-size: var(--t-fs-sm); font-weight: 600; line-height: 1.4; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gen-media-title::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--accent); margin-right: 7px; flex: 0 0 3px; }
.gen-media img, .gen-media video { display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: 6px; background: #000; }
.gen-media img { background: var(--panel-2); }
.gen-download { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: var(--t-fs-sm); color: var(--accent); text-decoration: none; border: 1px solid rgba(var(--accent-rgb),.35); border-radius: 7px; padding: 5px 10px; transition: .16s; }
.gen-download:hover { background: rgba(var(--accent-rgb),.14); }
.gen-download.sub { color: var(--muted); border-color: var(--border); margin-left: 6px; }
.gen-download svg { width: 13px; height: 13px; }
.gen-media-empty, .gen-media-error { display: flex; align-items: center; gap: 8px; min-height: 70px; padding: 14px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); font-size: var(--t-fs-sm); }
.gen-media-error { color: var(--danger); border-color: rgba(251,113,133,.3); }
.gen-media-empty svg, .gen-media-error svg { width: 16px; height: 16px; flex: 0 0 16px; }
.gen-pending { border: 1px solid var(--border-soft); border-radius: 10px; padding: 14px 16px; background: var(--panel); }
.gen-pending-head { display: flex; align-items: center; gap: 8px; font-size: var(--t-fs-sm); color: var(--muted); margin-bottom: 10px; }
.gen-spinner { width: 13px; height: 13px; border: 2px solid rgba(var(--accent-rgb),.25); border-top-color: var(--accent); border-radius: 50%; animation: genspin .8s linear infinite; }
@keyframes genspin { to { transform: rotate(360deg); } }
.gen-bar { height: 3px; border-radius: 2px; background: var(--panel-3); overflow: hidden; }
.gen-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .3s; }
.gen-notice { font-size: var(--t-fs-sm); color: var(--muted-2); margin-top: 7px; }
.gen-turn-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gen-act { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-fs-sm); color: var(--muted); background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: 7px; padding: 5px 9px; transition: .16s; }
.gen-act:hover { color: var(--accent); border-color: rgba(var(--accent-rgb),.4); }
.gen-act.danger:hover { color: var(--danger); border-color: rgba(251,113,133,.4); }
.gen-act svg { width: 12px; height: 12px; }
.gen-turn-time { margin-left: auto; font-size: var(--t-fs-sm); color: var(--muted-2); }
body.light .gen-bubble.user { background: linear-gradient(135deg, #fbf2dc, #fdf9ef); border-color: rgba(var(--accent-rgb),.2); color: #263449; }
body.light .gen-avatar.me { color: #fff; }
body.light .gen-media { background: #fff; border-color: rgba(160,123,57,.2); }
body.light .gen-media img { background: #f4f6fa; }
body.light .gen-pending { background: #fff; border-color: #e4dcc9; }
body.light .gen-bar { background: #e8e4da; }
body.light .gen-act { background: #fff; border-color: #e4dcc9; }

/* ---------- 生成结果放大按钮 ---------- */
.gen-media-view { position: relative; }
.gen-zoom { position: absolute; right: 14px; top: 14px; display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-fs-sm); color: #f2ede4; background: rgba(12,11,10,.78); border: 1px solid rgba(var(--accent-rgb),.45); border-radius: 8px; padding: 5px 9px; cursor: pointer; opacity: 0; transition: opacity .16s, background .16s; backdrop-filter: blur(4px); }
.gen-media-view:hover .gen-zoom, .gen-zoom:focus-visible { opacity: 1; }
.gen-zoom:hover { background: rgba(var(--accent-rgb),.28); }
.gen-zoom svg { width: 13px; height: 13px; }
@media (hover: none) { .gen-zoom { opacity: 1; } }

/* ---------- 生成结果放大预览层 ---------- */
.media-viewer { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; }
.media-viewer.open { display: flex; }
.mv-backdrop { position: absolute; inset: 0; background: rgba(3,6,12,.92); backdrop-filter: blur(8px); }
.mv-stage { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: min(92vw, 1400px); height: min(88vh, 900px); }
.mv-stage img, .mv-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 30px 90px rgba(0,0,0,.7); }
.mv-stage img.mv-zoomable { cursor: zoom-in; transform-origin: center center; will-change: transform; touch-action: none; }
.mv-stage img.mv-zoomable[style*="scale("] { cursor: grab; }
.mv-stage img.mv-zoomable.dragging { cursor: grabbing; }
.mv-stage video { background: #000; }
.mv-hint { position: absolute; z-index: 2; left: 50%; bottom: 26px; transform: translateX(-50%); font-size: var(--t-fs-sm); letter-spacing: .02em; color: rgba(255,255,255,.55); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 6px 16px; pointer-events: none; }
.mv-close { position: absolute; z-index: 2; top: 26px; right: 30px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #f2ede4; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); cursor: pointer; transition: .16s; }
.mv-close:hover { background: rgba(251,113,133,.25); border-color: var(--danger); }
.mv-close svg { width: 20px; height: 20px; }
body.light .mv-backdrop { background: rgba(20,24,32,.9); }
body.light .mv-close { color: #fff; }

/* ---------- 余额不足红色弹窗（中等尺寸） ---------- */
.modal.variant-danger { width: min(430px, 92vw); border-color: rgba(251,113,133,.45); box-shadow: 0 24px 80px rgba(120,10,30,.32); }
.credit-alert { text-align: center; padding: 8px 4px 4px; }
.credit-alert-ico { width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; color: var(--color-danger); background: radial-gradient(circle at 50% 40%, rgba(251,113,133,.22), rgba(251,113,133,.06)); border: 1px solid rgba(251,113,133,.4); }
.credit-alert-ico svg { width: 30px; height: 30px; }
.credit-alert-title { margin: 0 0 10px; font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: .02em; }
.credit-alert-text { margin: 0 0 8px; font-size: 14px; line-height: 1.7; color: #fecdd3; }
.credit-alert-sub { margin: 0 0 22px; font-size: var(--t-fs-sm); color: var(--muted-2); }
.credit-alert-sub b { color: var(--accent); }
.credit-alert-btn { width: 100%; padding: 12px; font-size: 14px; font-weight: 600; color: #fff; cursor: pointer; border: 1px solid rgba(251,113,133,.55); border-radius: 10px; background: linear-gradient(135deg, #e5485d, #b83246); transition: .16s; }
.credit-alert-btn:hover { filter: brightness(1.12); box-shadow: 0 6px 20px rgba(229,72,93,.35); }
body.light .modal.variant-danger { border-color: rgba(220,60,80,.45); }
body.light .credit-alert-title { color: #263449; }
body.light .credit-alert-text { color: #c0263e; }
body.light .credit-alert-ico { color: #d92d45; background: radial-gradient(circle at 50% 40%, rgba(217,45,69,.14), rgba(217,45,69,.04)); border-color: rgba(217,45,69,.4); }
.modal.variant-danger .modal-head { display: none; }
.modal.variant-danger .modal-body { padding: 26px 24px 24px; }

/* ---------- P0 智能体全屏模块：无限画布 / 灵感画坊 ---------- */
body.agent-fullscreen .app { display: none; }
.agent-module { position: fixed; inset: 0; z-index: 140; display: flex; flex-direction: column; background: var(--bg); color: var(--text); }
.am-head { height: 58px; min-height: 58px; flex: 0 0 58px; display: flex; align-items: center; gap: 14px; padding: 0 20px; border-bottom: 1px solid var(--border-soft); background: var(--sidebar); }
/* 窄窗口 / 分屏时顶栏不再互相挤压：每块固定宽度、放不下就整条横向滚动，
   旧样式会让「节点工作流 · 自动保存」和「已保存（本地+云端）」被压成竖排、字被裁掉。 */
.am-head { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.am-head > * { flex: 0 0 auto; }
.am-head .am-title, .am-head .am-title b, .am-head .am-title span { white-space: nowrap; }
.am-back { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; }
.am-back:hover { border-color: var(--accent); }
.am-title { display: flex; align-items: baseline; gap: 10px; }
.am-title b { font-size: 15px; color: var(--accent); }
.am-title span { font-size: var(--t-fs-sm); color: var(--muted); }
.am-head-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.am-save { font-size: var(--t-fs-sm); color: var(--muted); }
.am-icon { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; }
.am-body { flex: 1; min-height: 0; display: flex; }
/* 侧栏按最长一项自己撑开（132~200px），不再是死宽 132px 把「节点列表」这类文字挤到裁字；
   窗口很窄时也不会被压扁，文字一律单行。 */
.am-rail, .idea-rail { width: max-content; min-width: 132px; max-width: 200px; flex: 0 0 auto; border-right: 1px solid var(--border-soft); background: var(--sidebar); padding: 14px 10px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; overflow-x: hidden; }
.am-rail-btn { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-rail-btn:hover, .am-rail-btn.active { color: var(--accent); background: var(--panel); border-color: var(--border); }
.am-rail-tip { margin-top: auto; padding: 10px 8px; font-size: var(--t-fs-sm); line-height: 1.6; color: var(--muted-2); border-top: 1px solid var(--border-soft); }
.am-main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }

/* ---------- 画布悬浮 AI 助手 ---------- */
.cv-ai-fab { position: absolute; right: 18px; bottom: 18px; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 11px 18px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: linear-gradient(160deg, #26232e, #17151d); color: #fff; font-size: var(--t-fs-base); font-weight: 600; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.45); transition: transform .15s ease, box-shadow .15s ease; }
.cv-ai-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.5); border-color: rgba(var(--accent-rgb, 108,92,231),.7); }
.cv-ai-fab svg { width: 17px; height: 17px; color: #d9a441; }
.cv-ai-panel { position: absolute; right: 18px; bottom: 18px; z-index: 31; width: 460px; height: 580px; max-height: calc(100% - 24px); max-width: calc(100% - 24px); display: flex; flex-direction: column; border-radius: 14px; border: 1px solid var(--border, rgba(255,255,255,.1)); background: var(--panel, #1c1c1e); box-shadow: 0 14px 44px rgba(0,0,0,.4); overflow: hidden; }
.cv-ai-panel[hidden] { display: none; }
.cv-ai-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid var(--border, rgba(255,255,255,.08)); cursor: grab; user-select: none; background: rgba(var(--accent-rgb, 108,92,231),.08); }
.cv-ai-head:active { cursor: grabbing; }
.cv-ai-head-ico { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(135deg, var(--accent, #6c5ce7), var(--accent-2, #a29bfe)); color: #fff; }
.cv-ai-head-ico svg { width: 14px; height: 14px; }
.cv-ai-head-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cv-ai-head-t b { font-size: var(--t-fs-base); color: var(--text, #eee); }
.cv-ai-head-t span { font-size: 10.5px; color: var(--text-2, #999); }
.cv-ai-act { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: none; border-radius: 7px; background: transparent; color: var(--text-2, #aaa); cursor: pointer; }
.cv-ai-act:hover { background: rgba(255,255,255,.08); color: var(--text, #eee); }
.cv-ai-act svg { width: 14px; height: 14px; }
.cv-ai-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.cv-ai-msg { max-width: 88%; font-size: 12.5px; line-height: 1.6; padding: 8px 11px; border-radius: 11px; white-space: pre-wrap; word-break: break-word; }
.cv-ai-msg.user { align-self: flex-end; background: rgba(var(--accent-rgb, 108,92,231),.22); color: var(--text, #eee); border-bottom-right-radius: 4px; }
.cv-ai-msg.bot { align-self: flex-start; background: rgba(255,255,255,.06); color: var(--text, #eee); border-bottom-left-radius: 4px; }
.cv-ai-msg.bot.error { background: rgba(229,72,77,.14); color: #ff8a8e; }
.cv-ai-meta { font-size: var(--t-fs-cap); color: var(--text-2, #888); margin-top: 4px; }
.cv-ai-empty { margin: auto; text-align: center; font-size: var(--t-fs-sm); line-height: 1.9; color: var(--text-2, #888); padding: 0 20px; }
.cv-ai-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.cv-ai-chips button { font-size: var(--t-fs-cap); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border, rgba(255,255,255,.12)); background: transparent; color: var(--text-2, #bbb); cursor: pointer; }
.cv-ai-chips button:hover { border-color: var(--accent, #6c5ce7); color: var(--text, #eee); background: rgba(var(--accent-rgb, 108,92,231),.12); }
.cv-ai-inputrow { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border, rgba(255,255,255,.08)); align-items: flex-end; }
.cv-ai-inputrow textarea { flex: 1; resize: none; font-size: 12.5px; line-height: 1.5; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border, rgba(255,255,255,.12)); background: var(--input, rgba(255,255,255,.05)); color: var(--text, #eee); font-family: inherit; }
.cv-ai-inputrow textarea:focus { outline: none; border-color: var(--accent, #6c5ce7); }
.cv-ai-inputrow button { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: none; border-radius: 10px; background: linear-gradient(135deg, var(--accent, #6c5ce7), var(--accent-2, #a29bfe)); color: #fff; cursor: pointer; }
.cv-ai-inputrow button:disabled { opacity: .55; cursor: not-allowed; }
.cv-ai-inputrow button svg { width: 16px; height: 16px; }
.cv-ai-fab[hidden] { display: none; }
.cv-ai-cursor { display: inline-block; margin-left: 2px; animation: cvAiBlink 1s steps(2) infinite; }
@keyframes cvAiBlink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

/* 选区「+」按钮：框选/成组后浮在选区右侧 */
.cv-group-plus { position: absolute; z-index: 25; width: 34px; height: 34px; display: grid; place-items: center; border: 1.5px solid var(--accent, #6c5ce7); border-radius: 50%; background: var(--panel, #1c1c1e); color: var(--accent, #6c5ce7); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.cv-group-plus:hover { background: var(--accent, #6c5ce7); color: #fff; transform: scale(1.08); }

/* 节点提示词 @ 引用菜单 */
.cv-mention-pop { position: fixed; z-index: 420; width: 300px; max-height: min(52vh, 460px); overflow-y: auto; padding: 6px; border-radius: 12px; border: 1px solid var(--border, rgba(255,255,255,.12)); background: var(--panel-2, #242428); box-shadow: 0 16px 44px rgba(0,0,0,.5); }
.cv-mention-h { padding: 4px 8px 8px; font-size: var(--t-fs-cap); color: var(--muted-2, #888); }
.cv-mention-pop button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text, #eee); font-size: 12.5px; text-align: left; cursor: pointer; }
.cv-mention-pop button:hover { background: rgba(var(--accent-rgb, 108,92,231),.16); }
/* 分组标题：本节点参考图 / 上游节点 / 画布其它节点 / 素材库，避免「一 @ 出来一堆陌生图」 */
.cv-mention-pop .cv-mention-g { padding: 7px 8px 3px; font-size: 11px; font-weight: 600; letter-spacing: .2px; color: var(--muted-2, #888); }
.cv-mention-pop .cv-mention-used { margin-left: 5px; padding: 0 5px; border-radius: 6px; font-size: 10px; font-style: normal; color: var(--accent, #8a7cff); background: rgba(var(--accent-rgb, 108,92,231), .16); }
.cv-mention-pop button img { width: 34px; height: 34px; flex: none; object-fit: cover; border-radius: 6px; }
.cv-mention-pop button .cv-mention-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 6px; background: rgba(var(--accent-rgb, 108,92,231), .14); color: var(--accent, #8a7cff); font-size: 17px; font-weight: 700; }
.cv-mention-pop button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; flex-direction: column; min-width: 0; }
.cv-mention-pop button span small { font-size: 11px; color: var(--muted-2, #888); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-tabs { height: 42px; flex: 0 0 42px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--border-soft); background: var(--panel); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.am-tabs > * { flex: 0 0 auto; }
/* 窄屏收敛：标题副文案、保存状态、手册文字依次让位，保证主操作（返回/画布名）永远可见 */
@media (max-width: 1100px) { .am-title span { display: none; } }
@media (max-width: 900px) { .am-save { display: none; } .am-head { padding: 0 12px; gap: 10px; } }
.canvas-viewport { position: relative; flex: 1; min-height: 0; overflow: hidden; outline: none; background: #0d0c0b; }
.canvas-grid { position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(var(--accent-rgb),.16) 1px, transparent 1px); background-size: 24px 24px; }
.canvas-edges, .canvas-world { position: absolute; inset: 0; width: 100%; height: 100%; }
/* overflow 必须是 visible：SVG 默认 hidden，裁剪区＝控件盒（视口大小），
   节点一旦位于 world 坐标超出这个范围（用户平移到画布左上/右下远处），
   连线会被整段裁掉 —— 而节点是 div（溢出可见）照样显示，于是出现「节点在、传输线没了」。 */
.canvas-edges { pointer-events: none; transform-origin: 0 0; z-index: 5; overflow: visible; } /* 连线画在节点上层：拖动重叠/移动分组时传输线不再被节点卡片盖住（svg 不接收事件，不影响交互） */
.canvas-world { transform-origin: 0 0; }
/* ---------- 画布缩放底栏 + 沉浸模式 ---------- */
/* AI 短剧工作流动辄十几二十个节点，原来缩放只能靠 Ctrl+滚轮盲调，
   缩到 0.4 就找不到节点。这里给显式按钮、比例回显、适应/聚焦/沉浸入口 */
.cv-zoom-hud {
  position: absolute; left: 16px; bottom: 16px; z-index: 26;
  display: flex; align-items: center; gap: 2px; padding: 4px;
  border-radius: 12px; border: 1px solid var(--border);
  background: rgba(20,20,24,.86); backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(0,0,0,.45);
}
.cv-zoom-hud button {
  min-width: 30px; height: 30px; padding: 0 9px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 13px; line-height: 1; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.cv-zoom-hud button:hover { background: rgba(var(--accent-rgb),.16); color: var(--accent); }
.cv-zoom-hud .cv-zoom-pct { min-width: 54px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.cv-zoom-hud .cv-zoom-sep { width: 1px; height: 18px; margin: 0 4px; background: var(--border); }
.cv-zoom-hud button.on { color: var(--accent); background: rgba(var(--accent-rgb),.18); }
body.light .cv-zoom-hud { background: rgba(255,255,255,.94); border-color: #c7d3e2; box-shadow: 0 10px 26px rgba(80,64,30,.16); }
body.light .cv-zoom-hud button { color: #5a6472; }
body.light .cv-zoom-hud button:hover, body.light .cv-zoom-hud button.on { color: var(--accent); }
body.light .cv-zoom-hud .cv-zoom-pct { color: #1b2430; }
/* 沉浸模式：收起顶栏/侧栏/画布页签，画布铺满整屏（Esc 或再点「退出沉浸」返回） */
body.cv-immersive .am-head, body.cv-immersive .am-rail, body.cv-immersive .am-tabs { display: none; }
body.cv-immersive .agent-module { background: #0d0c0b; }
body.cv-immersive .cv-zoom-hud { box-shadow: 0 12px 30px rgba(0,0,0,.6); }
.idea-main { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.idea-empty { color: var(--muted); font-size: var(--t-fs-sm); }
.idea-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 10px; }
.idea-tabs button { padding: 7px 4px; border-radius: 7px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: var(--t-fs-sm); cursor: pointer; }
.idea-tabs button.active { color: var(--accent); background: var(--panel); }
.idea-new { padding: 9px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #0b1420; font-weight: 600; cursor: pointer; }
.idea-search { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); }
.idea-search input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: var(--t-fs-sm); }
.idea-list { margin-top: 6px; overflow-y: auto; }
.idea-empty-mini { padding: 14px 6px; font-size: var(--t-fs-sm); color: var(--muted-2); line-height: 1.6; }
body.light .canvas-viewport { background: #f7f4ed; }
body.light .canvas-grid { background-image: radial-gradient(circle, rgba(140,105,40,.22) 1px, transparent 1px); }
body.light .agent-module { background: #fff; }

/* ---------- P1 无限画布 ---------- */
.cv-project { padding: 0 10px 0 2px; font-size: var(--t-fs-sm); color: var(--muted); white-space: nowrap; }
.cv-tab { padding: 6px 12px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: var(--t-fs-sm); cursor: pointer; }
.cv-tab.active { color: var(--accent); background: var(--panel-2); border-color: var(--border); }
.cv-tab-add { width: 26px; height: 26px; border-radius: 7px; border: 1px dashed var(--border); background: transparent; color: var(--muted); cursor: pointer; }
.cv-tab-add:hover { color: var(--accent); border-color: var(--accent); }
.canvas-grid::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .75; background-image: radial-gradient(circle, rgba(var(--accent-rgb),.75) 0 1px, transparent 1.5px), radial-gradient(circle, rgba(var(--accent-rgb),.5) 0 1px, transparent 1.5px); background-size: 220px 160px, 310px 240px; background-position: 0 0, 90px 60px; animation: cv-dot-drift 18s linear infinite; }
@keyframes cv-dot-drift { from { background-position: 0 0, 90px 60px; } to { background-position: 220px 160px, 400px 300px; } }
.cv-node { position: absolute; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow); overflow: visible; }
.cv-node.selected { border-color: var(--accent); }
.cv-node-head { height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-bottom: 1px solid var(--border-soft); }
.cv-node-head b { font-size: var(--t-fs-sm); font-weight: 500; }
.cv-node-ico { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 5px; background: var(--panel-3); color: var(--accent); font-size: var(--t-fs-sm); }
.cv-node-del { margin-left: auto; width: 18px; height: 18px; border: 0; background: transparent; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; }
.cv-node-del:hover { color: var(--danger); }
.cv-node-body { padding: 14px; min-height: 96px; font-size: var(--t-fs-sm); line-height: 1.7; color: var(--muted); white-space: pre-wrap; }
.cv-node-text .cv-node-ico { color: var(--accent); }
.cv-node-image .cv-node-ico, .cv-node-video .cv-node-ico { color: var(--green); }
.cv-port { position: absolute; top: 50%; width: 13px; height: 13px; margin-top: -7px; border-radius: 50%; border: 2px solid var(--accent); background: var(--panel); cursor: crosshair; z-index: 36; } /* 高于磁吸「+」的 30，避免热区盖住小圆点端口 */
/* 视觉仍是 13px 小圆点，但热区扩到 28×40：真实鼠标很容易点空，这是「拉不出传输线」的主因之一 */
.cv-port::before { content: ''; position: absolute; left: 50%; top: 50%; width: 28px; height: 40px; transform: translate(-50%, -50%); border-radius: 12px; }
.cv-port.in { left: -8px; }
.cv-port.out { right: -8px; }
.cv-port:hover { background: var(--accent); }
.cv-port:hover::after { content: ''; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--panel); }
.cv-node { touch-action: none; }
/* 拖线中全局锁定光标，避免经过文本/按钮时光标乱跳 */
body.cv-linking, body.cv-linking * { cursor: crosshair !important; }
.canvas-viewport.space-hand { cursor: grab; }
.canvas-viewport.space-hand * { cursor: grab !important; }
.canvas-viewport.panning, .canvas-viewport.panning * { cursor: grabbing !important; }
.cv-edge-hit { fill: none; stroke: transparent; stroke-width: 16; cursor: pointer; pointer-events: stroke; }
.cv-edge-group:hover .cv-edge-base { stroke: var(--danger, var(--color-danger)); }
.cv-edge-menu { position: fixed; z-index: 401; display: flex; gap: 4px; padding: 5px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel-2); box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.cv-edge-menu button { padding: 6px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font-size: var(--t-fs-sm); cursor: pointer; white-space: nowrap; }
.cv-edge-menu button:hover { background: rgba(var(--accent-rgb),.16); color: var(--accent); }
.cv-reconnect-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cv-reconnect-list button { padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); color: var(--text); cursor: pointer; }
.cv-reconnect-list button:hover { border-color: var(--accent); color: var(--accent); }
.cv-edge-base { fill: none; stroke: var(--border); stroke-width: 2; }
.cv-edge-flow { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 4 16; animation: cv-flow 1.05s linear infinite; opacity: .95; }
.cv-edge-base.temp { stroke-dasharray: 4 4; }
@keyframes cv-flow { to { stroke-dashoffset: -40; } }
.cv-add-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cv-add-grid button { padding: 16px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); text-align: left; cursor: pointer; }
.cv-add-grid button:hover { border-color: var(--accent); }
.cv-add-grid b { display: block; margin-bottom: 6px; font-size: var(--t-fs-sm); color: var(--accent); }
.cv-add-grid span { display: block; font-size: var(--t-fs-sm); line-height: 1.6; color: var(--muted); }
/* 通用模板弹层：模板卡 + 节点链预览 */
.cv-tpl-list { display: grid; gap: 12px; }
.cv-tpl-card { padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); }
.cv-tpl-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.cv-tpl-head b { font-size: var(--t-fs-base); color: var(--text); }
.cv-tpl-head span { font-size: var(--t-fs-cap); color: var(--muted); }
.cv-tpl-card p { margin: 0 0 12px; font-size: var(--t-fs-sm); line-height: 1.7; color: var(--muted); }
.cv-tpl-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.cv-tpl-flow span { padding: 5px 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel-2); font-size: var(--t-fs-cap); color: var(--text); }
.cv-tpl-flow i { font-style: normal; font-size: var(--t-fs-cap); color: var(--muted-2); }
.cv-tpl-apply { width: 100%; padding: 11px; border-radius: 9px; border: 1px solid var(--accent); background: rgba(var(--accent-rgb),.14); color: var(--accent); font-size: var(--t-fs-sm); font-weight: 500; cursor: pointer; }
.cv-tpl-apply:hover { background: rgba(var(--accent-rgb),.24); }
.cv-tpl-tip { margin-top: 14px; font-size: var(--t-fs-cap); line-height: 1.7; color: var(--muted); }
.shortcut-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.shortcut-grid h4 { margin: 0 0 10px; font-size: var(--t-fs-sm); color: var(--accent); }
.shortcut-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; font-size: var(--t-fs-sm); color: var(--muted); }
.shortcut-row kbd { padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-size: var(--t-fs-cap); white-space: nowrap; }
body.light .cv-node { border-color: #c4d2e4; }
body.light .cv-edge-base { stroke: #8fa2bb; }
body.light .shortcut-row kbd { background: #eef4fb; }

/* ===== 画布实体节点 / 连线菜单 / 资产库 / 快捷键 ===== */
.cv-tab-x { width: 18px; height: 18px; margin-left: -6px; border: 0; border-radius: 5px; background: transparent; color: var(--muted-2); font-size: var(--t-fs-sm); line-height: 1; cursor: pointer; }
.cv-tab-x:hover { color: var(--danger); background: rgba(251,113,133,.12); }
.cv-node { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border-color: var(--border); box-shadow: 0 10px 30px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.05); }
body.light .cv-node { background: linear-gradient(180deg, var(--color-white), #f0f5fc); box-shadow: 0 10px 26px rgba(80,64,30,.14); }
.cv-node.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.25), 0 12px 36px rgba(0,0,0,.38); }
.cv-node-head { height: 40px; }
.cv-node-menu { margin-left: auto; width: 20px; height: 20px; border: 0; background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; }
.cv-node-menu:hover { color: var(--accent); }
.cv-node-head .cv-node-del { margin-left: 0; }
.cv-stage { position: relative; margin: 8px; height: 132px; border-radius: 9px; border: 1px solid var(--border); background: radial-gradient(circle at 50% 30%, rgba(var(--accent-rgb),.07), transparent 60%), #0b0f15; display: grid; place-items: center; overflow: hidden; }
body.light .cv-stage { background: radial-gradient(circle at 50% 30%, rgba(var(--accent-rgb),.1), transparent 60%), #e8eff8; }
.cv-stage-media { width: 100%; height: 100%; object-fit: contain; }
.cv-stage-text { padding: 12px; font-size: var(--t-fs-sm); line-height: 1.7; color: var(--text); overflow: hidden; }
.cv-stage-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted-2); font-size: var(--t-fs-sm); }
.cv-stage-empty b { font-size: 32px; font-weight: 400; opacity: .55; }
.cv-spinner { width: 26px; height: 26px; border: 2px solid rgba(var(--accent-rgb),.25); border-top-color: var(--accent); border-radius: 50%; animation: cv-spin .8s linear infinite; }
@keyframes cv-spin { to { transform: rotate(360deg); } }
.cv-stage-audio { display: flex; flex-direction: column; gap: 6px; width: 90%; font-size: var(--t-fs-sm); color: var(--muted); }
.cv-stage-audio audio { width: 100%; height: 32px; }
.cv-presets { display: flex; gap: 5px; padding: 0 8px 6px; flex-wrap: wrap; }
.cv-preset-chip { padding: 4px 9px; border-radius: 20px; border: 1px solid var(--border); background: var(--panel-3); color: var(--muted); font-size: var(--t-fs-sm); cursor: pointer; }
.cv-preset-chip:hover, .cv-preset-chip.set { border-color: var(--accent); color: var(--accent); }
.cv-node-prompt { margin: 0 8px 7px; padding: 7px 9px; border-radius: 7px; background: rgba(0,0,0,.18); color: var(--muted); font-size: var(--t-fs-sm); line-height: 1.5; cursor: text; }
body.light .cv-node-prompt { background: rgba(0,0,0,.04); }
.cv-node-toolbar { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 8px 7px; }
.cv-mini-select { max-width: 112px; padding: 5px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: var(--t-fs-sm); outline: 0; }
.cv-tool-hint { align-self: center; font-size: var(--t-fs-cap); color: var(--muted-2); }
.cv-node-foot { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-top: 1px solid var(--border-soft); }
.cv-node-cost { flex: 1; font-size: var(--t-fs-sm); color: var(--yellow); white-space: nowrap; }
.cv-node-foot button { padding: 6px 9px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel-3); color: var(--text); font-size: var(--t-fs-sm); cursor: pointer; }
.cv-node-foot .cv-gen-btn { border-color: var(--accent); background: var(--accent); color: #0b1420; font-weight: 700; }
.cv-node-result:not(:empty) { padding: 0 8px 8px; }
.cv-result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 6px; }
.cv-result-item { position: relative; border-radius: 7px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.cv-result-item img, .cv-result-item video { width: 100%; height: 78px; object-fit: cover; display: block; }
.cv-result-item audio { width: 100%; height: 32px; }
.cv-dl { position: absolute; right: 4px; top: 4px; width: 21px; height: 21px; display: grid; place-items: center; border-radius: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: var(--t-fs-sm); text-decoration: none; }
.cv-dl:hover { background: var(--accent); color: #0b1420; }
.cv-link-menu { position: fixed; z-index: 400; width: 252px; padding: 7px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel-2); box-shadow: 0 16px 44px rgba(0,0,0,.5); }
.cv-link-title { padding: 5px 9px 8px; font-size: var(--t-fs-sm); color: var(--muted-2); }
.cv-link-menu button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 9px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; cursor: pointer; white-space: nowrap; }
.cv-link-menu button:hover { background: rgba(var(--accent-rgb),.14); color: var(--accent); }
.cv-link-menu button span { width: 22px; flex: none; font-size: 15px; color: var(--accent); text-align: center; }
.cv-link-menu button small { margin-left: auto; font-size: var(--t-fs-cap); color: var(--muted-2); white-space: nowrap; }
.cv-add-grid-4 { grid-template-columns: repeat(2, 1fr); }
.cv-preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cv-preset-grid button { padding: 10px 6px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: var(--t-fs-sm); cursor: pointer; }
.cv-preset-grid button.active, .cv-preset-grid button:hover { border-color: var(--accent); color: var(--accent); }
.cv-asset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cv-asset-item { display: flex; flex-direction: column; gap: 5px; padding: 7px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; }
.cv-asset-item:hover { border-color: var(--accent); }
.cv-asset-item img, .cv-asset-item video { width: 100%; height: 92px; object-fit: cover; border-radius: 6px; }
.cv-asset-item > span { height: 92px; display: grid; place-items: center; font-size: 32px; color: var(--muted); }
.cv-asset-item b { font-size: var(--t-fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-asset-item small { font-size: var(--t-fs-cap); color: var(--muted-2); }
.cv-search-input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); outline: 0; }
.cv-search-list { margin-top: 8px; max-height: 260px; overflow-y: auto; }
.cv-search-list button { display: block; width: 100%; padding: 9px; border: 0; border-bottom: 1px solid var(--border-soft); background: transparent; color: var(--text); text-align: left; font-size: var(--t-fs-sm); cursor: pointer; }
.cv-search-list button:hover { color: var(--accent); background: rgba(var(--accent-rgb),.08); }
.modal.variant-shortcut { width: min(1000px, 95vw); }
.shortcut-grid-lg { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
.shortcut-grid-lg .shortcut-row { font-size: var(--t-fs-sm); margin-bottom: 10px; }
.shortcut-grid-lg .shortcut-row kbd { font-size: var(--t-fs-sm); padding: 3px 8px; }

/* ===== 灵感画坊：实体卡片排版 / 大模板预览 / 配音工作台 ===== */
.idea-main { align-items: flex-start; justify-content: flex-start; padding: 18px; overflow-y: auto; }
.idea-wrap { width: 100%; max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.idea-sec { border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
body.light .idea-sec { background: linear-gradient(180deg,var(--color-white),#f7f2e9); box-shadow: 0 8px 20px rgba(80,64,30,.09); }
.idea-sec-head { padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: baseline; gap: 12px; }
.idea-sec-head b { font-size: 14px; color: var(--accent); }
.idea-sec-head span { font-size: var(--t-fs-sm); color: var(--muted); }
.idea-field > span { font-size: var(--t-fs-sm) !important; color: var(--text) !important; margin-bottom: 6px; display: block; }
.idea-field input, .idea-field select, .idea-field textarea, .voice-text { font-size: var(--t-fs-sm) !important; }
.idea-field textarea { line-height: 1.7; }
.idea-chat-list { min-height: 76px; max-height: 180px; }
.idea-chat-msg span { font-size: var(--t-fs-sm) !important; }
.idea-tasks, .idea-assets { min-height: 70px; }
.idea-asset img { height: 96px; object-fit: cover; }
.idea-cost-row { font-size: var(--t-fs-sm) !important; }

.modal.variant-jy { width: min(1180px, 96vw); }
.variant-jy .modal-body { padding: 16px 20px 20px; }
.jy-v2 { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: 18px; max-height: 72vh; }
.jy-form-v2 { overflow-y: auto; padding-right: 10px; }
.jy-sec-v2 { margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 10px; background: rgba(255,255,255,.02); }
body.light .jy-sec-v2 { background: rgba(0,0,0,.02); }
.jy-sec-v2 h4 { margin: 0 0 10px; font-size: var(--t-fs-sm); color: var(--accent); }
.jy-field > span { font-size: var(--t-fs-sm) !important; }
.jy-field input, .jy-field select { font-size: var(--t-fs-sm); }
.jy-two-v2, .jy-three-v2 { display: grid; gap: 10px; }
.jy-two-v2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.jy-three-v2 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.jy-preview-v2 { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: radial-gradient(circle at 50% 20%, rgba(var(--accent-rgb),.08), transparent 65%), rgba(0,0,0,.25); }
body.light .jy-preview-v2 { background: #f0f5fc; }
.jy-stage-v2 { flex: 1; display: grid; place-items: center; min-height: 420px; }
.jy-phone-v2 { position: relative; overflow: hidden; border: 4px solid #2b2822; border-radius: 14px; background: #000; box-shadow: 0 18px 46px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.1); }
.jy-bg-v2 { position: absolute; inset: 0; background: #000 center/cover; }
.jy-shot-v2 { position: relative; display: block; margin-left: auto; margin-right: auto; object-fit: cover; box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.jy-shot-ph-v2 { position: relative; display: grid; place-items: center; width: 86%; height: 70%; margin: 12% auto 0; border: 1px dashed rgba(var(--accent-rgb),.5); color: var(--muted-2); font-size: var(--t-fs-sm); text-align: center; }
.jy-title-v2 { position: absolute; left: 6%; right: 6%; text-align: center; font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,.9); pointer-events: none; }
.jy-sub-v2 { position: absolute; left: 6%; right: 6%; bottom: 7%; text-align: center; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.9); pointer-events: none; }
.jy-preview-v2 p { margin: 0; font-size: var(--t-fs-sm); color: var(--accent); }
.jy-preview-v2 small { font-size: var(--t-fs-sm); color: var(--muted-2); text-align: center; }

.voice-wrap { width: 100%; max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.voice-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel-2); }
.voice-head b { font-size: 15px; color: var(--accent); }
.voice-head span { margin-left: 12px; font-size: var(--t-fs-sm); color: var(--muted); }
.voice-head-actions button { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; }
.voice-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; }
.voice-card-panel { padding: 16px; border-radius: 14px; border: 1px solid var(--border); background: linear-gradient(180deg,var(--panel-2),var(--panel)); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.voice-sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 2px 0 10px; }
.voice-sec-head b { font-size: var(--t-fs-sm); color: var(--accent); }
.voice-sec-head span { font-size: var(--t-fs-sm); color: var(--muted); }
.voice-text { width: 100%; padding: 12px; border-radius: 9px; border: 1px solid var(--border); background: rgba(0,0,0,.18); color: var(--text); outline: 0; resize: vertical; line-height: 1.8; }
body.light .voice-text { background: #fbf8f0; }
.voice-text-actions, .voice-actions { display: flex; gap: 8px; margin: 8px 0 14px; flex-wrap: wrap; }
.voice-text-actions button, .voice-actions button, .voice-clone-btn { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: var(--t-fs-sm); cursor: pointer; }
.voice-text-actions button:hover, .voice-actions button:hover, .voice-clone-btn:hover { border-color: var(--accent); color: var(--accent); }
.voice-actions .primary-btn { border-color: var(--accent); background: var(--accent); color: #0b1420; font-weight: 700; }
.voice-actions button:disabled { opacity: .5; cursor: not-allowed; }
.voice-sliders { display: flex; flex-direction: column; gap: 10px; }
.voice-sliders label { display: grid; grid-template-columns: 54px 36px 1fr; align-items: center; gap: 8px; font-size: var(--t-fs-sm); color: var(--muted); }
.voice-sliders b { color: var(--accent); font-size: var(--t-fs-sm); }
.voice-sliders input[type=range] { accent-color: var(--accent); width: 100%; }
.voice-player { width: 100%; margin: 4px 0 12px; }
.voice-search { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); }
.voice-search svg { width: 14px; height: 14px; color: var(--muted); }
.voice-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: var(--t-fs-sm); }
.voice-filters { display: flex; gap: 6px; margin: 10px 0; }
.voice-filters button { padding: 6px 13px; border-radius: 18px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: var(--t-fs-sm); cursor: pointer; }
.voice-filters button.active { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb),.1); }
.voice-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; max-height: 340px; overflow-y: auto; }
.voice-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 9px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; }
.voice-card:hover, .voice-card.active { border-color: var(--accent); background: rgba(var(--accent-rgb),.08); }
.voice-ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: var(--t-fs-sm); color: var(--accent); }
.voice-card b { font-size: var(--t-fs-sm); }
.voice-card small { font-size: var(--t-fs-cap); color: var(--muted-2); }
.voice-card em { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); color: var(--accent); font-size: var(--t-fs-cap); font-style: normal; }
.voice-clone { margin-top: 14px; padding: 12px; border-radius: 10px; border: 1px dashed var(--border); display: flex; flex-direction: column; gap: 7px; }
.voice-clone b { font-size: var(--t-fs-sm); color: var(--accent); }
.voice-clone span { font-size: var(--t-fs-sm); color: var(--muted); }
.voice-clone-btn { align-self: flex-start; }

/* ============================================================
   访客提示 / 登录注册页 / 协议 / 参考图悬停预览
   ============================================================ */
.guest-tip {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb),.15), rgba(var(--accent-rgb),.04));
  border: 1px solid rgba(var(--accent-rgb),.32); color: var(--muted); font-size: var(--t-fs-sm);
}
/* 访客提示必须脱离 flex 流，否则会把舞台中间的英雄区挤到右侧 */
.stage > .guest-tip {
  position: absolute; left: 22px; top: 12px; z-index: 3;
  width: min(360px, calc(100% - 44px)); margin: 0;
}
.stage.has-turns > .guest-tip { top: 8px; }
.guest-tip svg { width: 15px; height: 15px; color: var(--accent); flex: 0 0 15px; }
.guest-tip span { flex: 1; }
.guest-tip button {
  border: 1px solid rgba(var(--accent-rgb),.55); border-radius: 7px; padding: 5px 10px;
  background: rgba(var(--accent-rgb),.14); color: var(--accent); font-size: var(--t-fs-sm); font-weight: 700;
}
.guest-tip button:hover { background: rgba(var(--accent-rgb),.26); }
body.light .guest-tip { background: linear-gradient(90deg, #fbf3df, var(--color-white)); border-color: #d8c495; }

/* 登录注册：窗口化 + 鎏金动效 */
.modal.variant-auth { width: min(470px, 94vw); }
.modal.variant-auth .modal-head { position: relative; padding: 15px 52px 12px; justify-content: center; text-align: center; background: transparent; border-bottom: 0; }
.modal.variant-auth .modal-head > div { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.modal.variant-auth .modal-head h3 { font-size: var(--t-fs-sm); letter-spacing: 2px; color: var(--accent); line-height: 1.4; }
.modal.variant-auth .modal-head span { font-size: var(--t-fs-sm); line-height: 1.5; }
.modal.variant-auth .modal-head #modalCloseBtn { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); flex: 0 0 30px; }
.modal.variant-auth .modal-body { padding: 0 22px 20px; }
.auth-pro { position: relative; overflow: hidden; }
.auth-spark { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: auth-twinkle 2.4s ease-in-out infinite; }
.auth-spark.sp1 { left: 12%; top: 22px; animation-delay: .1s; }
.auth-spark.sp2 { right: 14%; top: 48px; animation-delay: .7s; }
.auth-spark.sp3 { left: 22%; top: 102px; animation-delay: 1.2s; }
.auth-spark.sp4 { right: 20%; top: 130px; animation-delay: 1.7s; }
@keyframes auth-twinkle { 0%,100% { opacity: .15; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.5); } }
.auth-hero { text-align: center; padding: 4px 0 10px; }
.auth-avatar {
  position: relative; width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 18px;
  display: grid; place-items: center; color: #17130c; font-weight: 800; font-size: 24px; letter-spacing: -1px;
  background: linear-gradient(145deg, #f4dfae, #c59a45 60%, #8f6f2c);
  box-shadow: 0 8px 28px rgba(var(--accent-rgb),.35), inset 0 1px 0 rgba(255,255,255,.7);
  animation: avatar-shake 3.8s ease-in-out infinite;
}
@keyframes avatar-shake { 0%,72%,100% { transform: rotate(0); } 78% { transform: rotate(-8deg); } 84% { transform: rotate(8deg); } 90% { transform: rotate(-5deg); } 96% { transform: rotate(3deg); } }
.auth-gift {
  position: absolute; right: -12px; bottom: -8px; width: 27px; height: 27px; padding: 4px; border-radius: 9px;
  background: linear-gradient(145deg, #fff0c4, var(--accent)); color: #4a3410; border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 5px 16px rgba(var(--accent-rgb),.45); animation: gift-bounce 1.9s ease-in-out infinite;
}
@keyframes gift-bounce { 0%,100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-7px) rotate(8deg); } }
.auth-hero h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: 2px; color: var(--text); }
.auth-gold-line { width: 120px; height: 2px; margin: 0 auto 10px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.auth-marquee { width: 100%; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent); mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent); }
.auth-marquee-track { display: flex; width: max-content; animation: auth-marquee 13s linear infinite; }
.auth-marquee-track span { white-space: nowrap; font-size: var(--t-fs-sm); font-weight: 700; letter-spacing: .5px; color: var(--accent); text-shadow: 0 0 12px rgba(var(--accent-rgb),.55); }
@keyframes auth-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.auth-slogan { margin: 8px 0 0; font-size: var(--t-fs-sm); color: var(--muted-2); letter-spacing: 1px; }
.auth-pro .pro-tabs { margin: 4px 0 16px; background: rgba(255,255,255,.04); border-radius: 10px; padding: 4px; }
.auth-pro .auth-tab { padding: 9px 0; font-size: var(--t-fs-sm); }
.auth-pro .auth-field { display: block; margin-bottom: 12px; }
.auth-pro .auth-field span { display: block; font-size: var(--t-fs-sm); color: var(--muted); margin-bottom: 6px; }
.auth-pro .auth-field input {
  width: 100%; padding: 12px 13px; border-radius: 9px; border: 1px solid var(--border);
  background: rgba(255,255,255,.035); color: var(--text); font-size: 14px; outline: 0;
}
.auth-pro .auth-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.1); }
.auth-options { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 10px; font-size: var(--t-fs-sm); color: var(--muted); }
.auth-remember { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.auth-remember input, .auth-agree input { accent-color: var(--accent); width: 13px; height: 13px; margin: 0; }
.auth-only-pwd { color: var(--muted-2); font-size: var(--t-fs-sm); }
.auth-agree { display: flex; align-items: flex-start; gap: 7px; margin-bottom: 14px; font-size: var(--t-fs-sm); line-height: 1.7; color: var(--muted); cursor: pointer; }
.auth-agree input { flex: 0 0 13px; margin-top: 3px; }
.auth-legal-link { border: 0; background: transparent; padding: 0; color: var(--accent); font-size: inherit; cursor: pointer; }
.auth-legal-link:hover { text-decoration: underline; }
.auth-pro .pro-submit { margin-top: 0; padding: 13px; border-radius: 10px; font-size: 14px; letter-spacing: 2px; position: relative; overflow: hidden; }
.auth-pro .pro-submit::after { content: ''; position: absolute; top: 0; left: -60%; width: 35%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent); transform: skewX(-20deg); animation: auth-shine 4s ease-in-out infinite; }
@keyframes auth-shine { 0%,55% { left: -60%; } 85%,100% { left: 130%; } }
.auth-foot { text-align: center; margin-top: 12px; font-size: var(--t-fs-sm); color: var(--muted-2); }
.auth-foot button { border: 0; background: transparent; color: var(--accent); font-size: inherit; font-weight: 700; cursor: pointer; }
body.light .auth-pro .auth-field input { background: #fbf8f0; border-color: #d8c9a6; }
body.light .auth-pro .pro-tabs { background: #f2ecdc; }
body.light .auth-hero h3 { color: #211b12; }

/* 协议文档 */
.modal.variant-legal { width: min(620px, 94vw); }
.legal-doc { max-height: 58vh; overflow-y: auto; padding-right: 6px; }
.legal-doc h4 { margin: 16px 0 6px; font-size: var(--t-fs-sm); color: var(--accent); }
.legal-doc h4:first-child { margin-top: 0; }
.legal-doc p { margin: 0; font-size: var(--t-fs-sm); line-height: 1.85; color: var(--muted); }
.legal-back { margin-top: 18px; }
body.light .legal-doc p { color: #4e4638; }

/* 参考图锚点：提示词上的可悬停胶囊 + 悬停大图预览 */
.anchor-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.anchor-chips:empty { display: none; }
.anchor-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 160px;
  padding: 3px 8px 3px 4px; border-radius: 999px; cursor: help;
  border: 1px solid rgba(var(--accent-rgb),.45); background: rgba(var(--accent-rgb),.1);
  color: var(--accent); font-size: var(--t-fs-sm); font-weight: 700;
}
.anchor-chip img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.anchor-chip:hover { background: rgba(var(--accent-rgb),.2); border-color: var(--accent); }
.mention-preview {
  position: fixed; z-index: 10000; width: 224px; padding: 7px; border-radius: 11px; pointer-events: none;
  background: var(--panel); border: 1px solid rgba(var(--accent-rgb),.5);
  box-shadow: 0 18px 50px rgba(0,0,0,.6); animation: preview-in .14s ease-out;
}
.mention-preview img { width: 100%; height: 138px; object-fit: cover; border-radius: 7px; display: block; }
.mention-preview b { display: block; margin-top: 7px; font-size: var(--t-fs-sm); color: var(--accent); }
.mention-preview small { display: block; font-size: var(--t-fs-sm); color: var(--muted-2); }
@keyframes preview-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
body.light .mention-preview { background: #fff; box-shadow: 0 18px 50px rgba(60,42,10,.22); }

/* ===== 个人中心：头像 / 昵称 / 账号（放大版弹窗） ===== */
.modal.variant-profile { width: min(720px, 94vw); }
.modal.variant-profile .modal-body { padding: 22px 24px 24px; }
.user-avatar .avatar-img, .user-avatar .avatar-emoji { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.user-avatar .avatar-emoji { display: grid; place-items: center; font-size: 16px; }
.profile-avatar { padding: 0; border: 2px solid rgba(var(--accent-rgb),.65); cursor: pointer; overflow: hidden; transition: transform .15s; }
.profile-avatar:hover { transform: scale(1.06); }
.profile-avatar .avatar-img, .profile-avatar .avatar-emoji { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.profile-avatar .avatar-emoji { display: grid; place-items: center; font-size: 24px; }
.profile-form .field input:disabled { opacity: .6; cursor: not-allowed; }
.profile-form .field.full { grid-column: 1 / -1; }
.avatar-picker { margin-top: 12px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 11px; background: rgba(var(--accent-rgb),.05); }
.avatar-picker[hidden] { display: none; }
.ap-title { font-size: var(--t-fs-sm); color: var(--muted); margin-bottom: 10px; }
.ap-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; }
.ap-item { padding: 0; border: 2px solid transparent; border-radius: 50%; background: transparent; cursor: pointer; overflow: hidden; aspect-ratio: 1; transition: transform .14s, border-color .14s; }
.ap-item span { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; font-size: 20px; }
.ap-item:hover { transform: scale(1.08); }
.ap-item.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.18); }
.ap-upload-row { display: flex; gap: 10px; margin-top: 12px; }
.ap-upload, .ap-reset { flex: 1; text-align: center; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 8px; font-size: var(--t-fs-sm); color: var(--muted); cursor: pointer; background: transparent; }
.ap-upload:hover, .ap-reset:hover { color: var(--accent); border-color: var(--accent); }
body.light .avatar-picker { background: rgba(var(--accent-rgb),.07); }

/* ===== P2 画布节点：生成按钮 / 结果 / 设置面板 ===== */
.cv-node-actions { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-soft); }
.cv-node-actions button { flex: 1; padding: 5px 6px; font-size: var(--t-fs-sm); border-radius: 6px; border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); cursor: pointer; }
.cv-node-actions button:hover { color: var(--accent); border-color: var(--accent); }
.cv-node-actions .cv-gen-btn { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #171d27; border-color: transparent; font-weight: 700; }
.cv-node-actions .cv-gen-btn:hover { color: #171d27; filter: brightness(1.08); }
.cv-node-result { margin-top: 8px; }
.cv-gen-status { font-size: var(--t-fs-sm); padding: 4px 7px; border-radius: 5px; }
.cv-gen-status.running { color: var(--accent); background: rgba(var(--accent-rgb),.12); }
.cv-gen-status.done { color: #5ad19b; background: rgba(90,209,155,.1); }
.cv-gen-status.failed { color: var(--color-danger); background: rgba(251,113,133,.1); }
.cv-gen-bar { height: 3px; margin-top: 5px; border-radius: 3px; background: var(--border-soft); overflow: hidden; }
.cv-gen-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #bfe0f7); transition: width .3s; }
.cv-result-text { font-size: var(--t-fs-sm); color: var(--muted); line-height: 1.5; margin-top: 6px; word-break: break-all; }
.cv-result-grid { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.cv-result-grid img, .cv-result-grid video { width: 60px; height: 60px; object-fit: cover; border-radius: 5px; border: 1px solid var(--border); cursor: zoom-in; }
.cv-settings { display: flex; flex-direction: column; gap: 10px; }
.cv-field { display: flex; flex-direction: column; gap: 5px; }
.cv-field > span { font-size: var(--t-fs-sm); color: var(--muted); }
.cv-field textarea, .cv-field input, .cv-field select { width: 100%; border: 1px solid var(--border); background: var(--panel-2); border-radius: 8px; padding: 8px 10px; font-size: var(--t-fs-sm); color: var(--text); outline: 0; resize: vertical; }
.cv-field textarea:focus, .cv-field input:focus, .cv-field select:focus { border-color: var(--accent); }
.cv-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cv-preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cv-preset-row b { font-size: var(--t-fs-sm); color: var(--muted); }
.cv-preset { padding: 5px 8px; font-size: var(--t-fs-sm); border: 1px solid var(--border); border-radius: 6px; background: var(--panel-2); color: var(--accent); cursor: pointer; }
.cv-ref-note { font-size: var(--t-fs-sm); color: var(--muted-2); line-height: 1.5; }
.cv-voice-ref-wrap[hidden] { display: none; }
.cv-voice-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.cv-voice-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 7px; background: rgba(var(--accent-rgb), .08); font-size: var(--t-fs-sm); }
.cv-voice-chip b { cursor: pointer; font-weight: 700; opacity: .7; }
.cv-voice-chip b:hover { color: var(--danger); opacity: 1; }
.cv-voice-ref-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 4px 7px; border: 1px solid var(--border); border-radius: 7px; background: rgba(var(--accent-rgb), .08); font-size: var(--t-fs-sm); }
.cv-voice-ref-chip i { cursor: pointer; font-style: normal; opacity: .7; }
.cv-voice-ref-chip i:hover { color: var(--danger); opacity: 1; }
.cv-video-ref-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 4px 7px; border: 1px solid var(--border); border-radius: 7px; background: rgba(var(--accent-rgb), .08); font-size: var(--t-fs-sm); }
.cv-video-ref-chip i { cursor: pointer; font-style: normal; opacity: .7; }
.cv-video-ref-chip i:hover { color: var(--danger); opacity: 1; }
.cv-node-cost { font-size: var(--t-fs-sm); color: var(--muted); padding: 9px 11px; background: rgba(var(--accent-rgb),.08); border-radius: 8px; }
.cv-node-cost b { color: var(--yellow); }
.modal.variant-agent .cv-settings { padding: 16px 18px; }
.modal.variant-agent .modal-actions { padding: 0 18px 16px; }

/* ===== P3 灵感画坊 ===== */
.idea-rail { width: 230px; flex: 0 0 230px; }
.idea-tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--border); }
.idea-tabs button { flex: 1; padding: 8px 4px; font-size: var(--t-fs-sm); border: 1px solid var(--border); border-radius: 7px; background: var(--panel-2); color: var(--muted); cursor: pointer; }
.idea-tabs button.active { background: rgba(var(--accent-rgb),.16); color: var(--accent); border-color: var(--accent); }
.idea-new { width: calc(100% - 20px); margin: 10px; padding: 9px; font-size: var(--t-fs-sm); border: 1px dashed var(--accent); border-radius: 8px; background: transparent; color: var(--accent); cursor: pointer; }
.idea-search { display: flex; align-items: center; gap: 6px; margin: 0 10px 10px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; }
.idea-search svg { width: 14px; height: 14px; color: var(--muted); }
.idea-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font-size: var(--t-fs-sm); outline: 0; }
.idea-list { flex: 1; overflow-y: auto; padding: 0 10px 10px; }
.idea-item { position: relative; padding: 9px 10px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.idea-item:hover, .idea-item.active { border-color: var(--accent); background: rgba(var(--accent-rgb),.08); }
.idea-item b { display: block; font-size: var(--t-fs-sm); }
.idea-item span { display: block; font-size: var(--t-fs-sm); color: var(--muted); margin-top: 3px; }
.idea-item-del { position: absolute; top: 6px; right: 6px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; }
.idea-empty, .idea-empty-mini { text-align: center; color: var(--muted); font-size: var(--t-fs-sm); padding: 30px 10px; }
.idea-empty-mini { padding: 18px 8px; font-size: var(--t-fs-sm); }
.idea-main { flex: 1; overflow-y: auto; padding: 16px 20px; }
.idea-wrap { display: flex; flex-direction: column; gap: 16px; max-width: 980px; }
.idea-sec { border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px; background: rgba(255,255,255,.015); }
.idea-sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.idea-sec-head b { font-size: var(--t-fs-sm); color: var(--accent); }
.idea-sec-head span { font-size: var(--t-fs-sm); color: var(--muted); }
.idea-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.idea-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.idea-field > span { font-size: var(--t-fs-sm); color: var(--muted); }
.idea-field input, .idea-field select, .idea-field textarea { width: 100%; border: 1px solid var(--border); background: var(--panel-2); border-radius: 8px; padding: 8px 10px; font-size: var(--t-fs-sm); color: var(--text); outline: 0; resize: vertical; }
.idea-field textarea:focus, .idea-field input:focus, .idea-field select:focus { border-color: var(--accent); }
.idea-prompt-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.idea-prompt-bar button { padding: 4px 9px; font-size: var(--t-fs-sm); border: 1px solid var(--border); border-radius: 6px; background: var(--panel-2); color: var(--accent); cursor: pointer; }
.idea-prompt-bar span { font-size: var(--t-fs-sm); color: var(--muted); }
.idea-chat { border: 1px solid var(--border); border-radius: 9px; margin-bottom: 12px; overflow: hidden; }
.idea-chat-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 11px; background: rgba(var(--accent-rgb),.08); }
.idea-chat-head b { font-size: var(--t-fs-sm); }
.idea-chat-head button { border: 0; background: transparent; color: var(--muted); font-size: var(--t-fs-sm); cursor: pointer; }
.idea-chat-list { max-height: 180px; overflow-y: auto; padding: 9px 11px; }
.idea-chat-msg { display: flex; gap: 8px; margin-bottom: 8px; font-size: var(--t-fs-sm); line-height: 1.5; }
.idea-chat-msg b { flex: 0 0 22px; color: var(--accent); }
.idea-chat-msg.assistant b { color: #6ec1ff; }
.idea-chat-msg span { white-space: pre-wrap; word-break: break-word; }
.idea-chat-empty { font-size: var(--t-fs-sm); color: var(--muted); text-align: center; padding: 14px; }
.idea-chat-input { display: flex; border-top: 1px solid var(--border); }
.idea-chat-input input { flex: 1; border: 0; background: transparent; color: var(--text); padding: 9px 11px; font-size: var(--t-fs-sm); outline: 0; }
.idea-chat-input button { padding: 0 14px; border: 0; background: var(--accent); color: #171d27; font-weight: 700; font-size: var(--t-fs-sm); cursor: pointer; }
.idea-tpl-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.idea-tpl-row button { padding: 7px 11px; font-size: var(--t-fs-sm); border: 1px solid var(--border); border-radius: 7px; background: var(--panel-2); color: var(--accent); cursor: pointer; }
.idea-tpl-row span { font-size: var(--t-fs-sm); color: var(--muted); }
.idea-cost-row { font-size: var(--t-fs-sm); color: var(--muted); padding: 8px 0; }
.idea-cost-row b { color: var(--yellow); }
.idea-actions { display: flex; gap: 10px; margin-top: 6px; }
.idea-actions .primary-btn { flex: 1; margin-top: 0; }
.idea-task { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-bottom: 1px solid var(--border-soft); font-size: var(--t-fs-sm); }
.idea-task:last-child { border-bottom: 0; }
.idea-task b { color: var(--accent); }
.idea-task span, .idea-task small { color: var(--muted); }
.idea-task-dot { width: 8px; height: 8px; border-radius: 50%; background: #f0b429; flex: 0 0 8px; }
.idea-task-dot.ok { background: #5ad19b; }
.idea-task-dot.bad { background: var(--color-danger); }
.idea-assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.idea-asset { border: 1px solid var(--border); border-radius: 9px; padding: 7px; cursor: grab; }
.idea-asset.failed { border-color: rgba(251,113,133,.4); }
.idea-asset img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 6px; display: block; cursor: zoom-in; background: #000; }
.idea-asset-ph { width: 100%; aspect-ratio: 9/16; display: grid; place-items: center; color: var(--color-danger); font-size: var(--t-fs-sm); background: rgba(251,113,133,.06); border-radius: 6px; }
.idea-asset-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; font-size: var(--t-fs-sm); color: var(--muted); }
.idea-asset-meta input { width: 46px; border: 1px solid var(--border); border-radius: 5px; background: var(--panel-2); color: var(--text); padding: 3px 5px; font-size: var(--t-fs-sm); }
.idea-asset-meta a, .idea-asset-meta button { color: var(--accent); text-decoration: none; border: 0; background: transparent; cursor: pointer; font-size: var(--t-fs-sm); }
.idea-asset small { display: block; font-size: var(--t-fs-sm); color: var(--muted-2); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idea-asset-actions { display: flex; gap: 10px; margin-top: 12px; }
.idea-asset-actions button { flex: 1; padding: 9px; font-size: var(--t-fs-sm); border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); color: var(--muted); cursor: pointer; }
.idea-asset-actions .primary-btn { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #171d27; font-weight: 700; }

/* ===== P4 剪映草稿模板弹窗 ===== */
.jy-wrap { display: grid; grid-template-columns: 1fr 210px; gap: 18px; }
.jy-form { display: flex; flex-direction: column; gap: 9px; }
.jy-field { display: flex; flex-direction: column; gap: 5px; }
.jy-field > span { font-size: var(--t-fs-sm); color: var(--muted); }
.jy-field input, .jy-field select { width: 100%; border: 1px solid var(--border); background: var(--panel-2); border-radius: 7px; padding: 7px 9px; font-size: var(--t-fs-sm); color: var(--text); outline: 0; }
.jy-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jy-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.jy-sec { font-size: var(--t-fs-sm); color: var(--accent); font-weight: 700; padding-top: 6px; border-top: 1px solid var(--border-soft); }
.jy-chip-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; max-height: 84px; overflow-y: auto; }
.jy-chip { padding: 4px 8px; font-size: var(--t-fs-sm); border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); color: var(--muted); cursor: pointer; }
.jy-chip:hover, .jy-chip.active { border-color: var(--accent); color: var(--accent); }
.jy-chip.vip { border-style: dashed; }
.jy-filter { display: flex; gap: 5px; }
.jy-filter button { padding: 3px 9px; font-size: var(--t-fs-sm); border: 1px solid var(--border); border-radius: 6px; background: var(--panel-2); color: var(--muted); cursor: pointer; }
.jy-filter button.active { color: var(--accent); border-color: var(--accent); }
.jy-check { display: flex; align-items: center; gap: 5px; font-size: var(--t-fs-sm); color: var(--muted); margin-top: 5px; }
.jy-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.jy-preview p { font-size: var(--t-fs-sm); color: var(--muted); }
.jy-phone { position: relative; width: 160px; height: 284px; border: 6px solid #2a2620; border-radius: 16px; overflow: hidden; background: #000; transition: width .2s, height .2s; }
.jy-bg { position: absolute; inset: 0; }
.jy-frame { position: relative; width: 100%; height: 100%; margin: 0 auto; display: grid; place-items: center; font-size: var(--t-fs-sm); color: rgba(255,255,255,.5); }
.jy-title, .jy-sub { position: absolute; left: 0; right: 0; text-align: center; }
.jy-title { top: 10px; }
.jy-sub { bottom: 12px; }
body.light .idea-sec { background: rgba(0,0,0,.015); }

/* 灵感画坊：三栏工作台（左任务/项目 · 中参数 · 右图片集） */
.idea-main { padding: 12px 14px; }
.idea-wrap.idea-cols { display: grid; grid-template-columns: 224px minmax(360px, 1fr) minmax(460px, 1.35fr); gap: 10px; max-width: none; width: 100%; height: 100%; align-items: stretch; }
.idea-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; }
.idea-col > .idea-sec { flex: 1; min-height: 0; overflow-y: auto; }
.idea-col-param > .idea-sec { flex: 1; }
.idea-col-assets > .idea-sec { display: flex; flex-direction: column; }
.idea-sec-assets .idea-assets { flex: 1; overflow-y: auto; align-content: start; }
.idea-sec-head { align-items: center; }
.idea-sec-head b { font-size: 14px; }
.idea-sec-head span { font-size: var(--t-fs-sm); }
.idea-project-mini { display: flex; flex-direction: column; gap: 6px; }
.idea-mini-item { position: relative; display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2); color: var(--text); cursor: pointer; }
.idea-mini-item:hover { border-color: var(--accent); }
.idea-mini-item.active { border-color: var(--accent); background: rgba(var(--accent-rgb),.1); }
.idea-mini-item b { font-size: var(--t-fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idea-mini-item small { font-size: var(--t-fs-sm); color: var(--muted); }
.idea-mini-item em { position: absolute; right: 8px; top: 9px; font-size: var(--t-fs-sm); font-style: normal; color: var(--accent); }
.idea-asset-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.idea-asset-bar button, .idea-asset-bar select { border: 1px solid var(--border); border-radius: 7px; background: var(--panel-2); color: var(--text); padding: 5px 9px; font-size: var(--t-fs-sm); cursor: pointer; }
.idea-asset-bar label { font-size: var(--t-fs-sm); color: var(--muted); display: flex; align-items: center; gap: 4px; }
.idea-asset-bar select { margin-left: auto; }
.idea-assets { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.idea-asset img { aspect-ratio: 9/16; }
.idea-asset-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: var(--t-fs-sm); }
.idea-asset-ph button { border: 1px solid rgba(251,113,133,.5); background: rgba(251,113,133,.12); color: var(--color-danger); border-radius: 6px; padding: 4px 8px; font-size: var(--t-fs-sm); cursor: pointer; }
.idea-asset-state { font-size: var(--t-fs-sm); padding: 1px 5px; border-radius: 4px; }
.idea-asset-state.ok { color: #6ee7b7; background: rgba(110,231,183,.1); }
.idea-asset-state.bad { color: var(--color-danger); background: rgba(251,113,133,.1); }
.idea-all-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 70vh; overflow-y: auto; }
.idea-all-grid img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 7px; cursor: zoom-in; }
body.light .idea-mini-item.active { background: #f5ead2; }
@media (max-width: 1180px) { .idea-wrap.idea-cols { grid-template-columns: 190px minmax(300px,1fr) minmax(380px,1.15fr); } }

/* 配音工作台：真人主播中心 */
.voice-wrap { max-width: none; height: 100%; }
.voice-grid { grid-template-columns: minmax(330px, .85fr) minmax(430px, 1.15fr); height: calc(100% - 58px); }
.voice-card-panel { overflow-y: auto; }
.voice-left { display: flex; flex-direction: column; }
.voice-tabs-bar { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: -4px 0 12px; }
.voice-tabs-bar button { flex: 1; padding: 9px 4px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: var(--t-fs-sm); cursor: pointer; }
.voice-tabs-bar button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.voice-filters { flex-direction: column; gap: 5px; }
.voice-filter-row { display: flex; gap: 8px; align-items: baseline; }
.voice-filter-row > span { flex: 0 0 30px; font-size: var(--t-fs-sm); color: var(--muted); }
.voice-filter-row > div { display: flex; gap: 5px; flex-wrap: wrap; }
.voice-filter-row button { padding: 4px 9px; font-size: var(--t-fs-sm); }
.voice-list { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; max-height: none; flex: 1; align-content: start; }
.voice-card { padding: 11px 6px 8px; }
.voice-ava { width: 46px; height: 46px; font-size: 16px; color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.voice-card b { font-size: var(--t-fs-sm); }
.voice-card small { font-size: var(--t-fs-sm); }
.voice-card em.on { color: #7fc4f0; background: rgba(127,196,240,.12); border-color: #7fc4f0; }
.voice-play { display: inline-block; margin-top: 3px; padding: 3px 9px; border-radius: 10px; background: rgba(var(--accent-rgb),.14); color: var(--accent); font-size: var(--t-fs-sm); font-style: normal; }
.voice-detail { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.voice-detail-ava { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.voice-detail-info { display: flex; flex-direction: column; gap: 5px; }
.voice-detail-info b { font-size: 14px; }
.voice-detail-info span { font-size: var(--t-fs-sm); color: var(--muted); }
.voice-detail-info button { align-self: flex-start; padding: 4px 12px; border: 1px solid var(--accent); border-radius: 14px; background: transparent; color: var(--accent); font-size: var(--t-fs-sm); cursor: pointer; }
.voice-out-actions button { flex: 1; }
.voice-sliders label { grid-template-columns: 64px 40px 1fr; font-size: var(--t-fs-sm); }

/* 画布节点：选中展开 / 简洁态 / 比例预览 / @参考图 */
.cv-node-head { height: 40px; }
.cv-node-head b { font-size: var(--t-fs-sm); font-weight: 600; }
.cv-node-type { margin-left: 2px; padding: 2px 7px; border-radius: 10px; background: rgba(var(--accent-rgb),.1); color: var(--accent); font-size: var(--t-fs-cap); font-weight: 600; letter-spacing: .3px; }
.cv-stage { height: 168px; width: calc(100% - 16px); margin: 8px; }
.cv-node.selected .cv-stage { height: auto; min-height: 168px; }
/* 比例实心预览：JS 按 9:16/1:1/16:9 计算内联 height；完整显示图片，禁止裁切人头 */
.cv-stage-media { object-fit: contain; }
/* 上游引用卡片：连线即引用的可视化 */
.cv-uprefs { display: flex; align-items: center; gap: 6px; padding: 0 8px 7px; flex-wrap: wrap; }
.cv-uprefs-label { font-size: var(--t-fs-cap); color: var(--muted-2); padding: 3px 6px; border-radius: 5px; background: rgba(255,255,255,.03); }
.cv-upref { display: inline-flex; align-items: center; gap: 5px; max-width: 150px; padding: 3px 7px 3px 3px; border-radius: 8px; border: 1px solid rgba(var(--accent-rgb),.35); background: rgba(var(--accent-rgb),.08); }
.cv-upref img, .cv-upref b { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 5px; object-fit: cover; display: grid; place-items: center; background: var(--panel-3); color: var(--accent); font-size: var(--t-fs-sm); font-weight: 400; }
.cv-upref em { font-size: var(--t-fs-cap); font-style: normal; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 提示词里的上游文本引用 */
.cv-node-prompt { font-size: var(--t-fs-sm); padding: 9px 11px; }
.cv-node-prompt.has-ref { display: flex; flex-direction: column; gap: 4px; }
.cv-prompt-ref { display: block; padding: 5px 8px; border-left: 2px solid var(--accent); border-radius: 0 6px 6px 0; background: rgba(var(--accent-rgb),.08); color: var(--accent); font-size: var(--t-fs-sm); line-height: 1.5; word-break: break-all; }
.cv-prompt-own { color: var(--muted); font-size: var(--t-fs-sm); }
body.light .cv-prompt-ref { color: var(--accent-2); }
.cv-preset-chip, .cv-mini-select, .cv-node-foot button { font-size: var(--t-fs-sm); }
.cv-node-cost { font-size: var(--t-fs-sm); }
.cv-stage-empty { font-size: var(--t-fs-sm); }
.cv-stage-empty b { font-size: 48px; }
.cv-stage-text { font-size: var(--t-fs-sm); }
.cv-refs { display: flex; align-items: center; gap: 6px; padding: 0 8px 7px; flex-wrap: wrap; }
.cv-ref-add { padding: 5px 9px; border: 1px dashed var(--accent); border-radius: 7px; background: transparent; color: var(--accent); font-size: var(--t-fs-sm); cursor: pointer; }
.cv-ref-thumb { position: relative; width: 42px; height: 42px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.cv-ref-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cv-ref-thumb i { position: absolute; right: 0; top: 0; width: 18px; height: 18px; display: grid; place-items: center; background: rgba(0,0,0,.65); color: #fff; font-size: var(--t-fs-sm); font-style: normal; cursor: pointer; }
.cv-ref-picker { display: flex; flex-direction: column; gap: 14px; max-height: 62vh; overflow-y: auto; }
.cv-ref-group h5 { font-size: var(--t-fs-sm); color: var(--accent); margin: 0 0 8px; }
.cv-ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.cv-ref-grid button { display: flex; flex-direction: column; gap: 4px; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); color: var(--text); cursor: pointer; }
.cv-ref-grid button:hover { border-color: var(--accent); }
.cv-ref-grid img, .cv-ref-ph { width: 100%; height: 78px; object-fit: cover; border-radius: 5px; background: var(--panel-3); display: grid; place-items: center; font-size: 24px; color: var(--muted); }
.cv-ref-grid b { font-size: var(--t-fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-ref-none { font-size: var(--t-fs-sm); color: var(--muted); }
.cv-ref-upload { display: inline-block; padding: 8px 14px; border: 1px dashed var(--accent); border-radius: 8px; color: var(--accent); font-size: var(--t-fs-sm); cursor: pointer; }
.cv-ref-tip { font-size: var(--t-fs-sm); color: var(--muted); margin: 0; }

/* 智能体广场：竖排大卡片 + 艺术字 */
.ag-list { grid-template-columns: 1fr; gap: 14px; padding: 6px 22px 22px; }
.ag-card-lg { display: flex; flex-direction: row; align-items: stretch; gap: 0; padding: 0; overflow: hidden; border-radius: 14px; }
.ag-cover { position: relative; flex: 0 0 44%; min-height: 178px; overflow: hidden; background: #10151d; }
.ag-cover svg { width: 100%; height: 100%; display: block; }
.ag-cover-tag { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 20px; background: rgba(0,0,0,.5); color: #dcecf9; font-size: var(--t-fs-sm); backdrop-filter: blur(4px); }
.ag-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; }
.ag-en { font-size: var(--t-fs-sm); letter-spacing: 3px; color: var(--accent); opacity: .85; font-weight: 700; }
.ag-name { display: flex; align-items: center; gap: 12px; }
.ag-name b { font-size: 32px; letter-spacing: 3px; font-weight: 800; line-height: 1.1; background: linear-gradient(100deg, #dcecf9, var(--accent) 55%, #dcecf9); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 2px 10px rgba(var(--accent-rgb),.25)); }
.ag-name .ag-card-ico { flex: 0 0 42px; height: 42px; }
.ag-desc { font-size: var(--t-fs-sm); color: var(--text); line-height: 1.6; }
.ag-detail { margin-top: auto; font-style: normal; font-size: var(--t-fs-sm); color: var(--accent); letter-spacing: .5px; }
body.light .ag-name b { background: linear-gradient(100deg, #8a6a26, #b3863a 55%, #8a6a26); -webkit-background-clip: text; background-clip: text; }
body.light .ag-cover { background: #e8eff8; }
.manual-top-switch { margin-bottom: 14px; }
body.light .jy-phone { border-color: #d8cfbe; }

/* ===== 创作台模型使用手册 ===== */
.model-manual-entry { border-color: var(--accent) !important; color: var(--accent) !important; }
.modal.variant-manual { width: min(860px, 95vw); }
.modal.variant-manual .modal-body { padding: 16px 20px 22px; }
.manual-wrap { display: flex; flex-direction: column; gap: 14px; max-height: 70vh; overflow-y: auto; padding-right: 4px; }
.manual-card { border: 1px solid var(--border); border-radius: 11px; padding: 13px 15px; background: rgba(255,255,255,.02); }
.manual-head { display: flex; align-items: center; gap: 10px; }
.manual-ico { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.manual-ico svg { width: 26px; height: 26px; }
.manual-head b { font-size: var(--t-fs-sm); }
.manual-head small { display: block; font-size: var(--t-fs-sm); color: var(--muted); margin-top: 2px; }
.manual-intro { font-size: var(--t-fs-sm); color: var(--muted); line-height: 1.65; margin: 9px 0; }
.manual-block h5 { font-size: var(--t-fs-sm); color: var(--accent); margin: 8px 0 5px; }
.manual-block ol, .manual-block ul { margin: 0; padding-left: 18px; }
.manual-block li { font-size: var(--t-fs-sm); line-height: 1.7; color: var(--text); }
.manual-cost { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 10px; border-radius: 7px; background: rgba(var(--accent-rgb),.08); font-size: var(--t-fs-sm); color: var(--yellow); }
.manual-cost svg { width: 14px; height: 14px; }
body.light .manual-card { background: rgba(0,0,0,.015); }

/* ===== 智能体使用手册 ===== */
.am-manual-btn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); font-size: var(--t-fs-sm); cursor: pointer; }
.am-manual-btn svg { width: 14px; height: 14px; color: var(--accent); }
.am-manual-btn:hover { border-color: var(--accent); color: var(--accent); }
.manual-switch { display: flex; gap: 8px; margin-bottom: 12px; }
.manual-switch button { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: var(--t-fs-sm); cursor: pointer; }
.manual-switch button.active { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb),.08); }
.agent-manual-card .manual-ico svg { width: 20px; height: 20px; }
.manual-pairs { display: flex; flex-direction: column; gap: 7px; }
.manual-pairs > div { display: grid; grid-template-columns: 116px 1fr; gap: 10px; align-items: start; }
.manual-pairs b { font-size: var(--t-fs-sm); color: var(--yellow); font-weight: 600; }
.manual-pairs span { font-size: var(--t-fs-sm); line-height: 1.65; color: var(--text); }
.manual-keys { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px 12px; }
.manual-keys > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--t-fs-sm); }
.manual-keys kbd { font-size: var(--t-fs-sm); padding: 2px 6px; border: 1px solid var(--border); border-radius: 5px; color: var(--accent); background: rgba(255,255,255,.03); white-space: nowrap; }
.manual-code { margin: 4px 0; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; background: rgba(0,0,0,.22); color: var(--text); font: 11px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.manual-cost-list { display: flex; flex-direction: column; gap: 7px; padding: 9px 11px; border-radius: 7px; background: rgba(var(--accent-rgb),.08); }
.manual-cost-list > div { display: flex; gap: 7px; align-items: flex-start; font-size: var(--t-fs-sm); line-height: 1.6; color: var(--yellow); }
.manual-cost-list svg { flex: 0 0 14px; width: 14px; height: 14px; margin-top: 1px; }
body.light .manual-switch button.active { background: rgba(var(--accent-rgb),.12); }
body.light .manual-code { background: rgba(0,0,0,.04); }
body.light .manual-keys kbd { background: rgba(0,0,0,.03); }

/* ============================================================
   青鸟配音：三栏工作台（文案 / 主播中心 / 主播详情）
   只按截图模板还原布局，配色继续跟随当前三套主题。
   ============================================================ */
.audio-view {
  width: min(1480px, 100%);
  padding: 14px 18px 16px;
}
.dub-workbench { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.dub-toolbar {
  flex: 0 0 auto; display: flex; align-items: stretch; gap: 2px;
  padding: 6px 8px; border: 1px solid var(--border-soft); border-radius: 11px;
  background: var(--panel); overflow-x: auto; scrollbar-width: thin;
}
.dub-tool {
  position: relative; flex: 0 0 62px; min-height: 48px; padding: 5px 2px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  transition: background .16s ease, color .16s ease;
}
.dub-tool:hover { background: rgba(var(--accent-rgb),.1); color: var(--text); }
.dub-tool-ico { width: 20px; height: 20px; display: grid; place-items: center; }
.dub-tool-ico svg { width: 18px; height: 18px; color: var(--accent); }
.dub-tool-label { font-size: var(--t-fs-cap); line-height: 1.2; white-space: nowrap; }
.dub-tool-badge {
  position: absolute; top: 2px; right: 5px; font-size: var(--t-fs-cap); font-style: normal; font-weight: 800;
  color: #fff; background: #e9a13b; border-radius: 4px; padding: 0 3px; line-height: 13px;
}
.dub-tool-badge.pro { background: #8a6de0; }
.dub-cols {
  flex: 1 1 auto; min-height: 0; display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr) 286px; gap: 10px;
}
.dub-panel {
  min-width: 0; min-height: 0; display: flex; flex-direction: column;
  border: 1px solid var(--border-soft); border-radius: 12px;
  background: var(--panel); overflow: hidden;
}
.dub-panel-head { flex: 0 0 auto; padding: 13px 15px 0; }
.dub-panel-head b { display: block; font-size: 14px; color: var(--accent); }
.dub-panel-head span { display: block; margin-top: 4px; font-size: var(--t-fs-sm); color: var(--muted-2); }
.dub-text-wrap { position: relative; flex: 1 1 auto; min-height: 160px; padding: 10px 15px; }
.dub-textarea {
  width: 100%; height: 100%; min-height: 150px; resize: none; border: 0; outline: 0;
  background: transparent; color: var(--text); font-size: var(--t-fs-sm); line-height: 1.8; padding: 0;
}
.dub-textarea::placeholder { color: var(--muted-2); }
/* 文案区：有内容时收起占位副标题 */
.dub-text-panel .dub-panel-head.has-text span { display: none; }
/* KTV 逐字跟读层：生成后覆盖在 textarea 上，播放时逐字高亮 */
.dub-karaoke { position: absolute; inset: 10px 15px; display: flex; flex-direction: column; background: var(--panel); z-index: 3; }
.dub-karaoke[hidden] { display: none; }
.dub-karaoke-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); margin-bottom: 8px; }
.dub-karaoke-play { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; border: 0; background: var(--accent); color: #0b0b0b; font-size: var(--t-fs-sm); line-height: 1; cursor: pointer; }
.dub-karaoke-label { flex: 1; font-size: var(--t-fs-cap); color: var(--muted-2); }
.dub-karaoke-edit { border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); border-radius: 6px; padding: 3px 8px; font-size: var(--t-fs-cap); cursor: pointer; }
.dub-karaoke-edit:hover { border-color: var(--accent); color: var(--accent); }
.dub-karaoke-text { flex: 1 1 auto; overflow-y: auto; font-size: 14px; line-height: 2.05; color: var(--muted); letter-spacing: .3px; }
.dub-karaoke-text .kch { color: var(--text); transition: color .12s, text-shadow .12s; }
.dub-karaoke-text .kch.read { color: var(--accent); }
.dub-karaoke-text .kch.cur { color: var(--accent); font-weight: 800; font-size: 16px; text-shadow: 0 0 10px rgba(var(--accent-rgb),.7); }
.dub-karaoke-text .kbr { display: block; }
.dub-added {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 12px; border-radius: 9px; background: rgba(var(--accent-rgb),.16);
  border: 1px solid rgba(var(--accent-rgb),.35); color: var(--accent); font-size: var(--t-fs-sm);
}
.dub-added svg { width: 24px; height: 24px; }
.dub-guide { flex: 0 0 auto; margin: 0 15px 10px; padding: 10px 12px; border-radius: 8px; background: rgba(var(--accent-rgb),.05); border: 1px solid var(--border-soft); }
.dub-guide b { display: block; font-size: var(--t-fs-sm); color: var(--text); margin-bottom: 4px; }
.dub-guide p { margin: 2px 0; font-size: var(--t-fs-sm); color: var(--muted-2); line-height: 1.6; }
.dub-ai-note { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; margin: 0 15px 9px; font-size: var(--t-fs-sm); color: var(--muted); cursor: pointer; }
.dub-ai-note input { accent-color: var(--accent); }
.dub-text-foot { flex: 0 0 auto; padding: 0 15px 12px; }
.dub-text-foot > span { display: block; text-align: right; font-size: var(--t-fs-sm); color: var(--muted-2); margin-bottom: 8px; }
.dub-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.dub-action {
  height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); font-size: var(--t-fs-sm);
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.dub-action svg { width: 14px; height: 14px; color: var(--accent); }
.dub-action:hover:not(:disabled) { border-color: var(--accent); }
.dub-action:disabled { opacity: .42; cursor: not-allowed; }
.dub-action.primary { border-color: transparent; background: var(--accent); color: #0b0b0b; font-weight: 700; }
.dub-action.primary svg { color: #0b0b0b; }
.dub-cost-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; font-size: var(--t-fs-sm); color: var(--muted); }

.dub-tabs { flex: 0 0 auto; display: flex; gap: 16px; padding: 11px 14px 0; border-bottom: 1px solid var(--border-soft); }
.dub-tabs button { border: 0; background: transparent; color: var(--muted-2); font-size: var(--t-fs-sm); padding: 0 2px 9px; position: relative; }
.dub-tabs button.active { color: var(--accent); font-weight: 700; }
.dub-tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.dub-search { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; margin: 10px 14px; padding: 0 10px; height: 32px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); }
.dub-search svg { width: 15px; height: 15px; color: var(--muted-2); }
.dub-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: var(--t-fs-sm); }
.dub-search input::placeholder { color: var(--muted-2); }
.dub-filters { flex: 0 0 auto; max-height: 176px; overflow-y: auto; padding: 0 14px 8px; }
.dub-filter-row { display: grid; grid-template-columns: 34px 1fr; gap: 7px; align-items: start; margin-bottom: 6px; }
.dub-filter-row > span { font-size: var(--t-fs-sm); color: var(--muted); line-height: 22px; }
.dub-filter-row > div { display: flex; flex-wrap: wrap; gap: 4px 5px; }
.dub-filter-row button { border: 0; background: transparent; color: var(--muted-2); font-size: var(--t-fs-cap); padding: 3px 7px; border-radius: 6px; }
.dub-filter-row button:hover { color: var(--text); }
.dub-filter-row button.active { color: #0b0b0b; background: var(--accent); font-weight: 700; }
.dub-voice-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 14px 14px; align-content: start; }
.dub-voice-card {
  min-width: 0; min-height: 84px; padding: 8px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); text-align: left;
  display: flex; align-items: center; gap: 8px; position: relative;
}
.dub-voice-card:hover { border-color: var(--accent); }
.dub-voice-card.active { border-color: var(--accent); background: rgba(var(--accent-rgb),.12); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),.2); }
.dub-voice-ava { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 700; overflow: hidden; }
.dub-voice-ava svg, .dub-detail-ava svg { width: 100%; height: 100%; display: block; }
.dub-detail-ava { overflow: hidden; }
.dub-voice-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dub-voice-info b { font-size: var(--t-fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dub-voice-info small { font-size: var(--t-fs-cap); color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dub-voice-badge { align-self: flex-start; font-size: var(--t-fs-cap); font-style: normal; color: var(--accent); border: 1px solid rgba(var(--accent-rgb),.35); border-radius: 4px; padding: 0 4px; line-height: 14px; }
.dub-voice-lock { position: absolute; right: 7px; bottom: 7px; color: var(--accent); opacity: .75; }
.dub-voice-lock svg { width: 13px; height: 13px; }
.dub-custom-card { flex-direction: column; justify-content: center; text-align: center; border-style: dashed; gap: 3px; }
.dub-custom-card b { font-size: var(--t-fs-sm); }
.dub-custom-card small { font-size: var(--t-fs-cap); color: var(--muted-2); }
.dub-ava-custom { background: rgba(var(--accent-rgb),.15); color: var(--accent); border: 1px dashed rgba(var(--accent-rgb),.5); }
.dub-ava-custom svg { width: 20px; height: 20px; }
.dub-empty { grid-column: 1 / -1; padding: 30px 10px; text-align: center; color: var(--muted-2); font-size: var(--t-fs-sm); }

.dub-detail-panel { padding: 14px; overflow-y: auto; }
.dub-detail-voice { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border-soft); }
.dub-detail-ava { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 16px; font-weight: 700; }
.dub-detail-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.dub-detail-meta b { font-size: var(--t-fs-sm); }
.dub-detail-meta span { font-size: var(--t-fs-cap); color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dub-fav { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--muted-2); }
.dub-fav.on, .dub-fav:hover { color: var(--accent); border-color: var(--accent); }
.dub-trial { margin: 12px 0; height: 30px; padding: 0 14px; border-radius: 16px; border: 1px solid rgba(var(--accent-rgb),.45); background: rgba(var(--accent-rgb),.1); color: var(--accent); display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-fs-sm); }
.dub-trial svg { width: 15px; height: 15px; }
.dub-trial.loading { opacity: .55; pointer-events: none; }
.dub-sliders { display: flex; flex-direction: column; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border-soft); }
.dub-sliders label { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; font-size: var(--t-fs-sm); color: var(--muted); }
.dub-sliders label b { color: var(--text); font-weight: 600; }
.dub-sliders input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.dub-detail-foot { display: flex; gap: 6px; margin-top: auto; padding-top: 12px; }
.dub-detail-foot span { font-size: var(--t-fs-cap); color: var(--muted-2); border: 1px solid var(--border-soft); border-radius: 5px; padding: 2px 6px; }

.modal.variant-dubbing { width: min(560px, 94vw); }
.modal.variant-dubbing .modal-body { padding: 18px 20px 20px; }
.dub-clone-modal, .dub-notice-modal { color: var(--text); }
.dub-clone-notice { display: flex; align-items: center; gap: 7px; font-size: var(--t-fs-sm); color: var(--text); margin-bottom: 9px; white-space: nowrap; }
.dub-clone-notice button { width: 17px; height: 17px; padding: 0; border-radius: 50%; border: 1px solid var(--accent); background: transparent; color: var(--accent); font-size: var(--t-fs-cap); line-height: 14px; font-style: italic; }
.dub-clone-notice button:hover { background: rgba(var(--accent-rgb),.16); }
.dub-clone-req { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 14px; padding: 10px 12px; border-radius: 8px; background: rgba(var(--accent-rgb),.05); border: 1px solid var(--border-soft); font-size: var(--t-fs-sm); color: var(--muted-2); }
.dub-clone-req span { flex: 1 1 45%; line-height: 1.6; }
.dub-clone-req span:first-child { flex-basis: 100%; }
.dub-clone-req b { color: var(--text); }
.dub-clone-btns { display: flex; justify-content: center; gap: 4px; margin: 16px 0 12px; padding: 4px; border-radius: 9px; background: var(--panel-2); width: fit-content; }
.dub-clone-btns button { border: 0; background: transparent; color: var(--muted-2); font-size: var(--t-fs-sm); padding: 7px 15px; border-radius: 6px; }
.dub-clone-btns button.active { background: var(--accent); color: #0b0b0b; font-weight: 700; }
.dub-clone-btns button svg { display: none; }
.dub-clone-drop { min-height: 190px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; cursor: pointer; }
.dub-clone-drop.drag { border-color: var(--accent); background: rgba(var(--accent-rgb),.08); }
.dub-clone-drop > svg { width: 34px; height: 34px; color: var(--accent); }
.dub-clone-drop b { font-size: var(--t-fs-sm); }
.dub-clone-drop span { font-size: var(--t-fs-sm); color: var(--muted-2); }
.dub-clone-foot { display: flex; gap: 10px; margin-top: 16px; }
.dub-clone-foot button { flex: 1; height: 38px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-size: var(--t-fs-sm); }
.dub-clone-foot button.primary { border-color: transparent; background: var(--accent); color: #0b0b0b; font-weight: 700; }
.dub-notice-modal h4 { font-size: var(--t-fs-sm); margin: 12px 0 4px; color: var(--accent); }
.dub-notice-modal p { font-size: var(--t-fs-sm); line-height: 1.7; color: var(--muted); margin: 3px 0; }
.dub-notice-modal .primary { width: 100%; height: 36px; margin-top: 14px; border: 0; border-radius: 8px; background: var(--accent); color: #0b0b0b; font-weight: 700; }

body.light .dub-panel, body.light .dub-toolbar { background: #fff; }
body.light .dub-filter-row button.active, body.light .dub-action.primary, body.light .dub-clone-btns button.active, body.light .dub-clone-foot button.primary, body.light .dub-notice-modal .primary { color: #fff; }
body.light .dub-action.primary svg { color: #fff; }

@media (max-width: 1240px) {
  .dub-cols { grid-template-columns: minmax(0, 1fr) minmax(300px, .85fr); }
  .dub-detail-panel { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .audio-view { padding: 10px; }
  .dub-cols { grid-template-columns: 1fr; }
  .dub-detail-panel { grid-column: auto; }
  .dub-filters { max-height: none; }
}

/* ===== 20261127e：动漫 3D 头像 / 定制费用 / liblib 风格画布 ===== */
.dub-voice-ava { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px; box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 3px 10px rgba(0,0,0,.28); }
.dub-detail-ava { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 13px; }
.dub-voice-ava svg, .dub-detail-ava svg { width: 100%; height: 100%; display: block; }
.dub-clone-cost { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 10px 12px; margin-bottom: 12px; border-radius: 9px; border: 1px solid rgba(var(--accent-rgb),.36); background: rgba(var(--accent-rgb),.09); }
.dub-clone-cost > span { font-size: var(--t-fs-sm); color: var(--muted); }
.dub-clone-cost b { font-size: 16px; color: var(--accent); font-weight: 700; }
.dub-clone-cost small { flex-basis: 100%; font-size: var(--t-fs-cap); color: var(--muted-2); line-height: 1.6; }
.dub-clone-drop.picked { border-color: var(--accent); background: rgba(var(--accent-rgb),.08); }
body.light .dub-clone-cost { background: #f7f2e6; }
/* 声音定制第 2 步：命名 + 头像 */
.dub-clone-field { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: var(--t-fs-sm); color: var(--text); }
.dub-clone-field input { flex: 1; height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: var(--t-fs-sm); outline: none; }
.dub-clone-field input:focus { border-color: var(--accent); }
.dub-avatar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: var(--t-fs-sm); }
.dub-avatar-head button { padding: 4px 10px; border-radius: 6px; border: 1px solid rgba(var(--accent-rgb),.5); background: transparent; color: var(--accent); font-size: var(--t-fs-sm); cursor: pointer; }
.dub-avatar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.dub-avatar-opt { position: relative; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); cursor: pointer; display: grid; place-items: center; overflow: hidden; padding: 0; }
.dub-avatar-opt.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.25); }
.dub-avatar-opt:hover { border-color: var(--accent); }
.dub-avatar-opt-img { width: 100%; height: 100%; border-radius: 0; box-shadow: none; display: block; overflow: hidden; }
.dub-avatar-opt-img svg { width: 100%; height: 100%; display: block; }
.dub-avatar-upload { display: flex; flex-direction: column; gap: 2px; font-size: 20px; border-style: dashed; }
.dub-avatar-upload small { font-size: var(--t-fs-cap); }
.dub-avatar-tip { margin: 8px 0 0; font-size: var(--t-fs-cap); line-height: 1.6; color: var(--muted-2); }
.dub-clone-step2 .dub-clone-foot { gap: 6px; }
.dub-clone-step2 .dub-clone-foot button { font-size: var(--t-fs-sm); }

/* 传输线：渐变底轨 + 发光流动线 + 运行光点 */
.cv-edge-base { stroke-width: 2.6; opacity: .95; }
.cv-edge-glow { fill: none; stroke-width: 7; stroke-linecap: round; opacity: .18; filter: url(#cvEdgeGlow); pointer-events: none; }
.cv-edge-flow { stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 11 24; animation: cv-flow 1.25s linear infinite; opacity: .95; pointer-events: none; }
.cv-edge-dot { filter: drop-shadow(0 0 5px rgba(var(--accent-rgb),.95)); pointer-events: none; }
.cv-edge-group:hover .cv-edge-base { stroke: var(--color-danger) !important; }
@keyframes cv-flow { to { stroke-dashoffset: -35; } }

/* 节点卡片：更接近 liblib 的浅浮层实体卡片 */
.cv-node { border-radius: 14px; border-color: rgba(var(--accent-rgb),.2); box-shadow: 0 14px 38px rgba(0,0,0,.34), 0 0 0 1px rgba(255,255,255,.03) inset; overflow: visible; transition: box-shadow .2s, border-color .2s; }
.cv-node::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb),.85), transparent); opacity: .65; pointer-events: none; }
.cv-node:hover { border-color: rgba(var(--accent-rgb),.5); }
.cv-node.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.3), 0 18px 46px rgba(0,0,0,.42); }
.cv-node-head { height: 42px; background: linear-gradient(180deg, rgba(255,255,255,.045), transparent); }
.cv-node-prompt-main { min-height: 150px; max-height: 300px; overflow: auto; margin: 0 8px 8px; padding: 12px 13px; border: 1px solid var(--border-soft); border-radius: 9px; background: rgba(0,0,0,.2); color: var(--text); font-size: var(--t-fs-sm); line-height: 1.8; white-space: pre-wrap; cursor: text; }
body.light .cv-node-prompt-main { background: #f5f8fc; color: #1b2430; }
.cv-node-text .cv-node-prompt-main, .cv-node-audio .cv-node-prompt-main { min-height: 360px; }
.cv-node.selected .cv-node-prompt-main { min-height: 360px; max-height: 58vh; border-color: rgba(var(--accent-rgb),.45); }
.cv-node-prompt-main .cv-uprefs { padding: 0 0 8px; margin-bottom: 8px; border-bottom: 1px dashed var(--border); }
.cv-node-prompt-main .cv-prompt-ref { margin-bottom: 8px; padding: 7px 9px; font-size: var(--t-fs-sm); background: rgba(var(--accent-rgb),.12); line-height: 1.65; }
.cv-node-prompt-main .cv-prompt-own.empty { color: var(--muted-2); }
.cv-uprefs { padding: 0 8px 8px; }
.cv-upref { max-width: 100%; flex-wrap: wrap; padding: 4px 8px 4px 4px; }
.cv-upref small { flex-basis: 100%; max-width: 240px; font-size: var(--t-fs-cap); line-height: 1.5; color: var(--muted-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cv-node-foot { padding: 6px 8px; background: rgba(0,0,0,.12); }
body.light .cv-node-foot { background: #f0f4fa; }
body.light .cv-node::before { background: linear-gradient(90deg, transparent, var(--accent), transparent); }

/* ===== 20261127g：liblib 结构 = 镂空标题 + 结果卡片 + 节点下方浮层面板 ===== */
.cv-node-title { position: absolute; z-index: 5; height: 22px; line-height: 22px; font-size: var(--t-fs-sm); color: var(--muted-2); outline: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text; }
.cv-node-title::before { content: '≡'; display: inline-block; width: 15px; color: var(--muted-2); font-size: var(--t-fs-cap); }
.cv-title-text::before { content: '≡'; }
.cv-title-image::before { content: '▧'; }
.cv-title-video::before { content: '▶'; }
.cv-title-audio::before { content: '♫'; }
.cv-node-title:hover, .cv-node-title.selected { color: var(--text); }
.cv-node-title:focus { color: var(--accent); border-bottom: 1px dashed rgba(var(--accent-rgb),.6); }
/* 画布节点内字号局部放大：全站次要字号 12.5px 在大画布上读不清（AI 短剧工作流要盯十几个节点）。
   只覆盖画布节点/输入面板/节点标题作用域内的 token，不影响站内其他界面 */
.cv-node, .cv-node-title, .cv-inspector, .cv-text-viewer, .cv-param-pop {
  --t-fs-cap: 12px;
  --t-fs-sm: 13.5px;
  --t-fs-base: 14px;
}
.cv-node-title { height: 26px; line-height: 24px; font-size: 14.5px; }
.cv-inspector-input { min-height: 108px; line-height: 1.8; }
.cv-node { display: grid; place-items: center; padding: 0; background: #17171b; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 14px 36px rgba(0,0,0,.32); }
body.light .cv-node { background: #f1f4f8; }
.cv-node.selected { border-color: rgba(var(--accent-rgb),.85); box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.18), 0 16px 40px rgba(0,0,0,.4); }
.cv-card-quick { width: 100%; padding: 0 18px; display: flex; flex-direction: column; gap: 9px; }
.cv-card-quick > span { font-size: var(--t-fs-sm); color: var(--muted-2); margin-bottom: 2px; }
.cv-card-quick button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 5px 0; border: 0; background: transparent; color: var(--text); font-size: var(--t-fs-sm); text-align: left; cursor: pointer; }
.cv-card-quick button:hover { color: var(--accent); }
.cv-card-quick button b { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 4px; background: rgba(255,255,255,.08); color: var(--text); font-size: var(--t-fs-cap); font-weight: 400; }
.cv-card-text { width: 100%; height: 100%; padding: 16px; overflow: hidden; font-size: var(--t-fs-sm); line-height: 1.8; color: var(--text); white-space: pre-wrap; }
.cv-node .cv-stage-empty { font-size: var(--t-fs-sm); }
.cv-node .cv-stage-empty b { font-size: 48px; opacity: .35; }
.cv-node .cv-stage-media { width: 100%; height: 100%; object-fit: contain; border-radius: 15px; }
.cv-inspector { position: absolute; z-index: 8; display: flex; flex-direction: column; gap: 8px; padding: 10px 11px; border-radius: 13px; border: 1px solid var(--border); background: var(--panel-2); box-shadow: 0 18px 46px rgba(0,0,0,.48); }
body.light .cv-inspector { background: #fff; border-color: #c7d3e2; }
.cv-inspector-presets { display: flex; gap: 7px; flex-wrap: wrap; }
.cv-inspector-presets .cv-preset-chip { flex: 1; min-width: 72px; padding: 8px 6px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: var(--t-fs-sm); cursor: pointer; }
.cv-inspector-presets .cv-preset-chip.set { border-color: var(--accent); color: var(--accent); }
/* 面板在屏幕层、贴节点下沿，节点靠下时会顶出视口 → 「⚡生成」被裁掉点不到。
   给个视口内上限，超出就在面板内部滚动。 */
.cv-inspector { max-height: calc(100vh - 92px); overflow-y: auto; overscroll-behavior: contain; }
/* 参考模式是「这条片用哪张图当首帧」，比风格/配色重要，给更大的宽度和强调色 */
.cv-inspector-presets .cv-refmode-chip { flex: 1.5; min-width: 92px; font-weight: 500; }
.cv-inspector-presets .cv-refmode-chip.set { background: rgba(var(--accent-rgb),.16); color: var(--accent); border-color: var(--accent); }
.cv-inspector-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 28px; }
.cv-inspector-spacer { flex: 1; }
.cv-chip { padding: 5px 9px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: var(--t-fs-cap); cursor: pointer; white-space: nowrap; }
.cv-chip:hover { border-color: var(--accent); color: var(--accent); }
.cv-chip i { font-style: normal; font-size: var(--t-fs-cap); }
.cv-icon-btn { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: var(--t-fs-sm); cursor: pointer; }
.cv-icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.cv-ref-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cv-ref-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 150px; padding: 3px 7px 3px 3px; border-radius: 7px; border: 1px solid rgba(var(--accent-rgb),.35); background: rgba(var(--accent-rgb),.08); }
.cv-ref-chip img, .cv-ref-chip b { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 4px; object-fit: cover; display: grid; place-items: center; background: var(--panel-3); color: var(--accent); font-size: var(--t-fs-sm); font-weight: 400; }
.cv-ref-chip em { font-size: var(--t-fs-cap); font-style: normal; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-ref-thumb { position: relative; width: 28px; height: 28px; border-radius: 5px; overflow: hidden; border: 1px solid var(--border); }
.cv-ref-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cv-ref-thumb i { position: absolute; right: 0; top: 0; width: 13px; height: 13px; display: grid; place-items: center; background: rgba(0,0,0,.7); color: #fff; font-size: var(--t-fs-cap); font-style: normal; cursor: pointer; }
.cv-inspector-input { width: 100%; min-height: 92px; padding: 10px 11px; border-radius: 9px; border: 1px solid var(--border-soft); background: rgba(0,0,0,.18); color: var(--text); font-size: var(--t-fs-sm); line-height: 1.75; resize: vertical; outline: none; }
body.light .cv-inspector-input { background: #f5f8fc; color: #1b2430; }
.cv-inspector-input:focus { border-color: rgba(var(--accent-rgb),.7); }
/* ===== 芯片编辑器（@ 插入的是对象，不是字符串）===== */
.cv-chip-editor {
  width: 100%; min-height: 92px; max-height: 320px; overflow-y: auto;
  padding: 10px 11px; border-radius: 9px; border: 1px solid var(--border-soft);
  background: rgba(0,0,0,.18); color: var(--text);
  font-size: var(--t-fs-sm); line-height: 1.9; outline: none;
  white-space: pre-wrap; word-break: break-word; cursor: text;
}
body.light .cv-chip-editor { background: #f5f8fc; color: #1b2430; }
.cv-chip-editor:focus { border-color: rgba(var(--accent-rgb),.7); }
.cv-chip-editor:empty::before { content: attr(data-placeholder); color: var(--muted-2); pointer-events: none; }
/* 芯片：整块对象，删除即整块消失，不会被删成半个标签 */
.cv-pchip {
  display: inline-flex; align-items: center; gap: 3px;
  margin: 0 3px; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; line-height: 1.7; vertical-align: baseline;
  cursor: default; user-select: none; white-space: nowrap;
  border: 1px solid rgba(var(--accent-rgb),.45);
  background: rgba(var(--accent-rgb),.14); color: var(--text);
}
.cv-pchip::before { content: '▧'; font-size: 10px; opacity: .8; }
.cv-pchip-audio { border-color: rgba(120,200,255,.5); background: rgba(120,200,255,.14); }
.cv-pchip-audio::before { content: '♫'; }
.cv-pchip-video { border-color: rgba(255,180,120,.5); background: rgba(255,180,120,.14); }
.cv-pchip-video::before { content: '▶'; }
.cv-pchip-broken { border-color: rgba(255,90,90,.6); background: rgba(255,90,90,.16); color: #ff9a9a; }
.cv-pchip-broken::before { content: '!'; }
body.light .cv-pchip { color: #1b2430; }
.cv-inspector-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cv-model-select, .cv-model-static { height: 28px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: var(--t-fs-cap); max-width: 140px; }
.cv-model-static { display: inline-flex; align-items: center; color: var(--accent); }
.cv-token-count { font-size: var(--t-fs-cap); color: var(--muted-2); }
.cv-inspector .cv-gen-btn { padding: 6px 11px; border: 0; border-radius: 7px; background: var(--accent); color: #0b0b0b; font-size: var(--t-fs-sm); font-weight: 700; cursor: pointer; white-space: nowrap; }
.cv-inspector .cv-gen-btn:hover { filter: brightness(1.08); }
.cv-prompt-preset-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; max-height: 62vh; overflow: auto; }
.cv-prompt-preset { padding: 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel); display: flex; flex-direction: column; gap: 6px; }
.cv-prompt-preset b { font-size: var(--t-fs-sm); color: var(--accent); }
.cv-prompt-preset p { flex: 1; margin: 0; font-size: var(--t-fs-sm); line-height: 1.65; color: var(--muted); }
.cv-prompt-preset button { padding: 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-size: var(--t-fs-cap); cursor: pointer; }
.cv-prompt-preset button:hover { border-color: var(--accent); color: var(--accent); }

/* ===== 20261127k：画布交互修复（框选 / 引用预览 / 文本查看器 / 结果卡片） ===== */
/* 框选矩形：覆盖在 viewport 上，屏幕坐标，不随世界缩放 */
.canvas-marquee { position: absolute; z-index: 20; display: none; pointer-events: none; border: 1px solid rgba(var(--accent-rgb),.9); background: rgba(var(--accent-rgb),.12); box-shadow: 0 0 0 1px rgba(255,255,255,.05) inset; border-radius: 2px; }
/* 结果媒体：图片完整显示（contain，比例不符时留边不裁人头），角标放大/下载 */
.cv-result-media { position: relative; width: 100%; height: 100%; overflow: hidden; background: #0d0d10; }
.cv-result-media .cv-stage-media { width: 100%; height: 100%; object-fit: contain; border-radius: 15px; display: block; }
.cv-media-acts { position: absolute; top: 8px; right: 8px; display: flex; gap: 5px; z-index: 3; }
/* 画布内媒体：禁止原生图片拖拽（避免误触发参考图遮罩），拖动一律走节点平移 */
.cv-node img, .cv-inspector img, .cv-ref-preview-tip img { -webkit-user-drag: none; user-select: none; }
.cv-node video.cv-stage-media { cursor: grab; }
.cv-node:active video.cv-stage-media { cursor: grabbing; }
/* 多选操作栏：成组 / 解组 / 复制 / 删除 */
.cv-group-bar { position: absolute; z-index: 30; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 12px; background: var(--panel-3); box-shadow: 0 6px 24px rgba(0,0,0,.35); border: 1px solid var(--panel-2); }
.cv-group-bar .cv-group-count { font-size: var(--t-fs-sm); color: var(--muted-2); margin-right: 4px; }
.cv-group-bar button { font-size: var(--t-fs-sm); padding: 5px 12px; border-radius: 8px; border: none; background: rgba(var(--accent-rgb),.14); color: var(--text); cursor: pointer; }
.cv-group-bar button:hover { background: rgba(var(--accent-rgb),.24); }
.cv-group-bar button.danger { background: rgba(224,112,106,.16); color: #e0706a; }
.cv-media-zoom { min-width: 26px; height: 26px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.6); color: #fff; font-size: var(--t-fs-sm); line-height: 1; text-decoration: none; cursor: pointer; }
.cv-media-zoom:hover { background: var(--accent); color: #0b0b0b; border-color: var(--accent); }
.cv-media-more { position: absolute; left: 8px; bottom: 8px; z-index: 3; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: var(--t-fs-cap); }
.cv-stage-audio { position: relative; display: flex; flex-direction: column; gap: 7px; align-items: center; justify-content: center; padding: 12px; width: 100%; }
.cv-stage-audio audio { width: 100%; max-width: 300px; }
.cv-stage-audio .cv-media-zoom { position: absolute; top: 0; right: 0; }
/* 画布音频播放器：自绘控件（原生 <audio controls> 在画布里会被节点拖拽吞掉点击） */
.cv-audio-player { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 300px; min-width: 210px; padding: 5px 9px 5px 5px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel-3); }
.cv-audio-player [data-cv-audio-el] { display: none; }
.cv-audio-btn { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--accent); color: var(--btn-on-accent); font-size: var(--t-fs-sm); line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.cv-audio-btn:hover { filter: brightness(1.08); }
.cv-audio-btn.playing { background: var(--accent-2, var(--accent)); }
.cv-audio-time { flex: 0 0 auto; font-size: var(--t-fs-cap); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cv-audio-track { position: relative; flex: 1 1 auto; height: 4px; min-width: 40px; border-radius: 4px; background: var(--border); cursor: pointer; }
.cv-audio-track i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px; background: var(--accent); pointer-events: none; transition: width .12s linear; }
.cv-audio-dl { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; font-size: var(--t-fs-sm); }
.cv-audio-dl:hover { color: var(--accent); background: rgba(var(--accent-rgb), .14); }
.cv-result-item .cv-audio-player { max-width: 100%; }
/* 音频节点参数弹窗：试听 / 克隆音色按钮 */
.cv-voice-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.cv-voice-tools .ghost-btn { flex: 1 1 140px; height: 34px; font-size: var(--t-fs-sm); }
.cv-voice-tools .ghost-btn:disabled { opacity: .6; cursor: default; }
/* 已输入文字预览（点过快捷入口后卡片里的文字） */
.cv-card-text.cv-card-input { color: var(--muted); font-style: italic; }
/* 引用 hover 预览浮层 */
.cv-ref-preview-tip { position: fixed; z-index: 9999; width: 300px; max-width: 90vw; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel-2); box-shadow: 0 16px 40px rgba(0,0,0,.5); pointer-events: none; }
body.light .cv-ref-preview-tip { background: #fff; border-color: #c7d3e2; }
.cv-rp-title { font-size: var(--t-fs-sm); font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.cv-rp-img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 7px; margin-bottom: 6px; }
.cv-rp-text { font-size: var(--t-fs-sm); line-height: 1.65; color: var(--text); max-height: 130px; overflow: hidden; white-space: pre-wrap; word-break: break-word; }
.cv-rp-text.muted { color: var(--muted-2); }
/* 文本放大查看器 */
.cv-text-viewer { display: flex; flex-direction: column; gap: 10px; }
.cv-text-viewer-area { width: 100%; min-height: 46vh; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border-soft); background: rgba(0,0,0,.18); color: var(--text); font-size: 14px; line-height: 1.85; resize: vertical; outline: none; white-space: pre-wrap; }
body.light .cv-text-viewer-area { background: #f5f8fc; color: #1b2430; }
.cv-text-viewer-area:focus { border-color: rgba(var(--accent-rgb),.7); }
.cv-text-viewer-bar { display: flex; align-items: center; gap: 8px; }
.cv-text-viewer-count { font-size: var(--t-fs-cap); color: var(--muted-2); margin-right: auto; }
.cv-text-viewer-bar .cv-chip { padding: 7px 14px; font-size: var(--t-fs-sm); }

/* ===== 后台：实时运行总览（任务队列） ===== */
.ac-realtime { background: linear-gradient(145deg, rgba(var(--accent-rgb),.07), rgba(var(--accent-rgb),.02)); border: 1px solid rgba(var(--accent-rgb),.28); border-radius: 14px; padding: 18px 20px; margin-bottom: 24px; }
.ac-rt-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ac-rt-head > div { display: flex; flex-direction: column; gap: 3px; }
.ac-rt-head b { font-size: 16px; }
.ac-rt-head span { font-size: var(--t-fs-sm); color: var(--muted); }
.ac-rt-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.ac-rt-stat { display: flex; flex-direction: column; gap: 2px; padding: 13px 14px; border-radius: 10px; background: var(--panel-3); border: 1px solid rgba(var(--accent-rgb),.14); }
.ac-rt-stat span { font-size: var(--t-fs-sm); color: var(--muted); }
.ac-rt-stat b { font-size: 28px; font-weight: 800; line-height: 1.25; }
.ac-rt-stat b.blue { color: var(--color-info); }
.ac-rt-stat b.green { color: #4bb98a; }
.ac-rt-stat b.red { color: #e0786a; }
.ac-rt-stat b.gold { color: var(--accent); }
.ac-rt-stat small { font-size: var(--t-fs-cap); color: var(--muted); }
.ac-rt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ac-rt-col { min-width: 0; }
.ac-rt-subtitle { font-size: var(--t-fs-sm); font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.ac-rt-subtitle span { font-size: var(--t-fs-cap); font-weight: 500; color: var(--muted); }
.ac-rt-accounts, .ac-rt-tasks { display: flex; flex-direction: column; gap: 6px; }
.ac-rt-acct { display: flex; align-items: center; gap: 10px; padding: 7px 11px; border-radius: 8px; background: var(--panel-3); font-size: var(--t-fs-sm); }
.ac-rt-acct b { color: var(--accent); font-family: ui-monospace, monospace; }
.ac-rt-acct span { flex: 1; color: var(--text); }
.ac-rt-acct em { font-style: normal; color: var(--muted); font-size: var(--t-fs-cap); }
.ac-rt-models { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-rt-models span { font-size: var(--t-fs-cap); padding: 4px 9px; border-radius: 12px; background: rgba(var(--accent-rgb),.12); color: var(--text); }
.ac-rt-models b { color: var(--accent); }
/* 模型分布柱状图 */
.ac-rt-chart { display: flex; flex-direction: column; gap: 7px; padding: 4px 0 2px; }
.ac-rt-bar-row { display: grid; grid-template-columns: minmax(90px, 128px) 1fr auto; align-items: center; gap: 8px; font-size: var(--t-fs-cap); }
.ac-rt-bar-name { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-rt-bar-track { height: 12px; border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.ac-rt-bar-fill { height: 100%; border-radius: 6px; min-width: 6px; }
.ac-rt-bar-fill.s1 { background: var(--accent); }
.ac-rt-bar-fill.s2 { background: #6aa9e0; }
.ac-rt-bar-fill.s3 { background: #4bb98a; }
.ac-rt-bar-fill.s4 { background: #d9a441; }
.ac-rt-bar-fill.s5 { background: #b48be0; }
.ac-rt-bar-fill.s6 { background: #e0706a; }
.ac-rt-bar-num { font-style: normal; font-size: var(--t-fs-cap); color: var(--accent); min-width: 20px; text-align: right; }
/* 最近提交：本次消耗积分 */
.ac-rt-cost { font-style: normal; font-size: var(--t-fs-cap); padding: 3px 8px; border-radius: 10px; background: rgba(217,164,65,.14); color: #d9a441; white-space: nowrap; }
.ac-rt-task .ac-rt-cost { flex: none; }
/* 暂停开放的模型：卡片与生成按钮置灰 */
.model-card.paused { opacity: .55; filter: grayscale(.7); cursor: not-allowed; }
.model-card.paused .model-rate { color: var(--muted); }
#generateBtn.paused-model { opacity: .6; filter: grayscale(.8); cursor: not-allowed; }
.ac-rt-task { display: flex; align-items: center; gap: 9px; padding: 7px 11px; border-radius: 8px; background: var(--panel-3); font-size: var(--t-fs-sm); }
.ac-rt-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; background: var(--muted); }
.ac-rt-dot.queued { background: #d9a441; }
.ac-rt-dot.running { background: var(--color-info); box-shadow: 0 0 0 3px rgba(106,169,224,.2); }
.ac-rt-dot.done { background: #4bb98a; }
.ac-rt-dot.failed { background: #e0786a; }
.ac-rt-dot.cancelled { background: var(--muted); }
.ac-rt-task-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ac-rt-task-main b { font-size: var(--t-fs-sm); }
.ac-rt-task-main span { font-size: var(--t-fs-cap); color: var(--muted); }
.ac-rt-source { font-size: var(--t-fs-cap); font-weight: 700; border-radius: 4px; padding: 1px 5px; margin-right: 2px; }
.ac-rt-source.admin { color: var(--accent); background: rgba(var(--accent-rgb), .14); }
.ac-rt-source.user { color: #6aa9e0; background: rgba(106,169,224,.14); }
.ac-rt-status { font-style: normal; font-size: var(--t-fs-cap); padding: 3px 8px; border-radius: 10px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.ac-rt-status.running { color: var(--color-info); background: rgba(106,169,224,.12); }
.ac-rt-status.done { color: #4bb98a; background: rgba(75,185,138,.12); }
.ac-rt-status.failed { color: #e0786a; background: rgba(224,120,106,.12); }
.ac-rt-empty { font-size: var(--t-fs-sm); color: var(--muted); padding: 8px 0; }
body.light .ac-realtime { background: #faf7ef; border-color: #ded2b6; }
body.light .ac-rt-stat { background: #fff; border-color: #ded2b6; }
body.light .ac-rt-acct, body.light .ac-rt-task { background: #fff; }
body.light .ac-rt-models span { background: #f2ecdc; }
@media (max-width: 900px) {
  .ac-rt-stats { grid-template-columns: repeat(2, 1fr); }
  .ac-rt-cols { grid-template-columns: 1fr; }
}

/* ===== 移动端触控友好：触屏设备保证最小点击区 44×44px ===== */
@media (hover: none) and (pointer: coarse) {
  .icon-btn, .round-btn, .model-tab, .nav-item, .apps-item,
  .gen-act, .rc-copy, .rc-pay-tab, .rc-tier, .logout-btn,
  .recharge-btn, .top-link, .biz-co-btn, .chat-suggest button,
  .dub-karaoke-play, .dub-karaoke-edit, .asset-delete,
  .page-action, .ghost-btn, .pill-btn {
    min-height: 44px;
  }
  .icon-btn, .round-btn, .collapse-btn, .chat-history-handle {
    min-width: 44px;
  }
  .nav-item { padding-top: 12px; padding-bottom: 12px; }
  .gen-act { padding-left: 10px; padding-right: 10px; }
  .topbar { padding: 0 12px; }
  .topbar-left, .topbar-right { gap: 6px; }
}

/* ===== 通用骨架屏 & 统一空状态（品牌语言） ===== */
.skeleton { position: relative; overflow: hidden; background: var(--panel-2); border-radius: 8px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), .12), transparent);
  transform: translateX(-100%); animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer { to { transform: translateX(100%); } }
.skeleton-line { height: 12px; margin: 8px 0; }
.skeleton-line.short { width: 60%; }
.skeleton-card { height: 120px; margin-bottom: 12px; }

/* 统一空状态：图形 + 标题 + 说明 + 可选行动按钮 */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 24px; gap: 10px; color: var(--muted);
  min-height: 200px;
}
.empty-state .empty-ico {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 30%, rgba(var(--accent-rgb), .18), rgba(var(--accent-rgb), .04));
  border: 1px solid rgba(var(--accent-rgb), .25); margin-bottom: 6px;
}
.empty-state .empty-ico svg { width: 30px; height: 30px; color: var(--accent); opacity: .85; }
.empty-state h4 { margin: 0; font-size: 15px; font-weight: 600; color: var(--text); }
.empty-state p { margin: 0; font-size: var(--t-fs-sm); line-height: 1.7; max-width: 320px; }
.empty-state .empty-cta {
  margin-top: 8px; padding: 8px 18px; border-radius: 8px; border: 1px solid rgba(var(--accent-rgb), .4);
  background: rgba(var(--accent-rgb), .1); color: var(--accent); font-size: var(--t-fs-sm); font-weight: 600;
}
.empty-state .empty-cta:hover { background: rgba(var(--accent-rgb), .2); }
body.light .empty-state .empty-ico { background: radial-gradient(circle at 40% 30%, #fff, #f2ede0); }

/* ===== 隐私模式增强：遮盖提示词之外的参考图、参数与积分消耗 ===== */
.privacy-mode .gen-user-imgs img,
.privacy-mode .thumb img { filter: blur(14px); }
.privacy-mode .gen-params,
.privacy-mode .gen-turn-time,
.privacy-mode .cost,
.privacy-mode .task-meta,
.privacy-mode .audio-msg-meta,
.privacy-mode .chat-meta-line {
  filter: blur(6px); user-select: none; pointer-events: none;
}

/* ===== 结构化步骤：告别等权重文字堆砌 ===== */
.guide-steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.guide-steps li { display: flex; align-items: flex-start; gap: 9px; font-size: var(--t-fs-sm); line-height: 1.5; color: var(--muted); }
.guide-steps li i {
  flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(var(--accent-rgb), .12); color: var(--accent); font-style: normal; font-size: var(--t-fs-cap); font-weight: 700;
}
.guide-steps li strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 1px; }

/* ===== 智能滚动「回到最新」浮标：用户上滑查看历史时出现，贴底自动隐藏 ===== */
.jump-latest {
  position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 10px);
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px; z-index: 6;
  border: 1px solid rgba(var(--accent-rgb), .45);
  background: var(--panel); color: var(--accent);
  font-size: var(--t-fs-sm); font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s, transform .2s, visibility .2s;
}
.jump-latest.show { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.jump-latest svg { width: 15px; height: 15px; }
.jump-latest:hover { background: rgba(var(--accent-rgb), .16); }
body.light .jump-latest { box-shadow: 0 8px 24px rgba(0, 0, 0, .16); }

/* ===== 生成图片「以此图继续编辑」按钮：对话式多轮调整入口 ===== */
.gen-refine {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; margin-left: 6px;
  font-size: var(--t-fs-sm); font-weight: 600; color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), .35); border-radius: 7px;
  padding: 5px 10px; background: transparent; cursor: pointer; transition: .16s;
}
.gen-refine:hover { background: rgba(var(--accent-rgb), .14); }
.gen-refine svg { width: 13px; height: 13px; }
.gen-refine:disabled { opacity: .6; cursor: default; }

/* ============ 画布 UX 升级 20261128w：参数 pill / 选区工具条 / 编组卡片 / 磁吸+ ============ */
.cv-ref-chip .cv-ref-at { font-style: normal; color: var(--accent); background: rgba(var(--accent-rgb),.16); border-radius: 4px; padding: 0 4px; font-size: 10.5px; margin-right: 2px; }
.cv-param-pill i { font-style: normal; opacity: .6; font-size: var(--t-fs-cap); }
.cv-param-pill:hover { border-color: rgba(var(--accent-rgb),.6); color: var(--accent); }
.cv-param-pop { position: fixed; z-index: 430; width: 224px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel-2); box-shadow: 0 18px 46px rgba(0,0,0,.5); }
body.light .cv-param-pop { background: #fff; border-color: #c7d3e2; }
.cv-param-title { font-size: var(--t-fs-sm); color: var(--muted-2); margin-bottom: 9px; }
.cv-param-grid { display: grid; gap: 7px; }
.cv-param-grid button { padding: 8px 4px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: var(--t-fs-sm); cursor: pointer; text-align: center; }
.cv-param-grid button:hover { border-color: rgba(var(--accent-rgb),.6); color: var(--accent); }
.cv-param-grid button.active { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb),.12); font-weight: 600; }
/* 框选实时选区：半透明填充 + 亮边（拖动中即时反馈） */
.canvas-marquee { border: 1.5px solid rgba(var(--accent-rgb),.95); background: rgba(var(--accent-rgb),.13); box-shadow: 0 0 0 1.5px rgba(255,255,255,.12) inset, 0 0 18px rgba(var(--accent-rgb),.25); border-radius: 6px; }
/* 松开后的选区虚线框 + 四角把手 */
.cv-sel-box { position: absolute; z-index: 18; pointer-events: none; border: 1.5px dashed rgba(var(--accent-rgb),.9); border-radius: 8px; background: rgba(var(--accent-rgb),.05); }
.cv-sel-box::before { content: ''; position: absolute; left: 50%; top: -1.5px; width: 26px; height: 3px; transform: translateX(-50%); background: var(--accent); border-radius: 2px; opacity: .8; }
/* 选区顶部批量工具条（固定定位，屏幕坐标） */
.cv-sel-toolbar { position: fixed; z-index: 410; display: none; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 11px; background: var(--panel-3); border: 1px solid var(--border); box-shadow: 0 12px 34px rgba(0,0,0,.45); }
body.light .cv-sel-toolbar { background: #fff; border-color: #c7d3e2; }
.cv-sel-toolbar button { font-size: var(--t-fs-sm); padding: 5px 10px; border-radius: 7px; border: none; background: rgba(var(--accent-rgb),.13); color: var(--text); cursor: pointer; white-space: nowrap; }
.cv-sel-toolbar button:hover { background: rgba(var(--accent-rgb),.26); color: var(--accent); }
.cv-sel-toolbar button.danger { background: rgba(224,112,106,.15); color: #e0706a; }
/* 编组背景卡片 Group N */
.cv-group-card { position: absolute; z-index: 0; pointer-events: auto; cursor: move; border-radius: 18px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); box-shadow: 0 10px 34px rgba(0,0,0,.22); }
.cv-group-card:active { cursor: grabbing; }
body.light .cv-group-card { background: rgba(15,23,42,.05); border-color: rgba(15,23,42,.08); }
.cv-group-card-label { position: absolute; left: 4px; top: -24px; font-size: var(--t-fs-sm); font-weight: 600; color: var(--muted-2); letter-spacing: .4px; pointer-events: none; }
/* 磁吸「+」：位置变化带弹性过渡 */
.cv-group-plus { transition: left .16s ease-out, top .16s ease-out, transform .15s, background .15s; }
.cv-group-plus:active { transform: scale(.94); }

/* ============ 画布 UX 20261128x：单节点悬浮+ / 组传输条 ============ */
.cv-node-plus, .cv-group-plus { touch-action: none; } /* 触屏按住拖传输条不被滚动手势打断 */
.cv-node-plus { position: absolute; z-index: 30; display: none; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(var(--accent-rgb),.55); background: var(--panel-3); color: var(--accent); font-size: 20px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 22px rgba(0,0,0,.4); transition: left .16s ease-out, top .16s ease-out, transform .15s, background .15s; padding: 0; line-height: 1; }
body.light .cv-node-plus { background: #fff; border-color: #c7d3e2; }
.cv-node-plus:hover { background: rgba(var(--accent-rgb),.16); }
.cv-node-plus:active { transform: scale(.92); }
body[data-cv-linkdrag] .cv-node-plus, body[data-cv-linkdrag] .cv-group-plus { pointer-events: none; }

/* ============ 磁吸「+」命中修复 20261128aa：扩大点击热区 ============ */
.cv-node-plus, .cv-group-plus { transition-duration: .12s; }
/* 不可见热区：按钮四周外扩 10px，鼠标不用精确压准小圆点 */
.cv-node-plus::after, .cv-group-plus::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; }

/* ============ 画布视觉降噪 20261129v：对齐「安静画廊」质感 ============ */
/* 旧版：纯黑底 + 24px 金色点阵 + 两层 220/310px 大点 + 18s 漂移动画。
   截图里背景全是小白点，节点反而成了背景的附属品。参考画布背景几乎是空的。 */
.canvas-viewport { background: radial-gradient(ellipse 120% 90% at 50% 38%, #171614 0%, #111110 58%, #0c0c0b 100%); }
.canvas-grid { background-image: radial-gradient(circle, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 26px 26px; }
.canvas-grid::after { display: none; }
body.light .canvas-viewport { background: radial-gradient(ellipse 120% 90% at 50% 38%, #fbfaf7 0%, #f3f0e9 100%); }
body.light .canvas-grid { background-image: radial-gradient(circle, rgba(90, 70, 30, .10) 1px, transparent 1px); }

/* 卡片：去掉「相框」感。顶部那道金色渐变线 + 亮边框 + 重阴影三件套叠在一起，
   缩到 20% 时每张图外面都像套了个铁圈，这就是「看着累」的主要来源。 */
.cv-node::before { content: none; }
.cv-node { border: 1px solid rgba(255, 255, 255, .06); border-radius: 12px; background: #141414; box-shadow: 0 6px 20px rgba(0, 0, 0, .26); }
.cv-node:hover { border-color: rgba(255, 255, 255, .14); }
.cv-node.selected { border-color: rgba(var(--accent-rgb), .8); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .5), 0 10px 26px rgba(0, 0, 0, .36); }
body.light .cv-node { background: #fff; border-color: rgba(15, 23, 42, .10); }

/* 标题：四种节点统一放在卡片上方、白字深色胶囊。
   旧版把图片/视频标题压在画面左上角，浅色画面白字看不见、深色画面灰字看不见，
   缩小时还被卡片裁半行（用户截图反馈）。旧的 .cv-title-overlay 兼容残留 DOM，
   同样抬到上方并改白字，避免个别缓存页面仍出现"标题消失"。 */
.cv-node-title.cv-title-overlay {
  top: auto; height: 26px !important; padding: 0 10px !important; border-radius: 8px !important;
  font-size: var(--cv-fs-title, 14.5px); line-height: 24px !important;
  background: rgba(10, 10, 14, .86) !important; color: #fff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .34);
}
.cv-node-title.cv-title-overlay::before { width: 13px; color: rgba(255, 255, 255, .82) !important; }
.cv-node-title.cv-title-overlay.selected, .cv-node-title.cv-title-overlay:hover { color: #fff !important; background: rgba(10, 10, 14, .95) !important; }
.cv-node-title.cv-title-overlay:focus { border-bottom: 0; color: #fff !important; background: rgba(10, 10, 14, .95) !important; box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .8); }

/* 连线：必须一眼看出「谁连到谁」。
   （曾按"视觉降噪"把流动线关掉、底轨压到 1.5px，结果用户完全看不出连接关系，已回退）
   现在的层次：3.2px 渐变底轨 + 10px 外发光 + 3.6px 电流流动段 + 沿线跑的光点。 */
.cv-edge-base { stroke-width: 3.2; opacity: .95; }
.cv-edge-glow { display: block; stroke-width: 10; opacity: .22; }
.cv-edge-flow { display: block; stroke-width: 3.6; stroke-dasharray: 12 20; animation: cv-flow .95s linear infinite; }
.cv-edge-dot { display: block; }
.cv-edge-group:hover .cv-edge-base { stroke: rgba(226, 168, 80, .95) !important; stroke-width: 4; }
/* 悬停连线时两端节点一起亮起来（由 agents.js 加 .cv-edge-linked），这是"连到哪"最直接的答案 */
.cv-node.cv-edge-linked { border-color: rgba(var(--accent-rgb), .9) !important; box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .35), 0 10px 30px rgba(0, 0, 0, .4) !important; }
/* 拖拽中的传输线：亮、粗、流动更快，光标处还有光点 */
.cv-edge-temp.cv-edge-base { stroke: rgba(var(--accent-rgb), .5) !important; stroke-width: 3.4 !important; stroke-dasharray: 10 8; animation: cv-flow .8s linear infinite; }
.cv-edge-temp.cv-edge-flow { stroke: var(--accent) !important; fill: none; stroke-width: 4 !important; stroke-dasharray: 14 16; animation: cv-flow .55s linear infinite; opacity: 1; filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), .8)); }
.cv-edge-temp.cv-edge-dot { display: block !important; fill: #fff; filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 1)); }

/* 创作面板：从「贴在节点下面的窄条」变成一块独立的深色浮层（去边框，用柔光分层） */
.cv-inspector { border: 0; border-radius: 16px; background: #1e1e20; box-shadow: 0 24px 60px rgba(0, 0, 0, .52), 0 0 0 1px rgba(255, 255, 255, .05) inset; }
body.light .cv-inspector { background: #fff; box-shadow: 0 24px 60px rgba(15, 23, 42, .16), 0 0 0 1px rgba(15, 23, 42, .06) inset; }

/* 节点右上角的 ⤢/✎/↓ 三个按钮原来常驻，缩小时每个节点都挂着三个小图标，是画面里最碎的一层噪点。
   改为悬停或选中时才出现（触屏先点选节点，同样能拿到按钮）。 */
.cv-media-acts { opacity: 0; transform: translateY(-2px); transition: opacity .16s ease, transform .16s ease; pointer-events: none; }
.cv-node:hover .cv-media-acts, .cv-node.selected .cv-media-acts { opacity: 1; transform: none; pointer-events: auto; }

/* 上游网关抖动（502/超时）时的「正在自动重试」提示：任务仍在跑，不能表现成失败。
   用琥珀色而不是危险红，避免用户以为钱和片子都废了。 */
.task-note.warn { color: var(--yellow); }
.gen-pending-warn {
  display: flex; align-items: flex-start; gap: 7px; margin-top: 10px;
  padding: 7px 10px; border-radius: 8px;
  font-size: var(--t-fs-sm); line-height: 1.5; color: var(--yellow);
  background: rgba(233, 180, 95, .1); border: 1px solid rgba(233, 180, 95, .22);
}
.gen-pending-warn svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.7; }

/* ===== 青鸟工坊 · 提示词控制台 =====
   抽屉式浮层：每一步真正发给模型的提示词都在这儿看得见、改得了。
   用主题变量而不是硬编码色值，三套主题下都成立。 */
.ws-cns-open {
  display: inline-flex; align-items: center; gap: 6px; margin-left: auto;
  padding: 0 12px; height: 34px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--border-soft); background: var(--panel-2); color: var(--text);
  font-size: var(--fs-md); position: relative;
}
.ws-cns-open:hover { border-color: rgba(var(--accent-rgb), .35); background: var(--panel-3); }
.ws-cns-open svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.ws-cns-open span { white-space: nowrap; }
.ws-cns-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); display: inline-block; }

.ws-console { position: fixed; inset: 0; z-index: 240; pointer-events: none; }
.ws-console[hidden] { display: none; }
.ws-cns-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .18s ease; pointer-events: auto; }
.ws-console.on .ws-cns-mask { opacity: 1; }
.ws-cns-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 96vw);
  display: flex; flex-direction: column; pointer-events: auto;
  background: var(--panel); border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateX(100%); transition: transform .2s ease;
}
.ws-console.on .ws-cns-panel { transform: none; }
.ws-cns-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border-soft); flex: 0 0 auto;
}
.ws-cns-head b { font-size: var(--fs-lg); }
.ws-cns-x {
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer; line-height: 1;
  border: 1px solid var(--border-soft); background: transparent; color: var(--muted);
}
.ws-cns-x:hover { color: var(--text); border-color: rgba(var(--accent-rgb), .3); }
.ws-cns-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 12px; }

.ws-cns-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ws-cns-tabs button {
  padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: var(--fs-md);
  border: 1px solid var(--border-soft); background: transparent; color: var(--muted);
}
.ws-cns-tabs button.on { background: rgba(var(--accent-rgb), .12); color: var(--text); border-color: rgba(var(--accent-rgb), .32); }
.ws-cns-meta { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.ws-cns-badge {
  padding: 1px 7px; border-radius: 999px; font-size: var(--fs-xs); font-style: normal;
  background: rgba(233, 180, 95, .16); color: var(--yellow); border: 1px solid rgba(233, 180, 95, .3);
}
.ws-cns-badge.dim { background: transparent; color: var(--muted-2); border-color: var(--border-soft); }
.ws-cns-vars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.ws-cns-vars b { font-weight: 500; margin-right: 2px; }
.ws-cns-var {
  padding: 2px 8px; border-radius: 6px; cursor: pointer; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: var(--fs-sm); border: 1px dashed var(--border); background: transparent; color: var(--info, #6aa9e0);
}
.ws-cns-var:hover { border-style: solid; background: rgba(var(--accent-rgb), .08); }
.ws-cns-field { display: flex; flex-direction: column; gap: 6px; }
.ws-cns-field > span { font-size: var(--fs-sm); color: var(--muted); }
.ws-cns-field textarea {
  width: 100%; resize: vertical; padding: 10px 12px; border-radius: 10px;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--fs-md); line-height: 1.65;
}
.ws-cns-field textarea:focus { outline: none; border-color: rgba(var(--accent-rgb), .4); }
.ws-cns-preview { display: flex; flex-direction: column; gap: 8px; }
.ws-cns-preview > b { font-size: var(--fs-sm); color: var(--muted); font-weight: 500; }
.ws-cns-pre {
  margin: 0; padding: 10px 12px; border-radius: 10px; white-space: pre-wrap; word-break: break-word;
  background: var(--panel-2); border: 1px solid var(--border-soft); color: var(--text);
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--fs-md); line-height: 1.7;
  max-height: 260px; overflow: auto;
}
.ws-cns-pre b { display: block; margin-bottom: 4px; color: var(--muted); font-weight: 500; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; }
.ws-cns-tip { font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; }
.ws-cns-tip.bad { color: var(--yellow); }
.ws-cns-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px; }
.ws-cns-actions .primary { padding: 7px 16px; border-radius: 9px; cursor: pointer; }
.ws-cns-actions button:not(.primary) {
  padding: 7px 12px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--border-soft); background: transparent; color: var(--muted);
}
.ws-cns-actions button:not(.primary):hover { color: var(--text); border-color: rgba(var(--accent-rgb), .3); }
.ws-cns-note { flex: 1 1 100%; font-size: var(--fs-sm); color: var(--muted-2); line-height: 1.6; }

/* 成片页：逐镜最终提示词 */
.ws-shot-prompt { margin: 8px 0 2px; border-radius: 10px; border: 1px solid var(--border-soft); background: rgba(var(--accent-rgb), .03); }
.ws-shot-prompt > summary {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 10px; cursor: pointer; font-size: var(--fs-sm); color: var(--muted); list-style: none;
}
.ws-shot-prompt > summary::-webkit-details-marker { display: none; }
.ws-shot-prompt > summary:hover { color: var(--text); }
.ws-sp-auto { font-size: var(--fs-xs); color: var(--muted-2); border: 1px solid var(--border-soft); border-radius: 999px; padding: 0 6px; }
.ws-sp-hint { margin-left: auto; font-size: var(--fs-xs); color: var(--muted-2); }
.ws-shot-prompt textarea {
  width: calc(100% - 16px); margin: 0 8px 8px; resize: vertical; padding: 8px 10px; border-radius: 8px;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--fs-md); line-height: 1.65;
}
.ws-shot-prompt textarea:focus { outline: none; border-color: rgba(var(--accent-rgb), .4); }
.ws-sp-acts { padding: 0 8px 8px; }
.ws-plan-dirty { font-size: var(--fs-sm); color: var(--yellow); align-self: center; }
.ws-plan-dirty[hidden] { display: none; }

/* ===== 青鸟工坊 · 页面骨架（2026-11-30 补）
   之前工坊只有共享的侧栏/主区布局，内部控件全是浏览器原生样式：
   深色页面里按钮是浅灰块、输入框是白底，看着像没做完。这里只做「对齐既有主题」，
   不改信息结构。全部走主题变量，三套主题都成立。 */
.ws-wrap { display: flex; flex-direction: column; gap: 14px; padding: 2px 2px 44px; }
.ws-topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ws-title-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.ws-title-label input {
  min-width: 200px; padding: 7px 11px; border-radius: 9px; font-size: var(--fs-lg);
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text); font-family: inherit;
}
.ws-title-label input:focus { outline: none; border-color: rgba(var(--accent-rgb), .4); }

.ws-stepbar { display: flex; gap: 6px; flex-wrap: wrap; }
.ws-step {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left;
  padding: 7px 13px; border-radius: 10px; cursor: pointer; font-family: inherit;
  border: 1px solid var(--border-soft); background: transparent; color: var(--muted);
}
.ws-step b { font-size: var(--fs-md); font-weight: 600; }
.ws-step span { font-size: var(--fs-xs); color: var(--muted-2); }
.ws-step:hover { border-color: rgba(var(--accent-rgb), .28); color: var(--text); }
.ws-step.active { background: rgba(var(--accent-rgb), .1); border-color: rgba(var(--accent-rgb), .32); color: var(--text); }
.ws-step.active span { color: var(--muted); }

/* 工坊内统一按钮：主操作用 primary，其余为中性；链接式动作用 ws-ghost */
.ws-wrap button {
  font-family: inherit; font-size: var(--fs-md); padding: 6px 13px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
}
.ws-wrap button:hover { border-color: rgba(var(--accent-rgb), .34); background: var(--panel-3); }
.ws-wrap button.primary { background: rgba(var(--accent-rgb), .16); border-color: rgba(var(--accent-rgb), .4); font-weight: 600; }
.ws-wrap button.primary:hover { background: rgba(var(--accent-rgb), .22); }
.ws-wrap button:disabled { opacity: .45; cursor: not-allowed; }
.ws-wrap button.ws-ghost { background: transparent; border-color: var(--border-soft); color: var(--muted); }
.ws-wrap button.ws-ghost:hover { color: var(--text); border-color: rgba(var(--accent-rgb), .3); }
.ws-wrap input, .ws-wrap textarea, .ws-wrap select {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 6px 9px; font-size: var(--fs-md); font-family: inherit;
}
.ws-wrap input:focus, .ws-wrap textarea:focus, .ws-wrap select:focus { outline: none; border-color: rgba(var(--accent-rgb), .4); }

.ws-sec {
  display: flex; flex-direction: column; gap: 10px; padding: 14px;
  border: 1px solid var(--border-soft); border-radius: 12px; background: var(--panel);
}
.ws-sec-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ws-sec-head b { font-size: var(--fs-lg); }
.ws-sec-head > span { font-size: var(--fs-sm); color: var(--muted); }
.ws-sec-head button:first-of-type { margin-left: auto; }
.ws-lock-badge {
  font-size: var(--fs-xs); padding: 1px 8px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--border-soft); color: var(--muted-2);
}
.ws-lock-badge.ok { color: var(--green); border-color: rgba(62, 207, 155, .32); background: rgba(62, 207, 155, .1); }
.ws-field { display: flex; flex-direction: column; gap: 5px; }
.ws-field > span { font-size: var(--fs-sm); color: var(--muted); }
.ws-field textarea, .ws-field input { width: 100%; box-sizing: border-box; }
.ws-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ws-btnrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ws-prompt-ask { display: flex; flex-direction: column; gap: 5px; font-size: var(--fs-sm); color: var(--muted); }

/* 分集梗概 */
.ws-ep-list { display: flex; flex-direction: column; gap: 8px; }
.ws-ep-head { display: flex; align-items: center; gap: 10px; font-size: var(--fs-md); }
.ws-ep-head button { margin-left: auto; }
.ws-ep-row { display: flex; gap: 8px; align-items: flex-start; }
.ws-ep-no { flex: 0 0 auto; padding-top: 7px; font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; }
.ws-ep-row > input { flex: 0 0 150px; }
.ws-ep-row > textarea { flex: 1 1 auto; min-height: 40px; }
.ws-ep-select { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--muted); }
.ws-ep-select select { min-width: 180px; }

/* 剧本场次 / 台词 */
.ws-scene-card, .ws-shot, .ws-take, .ws-scene-lib-card, .ws-char-card {
  display: flex; flex-direction: column; gap: 8px; padding: 10px;
  border: 1px solid var(--border-soft); border-radius: 10px; background: var(--panel-2);
}
.ws-scene-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ws-scene-head b { font-size: var(--fs-md); }
.ws-mini { width: auto; min-width: 90px; }
.ws-lines { display: flex; flex-direction: column; gap: 6px; }
.ws-line { display: flex; gap: 6px; align-items: flex-start; }
.ws-line .ws-who { flex: 0 0 92px; }
.ws-line textarea { flex: 1 1 auto; }

/* 角色 / 场景卡 */
.ws-char-card, .ws-scene-lib-card { flex-direction: row; gap: 12px; align-items: flex-start; }
.ws-char-anchor, .ws-scene-lib-img { flex: 0 0 152px; display: flex; flex-direction: column; gap: 6px; }
.ws-char-anchor img, .ws-scene-lib-img img { width: 100%; border-radius: 8px; display: block; cursor: zoom-in; }
.ws-anchor-ph {
  min-height: 152px; border: 1px dashed var(--border); border-radius: 8px;
  display: grid; place-items: center; color: var(--muted-2); font-size: var(--fs-sm);
}
.ws-char-anchor-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ws-upload { display: inline-block; }
.ws-upload span {
  display: inline-block; padding: 5px 10px; border-radius: 8px; cursor: pointer; font-size: var(--fs-sm);
  border: 1px solid var(--border-soft); color: var(--muted); background: transparent;
}
.ws-upload span:hover { color: var(--text); border-color: rgba(var(--accent-rgb), .3); }
.ws-char-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ws-char-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ws-char-row .ws-mini { flex: 0 0 120px; }
.ws-no { font-size: var(--fs-xs); color: var(--accent-2); font-family: ui-monospace, Menlo, Consolas, monospace; }
.ws-variants { display: flex; gap: 6px; flex-wrap: wrap; }
.ws-variant { position: relative; width: 46px; }
.ws-variant img { width: 100%; border-radius: 6px; display: block; }
.ws-variant i {
  position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--danger); color: #fff; font-size: 10px; font-style: normal; line-height: 16px; text-align: center; cursor: pointer;
}

/* 分镜 */
.ws-shot { gap: 8px; }
.ws-shot-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--muted); }
.ws-shot-head input.ws-mini { width: 62px; min-width: 0; }
.ws-shot-head select { min-width: 160px; }
.ws-shot-chars { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--muted); }
.ws-chip {
  padding: 3px 10px; border-radius: 999px; cursor: pointer; font-size: var(--fs-sm); font-family: inherit;
  border: 1px solid var(--border); background: transparent; color: var(--muted);
}
.ws-chip.on { background: rgba(var(--accent-rgb), .14); border-color: rgba(var(--accent-rgb), .35); color: var(--text); }
.ws-chip.off { opacity: .4; }
.ws-stale { border-color: rgba(233, 180, 95, .38); }
.ws-stale-tip { color: var(--yellow); font-size: var(--fs-xs); }

/* 质量门结果 */
.ws-gate-slot:empty { display: none; }
.ws-gate {
  display: flex; flex-direction: column; gap: 3px; padding: 8px 11px; border-radius: 9px;
  font-size: var(--fs-sm); border: 1px solid var(--border-soft);
}
.ws-gate b { font-weight: 600; }
.ws-gate span { display: block; opacity: .92; }
.ws-gate-ok { color: var(--green); border-color: rgba(62, 207, 155, .3); background: rgba(62, 207, 155, .08); }
.ws-gate-bad { color: var(--danger); border-color: rgba(251, 113, 133, .3); background: rgba(251, 113, 133, .08); }
.ws-gate-warn { color: var(--yellow); border-color: rgba(233, 180, 95, .3); background: rgba(233, 180, 95, .08); }

/* 成片 */
.ws-film-list { display: flex; flex-direction: column; gap: 10px; }
.ws-take-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--muted); }
.ws-take-badge { font-size: var(--fs-xs); padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border-soft); color: var(--muted-2); }
.ws-take-badge.ok { color: var(--green); border-color: rgba(62, 207, 155, .32); background: rgba(62, 207, 155, .1); }
.ws-take-badge.bad { color: var(--danger); border-color: rgba(251, 113, 133, .32); background: rgba(251, 113, 133, .1); }
.ws-take-badge.run { color: var(--yellow); border-color: rgba(233, 180, 95, .32); background: rgba(233, 180, 95, .1); }
.ws-take video { width: 100%; max-width: 340px; border-radius: 8px; background: #000; display: block; }
.ws-dl { font-size: var(--fs-sm); color: var(--accent-2); text-decoration: none; }
.ws-dl:hover { text-decoration: underline; }
.ws-err { color: var(--danger); font-size: var(--fs-sm); }
.ws-manual p { margin: 0 0 10px; font-size: var(--fs-md); line-height: 1.75; color: var(--muted); }
.ws-manual b { color: var(--text); }

/* 顶栏控制台入口：上面的通用按钮规则会覆盖，这里再钉一次自己的观感 */
.ws-wrap button.ws-cns-open {
  display: inline-flex; align-items: center; gap: 6px; margin-left: auto; height: 34px; padding: 0 13px;
  background: var(--panel-2); border: 1px solid var(--border-soft); color: var(--text); font-size: var(--fs-md);
}

@media (max-width: 900px) {
  .ws-grid2 { grid-template-columns: 1fr; }
  .ws-char-card, .ws-scene-lib-card { flex-direction: column; }
  .ws-char-anchor, .ws-scene-lib-img { flex: 0 0 auto; width: 100%; max-width: 200px; }
  .ws-ep-row { flex-wrap: wrap; }
  .ws-ep-row > input { flex: 1 1 140px; }
}

/* ===== 青鸟工坊 · 剧本页（贴原文 → 解析） ===== */
.ws-sec-main { border-color: rgba(var(--accent-rgb), .26); }
.ws-epbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ws-ep-jump { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.ws-ep-jump input { width: 62px; min-width: 0; text-align: center; }
#wsRawScript {
  min-height: 190px; line-height: 1.75; font-family: inherit;
  white-space: pre-wrap; resize: vertical;
}
/* 大纲折叠：不做主路径，但需要时还能用 */
.ws-opt { border: 1px solid var(--border-soft); border-radius: 12px; padding: 0 14px 2px; }
.ws-opt > summary {
  cursor: pointer; padding: 12px 0; font-size: var(--fs-sm); color: var(--muted);
  list-style: none; display: flex; align-items: center; gap: 6px;
}
.ws-opt > summary::-webkit-details-marker { display: none; }
.ws-opt > summary::before { content: '▸'; font-size: 11px; color: var(--muted-2); }
.ws-opt[open] > summary::before { content: '▾'; }
.ws-opt > summary:hover { color: var(--text); }
.ws-opt .ws-sec { margin: 4px 0 14px; border: none; padding: 0; background: transparent; }

/* ===== 青鸟工坊 · 资产确认与音色绑定 ===== */
.ws-asset-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.ws-asset-stat {
  flex: 1 1 120px; min-width: 110px; padding: 10px 13px; border-radius: 10px;
  border: 1px solid var(--border-soft); background: var(--panel-2);
  display: flex; flex-direction: column; gap: 2px;
}
.ws-asset-stat b { font-size: 22px; line-height: 1.2; font-weight: 600; }
.ws-asset-stat span { font-size: var(--fs-sm); color: var(--muted); }
.ws-asset-stat i { font-size: var(--fs-xs); color: var(--muted-2); font-style: normal; }
.ws-hint { font-size: var(--fs-sm); color: var(--muted-2); line-height: 1.6; }
.ws-voice-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ws-voice-audio { height: 32px; max-width: 240px; }
.ws-voice-row .ws-hint { flex: 1 1 200px; }

/* ---------------- 工坊 · 后期配音（覆盖原声） ---------------- */
.ws-dub-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 12px 0 4px; padding: 12px 14px;
  border: 1px solid var(--border-soft); border-radius: 12px;
  background: rgba(255, 255, 255, .02);
}
.ws-dub-bar b { font-size: var(--fs-sm); letter-spacing: .02em; }
.ws-dub-bar select {
  font-size: var(--fs-sm); padding: 6px 8px; border-radius: 8px;
  border: 1px solid var(--border-soft); background: var(--surface-2, transparent); color: inherit;
}
.ws-dub-bar .ws-hint { flex: 1 1 260px; }
.ws-take-badge.warn { color: var(--yellow); border-color: rgba(233, 180, 95, .32); background: rgba(233, 180, 95, .1); }
.ws-take-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.ws-dl-quiet { color: var(--muted-2); }
.ws-voice-cloned {
  font-size: var(--fs-xs); padding: 1px 8px; border-radius: 999px;
  color: var(--green); border: 1px solid rgba(62, 207, 155, .32); background: rgba(62, 207, 155, .1);
}

/* ================= 文本节点：编辑闭环 + 内容不溢出卡片 ================= */
/* 字号反向补偿：画布 transform:scale(z) 会把文字一起缩小，
   --cv-zi = 1/z 由 applyCanvasTransform 写入，抵消缩放后屏幕字号始终 ~13px。
   缩小画布时卡片显示为「远看摘要」（能看到前几行说了啥），放大才是全文。
   注意补偿只作用于文字，卡片本身的物理尺寸仍随 zoom 缩小。 */
.cv-node .cv-card-text {
  position: absolute; inset: 0; padding: 16px 16px 30px;
  height: auto; overflow: hidden; white-space: pre-wrap; word-break: break-word;
  cursor: text;
  font-size: var(--cv-fs-sm, var(--t-fs-sm));
  line-height: 1.75;
  -webkit-mask-image: linear-gradient(to bottom, #000 88%, rgba(0, 0, 0, .18) 100%);
  mask-image: linear-gradient(to bottom, #000 88%, rgba(0, 0, 0, .18) 100%);
}
/* 导入的长文档：节点内直接用滚轮读全文。必须关掉上面的渐隐遮罩，
   否则滚到底部时最后几行永远是灰的，看起来像"没加载完"。
   overscroll-behavior:contain 防止滚到尽头把整页也带着滚。 */
.cv-node .cv-card-text.cv-card-scroll {
  overflow-y: auto; overflow-x: hidden;
  -webkit-mask-image: none !important; mask-image: none !important;
  overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(var(--accent-rgb), .5) transparent;
}
.cv-node .cv-card-text.cv-card-scroll::-webkit-scrollbar { width: 6px; }
.cv-node .cv-card-text.cv-card-scroll::-webkit-scrollbar-thumb { border-radius: 6px; background: rgba(var(--accent-rgb), .45); }
/* 空态快捷菜单同样补偿：缩小后按钮也得看得清、点得到 */
.cv-node .cv-card-quick > span,
.cv-node .cv-card-quick button { font-size: var(--cv-fs-sm, var(--t-fs-sm)); }
.cv-node .cv-card-quick b { font-size: var(--cv-fs-cap, var(--t-fs-cap)); }
/* 节点标题补偿：远看时也得知道每个节点叫什么 */
.cv-node-title { font-size: var(--cv-fs-title, 14.5px); }
.cv-node-title.cv-title-overlay { font-size: var(--cv-fs-title-ov, 13px); }
/* 角上给一个明确的「可双击」提示：用户原来根本不知道卡片能双击 */
.cv-node-text::after {
  content: '双击编辑'; position: absolute; right: 9px; bottom: 7px; z-index: 3;
  padding: 2px 7px; border-radius: 6px; pointer-events: none;
  font-size: 10px; letter-spacing: .3px; color: rgba(255, 255, 255, .5);
  background: rgba(10, 10, 10, .55); opacity: 0; transition: opacity .16s;
}
.cv-node-text:hover::after, .cv-node-text.selected::after { opacity: 1; }
body.light .cv-node-text::after { color: rgba(20, 20, 20, .5); background: rgba(255, 255, 255, .8); }

/* 文本编辑器：更大、更像写作台，而不是一个小提示框 */
.cv-text-viewer-area { min-height: 52vh; font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 13.5px; line-height: 1.9; }
.cv-text-viewer-bar .cv-chip-primary { border-color: rgba(var(--accent-rgb), .75); background: rgba(var(--accent-rgb), .16); color: var(--accent); font-weight: 600; }
.cv-text-viewer-bar .cv-chip-primary:hover { background: rgba(var(--accent-rgb), .26); }

/* ================= 画布层叠修正：连线不再挡住节点端口 / 磁吸「+」 ================= */
/* 旧结构：svg(z-index 5) 铺在世界层之上，且 .cv-edge-hit 有 pointer-events:stroke。
   结果端口（在节点边缘）和磁吸「+」（在端口右侧 12px）正好压在 16px 命中区里，
   按下去被当成「点到了连线」→ 压根拉不出传输线。这正是用户反复报的「拉不出线」。
   新结构：连线画在节点下面（视觉上不影响，线本来就只走节点之间的空白），
   世界层整体 pointer-events:none，只有真正的可交互元素接收指针 —— 端口/加号全部恢复正常。 */
.canvas-edges { z-index: 0; }
.canvas-world { z-index: 1; pointer-events: none; }
.canvas-world .cv-node,
.canvas-world .cv-node-title,
.canvas-world .cv-inspector,
.canvas-world .cv-group-card,
.canvas-world .cv-node-plus,
.canvas-world .cv-group-plus { pointer-events: auto; }

/* ================= 画布缩小时文本节点「悬停看全文」浮层 ================= */
/* 卡片在远缩状态下只能显示摘要大字，鼠标停上去弹这个浮层：
   字号固定 13px 不跟画布缩放，完整文案一眼可读。 */
.cv-text-hover-tip {
  position: fixed; z-index: 9999; width: 340px; max-height: 240px;
  display: flex; flex-direction: column; pointer-events: none;
  border: 1px solid rgba(var(--accent-rgb), .34); border-radius: 12px;
  background: rgba(18, 18, 22, .97); box-shadow: 0 18px 48px rgba(0, 0, 0, .6);
  overflow: hidden; font-size: 13px; color: var(--text);
}
body.light .cv-text-hover-tip { background: rgba(255, 255, 255, .98); box-shadow: 0 18px 48px rgba(0, 0, 0, .18); }
.cv-text-hover-tip[hidden] { display: none; }
.cv-tht-head {
  display: flex; align-items: center; gap: 8px; flex: none;
  padding: 9px 12px; font-size: 12px; color: var(--accent);
  border-bottom: 1px solid var(--border-soft); background: rgba(var(--accent-rgb), .07);
}
.cv-tht-head span { margin-left: auto; color: var(--muted-2); font-size: 11px; }
.cv-tht-body {
  padding: 11px 13px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  font-size: 13px; line-height: 1.75; color: var(--text);
}

/* ================= 参数面板：屏幕层，贴着选中节点，不随画布缩放 ================= */
/* 面板在 #canvasViewport 内、#canvasWorld 外，所以字号永远 13px、宽度 560px；
   left/top 由 positionCanvasInspector() 按节点屏幕坐标算，贴在节点下沿
   （下方空间不足才贴上方）。绝不再钉死视口右下角——用户原话「放那么远干嘛」。 */
.cv-inspector-layer {
  position: absolute; z-index: 12; left: 0; top: 0;
  width: min(560px, calc(100vw - 24px)); max-height: calc(100% - 24px);
  pointer-events: none; display: none;
}
.cv-inspector-layer.has-panel { display: block; }
/* --cv-insp-k：面板随画布 zoom 放大的系数（1~1.6，由 applyCanvasTransform 写入）。
   面板挂在屏幕层，不参与 world 的 transform，所以字号/宽度都靠这个系数同步放大，
   否则节点双击放大到 200% 后面板还是指甲盖大小，用户只能盯着 13px 看。 */
.cv-inspector-layer .cv-inspector {
  position: static; width: 100% !important; max-height: calc(100vh - 170px);
  overflow: auto; pointer-events: auto;
  font-size: calc(13px * var(--cv-insp-k, 1));
}
.cv-inspector-title {
  display: flex; align-items: center; gap: 10px; padding: 2px 2px 9px;
  border-bottom: 1px solid var(--border-soft); margin-bottom: 2px;
}
.cv-inspector-title b { font-size: calc(14px * var(--cv-insp-k, 1)); color: var(--accent); font-weight: 600; }
.cv-inspector-title span { font-size: calc(11px * var(--cv-insp-k, 1)); color: var(--muted-2); }
.cv-inspector-title .cv-icon-btn { margin-left: auto; width: 22px; height: 22px; line-height: 1; }
/* 生成按钮放到标题行：面板贴节点下沿时经常被视口底边压扁，
   底部 foot 里的生成按钮会被裁掉点不到 —— 标题永远在最上面，所以这里再放一个。 */
.cv-inspector-title .cv-title-gen { margin-left: auto; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--accent); background: rgba(var(--accent-rgb),.16); color: var(--accent); font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.cv-inspector-title .cv-title-gen:hover { background: rgba(var(--accent-rgb),.28); }
.cv-inspector-title .cv-title-gen + .cv-icon-btn { margin-left: 2px; }
.cv-inspector-layer .cv-inspector-input {
  font-size: calc(13px * var(--cv-insp-k, 1)) !important;
  line-height: 1.85 !important;
  min-height: calc(118px * var(--cv-insp-k, 1));
  max-height: calc(320px * var(--cv-insp-k, 1));
  overflow-y: auto;
}
.cv-inspector-layer .cv-inspector-presets .cv-preset-chip,
.cv-inspector-layer .cv-chip,
.cv-inspector-layer .cv-model-select,
.cv-inspector-layer .cv-gen-btn { font-size: calc(12px * var(--cv-insp-k, 1)) !important; }
@media (max-width: 720px) {
  .cv-inspector-layer { width: min(560px, calc(100vw - 24px)); }
}

/* ================= 文档导入 / 文本浮层只读浏览 ================= */
/* 文档编辑浮层打开时，浮层外面不能拖节点、不能拉连线、不能点关闭，
   只允许滚轮浏览画布（缩放由 app.js 的 wheel 转发到 onCanvasWheel）。 */
.modal-overlay.doc-readonly { background: rgba(3, 6, 12, .48); }
.modal-overlay.doc-readonly #modalBox { pointer-events: auto; }
#canvasViewport.cv-modal-open .cv-node,
#canvasViewport.cv-modal-open .cv-node-title,
#canvasViewport.cv-modal-open .cv-inspector-layer,
#canvasViewport.cv-modal-open .cv-zoom-hud,
#canvasViewport.cv-modal-open .cv-ai-fab { pointer-events: none !important; }
/* 长剧本编辑框：标题 + 接近整屏的书写区，字号固定 14px，不随画布缩放 */
.cv-doc-edit-title {
  font-size: 15px; font-weight: 700; color: #fff; letter-spacing: .3px;
  padding: 2px 0 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.modal.variant-agent:has(.cv-doc-edit) { width: min(980px, calc(100vw - 48px)); }
.cv-doc-edit .cv-text-viewer-area { min-height: 62vh; max-height: 66vh; }

/* ---------------- 提示词芯片编辑器（@ 插入的是素材对象，不是字符串） ---------------- */
.prompt-chip-editor {
  width: 100%; min-height: 68px; max-height: min(46vh, 460px); overflow-y: auto;
  border: 0; outline: 0; background: transparent;
  font-size: var(--t-fs-sm); line-height: 1.9; padding: 4px 4px 0;
  color: var(--text); white-space: pre-wrap; word-break: break-word; cursor: text;
}
.prompt-chip-editor:empty::before {
  content: attr(data-placeholder); color: #8a8070; pointer-events: none;
}
.prompt-chip-editor.is-focus { outline: 0; }
.prompt-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 6px 0 3px; margin: 0 2px;
  border-radius: 999px; vertical-align: middle;
  border: 1px solid rgba(var(--accent-rgb), .55);
  background: rgba(var(--accent-rgb), .14);
  color: var(--accent); font-size: var(--t-fs-sm); font-weight: 700;
  cursor: pointer; user-select: none; white-space: nowrap;
}
.prompt-chip:hover { background: rgba(var(--accent-rgb), .24); border-color: var(--accent); }
.prompt-chip-img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; display: block; }
.prompt-chip-label { line-height: 1; padding-top: 1px; }
.prompt-chip-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%; margin-left: 1px;
  font-size: 11px; line-height: 1; color: var(--muted-2); cursor: pointer;
  opacity: 0; transition: opacity .15s ease;
}
.prompt-chip:hover .prompt-chip-x { opacity: 1; }
.prompt-chip-x:hover { background: rgba(220, 60, 60, .85); color: #fff; }
.prompt-chip-pop {
  position: fixed; z-index: 300; display: flex; gap: 10px; padding: 10px;
  width: 268px; border-radius: 12px; border: 1px solid rgba(var(--accent-rgb), .35);
  background: linear-gradient(160deg, #171d27, #0e131b);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6); color: var(--text);
}
.pcp-img { width: 86px; height: 86px; flex: 0 0 86px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.pcp-meta { display: flex; flex-direction: column; gap: 2px; font-size: var(--t-fs-sm); min-width: 0; }
.pcp-meta b { color: var(--muted-2); font-weight: 600; font-size: var(--t-fs-sm); }
.pcp-meta code { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--accent); word-break: break-all; font-size: var(--t-fs-sm); }
.pcp-del { margin-top: 6px; padding: 5px 8px; border-radius: 7px; border: 1px solid rgba(220, 60, 60, .5); background: rgba(220, 60, 60, .12); color: #ff8a8a; cursor: pointer; font-size: var(--t-fs-sm); }
.pcp-del:hover { background: rgba(220, 60, 60, .25); }
.anchor-unused { font-size: var(--t-fs-sm); color: #d8a13a; background: rgba(216, 161, 58, .1); border: 1px solid rgba(216, 161, 58, .3); padding: 2px 8px; border-radius: 999px; }
/* @ 芯片：图 / 音色 / 视频三类用不同底色，一眼能分清锚的是哪类素材 */
.prompt-chip-audio { border-color: rgba(150, 120, 255, .6); background: rgba(150, 120, 255, .16); color: #b9a6ff; }
.prompt-chip-audio:hover { background: rgba(150, 120, 255, .26); border-color: #b9a6ff; }
.prompt-chip-video { border-color: rgba(90, 200, 190, .55); background: rgba(90, 200, 190, .14); color: #7fd8cf; }
.prompt-chip-video:hover { background: rgba(90, 200, 190, .24); border-color: #7fd8cf; }
.prompt-chip-ico { width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.prompt-chip-ico svg { width: 12px; height: 12px; }
.prompt-chip-dur { font-style: normal; font-size: 11px; font-weight: 500; opacity: .75; padding-right: 2px; }
/* 芯片弹层：音色走试听条，视频走小播放器，图片维持缩略图 */
.prompt-chip-pop.pcp-audio, .prompt-chip-pop.pcp-video { flex-direction: column; width: 286px; }
.pcp-audio audio, .pcp-video { width: 100%; border-radius: 8px; background: rgba(0, 0, 0, .35); }
.pcp-video { max-height: 160px; }
/* 参考音色缩略卡：方形图标 + 播放键 + 时长，点卡片看信息，点播放键直接试听 */
.voice-thumb-media { gap: 7px; padding: 4px 6px 4px 4px; cursor: pointer; }
.voice-thumb-media .vt-face { position: relative; width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center; border-radius: 7px; background: rgba(150, 120, 255, .2); color: #b9a6ff; }
.voice-thumb-media .vt-face > svg { width: 14px; height: 14px; opacity: .55; }
.voice-thumb-media .vt-play { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 7px; background: rgba(10, 12, 18, .45); display: grid; place-items: center; }
.voice-thumb-media .vt-play svg { width: 11px; height: 11px; }
.voice-thumb-media .vt-play:hover { background: rgba(150, 120, 255, .55); }
.voice-thumb-media .vt-meta { display: flex; flex-direction: column; line-height: 1.25; }
.voice-thumb-media .vt-label { font-weight: 700; }
.voice-thumb-media .vt-dur { font-style: normal; font-size: 11px; opacity: .6; }
.voice-thumb-media .vt-x { width: 17px; height: 17px; border-radius: 50%; border: 0; background: rgba(8, 11, 18, .55); color: #fff; display: grid; place-items: center; }
.voice-thumb-media .vt-x svg { width: 10px; height: 10px; }
.voice-thumb-media .vt-x:hover { background: var(--danger); }
.voice-thumb-media.is-playing { border-color: #b9a6ff; box-shadow: 0 0 0 2px rgba(150, 120, 255, .22); }
.voice-thumb-media.is-playing .vt-face > svg { opacity: 1; animation: vtPulse 1s ease-in-out infinite; }
@keyframes vtPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
/* @ 选择器里的音色/视频条目（没有缩略图，用图标占位） */
.mention-item .mention-ico { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--border); background: rgba(150, 120, 255, .16); color: #b9a6ff; }
.mention-item .mention-ico svg { width: 17px; height: 17px; }
.mention-item.mention-video .mention-ico { background: rgba(90, 200, 190, .16); color: #7fd8cf; }

/* ===== 首尾帧接续：视频节点上的「尾帧」「接下一段」 =====
   这是镜头不跳戏的关键动作，给按钮一点颜色，别和 ⤢ / ↓ 混在一起看不见。
   两个按钮都复用 .cv-media-zoom 的位置与点击区，只改配色与宽度。 */
.cv-media-zoom.cv-lastframe-btn { color: #9fe3ff; border-color: rgba(120, 205, 255, .55); }
.cv-media-zoom.cv-lastframe-btn:hover { background: #57c6f5; color: #04121b; border-color: #57c6f5; }
.cv-media-zoom.cv-chain-btn { min-width: 42px; color: #0b0b0b; background: linear-gradient(135deg, #7c5cff, #3fc1ff); border-color: transparent; font-weight: 700; }
.cv-media-zoom.cv-chain-btn:hover { filter: brightness(1.1); color: #0b0b0b; }
.cv-media-zoom[disabled] { opacity: .5; cursor: default; }

/* ===== 批量生成：确认弹层与结果报告 ===== */
.cv-batch-list { display: flex; flex-direction: column; gap: 6px; max-height: 42vh; overflow: auto; margin: 4px 0 10px; }
.cv-batch-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--panel-3); border: 1px solid var(--border); font-size: var(--t-fs-sm); }
.cv-batch-row span:first-child { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-batch-row span:nth-child(2) { flex: 0 0 auto; color: var(--muted-2); }
.cv-batch-row b { flex: 0 0 auto; color: var(--accent); }
.cv-batch-row.bad { background: rgba(224, 112, 106, .12); border-color: rgba(224, 112, 106, .35); }
.cv-batch-row.bad span { white-space: normal; color: #e0706a; }
.cv-batch-total { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 9px; background: rgba(var(--accent-rgb), .1); border: 1px solid rgba(var(--accent-rgb), .25); font-size: var(--t-fs-base); }
.cv-batch-total b { color: var(--accent); font-size: var(--t-fs-md, var(--t-fs-base)); }
.cv-batch-note { margin: 8px 0 0; font-size: var(--t-fs-sm); color: var(--muted-2); line-height: 1.6; }
.cv-batch-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* ============================================================
   2026-12-02 z27（用户 7 条反馈）
   1) 模型面板加宽到用户划线位置（约视口 19.6%，上限 384px），模型字号加大加粗
   2) 1080P 名称写全 + 「官转按秒」渠道胶囊（.model-channel 已有，这里只调字号）
   3) 生成记录加「点击可复用素材」明显带框按钮
   4) API 平台入口搬到顶栏商务合作旁，沿用商务合作那套胶囊做法
   5) 缩放自适应：≤1180 先收窄、≤680 侧栏改抽屉，模型列表不再整块消失
   ============================================================ */
:root { --qn-side-w: clamp(288px, 19.6vw, 384px); }
.sidebar { width: var(--qn-side-w); flex-basis: var(--qn-side-w); }

/* ---------- 1. 模型卡：字大一号、加粗、说明文字提亮 ---------- */
.model-list { padding: 2px 10px 12px; }
.model-card { padding: 11px; gap: 11px; border-radius: 12px; margin-bottom: 4px; }
.model-ico { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; }
.model-name-row { gap: 8px; }
.model-name { font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.model-rate { font-size: 12px; font-weight: 600; }
.model-desc { font-size: 12.5px; font-weight: 500; line-height: 1.58; color: var(--muted); margin-top: 5px; }
.model-channel { font-size: 11px; font-weight: 700; padding: 2px 8px; margin-right: 6px; letter-spacing: .3px; }
.model-mini-tag { font-size: 11px; font-weight: 600; }
.model-meta { margin-top: 7px; gap: 7px; }
.model-price { font-size: 12.5px; font-weight: 700; }
.model-stab { font-size: 11.5px; font-weight: 600; }
.model-header { padding: 12px 14px 10px; }
.model-tabs { gap: 18px; }
.model-tab { font-size: 13px; font-weight: 600; }
.search-box { height: 34px; }
.search-box input { font-size: 13px; }

/* ---------- 3. 生成记录：可复用素材卡（明显的框 + 悬停变实线） ---------- */
.gen-reuse {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  width: 100%; padding: 10px 12px 11px; margin-top: 2px;
  border: 2px dashed rgba(var(--accent-rgb), .62); border-radius: 12px;
  background: rgba(var(--accent-rgb), .08); color: var(--text);
  cursor: pointer; text-align: left; transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
}
.gen-reuse:hover { border-style: solid; border-color: var(--accent); background: rgba(var(--accent-rgb), .12); box-shadow: 0 8px 24px rgba(0, 0, 0, .34); transform: translateY(-1px); }
.gen-reuse:active { transform: none; }
.gen-reuse-tip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--accent); letter-spacing: .02em; }
.gen-reuse-tip svg { width: 15px; height: 15px; flex: 0 0 15px; }
.gen-reuse-arrow { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.gen-reuse:hover .gen-reuse-arrow { color: var(--text); }
.gen-reuse .gen-user-imgs { width: 100%; justify-content: flex-start; }
.gen-reuse .gen-user-imgs img { width: 62px; height: 62px; border-radius: 9px; }
.gen-params span em { font-style: normal; color: var(--muted-2); margin-right: 4px; font-weight: 500; }

/* ---------- 4. 顶栏「API 平台」：与商务合作同一套胶囊，配色走主题色区分 ---------- */
.api-co-btn {
  background: linear-gradient(110deg, rgba(var(--accent-rgb), .26), rgba(var(--accent-rgb), .08));
  border-color: rgba(var(--accent-rgb), .42); color: var(--text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}
.api-co-btn:hover { background: linear-gradient(110deg, rgba(var(--accent-rgb), .38), rgba(var(--accent-rgb), .14)); border-color: var(--accent); box-shadow: 0 6px 22px rgba(0, 0, 0, .42); }
body.light .api-co-btn { color: #2a2419; }

/* ---------- 5. 缩放自适应 ---------- */
@media (max-width: 1440px) {
  .topbar { padding: 0 16px; }
  .topbar-left, .topbar-right { gap: 8px; }
}
@media (max-width: 1180px) {
  :root { --qn-side-w: 272px; }
  .backend-chip { display: none; }             /* 后端状态最不关键，第一个让位 */
  .model-desc { -webkit-line-clamp: 2; }
  .biz-co-btn, .api-co-btn { padding: 6px 11px; font-size: 12px; }
}
@media (max-width: 1000px) {
  .top-link { font-size: 0; gap: 0; padding: 0 9px; }   /* 接口设置收成图标 */
  .top-link svg { width: 15px; height: 15px; }
  .pill-btn span { display: none; }
  .pill-btn { padding: 0 10px; }
  .topbar { height: 54px; flex: 0 0 54px; }
}
/* 顶栏永不撑破：右侧内容放不下时横向滚动，不裁字不重叠 */
.topbar-left, .topbar-right { min-width: 0; }
.topbar-right { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 2px 0; }
.topbar-right::-webkit-scrollbar { height: 0; }

/* ≤680：侧栏改抽屉（左上角按钮开合），模型列表保持完整可点 */
@media (max-width: 680px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 70;
    width: min(86vw, 320px); flex-basis: auto;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .6);
  }
  body.sb-drawer .sidebar { transform: none; }
  body.sb-drawer::after {
    content: ""; position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .52);
  }
  .sidebar.collapsed { width: min(86vw, 320px); flex-basis: auto; }
  .sidebar.collapsed .model-header, .sidebar.collapsed .model-list,
  .sidebar.collapsed .brand-text, .sidebar.collapsed .new-task-btn span,
  .sidebar.collapsed .nav-item span, .sidebar.collapsed .user-info { display: revert; }
  .collapse-btn { display: grid; }
  .topbar { padding: 0 10px; }
  .composer-wrap { padding: 0 8px 10px; }
  .gen-turn-user-body { max-width: 92%; }
}

/* z27 模型卡：名称独占第一行（渠道胶囊跟在名字后），把「性价比」这类口头禅挪到价格行，
   避免名字被挤成「通义万相 3.0 …」——用户要看清完整名称 */
.model-name-row { flex-wrap: nowrap; }
.model-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-meta .model-rate { margin-left: auto; }
.model-meta .model-price:empty { display: none; }

/* ≤680：抽屉关着的时候，贴在侧栏右边缘的「对话历史」手柄会露在屏幕最左边，像一块多余的竖条 */
@media (max-width: 680px) {
  body:not(.sb-drawer) .chat-history-handle { display: none; }
  body.sb-drawer .chat-history-handle { display: flex; right: -30px; }
}

/* z27：模型下拉（生成栏「普通参考 / 请选择模型」那种列表）里的模型名同样加大加粗，
   和侧栏模型卡保持一个口径，避免「侧栏看得清、下拉还是糊」 */
.pop-option .opt-label { font-size: 13.5px; font-weight: 600; }
.pop-option { min-height: 36px; }

/* z29：配音页交互与短剧音色
   1) 文案面板整块可点、聚焦时高亮，占位字在聚焦后收起
   2) 短剧角色预设卡（音色 + 情绪 + 语速打包）
   3) 右栏情绪演绎 chip */
.dub-text-panel { transition: border-color .15s ease, box-shadow .15s ease; }
.dub-text-panel:hover { border-color: var(--border); }
.dub-text-panel.is-focus { border-color: rgba(var(--accent-rgb),.5); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),.18); }
.dub-text-panel .dub-panel-head.is-focus b { color: var(--accent); }
.dub-textarea { caret-color: var(--accent); }

.dub-drama-tip { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; margin-bottom: 2px; border-radius: 8px; background: rgba(var(--accent-rgb),.07); border: 1px solid rgba(var(--accent-rgb),.18); }
.dub-drama-tip b { font-size: var(--t-fs-sm); color: var(--accent); }
.dub-drama-tip span { font-size: var(--t-fs-cap); color: var(--muted-2); line-height: 1.55; }
.dub-drama-group { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.dub-drama-group > span { font-size: var(--t-fs-cap); color: var(--muted-2); letter-spacing: .06em; }
.dub-drama-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dub-drama-card { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); text-align: left; }
.dub-drama-card:hover { border-color: var(--accent); }
.dub-drama-card.active { border-color: var(--accent); background: rgba(var(--accent-rgb),.12); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),.22); }
.dub-drama-card b { font-size: var(--t-fs-sm); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dub-drama-card small { font-size: var(--t-fs-cap); color: var(--muted-2); line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dub-drama-card > span { display: flex; gap: 4px; margin-top: 2px; }
.dub-drama-card > span em { font-style: normal; font-size: var(--t-fs-cap); color: var(--accent); border: 1px solid rgba(var(--accent-rgb),.3); border-radius: 4px; padding: 0 4px; line-height: 15px; }

.dub-emo { padding: 12px 0; border-top: 1px solid var(--border-soft); }
.dub-emo-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.dub-emo-head b { font-size: var(--t-fs-sm); }
.dub-emo-head span { font-size: var(--t-fs-cap); color: var(--accent); font-weight: 600; }
.dub-emo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dub-emo-chips button { border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); font-size: var(--t-fs-cap); border-radius: 13px; padding: 3px 9px; cursor: pointer; }
.dub-emo-chips button:hover { color: var(--text); border-color: var(--accent); }
.dub-emo-chips button.active { background: var(--accent); border-color: var(--accent); color: #0b0b0b; font-weight: 700; }
.dub-emo-note { display: block; margin-top: 8px; font-size: var(--t-fs-cap); color: var(--muted-2); line-height: 1.55; }

@media (max-width: 1180px) {
  .dub-drama-grid { grid-template-columns: 1fr; }
}
.dub-drama-clone { align-self: flex-start; margin-top: 4px; border: 1px solid rgba(var(--accent-rgb),.45); background: transparent; color: var(--accent); font-size: var(--t-fs-cap); border-radius: 11px; padding: 2px 9px; cursor: pointer; }
.dub-drama-clone:hover { background: rgba(var(--accent-rgb),.12); }

/* ================= z30：作品可点开 / 历史条可读 / 侧栏对齐 / 顶栏彩色入口 ================= */

/* 1) 我的作品：整张卡可点开预览 */
.work-thumb { position: relative; cursor: zoom-in; background: #0e0e0e; }
.work-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.work-thumb video, .work-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.work-thumb-missing { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted-2); font-size: var(--t-fs-cap); }
.work-thumb-missing svg { width: 26px; height: 26px; opacity: .6; }
/* 悬浮才出现的「播放 / 查看大图」提示，避免缩略图看着像静态装饰 */
.work-play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.55)); opacity: 0; transition: opacity .16s ease; pointer-events: none; }
.work-play svg { width: 34px; height: 34px; padding: 9px; box-sizing: content-box; border-radius: 50%; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.42); backdrop-filter: blur(2px); }
.work-play b { font-size: var(--t-fs-cap); font-weight: 600; letter-spacing: .04em; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.work-thumb:hover .work-play, .work-thumb:focus-visible .work-play { opacity: 1; }
.work-thumb:hover em { opacity: 0; }
.work-card { transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.work-card:hover { transform: translateY(-2px); border-color: rgba(var(--accent-rgb),.34); box-shadow: 0 10px 26px rgba(0,0,0,.28); }
.work-body b.work-open { cursor: pointer; }
.work-body b.work-open:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.work-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.work-open-btn { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid rgba(var(--accent-rgb),.34); background: rgba(var(--accent-rgb),.1); color: var(--accent); font-size: var(--t-fs-cap); font-weight: 600; cursor: pointer; white-space: nowrap; }
.work-open-btn svg { width: 12px; height: 12px; }
.work-open-btn:hover { background: rgba(var(--accent-rgb),.2); }
.work-actions .work-download { margin-top: 0; }
.work-audio-preview { display: flex; flex-direction: column; gap: 14px; }
.work-audio-preview .wap-ico { width: 54px; height: 54px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: rgba(var(--accent-rgb),.12); border: 1px solid rgba(var(--accent-rgb),.3); }
.work-audio-preview .wap-ico svg { width: 26px; height: 26px; }
.work-audio-preview .wap-text { font-size: 13px; line-height: 1.7; color: var(--text); margin: 0; }
.work-audio-preview audio { width: 100%; }

/* 2) 右上角「作品预览」信息条 */
.mv-bar { position: absolute; z-index: 3; top: 20px; left: 24px; right: 82px; display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 12px; background: rgba(12,12,14,.72); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px); }
.mv-bar[hidden] { display: none; }
.mv-bar-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mv-bar-main b { font-size: 13px; font-weight: 600; color: #f4f1ea; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-bar-main small { font-size: 11px; color: rgba(244,241,234,.6); }
.mv-bar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.mv-bar-btn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: rgba(var(--accent-rgb),.14); color: #f4f1ea; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none; }
.mv-bar-btn svg { width: 13px; height: 13px; }
.mv-bar-btn:hover { background: rgba(var(--accent-rgb),.26); }
.mv-bar-btn.ghost { background: transparent; color: rgba(244,241,234,.75); }
.mv-bar-btn.ghost:hover { color: #fff; background: rgba(255,255,255,.1); }
@media (max-width: 720px) {
  .mv-bar { top: 12px; left: 12px; right: 64px; padding: 10px 12px; }
  .mv-bar-main b { font-size: 12px; }
}

/* 4) 侧栏四个入口：等高对齐；智能体不再常驻实心 */
.side-nav { grid-auto-rows: 1fr; align-items: stretch; }
.nav-item { justify-content: flex-start; padding: 11px 2px 10px; min-height: 58px; }
.nav-item svg { flex: 0 0 18px; }
.nav-item.agent-nav { background: transparent; border: 1px solid transparent; color: var(--muted); }
.nav-item.agent-nav em { margin-top: 1px; font-size: 10px; letter-spacing: .02em; color: var(--muted-2); }
.nav-item.agent-nav:hover { background: var(--panel); border-color: transparent; color: var(--text); }
.nav-item.agent-nav:hover em { color: var(--muted); }
.nav-item.agent-nav.active { color: var(--accent); background: rgba(var(--accent-rgb), .09); border-color: rgba(var(--accent-rgb), .24); }

/* 5) 顶栏：问题反馈 / 站内通知（未读角标）/ 立即充值（彩色） */
.top-notice { position: relative; }
.notice-badge { position: absolute; top: -6px; right: -6px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 9px; font-style: normal; font-weight: 700; line-height: 15px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.notice-badge[hidden] { display: none; }
.recharge-top-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px 0 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); cursor: pointer; background: linear-gradient(100deg, #7c5cff 0%, #a855f7 52%, #e879b9 100%); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; box-shadow: 0 4px 16px rgba(124,92,255,.4); transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.recharge-top-btn .rtb-coin { width: 19px; height: 19px; flex: 0 0 19px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 32% 28%, #ffe79a, #f5b93e 62%, #d9931f); color: #6c4405; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.recharge-top-btn .rtb-coin svg { width: 12px; height: 12px; }
.recharge-top-btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 7px 22px rgba(124,92,255,.55); }
.recharge-top-btn:active { transform: translateY(0); }

/* 6) 站内通知弹窗 */
.notice-box { display: flex; flex-direction: column; gap: 20px; max-height: 62vh; overflow-y: auto; }
.notice-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.notice-sec-head b { font-size: 13px; }
.notice-sec-head span { font-size: 11px; color: var(--muted-2); }
.notice-row.new { position: relative; padding-left: 14px; }
.notice-row.new::before { content: ""; position: absolute; left: 0; top: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.notice-empty { padding: 26px 0; text-align: center; font-size: 12px; color: var(--muted-2); border: 1px dashed var(--border); border-radius: 10px; }

/* 7) 侧栏模型分组：四个分类图标各自上色 */
.group-tab[data-group="video"] svg { color: #f6c453; }
.group-tab[data-group="chat"] svg { color: #6fb3ff; }
.group-tab[data-group="image"] svg { color: #c08cff; }
.group-tab[data-group="audio"] svg { color: #45d6b0; }
.group-tab[data-group="video"].active { color: #f8d68a; border-color: rgba(246,196,83,.5); background: linear-gradient(100deg, rgba(246,196,83,.2), rgba(246,196,83,.06)); }
.group-tab[data-group="chat"].active { color: #a8cdff; border-color: rgba(111,179,255,.5); background: linear-gradient(100deg, rgba(111,179,255,.2), rgba(111,179,255,.06)); }
.group-tab[data-group="image"].active { color: #d8b6ff; border-color: rgba(192,140,255,.5); background: linear-gradient(100deg, rgba(192,140,255,.2), rgba(192,140,255,.06)); }
.group-tab[data-group="audio"].active { color: #8ff0d5; border-color: rgba(69,214,176,.5); background: linear-gradient(100deg, rgba(69,214,176,.2), rgba(69,214,176,.06)); }

@media (max-width: 1440px) {
  .topbar-right { gap: 8px; }
}
@media (max-width: 1180px) {
  .recharge-top-btn { padding: 0 12px 0 7px; font-size: 11px; }
  .topbar-right .top-notice span { display: none; }
  .topbar-right .top-notice { padding: 0 9px; }
}
@media (max-width: 860px) {
  /* 只留图标，避免顶栏被挤出屏幕（右侧是横向滚动区，滚出去的按钮等于不存在）。
     功能中心里还有「意见反馈」，顶栏这条先收掉，把位置留给转化入口。 */
  .topbar-right .top-feedback { display: none !important; }
  .topbar-right .biz-co-btn span { display: none; }
  .topbar-right .biz-co-btn { padding: 0 9px; }
  .topbar-right .recharge-top-btn .rtb-label { display: none; }
  .topbar-right .recharge-top-btn { padding: 0 9px; }
}

/* 预览层：源文件被清理时的兜底说明 */
.mv-error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; color: #f2ede4; background: rgba(10,10,12,.82); border-radius: 10px; }
.mv-error svg { width: 34px; height: 34px; color: var(--yellow); }
.mv-error b { font-size: 14px; }
.mv-error span { font-size: 12px; color: rgba(242,237,228,.6); max-width: 320px; line-height: 1.7; }

/* ============ z31 顶栏「平台广播」慢速跑马灯（内容后台可设） ============ */
.topbar-broadcast {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px;
  height: 32px; margin: 0 18px; padding: 0 12px 0 11px;
  border: 1px solid rgba(255,255,255,.085); border-radius: 999px;
  background: linear-gradient(92deg, rgba(var(--accent-rgb), .12), rgba(255,255,255,.022) 46%, rgba(255,255,255,.01));
  overflow: hidden;
}
.topbar-broadcast[hidden] { display: none; }
.topbar-broadcast .bc-label {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  padding-right: 10px; border-right: 1px solid rgba(255,255,255,.1);
  font-size: 11px; font-weight: 600; letter-spacing: .04em; white-space: nowrap; color: var(--accent);
}
.topbar-broadcast .bc-label svg { width: 14px; height: 14px; }
.topbar-broadcast .bc-viewport {
  position: relative; flex: 1 1 auto; min-width: 0; height: 100%;
  display: flex; align-items: center; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 22px), transparent 100%);
}
.topbar-broadcast .bc-track {
  display: inline-flex; align-items: center; white-space: nowrap; will-change: transform;
  animation-name: bc-scroll; animation-timing-function: linear; animation-iteration-count: infinite;
}
/* 广播文字改成彩色：渐变挂在整条轨道上，文字本身透明，由背景裁切上色，
   这样整条是一条连续色带（金→粉→紫→青→薄荷），而不是每段各起一段彩虹 */
.topbar-broadcast .bc-track {
  background-image: linear-gradient(96deg, #ffd76e 0%, #ff9bb3 18%, #b99bff 40%, #6ed7ff 62%, #8ff0c4 82%, #ffd76e 100%);
  background-repeat: no-repeat; background-size: 100% 100%;
  -webkit-background-clip: text; background-clip: text;
}
.topbar-broadcast .bc-item {
  font-size: 12px; letter-spacing: .01em;
  color: transparent; -webkit-text-fill-color: transparent;
}
.topbar-broadcast .bc-item em { font-style: normal; font-weight: 800; }
.topbar-broadcast .bc-sep { color: transparent; -webkit-text-fill-color: transparent; }
.topbar-broadcast .bc-sep { font-size: 11px; color: rgba(var(--accent-rgb), .8); margin: 0 22px; }
/* 悬停暂停，方便看清文字；移开继续 */
.topbar-broadcast:hover .bc-track { animation-play-state: paused; }
@keyframes bc-scroll { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(calc(-1 * var(--bc-shift, 100%)), 0, 0); } }
@media (prefers-reduced-motion: reduce) {
  .topbar-broadcast .bc-track { animation: none !important; }
  .topbar-broadcast .bc-viewport .bc-item { overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 1440px) {
  .topbar-broadcast { margin: 0 12px; }
}
@media (max-width: 1180px) {
  .topbar-broadcast { margin: 0 8px; padding: 0 10px; gap: 8px; }
  .topbar-broadcast .bc-label b { display: none; }
  .topbar-broadcast .bc-label { padding-right: 8px; }
}
@media (max-width: 980px) {
  /* 窄屏优先保住右侧转化入口（充值 / 商务合作），广播整条收起 */
  .topbar-broadcast { display: none !important; }
}

/* 后台「平台广播」设置面板 */
.bc-admin-preview { margin: 10px 0 0; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; background: var(--panel); }
.bc-admin-preview .bc-pv-label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted-2); margin-bottom: 8px; }
.bc-admin-preview .bc-pv-label svg { width: 13px; height: 13px; color: var(--accent); }
.bc-admin-preview .bc-pv-line { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-admin-hint { font-size: 11px; color: var(--muted-2); line-height: 1.7; margin-top: 6px; }
.bc-admin-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bc-admin-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.bc-admin-row input[type="range"] { width: 160px; accent-color: var(--accent); }

/* ============ z31 顶栏抗挤压：广播条让位，其余按钮绝不被压成竖排 ============ */
/* 广播是「可让位」的那一个：有空间就撑满，没空间缩到 0，绝不挤别人 */
.topbar-broadcast { flex: 1 1 0%; min-width: 0; }
/* 左侧固定宽度，不许压缩（之前被压成「任 / 务 / 列 / 表」竖排） */
.topbar-left { flex: 0 0 auto; }
/* 右侧内容按自然宽度排，实在放不下才在自己内部横向滚动 */
.topbar-right { flex: 0 1 auto; min-width: 0; }
.topbar-left > *, .topbar-right > * { flex: 0 0 auto; }
.topbar .pill-btn, .topbar .round-btn, .topbar .top-link,
.topbar .biz-co-btn, .topbar .api-co-btn, .topbar .recharge-top-btn,
.topbar .pill-btn span, .topbar .top-link span,
.topbar .biz-co-btn span, .topbar .recharge-top-btn .rtb-label {
  white-space: nowrap; word-break: keep-all;
}

/* z31 顶栏空间阶梯：越窄越先收次要入口，保证「广播能看清 + 充值/商务不被挤出去」 */
@media (max-width: 1800px) {
  .topbar-right .backend-chip { display: none; }                          /* 后端诊断状态最不关键 */
  .topbar-right .top-feedback span, .topbar-right .top-notice span { display: none; }
  .topbar-right .top-feedback, .topbar-right .top-notice { padding: 0 9px; }
  .topbar-right .top-feedback svg, .topbar-right .top-notice svg { width: 15px; height: 15px; }
}
@media (max-width: 1500px) {
  .topbar-right .biz-co-btn span { display: none; }
  .topbar-right .biz-co-btn { padding: 0 9px; }
  .topbar-broadcast { margin: 0 10px; }
}
@media (max-width: 860px) {
  .topbar-left, .topbar-right { gap: 6px; }              /* 窄屏收紧间距，省下一条按钮的位置 */
}
@media (max-width: 770px) {
  .topbar-right .api-co-btn span { display: none; }      /* API 平台收成图标 */
  .topbar-right .api-co-btn { padding: 0 9px; }
}
@media (max-width: 760px) {
  /* 极窄屏再挤一点：间距与内边距都收，保证最后一个图标不被挤出屏幕 */
  .topbar-left, .topbar-right { gap: 4px; }
  .topbar-right .top-link, .topbar-right .biz-co-btn, .topbar-right .recharge-top-btn { padding: 0 7px; }
  .topbar .pill-btn { padding: 0 8px; }
}

/* ============ z32 手机号 + 短信验证码登录 ============ */
/* 验证码一行：输入框占满，按钮贴底对齐（和 input 同高，不能浮在半空） */
.auth-pro .auth-code-line { display: flex; align-items: stretch; gap: 9px; }
.auth-pro .auth-code-line input { flex: 1 1 auto; min-width: 0; }
.auth-pro .auth-code-btn {
  flex: 0 0 auto; padding: 0 14px;
  border-radius: 9px; border: 1px solid rgba(var(--accent-rgb), .5);
  background: rgba(var(--accent-rgb), .12); color: var(--accent);
  font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer;
  transition: background .16s ease, border-color .16s ease, opacity .16s ease;
}
.auth-pro .auth-code-btn:hover:not(:disabled) { background: rgba(var(--accent-rgb), .2); border-color: var(--accent); }
.auth-pro .auth-code-btn:disabled { opacity: .55; cursor: default; }
.auth-pro .auth-captcha-tip { margin: -2px 0 12px; }
body.light .auth-pro .auth-code-btn { background: rgba(var(--accent-rgb), .14); }
@media (max-width: 420px) {
  .auth-pro .auth-code-btn { padding: 0 10px; font-size: 12px; }
}

/* ============ z45 青鸟工坊 · 简约大气配色作用域（2026-12-03） ============
   只在 .ws-wrap 内覆盖主题变量，不碰全站三套主题；深浅两套随 body.light 自动切。
   之前工坊黑白是因为根主题 --bg:#0b0b0b / --accent-rgb:242,242,242（纯白），这里就地改成石板灰+靛蓝。
   ui-system.css 无 .ws- 规则，本段选择器 specificity 足够，不会被 !important 吃掉。 */
.ws-wrap {
  --bg:#151922; --panel:#1c212c; --panel-2:#222834; --panel-3:#2a3140;
  --border:#313a4b; --border-soft:rgba(230,235,245,.08);
  --text:#e7eaf0; --muted:#98a1b2; --muted-2:#6f7889;
  --accent:#6379d8; --accent-rgb:99,121,216; --accent-2:#8a9bec;
  --yellow:#d5a458; --danger:#e0707f; --green:#4ea882;
  --ws-ok:#4ea882; --ws-lock:#d5a458; --ws-ready:#5b8dd6; --ws-todo:#6f7889;
}
body.light .ws-wrap {
  --bg:#f5f6f8; --panel:#ffffff; --panel-2:#f8f9fb; --panel-3:#eef0f4;
  --border:#e2e5ea; --border-soft:rgba(30,40,60,.07);
  --text:#1d2330; --muted:#5d6779; --muted-2:#929bad;
  --accent:#4c63bd; --accent-rgb:76,99,189; --accent-2:#3f54a8;
  --yellow:#a9742c; --danger:#c0455a; --green:#2f8a63;
  --ws-ok:#2f8a63; --ws-lock:#a9742c; --ws-ready:#3d72b8; --ws-todo:#929bad;
}

/* --- 制作页：顶部镜头分页 + 双视图 --- */
.ws-prod-tabs{display:flex;gap:6px;overflow-x:auto;padding:2px 0 8px}
.ws-prod-tabs::-webkit-scrollbar{height:4px}
.ws-prod-tabs::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px}
.ws-prod-tab{flex:0 0 74px;border:1px solid var(--border);background:var(--panel);border-radius:7px;padding:6px;text-align:left;transition:border-color .15s,background .15s}
.ws-prod-tab:hover{border-color:var(--muted-2)}
.ws-prod-tab.on{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.ws-prod-tab .thumb{height:36px;border-radius:4px;margin-bottom:5px;position:relative;overflow:hidden;background:linear-gradient(150deg,hsl(var(--h) 30% 42%),hsl(calc(var(--h) + 26) 28% 20%))}
.ws-prod-tab .thumb:after{content:"";position:absolute;left:34%;bottom:-14%;width:32%;height:66%;border-radius:50% 50% 0 0;background:rgba(255,255,255,.14)}
.ws-prod-tab .r{display:flex;align-items:center;gap:5px;font-size:11px}
.ws-prod-tab .r b{font-size:12px}
.ws-prod-tab .r i{margin-left:auto}
.ws-prod-tab .nm{font-size:10px;color:var(--muted-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ws-prod-dot{width:6px;height:6px;border-radius:50%;flex:none}
.ws-prod-dot.done{background:var(--ws-ok)}.ws-prod-dot.locked{background:var(--ws-lock)}
.ws-prod-dot.ready{background:var(--ws-ready)}.ws-prod-dot.todo{background:var(--ws-todo)}

.ws-prod-grid{display:grid;grid-template-columns:minmax(210px,250px) minmax(300px,1fr) minmax(250px,290px);gap:12px;align-items:start}
.ws-prod-card{background:var(--panel);border:1px solid var(--border);border-radius:9px;padding:13px;min-width:0}
.ws-prod-card>.hd{display:flex;align-items:center;gap:8px;margin-bottom:11px;font-size:13px}
.ws-prod-card>.hd b{font-weight:600}
.ws-prod-card>.hd .tag{font-size:10px;color:var(--accent-2);border:1px solid var(--border);border-radius:5px;padding:1px 6px}
.ws-prod-card>.hd .sp{flex:1}
.ws-prod-card>.hd .n{font-size:11px;color:var(--muted-2)}
.ws-prod-stage{position:relative;border-radius:6px;overflow:hidden;aspect-ratio:9/13;max-height:380px;background:#0f131c}
.ws-prod-stage img,.ws-prod-stage video{width:100%;height:100%;object-fit:cover;display:block}
.ws-prod-stage .ph{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:20px;color:var(--muted-2);font-size:12px;line-height:1.8;
  background:linear-gradient(160deg,hsl(var(--h,240) 26% 30%),hsl(calc(var(--h,240) + 28) 24% 14%))}
.ws-prod-stage .ph .fg{position:absolute;left:50%;bottom:5%;transform:translateX(-50%);width:52%;height:55%;border-radius:46% 46% 10% 10%;background:rgba(255,255,255,.10)}
.ws-prod-stage .cap{position:absolute;left:9px;top:9px;font-size:10px;background:rgba(12,15,22,.7);color:#fff;border-radius:5px;padding:3px 7px;z-index:2}
.ws-prod-acts{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:10px}
.ws-prod-acts button{border:1px solid var(--border);background:var(--panel-2);border-radius:7px;padding:8px 5px;font-size:11px;color:var(--muted)}
.ws-prod-acts button:hover{color:var(--text);border-color:var(--accent)}
.ws-prod-acts button.main{border-color:var(--accent);color:var(--accent-2);font-weight:600}
.ws-prod-lock{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:11px;color:var(--muted)}
.ws-prod-lock .on{color:var(--ws-lock);font-weight:600}
.ws-prod-lock button{margin-left:auto;border:1px solid var(--border);background:var(--panel-2);border-radius:6px;padding:4px 9px;font-size:11px;color:var(--muted)}

.ws-prod-fld{margin-bottom:11px}
.ws-prod-fld label{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted);margin-bottom:5px}
.ws-prod-fld label span{font-size:10px;color:var(--muted-2);border:1px solid var(--border);border-radius:4px;padding:0 5px}
.ws-prod-fld textarea{min-height:64px}
.ws-prod-vars{display:flex;flex-wrap:wrap;gap:5px;margin-top:5px}
.ws-prod-vars span{font-size:10px;color:var(--accent-2);border:1px dashed var(--border);border-radius:5px;padding:1px 6px}
.ws-prod-dlg{border-left:2px solid var(--yellow);background:rgba(213,164,88,.07);padding:8px 10px;border-radius:0 6px 6px 0;font-size:12px;line-height:1.7}
.ws-prod-dlg em{font-style:normal;color:var(--yellow);font-weight:600}
.ws-prod-tip{font-size:11px;color:var(--muted-2);line-height:1.7;border-top:1px solid var(--border);padding-top:9px}
.ws-prod-tip b{color:var(--muted);font-weight:600}
.ws-prod-row{display:flex;gap:8px;align-items:center;margin-bottom:9px;font-size:11px;color:var(--muted)}
.ws-prod-row>span:first-child{width:56px;flex:none}
.ws-prod-chips{display:flex;flex-wrap:wrap;gap:5px;flex:1;min-width:0}
.ws-prod-chip{font-size:10px;color:var(--muted);border:1px solid var(--border);border-radius:5px;padding:4px 8px;background:var(--panel-2);white-space:nowrap}
.ws-prod-chip.on{border-color:var(--accent);color:var(--accent-2);background:rgba(var(--accent-rgb),.12)}
.ws-prod-warn{font-size:11px;color:var(--yellow);background:rgba(213,164,88,.06);border:1px solid rgba(213,164,88,.22);border-radius:6px;padding:8px 10px;margin-top:10px;line-height:1.6}

/* --- 制作页：分镜列表（参考图那种一行一镜，保留原详情页信息） --- */
.ws-prod-list{display:grid;gap:8px}
.ws-prod-rowcard{display:grid;grid-template-columns:120px minmax(220px,1fr) 240px 100px;gap:12px;align-items:start;background:var(--panel);border:1px solid var(--border);border-radius:9px;padding:10px}
.ws-prod-rowcard:hover{border-color:var(--muted-2)}
.ws-prod-rowcard.on{border-color:var(--accent)}
.ws-prod-rowcard .thumb{height:78px;border-radius:5px;position:relative;overflow:hidden;background:linear-gradient(150deg,hsl(var(--h) 30% 40%),hsl(calc(var(--h)+26) 28% 18%))}
.ws-prod-rowcard .thumb img{width:100%;height:100%;object-fit:cover}
.ws-prod-rowcard .thumb b{position:absolute;left:6px;top:6px;font-size:10px;background:rgba(12,15,22,.72);color:#fff;border-radius:4px;padding:2px 5px}
.ws-prod-rowcard .mid .t{font-size:12px;font-weight:600;margin-bottom:4px;display:flex;gap:7px;align-items:center}
.ws-prod-rowcard .mid .p{font-size:11px;color:var(--muted);line-height:1.6;max-height:52px;overflow:hidden}
.ws-prod-rowcard .right{border-left:1px solid var(--border);padding-left:11px;font-size:11px;color:var(--muted);line-height:1.65;min-width:0}
.ws-prod-rowcard .right b{color:var(--yellow);font-weight:600}
.ws-prod-rowcard .right .st{color:var(--muted-2);font-size:10px}
.ws-prod-rowcard .op{display:grid;gap:5px}
.ws-prod-rowcard .op button{border:1px solid var(--border);background:var(--panel-2);border-radius:6px;padding:6px 4px;font-size:11px;color:var(--muted)}
.ws-prod-rowcard .op button:hover{color:var(--text);border-color:var(--accent)}
.ws-prod-rowcard .op button.p{color:var(--accent-2);border-color:var(--accent)}

@media(max-width:1160px){
  .ws-prod-grid{grid-template-columns:210px 1fr}
  .ws-prod-grid>.ws-prod-card:last-child{grid-column:1/-1}
  .ws-prod-rowcard{grid-template-columns:100px 1fr 200px}
  .ws-prod-rowcard .op{grid-column:1/-1;grid-template-columns:repeat(4,1fr)}
}
@media(max-width:720px){
  .ws-prod-tabs{padding:2px 0 6px}
  .ws-prod-tab{flex-basis:62px}
  .ws-prod-grid{grid-template-columns:1fr}
  .ws-prod-grid>.ws-prod-card:last-child{grid-column:auto}
  .ws-prod-stage{max-height:none;aspect-ratio:9/13}
  .ws-prod-rowcard{grid-template-columns:80px 1fr;gap:8px}
  .ws-prod-rowcard .right{grid-column:1/-1;border-left:0;border-top:1px solid var(--border);padding:8px 0 0}
  .ws-prod-rowcard .op{grid-column:1/-1;grid-template-columns:repeat(4,1fr)}
}
