/* =================================================================
   巽谷 · 亮色现代 SaaS 皮肤（v7）
   参考：云剪大师 / Notion / Linear / 飞书 风格
   配色：白底 + 紫蓝渐变主色 + 深灰文字
   两端共用：本地 EXE webContents.insertCSS + 服务器 <link> 加载
================================================================= */

/* 强制浏览器用亮色主题渲染原生控件（select dropdown / scrollbar / checkbox / radio） */
:root, html, body {
  color-scheme: light !important;
}

:root {
  /* 灰阶（从最浅到最深） */
  --apl-bg:           #F7F8FB;   /* body 底板 */
  --apl-bg-2:         #FFFFFF;   /* 卡片 / 主面板 */
  --apl-bg-3:         #F3F4F6;   /* 输入框 / hover */
  --apl-bg-4:         #E5E7EB;   /* 边界 / 分隔 */
  --apl-bg-glass:     rgba(255, 255, 255, 0.78);

  /* 文字（v7.2 进一步加深：用户反馈"导航条那么黑"，主体字也要那样黑） */
  --apl-text:         #000000;   /* 纯黑，主文字 */
  --apl-text-2:       #1E293B;   /* slate-800，副标题/label/desc 也几乎黑 */
  --apl-text-3:       #475569;   /* slate-600，placeholder/极次级小字 */
  --apl-text-on-primary: #FFFFFF;

  /* 边框（v7.6 加深一档，让卡片分隔更明显，整体不再浮浮的） */
  --apl-border:       rgba(15, 23, 42, 0.12);
  --apl-border-2:     rgba(15, 23, 42, 0.18);
  --apl-border-3:     rgba(15, 23, 42, 0.28);

  /* 强调色（紫蓝渐变体系） */
  --apl-primary:        #6366F1;   /* indigo-500 */
  --apl-primary-2:      #8B5CF6;   /* violet-500 */
  --apl-primary-hover:  #4F46E5;   /* indigo-600 */
  --apl-primary-soft:   #EEF2FF;   /* indigo-50 选中态浅紫 */
  --apl-primary-soft-2: #E0E7FF;   /* indigo-100 hover */

  --apl-blue:           #3B82F6;
  --apl-purple:         #8B5CF6;
  --apl-pink:           #EC4899;
  --apl-green:          #10B981;
  --apl-orange:         #F59E0B;
  --apl-red:            #EF4444;

  /* 渐变 */
  --apl-grad-primary:   linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  --apl-grad-primary-hover: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  --apl-grad-danger:    linear-gradient(135deg, #F43F5E 0%, #EF4444 100%);
  --apl-grad-success:   linear-gradient(135deg, #10B981 0%, #059669 100%);

  --apl-radius-lg:    16px;
  --apl-radius:       10px;
  --apl-radius-sm:    8px;

  --apl-shadow:       0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --apl-shadow-md:    0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --apl-shadow-lg:    0 10px 32px rgba(15, 23, 42, 0.12), 0 4px 8px rgba(15, 23, 42, 0.06);
  --apl-shadow-primary: 0 8px 24px rgba(99, 102, 241, 0.30);

  --apl-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
              "Helvetica Neue", "Microsoft YaHei", "Segoe UI", sans-serif;
}

/* ── 1. 基础：白底 + 苹果字体 ────────────────────── */
html, body {
  background: var(--apl-bg) !important;
  background-image: none !important;
  color: var(--apl-text) !important;
  font-family: var(--apl-font) !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}
* {
  font-family: var(--apl-font) !important;
  letter-spacing: -0.005em !important;
}

/* 通用容器抹平花哨背景 */
body, body div, body section, body article, body main, body aside,
body nav, body header, body footer, body ul, body li, body form, body fieldset,
[class*="container"], [class*="wrapper"], [class*="page"], [class*="layout"],
[class*="content"], [class*="main"] {
  background-color: transparent !important;
  background-image: none !important;
}
body { background: var(--apl-bg) !important; }

/* ── 2. 卡片 / 面板：白底 + 极浅边框 + 浅阴影 ────── */
[class*="card"], [class*="panel"], [class*="box"]:not(input):not(select):not(textarea),
[class*="tile"], [class*="block"]:not(html):not(body),
[class*="section"]:not(section):not(button) {
  background: var(--apl-bg-2) !important;
  background-image: none !important;
  color: var(--apl-text) !important;
  border: 1px solid var(--apl-border) !important;
  border-radius: var(--apl-radius) !important;
  box-shadow: var(--apl-shadow) !important;
}

/* ── 3. 顶部栏 / 工具栏 ──────────────────────────── */
[class*="header"], [class*="topbar"], [class*="navbar"], [class*="toolbar"],
[class*="appbar"], [class*="head-bar"] {
  background: var(--apl-bg-glass) !important;
  backdrop-filter: saturate(180%) blur(20px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  border-bottom: 1px solid var(--apl-border) !important;
  box-shadow: none !important;
  color: var(--apl-text) !important;
}

/* ── 4. 左侧 sidebar ──────────────────────────────── */
[class*="sidebar"], [class*="side-nav"], [class*="aside"], [class*="left-bar"],
body > div > nav, body > nav, body > div > aside, body > aside,
body > div:first-child > div:first-child,
body > div > div:first-child:not([class*="content"]):not([class*="main"]):not([class*="page"]) {
  background: var(--apl-bg-2) !important;
  background-image: none !important;
  border-right: 1px solid var(--apl-border) !important;
  color: var(--apl-text) !important;
}
[class*="sidebar"] *, [class*="side-nav"] *,
body > div > nav *, body > nav *, body > div > aside *, body > aside * {
  background-color: transparent !important;
  color: var(--apl-text) !important;
}

/* sidebar 选中 / active 态：浅紫底 + 紫色文字 */
[class*="sidebar"] [class*="active"], [class*="sidebar"] [class*="selected"],
[class*="side-nav"] [class*="active"], [class*="side-nav"] [class*="selected"],
[class*="menu-item"][class*="active"], [class*="menu-item"][class*="selected"],
[class*="nav-item"][class*="active"], [class*="nav-item"][class*="selected"] {
  background: var(--apl-primary-soft) !important;
  background-image: none !important;
  color: var(--apl-primary) !important;
  border-radius: var(--apl-radius-sm) !important;
  font-weight: 600 !important;
}

/* ── 5. 按钮基础 ─────────────────────────────────── */
button, [class*="btn"]:not(input):not(textarea), [role="button"],
input[type="button"], input[type="submit"] {
  background: var(--apl-bg-2) !important;
  background-image: none !important;
  color: var(--apl-text) !important;
  border: 1px solid var(--apl-border-2) !important;
  border-radius: var(--apl-radius-sm) !important;
  font-weight: 500 !important;
  font-family: var(--apl-font) !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  text-shadow: none !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
button:hover, [class*="btn"]:hover, [role="button"]:hover {
  background: var(--apl-bg-3) !important;
  border-color: var(--apl-border-3) !important;
  box-shadow: var(--apl-shadow) !important;
}
button:active, [class*="btn"]:active { transform: translateY(0.5px) scale(0.99); }

/* primary 主按钮：紫蓝渐变 + 阴影 */
button[class*="primary"], [class*="btn-primary"], [class*="btn-main"],
button[type="submit"], [class*="cta"]:not([class*="cancel"]) {
  background: var(--apl-grad-primary) !important;
  background-image: var(--apl-grad-primary) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: var(--apl-shadow-primary) !important;
  font-weight: 600 !important;
}
button[class*="primary"]:hover, [class*="btn-primary"]:hover,
button[type="submit"]:hover {
  background-image: var(--apl-grad-primary-hover) !important;
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.40) !important;
  transform: translateY(-1px) !important;
}

/* danger 按钮 */
button[class*="danger"], [class*="btn-danger"], [class*="btn-delete"], [class*="btn-red"] {
  background: var(--apl-grad-danger) !important;
  background-image: var(--apl-grad-danger) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.30) !important;
  font-weight: 600 !important;
}

/* ── 6. 输入框 ───────────────────────────────────── */
input, textarea, select {
  background: var(--apl-bg-2) !important;
  color: var(--apl-text) !important;
  border: 1px solid var(--apl-border-2) !important;
  border-radius: var(--apl-radius-sm) !important;
  padding: 9px 12px !important;
  font-family: var(--apl-font) !important;
  font-size: 14px !important;
  transition: all 0.18s ease !important;
  box-shadow: none !important;
}
input::placeholder, textarea::placeholder { color: var(--apl-text-3) !important; }
input:focus, textarea:focus, select:focus {
  outline: none !important;
  border-color: var(--apl-primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

/* ── 7. 链接 ─────────────────────────────────────── */
a, a:visited { color: var(--apl-primary) !important; text-decoration: none !important; }
a:hover { color: var(--apl-primary-hover) !important; text-decoration: underline !important; }

/* ── 8. 文字 ─────────────────────────────────────── */
body, body p, body span, body div, body label, body li, body td, body th,
body dt, body dd, body small, body strong, body em, body b, body i,
body h1, body h2, body h3, body h4, body h5, body h6 {
  color: var(--apl-text) !important;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 600 !important;
  letter-spacing: -0.022em !important;
  text-shadow: none !important;
}
h1 { font-weight: 700 !important; }
body small, body [class*="hint"], body [class*="tip"], body [class*="desc"],
body [class*="muted"], body [class*="secondary"], body [class*="subtitle"] {
  color: var(--apl-text-2) !important;
}
/* 暗底用的白字残留拉成深色 */
[style*="color: white"], [style*="color:#fff"], [style*="color: #fff"],
[style*="color:#FFF"], [style*="color: #FFFFFF"], [style*="color:#FFFFFF"],
[style*="color:#f"], [style*="color: #f"],
[style*="color:#e"], [style*="color: #e"] {
  color: var(--apl-text) !important;
}
/* 但按钮里的白字保留 */
button *, [class*="btn"] *, [role="button"] * {
  color: inherit !important;
}

/* ── 9. 表格 ─────────────────────────────────────── */
table { border-collapse: collapse !important; background: var(--apl-bg-2) !important; }
th {
  background: var(--apl-bg-3) !important;
  color: var(--apl-text-2) !important;
  font-weight: 600 !important;
  border-bottom: 1px solid var(--apl-border) !important;
  padding: 10px 12px !important;
}
td {
  background: transparent !important;
  border-bottom: 1px solid var(--apl-border) !important;
  padding: 10px 12px !important;
  color: var(--apl-text) !important;
}
tr:hover td { background: var(--apl-bg-3) !important; }

/* ── 10. Tag / Badge / Chip ──────────────────────── */
[class*="tag"]:not([class*="image"]), [class*="badge"], [class*="chip"], [class*="pill"] {
  background: var(--apl-bg-3) !important;
  color: var(--apl-text-2) !important;
  border: 1px solid var(--apl-border) !important;
  border-radius: 999px !important;
  padding: 3px 10px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* ── 11. Modal / Dialog ──────────────────────────── */
[class*="modal"], [class*="dialog"]:not(button), [class*="popup"], [class*="drawer"] {
  background: var(--apl-bg-2) !important;
  background-image: none !important;
  backdrop-filter: none !important;
  border-radius: var(--apl-radius-lg) !important;
  box-shadow: var(--apl-shadow-lg) !important;
  border: 1px solid var(--apl-border) !important;
  color: var(--apl-text) !important;
}
[class*="mask"], [class*="overlay"], [class*="backdrop"] {
  background: rgba(15, 23, 42, 0.40) !important;
  backdrop-filter: blur(2px) !important;
}

/* ── 12. 滚动条 ──────────────────────────────────── */
::-webkit-scrollbar { width: 10px !important; height: 10px !important; }
::-webkit-scrollbar-track { background: transparent !important; }
::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18) !important;
  border-radius: 5px !important;
  border: 2px solid transparent !important;
  background-clip: content-box !important;
}
::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.30) !important; background-clip: content-box !important; }

/* ── 13. 选中文本 ────────────────────────────────── */
::selection { background: rgba(99, 102, 241, 0.20) !important; color: var(--apl-text) !important; }

/* ── 14. 进度条 ──────────────────────────────────── */
progress, input[type="range"] { accent-color: var(--apl-primary) !important; }
[class*="progress"]:not([class*="progress-bar-text"]) {
  background: var(--apl-bg-3) !important;
  border-radius: 999px !important;
}
[class*="progress"] [class*="bar"], [class*="progress-fill"] {
  background: var(--apl-grad-primary) !important;
  border-radius: 999px !important;
}

/* ── 15. 视频区 ──────────────────────────────────── */
video, [class*="video-player"], [class*="player-wrap"] {
  background: #000000 !important;
  border-radius: var(--apl-radius) !important;
}

/* ── 16. 兜底：所有深紫色背景 → 白底 ────────────── */
[style*="background:#0e0920"], [style*="background: #0e0920"],
[style*="background:#14102a"], [style*="background:#1a0f2e"],
[style*="background:#0a0717"], [style*="background:#1f"],
[style*="background-color:#0e0920"], [style*="background-color:#1"],
[style*="linear-gradient"][style*="#0e0920"],
[style*="linear-gradient"][style*="#14102a"] {
  background: var(--apl-bg-2) !important;
  background-image: none !important;
  color: var(--apl-text) !important;
}

/* =================================================================
   v5 desktop.html 真实 class 名精准命中（保留之前的）
================================================================= */

/* H1. 流水线主按钮 .pl-btn（默认 = 主按钮） */
.pl-btn:not(.pl-btn-secondary):not(.pl-btn-sm):not(.pl-btn-text) {
  background: var(--apl-grad-primary) !important;
  background-image: var(--apl-grad-primary) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: var(--apl-shadow-primary) !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  min-height: 38px !important;
  padding: 10px 22px !important;
}
.pl-btn:not(.pl-btn-secondary):not(.pl-btn-sm):hover {
  background-image: var(--apl-grad-primary-hover) !important;
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.40) !important;
  transform: translateY(-1px) !important;
}

