/* fanhuiauto Web - styles */
:root {
  --bg: #0f1117;
  --bg-2: #161a23;
  --bg-3: #1f2330;
  --border: #2a2f3e;
  --text: #e5e7eb;
  --text-2: #9ca3af;
  --text-3: #6b7280;
  --accent: #00f0ff;
  --accent-2: #ff2bd6;
  --green: #10b981;
  --blue: #3b82f6;
  --red: #ef4444;
}

/* 学习模式选择器 */
.learn-mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.learn-mode {
  cursor: pointer;
  display: block;
}
.learn-mode input { display: none; }
.learn-mode .card {
  background: var(--bg-3);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  transition: all .2s;
}
.learn-mode input:checked + .card {
  border-color: var(--accent);
  background: rgba(0, 240, 255, .08);
}
.learn-mode .card-icon {
  font-size: 36px;
  margin-bottom: 10px;
}
.learn-mode .card-title {
  font-weight: 600;
  margin-bottom: 4px;
}
.learn-mode .card-desc {
  font-size: 12px;
  color: var(--text-2);
}

/* BGM 信息 */
.feature-badge {
  display: inline-block;
  background: rgba(76, 175, 80, .15);
  color: var(--green);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
}
.bgm-info {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-3);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.bgm-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 12px;
  font-size: 13px;
}
.bgm-stats strong { color: var(--accent-2); margin-left: 4px; }
.opt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  cursor: pointer;
}
.opt-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.waveform-img {
  width: 100%;
  border-radius: 6px;
  margin-top: 8px;
  border: 1px solid var(--border);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

header {
  /* v4.7.3: 顶栏吸顶固定 — 电脑状态常驻可见, 每个步骤滚动时都不消失 */
  position: sticky;
  top: 0;
  z-index: 500;   /* 高于普通内容, 低于所有弹窗 (1000+) */
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 48px;
  height: 48px;
  /* v4.4.9: 新品牌 logo (光圈×剪刀), 深色镜头虹膜底色衬托彩色叶片 */
  background: linear-gradient(135deg, #1d2136 0%, #12162a 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
}
.logo img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  user-select: none;
}

.brand h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.brand p {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 步骤指示器作为独立 tab: 可点击跳转 */
.step-indicator.step-tabs .step {
  cursor: pointer;
  user-select: none;
  transition: all 0.18s;
}
.step-indicator.step-tabs .step:hover {
  background: var(--border);
  transform: translateY(-1px);
}
.step-indicator.step-tabs .step.active:hover {
  background: var(--accent);
  filter: brightness(1.08);
}
.step-indicator.step-tabs .step.done:hover {
  background: var(--green);
  filter: brightness(1.08);
}

.step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-3);
  border-radius: 16px;
  color: var(--text-3);
  font-size: 12px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.step span {
  width: 18px;
  height: 18px;
  background: var(--bg-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
}

.step.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.step.active span {
  background: rgba(255,255,255,0.3);
}

.step.done {
  background: var(--green);
  color: #fff;
}

.step.done span {
  background: rgba(255,255,255,0.3);
}

main {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 32px;
}

.step-section {
  display: none;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}

.step-section.active {
  display: block;
  animation: fade 0.3s ease;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

h2 {
  font-size: 22px;
  margin-bottom: 8px;
  font-weight: 600;
}

h3 {
  font-size: 16px;
  margin: 16px 0 8px;
  font-weight: 600;
}

.hint {
  color: var(--text-2);
  font-size: 13px;
  margin-bottom: 20px;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-3);
}

.upload-zone:hover {
  border-color: var(--accent);
  background: var(--bg-2);
}

.upload-zone.small {
  padding: 24px 16px;
}

.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(0, 240, 255, 0.05);
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.upload-zone.small .upload-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.upload-content p {
  color: var(--text-2);
  margin: 4px 0;
}

.upload-content .sub {
  font-size: 11px;
  color: var(--text-3);
}

.file-list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.file-card {
  background: var(--bg-3);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  border: 1px solid var(--border);
}

.file-card .file-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.file-card .file-info {
  flex: 1;
  min-width: 0;
}

.file-card .file-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card .file-size {
  color: var(--text-3);
  font-size: 11px;
}

.file-card .remove {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  width: 20px;
  height: 20px;
}

.file-card .remove:hover {
  color: var(--red);
}

.analyze-options {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg-3);
  border-radius: 8px;
}

.opt {
  flex: 1;
}

.opt label {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 6px;
}

.opt input[type="range"] {
  width: 100%;
}

.opt-val {
  color: var(--accent);
  font-weight: 600;
  font-family: monospace;
}

.analyze-status {
  background: var(--bg-3);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  color: var(--text-2);
  font-size: 13px;
}

.analyze-result {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.clip-card {
  background: var(--bg-3);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.clip-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  background: #000;
}

.clip-info {
  padding: 10px 12px;
}

.clip-name {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  font-family: monospace;
}

.clip-meta {
  font-size: 11px;
  color: var(--text-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clip-cat {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.clip-safe {
  color: var(--green);
  font-size: 11px;
  font-weight: 500;
}

.learn-result {
  background: var(--bg-3);
  padding: 16px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 13px;
}

.learn-result table {
  width: 100%;
  border-collapse: collapse;
}

.learn-result th, .learn-result td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.lut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.lut-card {
  background: var(--bg-3);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.lut-card:hover {
  border-color: var(--text-3);
}

.lut-card.selected {
  border-color: var(--accent);
  background: rgba(0, 240, 255, 0.05);
}

.lut-card .lut-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.lut-card .lut-desc {
  color: var(--text-2);
  font-size: 11px;
}

.lut-card .lut-default {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  padding: 2px 6px;
  background: var(--accent);
  color: #fff;
  border-radius: 3px;
}

.lut-upload {
  margin-top: 12px;
}

/* ============ v4.19.4: 第 3 步 LUT 预览弹窗 ============ */
/* v4.19.5: 入口按钮开关态 — 预览生效时高亮 */
.lut-preview-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.lut-pv-card {
  background: var(--bg-3);
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.lut-pv-card:hover {
  border-color: var(--text-3);
  transform: translateY(-2px);
}

.lut-pv-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 6px 24px rgba(0, 240, 255, 0.12);
}

.lut-pv-imgwrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0e18;
  overflow: hidden;
}

.lut-pv-imgwrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.3s;
}

.lut-pv-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-2);
  animation: lutPvPulse 1.2s ease-in-out infinite;
}

@keyframes lutPvPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.lut-pv-name {
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lut-pv-sub {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-2);
  flex-shrink: 0;
}


.btn {
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}

.btn:hover:not(:disabled) {
  background: var(--border);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn.primary:hover:not(:disabled) {
  background: #00c8e6;
}

.btn.small {
  padding: 6px 14px;
  font-size: 12px;
}

.step-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}
.src-count-badge {
  /* v4.3: 紧贴下一个按钮 (删 margin-right: auto, 让 flex 不再把徽章推最左) */
  margin-right: 4px;
  padding: 9px 16px;            /* 跟 .btn 高度基本一致, 视觉上同基线 */
  align-self: center;
}
.step-actions:has(> .src-count-badge[hidden]) .src-count-badge {
  display: none;                /* 即使 hidden 也要让 flex 不留空 */
}

.progress-section {
  background: var(--bg-3);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

.progress-bar {
  height: 6px;
  background: var(--bg-2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0;
  transition: width 0.3s;
}

.progress-status {
  font-size: 13px;
  color: var(--text-2);
}

.log-section {
  background: #000;
  border-radius: 8px;
  padding: 12px 16px;
  font-family: monospace;
  font-size: 11px;
  color: #4ade80;
  max-height: 200px;
  overflow-y: auto;
}

.log-section .log-line {
  margin: 2px 0;
}

.result-section {
  margin-top: 24px;
}

.result-card {
  background: var(--bg-3);
  border-radius: 12px;
  padding: 16px;
}

.result-card video {
  width: 100%;
  max-width: 360px;
  height: 640px;
  background: #000;
  border-radius: 8px;
  display: block;
  margin: 0 auto 12px;
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  transition: transform 0.3s;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  border-color: var(--red);
  color: var(--red);
}

.bgm-status, .lut-status, .recording-status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-2);
}

.bgm-status.success, .lut-status.success, .recording-status.success {
  color: var(--green);
}

/* ============ 新版 UI 增量样式 ============ */

/* Section 标识标签 */
.section-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 10px;
}
.section-tag.tag-learn {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* 多次学习样本列表 */
.learn-batch-list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}
.learn-batch-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.learn-batch-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.learn-batch-info {
  flex: 1;
  min-width: 0;
}
.learn-batch-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: monospace;
}
.learn-batch-meta {
  color: var(--text-3);
  font-size: 11px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; /* v4.13.1: 挤压时省略号, 不逐字竖排 */
}
/* v4.13.2: 风格样本预览弹窗提层 — 从「风格归档」行内点预览时必须盖在归档弹窗之上
   (两者同为 .lib-modal z-index:1000, 归档 DOM 靠后会盖住预览; 层级链: 归档 1000 < 预览 1200 < 拆解子弹窗 1350 < 视频预览 1380 < 静帧放大 1400) */
#style-preview-modal { z-index: 1200; }

/* v4.13.1: 学习卡内功能按钮 — 紧凑不换行, 保住名称区宽度 */
.learn-batch-card .btn.small {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 4px 10px;
  font-size: 11px;
}
.learn-batch-card .remove {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
}
.learn-batch-card .remove:hover {
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
}

.learn-tip {
  margin-top: 20px;
  padding: 14px 18px;
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.7;
}
.learn-tip strong {
  color: var(--blue);
}

/* 预览窗口 (Step 5) */
.preview-window {
  margin-top: 20px;
  background: var(--bg-3);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
}
.preview-window h3 {
  margin-top: 0;
  color: var(--accent-2);
}
.preview-card {
  /* v4.54.3 布局重排: 上一行整幅放画面查重横幅, 视频左 / 信息卡右
     (旧 bug: .scene-check-banner 的 display:flex 覆盖了 hidden 属性,
     隐藏时仍占第一列 → 视频被挤到右列、信息卡掉到第二行左下角) */
  display: grid;
  grid-template-columns: 360px 1fr;
  grid-template-areas:
    "banner banner"
    "video info";
  gap: 16px 20px;
  align-items: start;
}
@media (max-width: 768px) {
  .preview-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "banner"
      "video"
      "info";
  }
}
.preview-card video {
  grid-area: video;
  width: 100%;
  max-width: 360px;
  height: 640px;
  background: #000;
  border-radius: 8px;
  display: block;
}
.preview-info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-2);
  padding: 16px;
  border-radius: 8px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.info-row:last-child {
  border-bottom: none;
}
.info-row span {
  color: var(--text-2);
}
.info-row strong {
  color: var(--accent-2);
  font-family: monospace;
}

.download-hint {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(255, 43, 214, 0.08);
  border-left: 3px solid var(--accent-2);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-2);
  text-align: center;
}

/* ============ 上传进度窗口 (Step 2) ============ */
.upload-progress-window {
  margin-top: 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.upload-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
}
.upload-progress-count {
  font-family: monospace;
  color: var(--text-2);
  font-weight: 400;
}
.upload-progress-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.upload-progress-list::-webkit-scrollbar {
  width: 8px;
}
.upload-progress-list::-webkit-scrollbar-track {
  background: var(--bg-2);
}
.upload-progress-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.upload-progress-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
}
.upi-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.upi-icon { font-size: 14px; flex-shrink: 0; }
.upi-name {
  flex: 1;
  font-weight: 500;
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upi-status {
  color: var(--text-2);
  font-size: 11px;
  flex-shrink: 0;
}
.upi-pct {
  color: var(--accent-2);
  font-weight: 600;
  font-family: monospace;
  min-width: 40px;
  text-align: right;
  flex-shrink: 0;
}
.upi-bar {
  height: 4px;
  background: var(--bg-3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}
.upi-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0;
  transition: width 0.15s linear;
}
.upi-meta {
  font-size: 10px;
  color: var(--text-3);
  font-family: monospace;
}

/* ============ 上传错误详细 UI (大文件 / 网关错误 / 网络错误) ============ */
.upi-err {
  margin-top: 6px;
  padding: 10px 12px;
  background: rgba(255, 56, 96, 0.08);
  border-left: 3px solid var(--red);
  border-radius: 6px;
  text-align: left;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 12px;
  line-height: 1.6;
}
.upi-err-title {
  font-weight: 600;
  color: var(--red);
  margin-bottom: 4px;
  font-size: 13px;
}
.upi-err-msg {
  color: var(--text-2);
  word-break: break-all;
  background: rgba(0,0,0,0.2);
  padding: 4px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
  font-family: monospace;
  font-size: 11px;
}
.upi-err-hint {
  color: var(--accent-2);
  margin-bottom: 6px;
  font-size: 12px;
}
.upi-err-detail {
  margin-top: 6px;
}
.upi-err-detail summary {
  cursor: pointer;
  color: var(--text-3);
  font-size: 11px;
  user-select: none;
  padding: 2px 0;
}
.upi-err-detail summary:hover { color: var(--text-1); }
.upi-err-detail[open] summary { color: var(--text-1); margin-bottom: 4px; }
.upi-err-detail ol {
  margin: 4px 0 0 0;
  padding-left: 20px;
  font-size: 11px;
  color: var(--text-2);
}
.upi-err-detail ol li { margin: 3px 0; }
.upi-err-detail code {
  background: rgba(0,0,0,0.25);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 10px;
  color: var(--accent-2);
  font-family: monospace;
  word-break: break-all;
}

/* ============ 版本标签 (header) ============ */
.brand-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.brand-meta p {
  margin: 0 !important;
}
.version-tag {
  display: inline-block;
  font-size: 10px;
  color: var(--accent-2);
  background: rgba(255, 43, 214, 0.1);
  border: 1px solid rgba(255, 43, 214, 0.3);
  padding: 1px 8px;
  border-radius: 10px;
  font-family: monospace;
  letter-spacing: 0.5px;
}

/* ============ 剪辑风格选择器 (Step 4) ============ */
.style-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.style-card {
  background: var(--bg-3);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  /* v4.20.1: 顶部对齐 — 各卡内容高度不同, 居中会导致顶部留白不一致 */
  align-items: flex-start;
  gap: 12px;
  position: relative;
}
.style-card:hover {
  border-color: var(--text-3);
  transform: translateY(-1px);
}
.style-card.selected {
  border-color: var(--accent);
  background: rgba(0, 240, 255, 0.05);
  box-shadow: 0 0 0 1px var(--accent);
}
.style-card.selected::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}
.style-icon {
  font-size: 26px;
  line-height: 1.2;
  flex-shrink: 0;
}
.style-info {
  flex: 1;
  min-width: 0;
}
.style-name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.style-meta {
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.5;
  /* v4.14: 最多两行整齐截断, 不再挤压逐字竖排 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* v4.20.1: 去掉 keep-all (会提前断行截断信息), 自然换行保证内容尽量完整 */
}
.style-tag {
  font-size: 10px;
  padding: 2px 8px;
  background: var(--bg-2);
  color: var(--text-2);
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  font-weight: 500;
}
.style-card-default .style-tag {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.style-empty {
  padding: 16px 20px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px dashed rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.7;
}

/* ============ 本地素材库 modal (v2.2) ============ */
.lib-open-btn {
  margin-left: 8px;
  font-size: 11px;
  padding: 3px 10px;
}
.lib-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lib-modal[hidden] { display: none; }
/* v4.44.7: 弹窗滚动隔离 — 触控/惯性滚动不链到底层页面 (配合 app.js wheel 守卫) */
.lib-modal-card { overscroll-behavior: contain; }
.lib-modal-card > div, .lib-modal-body, .modal-body { overscroll-behavior: contain; }
.lib-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.lib-modal-card {
  position: relative;
  width: 92vw;
  max-width: 1080px;
  max-height: 88vh;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lib-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.lib-modal-header h2 { margin: 0; font-size: 18px; }
.lib-modal-sub { margin: 4px 0 0; font-size: 11px; color: var(--text-3); font-family: monospace; }
.lib-close-btn { background: var(--bg-3); }
.lib-tabs {
  display: flex;
  gap: 0;
  padding: 0 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.lib-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  color: var(--text-2);
  transition: all 0.15s;
}
.lib-tab:hover { color: var(--text-1); background: var(--bg-3); }
.lib-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg-3);
}
.lib-tab-icon { font-size: 16px; }
.lib-tab-count {
  background: var(--bg-1);
  color: var(--text-2);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 8px;
  font-family: monospace;
}
.lib-tab.active .lib-tab-count {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}
.lib-toolbar {
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.lib-search {
  flex: 1;
  padding: 6px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-1);
  font-size: 12px;
  outline: none;
}
.lib-search:focus { border-color: var(--accent); }

.lib-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 20px;
  min-height: 300px;
}
.lib-empty {
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  padding: 60px 20px;
}
.lib-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  margin-bottom: 4px;
  transition: all 0.12s;
}
.lib-item:hover { background: var(--bg-2); border-color: var(--border); }
.lib-item.selected {
  background: var(--bg-2);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.lib-item-icon {
  font-size: 22px;
  width: 36px;
  text-align: center;
}
.lib-item-info { flex: 1; min-width: 0; }
.lib-item-name {
  font-size: 13px;
  color: var(--text-1);
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lib-item-meta {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}
.lib-badge.learned {
  background: var(--green);
  color: #000;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

.lib-detail {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  max-height: 220px;
  overflow-y: auto;
}
.lib-detail[hidden] { display: none; }
.lib-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
}
.lib-detail-name {
  font-weight: 600;
  color: var(--text-1);
  word-break: break-all;
}
.lib-detail-body {
  padding: 12px 20px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-2);
}
.lib-detail-meta code {
  background: var(--bg-3);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
  color: var(--accent-2);
}
.lib-detail-actions {
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-1);
}

/* ============ 远程状态面板 (v2.2) ============ */
.remote-open-btn {
  margin-left: 6px;
  font-size: 11px;
  padding: 3px 10px;
}
.remote-card { max-width: 720px; }
.remote-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  min-height: 260px;
}
.remote-job {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--bg-2);
}
.remote-job.done { border-color: var(--green); }
.remote-job.err  { border-color: var(--red); }
.remote-job.run  { border-color: var(--accent); }
.remote-job-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.remote-job-ico { font-size: 16px; }
.remote-job-id {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-2);
}
.remote-job-status {
  font-size: 12px;
  color: var(--text-1);
  font-weight: 500;
}
.remote-job-pct {
  margin-left: auto;
  font-family: monospace;
  font-size: 13px;
  color: var(--accent);
}
.remote-job-bar {
  height: 6px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.remote-job-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.4s;
}
.remote-job.done .remote-job-fill { background: var(--green); }
.remote-job.err  .remote-job-fill { background: var(--red); }
.remote-job-meta {
  font-size: 11px;
  color: var(--text-3);
}
.remote-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  font-size: 11px;
  color: var(--text-3);
}
.remote-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  align-self: center;
  display: inline-block;
}
.remote-live-dot.on {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: remote-pulse 2s infinite;
}
.remote-live-dot.off {
  background: var(--text-3);
}
@keyframes remote-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============ 库内一键学习状态条 (v2.4) ============ */
.lib-learn-status {
  padding: 8px 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-2);
}
.lib-learn-status b { color: var(--accent); }
.lib-learn-spinner { display: inline-block; animation: lib-spin 1s linear infinite; }
@keyframes lib-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ============ v2.5: 素材库选择器 / LUT删除 / 风格重命名 / BGM库列表 ============ */
.lib-pick-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 4px;
}

.src-picker {
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-2);
  overflow: hidden;
}
.src-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-1);
}
.src-picker-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
}
.src-pick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  margin-bottom: 3px;
}
.src-pick-item:hover { background: var(--bg-3); }
.src-pick-item.selected {
  background: var(--bg-3);
  border-color: var(--accent);
}
.src-pick-item input[type="checkbox"] { accent-color: var(--accent); }
.sp-icon { font-size: 18px; }
.sp-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sp-name {
  font-size: 13px;
  color: var(--text-1);
  word-break: break-all;
}
.sp-meta { font-size: 11px; color: var(--text-3); }
.src-picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

/* v2.7: 素材库选择器 — 缩略图网格 (Finder 风格) */
.src-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 14px;
  padding: 14px;
}
.src-grid-item {
  cursor: pointer;
  text-align: center;
  min-width: 0;
}
.sgi-thumb-wrap {
  position: relative;
  aspect-ratio: 9 / 13;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-3);
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
}
.src-grid-item:hover .sgi-thumb-wrap {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}
.src-grid-item.selected .sgi-thumb-wrap {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.25);
}
.sgi-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sgi-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  opacity: 0.5;
}
.sgi-noimg { border-style: dashed; }
.sgi-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: transparent;
  font-size: 12px;
  line-height: 18px;
  font-weight: bold;
  transition: all 0.15s;
}
.src-grid-item.selected .sgi-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.sgi-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s;
}
.src-grid-item:hover .sgi-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.sgi-play:hover { background: var(--accent); }
.sgi-name {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sgi-meta {
  font-size: 10px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* LUT 删除按钮 */
.lut-card { position: relative; }
.lut-del-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-3);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.15s;
}
.lut-card:hover .lut-del-btn { opacity: 1; }
.lut-del-btn:hover {
  background: var(--red);
  color: #fff;
}

/* 风格卡重命名 */
.style-card { position: relative; }
.style-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.style-edit-btn {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.55;
  transition: all 0.15s;
}
.style-card:hover .style-edit-btn { opacity: 1; }
.style-edit-btn:hover { background: var(--accent); }

/* ===== v4.12: 风格卡预览/归档按钮 + 样本预览弹窗 + 归档管理 ===== */
.style-act-btn {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.55;
  transition: all 0.15s;
  color: inherit;
  display: inline-flex;
  align-items: center;
}
.style-card:hover .style-act-btn { opacity: 1; }
.style-act-btn:hover { background: var(--accent); color: #fff; }
.style-act-btn .ic { width: 13px; height: 13px; }
.style-tag.archived {
  color: var(--accent);
  border-color: var(--accent);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* v4.20.1: 卡片重排 — 操作按钮上移与标题同行, 徽章独占一行放 meta 下方, 信息区拿满整行宽 */
.style-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  /* v4.20.1: 与下方样本信息拉开间距, 不显拥挤 */
  margin-bottom: 7px;
}
.style-name-row .style-name { flex: 1; min-width: 0; margin-bottom: 0; }
.style-name-row .style-actions { margin-left: auto; flex-shrink: 0; max-width: none; row-gap: 0; }
/* 选中角标 ✓ 在右上角, 给操作按钮让位防重叠 */
.style-card.selected:not(.style-card-default) .style-name-row { padding-right: 16px; }
/* v4.20.1: 默认卡 ✏ 垂直居中, 选中角标 ✓ 同步垂直居中 → 二者水平对齐, 中间预留间距 */
.style-card-default > .style-actions { align-self: center; }
.style-card.style-card-default.selected::after { top: 50%; transform: translateY(-50%); right: 8px; }
.style-card.style-card-default.selected > .style-actions { margin-right: 18px; }
.style-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.style-tags .style-tag {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* v4.12: 卡片操作按钮变多 (预览/归档/重命名) — hover 才清晰, 不常驻抢空间 */

.style-preview-samples {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  /* v4.20: 移到弹窗底部, 固定高度只露最新两行 (约 5 条), 其余滚动折叠 */
  max-height: 108px;
  overflow-y: auto;
}
/* v4.20: 标题区 — 风格名称限制长度但不截断显示, 悬浮 title 显示全名 */
.spv-title { min-width: 0; flex: 1 1 auto; }
.spv-title-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
/* v4.20: 风格介绍行 (标题下方, 超长省略 + 悬浮全显) */
.spv-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* v4.20: 重复样本提示条 + 工具行 */
.sp-dupbar {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 170, 60, 0.45);
  background: rgba(255, 170, 60, 0.08);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-2);
}
.sp-tools { flex: 1 1 100%; display: flex; justify-content: flex-end; }
.sp-chip {
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text, inherit);
  border-radius: 14px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}
.sp-chip:hover { border-color: var(--accent); }
.sp-chip.active { border-color: var(--accent); color: var(--accent); background: rgba(0, 200, 255, 0.08); }
.sp-chip .ic { width: 12px; height: 12px; }
/* v4.12.1: 状态面板风格 chip 内「查看」按钮 */
.ad-style-chip .ad-chip-view { margin-left: 4px; padding: 1px 8px; font-size: 10.5px; flex-shrink: 0; }

/* v4.12.2: 分镜表「画面参考」静帧 */
.sb-frame {
  display: block;
  width: 132px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  cursor: zoom-in; /* v4.12.3: 点击放大 */
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.sb-frame:hover {
  border-color: var(--accent);
  transform: scale(1.03);
  box-shadow: 0 4px 18px rgba(0, 180, 255, .22);
}
/* v4.12.3: 弹窗滚动隔离 — 内部滚到底/顶不再连锁滚动底层页面 */
#voice-body, #vsub-body { overscroll-behavior: contain; }
/* v4.12.4: 分镜表标题栏视频名 — 点击预览视频 */
.sb-video-link {
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  padding-bottom: 1px;
  transition: color .15s, border-color .15s;
}
.sb-video-link:hover {
  color: var(--accent-2, var(--accent));
  border-bottom-color: var(--accent-2, var(--accent));
  text-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent);
}
.sb-frame-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  border: 1px dashed var(--border);
  background: var(--bg-2);
  color: var(--text-3);
  font-size: 11px;
}

.style-archive-card { width: min(760px, 92vw); }
.style-archive-hint {
  padding: 12px 16px 0;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.style-archive-list {
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
}
.sa-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--bg-2);
}
.sa-info { flex: 1; min-width: 0; }
.sa-name {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sa-sub { color: var(--text-3); font-size: 11px; }
.sa-input {
  width: 190px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-1);
  color: var(--text, inherit);
  padding: 6px 9px;
  font-size: 12.5px;
}
.sa-input:focus { outline: none; border-color: var(--accent); }
.sa-empty { color: var(--text-2); font-size: 13px; text-align: center; padding: 24px 0; }
.style-archive-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  background: var(--bg-2);
}

/* BGM 库列表 */
.bgm-lib {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-2);
  overflow: hidden;
}
.bgm-lib-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-1);
}
.bgm-lib-list {
  max-height: 240px;
  overflow-y: auto;
  padding: 8px;
}
.bgm-lib-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  margin-bottom: 3px;
  border: 1px solid transparent;
}
.bgm-lib-item:hover { background: var(--bg-3); }
.bgm-lib-item.current {
  background: var(--bg-3);
  border-color: var(--accent);
}
.bgm-lib-ico { font-size: 16px; }
.bgm-lib-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text-1);
  word-break: break-all;
}
.bgm-lib-meta {
  font-size: 11px;
  color: var(--text-3);
  font-family: monospace;
  white-space: nowrap;
}
.bgm-lib-item .btn { flex-shrink: 0; }
.bgm-lib-del:hover { background: var(--red); color: #fff; }

/* ============ v4.3: BGM 已使用徽章 + 暗化行 ============ */
.bgm-lib-item.used {
  opacity: 0.78;                  /* 已用过的稍微暗化但不强制禁用 */
  background: rgba(255, 255, 255, .015);
}
.bgm-lib-item.used:hover { opacity: 1; }
.bgm-used-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  margin-left: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, .12);
  border: 1px solid rgba(16, 185, 129, .35);
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* v3.0: BGM 节拍引导框 (step3 精选素材) */
.beat-guide {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: rgba(0, 240, 255, 0.08);
}
.bg-guide-icon { font-size: 22px; }
.bg-guide-text {
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.7;
}
.bg-guide-text strong { color: var(--accent); }

/* v2.7: BGM 勾选态 */.bgm-lib-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  color: transparent;
  font-size: 12px;
  line-height: 18px;
  font-weight: bold;
  text-align: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.bgm-lib-item.checked {
  background: var(--bg-3);
  border-color: var(--accent);
}
.bgm-lib-item.checked .bgm-lib-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.bgm-lib-item.checked .bgm-lib-name {
  color: var(--accent);
}
.bgm-lib-use[disabled] {
  opacity: 0.85;
  cursor: default;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* v2.6: 素材库预览按钮 (step2 选择器每行) */
.sp-preview-btn {
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--text-2);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
}
.sp-preview-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* v2.6: BGM 试听按钮 */
.bgm-lib-play.playing {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* v2.6: 素材预览弹窗 */
/* v4.7.3: 预览弹窗必须压过所有业务弹窗 (replace-modal z=1000, lib-root-modal z=1100),
   否则从替换弹窗里点播放时, 视频被替换弹窗盖住 */
#src-preview-modal { z-index: 1200; }
.src-preview-card {
  max-width: 760px;
  width: 92vw;
  /* v4.20: 弹窗整体限高, 头部/视频/底部样本区自适应分配 (底部 chips 不再被裁) */
  display: flex;
  flex-direction: column;
  max-height: 94vh;
}
.src-preview-body {
  padding: 14px;
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.src-preview-body video {
  width: 100%;
  max-height: 58vh;
  border-radius: 8px;
  background: #000;
  display: block;
}

/* ============ v3.2: 分析进度条 / 素材卡片预览 / 剪辑时间线 ============ */
.analyze-progress { margin: 12px 0; }
.analyze-progress .progress-status { margin-top: 6px; font-size: 13px; color: #9ca3af; }

.clip-card { cursor: pointer; }
.clip-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 320 / 570;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  background: #111827;
}
.clip-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-thumb-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: #6b7280; font-size: 26px;
}
.clip-thumb-ph span { font-size: 12px; }
.clip-play-badge {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff; background: rgba(0,0,0,.25);
  opacity: 0; transition: opacity .15s;
  pointer-events: none;
}
.clip-card:hover .clip-play-badge { opacity: 1; }

.tl-section { margin-top: 18px; }
.tl-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: nowrap; margin-bottom: 8px; }
.tl-head h3 { margin: 0; flex: 0 0 auto; }
.tl-head .hint { font-size: 12px; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-head .tl-toolbar { flex: 0 0 auto; }
.tl-strip {
  display: flex; gap: 8px; align-items: stretch;
  overflow-x: auto; padding: 10px;
  background: #0d1117; border: 1px solid var(--border); border-radius: 10px;
}
/* v3.6c: 时间线横向滚动条常显, 素材多时也能拖动看到后面的镜头 */
.tl-strip::-webkit-scrollbar {
  height: 10px;
}
.tl-strip::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .06);
  border-radius: 5px;
}
.tl-strip::-webkit-scrollbar-thumb {
  background: #f59e0b;
  border-radius: 5px;
}
.tl-strip::-webkit-scrollbar-thumb:hover {
  background: #fbbf24;
}
.tl-shot {
  flex: 0 0 auto; width: 96px;
  background: #161b22; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; cursor: pointer; transition: border-color .15s, transform .15s;
}
.tl-shot:hover { border-color: var(--accent); transform: translateY(-2px); }
.tl-shot.replaced { border-color: #f59e0b; }
.tl-thumb-wrap {
  position: relative; width: 100%; aspect-ratio: 9 / 16;
  background: #111827; overflow: hidden;
}
.tl-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-thumb-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #4b5563; font-size: 22px;
}
.tl-badge {
  position: absolute; top: 4px; left: 4px;
  background: #f59e0b; color: #111; font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 4px;
}
.tl-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; background: rgba(0,0,0,.3);
  opacity: 0; transition: opacity .15s;
}
.tl-thumb-wrap:hover .tl-play { opacity: 1; }
.tl-shot-info {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 6px 0; font-size: 10px;
}
.tl-idx { color: var(--accent); font-weight: 700; }
.tl-dur { color: #9ca3af; }
.tl-cat {
  margin-left: auto; max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--accent); color: #fff; padding: 0 4px; border-radius: 3px; font-size: 9px;
}
.tl-name {
  padding: 2px 6px 6px; font-size: 10px; color: #6b7280;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tl-endcap {
  flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: 0 10px; font-size: 11px; color: #6b7280;
  border-left: 2px solid var(--accent);
}