/* H2. 流水线次要 */
.pl-btn.pl-btn-secondary, .pl-btn-secondary {
  background: var(--apl-bg-2) !important;
  background-image: none !important;
  color: var(--apl-text) !important;
  border: 1px solid var(--apl-border-2) !important;
  box-shadow: var(--apl-shadow) !important;
  font-weight: 500 !important;
}
.pl-btn-secondary:hover {
  background: var(--apl-bg-3) !important;
  border-color: var(--apl-border-3) !important;
}
.pl-btn.pl-btn-sm, .pl-btn-sm {
  min-height: 28px !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
}

/* H3. 关键 CTA */
.gen-btn, .rewrite-do, .tail-rewrite, .tail-seedance {
  background: var(--apl-grad-primary) !important;
  background-image: var(--apl-grad-primary) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: var(--apl-shadow-primary) !important;
  font-weight: 600 !important;
  min-height: 36px !important;
  padding: 9px 20px !important;
}
.gen-btn:hover, .rewrite-do:hover, .tail-rewrite:hover, .tail-seedance:hover {
  background-image: var(--apl-grad-primary-hover) !important;
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.45) !important;
  transform: translateY(-1px) !important;
}

/* H4. 复制按钮 */
.copy-btn, .tail-copy {
  background: var(--apl-bg-3) !important;
  color: var(--apl-text) !important;
  border: 1px solid var(--apl-border-2) !important;
  box-shadow: none !important;
}
.copy-btn:hover, .tail-copy:hover { background: var(--apl-bg-4) !important; }

/* H5. 删除类 */
.mat-remove, .ghc-del {
  background: var(--apl-grad-danger) !important;
  background-image: var(--apl-grad-danger) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.30) !important;
  font-weight: 500 !important;
}

/* H6 已迁移至 v28 */

/* H7. Tab / mode-btn */
.pl-tab, .ls-mode-btn {
  background: transparent !important;
  color: var(--apl-text-2) !important;
  border: 1px solid transparent !important;
  border-radius: var(--apl-radius-sm) !important;
  box-shadow: none !important;
  font-weight: 500 !important;
  text-shadow: none !important;
  padding: 6px 14px !important;
}
.pl-tab.active, .ls-mode-btn.active {
  background: var(--apl-primary-soft) !important;
  color: var(--apl-primary) !important;
  border-color: transparent !important;
  font-weight: 600 !important;
}
.pl-tab:hover:not(.active), .ls-mode-btn:hover:not(.active) {
  background: var(--apl-bg-3) !important;
  color: var(--apl-text) !important;
}

/* H8. Chip */
.pl-chip {
  background: var(--apl-bg-3) !important;
  color: var(--apl-text-2) !important;
  border: 1px solid var(--apl-border) !important;
  border-radius: 999px !important;
  padding: 4px 12px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
.pl-chip.active {
  background: var(--apl-primary-soft) !important;
  color: var(--apl-primary) !important;
  border-color: var(--apl-primary) !important;
  font-weight: 600 !important;
}

/* H9. Bootstrap .btn .btn-primary / .btn-secondary */
.btn.btn-primary, button.btn.btn-primary {
  background: var(--apl-grad-primary) !important;
  background-image: var(--apl-grad-primary) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: var(--apl-shadow-primary) !important;
  font-weight: 600 !important;
}
.btn.btn-secondary, button.btn.btn-secondary, .btn.btn-sm.btn-secondary {
  background: var(--apl-bg-2) !important;
  color: var(--apl-text) !important;
  border: 1px solid var(--apl-border-2) !important;
  box-shadow: var(--apl-shadow) !important;
}

/* =================================================================
   v6 inline-style 紫色按钮 + onclick CTA 兜底
================================================================= */

button[style*="linear-gradient"][style*="#7c5cff"],
button[style*="linear-gradient"][style*="#ff5cc8"],
button[style*="linear-gradient"][style*="#a78bfa"],
button[style*="linear-gradient"][style*="#a855f7"],
button[style*="linear-gradient"][style*="#8b5cf6"],
button[style*="linear-gradient"][style*="purple"],
button[style*="background:#7c5cff"], button[style*="background: #7c5cff"],
button[style*="background:#a78bfa"], button[style*="background:#8b5cf6"],
button[style*="rgba(124,92,255"], button[style*="rgba(124, 92, 255"] {
  background: var(--apl-grad-primary) !important;
  background-image: var(--apl-grad-primary) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: var(--apl-shadow-primary) !important;
  font-weight: 600 !important;
  text-shadow: none !important;
}

button[onclick*="doLogin"], button[onclick*="doRegister"],
button[onclick*="doTts"], button[onclick*="plLipSync"],
button[onclick*="plRewrite"], button[onclick*="plGenTitle"],
button[onclick*="plDownloadFinal"], button[onclick*="plDownloadVideo"],
button[onclick*="plPublish"], button[onclick*="plReuseLastVideo"],
button[onclick*="openFullEditor"], button[onclick*="openCover"],
button[onclick*="addPip"], button[onclick*="oneshot"],
button[onclick*="h5OpenEdit"], button[onclick*="h5e_apply"],
button[onclick*="h5Submit"], button[onclick*="extractText"],
button[onclick*="generateAudio"], button[onclick*="generateVideo"],
button[onclick*="startGen"], button[onclick*="startClone"] {
  background: var(--apl-grad-primary) !important;
  background-image: var(--apl-grad-primary) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: var(--apl-shadow-primary) !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  min-height: 36px !important;
  padding: 9px 20px !important;
}

button[onclick*="delete"], button[onclick*="remove"],
button[onclick*="cleanup"], button[onclick*="clearGen"],
button[onclick*="clearAnalyze"], button[onclick*="plClearHistory"],
button[onclick*="plDeleteHistoryItem"], button[onclick*="plRemoveVideo"],
button[onclick*="delMy"], button[onclick*="delCloned"], button[onclick*="plReset"] {
  background: var(--apl-grad-danger) !important;
  background-image: var(--apl-grad-danger) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.30) !important;
  font-weight: 500 !important;
  text-shadow: none !important;
}

button[onclick*="Close"], button[onclick*="close"],
button[onclick*="Cancel"], button[onclick*="cancel"],
button[onclick*="hideModal"] {
  background: var(--apl-bg-2) !important;
  background-image: none !important;
  color: var(--apl-text-2) !important;
  border: 1px solid var(--apl-border-2) !important;
  box-shadow: none !important;
  font-weight: 500 !important;
}

/* inline style 含浅紫 background → 改成 primary-soft */
button[style*="rgba(124,92,255,.25)"],
button[style*="rgba(124, 92, 255, .25)"],
button[style*="rgba(124,92,255,0.25)"] {
  background: var(--apl-primary-soft) !important;
  background-image: none !important;
  color: var(--apl-primary) !important;
  border: 1px solid var(--apl-primary) !important;
}

/* ── 步骤序号圆球（01/02/04/05）→ 紫蓝渐变 ───────── */
[class*="step-no"], [class*="step-num"], [class*="step-index"],
[class*="badge-num"], [class*="circle-num"] {
  background: var(--apl-grad-primary) !important;
  background-image: var(--apl-grad-primary) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.30) !important;
}

/* ── 图标按钮 ───────────────────────────────────── */
[class*="icon-btn"]:not([class*="primary"]),
[class*="icon-only"], [class*="circle-btn"] {
  background: var(--apl-bg-2) !important;
  border: 1px solid var(--apl-border) !important;
  min-height: 32px !important;
  min-width: 32px !important;
  padding: 6px !important;
}
[class*="icon-btn"]:hover, [class*="icon-only"]:hover {
  background: var(--apl-bg-3) !important;
  border-color: var(--apl-border-2) !important;
}

/* ── SVG 图标颜色 ───────────────────────────────── */
svg { color: var(--apl-text) !important; }
[class*="icon"] svg, [class*="ico-"] svg { fill: currentColor !important; }

/* ── 状态色（已发布/草稿/失败） ──────────────────── */
[class*="status-success"], [class*="success"]:not(button),
[class*="published"], [class*="completed"] {
  color: var(--apl-green) !important;
}
[class*="status-draft"], [class*="draft"] {
  color: var(--apl-text-2) !important;
}
[class*="status-error"], [class*="error"]:not(input):not(textarea),
[class*="failed"] {
  color: var(--apl-red) !important;
}

/* =================================================================
   ── 登录页专项修复 ─────────────────────────────────
   .auth-overlay 是 fixed inset:0 容器（含 z-index:500 + flex 居中），
   不是 modal 的 mask，所以不能用 .overlay 通用规则覆盖
================================================================= */