/* 替换选择器 */
.replace-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px;
}
.replace-card {
  background: #161b22; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; padding-bottom: 6px;
}
.replace-card.current { border-color: var(--accent); }
.replace-card .tl-thumb-wrap { aspect-ratio: 9 / 16; }
.replace-info { padding: 6px 8px 2px; }
.replace-info .clip-name { font-size: 12px; font-weight: 600; }
.replace-info .clip-meta { font-size: 11px; color: #6b7280; margin-top: 2px; }
.replace-card .replace-use { margin: 4px 8px 0; width: calc(100% - 16px); }

/* ============ v3.3: BGM 节拍面板 / 素材二次调整 / 时间线换素材按钮 ============ */
.beat-panel {
  margin-top: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: #0d1117;
}
.beat-panel-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.beat-panel-head h3 { margin: 0; }
.beat-panel-head .hint { font-size: 12px; color: var(--accent); font-weight: 600; }
.beat-ruler {
  position: relative; height: 44px;
  background: linear-gradient(#1f2937, #111827);
  border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; margin-bottom: 10px;
}
.beat-tick {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: #f59e0b; opacity: .85;
  cursor: help;
}
.beat-tick.manual { background: #22d3ee; width: 3px; }
.beat-tick:hover { opacity: 1; top: 20%; bottom: 20%; }
.beat-playhead {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: #fff; box-shadow: 0 0 6px #fff; z-index: 2;
}
.beat-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.beat-tools .btn.tapping { background: #f59e0b; color: #111; font-weight: 700; }

.clip-trim-badge {
  position: absolute; top: 6px; left: 6px;
  background: #22d3ee; color: #111; font-size: 11px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
}
.clip-card.trimmed { border-color: #22d3ee; }
/* v4.7.3: 调整按钮已移入 .clip-actions-row (flex), 不能再用旧的全宽 width:100% —
   否则 flex:0 0 auto + width:100% 会把按钮撑到整行宽, 溢出卡片右侧被裁掉 */
.clip-adjust-btn { margin-top: 0; width: auto; padding: 3px 8px; font-size: 11px; }
.clip-card .clip-adjust-btn:hover { background: var(--accent); color: #fff; }

.trim-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 10px 0; padding: 10px 14px;
  background: rgba(34, 211, 238, .08); border: 1px solid #22d3ee;
  border-radius: 8px; font-size: 13px;
}

.trim-card { max-width: 640px; width: 92vw; }
.trim-body { padding: 0 4px 4px; }
.trim-body video {
  width: 100%; max-height: 46vh; border-radius: 8px; background: #000; display: block;
}
.trim-controls { margin: 10px 0; }
.trim-controls .opt { margin-bottom: 10px; }
.trim-controls .opt label { display: block; margin-bottom: 4px; font-size: 13px; }
.trim-controls input[type=range] { width: 100%; }
#trim-effect { margin: 4px 0 0; }

.tl-replace {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 3px 0; text-align: center;
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(245, 158, 11, .92);
  cursor: pointer; user-select: none;
  opacity: 0; transition: opacity .15s;
}
.tl-thumb-wrap:hover .tl-replace { opacity: 1; }
.tl-thumb-wrap:hover .tl-play { bottom: 22px; }

/* ============ v3.4: 裁剪时间条 / 时间线按钮排版 / 渲染进度行 ============ */
.trim-controls { margin: 10px 0; }
.trim-track {
  position: relative; height: 40px;
  background: linear-gradient(#1f2937, #111827);
  border: 1px solid var(--border); border-radius: 8px;
  cursor: crosshair; touch-action: none;
}
.trim-sel {
  position: absolute; top: 0; bottom: 0;
  background: rgba(34, 211, 238, .22);
  border-left: 1px solid #22d3ee; border-right: 1px solid #22d3ee;
  pointer-events: none;
}
.trim-playhead {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.8);
  pointer-events: none; z-index: 1;
}
.trim-handle {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 14px; height: 30px; margin-left: 0;
  background: #22d3ee; color: #0b1220; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; cursor: ew-resize; z-index: 2;
  box-shadow: 0 0 8px rgba(34,211,238,.55);
  touch-action: none; user-select: none;
}
.trim-handle:hover { background: #67e8f9; }
.trim-scale {
  display: flex; justify-content: space-between;
  font-size: 11px; color: #6b7280; margin-top: 4px;
}

/* 时间线镜头按钮排版修复 (覆盖旧规则) */
.tl-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff;
  background: rgba(0, 0, 0, .6);
  border: 1px solid rgba(255, 255, 255, .35);
  opacity: 0; transition: opacity .15s;
  pointer-events: auto; cursor: pointer;
}
.tl-thumb-wrap:hover .tl-play { opacity: 1; }
.tl-replace {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 20px; line-height: 20px; padding: 0;
  text-align: center; font-size: 10px; font-weight: 700;
  color: #fff; background: rgba(245, 158, 11, .92);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; user-select: none;
  opacity: 0; transition: opacity .15s;
}
.tl-thumb-wrap:hover .tl-replace { opacity: 1; }

/* 第 5 步渲染进度行 — v4.4: 百分比挪到进度条右侧小字; 状态/ticker 固定宽不交叉 */
.progress-status-row {
  display: flex; align-items: center; gap: 10px; margin-top: 6px;
}
.progress-status-row .progress-status {
  margin: 0;
  flex: 0 0 250px;               /* v4.4: 固定死宽度 */
  min-width: 0; overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress-status-row .quote-ticker { flex: 0 0 380px; margin-left: 48px; }  /* v4.4: 固定 380px + 右移 48px */

/* v4.4.2: 进度条行 = 进度条(flex:1) + 右侧竖排(与进度条同高平齐的百分比 + 下方计时器) */
.progress-bar-row {
  display: flex; align-items: center;   /* v4.7.1: 垂直居中, 百分比+计时器与进度条水平 */
  gap: 10px;
  padding-right: 24px;
}
.progress-bar-row .progress-bar {
  flex: 1; margin-bottom: 0;
  margin-top: 5px;                  /* v4.4.2: 6px 高的条下移 5px, 与 12px 百分比文字中线对齐 */
}
.pct-stack {
  /* v4.7.1: 百分比与计时器横向并排, 减小高度 */
  display: flex; flex-direction: row; align-items: center; gap: 8px;
  flex: 0 0 auto;
}
.progress-pct-mini {
  font-size: 12px; font-weight: 700; color: var(--accent);
  min-width: 36px; text-align: center; flex: 0 0 auto;
  font-variant-numeric: tabular-nums;   /* 数字等宽, 增长时不跳动 */
}

/* v4.3: 步骤 4 的「进度状态 + ticker + 计时器」同一行, 不再单独占行 */
.analyze-progress .progress-bar { margin-bottom: 8px; }
.analyze-progress-row {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: nowrap;
}
.analyze-progress-row .progress-status {
  margin: 0;
  flex: 0 0 250px;               /* v4.4: 固定死宽度 */
  min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.analyze-progress-row .quote-ticker { flex: 0 0 380px; margin-left: 48px; }  /* v4.4: 固定 380px + 右移 48px */
.analyze-elapsed-inline {
  /* v4.4.1: 放到百分比正下方 (pct-stack), 居中对齐 */
  margin: 0; padding: 0 10px;
  height: 26px; line-height: 24px;     /* line-height 比 height 少 2 抵消 border */
  font-size: 11px;
  color: var(--text-2);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
  flex: 0 0 auto;
  display: inline-flex; align-items: center;
}

/* ============ v3.4b: 日志一行 / 替换横滚 / 面包屑 / 文件夹卡片 ============ */
/* 5. 渲染日志改为一行, 历史滚动查看 */
.log-section {
  max-height: 30px;
  padding: 6px 12px;
}

/* 7. 替换素材弹窗: 横向一排 + 底部滚动条 */
.replace-grid {
  display: flex;
  flex-direction: row;
  gap: 10px;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 12px;
  align-items: flex-start;
}
.replace-card {
  flex: 0 0 128px;
  width: 128px;
}
.replace-grid::-webkit-scrollbar {
  height: 10px;
}
.replace-grid::-webkit-scrollbar-track {
  background: #111827;
  border-radius: 5px;
}
.replace-grid::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 5px;
}
.replace-grid::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* 2. 素材库面包屑 + 文件夹卡片 */
.src-crumb {
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}
.src-crumb:hover { text-decoration: underline; }
.src-crumb.current {
  color: #fff;
  font-weight: 700;
  cursor: default;
}
.src-crumb.current:hover { text-decoration: none; }
.src-crumb-sep { color: #4b5563; margin: 0 2px; }
.src-dir-item { cursor: pointer; }
.src-dir-item .sgi-dir-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: rgba(245, 158, 11, .08);
  border: 1px dashed rgba(245, 158, 11, .45);
  border-radius: 8px;
}
.src-dir-item:hover .sgi-dir-wrap {
  background: rgba(245, 158, 11, .16);
}

/* ============ v3.5 智能体状态面板 ============ */
.agent-dashboard {
  margin-top: 14px;
  border: 1px solid rgba(245, 158, 11, .25);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(245, 158, 11, .06), rgba(245, 158, 11, .02));
  overflow: hidden;
}
.ad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid rgba(245, 158, 11, .15);
  background: rgba(245, 158, 11, .05);
}
.ad-refresh { opacity: .8; }
.ad-body {
  padding: 14px;
  display: grid;
  grid-template-columns: 190px 1fr 240px;
  gap: 14px;
}
.ad-empty { grid-column: 1 / -1; color: var(--text-2); text-align: center; padding: 18px 0; font-size: 13px; }

/* 左: 智能指数 */
.ad-score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, .02);
}
.ad-score-num {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}
.ad-score-num small { font-size: 14px; font-weight: 400; color: var(--text-2); }
.ad-score-grade {
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(245, 158, 11, .18);
  color: var(--accent);
}
.ad-score-bar {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.ad-score-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .6s ease;
}
.ad-score-hint { font-size: 11px; color: var(--text-2); text-align: center; line-height: 1.5; }

/* 中: 学习进度 + 已学风格 */
.ad-mid { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ad-block-title { font-size: 12px; color: var(--text-2); font-weight: 600; }
.ad-progress-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ad-progress-label { width: 70px; flex: none; color: var(--text); }
.ad-progress-track {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.ad-progress-track i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .6s ease;
}
.ad-progress-num { width: 56px; flex: none; text-align: right; color: var(--text-2); }
.ad-styles { display: flex; flex-wrap: wrap; gap: 6px; }
.ad-style-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
}
.ad-style-chip b { color: var(--accent); font-weight: 600; }
.ad-style-chip .mode-fin { color: var(--green); }
.ad-style-chip .mode-rec { color: #60a5fa; }

/* 右: 磁盘占用 */
.ad-disk { display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.ad-disk-row { display: flex; justify-content: space-between; gap: 8px; }
.ad-disk-row .k { color: var(--text); }
.ad-disk-row .v { color: var(--text-2); font-variant-numeric: tabular-nums; }
.ad-disk-total {
  margin-top: 4px;
  padding-top: 7px;
  border-top: 1px dashed rgba(255, 255, 255, .15);
  font-weight: 600;
}
.ad-disk-total .v { color: var(--accent); }

@media (max-width: 900px) {
  .ad-body { grid-template-columns: 1fr; }
  .ad-score-card { flex-direction: row; padding: 10px; }
  .ad-score-hint { text-align: left; }
}

/* ============ v3.7 素材计数 / 导出预设 / 项目管理 ============ */
.lib-pick-row { display: flex; align-items: center; gap: 10px; }
.src-count-badge {
  /* v4.3 补丁: 此处为通用定义, 紧贴下一个按钮 */
  margin-left: 0;
  margin-right: 4px;
  padding: 6px 14px;          /* 通用 padding (step-actions 里的已被前一条规则改 9px 16px 兼容) */
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(245, 158, 11, .15);
  border: 1px solid rgba(245, 158, 11, .45);
  color: var(--accent);
  white-space: nowrap;
}

.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 6px 4px 2px;
}
.export-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, transform .15s, background .15s;
}
.export-card:hover {
  border-color: var(--accent);
  background: rgba(245, 158, 11, .07);
  transform: translateY(-2px);
}
.export-card:disabled { opacity: .5; cursor: wait; transform: none; }
.export-icon { font-size: 22px; }
.export-name { font-size: 15px; font-weight: 700; color: var(--accent); }
.export-desc { font-size: 12px; color: var(--text-2); line-height: 1.4; }

.project-list { display: flex; flex-direction: column; gap: 8px; padding: 6px 4px; max-height: 420px; overflow-y: auto; }
.project-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
}
.project-item .p-info { flex: 1; min-width: 0; }
.project-item .p-name { font-size: 14px; font-weight: 600; color: var(--text); }
.project-item .p-meta { font-size: 12px; color: var(--text-2); margin-top: 3px; }

/* ============ v3.8 行业图标 / 状态灯 / 关键帧调整 ============ */
.ic {
  width: 1.05em;
  height: 1.05em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.16em;
  flex: none;
}
.card-icon .ic, .upload-icon .ic, .style-icon .ic, .lib-tab-icon .ic,
.export-icon .ic, .bg-guide-icon .ic, .learn-batch-icon .ic, .file-icon .ic {
  width: 1.7em;
  height: 1.7em;
  stroke-width: 1.7;
}
.lib-item-icon .ic { width: 1.5em; height: 1.5em; }

/* 本地端连接状态灯 */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b7280;
  margin-right: 6px;
  vertical-align: 1px;
  transition: background .3s, box-shadow .3s;
}
.status-dot.ok {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, .8);
}
.status-dot.bad {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, .8);
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .45; } }