.auth-overlay {
  background: rgba(247, 248, 251, 0.85) !important;
  background-image: none !important;
  backdrop-filter: saturate(180%) blur(16px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(16px) !important;
  /* 保留原 position/inset/z-index/display（不动） */
  pointer-events: auto !important;
}

.auth-box {
  background: var(--apl-bg-2) !important;
  background-image: none !important;
  border: 1px solid var(--apl-border-2) !important;
  border-radius: var(--apl-radius-lg) !important;
  box-shadow: var(--apl-shadow-lg) !important;
  padding: 36px !important;
  color: var(--apl-text) !important;
  pointer-events: auto !important;
}
.auth-box h2 { color: var(--apl-text) !important; }
.auth-box .subtitle { color: var(--apl-text-2) !important; }

.auth-field { margin-bottom: 14px !important; }
.auth-field label {
  color: var(--apl-text-2) !important;
  display: block !important;
  margin-bottom: 4px !important;
  font-size: 12px !important;
}
.auth-field input,
.auth-overlay input[type="email"],
.auth-overlay input[type="password"],
.auth-overlay input[type="text"] {
  width: 100% !important;
  background: #FFFFFF !important;
  color: var(--apl-text) !important;
  border: 1px solid var(--apl-border-2) !important;
  border-radius: var(--apl-radius-sm) !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  outline: none !important;
  box-shadow: none !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 1 !important;
  -webkit-text-fill-color: var(--apl-text) !important;  /* Chrome autofill */
  caret-color: var(--apl-primary) !important;
}
.auth-field input::placeholder { color: var(--apl-text-3) !important; }
.auth-field input:focus {
  border-color: var(--apl-primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}
.auth-switch, .auth-switch a {
  color: var(--apl-text-2) !important;
}
.auth-switch a {
  color: var(--apl-primary) !important;
  cursor: pointer !important;
}
.auth-error {
  color: var(--apl-red) !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.20) !important;
  border-radius: var(--apl-radius-sm) !important;
  padding: 8px 12px !important;
}

/* 把通用 .overlay 规则的副作用排除掉 auth-overlay */
[class*="mask"]:not(.auth-overlay):not([class*="auth"]),
[class*="overlay"]:not(.auth-overlay):not([class*="auth"]),
[class*="backdrop"]:not(.auth-overlay):not([class*="auth"]) {
  background: rgba(15, 23, 42, 0.40) !important;
  backdrop-filter: blur(2px) !important;
}

/* =================================================================
   ── v7.3 主体文字"看起来"和 sidebar 一样黑 ─────────
   关键：不光改颜色，更要把 font-weight 提到 500（中粗），
   否则 400 weight 的纯黑在白底仍显得"细而灰"
================================================================= */

/* v7.8 — 用户要求"所有带文字的都加粗加黑"：全部 700 + 纯黑 */
body, body p, body span, body div, body label, body li, body td, body th,
body dt, body dd, body strong, body em, body b, body i, body a,
body small, body sub, body sup, body cite, body q, body code,
body button, body input, body select, body textarea, body option {
  color: #000000 !important;
  font-weight: 700 !important;
}
body h1, body h2 { font-weight: 800 !important; color: #000000 !important; }
body h3, body h4 { font-weight: 800 !important; color: #000000 !important; }
body h5, body h6 { font-weight: 700 !important; color: #000000 !important; }
body strong, body b { font-weight: 800 !important; }

/* 副标题 / 说明 / hint / muted —— 也加粗加黑 */
[class*="hint"], [class*="tip"], [class*="desc"],
[class*="muted"], [class*="secondary"], [class*="subtitle"],
[class*="sub-text"], [class*="sub-title"],
[class*="label"]:not(input):not(textarea), body small {
  color: #000000 !important;
  font-weight: 700 !important;
}

/* placeholder 单独保持一点弱化，否则跟实际输入混 */
input::placeholder, textarea::placeholder {
  color: #475569 !important;
  font-weight: 500 !important;
  opacity: 1 !important;
}

/* 任何 inline 写死浅灰的文字 → 拉到 slate-900 + 中粗 */
[style*="color:#5"], [style*="color: #5"],
[style*="color:#6"], [style*="color: #6"],
[style*="color:#7"], [style*="color: #7"],
[style*="color:#8"], [style*="color: #8"],
[style*="color:#9"], [style*="color: #9"],
[style*="color:#a"], [style*="color: #a"],
[style*="color:#b"], [style*="color: #b"],
[style*="color:#c"], [style*="color: #c"],
[style*="color:#d"], [style*="color: #d"],
[style*="color:#e"], [style*="color: #e"],
[style*="color:#f"], [style*="color: #f"],
[style*="color:gray"], [style*="color: gray"],
[style*="color:grey"], [style*="color: grey"],
[style*="color:rgba(255"], [style*="color: rgba(255"],
[style*="color:rgb(150"], [style*="color: rgb(150"],
[style*="color:rgb(170"], [style*="color: rgb(170"],
[style*="color:rgb(180"], [style*="color: rgb(180"],
[style*="color:rgb(200"], [style*="color: rgb(200"] {
  color: #1E293B !important;
  font-weight: 500 !important;
}

/* inline opacity 低的元素 —— 在白底上看不见，强制不透明 */
[style*="opacity:.5"], [style*="opacity: .5"],
[style*="opacity:0.5"], [style*="opacity: 0.5"],
[style*="opacity:.6"], [style*="opacity: .6"],
[style*="opacity:0.6"], [style*="opacity: 0.6"],
[style*="opacity:.7"], [style*="opacity: .7"],
[style*="opacity:0.7"], [style*="opacity: 0.7"],
[style*="opacity:.8"], [style*="opacity: .8"],
[style*="opacity:0.8"], [style*="opacity: 0.8"],
[style*="opacity:.85"], [style*="opacity: .85"] {
  opacity: 1 !important;
}

/* =================================================================
   ── v7.4 全局输入框字色强制黑 ──────────────────────
   远程页面到处有 `input { color: #fff }`（暗底白字遗留），
   切到亮色后字看不见。用 -webkit-text-fill-color 强压所有 input。
================================================================= */

input, textarea, select,
[contenteditable], [contenteditable="true"] {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  caret-color: #6366F1 !important;
  background: #FFFFFF !important;
  background-image: none !important;
  border: 1px solid rgba(15, 23, 42, 0.15) !important;
  font-weight: 500 !important;
}

input::placeholder, textarea::placeholder {
  color: #64748B !important;
  -webkit-text-fill-color: #64748B !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}

/* Chrome autofill 的黄底覆盖：用 box-shadow 把背景改白 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  -webkit-text-fill-color: #000000 !important;
  caret-color: #6366F1 !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* select 选项也强制黑字白底（option 元素需要单独覆盖） */
select {
  color-scheme: light !important;
  background: #FFFFFF !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  font-weight: 700 !important;
  border: 1px solid rgba(15,23,42,0.18) !important;
}
option, optgroup {
  color: #000000 !important;
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  -webkit-text-fill-color: #000000 !important;
  font-weight: 600 !important;
}
option:checked, option:hover {
  background: #EEF2FF !important;
  background-color: #EEF2FF !important;
  color: #6366F1 !important;
}

/* 输入框右侧的小按钮（粘贴 / 清空）—— 紧贴 input 的 button 强制可见 */
input + button, input ~ button:not([class*="primary"]):not(.pl-btn),
[class*="paste"], [class*="clear-input"], [class*="clear-btn"] {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
  border: 1px solid rgba(15,23,42,0.18) !important;
  box-shadow: none !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  min-width: 32px !important;
}

/* "数字人" 类似的紫色边胶囊按钮：白底深字（避免紫字紫底） */
button[style*="border"][style*="purple"],
button[style*="border"][style*="#7c"],
button[style*="border"][style*="#a"],
[class*="brand-toggle"], [class*="brand-pill"] {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
  border: 1px solid rgba(99, 102, 241, 0.30) !important;
  font-weight: 700 !important;
}
button[style*="border"][style*="purple"] *,
[class*="brand-toggle"] *, [class*="brand-pill"] * {
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
}

/* 一些 inline style 把 input 颜色写死 #fff/#eee/rgba(255,255,255) 的 */
input[style*="color:#fff"], input[style*="color: #fff"],
input[style*="color:#FFF"], input[style*="color: #FFF"],
input[style*="color:white"], input[style*="color: white"],
input[style*="color:rgba(255"], input[style*="color: rgba(255"],
textarea[style*="color:#fff"], textarea[style*="color: #fff"],
textarea[style*="color:white"], textarea[style*="color: white"] {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

/* =================================================================
   ── v7.6 顶部 header 按钮兜底：还原"初始状态"的视觉   ───
   之前 v6 把所有含浅紫的按钮变成紫底紫字，紫字在浅紫底上不可见。
   顶部 nav 那排按钮（本地识别/云端 API/抖音 Cookie/巽谷）
   必须强制：白底 + 深字 + 灰边，恢复可读
================================================================= */

/* 顶部 header / topbar 内的所有非 primary 按钮 */
[class*="header"] button:not([class*="primary"]):not([class*="btn-main"]),
[class*="header"] [class*="btn"]:not([class*="primary"]):not([class*="btn-main"]),
[class*="header"] [class*="pill"], [class*="header"] [class*="capsule"],
[class*="topbar"] button:not([class*="primary"]),
[class*="topbar"] [class*="btn"]:not([class*="primary"]),
[class*="appbar"] button:not([class*="primary"]),
[class*="appbar"] [class*="btn"]:not([class*="primary"]),
[class*="navbar"] button:not([class*="primary"]),
body > div > [class*="head"]:first-child button:not([class*="primary"]),
body > [class*="head"] button:not([class*="primary"]) {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
  border: 1px solid rgba(15, 23, 42, 0.18) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
  font-weight: 500 !important;
  text-shadow: none !important;
  padding: 6px 14px !important;
  min-height: 32px !important;
}
[class*="header"] button:not([class*="primary"]):hover,
[class*="topbar"] button:not([class*="primary"]):hover {
  background: #F3F4F6 !important;
  border-color: rgba(15, 23, 42, 0.28) !important;
}

/* 兜底：所有 .pill 默认是按钮风格，不再当 chip。强制可见 */
[class*="pill"]:not([class*="active"]) {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
  border: 1px solid rgba(15, 23, 42, 0.18) !important;
  font-weight: 500 !important;
  text-shadow: none !important;
}
[class*="pill"] *, [class*="capsule"] * {
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
}

/* 顶部 header 内部任何 inline 写紫色字的元素 → 强制深灰 */
[class*="header"] [style*="color:#7c"], [class*="header"] [style*="color: #7c"],
[class*="header"] [style*="color:#a78bfa"], [class*="header"] [style*="color: #a78bfa"],
[class*="header"] [style*="color:#a855f7"], [class*="header"] [style*="color: #a855f7"],
[class*="topbar"] [style*="color:#7c"], [class*="topbar"] [style*="color: #7c"] {
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
}

/* =================================================================
   ── v7.10 远程 HTML 内置 .class { color:#fff } 精准覆盖 ───
   远程页面 <style> 里有 76 处 .xxx { color:#fff } 写死白字，
   优先级 (0,0,1,0) 比我的 body div (0,0,0,2) 高 → 必须用 .class 同级覆盖
================================================================= */

/* 标题 / Hero / Logo 区文字（原本写在深色 banner 上的白字）→ 强制黑 */
.sidebar-logo, .topbar-title, .topbar-info, .topbar-credits,
.user-name, .userName, .nick-name, .user-info,
.analyze-hero, .analyze-hero h1, .analyze-hero h2, .analyze-hero p, .analyze-hero span, .analyze-hero div,
.gen-hero, .gen-hero h1, .gen-hero h2, .gen-hero p, .gen-hero span, .gen-hero div,
.search-hero, .search-hero h1, .search-hero p,
.lib-hero, .lib-hero h1, .lib-hero p,
.publish-hero, .publish-hero h1, .publish-hero p,
.hist-hero, .hist-hero h1, .hist-hero p,
.section-title, .section-header, .step-title, .step-name,
.pl-section-label, .pl-step-name, .pl-step-title,
.gen-step-title, .gen-step-label,
.h5-section-title,
.tab-label, .tab-title,
.modal-title, .modal-header, .dialog-title,
.card-title, .card-header, .card-name,
.field-label, .form-label,
.tip-title, .hint-title,
.empty-tip, .empty-hint, .empty-text,
.stat-label, .stat-value, .stat-title,
.subtitle, .desc, .description, .summary,
.copy-label, .meta-label, .meta-value,
.mat-name, .mat-info, .mat-title,
.avq-title, .avq-info, .avq-tip,
.cover-title, .cover-info,
.h5e_pip_label, .h5e_pip_name,
.ls-title, .ls-name, .ls-info, .ls-tip,
.pl-help, .pl-info-line, .pl-status, .pl-meta,
.pl-tab-name, .pl-tab-label,
.history-name, .history-meta, .history-time,
.video-title, .video-name, .video-meta,
.fab-text, .fab-label,
.tier-name, .tier-desc, .tier-info {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  font-weight: 700 !important;
}

/* 输入框相关 class 强制黑字白底（已经被 input/textarea 通用规则覆盖，这里加 class 兜底） */
.link-input, .gen-textarea, .param-select, .gen-input,
.auth-input, .pl-input, .h5-input, .search-input,
.modal-input, .form-input, .field-input,
input.link-input, textarea.gen-textarea, select.param-select {
  background: #FFFFFF !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  border: 1px solid rgba(15, 23, 42, 0.18) !important;
  font-weight: 700 !important;
}

/* 用户头像里的字母保留白字（彩色圆球背景上的白字应该保留） */
.user-avatar, .user-avatar *,
.avatar-letter, .avatar-text, .avatar-initial {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

/* mat-label / mat-remove 等是覆盖在缩略图上的小标签，保留白字 */
.mat-label, .mat-remove, .video-overlay, .thumb-overlay, .thumb-label {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

/* 各种 hero / banner 容器虽然带紫色渐变，但里面的文字也应该是白字（保留视觉对比） */
.analyze-hero, .gen-hero, .search-hero, .lib-hero, .publish-hero,
.hist-hero, .avq-banner, .stat-banner, .vip-banner {
  /* 容器本身保持渐变（不动 background） */
  /* 但我们要求文字黑 → 由前面规则强制 */
}

/* 任何带 gradient / 强烈底色的按钮内的文字明显白色（保留） */
.analyze-btn, .analyze-btn *,
.tail-seedance, .tail-seedance *,
.rewrite-do, .rewrite-do *,
.gen-btn, .gen-btn *,
.pl-btn:not(.pl-btn-secondary):not(.pl-btn-sm), .pl-btn:not(.pl-btn-secondary):not(.pl-btn-sm) *,
.tail-copy.ok, .tail-copy.ok * {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

/* =================================================================
   ── v7.11 全局字号加大一档 ─────────────────────────
   用户反馈"字体太小，所有都要加大一点"
================================================================= */

/* base 字号：浏览器默认 16，body 提到 16 保证起点 */
html { font-size: 16px !important; }
body { font-size: 16px !important; }

/* 主体所有文字最小 15px（默认 14 → 15）*/
body p, body span, body div, body label, body li, body td, body th,
body dt, body dd, body a, body strong, body em, body b, body i {
  font-size: 15px !important;
}

/* 标题 */
body h1 { font-size: 30px !important; }
body h2 { font-size: 24px !important; }
body h3 { font-size: 20px !important; }
body h4 { font-size: 18px !important; }
body h5 { font-size: 17px !important; }
body h6 { font-size: 16px !important; }

/* 表单元素 */
input, textarea, select, option {
  font-size: 15px !important;
}
button, [class*="btn"], [role="button"] {
  font-size: 15px !important;
}
.pl-btn-sm, [class*="btn-sm"] { font-size: 13px !important; }

/* sidebar 一级菜单字号略大 */
[class*="sidebar"] [class*="nav-item"],
[class*="side-nav"] [class*="nav-item"] {
  font-size: 18px !important;
}

/* 副文字 / 提示文字 */
body small, [class*="hint"], [class*="tip"], [class*="desc"],
[class*="subtitle"], [class*="sub-text"], [class*="muted"] {
  font-size: 13px !important;
}

/* tag / chip / badge / pill 类胶囊 */
[class*="tag"]:not([class*="image"]), [class*="badge"],
[class*="chip"], [class*="pill"] {
  font-size: 13px !important;
}

/* 表格 */
th, td { font-size: 14px !important; }

/* inline 写死的小字号 → 拉大一档 */
[style*="font-size:10px"], [style*="font-size: 10px"] { font-size: 12px !important; }
[style*="font-size:11px"], [style*="font-size: 11px"] { font-size: 13px !important; }
[style*="font-size:12px"], [style*="font-size: 12px"] { font-size: 14px !important; }
[style*="font-size:13px"], [style*="font-size: 13px"] { font-size: 14px !important; }
[style*="font-size:14px"], [style*="font-size: 14px"] { font-size: 15px !important; }

/* placeholder 跟随 input 字号 */
input::placeholder, textarea::placeholder {
  font-size: 15px !important;
}

/* =================================================================
   ── v7.12 inline 用 var(--text*) 浅灰变量的元素 → 强制深 ───
   远程页面大量按钮用 color:var(--text2) 这种 CSS 变量引用，
   原本是为深色背景设计的浅灰，切到亮色后看不见。
================================================================= */

*[style*="color:var(--text"],
*[style*="color: var(--text"],
button[style*="color:var(--text2)"],
button[style*="color: var(--text2)"],
button[style*="color:var(--text-2)"],
button[style*="color: var(--text-2)"],
button[style*="color:var(--muted)"],
button[style*="color: var(--muted)"] {
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
  font-weight: 600 !important;
}

/* 同理 inline border 用 var(--border) 浅灰的 → 加深 */
*[style*="border:1px solid var(--border)"],
*[style*="border: 1px solid var(--border)"] {
  border-color: rgba(15, 23, 42, 0.18) !important;
}

/* =================================================================
   ── v7.13 大规模"看不见文字"修复 ──────────────────
   全面扫描了 desktop.html / h5.html / app.html / pipeline.html，
   找出所有 var() / 浅色 inline / 漏覆盖的 class，一次性补全
================================================================= */

/* ── A. CSS 变量引用 inline color → 按语义分类 ── */

/* var(--text*) / var(--fg) — 主文字，强制黑 */
*[style*="color:var(--text)"], *[style*="color: var(--text)"],
*[style*="color:var(--text2)"], *[style*="color: var(--text2)"],
*[style*="color:var(--text-2)"], *[style*="color: var(--text-2)"],
*[style*="color:var(--text3)"], *[style*="color: var(--text3)"],
*[style*="color:var(--fg)"], *[style*="color: var(--fg)"],
*[style*="color:var(--fg-2)"], *[style*="color: var(--fg-2)"] {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  font-weight: 700 !important;
}

/* var(--sub) / var(--muted) / var(--dim) — 次级文字，强制深灰 */
*[style*="color:var(--sub)"], *[style*="color: var(--sub)"],
*[style*="color:var(--muted)"], *[style*="color: var(--muted)"],
*[style*="color:var(--dim)"], *[style*="color: var(--dim)"],
*[style*="color:var(--line-2)"], *[style*="color: var(--line-2)"] {
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
  font-weight: 600 !important;
}

/* var(--accent*) — 强调色（原浅紫），改成苹果系统紫 */
*[style*="color:var(--accent)"], *[style*="color: var(--accent)"],
*[style*="color:var(--accent2)"], *[style*="color: var(--accent2)"],
*[style*="color:var(--accent-2)"], *[style*="color: var(--accent-2)"],
*[style*="color:var(--accent-3)"], *[style*="color: var(--accent-3)"] {
  color: #6366F1 !important;
  -webkit-text-fill-color: #6366F1 !important;
  font-weight: 700 !important;
}

/* var(--ok) — 成功绿 */
*[style*="color:var(--ok)"], *[style*="color: var(--ok)"] {
  color: #059669 !important;
  -webkit-text-fill-color: #059669 !important;
  font-weight: 700 !important;
}

/* var(--err) — 错误红 */
*[style*="color:var(--err)"], *[style*="color: var(--err)"] {
  color: #DC2626 !important;
  -webkit-text-fill-color: #DC2626 !important;
  font-weight: 700 !important;
}

/* ── B. inline 写死浅紫 / 浅灰 → 强制深色 ── */

/* #a78bfa 浅紫 → 苹果紫 */
*[style*="color:#a78bfa"], *[style*="color: #a78bfa"],
*[style*="color:#A78BFA"], *[style*="color: #A78BFA"] {
  color: #6366F1 !important;
  -webkit-text-fill-color: #6366F1 !important;
  font-weight: 700 !important;
}

/* 各种浅紫/浅灰系（#a8/#c5/#c9/#cf/#d8/#dc/#e0/#e4/#e8 系）→ 深灰 */
*[style*="color:#a8"], *[style*="color: #a8"],
*[style*="color:#c5"], *[style*="color: #c5"],
*[style*="color:#c9"], *[style*="color: #c9"],
*[style*="color:#cf"], *[style*="color: #cf"],
*[style*="color:#d8"], *[style*="color: #d8"],
*[style*="color:#dc"], *[style*="color: #dc"],
*[style*="color:#dd"], *[style*="color: #dd"],
*[style*="color:#e0"], *[style*="color: #e0"],
*[style*="color:#e4"], *[style*="color: #e4"],
*[style*="color:#e8"], *[style*="color: #e8"],
*[style*="color:#aaa"], *[style*="color: #aaa"],
*[style*="color:#bbb"], *[style*="color: #bbb"],
*[style*="color:#ccc"], *[style*="color: #ccc"],
*[style*="color:#ddd"], *[style*="color: #ddd"],
*[style*="color:#eee"], *[style*="color: #eee"] {
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
  font-weight: 600 !important;
}

/* rgba(255,255,255,.x) 半透明白 → 深灰 */
*[style*="color:rgba(255,255,255"], *[style*="color: rgba(255,255,255"],
*[style*="color:rgba(255, 255, 255"], *[style*="color: rgba(255, 255, 255"] {
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
  font-weight: 600 !important;
}

/* ── C. 远程 <style> 里大量 .class { color:浅色 } 漏覆盖的精准命中 ── */
.char-count, .dialogue, .fe-count, .fe-header, .fe-textarea, .fx-label,
.has-file, .hist-group-title, .or-divider, .param-group,
.param-select, .param-label,
.ls-upload-area, .ls-upload-title, .ls-upload-tip, .ls-upload-hint,
.ls-mode-btn:not(.active),
.add-mat, .add-mat *,
.ghc-author, .ghc-duration, .ghc-likes, .ghc-prompt, .ghc-meta,
.gen-hist-card, .gen-hist-card *,
.fe-textarea, .fe-section, .fe-tab,
.error-msg, .empty-msg, .empty-hint, .toast-msg,
.auth-field label, .auth-switch, .auth-tip,
.tip, .hint, .desc, .desc-text,
.copy-btn,
.tier-name, .tier-info, .tier-desc,
.video-meta, .video-info, .video-time,
.history-meta, .history-time, .history-info {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  font-weight: 700 !important;
}

/* ── D. 兜底：所有 inline 含 color: 且 color 值是浅色（>= #80）→ 全部强制深 ── */
/* 这是终极兜底，覆盖任何漏网的浅色 inline */
*[style*="color:#8"]:not([style*="color:#000"]):not(button),
*[style*="color: #8"]:not([style*="color: #000"]):not(button),
*[style*="color:#9"]:not([style*="color:#000"]):not(button),
*[style*="color: #9"]:not([style*="color: #000"]):not(button) {
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
}

/* 但保留按钮 / 渐变色块 / 主色 chip 内的文字白色 */
button[class*="primary"], button[class*="primary"] *,
[class*="btn-primary"], [class*="btn-primary"] *,
.pl-btn:not(.pl-btn-secondary), .pl-btn:not(.pl-btn-secondary) *,
.gen-btn, .gen-btn *, .rewrite-do, .rewrite-do *,
.tail-rewrite, .tail-rewrite *, .tail-seedance, .tail-seedance *,
[class*="step-no"], [class*="step-num"], [class*="step-index"],
[class*="badge-num"], [class*="circle-num"] {
  color: #FFFFFF !important;
}
button[class*="primary"] [style*="color"], button[type="submit"] [style*="color"],
.pl-btn:not(.pl-btn-secondary) [style*="color"] {
  color: #FFFFFF !important;
}

/* 侧边 sidebar 文字强制黑 + 加粗 700（用户要求更明显） */
/*   顶部 header/topbar 不动，让它保持原本的彩色 + 灰字层次       */
[class*="sidebar"] *, [class*="side-nav"] * {
  color: #000000 !important;
  font-weight: 700 !important;
}
/* sidebar 一级菜单字号略大 */
[class*="sidebar"] [class*="nav-item"], [class*="side-nav"] [class*="nav-item"] {
  font-size: 17px !important;
  letter-spacing: 0.01em !important;
}
/* sidebar 选中态保持紫色 */
[class*="sidebar"] [class*="active"], [class*="sidebar"] [class*="active"] *,
[class*="sidebar"] [class*="selected"], [class*="sidebar"] [class*="selected"] *,
[class*="menu-item"][class*="active"], [class*="menu-item"][class*="active"] *,
[class*="nav-item"][class*="active"], [class*="nav-item"][class*="active"] * {
  color: var(--apl-primary) !important;
}

/* =================================================================
   Desktop UI visibility fixes
   Only layout/paint fixes. No behavior, API, or onclick logic changes.
================================================================= */

*, *::before, *::after {
  box-sizing: border-box !important;
}

html, body {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

body {
  min-width: 0 !important;
}

body > .sidebar,
body > .main-content {
  min-height: 0 !important;
}

body > .sidebar {
  flex: 0 0 var(--sidebar-w, 220px) !important;
}

body > .main-content {
  min-width: 0 !important;
  width: calc(100vw - var(--sidebar-w, 220px)) !important;
}

body:has(#__native_banner__) > .sidebar,
body:has(#__native_banner__) > .main-content {
  height: calc(100vh - 32px) !important;
  max-height: calc(100vh - 32px) !important;
}

#__native_banner__ {
  min-height: 32px !important;
  height: 32px !important;
  padding: 4px 16px !important;
  overflow: hidden !important;
}

#__native_banner__,
#__native_banner__ * {
  white-space: nowrap !important;
  line-height: 1.25 !important;
}

#__native_banner__ button {
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px 10px !important;
  flex: 0 0 auto !important;
}

.main-content,
.page-container,
.page {
  min-width: 0 !important;
}

.page-container {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.topbar {
  min-height: 48px !important;
  height: 48px !important;
  padding: 0 18px !important;
  gap: 12px !important;
  overflow: visible !important;
  flex-wrap: nowrap !important;
}

.topbar-title {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.topbar-right {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  justify-content: flex-end !important;
  overflow: visible !important;
}

.credits-badge {
  white-space: nowrap !important;
}

.pl-page.active {
  display: grid !important;
}

.pl-page {
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 100% !important;
  align-items: start !important;
  align-content: start !important;
  grid-template-columns:
    minmax(310px, 0.88fr)
    minmax(330px, 0.96fr)
    minmax(680px, 2.15fr) !important;
  gap: 10px !important;
  padding: 10px 12px 18px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.pl-page > .pl-card {
  align-self: start !important;
}

.pl-card {
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 14px !important;
}

.pl-card,
.pl-card * {
  min-width: 0;
}

.pl-card-header {
  min-height: 34px !important;
  margin-bottom: 10px !important;
  padding-bottom: 9px !important;
  overflow: visible !important;
}

.pl-card-num {
  width: auto !important;
  min-width: 28px !important;
  height: 24px !important;
  padding: 0 7px !important;
  border-radius: 9px !important;
  flex: 0 0 auto !important;
  font-size: 13px !important;
  line-height: 24px !important;
}

.pl-card-title {
  color: #7c3aed !important;
  -webkit-text-fill-color: #7c3aed !important;
  font-size: 15px !important;
  line-height: 1.25 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.pl-card-done {
  flex: 0 0 auto !important;
}

.pl-section-label,
.pl-label,
.pl-status,
.pl-error,
.pl-info,
.pl-ready-item,
.pl-slider-label,
.pl-slider-val {
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.pl-card input,
.pl-card textarea,
.pl-card select,
.pl-card button,
.pl-card label,
.pl-card .pl-btn,
.pl-card .pl-chip,
.pl-card .pl-tab {
  max-width: 100% !important;
}

.pl-card input,
.pl-card select,
.pl-card textarea {
  min-height: 34px !important;
  height: auto !important;
  padding: 7px 10px !important;
  line-height: 1.35 !important;
  font-size: 14px !important;
}

.pl-card textarea {
  min-height: 76px !important;
  resize: vertical !important;
  overflow: auto !important;
}

.pl-card input[type="checkbox"],
.pl-card input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  padding: 0 !important;
  margin: 0 4px 0 0 !important;
  flex: 0 0 auto !important;
}

.pl-card input[type="range"] {
  min-height: 6px !important;
  height: 6px !important;
  padding: 0 !important;
}

.pl-card input[type="color"] {
  width: 30px !important;
  min-width: 30px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 2px !important;
}

.pl-btn,
.btn,
button[class*="btn"],
[role="button"] {
  min-width: 0 !important;
  min-height: 34px !important;
  height: auto !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
  text-align: center !important;
  justify-content: center !important;
}

.pl-btn-sm,
.btn-sm,
button[class*="btn-sm"] {
  min-height: 30px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
}

button:disabled,
.pl-btn:disabled,
.btn:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.72 !important;
  cursor: not-allowed !important;
}

button:disabled,
.pl-btn:disabled,
.btn:disabled {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  background: #e5e7eb !important;
  border-color: #cbd5e1 !important;
}

.pl-tabs {
  min-height: 34px !important;
}

.pl-tab {
  min-height: 34px !important;
  padding: 6px 8px !important;
  font-size: 13px !important;
}

.pl-row {
  min-width: 0 !important;
  flex-wrap: wrap !important;
}

.pl-row > * {
  min-width: 0 !important;
}

.pl-slider-row {
  display: grid !important;
  grid-template-columns: minmax(70px, auto) minmax(80px, 1fr) minmax(38px, auto) !important;
  align-items: center !important;
  gap: 8px !important;
}

.pl-slider {
  width: 100% !important;
}

#plCard1,
#plCard2,
#plCard3,
#plCardHistory,
#cCard1,
#cCard2,
#cCard3,
#cCard4 {
  min-width: 0 !important;
}

#plCard1 { grid-column: 1 !important; grid-row: 1 !important; }
#plCard2 { grid-column: 2 !important; grid-row: 1 !important; }
#plCard3 { grid-column: 3 !important; grid-row: 1 !important; }
#plCardHistory { grid-column: 1 / -1 !important; }

#plCard2 [style*="font-size:11px"],
#plCard2 [style*="font-size: 11px"],
#plCard2 [style*="font-size:12px"],
#plCard2 [style*="font-size: 12px"],
#plCard3 [style*="font-size:11px"],
#plCard3 [style*="font-size: 11px"],
#plCard3 [style*="font-size:12px"],
#plCard3 [style*="font-size: 12px"] {
  font-size: 12px !important;
  line-height: 1.45 !important;
}

#plCard2 [style*="font-size:16px"],
#plCard2 [style*="font-size: 16px"] {
  font-size: 15px !important;
}

#plCard2 [style*="padding:14px"],
#plCard2 [style*="padding: 14px"] {
  padding: 10px 12px !important;
}

#plCard2 [style*="margin-bottom:14px"],
#plCard2 [style*="margin-bottom: 14px"] {
  margin-bottom: 10px !important;
}

#plCard2 audio,
#plCard3 audio,
#plCard3 video {
  max-width: 100% !important;
}

#plCard3 > div[style*="display:flex"][style*="gap:12px"],
#plCard3 > div > div[style*="display:flex"][style*="gap:12px"] {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
}

#plCard3 > div[style*="display:flex"][style*="gap:12px"] > div,
#plCard3 > div > div[style*="display:flex"][style*="gap:12px"] > div {
  flex: 1 1 320px !important;
  min-width: 280px !important;
}

#plCard3 .pl-video-preview,
#plCard3 #plEditNoVideo {
  min-height: 360px !important;
  max-height: 460px !important;
}

#plCard3 [style*="border"],
#plCard3 [style*="background"] {
  max-width: 100% !important;
}

#plCard3 [style*="grid-template-columns"],
#plCard3 [style*="display:grid"] {
  min-width: 0 !important;
}

#plCard3 label,
#plCard3 .pl-chip,
#plCard3 button,
#plCard3 select,
#plCard3 input {
  overflow: visible !important;
}

#plCard3 .pl-chip {
  flex: 1 1 auto !important;
  min-width: fit-content !important;
  padding: 5px 10px !important;
}

#plCard3 [style*="gap:6px"],
#plCard3 [style*="gap: 6px"],
#plCard3 [style*="gap:8px"],
#plCard3 [style*="gap: 8px"] {
  row-gap: 7px !important;
}

#plHistoryGrid,
#analyzeHistoryGrid,
.gen-hist-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
}

.sidebar {
  overflow: hidden !important;
}

.sidebar-nav {
  flex: 0 0 auto !important;
}

.sidebar-history {
  min-height: 110px !important;
}

.sidebar-footer {
  flex: 0 0 auto !important;
}

.sidebar-nav .nav-item {
  min-height: 64px !important;
}

.sidebar-nav .nav-item span:not(.nav-icon) {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 1500px) {
  .pl-page {
    grid-template-columns:
      minmax(300px, 1fr)
      minmax(320px, 1fr) !important;
  }

  #plCard1,
  #plCard2,
  #plCard3,
  #plCardHistory,
  #cCard1,
  #cCard2,
  #cCard3,
  #cCard4 {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }
}