/* 时间线镜头工具组 (换素材 / 调整) */
.tl-shot-tools {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78));
  opacity: 0;
  transition: opacity .15s;
  z-index: 3;
}
.tl-thumb-wrap:hover .tl-shot-tools { opacity: 1; }
.tl-shot-tools > div {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.tl-shot-tools > div:hover { background: rgba(245, 158, 11, .85); }
.tl-shot-tools .ic { width: .95em; height: .95em; }

/* 关键帧缩放已调整徽章 */
.tl-zoom-badge {
  position: absolute;
  right: 4px;
  top: 4px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #06b6d4;
  background: rgba(8, 20, 30, .82);
  border: 1px solid rgba(6, 182, 212, .55);
}
.tl-shot.zoomed .tl-thumb-wrap { outline: 1px solid rgba(6, 182, 212, .45); }

/* 关键帧缩放调整弹窗 */
.motion-body { padding: 4px 6px 2px; display: flex; flex-direction: column; gap: 14px; }
.motion-presets { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.motion-inputs { display: flex; flex-direction: column; gap: 10px; }
.motion-inputs .opt { display: flex; flex-direction: column; gap: 6px; }
.motion-inputs .opt label { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }

/* ============ v3.9 品味画像: 猜你喜欢 / BGM 智能推荐 ============ */

/* 猜你喜欢汇总条 */
.taste-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin: 0 0 14px;
  background: linear-gradient(90deg, rgba(245, 158, 11, .10), rgba(245, 158, 11, .03));
  border: 1px solid rgba(245, 158, 11, .30); border-radius: 12px;
}
.taste-bar-label { font-size: 13px; font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.taste-bar-tags { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.pick-chip { font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 600; }
/* v4.22: 分类徽章可点 — 一键选用该档素材 */
.pick-chip-btn { cursor: pointer; transition: transform .12s, filter .12s; }
.pick-chip-btn:hover { filter: brightness(1.25); transform: translateY(-1px); }
.pick-chip.strong { color: #f59e0b; background: rgba(245, 158, 11, .15); border: 1px solid rgba(245, 158, 11, .4); }
.pick-chip.good { color: #10b981; background: rgba(16, 185, 129, .12); border: 1px solid rgba(16, 185, 129, .35); }
.pick-chip.ok { color: var(--text-2); background: var(--bg-3); border: 1px solid var(--border); }
.pick-chip.low { color: var(--text-3); background: var(--bg-3); border: 1px dashed var(--border); }

/* 素材卡上的猜你喜欢徽章 */
.pick-badge {
  position: absolute; left: 8px; bottom: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 3px 8px;
  border-radius: 999px; backdrop-filter: blur(4px);
  background: rgba(17, 24, 39, .72); color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, .55);
  pointer-events: none; max-width: calc(100% - 16px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pick-badge.pick-good { color: #6ee7b7; border-color: rgba(16, 185, 129, .55); }
.pick-badge.pick-ok { color: #d1d5db; border-color: rgba(156, 163, 175, .5); }
.pick-badge.pick-low { color: #9ca3af; border-color: rgba(107, 114, 128, .5); }
.pick-badge .pick-stars { letter-spacing: -1px; }

/* v4.6: AI 语义识别徽章 (素材卡片内, 非悬浮层) */
/* v4.7: 跑马灯 — 文本框固定宽度不随内容变动, 悬停时文字滚动展示全文 */
.vlm-badge {
  margin-top: 6px; font-size: 11px; line-height: 1.5;
  display: flex; align-items: center;
  color: #93c5fd; background: rgba(59, 130, 246, .1);
  border: 1px solid rgba(59, 130, 246, .35);
  border-radius: 8px; padding: 3px 8px;
  overflow: hidden;
}
.vlm-marquee { overflow: hidden; flex: 1; min-width: 0; }
.vlm-marquee-text {
  display: inline-block; white-space: nowrap;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
  vertical-align: bottom;
}
.vlm-badge:hover .vlm-marquee-text {
  max-width: none; overflow: visible;
  animation: vlm-marquee-run var(--vlm-dur, 7s) linear infinite;
}
@keyframes vlm-marquee-run {
  0%, 12% { transform: translateX(0); }
  88%, 100% { transform: translateX(var(--vlm-shift, -30px)); }
}

/* BGM 智能推荐 */
.bgm-recommend { margin-bottom: 14px; border: 1px solid rgba(245, 158, 11, .35); border-radius: 12px; padding: 10px 12px; background: rgba(245, 158, 11, .05); }
.bgm-rec-match {
  flex-shrink: 0; min-width: 44px; text-align: center;
  font-size: 12px; font-weight: 800; color: #f59e0b;
  background: rgba(245, 158, 11, .14); border: 1px solid rgba(245, 158, 11, .4);
  padding: 2px 7px; border-radius: 999px;
}
.bgm-rec-item .bgm-lib-meta { color: var(--text-3); }

/* 学习仪表盘: 品味画像行 */
.ad-taste-row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12.5px; padding: 4px 2px; color: var(--text-2);
}
.ad-taste-row .k { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; flex-shrink: 0; }
.ad-taste-row .v { text-align: right; min-width: 0; }

/* v3.9b 每日挖掘 */
.bgm-daily { border-color: rgba(99, 102, 241, .40); background: rgba(99, 102, 241, .05); }
.bgm-daily-idx {
  flex-shrink: 0; min-width: 22px; height: 22px; display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #a5b4fc;
  background: rgba(99, 102, 241, .15); border: 1px solid rgba(99, 102, 241, .45);
  border-radius: 999px;
}

/* ============ v3.9c 面板排版对齐 / 固定高度滚动 / 缓存清理 / 电脑状态 ============ */

/* 1) 已学到的风格: 固定高度, 超出滚动 */
.ad-styles {
  max-height: 176px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.ad-styles::-webkit-scrollbar { width: 6px; }
.ad-styles::-webkit-scrollbar-thumb { background: var(--bg-3, #374151); border-radius: 3px; }
.ad-styles::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* 4) 面板排版对齐: 品味画像/硬件行统一左标签右内容网格 */
.ad-taste-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: start;
  padding: 5px 2px;
}
.ad-taste-row .k { font-weight: 600; white-space: nowrap; }
.ad-taste-row .v { text-align: left; min-width: 0; line-height: 1.5; word-break: break-all; }
.ad-taste-row .hw-val { display: flex; align-items: center; gap: 8px; }
.hw-bar { flex: 1; min-width: 60px; }
.hw-sub { font-style: normal; font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.hw-row { align-items: center; }

/* 2) 渲染缓存行清理小按钮 */
.btn.mini {
  font-size: 11px; padding: 1px 8px; margin-left: 6px;
  border-radius: 999px; vertical-align: 1px;
}
/* v4.4.5: 行内图标+文字+按钮统一 flex 垂直居中, 「清理」不再有基线错位感 */
.ad-disk-row { align-items: center; }
.ad-disk-row .k { display: inline-flex; align-items: center; }
#cache-open-btn {
  font-size: 10.5px;
  padding: 0 8px;
  line-height: 16px;
  height: 17px;                 /* 与纯文字行 (~17px) 等高 */
  margin-left: 6px;
  border-radius: 999px;
  flex: 0 0 auto;               /* flex 子项, 不再用 vertical-align 对齐 */
  background: rgba(245, 158, 11, .16);
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, .55);
  font-weight: 700;
  cursor: pointer;
}
#cache-open-btn:hover {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}

/* v4.4.6: 面板内所有图标与文字间距加大, 类目标签 flex 对齐 → 图标列开头对齐 */
.agent-dashboard .ad-block-title,
.agent-dashboard .ad-progress-label,
.agent-dashboard .ad-disk-row .k,
.agent-dashboard .ad-taste-row .k,
.agent-dashboard .hw-k {
  display: inline-flex;
  align-items: center;
  gap: 7px;                     /* 图标与文字的统一间距 */
  text-align: left;
}
.agent-dashboard .ic { flex: 0 0 auto; }

/* v4.4.3: 项目占用卡片撑满右栏高度, 行距均匀分布, 消除「合计」下方空白 */
.ad-right .ad-card { flex: 1; display: flex; flex-direction: column; }
.ad-right .ad-card .ad-block-title { flex: 0 0 auto; }
.ad-right .ad-card .ad-disk { flex: 1; justify-content: space-evenly; }

/* 缓存清理弹窗 */
.btn.danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn.danger:hover { background: #b91c1c; }
.btn.danger-outline { background: transparent; color: #f87171; border-color: rgba(220, 38, 38, .55); }
.btn.danger-outline:hover { background: rgba(220, 38, 38, .12); }
.cache-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.cache-tab.active { border-color: var(--accent); color: var(--accent); background: rgba(245, 158, 11, .10); }
.cache-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 2px 10px; font-size: 12.5px;
}
.cache-checkall { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: var(--text-2); }
.cache-list {
  max-height: 300px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 4px; margin-bottom: 12px;
  scrollbar-width: thin;
}
.cache-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 8px; cursor: pointer;
  font-size: 12.5px; color: var(--text);
}
.cache-row:hover { background: var(--bg-3, rgba(255,255,255,.04)); }
.cache-row.active { opacity: .55; cursor: not-allowed; }
.cache-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, monospace; font-size: 12px;
}
.cache-active-tag {
  flex-shrink: 0; font-size: 10.5px; font-weight: 700; color: #34d399;
  border: 1px solid rgba(52, 211, 153, .5); padding: 1px 7px; border-radius: 999px;
}
.cache-size { flex-shrink: 0; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* 5) 每日挖掘 (并入智能推荐区块) */
.bgm-daily-head {
  display: flex; justify-content: space-between; align-items: center;
  margin: 14px 0 4px; padding-top: 10px;
  border-top: 1px dashed rgba(99, 102, 241, .35);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.bgm-daily-title { display: inline-flex; align-items: center; gap: 6px; color: #a5b4fc; }
.bgm-daily-tip { font-size: 11.5px; margin: 0 0 8px; }
.bgm-daily-list {
  max-height: 264px; overflow-y: auto;
  scrollbar-width: thin;
  display: block;
}
.bgm-daily-list::-webkit-scrollbar { width: 6px; }
.bgm-daily-list::-webkit-scrollbar-thumb { background: var(--bg-3, #374151); border-radius: 3px; }
.bgm-daily-item {
  display: flex; flex-direction: row; flex-wrap: nowrap;
  align-items: center; gap: 8px;
  white-space: nowrap; overflow: hidden;
}
.bgm-daily-idx {
  flex-shrink: 0; min-width: 22px; height: 22px; display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #a5b4fc;
  background: rgba(99, 102, 241, .15); border: 1px solid rgba(99, 102, 241, .45);
  border-radius: 999px;
}
.bgm-daily-name {
  flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  font-weight: 600; color: var(--text);
}
.bgm-daily-artist { flex-shrink: 0; font-size: 12px; color: var(--text-3); max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.bgm-daily-why {
  flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  font-size: 12px; color: var(--text-3);
}

/* ============ v3.9d 面板卡片分块 / 布局再平衡 / 页内试听 ============ */

/* 分栏再平衡: 左窄一点, 右栏加宽不再挤 */
.ad-body { grid-template-columns: 158px 1fr 292px; gap: 12px; }
.ad-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* 内容按块区分 */
.ad-card {
  background: rgba(255, 255, 255, .028);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 0;
}
.ad-mid { gap: 10px; }
.ad-mid .ad-card + .ad-card { margin-top: 0; }

/* 已学到的风格: 可折叠 + 展开固定高度滚动 */
.ad-styles.collapsed { display: none; }
.ad-styles-toggle:hover { color: var(--accent); }
.ad-styles-arrow { float: right; font-size: 11px; font-weight: 600; color: var(--accent); opacity: .85; }

/* 电脑状态: 芯片行横铺不换行; 右栏窄容器行距紧凑 */
.hw-chip-row { grid-template-columns: 58px 1fr !important; }
.hw-chip {
  word-break: normal !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 600;
}
.ad-right .ad-taste-row { grid-template-columns: 58px 1fr; gap: 8px; }
.ad-right .ad-taste-row .v { word-break: normal; }

/* 温度授权引导 */
.hw-temp-help {
  margin: 4px 0 6px; padding: 8px 10px;
  border: 1px dashed rgba(245, 158, 11, .45); border-radius: 8px;
  font-size: 12px; color: var(--text-2); line-height: 1.6;
}
.hw-temp-help p { margin: 0 0 6px; }
.hw-temp-help code {
  display: inline-block; padding: 3px 8px; margin-right: 8px;
  background: rgba(0, 0, 0, .35); border-radius: 6px;
  font-family: ui-monospace, monospace; font-size: 11.5px; color: #fbbf24;
}
.bgm-daily-play.playing { border-color: var(--accent); color: var(--accent); background: rgba(245, 158, 11, .12); }
.spin { display: inline-block; animation: hwspin 1s linear infinite; }
@keyframes hwspin { to { transform: rotate(360deg); } }

/* 每日挖掘: 试听 + 抖音小入口 */
.bgm-daily-play { flex-shrink: 0; }
.bgm-daily-douyin {
  flex-shrink: 0; width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-2); font-size: 13px; text-decoration: none;
}
.bgm-daily-douyin:hover { color: var(--accent); border-color: var(--accent); }

/* ============ v3.9e 布局修正: 硬件两行式 / 风格浮层 / 推荐合并列表 ============ */

/* 电脑状态 (v3.9f→g): 底部整卡, 类目竖排 — 一行一个, 不横向挤 */
.ad-hw-card { grid-column: 1 / -1; }
.hw-title-note { font-weight: 400; font-size: 11px; color: var(--text-3); }
.hw-strip {
  display: flex; flex-direction: column;
  gap: 9px;
}
/* 电脑状态 (v3.9f→h): 底部整卡, 四列网格五行同构 — 标签 | 进度条(明细在下) | 数值 | 状态 */
.ad-hw-card { grid-column: 1 / -1; }
.ad-hw-card .ad-block-title { margin-bottom: 14px; }
.hw-chip-note { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--text-2); }
.hw-strip { display: flex; flex-direction: column; gap: 9px; }
.hw-item {
  display: grid;
  grid-template-columns: 84px minmax(200px, 420px) 56px minmax(0, 1fr);
  align-items: center; gap: 12px; min-width: 0;
}
.hw-item .k { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; color: var(--text); }
/* 单行: 进度条与明细 (12 核 / 容量 / GPU 温度) 同一行, 行高与标签一致 */
.hw-barwrap { display: flex; flex-direction: row; align-items: center; gap: 8px; min-width: 0; }
.hw-barwrap .hw-bar { flex: 1 1 auto !important; width: auto; min-width: 56px; height: 8px; }
.hw-k-sub { font-size: 10.5px; color: var(--text-3); font-weight: 400; font-style: normal; white-space: nowrap; flex-shrink: 0; }
/* 数值列: 百分比与温度同一样式, 警示时同变琥珀色 */
.hw-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; font-weight: 600; color: var(--text-1);
  text-align: right; white-space: nowrap;
}
.hw-val.warn { color: #fbbf24; }
/* 状态列: 正常灰字, 警示琥珀字 */
.hw-status { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.hw-status.warn { color: #fbbf24; }
.hw-temp-btn { white-space: nowrap; }
/* 建议行 (现仅用于温度工具安装状态; 空时隐藏) */
.hw-advice {
  margin-top: 8px; padding-top: 7px;
  border-top: 1px dashed var(--border);
  display: flex; flex-wrap: wrap; gap: 4px 14px;
}
.hw-advice:empty { display: none; }
.hw-tip { font-size: 11.5px; color: #fbbf24; line-height: 1.5; white-space: nowrap; flex-shrink: 0; }
.hw-tip.ok { color: var(--text-3); }
/* 库根预警 (硬盘未挂载) */
.ad-lib-warn {
  grid-column: 1 / -1;
  padding: 8px 12px; border-radius: 8px; font-size: 12px; line-height: 1.6;
  border: 1px solid rgba(245, 158, 11, .45); background: rgba(245, 158, 11, .08);
  color: #fbbf24;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.ad-lib-warn .libroot-open-inline { flex-shrink: 0; }

/* v4.5: 素材库位置选择对话框 */
#lib-root-modal { z-index: 1100; }   /* 需盖在素材库主弹窗 (z=1000) 之上 */
.libroot-card { max-width: 640px; width: min(640px, 92vw); }
.libroot-body { padding: 14px 18px 18px; overflow-y: auto; max-height: 70vh; }
.libroot-now {
  padding: 10px 12px; border-radius: 8px; margin-bottom: 14px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  font-size: 12.5px; word-break: break-all;
}
.libroot-warn-tag {
  margin-left: 8px; padding: 1px 8px; border-radius: 99px; font-size: 11px;
  border: 1px solid rgba(245, 158, 11, .45); color: #fbbf24;
}
.libroot-section-title { font-size: 12.5px; font-weight: 600; margin: 14px 0 8px; color: var(--text-2); }
.libroot-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.libroot-candidates { display: flex; flex-direction: column; gap: 6px; }
.libroot-cand {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03);
  transition: border-color .15s, background .15s;
}
.libroot-cand:hover { border-color: var(--accent); background: rgba(255,255,255,.06); }
.libroot-cand.is-current { cursor: default; border-color: rgba(74, 222, 128, .4); }
.libroot-cand-path { font-size: 12.5px; word-break: break-all; }
.libroot-cand-cur { font-size: 11.5px; color: #4ade80; flex-shrink: 0; }
.libroot-custom { display: flex; gap: 8px; }
.libroot-custom input {
  flex: 1; padding: 8px 10px; border-radius: 8px; font-size: 12.5px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.25); color: var(--text-1);
}
.libroot-custom input:focus { outline: none; border-color: var(--accent); }
.libroot-msg {
  margin-top: 12px; padding: 9px 12px; border-radius: 8px; font-size: 12.5px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  word-break: break-all;
}
.libroot-msg.ok { border-color: rgba(74, 222, 128, .45); color: #4ade80; }
.libroot-msg.err { border-color: rgba(248, 113, 113, .45); color: #f87171; }

/* 已学到的风格: 展开为浮层 — 不挤动面板其他内容, 收起/展开面板高度恒定 */
.ad-styles-wrap { position: relative; }
.ad-styles.collapsed { display: none; }
.ad-styles:not(.collapsed) {
  position: absolute; left: 0; right: 0; top: 100%;
  z-index: 40;
  /* v4.10.2: 赛博朋克主题把 --bg-3 覆写成半透明, 展开浮层会与下层内容穿透混合,
     改用不透明深色底 + 毛玻璃, 保证可读性 */
  background: linear-gradient(160deg, rgba(13, 20, 38, .97), rgba(7, 11, 24, .98));
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(0, 240, 255, .25);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .65), 0 0 0 1px rgba(0, 240, 255, .06);
  padding: 9px 10px;
}

/* 智能推荐合并列表: 每日挖掘条目 */
.bgm-rec-tip { margin: 0 0 8px; font-size: 11.5px; line-height: 1.6; }
#bgm-rec-list { max-height: 420px; }
.bgm-rec-match.daily {
  color: #a5b4fc;
  background: rgba(99, 102, 241, .15);
  border-color: rgba(99, 102, 241, .45);
}
.bgm-rec-divider {
  display: flex; align-items: center; gap: 8px;
  margin: 6px 2px; font-size: 11px; color: var(--text-3);
  white-space: nowrap;
}
.bgm-rec-divider::before, .bgm-rec-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.hw-temp-cell { flex-direction: row !important; align-items: center !important; gap: 10px !important; }

/* 「去听」三源菜单 (v3.9j): 试听找不到源时, 按钮弹出 网易云/抖音/QQ音乐 选择 */
.daily-fallback-menu {
  position: absolute; z-index: 1000;
  display: flex; gap: 6px; padding: 6px;
  background: var(--bg-2, #1e1e24);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}
.daily-fallback-menu a {
  padding: 4px 10px;
  font-size: 12px; font-weight: 600; text-decoration: none;
  color: var(--text-1, #eee);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--border);
  border-radius: 6px;
  white-space: nowrap;
}
.daily-fallback-menu a:hover {
  color: var(--accent, #f97316);
  border-color: var(--accent, #f97316);
  background: rgba(249, 115, 22, .1);
}

/* ♡ 收藏的 BGM (v3.9k) */
.bgm-rec-match.like {
  color: #fb7185;
  background: rgba(244, 63, 94, .14);
  border-color: rgba(244, 63, 94, .45);
}
.bgm-like-artist { font-size: 11px; color: var(--text-3); font-style: normal; margin-left: 4px; }
#bgm-like-list { max-height: 260px; }

/* ============ v3.9m: 每日一言; v4.4 上下轮播一次一条 (串行动画不重叠), 固定宽 320px ============ */
.quote-ticker[hidden] { display: none !important; }  /* v4.7.1: hidden 时彻底不占位, 修复进度区大空白 */
.quote-ticker {
  height: 26px;
  overflow: hidden;
  position: relative;
  border-left: 1px solid var(--border);
  padding-left: 14px;
  display: flex;
  align-items: center;
}
.quote-ticker::before {
  content: '✦'; position: absolute; left: 14px; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px; color: var(--accent); opacity: .85;
}
.quote-ticker-list {
  display: block;
  width: 100%;
  padding-left: 16px;
  box-sizing: border-box;
  white-space: nowrap;
}
.quote-ticker-text {
  display: inline-block;
  white-space: nowrap;
  color: var(--text-2); font-size: 12.5px;
  line-height: 26px;
  will-change: transform, opacity;
}
@keyframes quote-roll {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}

/* ============ v3.9m: 修复 .lib-modal-card 透明导致弹窗与背景混在一起 ============ */
:root { --bg-1: #1a1f2c; }   /* 补全未定义的色值, .lib-modal-card 用它就有实色背景 */
.lib-modal-backdrop {
  background: rgba(0, 0, 0, 0.78) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}
.lib-modal-card {
  background: var(--bg-1) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--border) !important;
}

/* ============ v3.9m: clip-card 选用/不选切换 ============ */
.clip-card { position: relative; cursor: pointer; transition: opacity 0.15s, filter 0.15s; }
.clip-card.is-off {
  opacity: 0.42;
  filter: grayscale(0.6) brightness(0.85);
}
.clip-card.is-off::after {
  content: '已排除';
  position: absolute; top: 40px; right: 6px;   /* v4.4.2: 挪到 ✓/✕ 圆钮正下方, 之前同位重叠 */
  padding: 2px 8px;
  background: rgba(220, 38, 38, 0.85);
  color: #fff; font-size: 11px; font-weight: 600;
  border-radius: 999px;
  pointer-events: none;
}
.clip-pick-toggle {
  position: absolute; top: 6px; right: 6px;
  width: 28px; height: 28px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  z-index: 5;
  transition: background 0.15s, transform 0.1s;
  user-select: none;
}
.clip-pick-toggle:hover { transform: scale(1.08); }
.clip-pick-toggle.on {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}
.clip-pick-toggle.off {
  background: rgba(220, 38, 38, 0.85);
  border-color: rgba(220, 38, 38, 1);
}
/* v4.7.2: 微信式勾选 — 绿圈内显示序号(JS 写入 textContent), 空圈为纯空心圆 */
.clip-pick-toggle.on::after { content: none; }
.clip-pick-toggle.on { font-size: 13px; }
.clip-pick-toggle.off::after { content: '✕'; }
.clip-pick-toggle.empty::after { content: ''; }
.clip-pick-toggle.empty { background: rgba(0, 0, 0, 0.35); border-color: rgba(255,255,255,0.55); }

/* 选用/不选统计条 */
.pick-counter {
  /* v4.3: 跨整个 .analyze-result 网格行, 避免被挤压到第一列导致错位 */
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin-bottom: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  flex-wrap: wrap;
}
.pick-counter .pick-stat {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 600;
  white-space: nowrap;
}
.pick-counter .pick-stat b { font-size: 15px; color: var(--accent); }
.pick-counter .pick-actions { margin-left: auto; display: flex; gap: 6px; }
.pick-counter .pick-actions button { padding: 4px 10px; font-size: 12px; }

/* 重新分析提示条 (v3.9m: 改动后等待用户点) */
.reanalyze-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin: 0 0 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 10px;
  font-size: 13px; color: var(--text-1);
}
.reanalyze-bar .reanalyze-actions { margin-left: auto; }
.reanalyze-bar button { white-space: nowrap; }

/* 时间线高亮当前镜头 */
.tl-shot.is-current {
  border: 2px solid var(--accent) !important;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

/* ============ v4.6.2: FCPX 风格磁吸时间线 ============ */
.tl-toolbar { display: flex; gap: 4px; margin-left: auto; }
.tl-toolbar .btn { padding: 2px 10px; font-size: 12px; line-height: 1.5; }

/* 覆盖旧的卡片式布局: 改为等比磁吸轨道 */
.tl-strip { display: block; padding: 0; overflow-x: auto; overflow-y: hidden; }
.tl-canvas { position: relative; min-width: 100%; user-select: none; }
.tl-ruler {
  position: relative; height: 26px;
  background: #161b22; border-bottom: 1px solid var(--border);
  cursor: ew-resize;
}
.tl-tick { position: absolute; bottom: 0; width: 1px; height: 8px; background: #374151; }
.tl-tick.major { height: 14px; background: #6b7280; }
.tl-tick.major span {
  position: absolute; bottom: 14px; left: 3px;
  font-size: 10px; color: #9ca3af; white-space: nowrap;
}
.tl-track { position: relative; height: 88px; background: #0d1117; }
.tl-track-video { background: #111827; }
.tl-track-bgm { height: 40px; border-top: 1px solid var(--border); background: #0b0f14; }

/* 视频 clip 块: 绝对定位 + 宽度 ∝ 时长 */
.tl-canvas .tl-shot {
  position: absolute; top: 5px; bottom: 5px;
  flex: none; width: auto;
  border-radius: 6px; border: 1px solid #374151;
  overflow: hidden; cursor: pointer;
  transition: border-color .12s;
}
.tl-canvas .tl-shot:hover { transform: none; border-color: var(--accent); z-index: 3; }
.tl-shot.playing {
  border-color: #fbbf24;
  box-shadow: 0 0 0 1px #fbbf24;
  z-index: 2;
}
.tl-shot::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--cat-color, var(--accent)); z-index: 2;
}
.tl-film {
  position: absolute; inset: 0;
  background-size: auto 100%; background-repeat: repeat-x; background-position: left center;
  opacity: .9;
}
.tl-film-ph {
  display: flex; align-items: center; justify-content: center;
  background: #1f2937; color: #4b5563; font-size: 18px;
}
.tl-shot-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: 4px; align-items: center;
  padding: 2px 5px; font-size: 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78));
}
.tl-canvas .tl-shot-info, .tl-canvas .tl-name { display: none; }
.tl-shot .tl-idx { color: #fbbf24; font-weight: 700; }
.tl-shot .tl-dur { color: #d1d5db; }
.tl-shot .tl-cat {
  margin-left: auto; max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: rgba(255, 255, 255, .14); color: #e5e7eb;
  padding: 0 4px; border-radius: 3px; font-size: 9px;
}
/* 悬停操作按钮 (FCPX 工具条风格) */
.tl-canvas .tl-shot-tools {
  position: absolute; top: 4px; right: 4px;
  display: flex; gap: 3px;
  opacity: 0; transition: opacity .12s; z-index: 4;
}
.tl-shot:hover .tl-shot-tools { opacity: 1; }
.tl-tool {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(17, 24, 39, .88); border: 1px solid var(--border); border-radius: 5px;
  color: #e5e7eb; cursor: pointer;
}
.tl-tool .ic { width: 12px; height: 12px; }
.tl-tool:hover { background: var(--accent); color: #111; border-color: var(--accent); }
.tl-canvas .tl-zoom-badge { position: absolute; top: 4px; left: 6px; z-index: 3; }

/* BGM 音轨块 (绿色, 伪波形纹理) */
.tl-bgmi {
  position: absolute; top: 4px; bottom: 4px; left: 0;
  background: linear-gradient(#0e7a4f, #065f46);
  border: 1px solid #10b981; border-radius: 5px;
  overflow: hidden; display: flex; align-items: center;
}
.tl-bgmi-wave {
  position: absolute; inset: 0; opacity: .45;
  background: repeating-linear-gradient(90deg,
    rgba(255, 255, 255, .22) 0 2px, transparent 2px 6px);
}
.tl-bgmi-name {
  position: relative; z-index: 1; padding: 0 8px;
  font-size: 11px; color: #d1fae5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tl-bgmi-name .ic { width: 11px; height: 11px; vertical-align: -1px; }
.tl-bgmi-empty {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: #4b5563;
}

/* 播放头 (白色竖线 + 倒三角帽, FCPX skimmer 风格) */
.tl-playhead {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: #fff; z-index: 5; pointer-events: none;
  box-shadow: 0 0 4px rgba(0, 0, 0, .6);
}
.tl-ph-cap {
  position: absolute; top: 0; left: -6px;
  width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 8px solid #fff;
}

/* ============ v4.7: 不感兴趣按钮 + 人工筛选反馈学习 ============ */
.clip-actions-row {
  display: flex; gap: 6px; margin-top: 6px;
  justify-content: space-between;
}
/* v4.19.5: 「不感兴趣」「调整」等宽 — 平分行内空间 */
.clip-actions-row .btn { flex: 1 1 0; white-space: nowrap; text-align: center; }
.clip-dislike-btn {
  color: #9ca3af; border-color: rgba(156, 163, 175, .35);
  font-size: 11px; padding: 3px 5px;
}
.clip-dislike-btn:hover { color: #f87171; border-color: rgba(248, 113, 113, .55); }
.clip-dislike-btn.active {
  color: #f87171; background: rgba(248, 113, 113, .12);
  border-color: rgba(248, 113, 113, .5);
}
.clip-card.is-disliked { opacity: .55; }
.clip-card.is-disliked .clip-thumb-wrap img { filter: grayscale(.6); }

/* v4.7: 渲染完成日志行高亮 */
.log-line.log-done {
  color: #34d399;
  border-left: 3px solid #10b981;
  padding-left: 8px;
  background: rgba(16, 185, 129, .06);
}

/* ============ v4.7.1: 批量替换 + 替换弹窗预览 ============ */
.replace-actions {
  display: flex; flex-direction: column; gap: 4px; margin-top: 6px;
}
.replace-actions .btn { width: 100%; white-space: nowrap; }
.replace-preview { color: var(--text-2); }
.replace-preview:hover { color: var(--text-1); }

/* v4.7.2: 替换弹窗缩略图播放徽章 (与素材库/分析卡片同款交互) */
.replace-thumb { cursor: pointer; position: relative; }
.replace-thumb .replace-play-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.55); border: 1.5px solid rgba(255, 255, 255, 0.75);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; pointer-events: none;
  transition: background 0.15s, transform 0.1s;
}
.replace-thumb:hover .replace-play-badge {
  background: rgba(0, 0, 0, 0.75); transform: translate(-50%, -50%) scale(1.08);
}

/* ============ v4.7.3: 顶栏常驻电脑状态 (固定, 每 10s 刷新) ============ */
/* v4.7.3b: 位置调整 — 小组件固定在标题「学着剪」右侧同一行 */
.brand-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.brand-title-row h1 { flex: none; }
.hw-pill {
  display: inline-flex; align-items: center; flex-wrap: nowrap;
  gap: 4px 12px;
  padding: 5px 14px;
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 999px;
  white-space: nowrap;
  max-width: 100%; overflow: hidden;
}
.hw-pill-loading { font-size: 11px; color: var(--text-3); }
.hw-mini-chip {
  font-size: 11px; font-weight: 700; color: var(--text-2);
  max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hw-mini {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; line-height: 1;
}
.hw-mini-k { color: var(--text-2); font-weight: 600; }
.hw-mini-bar {
  width: 44px; height: 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); overflow: hidden;
}
.hw-mini-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  transition: width .6s ease;
}
.hw-mini-v { color: var(--text); font-weight: 600; min-width: 30px; }
.hw-mini.warn .hw-mini-bar i { background: linear-gradient(90deg, #ef4444, #f87171); }
.hw-mini.warn .hw-mini-v { color: #f87171; }

/* ============ v4.7.7: 顶栏按钮与状态胶囊瘦身 (缓解标题区拥挤) ============ */
.brand-meta { gap: 8px; }
.brand-title-row { gap: 12px; }
.brand-meta .btn.small {
  font-size: 10.5px;
  padding: 2px 9px;
  border-radius: 6px;
  color: var(--text-2);
  background: transparent;
}
.brand-meta .btn.small:hover:not(:disabled) { background: var(--border); color: var(--text); }
.brand-meta .btn.small .ic { width: 1em; height: 1em; }
.hw-pill { padding: 4px 12px; gap: 4px 11px; }
.hw-mini { font-size: 10.5px; gap: 4px; }
.hw-mini-bar { width: 38px; }
.hw-mini-chip { max-width: 140px; }
.version-tag { padding: 1px 6px; }

/* ============ v4.7.8: 顶栏留白与比例优化 (缓解顶部压抑感) ============ */
header { padding: 28px 32px 22px; }          /* 顶部留白加大, 整体下移不压抑 */
.logo { width: 56px; height: 56px; border-radius: 14px; }   /* logo 48→56 */
.brand h1 { font-size: 22px; }
.brand p, .brand-meta p { font-size: 13px; }               /* 小字行放大一点 */
.brand-meta { margin-top: 7px; }                            /* 与上方电脑状态行的间距拉开 */

/* ================================================================== */
/* ========= v4.8.0: 赛博朋克 × 毛玻璃 (Cyberpunk Glass) 全局主题 ======== */
/* ================================================================== */
/* 策略: 仅覆写 CSS 变量 + 关键表面, 不改动上方任何规则; 想回退删掉本段即可 */
:root {
  --bg: #05070f;
  --bg-1: rgba(13, 18, 32, .84);
  --bg-2: rgba(14, 19, 34, .62);
  --bg-3: rgba(0, 240, 255, .07);
  --border: rgba(0, 240, 255, .16);
  --text: #e6f7ff;
  --text-2: #95abc9;
  --text-3: #63799a;
  --accent: #00f0ff;
  --accent-2: #ff2bd6;
  --green: #00ffa3;
  --blue: #4d7cff;
  --red: #ff3860;
}
html { color-scheme: dark; }

/* 深空底色: 洋红/青/紫三向霓虹光晕 + 极淡网格 */
body {
  background:
    radial-gradient(1100px 540px at 88% -12%, rgba(255, 43, 214, .15), transparent 62%),
    radial-gradient(950px 620px at -12% 18%, rgba(0, 240, 255, .14), transparent 58%),
    radial-gradient(1000px 720px at 50% 125%, rgba(124, 77, 255, .14), transparent 62%),
    linear-gradient(rgba(0, 240, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, .04) 1px, transparent 1px),
    #05070f;
  background-attachment: fixed;
  background-size: auto, auto, auto, 44px 44px, 44px 44px, auto;
}
/* CRT 细扫描线 (极淡, 纯氛围, 不影响点击) */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 4000;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 3px);
}
::selection { background: rgba(0, 240, 255, .28); color: #fff; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, .22); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 240, 255, .4); }
::-webkit-scrollbar-track { background: transparent; }

/* —— 毛玻璃面板 —— */
header, .step-section, .card, .lib-modal-card, .bgm-info {
  background: var(--bg-2) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 0 0 1px rgba(0, 240, 255, .05), 0 14px 44px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .07);
}
header { border-bottom: 1px solid rgba(0, 240, 255, .22) !important; }
.hw-pill {
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-color: rgba(0, 240, 255, .22);
  box-shadow: 0 0 16px rgba(0, 240, 255, .1);
}

/* 霓虹 logo 与标题辉光 */
.logo {
  box-shadow: 0 0 0 1px rgba(0, 240, 255, .35), 0 0 26px rgba(0, 240, 255, .28), inset 0 0 18px rgba(0, 240, 255, .12);
}
.brand h1 {
  color: #f2fbff;
  text-shadow: 0 0 14px rgba(0, 240, 255, .55), 0 0 42px rgba(0, 240, 255, .25);
  letter-spacing: .5px;
}
.version-tag {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--accent);
  border-color: rgba(0, 240, 255, .4);
}

/* —— 按钮: 玻璃底 + 霓虹描边 —— */
.btn { background: var(--bg-3); border-color: rgba(0, 240, 255, .22); transition: all .18s; }
.btn:hover:not(:disabled) { border-color: rgba(0, 240, 255, .55); box-shadow: 0 0 14px rgba(0, 240, 255, .22); }
.btn.primary {
  background: linear-gradient(135deg, #00f0ff, #0090ff);
  color: #031018; border-color: transparent; font-weight: 700;
  box-shadow: 0 0 18px rgba(0, 240, 255, .35);
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 4px 20px rgba(0, 240, 255, .3); }

/* —— 步骤 pills: 霓虹渐变 —— */
.step { background: var(--bg-3); border-color: rgba(0, 240, 255, .18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.step.active {
  background: linear-gradient(135deg, #00f0ff, #0090ff);
  color: #04121a !important; border-color: transparent;
  box-shadow: 0 0 16px rgba(0, 240, 255, .4);
}
.step.active span { background: rgba(3, 16, 24, .28); color: #04121a; }
.step.done {
  background: linear-gradient(135deg, #00ffa3, #00c878);
  color: #03140c !important;
  box-shadow: 0 0 14px rgba(0, 255, 163, .3);
}
.step.done span { background: rgba(3, 20, 12, .28); }

/* —— 弹窗: 深玻璃 —— */
.lib-modal-backdrop { background: rgba(3, 5, 12, .66) !important; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lib-modal-card {
  background: var(--bg-1) !important;
  border: 1px solid rgba(0, 240, 255, .25) !important;
  box-shadow: 0 0 0 1px rgba(0, 240, 255, .06), 0 24px 80px rgba(0, 0, 0, .6), 0 0 60px rgba(0, 240, 255, .07);
}

/* —— 输入控件: 深玻璃 + 霓虹聚焦 —— */
input[type="text"], input[type="number"], input[type="date"], input[type="time"], select, textarea {
  background: rgba(8, 12, 24, .65);
  border-color: rgba(0, 240, 255, .22);
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(0, 240, 255, .6) !important;
  box-shadow: 0 0 0 2px rgba(0, 240, 255, .15), 0 0 14px rgba(0, 240, 255, .2);
}

/* —— 徽章/高亮对齐霓虹色 —— */
.feature-badge { border: 1px solid rgba(0, 240, 255, .4); }
.clip-card.trimmed { border-color: rgba(0, 240, 255, .6); box-shadow: 0 0 12px rgba(0, 240, 255, .18); }
.hw-mini-bar { background: rgba(255, 255, 255, .1); }

/* ===== v4.15: 风格管理模式 (调整 → 每张风格卡右上角出删除按钮) ===== */
.style-manage-btn { margin-left: 10px; vertical-align: middle; opacity: .85; }
.style-manage-btn .ic { width: 13px; height: 13px; }
.style-manage-btn.active {
  background: var(--accent);
  color: #001318;
  border-color: var(--accent);
  opacity: 1;
}
.style-del-btn {
  display: none;
  position: absolute;
  top: -9px;
  right: -9px;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid var(--bg-2, #0a0e1a);
  border-radius: 50%;
  background: #ff4d5e;
  color: #fff;
  cursor: pointer;
  z-index: 6;
  box-shadow: 0 2px 10px rgba(255, 77, 94, .5);
  transition: transform .15s, background .15s;
}
.style-del-btn .ic { width: 12px; height: 12px; }
.style-del-btn:hover { transform: scale(1.18); background: #ff6675; }
.style-grid.managing .style-del-btn { display: flex; }
.style-grid.managing .style-card:not(.style-card-default) { border-style: dashed; }
.style-grid.managing .style-card:not(.style-card-default):hover { border-color: #ff4d5e; }

/* ===== v4.15.1: 赛博风格确认弹窗 (替代原生 confirm, z-index 压过全链) ===== */
/* 层级链: 归档1000 < 样本预览1200 < 拆解1350 < 视频预览1380 < 静帧1400 < 本弹窗1500 */
.cyber-confirm-modal { z-index: 1500; }
.cyber-confirm-card {
  position: relative;
  width: min(420px, 90vw);
  background: linear-gradient(160deg, rgba(10, 16, 30, .97), rgba(6, 10, 20, .99));
  border: 1px solid rgba(0, 240, 255, .35);
  border-radius: 14px;
  padding: 22px 22px 18px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 240, 255, .08), 0 24px 80px rgba(0, 0, 0, .7), 0 0 50px rgba(0, 240, 255, .12);
  transform: scale(.9) translateY(14px);
  opacity: 0;
  transition: transform .2s cubic-bezier(.34, 1.4, .64, 1), opacity .18s ease;
}
.cyber-confirm-modal.open .cyber-confirm-card { transform: none; opacity: 1; }
/* 顶部霓虹扫描条 */
.cyber-confirm-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 12px rgba(0, 240, 255, .8);
}
/* 四角括号装饰 */
.cf-corner {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 2px solid var(--accent);
  opacity: .8;
  pointer-events: none;
}
.cf-corner.tl { top: 7px; left: 7px; border-right: none; border-bottom: none; }
.cf-corner.tr { top: 7px; right: 7px; border-left: none; border-bottom: none; }
.cf-corner.bl { bottom: 7px; left: 7px; border-right: none; border-top: none; }
.cf-corner.br { bottom: 7px; right: 7px; border-left: none; border-top: none; }
/* danger 变体: 霓虹转红 */
.cyber-confirm-modal.danger .cyber-confirm-card {
  border-color: rgba(255, 77, 94, .45);
  box-shadow: 0 0 0 1px rgba(255, 77, 94, .1), 0 24px 80px rgba(0, 0, 0, .7), 0 0 50px rgba(255, 77, 94, .15);
}
.cyber-confirm-modal.danger .cyber-confirm-card::before {
  background: linear-gradient(90deg, transparent, #ff4d5e, transparent);
  box-shadow: 0 0 12px rgba(255, 77, 94, .8);
}
.cyber-confirm-modal.danger .cf-corner { border-color: #ff4d5e; }
.cyber-confirm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cyber-confirm-icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(0, 240, 255, .1);
  border: 1px solid rgba(0, 240, 255, .35);
  color: var(--accent);
  box-shadow: inset 0 0 14px rgba(0, 240, 255, .18);
}
.cyber-confirm-icon .ic { width: 20px; height: 20px; }
.cyber-confirm-modal.danger .cyber-confirm-icon {
  background: rgba(255, 77, 94, .12);
  border-color: rgba(255, 77, 94, .45);
  color: #ff6675;
  box-shadow: inset 0 0 14px rgba(255, 77, 94, .22);
}
.cyber-confirm-title { font-size: 15px; font-weight: 700; letter-spacing: .5px; }
.cyber-confirm-sub {
  font-family: monospace;
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 1.5px;
  margin-top: 2px;
}
.cyber-confirm-modal.danger .cyber-confirm-sub { color: rgba(255, 102, 117, .75); }
.cyber-confirm-msg { font-size: 13px; line-height: 1.75; color: var(--text-2); margin-bottom: 18px; }
.cyber-confirm-msg b { color: var(--text-1); }
.cyber-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
#cyber-confirm-cancel { background: rgba(255, 255, 255, .06); }
.cyber-confirm-ok {
  border: none;
  border-radius: 8px;
  padding: 8px 24px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #00f0ff, #00b4d8);
  color: #031018;
  box-shadow: 0 0 16px rgba(0, 240, 255, .35);
  transition: all .15s;
}
.cyber-confirm-ok:hover { transform: translateY(-1px); box-shadow: 0 0 24px rgba(0, 240, 255, .5); }
.cyber-confirm-modal.danger .cyber-confirm-ok {
  background: linear-gradient(135deg, #ff4d5e, #d92e3f);
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 77, 94, .4);
}
.cyber-confirm-modal.danger .cyber-confirm-ok:hover { box-shadow: 0 0 24px rgba(255, 77, 94, .6); }

/* —— v4.16 素材简介条 (分析完成板块, 分辨率/帧率/色彩格式) —— */
.media-brief {
  margin: 10px 0 14px;
  padding: 10px 14px;
  border: 1px solid rgba(0, 240, 255, .22);
  border-radius: 10px;
  background: rgba(0, 240, 255, .045);
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--text-1);
  position: relative;
  overflow: hidden;
}
.media-brief::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #00f0ff, rgba(0, 240, 255, .15));
}
.media-brief b { color: var(--accent); font-weight: 600; }
.media-brief .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; color: var(--accent); }

/* —— v4.17 AI 智能助手 (step1 聊天面板) —— */
.ai-assistant {
  margin-top: 16px;
  border: 1px solid rgba(0, 240, 255, .28);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0, 240, 255, .05), rgba(0, 0, 0, .18));
  box-shadow: 0 0 24px rgba(0, 240, 255, .07), inset 0 0 40px rgba(0, 240, 255, .02);
  overflow: hidden;
}
.ai-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 240, 255, .16);
  background: rgba(0, 240, 255, .04);
}
.ai-avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(0, 240, 255, .25), rgba(139, 92, 246, .2));
  border: 1px solid rgba(0, 240, 255, .45);
  color: var(--accent); box-shadow: 0 0 14px rgba(0, 240, 255, .3);
}
.ai-avatar .ic { width: 20px; height: 20px; }
.ai-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ai-head-text strong { font-size: 14.5px; letter-spacing: .5px; }
.ai-head-text .hint { font-size: 11.5px; line-height: 1.5; }
.ai-msgs {
  max-height: 420px; overflow-y: auto;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  overscroll-behavior: contain;
}
.ai-msg { max-width: 86%; font-size: 13px; line-height: 1.75; animation: ai-in .25s ease; }
@keyframes ai-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ai-msg.user {
  align-self: flex-end;
  background: rgba(0, 240, 255, .1);
  border: 1px solid rgba(0, 240, 255, .35);
  border-radius: 12px 12px 3px 12px;
  padding: 8px 12px;
}
.ai-msg.bot {
  align-self: flex-start;
  background: var(--bg-2, rgba(255,255,255,.04));
  border: 1px solid var(--border, rgba(255,255,255,.12));
  border-radius: 12px 12px 12px 3px;
  padding: 9px 12px;
}
.ai-msg.bot b { color: var(--accent); }
.ai-msg .ai-report { display: flex; flex-direction: column; gap: 6px; }
.ai-report-row { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.ai-report-row .ai-ic { flex: none; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ai-chip {
  font-size: 11px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid rgba(0, 240, 255, .3); color: var(--accent);
  background: rgba(0, 240, 255, .06);
}
.ai-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ai-typing { display: inline-flex; gap: 4px; align-items: center; }
.ai-typing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: ai-blink 1.2s infinite;
}
.ai-typing i:nth-child(2) { animation-delay: .2s; }
.ai-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes ai-blink { 0%, 70%, 100% { opacity: .25; } 35% { opacity: 1; } }
.ai-prog { margin-top: 6px; }
.ai-prog-bar {
  height: 6px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, .08);
}
.ai-prog-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 999px; transition: width .4s;
}
.ai-prog-text { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.ai-msg audio { width: 100%; height: 34px; margin-top: 6px; }
.ai-input-row {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px;
  border-top: 1px solid rgba(0, 240, 255, .16);
  background: rgba(0, 0, 0, .22);
}
.ai-input-row input[type="text"] {
  flex: 1; min-width: 0;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border, rgba(255,255,255,.14));
  border-radius: 10px; color: var(--text-1);
  padding: 8px 12px; font-size: 13px; outline: none;
}
.ai-input-row input[type="text"]:focus { border-color: rgba(0, 240, 255, .5); box-shadow: 0 0 10px rgba(0, 240, 255, .15); }

/* ============ v4.18: 抖音分享链接一键导入 ============ */
.douyin-import {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0 6px; padding: 10px 12px;
  background: rgba(0, 240, 255, .04);
  border: 1px solid rgba(0, 240, 255, .22);
  border-radius: 12px;
}
.douyin-import:focus-within {
  border-color: rgba(0, 240, 255, .5);
  box-shadow: 0 0 12px rgba(0, 240, 255, .12);
}
.douyin-badge {
  flex: none; padding: 3px 9px; font-size: 12px; font-weight: 600;
  color: #0ff; background: rgba(0, 240, 255, .1);
  border: 1px solid rgba(0, 240, 255, .4); border-radius: 6px;
  letter-spacing: 1px;
}
.douyin-import input[type="text"] {
  flex: 1; min-width: 0; background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px;
  color: var(--text-1); padding: 8px 12px; font-size: 13px; outline: none;
}
.douyin-import input[type="text"]:focus { border-color: rgba(0, 240, 255, .5); }
.douyin-import .btn { flex: none; }

.douyin-status { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px;
  background: rgba(0, 240, 255, .04); border: 1px solid rgba(0, 240, 255, .18); }
.douyin-status-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.douyin-status-text { font-size: 12.5px; color: var(--text-1); }
.douyin-status-pct { font-size: 12px; color: #0ff; font-variant-numeric: tabular-nums; }
.douyin-status-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.douyin-status-fill { height: 100%; width: 0%; border-radius: 2px;
  background: linear-gradient(90deg, rgba(0, 240, 255, .7), rgba(0, 240, 255, 1));
  box-shadow: 0 0 8px rgba(0, 240, 255, .5);
  transition: width .5s ease; }
.douyin-status-fill.done { background: linear-gradient(90deg, rgba(0, 255, 136, .8), rgba(0, 255, 136, 1)); box-shadow: 0 0 8px rgba(0, 255, 136, .5); }
.douyin-status.error .douyin-status-text { color: #ff5c7a; }
.douyin-status.error .douyin-status-fill { background: linear-gradient(90deg, rgba(255, 92, 122, .8), rgba(255, 92, 122, 1)); box-shadow: 0 0 8px rgba(255, 92, 122, .5); }

/* ============ v4.20: 文案库 + 通用刷新按钮 + 空状态 ============ */
/* 通用板块刷新按钮 (makeRefreshBtn 模板) — 标题行内联, 旋转动效 */
.h3-tools { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; vertical-align: middle; }
.section-refresh-btn .rf-ico { display: inline-block; }
.section-refresh-btn.spinning .rf-ico { animation: rf-spin 0.8s linear infinite; }
@keyframes rf-spin { to { transform: rotate(360deg); } }

/* 文案库列表 */
.cl-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--bg-2);
}
.cl-main { flex: 1; min-width: 0; }
.cl-title { font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* v4.20.1: 标题没显示完整时, hover 以跑马灯形式来回滚动展示全文 (位移量 --cl-shift 由 JS 实测写入) */
.cl-title-inner { display: inline-block; white-space: nowrap; vertical-align: top; }
.cl-title.cl-overflow:hover { text-overflow: clip; }
.cl-title.cl-overflow:hover .cl-title-inner { animation: cl-marquee 7s linear infinite; }
@keyframes cl-marquee {
  0%, 12% { transform: translateX(0); }
  62%, 85% { transform: translateX(var(--cl-shift, -80px)); }
  100% { transform: translateX(0); }
}
.cl-topics { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--accent); }
.cl-meta { margin-top: 3px; font-size: 11.5px; color: var(--text-3); }
.cl-text {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cl-acts { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
/* v4.20.1: 删除按钮 — 弱化红色, 不抢复制按钮视觉 */
.cl-del { color: #ff8b96; border-color: rgba(255, 77, 94, 0.3); }
.cl-del:hover { background: rgba(255, 77, 94, 0.16); color: #ffb3bb; }
.cl-empty { padding: 40px 20px; text-align: center; color: var(--text-3); font-size: 13px; }

/* 第 4 步无素材空状态提示 */
.render-empty-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  padding: 10px 14px;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  background: rgba(0, 200, 255, 0.05);
  color: var(--text-2);
  font-size: 12.5px;
}
.render-empty-hint .ic { flex-shrink: 0; color: var(--accent); }

/* ============ v4.21.1: 第 6 步文案仿写排版重做 + 历史折叠 ============ */
/* 表单栅格: 五列一行放下, 窄屏自动两列 */
.cw-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 16px 18px;
  align-items: end;
}
.cw-form-grid .cw-gen-btn { align-self: end; }
@media (max-width: 980px) {
  .cw-form-grid { grid-template-columns: 1fr 1fr; }
  .cw-field-wide { grid-column: 1 / -1; }
}
.cw-field label {
  display: block;
  font-size: 11.5px;
  color: var(--text-3);
  margin-bottom: 6px;
  letter-spacing: .3px;
}
/* v4.21.5: 卡片内边距 + 控件统一宽高 */
.cw-card { padding: 16px 18px; }
.cw-field select,
.cw-field input,
.cw-input {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  padding: 9px 12px;
  font-size: 13px;
}
.cw-field select,
.cw-field input {
  width: 100%;
  box-sizing: border-box;
  height: 38px;
}
.cw-field select:focus, .cw-field input:focus, .cw-input:focus {
  outline: none;
  border-color: var(--accent);
}
.cw-gen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 22px;
  font-size: 14px;
  border-radius: 10px;
  white-space: nowrap;
}
.cw-gen-btn .ic { width: 16px; height: 16px; }

/* 仿写结果卡: 大标题 + 分区块 */
.cw-variant {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 14px;
  transition: border-color .15s;
}
.cw-variant:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.cw-var-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.cw-var-no {
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--accent);
  line-height: 1.1;
  letter-spacing: 1px;
}
.cw-var-titles { flex: 1; min-width: 0; }
.cw-var-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  cursor: pointer;
}
.cw-var-title:hover { color: var(--accent); }
.cw-var-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.cw-topic-chip {
  font-size: 11.5px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 2px 10px;
  border-radius: 20px;
}
.cw-var-head .btn { flex-shrink: 0; }
/* v4.57.2: 右侧操作组 — 徽章/模型/字数/按钮同一行同一条中线 */
.cw-var-actions {
  flex-shrink: 0;
  align-self: center;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
/* v4.57.2: 全文字数徽章 — 与爆款指数同规格的中性胶囊 */
.cw-var-chars {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  background: color-mix(in srgb, var(--text-2) 8%, transparent);
  border: 1px solid var(--border);
  white-space: nowrap;
}
/* v4.57: 竞稿评分徽章 + 作者模型 — 与按钮同一中线 (align-self:center 补 flex-start 头部) */
.cw-var-score {
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #b8860b;
  background: color-mix(in srgb, #d4a017 14%, transparent);
  border: 1px solid color-mix(in srgb, #d4a017 38%, transparent);
  white-space: nowrap;
}
.cw-var-score.hi {
  color: #e6a817;
  background: color-mix(in srgb, #d4a017 22%, transparent);
}
.cw-var-model {
  flex-shrink: 0;
  align-self: center;
  font-size: 11px;
  color: var(--text-dim, #8b93a7);
  white-space: nowrap;
}
.cw-block { padding: 10px 0 10px 14px; border-left: 2px solid var(--border); }
.cw-hook { border-left-color: var(--accent); }
.cw-cta { border-left-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.cw-block-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.cw-block-label .ic { width: 13px; height: 13px; color: var(--accent); }
.cw-hook-text { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.7; }
.cw-voice-text {
  font-size: 13.5px !important;
  color: var(--text) !important;
  line-height: 1.9 !important;
  white-space: pre-wrap;
}
.cw-block:not(.cw-hook) .cw-block-text { font-size: 13px; color: var(--text-2); line-height: 1.8; }
/* v4.21.3: 口播正文可编辑 — 直接在成稿上改字重写 */
.cw-voice-text[contenteditable="true"] {
  outline: none;
  border-radius: 8px;
  padding: 8px 10px;
  margin: -8px -10px;
  border: 1px dashed transparent;
  transition: border-color .15s, background .15s;
  min-height: 1.9em;
}
.cw-voice-text[contenteditable="true"]:hover { border-color: var(--border); }
.cw-voice-text[contenteditable="true"]:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.cw-voice-edit-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 6px;
}
.cw-voice-edit-hint .ic { width: 12px; height: 12px; }

/* v4.21.2: 第 6 步分块胶囊 (仿写底稿 / 仿写历史) */
.cw-seg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  margin: 0 0 16px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.cw-seg-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.cw-seg-item .ic { width: 14px; height: 14px; }
.cw-seg-item:hover { color: var(--text-1); background: var(--bg-3); }
.cw-seg-item.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}
.cw-hist-count {
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cw-seg-item.active .cw-hist-count {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}
.cw-hist-count:empty { display: none; }

/* 仿写历史面板 */
.cw-hist-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 0;
  font-size: 13px;
}
.cw-hist-head .ic { width: 16px; height: 16px; color: var(--accent); }
.cw-hist-head b { font-size: 13.5px; }
.cw-hist-sub { font-size: 11.5px; color: var(--text-3); }
.cw-hist-body { margin-top: 12px; }

/* v4.23: 仿写底稿自定义下拉 — 每行带删除按钮, 删除即风格学习 */
.cw-source-dd { position: relative; flex: 1; min-width: 240px; }
.cw-source-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}
.cw-source-trigger #cw-source-label { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cw-source-chev { width: 14px; height: 14px; flex-shrink: 0; color: var(--text-3); }
.cw-source-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 900;
  max-height: 320px;
  overflow: auto;
  /* v4.23.1: 主题 --bg-2 是 62% 透明 (line 3621 覆盖), 会透出底下的文本框 — 面板必须实色 */
  background: #161a23;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  padding: 6px;
}
.cw-src-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-1);
}
.cw-src-row:hover { background: var(--bg-3); }
.cw-src-row.active {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.cw-src-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-src-novoice { color: var(--text-3); font-size: 11px; flex-shrink: 0; }
.cw-src-del { flex-shrink: 0; }
.cw-src-empty { padding: 14px; text-align: center; color: var(--text-3); font-size: 12.5px; }
/* v4.28.1: 毛玻璃 .card 的 backdrop-filter 各自成层叠上下文, 下拉展开时抬高所在卡, 防止被下面的卡盖住 */
.cw-card.cw-dd-open { position: relative; z-index: 5; }

/* v4.24: 抖音板块 */
.dy-pane { margin-top: 4px; }
.dy-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.dy-status-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.dy-status-head { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.dy-status-desc { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.7; }
.dy-parsed-list { max-height: 420px; overflow: auto; }
.dy-import-status { margin-top: 12px; }
.dy-import-bar {
  height: 6px;
  background: var(--bg-1, #1a1f2c);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.dy-import-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #10b981);
  border-radius: 4px;
  transition: width .4s;
}
.dy-import-fill.done { background: #10b981; }
.dy-import-status.error .dy-import-fill { background: #ef4444; }
.dy-hot-list { max-height: 460px; overflow: auto; }
.dy-creator-tb {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.dy-creator-tb th, .dy-creator-tb td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dy-creator-tb th { color: var(--text-3); font-weight: 600; font-size: 11.5px; }
.dy-creator-tb tr.dy-top td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
@media (max-width: 980px) {
  .dy-status-grid { grid-template-columns: 1fr; }
}

/* ================= v4.26: 第 8 步 AI 技能板块 ================= */
.sk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.sk-card {
  background: var(--bg-2, #161a23);
  border: 1px solid var(--line, rgba(255,255,255,.08));
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
  min-width: 0;
}
.sk-card:hover { border-color: rgba(120,200,255,.45); }
.sk-card.sel {
  border-color: var(--accent, #5cc8ff);
  box-shadow: 0 0 0 1px var(--accent, #5cc8ff) inset;
}
.sk-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1, #eef2f8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sk-card-id {
  font-size: 11px;
  color: var(--accent, #5cc8ff);
  margin-top: 3px;
  font-family: ui-monospace, Menlo, monospace;
}
.sk-card-desc {
  font-size: 12px;
  color: var(--text-3, #8a93a6);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sk-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-2, #161a23);
  border: 1px solid var(--line, rgba(255,255,255,.08));
  border-radius: 10px;
  color: var(--text-1, #eef2f8);
  font-size: 13px;
  line-height: 1.6;
  padding: 12px 14px;
  resize: vertical;
}
.sk-input:focus { outline: none; border-color: var(--accent, #5cc8ff); }
.sk-input-sm {
  height: 38px;
  box-sizing: border-box;
  background: var(--bg-2, #161a23);
  border: 1px solid var(--line, rgba(255,255,255,.08));
  border-radius: 10px;
  color: var(--text-1, #eef2f8);
  font-size: 13px;
  padding: 0 12px;
}
.sk-input-sm:focus { outline: none; border-color: var(--accent, #5cc8ff); }
.sk-result {
  margin: 10px 0 0;
  padding: 14px 16px;
  background: var(--bg-2, #161a23);
  border: 1px solid var(--line, rgba(255,255,255,.08));
  border-radius: 10px;
  color: var(--text-1, #eef2f8);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow: auto;
  font-family: inherit;
}
.sk-history { display: flex; flex-direction: column; gap: 8px; }
.sk-hist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  background: var(--bg-2, #161a23);
  border: 1px solid var(--line, rgba(255,255,255,.08));
  border-radius: 9px;
  cursor: pointer;
  min-width: 0;
}
.sk-hist-item:hover { border-color: rgba(120,200,255,.45); }
.sk-hist-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent, #5cc8ff);
  white-space: nowrap;
  flex-shrink: 0;
}
.sk-hist-text {
  font-size: 12.5px;
  color: var(--text-2, #b8c1d1);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sk-hist-ts {
  font-size: 11.5px;
  color: var(--text-3, #8a93a6);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============ v1.0 随拍随剪 profile (FANHUA_PROFILE=suipai) ============
   同一份代码的子体身份: 只保留 收料(相机直传)→精选素材→分析→剪辑→导出。
   DOM 全保留, 仅 display 裁剪 + tab 重排(JS); 母体 (无 data-profile) 零影响。
   注意: tab 的隐藏用 JS 加的 .sp-hidden class — 不能按 data-step 匹配,
   因为 profile JS 会把收料 tab 的 data-step 重写为 1。 */
html[data-profile="suipai"] .step.sp-hidden { display: none !important; }

html[data-profile="suipai"] #step1,
html[data-profile="suipai"] #step6,
html[data-profile="suipai"] #step7,
html[data-profile="suipai"] #step8,
html[data-profile="suipai"] #step10,
html[data-profile="suipai"] #step11 { display: none !important; }

/* ============ v4.39.3 知识库六大分类胶囊 ============ */
.kb-cat-pill {
  display: inline-flex; align-items: center;
  padding: 4px 14px; border-radius: 999px;
  border: 1px solid rgba(53,208,186,.30);
  background: transparent; color: var(--text-2);
  font-size: 12px; line-height: 1.4; cursor: pointer;
  transition: all .15s ease; user-select: none;
}
.kb-cat-pill:hover { border-color: rgba(53,208,186,.65); color: var(--text-1); }
.kb-cat-pill.active {
  background: var(--accent); border-color: var(--accent);
  color: #04121f; font-weight: 600;
}

/* ============ v4.39.4 emoji→SVG 矢量图标: 旋转 loader / 内联尺寸 ============ */
.ic-spin { animation: ic-spin .9s linear infinite; }
@keyframes ic-spin { to { transform: rotate(360deg); } }
.upi-icon .ic { width: 1em; height: 1em; vertical-align: -0.12em; }

/* ================================================================== */
/* ==== v4.41.0: 人性化打磨 (Design Engineering) — 动效与细节 ==== */
/* ================================================================== */
/* 原则: 动效 <300ms / 入场 ease-out / 只动 transform+opacity / 可中断用 transition */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-inout: cubic-bezier(0.77, 0, 0.175, 1);
}

/* —— 按钮: 按压即回应 —— */
.btn,
.step-indicator.step-tabs .step,
.style-del-btn,
.lib-close-btn {
  transition: transform 150ms var(--ease-out), background-color 150ms ease,
    border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, opacity 150ms ease;
}
.btn:active:not(:disabled),
.step-indicator.step-tabs .step:active,
.lib-close-btn:active {
  transform: scale(0.97);
}

/* —— 面板切换: 快而稳 (0.3s→0.24s, 自定义 ease-out) —— */
.step-section.active {
  animation: fade 0.24s var(--ease-out);
}

/* —— 弹窗入场: 从 scale(.96) 淡入, 不从零开始 —— */
.lib-modal-card:not(.cyber-confirm-card) {
  animation: modal-in 0.22s var(--ease-out);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.lib-modal-backdrop {
  animation: backdrop-in 0.2s ease;
}
@keyframes backdrop-in {
  from { opacity: 0; }
}

/* —— toast: 更跟手 —— */
.toast { transition: transform 0.22s var(--ease-out), opacity 0.22s ease; }

/* —— 键盘可达性: 焦点环 —— */
:focus-visible {
  outline: 2px solid rgba(0, 240, 255, .6);
  outline-offset: 2px;
}

/* —— 触屏关掉 hover 位移, 防点按误触发 —— */
@media (hover: none) {
  .step-indicator.step-tabs .step:hover { transform: none; }
}

/* —— 减弱动态: 去位移留透明度 (不是归零) —— */
@media (prefers-reduced-motion: reduce) {
  .step-section.active { animation: fade-soft 0.2s ease; }
  .lib-modal-card:not(.cyber-confirm-card) { animation: fade-soft 0.2s ease; }
  .lib-modal-backdrop { animation: fade-soft 0.2s ease; }
  .btn:active:not(:disabled),
  .step-indicator.step-tabs .step:active,
  .lib-close-btn:active { transform: none; }
}
@keyframes fade-soft {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ================================================================== */
/* ==== v4.42.1: 顶部步骤导航排版重做 — 数字与文字同一中线, 不折字 ==== */
/* 原问题: 11 个胶囊挤一行, flex 压缩导致文字在胶囊内断成 2~4 行, 数字夹在中间 */
/* ================================================================== */
header .step-indicator.step-tabs {
  flex: 1 1 100%;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 7px;
  padding-top: 2px;
}
.step-indicator.step-tabs .step {
  flex: 0 0 auto;                 /* 胶囊整体不压缩, 放不下就整块换行 */
  min-height: 30px;
  padding: 5px 10px;
  gap: 5px;
  border-radius: 15px;
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
}
.step-indicator.step-tabs .step > span {
  width: 17px; height: 17px; flex: none;
  font-size: 10px; line-height: 1;
}
.step-indicator.step-tabs .step-txt {
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
/* 窄屏: 保持单行不折字, 允许整条导航横向滚动而不是挤爆 */
@media (max-width: 720px) {
  header .step-indicator.step-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 240, 255, .22) transparent;
  }
  header .step-indicator.step-tabs::-webkit-scrollbar { height: 5px; }
  header .step-indicator.step-tabs::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, .25); border-radius: 3px; }
}

/* v4.42.1b: 中等宽度时两行均衡 (6+5), 避免出现「9 个 + 2 个小尾巴」 */
@media (min-width: 721px) and (max-width: 1220px) {
  header .step-indicator.step-tabs {
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ===== v4.45.0: 素材库选择器「选文件夹」模式 ===== */
#src-pick-dir-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.25) inset;
}
.src-dir-item { position: relative; }
.src-dir-item > .sgi-check { z-index: 2; }
.src-dir-item.selected { border-color: var(--accent); }

/* ===== v4.45.1: 剪辑设置「剪辑效果」使用开关 ===== */
.ed-eff-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-eff-switch {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: auto; cursor: pointer; user-select: none;
}
.ed-eff-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ed-eff-track {
  width: 34px; height: 18px; border-radius: 10px; flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22);
  position: relative; transition: background 0.18s, border-color 0.18s;
}
.ed-eff-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #cfd8e3; transition: transform 0.18s, background 0.18s;
}
.ed-eff-switch input:checked + .ed-eff-track { background: rgba(0, 240, 255, 0.35); border-color: var(--accent); }
.ed-eff-switch input:checked + .ed-eff-track::after { transform: translateX(16px); background: var(--accent); }
.ed-eff-switch input:focus-visible + .ed-eff-track { outline: 2px solid rgba(0, 240, 255, 0.5); outline-offset: 1px; }
.ed-eff-text { font-size: 12px; color: var(--text-2); white-space: nowrap; }
/* 关闭态: 效果卡/出片按钮/素材起点整块变暗且不可点, 标题与开关保持可读 */
.ed-preset-section.eff-off .ed-preset-cards,
.ed-preset-section.eff-off .ed-preset-actions,
.ed-preset-section.eff-off .ed-src-brief { opacity: 0.45; }
.ed-preset-section.eff-off .ed-preset-cards { pointer-events: none; }
.ed-btn:disabled, .ed-sel:disabled { opacity: 0.45; cursor: not-allowed; }

/* ===== v4.47.0: 智能画面查重横幅 ===== */
.scene-check-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; margin: 0 0 10px;
  border-radius: 10px; font-size: 13px; line-height: 1.5;
  grid-area: banner;
}
/* hidden 属性必须真正生效 — display:flex 会覆盖 UA 的 display:none (v4.54.3) */
.scene-check-banner[hidden] { display: none !important; }
.scene-check-banner.sc-ok {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
}
.scene-check-banner.sc-warn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}

/* ===== v4.48.0: 素材卡「吸睛度」徽章 — 与 AI 语义徽章同宽同距, 冷/暖色区分 ===== */
.appeal-badge {
  margin-top: 6px; font-size: 11px; line-height: 1.5;
  display: flex; align-items: center; gap: 4px;
  border-radius: 8px; padding: 3px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appeal-badge .ic { width: 12px; height: 12px; flex: 0 0 auto; }
.appeal-badge.appeal-high {
  color: #fbbf24; background: rgba(245, 158, 11, .12);
  border: 1px solid rgba(245, 158, 11, .45);
}
.appeal-badge.appeal-mid {
  color: #67e8f9; background: rgba(6, 182, 212, .1);
  border: 1px solid rgba(6, 182, 212, .3);
}
.appeal-badge.appeal-low {
  color: #9ca3af; background: rgba(156, 163, 175, .08);
  border: 1px solid rgba(156, 163, 175, .25);
}

/* ===== v4.51 AI 分析模型选择卡片 ===== */
.ai-provider-row { display: flex; gap: 10px; margin: 6px 0 2px; }
.ai-prov {
  flex: 1 1 0; min-width: 0; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px;
  padding: 12px 14px; border-radius: 9px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12);
  color: var(--text-1); font-family: inherit;
  transition: background .18s, border-color .18s;
}
.ai-prov:hover { background: rgba(0,240,255,.08); border-color: rgba(0,240,255,.4); }
.ai-prov.active { background: rgba(0,240,255,.12); border-color: #00f0ff; box-shadow: inset 0 0 0 1px rgba(0,240,255,.25); }
.ai-prov b { font-size: 13px; font-weight: 700; color: var(--text-1); line-height: 1.3; }
.ai-prov.active b { color: #00d8e8; }
.ai-prov em { font-size: 10.5px; font-style: normal; color: var(--text-2); line-height: 1.45; }

/* v4.58.2: 提取工作台 文案/BGM 分类切换胶囊 */
.le-kind-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.le-kind-tab:hover { color: var(--text-1); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.le-kind-tab.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

/* ============ v4.48.8: 免费额度导航台弹窗 ============ */
.fh-zone-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--text-1);
  margin: 2px 0 10px;
}
.fh-zone-title .ic { width: 15px; height: 15px; color: var(--accent); }
.fh-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.fh-card {
  background: #141a28;                 /* 实色, 不用透明变量 */
  border: 1px solid #2a3446;
  border-radius: 12px;
  padding: 12px 12px 10px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
  transition: border-color .18s, box-shadow .18s;
}
.fh-card.fh-cur {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent);
}
.fh-card.fh-used { opacity: .55; }
.fh-card-top { display: flex; align-items: center; gap: 8px; }
.fh-logo {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 800;
}
.fh-name { font-size: 13.5px; font-weight: 700; color: var(--text-1); flex: 1; }
.fh-first {
  font-size: 10px; font-weight: 700; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 999px; padding: 1px 8px; flex-shrink: 0;
}
.fh-used-tag {
  font-size: 10px; font-weight: 700; color: #9aa3b5;
  background: #1c2434; border-radius: 999px; padding: 1px 8px; flex-shrink: 0;
  display: none; align-items: center; gap: 4px;
}
.fh-card.fh-used .fh-used-tag { display: inline-flex; }
.fh-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.fh-badge {
  font-size: 11px; color: var(--text-2); background: #1c2434;
  border-radius: 6px; padding: 2px 8px; white-space: nowrap;
}
.fh-badge.fh-ok { color: #4ade80; background: rgba(26,158,108,.14); }
.fh-note { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.fh-acts { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.fh-acts .fh-go { flex: 1; justify-content: center; }
.fh-acts .btn { margin: 0; }

/* ============ v4.48.9: 提示词生成弹窗 ============ */
.pgen-chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.pgen-chip {
  display: inline-flex; align-items: center;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-2); background: #1c2434;
  border: 1px solid #2a3446; border-radius: 999px;
  padding: 5px 14px; cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.pgen-chip:hover { color: var(--text-1); border-color: var(--accent); }
.pgen-chip.pgen-on {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: var(--accent);
}
.pgen-result {
  margin: 0; padding: 12px 14px;
  background: #141a28;                /* 实色深底, 不用透明变量 */
  border: 1px solid #2a3446; border-radius: 10px;
  color: var(--text-1); font-size: 12.5px; line-height: 1.7;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  white-space: pre-wrap; word-break: break-all;
  max-height: 260px; overflow: auto;
}
#pgen-text.input {
  background: #141a28; border: 1px solid #2a3446;
  color: var(--text-1); border-radius: 10px; padding: 10px 12px;
  font-size: 13px; line-height: 1.6;
}

/* ============ v4.48.10: 配置向导弹窗 ============ */
.su-statusbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.su-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600;
  color: var(--text-3); background: #1c2434;
  border: 1px solid #2a3446; border-radius: 999px;
  padding: 3px 12px; white-space: nowrap;
}
.su-chip.su-ok { color: #4ade80; background: rgba(26,158,108,.14); border-color: rgba(26,158,108,.4); }
.su-chip.su-miss { color: #f0a13c; background: rgba(240,161,60,.12); border-color: rgba(240,161,60,.35); }
.su-card {
  background: #141a28; border: 1px solid #2a3446;
  border-radius: 12px; padding: 14px 16px;
  margin-bottom: 12px;
}
.su-card-title {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13.5px; font-weight: 700; color: var(--text-1);
  margin-bottom: 10px;
}
.su-card-title em { font-size: 11.5px; font-weight: 400; color: var(--text-3); font-style: normal; }
.su-must, .su-opt {
  font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 8px; flex-shrink: 0;
}
.su-must { color: #f87171; background: rgba(248,113,113,.14); }
.su-opt { color: #9aa3b5; background: #1c2434; }
.su-steps { margin: 0 0 10px; padding-left: 20px; }
.su-steps li { font-size: 12.5px; color: var(--text-2); line-height: 1.8; }
.su-steps a { color: var(--accent); text-decoration: none; }
.su-steps a:hover { text-decoration: underline; }
.su-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.su-fields { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.su-fields-row { display: flex; gap: 8px; flex-wrap: wrap; }
.su-fields .input {
  background: #1c2434; border: 1px solid #2a3446;
  color: var(--text-1); border-radius: 8px;
  padding: 8px 10px; font-size: 12.5px; width: 100%;
}
.su-fields-row .input { flex: 1; min-width: 180px; width: auto; }