@media (max-width: 980px) {
  body > .main-content {
    width: calc(100vw - var(--sidebar-w, 60px)) !important;
  }

  .pl-page {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 8px !important;
  }

  #plCard3 > div[style*="display:flex"][style*="gap:12px"] > div,
  #plCard3 > div > div[style*="display:flex"][style*="gap:12px"] > div {
    flex-basis: 100% !important;
    min-width: 0 !important;
  }

  #plCard3 .pl-video-preview,
  #plCard3 #plEditNoVideo {
    min-height: 240px !important;
  }
}

/* =================================================================
   ── v7.14 用户特定修复 ─────────────────────────────
================================================================= */

/* 1a) 隐藏"上传视频 (已停用)"按钮 */
#plLipModeUpload { display: none !important; }

/* 1b) "🎭 数字人"按钮保留显示，让它占满整行（因为另一个按钮被隐藏） */
#plLipModeAvatar {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 !important;
  width: 100% !important;
}

/* 1c) 隐藏"选模式"那个 label（在含 #plLipMode* 的 div 之前的 label） */
.pl-section-label:has(+ div #plLipModeUpload),
.pl-section-label:has(+ div #plLipModeAvatar) {
  display: none !important;
}

/* 2) .pl-btn-sm（无 primary）默认应该是 outline / 白底深字，不该是 CTA 白字 */
.pl-btn.pl-btn-sm:not([class*="primary"]):not([style*="linear-gradient"]):not([style*="background:#f97316"]):not([style*="background:#0a"]),
.pl-btn-sm:not([class*="primary"]):not([style*="linear-gradient"]):not([style*="background:#f97316"]) {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  border: 1px solid rgba(15, 23, 42, 0.20) !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}
.pl-btn.pl-btn-sm:hover, .pl-btn-sm:hover {
  background: #F3F4F6 !important;
  border-color: rgba(15, 23, 42, 0.30) !important;
}

/* "📋 粘贴" 按钮 inline 写了 #f97316 橙底白字，是品牌主操作，保留 */
.pl-btn.pl-btn-sm[style*="#f97316"], .pl-btn-sm[style*="#f97316"] {
  background: #F97316 !important;
  background-image: linear-gradient(135deg, #FB923C, #F97316) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: none !important;
}

/* "🎭 数字人" 按钮：让选中状态有视觉区分 */
#plLipModeAvatar[style*="linear-gradient"], #plLipModeAvatar.active {
  background: var(--apl-grad-primary) !important;
  background-image: var(--apl-grad-primary) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: none !important;
}

/* =================================================================
   ── 通过 JS 注入打的标记 class（见 desktop.html 内嵌 script） ───
   .shensu-cta-btn = 关键操作 CTA 按钮（用当前成片发布 / 一键剪辑 / 打开封面设计器 等）
================================================================= */
.shensu-cta-btn {
  background: var(--apl-grad-primary) !important;
  background-image: var(--apl-grad-primary) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: none !important;
  box-shadow: var(--apl-shadow-primary) !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  min-height: 40px !important;
  padding: 10px 24px !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
}
.shensu-cta-btn * {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}
.shensu-cta-btn:hover {
  background-image: var(--apl-grad-primary-hover) !important;
  box-shadow: 0 14px 32px rgba(99, 102, 241, 0.45) !important;
  transform: translateY(-1px) !important;
}

/* ─── 本地剪辑进度浮窗（#__edit_progress__）── 白底亮色覆盖 ─── */
#__edit_progress__ {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  border: 2px solid rgba(99, 102, 241, 0.40) !important;
  box-shadow:
    0 8px 24px rgba(99, 102, 241, 0.18),
    0 4px 10px rgba(15, 23, 42, 0.10) !important;
  border-radius: 12px !important;
}
#__edit_progress__ * {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}
/* 内部"渲染 0%"等小字 */
#__edit_progress__ div[style*="color:#bbb"],
#__edit_progress__ div[style*="color: #bbb"] {
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
  font-weight: 600 !important;
}
/* 进度条背景条（原 rgba(0,0,0,.3) 黑） */
#__edit_progress__ div[style*="background:rgba(0,0,0,.3)"],
#__edit_progress__ div[style*="background: rgba(0,0,0,.3)"] {
  background: #E5E7EB !important;
}
/* 进度条填充色（绿色保留 - 表示进度） */
#__edit_progress__ div[style*="linear-gradient(90deg,#10b981"] {
  background-image: linear-gradient(90deg, #10b981, #059669) !important;
}

/* =================================================================
   ── v7.19 用 ID 选择器锁死 web_enhance.js 动态 CTA 按钮 ───
   ID 选择器优先级 (0,1,0,0) 仅次于 inline style；加 !important 必赢
================================================================= */
#__le_pub_go__,
#__le_oneshot_go__,
#__le_cover_open__,
#__le_pub_acc_mgr__,
button[id^="__le_"][id$="_go__"],
button[id^="__le_"][id*="oneshot"],
button[id^="__le_"][id*="cover"],
button[id*="oneshot"],
button[id*="OneShot"],
button[id*="openCover"] {
  background: var(--apl-grad-primary) !important;
  background-image: var(--apl-grad-primary) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: none !important;
  box-shadow: var(--apl-shadow-primary) !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}
#__le_pub_go__:hover, #__le_oneshot_go__:hover, #__le_cover_open__:hover {
  background-image: var(--apl-grad-primary-hover) !important;
  box-shadow: 0 14px 32px rgba(99, 102, 241, 0.45) !important;
  transform: translateY(-1px) !important;
}

/* 兜底：任何按钮 inline 含 #7c5cff / #a855f7 / #e86df0 → 强制紫蓝 */
button[style*="#7c5cff"], button[style*="#a855f7"], button[style*="#e86df0"],
button[style*="#a78bfa"][style*="linear-gradient"] {
  background: var(--apl-grad-primary) !important;
  background-image: var(--apl-grad-primary) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: none !important;
  box-shadow: var(--apl-shadow-primary) !important;
  font-weight: 700 !important;
}

/* =================================================================
   ── v7.21 顶部 banner #__native_banner__ 按钮可见性 ───
   原 jingtou 在深紫顶部 banner 用 rgba(255,255,255,.1) 白底 + #fff 白字，
   新浅色下白字看不清
================================================================= */
#__native_banner__ {
  background: rgba(255, 255, 255, 0.92) !important;
  background-image: none !important;
  color: #1E293B !important;
  border-bottom: 1px solid rgba(99, 102, 241, 0.25) !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
}
#__native_banner__ *, #__dd__ {
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
}

#__native_banner__ button,
#__whisper_btn__, #__ghostcut_btn__, #__doubao_btn__,
#__open_dir__, #__change_dir__, #__open_dir2__, #__change_dir2__,
#__lib_refresh2__, #__lib_open_folder2__,
#__cookie_btn__, #__api_btn__,
button[id^="__"][id$="_btn__"],
button[id^="__"][id*="_dir"] {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
  border: 1px solid rgba(99, 102, 241, 0.30) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  padding: 6px 14px !important;
  min-height: 32px !important;
  border-radius: 8px !important;
}
#__native_banner__ button *, #__native_banner__ button span {
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
}
#__native_banner__ button:hover {
  background: #F3F4F6 !important;
  border-color: rgba(99, 102, 241, 0.50) !important;
}

/* =================================================================
   ── v7.20 inline rgba(0,0,0,.xx) 黑透明底 → 改成淡紫色底 ───
   原 jingtou 为深色 UI 设计了大量 rgba(0,0,0,.25/.4) 黑透明背景，
   在亮色 UI 下变成"灰雾"看不清。统一改成浅紫/浅灰可见底
================================================================= */

/* 黑透明背景容器（label / div 等）→ 浅紫底 + 浅紫边 */
[style*="background:rgba(0,0,0,.25)"], [style*="background: rgba(0,0,0,.25)"],
[style*="background:rgba(0,0,0,.2)"],  [style*="background: rgba(0,0,0,.2)"],
[style*="background:rgba(0,0,0,.3)"],  [style*="background: rgba(0,0,0,.3)"],
[style*="background:rgba(0,0,0,.4)"],  [style*="background: rgba(0,0,0,.4)"],
[style*="background-color:rgba(0,0,0"], [style*="background-color: rgba(0,0,0"] {
  background: rgba(99, 102, 241, 0.06) !important;
  background-color: rgba(99, 102, 241, 0.06) !important;
  border: 1px solid rgba(99, 102, 241, 0.22) !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

/* input 内的黑底 → 白底（input 已经有通用规则，这里只覆盖 inline 黑底） */
input[style*="background:rgba(0,0,0"], input[style*="background: rgba(0,0,0"],
textarea[style*="background:rgba(0,0,0"], textarea[style*="background: rgba(0,0,0"] {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

/* 白色半透明 inline 边框（rgba(255,255,255,.x)）→ 灰边 */
[style*="border:1px solid rgba(255,255,255,.1)"],
[style*="border: 1px solid rgba(255,255,255,.1)"],
[style*="border:1px solid rgba(255,255,255,.15)"],
[style*="border: 1px solid rgba(255,255,255,.15)"],
[style*="border:1px solid rgba(255,255,255,.2)"],
[style*="border: 1px solid rgba(255,255,255,.2)"] {
  border-color: rgba(99, 102, 241, 0.30) !important;
}

/* 之前 inline `color:#fff` 在这种容器里 → 强制黑（之前规则已有，这里再加保险） */
[style*="background:rgba(0,0,0"] *,
[style*="background: rgba(0,0,0"] * {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

/* =================================================================
   ── v7.17 流水线卡片 01/02/03/04/05 精雕细琢 ─────────
   .pl-card 是各步骤的卡片容器
   .pl-card-num 是 01/02 数字徽章
   .pl-card-title 是步骤标题
   .pl-card-header 是头部行
================================================================= */

/* 步骤卡片整体：明显的紫边 + 立体阴影 + 圆角（v7.18 加深加粗） */
.pl-card {
  background: #FFFFFF !important;
  background-image: none !important;
  border: 3px solid rgba(99, 102, 241, 0.55) !important;
  border-radius: 14px !important;
  padding: 18px !important;
  box-shadow:
    0 6px 18px rgba(99, 102, 241, 0.18),
    0 2px 6px rgba(15, 23, 42, 0.08) !important;
  transition: all 0.22s ease !important;
  position: relative !important;
  overflow: visible !important;
}
.pl-card:hover {
  border-color: rgba(99, 102, 241, 0.85) !important;
  box-shadow:
    0 14px 36px rgba(99, 102, 241, 0.32),
    0 4px 12px rgba(15, 23, 42, 0.10) !important;
  transform: translateY(-2px) !important;
}

/* 完成态：左侧 / 边框变绿，序号也变绿 */
.pl-card.step-done {
  border-color: rgba(16, 185, 129, 0.50) !important;
  box-shadow:
    0 4px 14px rgba(16, 185, 129, 0.15),
    0 1px 3px rgba(15, 23, 42, 0.06) !important;
}
.pl-card.step-done .pl-card-num {
  background: linear-gradient(135deg, #34D399, #10B981) !important;
  background-image: linear-gradient(135deg, #34D399, #10B981) !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.40) !important;
}
.pl-card.step-done .pl-card-title {
  color: #059669 !important;
  -webkit-text-fill-color: #059669 !important;
}

/* 头部分隔线：紫色 + 加深 + 加粗 */
.pl-card-header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
  padding-bottom: 12px !important;
  border-bottom: 2px solid rgba(99, 102, 241, 0.35) !important;
}

/* 数字徽章：从橙色方块 → 紫蓝渐变圆角 + 发光 */
.pl-card-num {
  width: 32px !important;
  height: 28px !important;
  border-radius: 8px !important;
  background: var(--apl-grad-primary) !important;
  background-image: var(--apl-grad-primary) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  flex-shrink: 0 !important;
  box-shadow:
    0 4px 12px rgba(99, 102, 241, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  letter-spacing: 0.5px !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

/* 标题：紫蓝色加粗 */
.pl-card-title {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: var(--apl-primary) !important;
  -webkit-text-fill-color: var(--apl-primary) !important;
  letter-spacing: 0.02em !important;
}

/* 完成 ✓ 图标 */
.pl-card-done {
  margin-left: auto !important;
  color: #10B981 !important;
  -webkit-text-fill-color: #10B981 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}


/* ════════════════════════════════════════════════════════════════
   v8 · 2026-05-14  补未激活元素的视觉边界
   原问题：.pl-tab 未激活完全透明，.pl-input/.pl-select 根本没定义
   →"文案学习/文案原创" "语言/字数" 这些元素跟背景融为一体
   ════════════════════════════════════════════════════════════════ */

/* ── tab 未激活：浅紫底 + 浅边框，跟激活态形成对比 ── */
.pl-tab:not(.active),
.ls-mode-btn:not(.active) {
  background: var(--apl-bg-2, #F8FAFC) !important;
  border: 1px solid var(--apl-border, #E2E8F0) !important;
  color: var(--apl-text-2, #1E293B) !important;
}
.pl-tab:not(.active):hover,
.ls-mode-btn:not(.active):hover {
  background: var(--apl-bg-3, #F1F5F9) !important;
  border-color: var(--apl-border-2, #CBD5E1) !important;
  color: var(--apl-text, #000) !important;
}

/* tabs 容器：边框中性灰 */
.pl-tabs {
  border: 1px solid var(--apl-border, #E2E8F0) !important;
  background: var(--apl-bg, #FFFFFF) !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  padding: 0 !important;
}
.pl-tabs .pl-tab {
  border-radius: 0 !important;
  border: none !important;
  border-right: 1px solid var(--apl-border, #E2E8F0) !important;
}
.pl-tabs .pl-tab:last-child {
  border-right: none !important;
}
.pl-tabs .pl-tab.active {
  background: var(--apl-grad-primary, linear-gradient(135deg, #6366F1, #8B5CF6)) !important;
  background-image: var(--apl-grad-primary, linear-gradient(135deg, #6366F1, #8B5CF6)) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
}

/* ── input/select/textarea/number 完整样式 ── */
.pl-input,
.pl-select,
.pl-textarea,
input.pl-input,
select.pl-select,
textarea.pl-textarea,
input[type="text"].pl-input,
input[type="number"].pl-input,
input[type="email"].pl-input,
input[type="password"].pl-input,
input[type="url"].pl-input,
input[type="search"].pl-input {
  background: #FFFFFF !important;
  border: 1.5px solid var(--apl-border, #E2E8F0) !important;
  border-radius: 8px !important;
  padding: 9px 12px !important;
  font-size: 13px !important;
  color: var(--apl-text, #000000) !important;
  width: 100% !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04) !important;
  transition: border-color .15s, box-shadow .15s !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  outline: none !important;
  -webkit-text-fill-color: var(--apl-text, #000000) !important;
}
.pl-input::placeholder,
.pl-textarea::placeholder {
  color: var(--apl-text-3, #94A3B8) !important;
  font-weight: 500 !important;
  -webkit-text-fill-color: var(--apl-text-3, #94A3B8) !important;
}
.pl-input:hover,
.pl-select:hover,
.pl-textarea:hover {
  border-color: var(--apl-border-2, #CBD5E1) !important;
}
.pl-input:focus,
.pl-select:focus,
.pl-textarea:focus,
.pl-input:focus-visible,
.pl-select:focus-visible,
.pl-textarea:focus-visible {
  outline: none !important;
  border-color: var(--apl-primary, #6366F1) !important;
  box-shadow: 0 0 0 3px var(--apl-primary-soft, rgba(99,102,241,0.15)) !important;
}
.pl-input:disabled,
.pl-select:disabled,
.pl-textarea:disabled {
  background: var(--apl-bg-3, #F1F5F9) !important;
  color: var(--apl-text-3, #94A3B8) !important;
  cursor: not-allowed !important;
}

/* select 自定义下拉箭头（紫色 SVG） */
.pl-select,
select.pl-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M3 4.5L6 8l3-3.5' stroke='%236366F1' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px !important;
  padding-right: 34px !important;
  cursor: pointer !important;
}

/* label 也加重权重 */
.pl-label {
  display: block !important;
  font-size: 12px !important;
  color: var(--apl-text-2, #1E293B) !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
  -webkit-text-fill-color: var(--apl-text-2, #1E293B) !important;
}

/* textarea 单独：高度 + 字体 */
.pl-textarea,
textarea.pl-textarea {
  resize: vertical !important;
  min-height: 60px !important;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif !important;
}

/* H5 浮动入口 input/select 同样 */
#h5e_bgm_cat,
#h5e_bgm_song,
#h5e_bgm_vol,
#h5e_voice_vol,
#h5e_pip_start,
#h5e_pip_dur,
#h5e_sub_size,
#h5e_sub_font,
#h5e_sub_color,
#h5e_sub_border,
#h5e_pip_url {
  background: #FFFFFF !important;
  border: 1.5px solid var(--apl-border, #E2E8F0) !important;
  border-radius: 6px !important;
  color: var(--apl-text, #000000) !important;
  padding: 6px 10px !important;
  font-weight: 600 !important;
  -webkit-text-fill-color: var(--apl-text, #000000) !important;
}

/* generic input under .pl-card */
.pl-card input[type="text"],
.pl-card input[type="number"],
.pl-card input[type="email"],
.pl-card input[type="password"],
.pl-card select,
.pl-card textarea {
  background: #FFFFFF !important;
  border: 1.5px solid var(--apl-border, #E2E8F0) !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  color: var(--apl-text, #000000) !important;
  font-weight: 600 !important;
  -webkit-text-fill-color: var(--apl-text, #000000) !important;
}

/* 防止有人加了 inline style 让背景变暗（黑底色覆盖） */
input[style*="background:#0a0a"]:not([type="checkbox"]):not([type="radio"]),
input[style*="background: #0a0a"]:not([type="checkbox"]):not([type="radio"]),
input[style*="background:rgba(0,0,0"]:not([type="checkbox"]):not([type="radio"]) {
  background: #FFFFFF !important;
  color: var(--apl-text, #000000) !important;
}


/* ════════════════════════════════════════════════════════════════
   v9 · 2026-05-14 · 数字人形象页（avatarsPage + 提交弹窗）亮色覆盖
   修复 desktop.html / app.html / h5.html 里写死的深色背景
   覆盖目标 ID: #avatarsPage / #avq-d-* / #avq-* (avatar quota)
   ════════════════════════════════════════════════════════════════ */

/* 整页背景 */
#avatarsPage,
section.page[data-page="avatars"] {
  background: var(--apl-bg, #FFFFFF) !important;
  color: var(--apl-text, #000) !important;
  -webkit-text-fill-color: var(--apl-text, #000) !important;
}

/* 顶部紫蓝渐变 header (已经是紫蓝，保留) */
#avatarsPage > div:first-of-type,
section.page[data-page="avatars"] > div:first-of-type {
  /* 这个 header 本来就是紫蓝渐变，不动 */
}

/* 上传卡片 + 列表卡片：深底 #15172a → 白底 */
#avatarsPage > div > div[style*="#15172a"],
section.page[data-page="avatars"] > div[style*="#15172a"],
#avatarsPage div[style*="background:#15172a"],
#avatarsPage div[style*="background: #15172a"],
[data-page="avatars"] div[style*="#15172a"] {
  background: var(--apl-bg, #FFFFFF) !important;
  border: 1.5px solid var(--apl-border, #E2E8F0) !important;
  color: var(--apl-text, #000) !important;
  box-shadow: var(--apl-shadow, 0 4px 20px rgba(99, 102, 241, 0.08)) !important;
}

/* "📤 提交新形象" 卡片标题 */
#avatarsPage div[style*="font-weight:700"],
#avatarsPage div[style*="font-weight: 700"] {
  color: var(--apl-text, #000) !important;
  -webkit-text-fill-color: var(--apl-text, #000) !important;
}

/* 输入框 + textarea: #0c0e1c 深底 + 白字 → 白底 + 黑字 */
#avq-d-name, #avq-d-person, #avq-d-desc,
#avq-name, #avq-person, #avq-desc {
  background: #FFFFFF !important;
  border: 1.5px solid var(--apl-border, #E2E8F0) !important;
  color: var(--apl-text, #000) !important;
  -webkit-text-fill-color: var(--apl-text, #000) !important;
  font-weight: 600 !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04) !important;
}
#avq-d-name::placeholder, #avq-d-person::placeholder, #avq-d-desc::placeholder,
#avq-name::placeholder, #avq-person::placeholder, #avq-desc::placeholder {
  color: var(--apl-text-4, #94A3B8) !important;
  -webkit-text-fill-color: var(--apl-text-4, #94A3B8) !important;
  font-weight: 500 !important;
}
#avq-d-name:focus, #avq-d-person:focus, #avq-d-desc:focus,
#avq-name:focus, #avq-person:focus, #avq-desc:focus {
  outline: none !important;
  border-color: var(--apl-primary, #6366F1) !important;
  box-shadow: 0 0 0 3px var(--apl-primary-soft, rgba(99,102,241,0.12)) !important;
}

/* "📁 选视频文件" 虚线选择按钮: #1a1d29 + #4b5161 dashed → 浅紫底 + 紫色虚线 */
#avq-d-pick, #avq-pick {
  background: var(--apl-bg-2, #F8FAFC) !important;
  border: 2px dashed var(--apl-border-2, #CBD5E1) !important;
  color: var(--apl-text-2, #1E293B) !important;
  -webkit-text-fill-color: var(--apl-text-2, #1E293B) !important;
  font-weight: 600 !important;
}
#avq-d-pick:hover, #avq-pick:hover {
  background: var(--apl-primary-soft, rgba(99,102,241,0.08)) !important;
  border-color: var(--apl-primary, #6366F1) !important;
  color: var(--apl-primary, #6366F1) !important;
  -webkit-text-fill-color: var(--apl-primary, #6366F1) !important;
}

/* "✅ 提交审核" 按钮: 绿色渐变 (保留) */
#avq-d-submit, #avq-submit {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  background-image: linear-gradient(135deg, #10b981, #059669) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
}
#avq-d-submit:hover, #avq-submit:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4) !important;
}

/* 列表区"📋 我的提交" 标题 */
#avatarsPage div[style*="color:#9ca3af"],
#avatarsPage div[style*="color: #9ca3af"],
[data-page="avatars"] div[style*="color:#9ca3af"] {
  color: var(--apl-text-2, #1E293B) !important;
  -webkit-text-fill-color: var(--apl-text-2, #1E293B) !important;
  font-weight: 700 !important;
}

/* 加载中 / 空状态 */
#avq-d-list > div, #avq-list > div,
#avatarsPage div[style*="color:#666"] {
  color: var(--apl-text-3, #475569) !important;
  -webkit-text-fill-color: var(--apl-text-3, #475569) !important;
}

/* 已提交卡片 (单张) */
#avq-d-list > div[style*="background"],
#avq-list > div[style*="background"] {
  background: var(--apl-bg, #FFFFFF) !important;
  border: 1.5px solid var(--apl-border, #E2E8F0) !important;
  color: var(--apl-text, #000) !important;
  box-shadow: var(--apl-shadow, 0 4px 20px rgba(99, 102, 241, 0.08)) !important;
}

/* 提示文字 "✅ 已提交·等管理员审核" 等绿色文字 */
#avq-d-fname, #avq-fname {
  color: var(--apl-success, #10B981) !important;
  -webkit-text-fill-color: var(--apl-success, #10B981) !important;
  font-weight: 600 !important;
}
#avq-d-msg, #avq-msg {
  color: var(--apl-text-2, #1E293B) !important;
  -webkit-text-fill-color: var(--apl-text-2, #1E293B) !important;
}

/* 兜底：avatarsPage 里所有 input/textarea 强制白底 */
#avatarsPage input,
#avatarsPage textarea,
#avatarsPage select,
[data-page="avatars"] input,
[data-page="avatars"] textarea,
[data-page="avatars"] select {
  background: #FFFFFF !important;
  background-image: none !important;
  border: 1.5px solid var(--apl-border, #E2E8F0) !important;
  color: var(--apl-text, #000) !important;
  -webkit-text-fill-color: var(--apl-text, #000) !important;
  font-weight: 600 !important;
}

/* 兜底：avatarsPage 任何 inline 设了深色背景的元素 */
#avatarsPage [style*="background:#0a"],
#avatarsPage [style*="background: #0a"],
#avatarsPage [style*="background:#0c"],
#avatarsPage [style*="background: #0c"],
#avatarsPage [style*="background:#15"],
#avatarsPage [style*="background: #15"],
#avatarsPage [style*="background:#1a"],
#avatarsPage [style*="background: #1a"] {
  background: var(--apl-bg, #FFFFFF) !important;
  color: var(--apl-text, #000) !important;
  -webkit-text-fill-color: var(--apl-text, #000) !important;
}


/* ════════════════════════════════════════════════════════════════════════
   v15 · 2026-05-15 · H5 手机端亮色覆盖
   h5.html 原 :root 写死深色 (--bg:#05050a, --fg:#f4f4f8, etc)
   整页是黑底白字设计，跟新苹果亮色皮肤冲突
   修复：覆盖 :root 变量 + 14 处 inline 深色硬编码
   ════════════════════════════════════════════════════════════════════════ */

/* h5.html 同时也被 app.html 复用（设计相同的设计语言），CSS 变量统一覆盖 */
:root {
  --bg: #FFFFFF !important;
  --bg-soft: #F8FAFC !important;
  --glass: rgba(255, 255, 255, 0.85) !important;
  --glass-2: rgba(248, 250, 252, 0.9) !important;
  --line: rgba(99, 102, 241, 0.12) !important;
  --line-2: rgba(99, 102, 241, 0.20) !important;
  --fg: #000000 !important;
  --sub: #475569 !important;
  --dim: #94A3B8 !important;
  --accent: #6366F1 !important;
  --accent-2: #8B5CF6 !important;
  --accent-3: #06B6D4 !important;
  --ok: #10B981 !important;
  --err: #EF4444 !important;
  --text: #000000 !important;
}

html, body {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

/* aurora 动态背景在亮色页面太抢镜，opacity 砍半 */
.aurora,
.aurora::before,
.aurora::after,
.aurora .blob3 {
  opacity: 0.25 !important;
  mix-blend-mode: multiply !important;  /* 在亮色页面下 multiply 更柔和 */
}

/* 主 .app 容器 - 从半透明黑底改成半透明白底 */
.app {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

/* 顶部导航栏 (nav-leading / nav-title / nav-trailing) */
.nav-leading, .nav-trailing, .nav-title, .nav-action {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}

/* 底部 tabbar */
.tabbar {
  background: rgba(255, 255, 255, 0.95) !important;
  border-top: 1px solid var(--line) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}
.tab {
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
}
.tab.on {
  color: #6366F1 !important;
  -webkit-text-fill-color: #6366F1 !important;
}

/* hero / card / 卡片类 */
.hero, .card, .pl-hist-card, .gen-hist-card {
  background: #FFFFFF !important;
  border: 1.5px solid #E2E8F0 !important;
  color: #000 !important;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08) !important;
}
.hero *, .card * {
  color: inherit;
}

/* 输入框 / textarea */
input, textarea, select {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  border: 1.5px solid #E2E8F0 !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  font-weight: 600 !important;
}
input::placeholder, textarea::placeholder {
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
  font-weight: 500 !important;
}
input:focus, textarea:focus, select:focus {
  outline: none !important;
  border-color: #6366F1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

/* 主按钮 .btn */
.btn, .copy-btn {
  background: linear-gradient(135deg, #6366F1, #8B5CF6) !important;
  background-image: linear-gradient(135deg, #6366F1, #8B5CF6) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3) !important;
}
.btn:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

/* 历史记录卡 + body */
.pl-hist-card .body,
.gen-hist-card .body,
.hist-body,
.rr-body,
.modal-body {
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
}

/* ── h5/app 数字人形象提交卡片 + 列表卡片 (深色 #15172a/#0c0e1c/#1a1d29/#2a2d44 转白) ── */
[style*="background:#0a0a18"],
[style*="background: #0a0a18"],
[style*="background:#0c0e1c"],
[style*="background: #0c0e1c"],
[style*="background:#15172a"],
[style*="background: #15172a"],
[style*="background:#1a1d29"],
[style*="background: #1a1d29"],
[style*="background:#1a1130"],
[style*="background: #1a1130"] {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}
[style*="border:1px solid #2a2d44"],
[style*="border: 1px solid #2a2d44"],
[style*="border:1px solid #4b5161"],
[style*="border: 1px solid #4b5161"] {
  border: 1.5px solid #E2E8F0 !important;
}

/* h5/app 里所有强制白字到深色背景下设的，强制深色 */
[style*="color:#fff"]:not(.btn):not(.tab.on):not([class*="hero"]):not([class*="gradient"]):not([style*="background:linear-gradient"]):not([style*="background: linear-gradient"]):not([style*="background:#7c5cff"]):not([style*="background:#a78bfa"]):not([style*="background:#e86df0"]):not([style*="background:#6366f1"]):not([style*="background:#8b5cf6"]):not([style*="background:#06b6d4"]):not([style*="background:#10b981"]),
[style*="color: #fff"]:not(.btn):not(.tab.on):not([class*="hero"]):not([class*="gradient"]):not([style*="background:linear-gradient"]):not([style*="background: linear-gradient"]):not([style*="background:#7c5cff"]):not([style*="background:#a78bfa"]):not([style*="background:#e86df0"]):not([style*="background:#6366f1"]):not([style*="background:#8b5cf6"]):not([style*="background:#06b6d4"]):not([style*="background:#10b981"]) {
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
}

/* 灰字 #888 / #9ca3af / #aaa 改成可读中灰 */
[style*="color:#888"]:not(.btn),
[style*="color: #888"]:not(.btn),
[style*="color:#9ca3af"]:not(.btn),
[style*="color: #9ca3af"]:not(.btn),
[style*="color:#aaa"]:not(.btn),
[style*="color: #aaa"]:not(.btn),
[style*="color:#ccc"]:not(.btn),
[style*="color: #ccc"]:not(.btn) {
  color: #64748B !important;
  -webkit-text-fill-color: #64748B !important;
}

/* footer / 安全区域 */
[style*="env(safe-area-inset"] {
  background: transparent !important;
}


/* ════════════════════════════════════════════════════════════════
   v16 · 2026-05-15 · H5/手机端流水线 02 克隆我的声音紧凑化
   原 #plVcCloneSection 紫粉渐变巨型 hero，手机小屏占半屏，挡住 01 视频/文案
   修复: 缩小 padding + 字号 + 默认收起内容 (只显示标题)
   ════════════════════════════════════════════════════════════════ */

/* 手机小屏 (max-width:768px) — 02 hero 卡片紧凑 */
@media (max-width: 768px) {
  #plVcCloneSection {
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
    border-radius: 10px !important;
  }
  /* 标题字号缩小 */
  #plVcCloneSection > div:first-child {
    font-size: 14px !important;
    margin-bottom: 4px !important;
  }
  #plVcCloneSection > div:first-child > span:first-child {
    font-size: 18px !important;  /* 🎤 emoji */
  }
  /* 描述文字隐藏（手机小屏看不下） */
  #plVcCloneSection > div:nth-child(2) {
    display: none !important;
  }
  /* 步骤标签缩小 */
  #plVcCloneSection > div:nth-child(3),
  #plVcCloneSection > div:nth-of-type(4),
  #plVcCloneSection > div:nth-of-type(5) {
    font-size: 11px !important;
    margin-bottom: 3px !important;
  }
  /* 选择文件 + 录音按钮缩高 */
  #plVcCloneSection #plVcFileLabel,
  #plVcCloneSection #plVcRecBtn {
    padding: 10px 12px !important;
    font-size: 13px !important;
  }
  /* 输入框缩小 */
  #plVcCloneSection input,
  #plVcCloneSection #plVcName {
    padding: 8px 10px !important;
    font-size: 13px !important;
    margin-bottom: 8px !important;
  }
  /* 开始克隆按钮 */
  #plVcCloneSection #plVcCloneBtn {
    padding: 10px !important;
    font-size: 13px !important;
  }

  /* 视频预览区限高 - 手机上避免视频自适应撑得太大 */
  #plFinalVideo,
  #plStep4Result video,
  .pl-video-preview {
    max-height: 240px !important;
    object-fit: cover !important;
  }
  /* 视频外面的预览容器也限高 */
  #plStep4Result,
  #plEditNoVideo {
    max-height: 260px !important;
    min-height: 150px !important;
  }
}


/* ════════════════════════════════════════════════════════════════
   v17 · 2026-05-15 · 文案显示 + 视频预览 修复
   原: .pl-text-display 黑底 (#0a0a1a) + 浅灰字 (#ccc) → 亮色页面看不清
       <video id="plVideoPreview"> min-height:420px → 手机端把后面内容挤掉
   ════════════════════════════════════════════════════════════════ */

/* 文案内容显示区 - 白底深字 */
.pl-text-display {
  background: #F8FAFC !important;
  border: 1.5px solid #E2E8F0 !important;
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
}

/* 桌面端 video preview 限制最大高度（避免过度撑大） */
#plVideoPreview,
.pl-video-preview {
  background: #000 !important;
  border-radius: 8px !important;
}

/* 手机端 (max-width:768px) 视频预览大幅缩小 */
@media (max-width: 768px) {
  #plVideoPreview,
  .pl-video-preview,
  #plFinalVideo {
    min-height: 180px !important;
    max-height: 260px !important;
    height: auto !important;
    object-fit: contain !important;
  }
  /* 文案显示 - 限高，避免长文案占满屏 */
  .pl-text-display {
    max-height: 100px !important;
    font-size: 12px !important;
    padding: 8px 10px !important;
  }
  /* 仿写文案 textarea - 限高 */
  #plRewrittenText {
    min-height: 60px !important;
    max-height: 120px !important;
    font-size: 13px !important;
  }
  /* pl-card 整体 padding 紧凑 */
  .pl-card {
    padding: 12px !important;
    margin-bottom: 10px !important;
  }
  /* pl-section-label 紧凑 */
  .pl-section-label {
    font-size: 11px !important;
    margin: 6px 0 4px !important;
  }
}


/* ════════════════════════════════════════════════════════════════
   v19 · 2026-05-15 · 强制 video 真小 + 占位 + 01 卡片布局保护
   ════════════════════════════════════════════════════════════════ */

/* 手机端 video 强制覆盖 inline min-height:420px */
@media (max-width: 768px) {
  #plVideoPreview,
  video.pl-video-preview {
    min-height: 180px !important;
    max-height: 240px !important;
    height: 200px !important;     /* 强制固定 200px */
    width: 100% !important;
    object-fit: contain !important;
    background: #000 !important;
  }

  /* plStep1Result wrapper 强制 block + 子元素都可见 */
  #plStep1Result {
    display: block !important;
    visibility: visible !important;
  }
  #plStep1Result > * {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  #plStep1Result > .pl-section-label {
    margin: 8px 0 4px !important;
    color: #1E293B !important;
    -webkit-text-fill-color: #1E293B !important;
    font-weight: 600 !important;
    font-size: 12px !important;
  }

  /* plOriginalText 空时显示占位 */
  #plOriginalText:empty::before {
    content: "(等待识别…)";
    color: #94A3B8;
    font-style: italic;
  }
  /* plOriginalText 强制 min-height 显示 */
  #plOriginalText {
    min-height: 40px !important;
    display: block !important;
    visibility: visible !important;
  }

  /* 仿写参数 wrapper 强制显示 */
  #plCard1 > div[style*="border-top"] {
    display: block !important;
    margin-top: 10px !important;
  }

  /* 01 卡片 + 02 卡片之间间距 */
  .pl-card {
    margin-bottom: 14px !important;
    position: relative !important;
    z-index: 1 !important;
  }

  /* 02 card 不要覆盖 01 后半 */
  #plCard2 {
    margin-top: 0 !important;
    z-index: 1 !important;
  }
}


/* ════════════════════════════════════════════════════════════════
   v20 · 2026-05-15 · 真正的修复 (撤掉之前固定 height hack)
   原则: 不固定任何元素 height, 让 01 02 03 自然纵向排列, 整页滚动
   ════════════════════════════════════════════════════════════════ */

/* 视频预览只做合理 max-height, 不强制 min-height */
@media (max-width: 768px) {
  #plVideoPreview,
  video.pl-video-preview {
    min-height: 0 !important;            /* 撤回 inline min-height:420px 强制 */
    max-height: 50vh !important;          /* 最多占 50% 视口高度 */
    width: 100% !important;
    height: auto !important;
    background: #000 !important;
    border-radius: 8px !important;
  }
  /* 文案显示框 - 不限高，长文案能完整看见（滚就行）*/
  .pl-text-display {
    background: #F8FAFC !important;
    border: 1.5px solid #E2E8F0 !important;
    color: #1E293B !important;
    -webkit-text-fill-color: #1E293B !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    /* 不设 max-height, 让内容自然展开 */
  }
  /* plOriginalText 空时占位 */
  #plOriginalText:empty::before {
    content: "(等待识别…)";
    color: #94A3B8;
    font-style: italic;
  }
  /* 卡片间距合理 */
  .pl-card {
    margin-bottom: 12px !important;
    padding: 14px !important;
  }
}

/* 关键: 不允许任何 .pl-card 元素 absolute / fixed (防 02 覆盖 01) */
.pl-card {
  position: relative !important;
}

/* pipeline.html 内 desktop.html iframe 应该可以纵向滚动 */
html, body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}


/* ════════════════════════════════════════════════════════════════
   v21 · 2026-05-15 · 一键剪辑弹窗输入控件可见性修复
   #h5EditModal 内 字号/字色/描边/字体/底中顶 在亮色 modal 下都看不见
   原因: input type=color 透明背景白色值 + label 深底白字 在白底页面失效
   ════════════════════════════════════════════════════════════════ */

/* modal 内层卡片 - 强制白底 (原 #0e0e1f 深紫) */
#h5EditModal > div {
  background: #DBEAFE !important;
  background-color: #DBEAFE !important;
  border: 2px solid #3B82F6 !important;
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
  box-shadow: 0 16px 48px rgba(99, 102, 241, 0.25) !important;
}

/* 顶部 modal 关闭按钮 × */
#h5EditModal button[onclick*="h5CloseEdit"] {
  color: #6366F1 !important;
  -webkit-text-fill-color: #6366F1 !important;
  background: rgba(99, 102, 241, .08) !important;
  border-radius: 50% !important;
  width: 30px !important;
  height: 30px !important;
}

/* "🎬 一键剪辑（巽谷）" 标题 */
#h5EditModal > div > div:first-child > div:nth-child(2) > div:first-child {
  color: #6366F1 !important;
  -webkit-text-fill-color: #6366F1 !important;
}

/* 描述文字 #7c7c8a */
#h5EditModal [style*="color:#7c7c8a"],
#h5EditModal [style*="color: #7c7c8a"] {
  color: #64748B !important;
  -webkit-text-fill-color: #64748B !important;
}

/* 灰字 #888 */
#h5EditModal [style*="color:#888"],
#h5EditModal [style*="color: #888"] {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
}

/* "字号/字色/描边" label 整体 - 浅灰底深字 */
#h5EditModal label[style*="background:rgba(0,0,0"] {
  background: #F1F5F9 !important;
  background-color: #F1F5F9 !important;
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
  border: 1px solid #E2E8F0 !important;
}

/* 字号 input (number) - 白底黑字 + 紫边 */
#h5e_sub_size,
#h5e_bgm_vol,
#h5e_voice_vol,
#h5e_pip_start,
#h5e_pip_dur {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  border: 1.5px solid #6366F1 !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  font-weight: 700 !important;
  padding: 4px 6px !important;
}

/* ⭐ 字色/描边 color picker - 显眼大尺寸 + 边框 */
#h5e_sub_color,
#h5e_sub_border,
#h5EditModal input[type="color"] {
  width: 38px !important;
  height: 24px !important;
  border: 1.5px solid #6366F1 !important;
  background: transparent !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  padding: 0 !important;
  flex: 0 0 38px !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
}

/* 字体 select - 白底黑字 */
#h5e_sub_font,
#h5e_bgm_cat,
#h5e_bgm_song,
#h5EditModal select {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  border: 1.5px solid #E2E8F0 !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  font-weight: 600 !important;
  padding: 5px 8px !important;
}

/* "↓底部 / ⊙中部 / ↑顶部" 单选按钮组 */
#h5EditModal label[style*="cursor:pointer"]:not([style*="background:rgba(124"]) {
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
}

/* "字幕烧录" / "加背景音乐" / "画中画" section header 紫色 (保留) */
#h5EditModal [style*="color:#a78bfa"] {
  color: #6366F1 !important;
  -webkit-text-fill-color: #6366F1 !important;
}

/* 浅紫底 section 卡片 - 让色块更明显 */
#h5EditModal [style*="background:rgba(124,92,255,.05)"] {
  background: rgba(99, 102, 241, 0.06) !important;
  border: 1px solid rgba(99, 102, 241, 0.18) !important;
}

/* 子 input/textarea/select 强制 visible 文字 */
#h5EditModal input:not([type="color"]):not([type="checkbox"]):not([type="radio"]),
#h5EditModal textarea,
#h5EditModal select {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  border: 1.5px solid #E2E8F0 !important;
  font-weight: 600 !important;
}
#h5EditModal input::placeholder,
#h5EditModal textarea::placeholder {
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
}

/* "开始处理" 主按钮 紫蓝渐变 */
#h5e_go {
  background: linear-gradient(135deg, #6366F1, #8B5CF6) !important;
  background-image: linear-gradient(135deg, #6366F1, #8B5CF6) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: none !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3) !important;
}

/* 刷新按钮 */
#h5EditModal button[onclick*="h5RefreshSrc"] {
  background: rgba(99, 102, 241, 0.1) !important;
  color: #6366F1 !important;
  -webkit-text-fill-color: #6366F1 !important;
  border: 1px solid #6366F1 !important;
}









/* ════════════════════════════════════════════════════════════════
   v36 · 2026-05-16 · inline !important 失效兜底
   就算 inline 全坏, 这层 CSS 也强制 yellow 选中
   ════════════════════════════════════════════════════════════════ */
html body button.h5e_pos_btn[data-pos="bottom"]:not([data-clicked]),
html body button.h5e_pip_size_btn[data-size="small"]:not([data-clicked]) {
  /* 初始默认选中 没点过的, 强制黄 */
  /* (有 inline !important 的话这条不会赢, 但作兜底) */
}
