/* =========================================================================
 * 爆款文案捕手 · H5 样式
 * 视觉基调：米白编辑风 / 赤陶橙强调 / 细边框卡片 / 舒适留白
 * 纯静态、无外部字体与图片依赖，全部图标内联 SVG。
 * ========================================================================= */

/* ------------------------------- 变量与基础 ------------------------------- */
:root {
  --bg: #faf8f5;
  --bg-soft: #f6f1ea;
  --card: #ffffff;
  --ink: #1f2328;
  --ink-soft: #3f3a35;
  --muted: #6b7280;
  --muted-2: #9a9188;
  --line: #ece7e1;
  --line-strong: #e2dbd2;
  --accent: #e4572e;
  --accent-deep: #c2410c;
  --accent-soft: rgba(228, 87, 46, .10);
  --teal: #0f766e;
  --teal-soft: rgba(15, 118, 110, .10);
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, .08);
  --green: #15803d;
  --green-soft: rgba(21, 128, 61, .10);
  --red: #dc2626;
  --red-soft: rgba(220, 38, 38, .09);
  --amber: #b45309;
  --amber-soft: rgba(180, 83, 9, .10);
  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(31, 35, 40, .04), 0 1px 1px rgba(31, 35, 40, .02);
  --shadow-md: 0 1px 2px rgba(31, 35, 40, .04), 0 20px 44px -34px rgba(31, 35, 40, .30);
  --shadow-lg: 0 24px 70px -34px rgba(31, 35, 40, .42);
  --font: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(228, 87, 46, .055), transparent 62%),
    radial-gradient(900px 480px at -8% 108%, rgba(15, 118, 110, .045), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }
a { color: var(--accent-deep); }
::selection { background: rgba(228, 87, 46, .20); }

:focus-visible {
  outline: 2px solid rgba(228, 87, 46, .55);
  outline-offset: 2px;
}

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: -3px;
}
.icon-logo { width: 22px; height: 22px; stroke-width: 2.2; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* 细化滚动条 */
* { scrollbar-width: thin; scrollbar-color: #ddd3c8 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e3dad0; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #d2c6b8; background-clip: padding-box; border: 2px solid transparent; }

/* ------------------------------- 应用骨架 ------------------------------- */
.app {
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ------------------------------- 顶栏 ------------------------------- */
.topbar {
  flex: none;
  min-height: 68px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, .84);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 30;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(150deg, #f0805a 0%, #e4572e 48%, #bf3f14 100%);
  box-shadow: 0 8px 18px -10px rgba(194, 65, 12, .85), inset 0 1px 0 rgba(255, 255, 255, .28);
}

.brand-copy { min-width: 0; }

.brand-title-line { display: flex; align-items: center; gap: 8px; }

.brand-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .4px;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
}

.badge-mock {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .6px;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid rgba(15, 118, 110, .25);
  padding: 2px 7px;
  border-radius: 999px;
  position: relative;
  top: -1px;
  flex: none;
}

.brand-sub {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  letter-spacing: .3px;
  color: var(--muted);
  white-space: nowrap;
}

.brand-en {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.7px;
  color: #bdae9f;
  text-transform: uppercase;
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
}

/* 统计 chips */
.stat-chips { display: flex; align-items: center; gap: 8px; flex: none; }

.stat-chip {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.stat-value {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
}

.stat-label { font-size: 11px; color: var(--muted); }

.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
  position: relative;
  top: -1px;
}
.stat-dot.is-accent { background: var(--accent); }
.stat-dot.is-teal { background: var(--teal); }
.stat-dot.is-live { background: var(--accent); animation: softPulse 1.8s ease-in-out infinite; }

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

/* 搜索框 */
.search-field { position: relative; display: flex; align-items: center; }
.search-field > .icon {
  position: absolute;
  left: 11px;
  color: #a8a29e;
  pointer-events: none;
}
.search-field input {
  width: 238px;
  height: 38px;
  padding: 0 38px 0 34px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: #fffdfb;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
  -webkit-appearance: none;
  appearance: none;
}
.search-field input::placeholder { color: #a8a29e; }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-field input:hover { border-color: #d8cec2; }
.search-field input:focus {
  background: #fff;
  border-color: rgba(228, 87, 46, .55);
  box-shadow: 0 0 0 3px rgba(228, 87, 46, .12);
}
.search-field kbd {
  position: absolute;
  right: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  font-family: inherit;
  font-size: 10.5px;
  color: #a8a29e;
  background: #faf7f3;
  border: 1px solid var(--line);
  border-radius: 5px;
  pointer-events: none;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .06s ease, box-shadow .16s ease;
}
.btn:hover { background: #fbf8f4; border-color: #d9cec1; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn .icon { width: 16px; height: 16px; }

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #ea6033 0%, #e0501f 100%);
  border-color: #cf4a20;
  box-shadow: 0 1px 2px rgba(194, 65, 12, .28), 0 10px 22px -16px rgba(194, 65, 12, .9);
}
.btn-primary:hover {
  color: #fff;
  background: linear-gradient(180deg, #e15a2b 0%, #d34718 100%);
  border-color: #b8421a;
}

.btn-ghost { background: #fff; }
.btn-ghost:hover { background: #fbf8f4; }

.btn-sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 8px; }
.btn-sm .icon { width: 14px; height: 14px; }
.btn-xs { height: 25px; padding: 0 9px; font-size: 11px; border-radius: 7px; gap: 5px; }
.btn-xs .icon { width: 12px; height: 12px; }

.btn-chip {
  height: 32px;
  padding: 0 11px;
  font-size: 12px;
  border-radius: 8px;
  gap: 6px;
}
.btn-chip .chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c9c0b6;
  transition: background .16s ease;
}
.btn-chip.is-on {
  background: var(--accent-soft);
  border-color: rgba(228, 87, 46, .32);
  color: var(--accent-deep);
  font-weight: 600;
}
.btn-chip.is-on .chip-dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(228, 87, 46, .14); }

.btn-danger { color: #fff; background: #dc2626; border-color: #c11f1f; }
.btn-danger:hover { color: #fff; background: #c81f1f; border-color: #a91b1b; }
.btn-danger-ghost { color: var(--red); border-color: rgba(220, 38, 38, .26); background: #fff; }
.btn-danger-ghost:hover { color: #b91c1c; border-color: rgba(220, 38, 38, .42); background: #fef6f6; }

.btn-ai {
  color: var(--accent-deep);
  background: linear-gradient(180deg, #fff8f3, #fdf1e9);
  border-color: rgba(228, 87, 46, .30);
  font-weight: 600;
}
.btn-ai:hover {
  color: var(--accent-deep);
  background: linear-gradient(180deg, #fff4ec, #fcebdf);
  border-color: rgba(228, 87, 46, .48);
}
.btn-ai .icon { color: var(--accent); }

.btn-spinner {
  width: 14px;
  height: 14px;
  flex: none;
  display: inline-block;
  border-radius: 50%;
  border: 2px solid rgba(31, 35, 40, .16);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
.btn-primary .btn-spinner { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }

.icon-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.icon-btn:hover { background: #f5f0ea; color: var(--ink); }
.icon-btn .icon { width: 16px; height: 16px; }

/* ------------------------------- 工作区布局 ------------------------------- */
.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 372px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 24px 0;
}

/* ------------------------------- 左侧列表 ------------------------------- */
.sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.sidebar-head {
  flex: none;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #f4efe9;
}

.filter-tabs {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 2px;
  padding: 3px;
  background: #f4efe9;
  border-radius: 10px;
}

.filter-tab {
  flex: 1;
  height: 30px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.filter-tab:hover { color: var(--ink); }
.filter-tab.is-active {
  background: #fff;
  color: var(--accent-deep);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(31, 35, 40, .09);
}
.filter-tab .tab-count {
  font-size: 10.5px;
  font-weight: 500;
  color: #9a9188;
  background: rgba(31, 35, 40, .06);
  border-radius: 999px;
  padding: 0 5px;
  min-width: 17px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.filter-tab.is-active .tab-count { color: var(--accent-deep); background: var(--accent-soft); }

/* 开关 */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
  flex: none;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 30px;
  height: 18px;
  padding: 2px;
  border-radius: 999px;
  background: #e4dbd1;
  transition: background .18s ease;
  display: block;
}
.switch-thumb {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 35, 40, .28);
  transition: transform .18s ease;
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(12px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(228, 87, 46, .22); }
.switch-label { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* 列表 */
.video-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-gutter: stable;
}

.video-card {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 22px 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.video-card:hover { background: #faf8f4; }
.video-card.is-active {
  background: linear-gradient(0deg, rgba(228, 87, 46, .055), rgba(228, 87, 46, .055));
  border-color: rgba(228, 87, 46, .22);
}
.video-card.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.video-card:focus-visible { outline-offset: 1px; }

.card-index {
  font-family: var(--mono);
  font-size: 11px;
  color: #b3a99e;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.video-card.is-active .card-index { color: var(--accent-deep); font-weight: 600; }

.thumb {
  position: relative;
  width: 56px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #4a443d, #6e6257);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 20% 0%, rgba(255, 255, 255, .18), transparent 55%);
}
.thumb .thumb-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, .62);
}
.thumb-tone-1 { background: linear-gradient(135deg, #403a34, #6c5d4f); }
.thumb-tone-2 { background: linear-gradient(135deg, #a8461f, #dd855c); }
.thumb-tone-3 { background: linear-gradient(135deg, #174a45, #3c7b70); }
.thumb-tone-4 { background: linear-gradient(135deg, #2c3747, #5a687c); }
.thumb-tone-5 { background: linear-gradient(135deg, #6f4f1e, #b4873c); }
.thumb.is-processing { filter: saturate(.85); }
.thumb.is-error { filter: grayscale(.75) opacity(.85); }

.thumb-badge {
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .92);
  background: rgba(15, 18, 22, .55);
  border-radius: 4px;
  padding: 0 3px;
  letter-spacing: .2px;
}

.card-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-sub {
  font-size: 10.5px;
  color: var(--muted-2);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: .1px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted-2);
  min-width: 0;
  flex-wrap: wrap;
  row-gap: 3px;
}
.card-meta .meta-dot { width: 2px; height: 2px; border-radius: 50%; background: #cfc6bb; flex: none; }
.card-meta .meta-words { color: #8a8177; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  line-height: 1;
  font-weight: 500;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill.is-done { color: #19734a; background: rgba(21, 128, 61, .08); border-color: rgba(21, 128, 61, .16); }
.pill.is-processing { color: #1d4ed8; background: rgba(37, 99, 235, .08); border-color: rgba(37, 99, 235, .18); }
.pill.is-pending { color: #a16207; background: rgba(161, 98, 7, .09); border-color: rgba(161, 98, 7, .18); }
.pill.is-error { color: #b91c1c; background: rgba(220, 38, 38, .08); border-color: rgba(220, 38, 38, .18); }
.pill .pill-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.is-processing .pill-dot { animation: softPulse 1.6s ease-in-out infinite; }

.dup-flag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 5px;
  padding: 2px 5px;
  white-space: nowrap;
}

.progress-row { display: flex; align-items: center; gap: 7px; margin-top: 4px; }
.progress-track {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: #f0e9e1;
  overflow: hidden;
  min-width: 0;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #e4572e, #ef9a63);
  transition: width .35s ease;
}
.progress-pct {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
  flex: none;
}

.card-note {
  margin-top: 3px;
  font-size: 10.5px;
  color: #b91c1c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 重复项折叠行 */
.dup-row {
  width: calc(100% - 16px);
  margin: 1px 8px 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px dashed #e8ddd1;
  border-radius: 9px;
  background: #faf7f3;
  color: var(--muted);
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, border-color .15s ease;
}
.dup-row:hover { background: #fffaf5; border-color: rgba(228, 87, 46, .38); }
.dup-row .icon { width: 14px; height: 14px; color: var(--accent); flex: none; }
.dup-row-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dup-row-text b { color: var(--accent-deep); font-weight: 600; }
.dup-row-name { color: #8a8177; }
.dup-row-meta { margin-left: auto; flex: none; font-size: 10.5px; color: #a89f95; font-family: var(--mono); }

.list-empty {
  padding: 38px 20px;
  text-align: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.list-empty .empty-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #f6f1ea;
  color: #b8a99c;
}
.list-empty .empty-icon .icon { width: 22px; height: 22px; }
.list-empty h3 { font-size: 13.5px; color: var(--ink-soft); font-weight: 600; }
.list-empty p { font-size: 11.5px; line-height: 1.7; max-width: 230px; }

.list-foot {
  flex: none;
  padding: 9px 14px;
  border-top: 1px solid #f4efe9;
  background: #fdfcfa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted-2);
}
.list-foot b { color: var(--ink-soft); font-weight: 600; }
.list-foot .foot-right { font-family: var(--mono); font-size: 10.5px; white-space: nowrap; }

/* ------------------------------- 右侧详情 ------------------------------- */
.detail {
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 2px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-gutter: stable;
}

.detail-empty {
  margin: auto;
  max-width: 420px;
  padding: 44px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}
.detail-empty .empty-icon {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: #c0b2a4;
}
.detail-empty .empty-icon .icon { width: 28px; height: 28px; }
.detail-empty h2 { font-size: 16px; font-weight: 600; color: var(--ink); }
.detail-empty p { font-size: 12.5px; line-height: 1.8; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* 媒体卡片 */
.media-card {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: start;
  animation: fadeUp .32s ease both;
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #12161a;
  box-shadow: 0 18px 44px -30px rgba(15, 18, 22, .7), inset 0 0 0 1px rgba(255, 255, 255, .04);
}
.player-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0d1013;
}
.player-video[hidden] { display: none; }
.player-shell.is-ready .player-poster { display: none; }

.player-poster {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  background:
    radial-gradient(130% 160% at 12% -10%, #2c323b 0%, #191d23 46%, #0d1014 100%);
  isolation: isolate;
}
.player-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 52px);
  mask-image: radial-gradient(90% 90% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(90% 90% at 50% 40%, #000 30%, transparent 100%);
  z-index: -1;
}
.player-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 55% at 78% 96%, rgba(228, 87, 46, .20), transparent 70%);
  z-index: -1;
}

.poster-center { display: flex; flex-direction: column; align-items: center; gap: 11px; }

.poster-play {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(160deg, #f1805c, #d84a24);
  box-shadow: 0 12px 28px -10px rgba(228, 87, 46, .75), inset 0 1px 0 rgba(255, 255, 255, .30);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.poster-play .icon { width: 24px; height: 24px; margin-left: 3px; }
.poster-play:hover { transform: scale(1.06); box-shadow: 0 16px 34px -10px rgba(228, 87, 46, .85); }
.poster-play:active { transform: scale(.98); }

.poster-status-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .84);
}
.poster-status-icon .icon { width: 24px; height: 24px; }

.poster-caption {
  font-size: 11.5px;
  letter-spacing: .4px;
  color: rgba(255, 255, 255, .52);
  text-align: center;
  padding: 0 16px;
  line-height: 1.7;
}

.poster-tag {
  position: absolute;
  top: 12px;
  left: 13px;
  z-index: 2;
  font-size: 10px;
  letter-spacing: .6px;
  color: rgba(255, 255, 255, .78);
  background: rgba(18, 22, 26, .55);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  padding: 3px 7px;
  backdrop-filter: blur(4px);
}
.poster-bottom {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 11px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  font-size: 11px;
  color: rgba(255, 255, 255, .72);
}
.poster-filename {
  font-family: var(--mono);
  font-size: 10.5px;
  max-width: 64%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poster-timecode { font-family: var(--mono); font-size: 10.5px; color: rgba(255, 255, 255, .85); letter-spacing: .3px; flex: none; }

/* 媒体右侧信息 */
.media-info { min-width: 0; display: flex; flex-direction: column; height: 100%; }

.detail-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  min-height: 20px;
}
.detail-kicker .kicker-sep { width: 1px; height: 10px; background: var(--line-strong); }
.detail-kicker .kicker-muted { color: var(--muted-2); font-weight: 500; letter-spacing: .4px; text-transform: none; }

.media-title {
  margin: 8px 0 10px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .2px;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
  row-gap: 6px;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #57534e;
  background: #faf8f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.meta-pill .icon { width: 12px; height: 12px; color: #a8a29e; }
.meta-sep { width: 3px; height: 3px; border-radius: 50%; background: #d6ccc1; }

.path-block { margin-top: 15px; }
.path-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: #a89f95;
  text-transform: uppercase;
}
.path-warning {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #b91c1c;
  background: var(--red-soft);
  border-radius: 5px;
  padding: 2px 6px;
}
.path-value {
  margin-top: 6px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: #57534e;
  background: #faf8f5;
  border: 1px solid var(--line);
  border-radius: 9px;
  word-break: break-all;
  user-select: text;
  max-height: 54px;
  overflow-y: auto;
}
.path-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.path-actions .btn { height: 30px; font-size: 12px; }

.meta-source { font-size: 11px; color: var(--muted-2); }

.info-grid {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #f0e9e1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
}
.info-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.info-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: #a89f95;
  text-transform: uppercase;
}
.info-value {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.info-value.is-warn { color: #b91c1c; }

.media-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  flex-wrap: wrap;
}
.media-actions .spacer { flex: 1; }
.media-actions .btn { height: 32px; font-size: 12px; }

/* 处理中 / 失败 / 待处理状态卡 */
.status-card { padding: 24px 26px; display: flex; flex-direction: column; gap: 16px; animation: fadeUp .32s ease both; }
.status-top { display: flex; align-items: flex-start; gap: 16px; }
.status-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex: none;
}
.status-icon .icon { width: 22px; height: 22px; }
.status-icon.is-processing { color: #1d4ed8; background: rgba(37, 99, 235, .09); border: 1px solid rgba(37, 99, 235, .18); }
.status-icon.is-pending { color: #a16207; background: rgba(161, 98, 7, .09); border: 1px solid rgba(161, 98, 7, .18); }
.status-icon.is-error { color: #b91c1c; background: rgba(220, 38, 38, .08); border: 1px solid rgba(220, 38, 38, .18); }
.status-copy { min-width: 0; }
.status-copy h2 { font-size: 16px; font-weight: 650; letter-spacing: .2px; }
.status-copy p { margin-top: 6px; font-size: 12.5px; line-height: 1.8; color: var(--muted); max-width: 620px; }
.status-copy .status-error-msg {
  margin-top: 8px;
  padding: 9px 12px;
  font-size: 12px;
  color: #b91c1c;
  background: #fef6f6;
  border: 1px solid rgba(220, 38, 38, .18);
  border-radius: 9px;
  font-family: var(--mono);
  line-height: 1.6;
  word-break: break-all;
}
.big-progress { height: 8px; border-radius: 99px; background: #f0e9e1; overflow: hidden; }
.big-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transition: width .5s ease;
}
.status-meta { display: flex; align-items: center; gap: 14px; font-size: 11.5px; color: var(--muted-2); flex-wrap: wrap; }
.status-meta .mono { color: #1d4ed8; font-weight: 600; }
.status-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ------------------------------- 文案卡片 ------------------------------- */
.script-card {
  display: flex;
  flex-direction: column;
  animation: fadeUp .36s ease both;
}

.script-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 12px;
  border-bottom: 1px solid #f4efe9;
  flex-wrap: wrap;
}
.script-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .2px;
  color: var(--ink);
}
.script-stats { font-size: 11.5px; font-weight: 400; color: var(--muted-2); letter-spacing: 0; }
.script-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.script-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 20px;
  border-bottom: 1px solid #f8f3ed;
  font-size: 11px;
  color: #8a8177;
  flex-wrap: wrap;
  row-gap: 6px;
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend-swatch { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.legend-swatch.is-term { background: rgba(228, 87, 46, .18); box-shadow: inset 0 0 0 1px rgba(228, 87, 46, .30); }
.legend-swatch.is-num { background: var(--blue-soft); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .26); }
.legend-swatch.is-key { background: transparent; border-bottom: 1.5px dashed rgba(185, 28, 28, .55); border-radius: 0; height: 9px; }
.legend-hint { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: #a89f95; }
.legend-hint .icon { width: 12px; height: 12px; }

.script-body {
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 26px 30px;
}

.para {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  margin: 0 0 1.2em;
  padding: 5px 8px 5px 0;
  border-radius: 10px;
  scroll-margin-top: 20px;
  transition: background .3s ease, box-shadow .3s ease;
}
.para:last-child { margin-bottom: 0; }
.para.is-flash {
  background: rgba(228, 87, 46, .055);
  box-shadow: 0 0 0 9px rgba(228, 87, 46, .055);
}

.para-time {
  align-self: start;
  margin-top: 6px;
  width: 44px;
  height: 22px;
  padding: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  color: #a89f95;
  background: #faf8f5;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.para-time:hover { color: var(--accent-deep); background: #fff7f2; border-color: rgba(228, 87, 46, .40); }
.para.is-flash .para-time { color: #fff; background: var(--accent); border-color: var(--accent); }
.para-time.is-disabled { cursor: default; color: #c2b9ae; background: #faf8f5; }
.para-time.is-disabled:hover { color: #c2b9ae; background: #faf8f5; border-color: var(--line); }

.para-text {
  font-size: 18px;
  line-height: 1.9;
  letter-spacing: .18px;
  color: #24282e;
  font-weight: 400;
}

.para-tools {
  position: absolute;
  left: 0;
  top: 32px;
  width: 44px;
  display: flex;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s ease;
}
.para:hover .para-tools, .para:focus-within .para-tools { opacity: 1; }
.para-copy {
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--muted-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 4px;
  cursor: pointer;
  white-space: nowrap;
}
.para-copy:hover { color: var(--accent-deep); border-color: rgba(228, 87, 46, .38); }

/* 关键词三色高亮 */
.kw { border-radius: 4px; }
.kw-term {
  color: #9a3412;
  background: rgba(228, 87, 46, .13);
  font-weight: 600;
  padding: 0 .16em;
  box-shadow: inset 0 -1px 0 rgba(228, 87, 46, .16);
}
.kw-num {
  color: #1d4ed8;
  background: var(--blue-soft);
  font-weight: 600;
  padding: 0 .14em;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}
.kw-key {
  color: #b91c1c;
  font-weight: 500;
  text-decoration: underline dashed rgba(185, 28, 28, .52);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.seg-deleted {
  color: #a8a29e;
  text-decoration: line-through;
  text-decoration-color: rgba(168, 162, 158, .9);
  background: rgba(168, 162, 158, .10);
  border-radius: 3px;
}

.script-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.8;
}

/* 编辑模式 */
.editor { padding: 18px 22px 22px; max-width: 920px; }
.editor-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: #9a5b3a;
  background: #fff8f2;
  border: 1px solid #f3d9c8;
  border-radius: 10px;
  line-height: 1.6;
}
.editor-hint .icon { width: 15px; height: 15px; flex: none; color: #c2410c; }
.field { display: block; margin-top: 15px; }
.field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #a89f95;
  text-transform: uppercase;
}
.field input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: #fffdfb;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
}
.field textarea {
  width: 100%;
  min-height: 300px;
  padding: 15px 16px;
  font: inherit;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background: #fffdfb;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  border-color: rgba(228, 87, 46, .55);
  box-shadow: 0 0 0 3px rgba(228, 87, 46, .12);
  background: #fff;
}
.editor-actions { display: flex; align-items: center; gap: 9px; margin-top: 16px; flex-wrap: wrap; }
.editor-actions .spacer { flex: 1; }
.editor-actions .btn { height: 38px; }

/* 分句时间轴 */
.timeline {
  margin: 0 20px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fdfbf8;
}
.timeline-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  background: #faf7f2;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
}
.timeline-head .icon { color: var(--accent); width: 15px; height: 15px; }
.timeline-head .muted { font-size: 11px; font-weight: 400; }
.timeline-head .icon-btn { margin-left: auto; }
.timeline-list { max-height: 286px; overflow-y: auto; padding: 6px; }
.timeline-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 8px;
  transition: background .15s ease;
}
.timeline-row:hover { background: #fff; }
.timeline-row.is-active { background: rgba(228, 87, 46, .06); }
.seg-time {
  height: 24px;
  padding: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent-deep);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  line-height: 22px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.seg-time:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.seg-time.is-disabled { cursor: default; color: #b3a99e; }
.seg-time.is-disabled:hover { background: #fff; color: #b3a99e; border-color: var(--line); }
.seg-text {
  font-size: 12.5px;
  line-height: 1.6;
  color: #4b5563;
  min-width: 0;
}
.timeline-row.is-deleted .seg-text {
  color: #a8a29e;
  text-decoration: line-through;
  text-decoration-color: rgba(168, 162, 158, .9);
}
.timeline-row.is-deleted .seg-time { color: #b3a99e; }
.seg-actions { display: contents; }

/* ------------------------------- 上传区 ------------------------------- */
.upload-dock {
  flex: none;
  margin: 14px 24px 18px;
  padding: 13px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: padding .2s ease;
}
.dock-head { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }

.dock-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(228, 87, 46, .07);
  border: 1px dashed rgba(228, 87, 46, .38);
  flex: none;
  transition: width .2s ease, height .2s ease;
}
.dock-icon .icon { width: 19px; height: 19px; }

.dock-copy { min-width: 0; flex: 1; }
.dock-title { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); letter-spacing: .2px; }
.dock-sub { margin-top: 3px; font-size: 11.5px; color: var(--muted-2); line-height: 1.5; }
.dock-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.dock-actions .btn { height: 36px; font-size: 12.5px; }

.upload-dock.is-collapsed { padding: 9px 18px; }
.upload-dock.is-collapsed .dock-sub { display: none; }
.upload-dock.is-collapsed .dock-icon { width: 30px; height: 30px; border-radius: 9px; }
.upload-dock.is-collapsed .dock-icon .icon { width: 15px; height: 15px; }
.upload-dock.is-collapsed .dock-title { font-size: 12.5px; }
.upload-dock.is-collapsed .dock-actions .btn { height: 32px; }
.upload-dock.is-collapsed .dock-actions .btn-primary .icon { width: 14px; height: 14px; }

.upload-queue { display: flex; flex-direction: column; gap: 2px; border-top: 1px dashed #f0e8df; padding-top: 8px; }
.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 74px;
  align-items: center;
  gap: 12px;
  padding: 6px 2px;
  font-size: 11.5px;
}
.upload-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
}
.upload-row .progress-track { height: 5px; }
.upload-row .progress-fill.is-done { background: linear-gradient(90deg, #16a34a, #4ade80); }
.upload-row .progress-fill.is-error { background: linear-gradient(90deg, #dc2626, #f87171); }
.upload-status { font-size: 10.5px; text-align: right; color: var(--muted-2); font-family: var(--mono); }
.upload-status.is-done { color: var(--green); }
.upload-status.is-error { color: var(--red); }

/* 折叠状态保留的「粘贴链接下载」快捷入口 */
.dock-link-shortcut { display: none; }
.upload-dock.is-collapsed .dock-link { display: none; }
.upload-dock.is-collapsed .dock-link-shortcut { display: inline-flex; }

/* 链接下载行 */
.dock-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed #f0e8df;
}
.dock-link-tag {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--accent-deep);
  background: rgba(228, 87, 46, .07);
  border: 1px solid rgba(228, 87, 46, .16);
  border-radius: 8px;
}
.dock-link-tag .icon { width: 14px; height: 14px; }
.dock-link-field { flex: 1; min-width: 0; display: flex; }
.dock-link-field input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: #fffdfb;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.dock-link-field input::placeholder { color: #b0a79c; font-size: 12px; }
.dock-link-field input:hover { border-color: #d8cec2; }
.dock-link-field input:focus {
  background: #fff;
  border-color: rgba(228, 87, 46, .55);
  box-shadow: 0 0 0 3px rgba(228, 87, 46, .12);
}
.dock-link-field input:disabled { opacity: .65; background: #faf8f5; }
.btn-download { flex: none; min-width: 126px; height: 38px; font-size: 12.5px; }
.btn-download.is-loading { opacity: .9; }
.btn-download .btn-spinner { width: 13px; height: 13px; border-width: 2px; }

/* ------------------------------- 拖拽遮罩 ------------------------------- */
.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 35, 40, .34);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fadeIn .16s ease both;
}
.drop-card {
  width: min(560px, calc(100vw - 40px));
  padding: 42px 36px;
  text-align: center;
  background: #fffaf6;
  border: 2px dashed rgba(228, 87, 46, .55);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  animation: popIn .2s ease both;
}
.drop-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(160deg, #f0805a, #d84a24);
  box-shadow: 0 16px 32px -16px rgba(228, 87, 46, .8);
}
.drop-icon .icon { width: 32px; height: 32px; }
.drop-card h2 { font-size: 20px; font-weight: 700; letter-spacing: .5px; color: var(--ink); }
.drop-card p { margin-top: 10px; font-size: 12.5px; line-height: 1.9; color: var(--muted); }

/* ------------------------------- 弹窗 ------------------------------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 35, 40, .40);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn .16s ease both;
  padding: 20px;
}
.modal-card {
  width: 448px;
  max-width: 100%;
  padding: 24px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  animation: popIn .2s ease both;
}
.modal-head { display: flex; align-items: flex-start; gap: 12px; }
.modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: none;
  display: grid;
  place-items: center;
  color: #b91c1c;
  background: var(--red-soft);
  border: 1px solid rgba(220, 38, 38, .18);
}
.modal-icon .icon { width: 19px; height: 19px; }
.modal-head-copy { min-width: 0; padding-top: 1px; }
.modal-card h3 { font-size: 16px; font-weight: 650; letter-spacing: .2px; }
.modal-sub { margin-top: 5px; font-size: 12px; color: var(--muted-2); line-height: 1.6; }
.modal-body { margin-top: 16px; font-size: 12.5px; line-height: 1.85; color: var(--muted); }
.modal-target {
  margin-top: 12px;
  padding: 10px 12px;
  background: #faf8f5;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.modal-target .mt-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-target .mt-name {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-check {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}
.modal-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.modal-check .check-hint { font-size: 10.5px; color: var(--muted-2); }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.modal-foot .btn { height: 38px; }

/* --------------------------- AI 反写弹窗 --------------------------- */
.modal-card.is-wide {
  width: 720px;
  max-width: min(720px, calc(100vw - 40px));
  max-height: min(88vh, 860px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rewrite-head {
  flex: none;
  align-items: center;
  padding: 20px 24px 15px;
  border-bottom: 1px solid var(--line);
}
.rewrite-head .modal-icon.is-ai {
  color: #fff;
  background: linear-gradient(160deg, #f0805a, #d84a24);
  border: none;
  box-shadow: 0 8px 20px -10px rgba(228, 87, 46, .9);
}
.rewrite-head .icon-btn { margin-left: auto; flex: none; }

.rewrite-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 24px 6px;
}

.rewrite-section { margin-bottom: 16px; }
.rewrite-section:last-child { margin-bottom: 10px; }

.rewrite-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #a89f95;
}
.rewrite-label .rewrite-hint {
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0;
  color: #b3a99e;
  text-transform: none;
}
.rewrite-label .rewrite-meta {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0;
  color: #a89f95;
  font-family: var(--mono);
}

.opening-preview {
  position: relative;
  padding: 10px 14px 10px 36px;
  background: #faf7f3;
  border: 1px solid #f0e8df;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.8;
  color: #57534e;
  max-height: 108px;
  overflow-y: auto;
  white-space: pre-wrap;
}
.opening-preview::before {
  content: "\201C";
  position: absolute;
  left: 12px;
  top: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  line-height: 1;
  color: rgba(228, 87, 46, .38);
}
.opening-preview.is-empty { color: #b3a99e; font-style: italic; }

.mode-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.mode-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.mode-option input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.mode-option .mode-name { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); line-height: 1.4; padding-right: 12px; }
.mode-option .mode-desc { font-size: 10.5px; color: var(--muted-2); line-height: 1.5; }
.mode-option:hover { border-color: #d9cec1; background: #fdfbf8; }
.mode-option.is-active {
  border-color: rgba(228, 87, 46, .45);
  background: linear-gradient(180deg, #fff8f3, #fff4ec);
  box-shadow: 0 0 0 3px rgba(228, 87, 46, .08);
}
.mode-option.is-active .mode-name { color: var(--accent-deep); }
.mode-option.is-active::after {
  content: "\2713";
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.rewrite-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.rewrite-row .rewrite-label { margin-bottom: 0; }
.select-wrap { position: relative; min-width: 190px; flex: none; }
.select-wrap select {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 12px;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink-soft);
  background: #fffdfb;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.select-wrap select:hover { border-color: #d8cec2; }
.select-wrap select:focus {
  border-color: rgba(228, 87, 46, .55);
  box-shadow: 0 0 0 3px rgba(228, 87, 46, .12);
}
.select-wrap select:disabled { opacity: .6; cursor: not-allowed; }
.select-wrap > .icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #a89f95;
  pointer-events: none;
}
.rewrite-row .rewrite-hint { font-size: 10.5px; color: #b3a99e; }

.rewrite-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.65;
  color: #b91c1c;
  background: #fef6f6;
  border: 1px solid rgba(220, 38, 38, .22);
  border-radius: 9px;
}
.rewrite-error .icon { width: 15px; height: 15px; margin-top: 1px; flex: none; }
.rewrite-error b { font-weight: 600; }

.rewrite-result-wrap {
  position: relative;
  min-height: 198px;
  background: #fffdfb;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
}
.rewrite-result {
  display: block;
  width: 100%;
  min-height: 198px;
  max-height: 320px;
  padding: 14px 16px;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink);
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  white-space: pre-wrap;
}
.rewrite-result[readonly] { cursor: text; }
.rewrite-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: #b3a99e;
  line-height: 1.7;
}
.rewrite-placeholder .icon { width: 22px; height: 22px; color: #d3c6b8; }
.rewrite-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 253, 251, .88);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: var(--accent-deep);
  font-size: 12.5px;
  letter-spacing: .3px;
}
.rewrite-loading .spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid rgba(228, 87, 46, .18);
  border-top-color: var(--accent);
  animation: spin .9s linear infinite;
}
.rewrite-loading .rewrite-loading-sub { font-size: 10.5px; color: #b3a99e; letter-spacing: 0; }

.rewrite-confirm {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: #9a5b3a;
  background: #fff8f2;
  border: 1px solid #f3d9c8;
  border-radius: 10px;
}
.rewrite-confirm .icon { width: 15px; height: 15px; flex: none; color: #c2410c; }
.rewrite-confirm .confirm-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }
.rewrite-confirm .confirm-actions .btn { height: 32px; font-size: 12px; }

.rewrite-foot {
  flex: none;
  margin-top: 0;
  padding: 13px 24px 17px;
  border-top: 1px solid var(--line);
  background: #fdfcfa;
  flex-wrap: wrap;
  gap: 8px;
}
.rewrite-foot .spacer { flex: 1; }
.rewrite-foot .btn { height: 38px; }
.rewrite-foot .btn-ai { font-weight: 600; }

.rewrite-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rewrite-meta-row .meta-chip {
  font-size: 10.5px;
  color: #8a8177;
  background: #f6f1ea;
  border-radius: 5px;
  padding: 2px 6px;
}

/* ------------------------------- Toast ------------------------------- */
.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 220;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-end;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 220px;
  max-width: 380px;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 11px;
  box-shadow: 0 16px 40px -20px rgba(31, 35, 40, .45);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  animation: toastIn .22s ease both;
  pointer-events: auto;
  cursor: pointer;
}
.toast .icon { width: 16px; height: 16px; margin-top: 1px; flex: none; }
.toast.is-success { border-left-color: var(--green); }
.toast.is-success .icon { color: var(--green); }
.toast.is-error { border-left-color: var(--red); }
.toast.is-error .icon { color: var(--red); }
.toast.is-info { border-left-color: var(--teal); }
.toast.is-info .icon { color: var(--teal); }
.toast.is-leaving { animation: toastOut .2s ease both; }

/* ------------------------------- 动画 ------------------------------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: scale(.97) translateY(4px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes softPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(6px); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================================
 * 响应式：中等宽度
 * ========================================================================= */
@media (max-width: 1400px) {
  .brand-en { display: none; }
  .search-field input { width: 210px; }
  .workspace { grid-template-columns: 348px minmax(0, 1fr); }
  .media-card { grid-template-columns: minmax(0, 1.18fr) minmax(280px, 1fr); }
}

@media (max-width: 1180px) {
  .topbar { gap: 14px; }
  .stat-chip { padding: 5px 9px; }
  .stat-label { font-size: 10.5px; }
  .brand-title { font-size: 18px; }
  .search-field input { width: 180px; }
  .workspace { grid-template-columns: 328px minmax(0, 1fr); gap: 14px; padding: 14px 18px 0; }
  .upload-dock { margin: 12px 18px 16px; }
  .media-card { grid-template-columns: 1fr; gap: 16px; }
  .player-shell { max-height: 340px; }
  .player-shell { aspect-ratio: 16 / 9; }
  .script-body { padding: 20px 22px 26px; }
}

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  .topbar-actions { margin-left: 0; width: 100%; }
  .search-field { flex: 1; }
  .search-field input { width: 100%; }
  .stat-chips { margin-left: auto; }
  .workspace { grid-template-columns: 300px minmax(0, 1fr); }
}

/* =========================================================================
 * 响应式：移动端 H5（< 720px，上下布局 / 列表横滑 / 触控 ≥ 40px）
 * ========================================================================= */
@media (max-width: 720px) {
  html, body { height: auto; }
  body { overflow-x: hidden; overflow-y: auto; }
  .app { height: auto; min-height: 100vh; }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 10px 14px 12px;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(250, 248, 245, .94);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
  }
  .brand { gap: 9px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-mark .icon-logo { width: 19px; height: 19px; }
  .brand-title { font-size: 17px; letter-spacing: .2px; white-space: normal; }
  .brand-title-line { flex-wrap: wrap; row-gap: 4px; }
  .badge-mock { font-size: 9px; }
  .brand-sub { margin-top: 2px; font-size: 10.5px; white-space: normal; }
  .brand-sub > span:first-child { overflow: hidden; text-overflow: ellipsis; }

  .stat-chips {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 6px;
    margin-left: 0;
    padding-bottom: 1px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .stat-chips::-webkit-scrollbar { display: none; }
  .stat-chip { flex: none; padding: 5px 9px; border-radius: 9px; }
  .stat-value { font-size: 12.5px; }

  .topbar-actions {
    order: 4;
    width: 100%;
    margin-left: 0;
    gap: 8px;
  }
  .search-field { flex: 1; min-width: 0; }
  .search-field input { width: 100%; height: 42px; font-size: 13px; }
  .search-field kbd { display: none; }
  .topbar-actions .btn { height: 42px; min-width: 42px; padding: 0 11px; }
  .topbar-actions .btn .btn-label { display: none; }
  .topbar-actions .btn .icon { width: 18px; height: 18px; }

  .workspace {
    display: block;
    padding: 12px 14px 0;
  }

  .sidebar {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
  }
  .sidebar-head {
    padding: 0 0 10px;
    border-bottom: none;
    background: transparent;
  }
  .filter-tab { height: 40px; font-size: 13px; }
  .switch { padding: 10px 0; }
  .switch-track { width: 34px; height: 20px; }
  .switch-thumb { width: 16px; height: 16px; }
  .switch input:checked + .switch-track .switch-thumb { transform: translateX(14px); }
  .switch-label { font-size: 11.5px; }

  .video-list {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .video-list::-webkit-scrollbar { display: none; }
  .video-card {
    flex: 0 0 250px;
    scroll-snap-align: start;
    grid-template-columns: 18px 48px minmax(0, 1fr);
    gap: 8px;
    padding: 9px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
  }
  .video-card.is-active { border-color: rgba(228, 87, 46, .38); }
  .thumb { width: 48px; height: 38px; }
  .dup-row { flex: 0 0 210px; width: auto; margin: 0; align-self: stretch; }
  .list-foot { padding: 2px 0 10px; border-top: none; background: transparent; }
  .list-empty { flex: 1 0 100%; padding: 30px 16px; }

  .detail {
    overflow: visible;
    padding: 2px 0 18px;
    gap: 12px;
  }
  .detail-empty { margin: 20px auto; padding: 30px 20px; }

  .media-card { padding: 12px; gap: 12px; border-radius: 14px; }
  .player-shell { max-height: none; }
  .media-title { font-size: 17px; margin: 7px 0 8px; }
  .meta-row { gap: 6px; font-size: 11px; }
  .meta-pill { padding: 3px 8px; font-size: 10.5px; }
  .path-block { margin-top: 12px; }
  .path-value { font-size: 10.5px; max-height: 50px; }
  .path-actions .btn { height: 40px; font-size: 12.5px; flex: 1; }
  .media-actions { margin-top: 4px; padding-top: 12px; gap: 8px; }
  .media-actions .btn { height: 40px; font-size: 12.5px; }

  .script-head { padding: 13px 14px 11px; gap: 10px; }
  .script-tools { margin-left: 0; width: 100%; gap: 7px; }
  .script-tools .btn { height: 40px; font-size: 12.5px; flex: 1 0 auto; }
  .script-tools .btn-primary { flex: 1 1 100%; }
  .script-legend { padding: 8px 14px; gap: 12px; }
  .legend-hint { margin-left: 0; width: 100%; }
  .script-body { padding: 16px 12px 22px; }
  .para { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; margin-bottom: 1.15em; }
  .para-time { width: 38px; height: 21px; font-size: 9.5px; line-height: 19px; }
  .para-tools { width: 38px; top: 30px; opacity: 1; }
  .para-text { font-size: 16.5px; line-height: 1.85; }
  .para-copy { font-size: 9px; }

  .editor { padding: 14px; }
  .field textarea { min-height: 260px; font-size: 15px; }
  .editor-actions .btn { height: 42px; flex: 1; }

  .timeline { margin: 0 12px 12px; }
  .timeline-list { max-height: 320px; }
  .timeline-head .icon-btn { width: 40px; height: 40px; }
  .timeline-row { grid-template-columns: 46px minmax(0, 1fr); row-gap: 6px; padding: 8px; }
  .seg-actions { grid-column: 2; display: flex; gap: 6px; }
  .seg-actions .btn { height: 40px; }

  .status-card { padding: 18px; gap: 14px; }
  .status-top { gap: 12px; }
  .status-actions .btn { height: 42px; flex: 1; }
  .big-progress { height: 7px; }

  .upload-dock { margin: 6px 14px 18px; padding: 12px; border-radius: 14px; }
  .dock-head { gap: 10px; }
  .dock-icon { width: 36px; height: 36px; }
  .dock-copy { flex: 1 1 calc(100% - 50px); }
  .dock-title { font-size: 12.5px; }
  .dock-sub { font-size: 10.5px; }
  .dock-actions { width: 100%; }
  .dock-actions .btn { height: 42px; flex: 1; }
  .upload-row { grid-template-columns: minmax(0, 1fr) 92px 62px; gap: 8px; }

  .toast-stack { left: 14px; right: 14px; bottom: 14px; align-items: stretch; }
  .toast { max-width: none; min-width: 0; }

  .drop-card { padding: 30px 22px; border-radius: 18px; }
  .drop-card h2 { font-size: 17px; }
  .drop-icon { width: 58px; height: 58px; border-radius: 16px; }
  .drop-icon .icon { width: 26px; height: 26px; }

  .modal-card { padding: 20px; border-radius: 16px; }
  .modal-foot .btn { height: 44px; flex: 1; }
  .modal-check { padding: 11px; }
}

@media (max-width: 380px) {
  .brand-title { font-size: 16px; }
  .video-card { flex-basis: 226px; }
  .para-text { font-size: 16px; }
}

/* =========================================================================
 * 响应式：移动端新增组件（链接下载 / AI 反写弹窗）
 * ========================================================================= */
@media (max-width: 720px) {
  /* 链接下载行：输入框与按钮各占一行，触控尺寸 ≥ 40px */
  .dock-link { flex-wrap: wrap; gap: 8px; }
  .dock-link-tag { font-size: 11px; height: 28px; }
  .dock-link-field { flex: 1 1 100%; order: 2; }
  .dock-link-field input { height: 42px; font-size: 13px; }
  .btn-download { flex: 1 1 100%; order: 3; height: 42px; min-height: 42px; font-size: 13px; }
  .dock-link-shortcut { height: 42px; }
  .upload-dock.is-collapsed .dock-link-shortcut { height: 32px; }

  /* AI 反写弹窗 */
  .modal-card.is-wide { width: calc(100vw - 20px); max-height: 92vh; padding: 0; border-radius: 16px; }
  .rewrite-head { padding: 14px 15px 12px; gap: 10px; }
  .rewrite-head .modal-icon { width: 34px; height: 34px; border-radius: 10px; }
  .rewrite-head .modal-icon .icon { width: 17px; height: 17px; }
  .rewrite-head .icon-btn { width: 40px; height: 40px; }
  .rewrite-head h3 { font-size: 15px; }
  .rewrite-head .modal-sub { font-size: 11px; line-height: 1.55; }
  .rewrite-body { padding: 13px 15px 4px; }
  .rewrite-section { margin-bottom: 14px; }
  .mode-segmented { grid-template-columns: 1fr; gap: 6px; }
  .mode-option { padding: 9px 11px; }
  .mode-option .mode-name { font-size: 12.5px; }
  .rewrite-row { align-items: flex-start; gap: 8px; }
  .rewrite-row .rewrite-label { width: 100%; }
  .select-wrap { width: 100%; min-width: 0; }
  .select-wrap select { height: 40px; }
  .rewrite-row .rewrite-hint { display: none; }
  .opening-preview { max-height: 92px; font-size: 12px; }
  .rewrite-result-wrap { min-height: 168px; }
  .rewrite-result { min-height: 168px; max-height: 250px; font-size: 13px; }
  .rewrite-loading { font-size: 12px; }
  .rewrite-foot { padding: 11px 15px 13px; gap: 7px; margin-top: 0; }
  .rewrite-foot .spacer { display: none; }
  .rewrite-foot .btn { height: 42px; font-size: 13px; flex: 1 1 auto; }
  .rewrite-foot .btn-primary { flex: 1 1 100%; }
  .rewrite-confirm .confirm-actions { width: 100%; margin-left: 0; }
  .rewrite-confirm .confirm-actions .btn { flex: 1; height: 40px; }
}

/* =========================================================================
 * v3 样式：顶部导航 / 路由视图 / 页脚 / 来源行 / 数据大屏 / 配置中心 / 数字人工作台
 * ========================================================================= */

/* ------------------------------- 应用壳 / 路由视图 / 页脚 ------------------------------- */
.app-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.view-page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.app-footer {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 24px 8px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .58);
  color: var(--muted-2);
  line-height: 1.45;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .4px;
  color: #8a8177;
}
.footer-en { font-size: 8.5px; letter-spacing: 1.4px; color: #b3a99e; font-weight: 600; }
.footer-sep { color: #d3c8bb; }
.footer-tech { font-size: 10.5px; color: #a89f95; letter-spacing: .3px; }

/* ------------------------------- 顶部导航 ------------------------------- */
.main-nav {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: #f4efe9;
}
.nav-tab {
  height: 32px;
  padding: 0 11px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.nav-tab .icon { width: 15px; height: 15px; color: #a89f95; transition: color .16s ease; }
.nav-tab:hover { color: var(--ink); }
.nav-tab.is-active {
  background: #fff;
  color: var(--accent-deep);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(31, 35, 40, .10);
}
.nav-tab.is-active .icon { color: var(--accent); }
.btn-settings .icon { color: #8a8177; }
.btn-settings:hover .icon { color: var(--accent-deep); }

@media (min-width: 721px) {
  .topbar { gap: 13px; padding: 9px 20px; min-height: 64px; }
  .brand-en { display: none; }
  .brand-title { font-size: 19px; }
  .stat-chip { padding: 5px 9px; }
  .stat-label { font-size: 10.5px; }
  .topbar-actions { gap: 8px; }
  .search-field input { width: 196px; }
  .btn-settings { padding: 0 11px; }
}

@media (min-width: 1720px) {
  .brand-en { display: inline; }
  .search-field input { width: 224px; }
}

/* 数据大屏路由：深色顶栏 / 页脚 */
body[data-route="dashboard"] { background: #070b16; }
body[data-route="dashboard"] .topbar {
  background: rgba(7, 11, 22, .90);
  border-bottom-color: rgba(96, 130, 255, .16);
  box-shadow: 0 1px 0 rgba(34, 211, 238, .04);
}
body[data-route="dashboard"] .brand-title { color: #f1f5ff; }
body[data-route="dashboard"] .brand-sub { color: rgba(196, 208, 245, .58); }
body[data-route="dashboard"] .brand-mark {
  background: linear-gradient(150deg, #22d3ee 0%, #6366f1 55%, #8b5cf6 100%);
  box-shadow: 0 8px 22px -10px rgba(34, 211, 238, .85), inset 0 1px 0 rgba(255, 255, 255, .3);
}
body[data-route="dashboard"] .stat-chips { display: none; }
body[data-route="dashboard"] .main-nav { background: rgba(20, 30, 55, .82); }
body[data-route="dashboard"] .nav-tab { color: #93a4c8; }
body[data-route="dashboard"] .nav-tab .icon { color: #7f8fb5; }
body[data-route="dashboard"] .nav-tab:hover { color: #e0e7ff; }
body[data-route="dashboard"] .nav-tab.is-active {
  background: rgba(34, 211, 238, .13);
  color: #67e8f9;
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .22);
}
body[data-route="dashboard"] .nav-tab.is-active .icon { color: #67e8f9; }
body[data-route="dashboard"] .search-field input {
  background: rgba(13, 20, 38, .92);
  border-color: rgba(96, 130, 255, .24);
  color: #e2e8f0;
}
body[data-route="dashboard"] .search-field input::placeholder { color: rgba(148, 163, 184, .75); }
body[data-route="dashboard"] .search-field > .icon { color: rgba(148, 163, 184, .8); }
body[data-route="dashboard"] .search-field kbd {
  background: rgba(30, 41, 59, .9);
  border-color: rgba(96, 130, 255, .2);
  color: rgba(148, 163, 184, .8);
}
body[data-route="dashboard"] .topbar-actions .btn {
  background: rgba(15, 23, 42, .82);
  border-color: rgba(96, 130, 255, .22);
  color: #c7d2fe;
}
body[data-route="dashboard"] .topbar-actions .btn:hover { background: rgba(30, 41, 59, .9); color: #fff; }
body[data-route="dashboard"] .topbar-actions .btn .icon { color: #93c5fd; }
body[data-route="dashboard"] .btn-primary {
  background: linear-gradient(180deg, #0891b2, #0e7490);
  border-color: #0e7490;
  color: #fff;
}
body[data-route="dashboard"] .btn-primary:hover { background: linear-gradient(180deg, #06b6d4, #0e7490); }
body[data-route="dashboard"] .app-footer {
  background: rgba(7, 11, 22, .92);
  border-top-color: rgba(96, 130, 255, .14);
}
body[data-route="dashboard"] .footer-brand { color: rgba(191, 219, 254, .78); }
body[data-route="dashboard"] .footer-en { color: rgba(129, 140, 248, .7); }
body[data-route="dashboard"] .footer-tech { color: rgba(148, 163, 184, .65); }

/* ------------------------------- 来源行（工作台详情） ------------------------------- */
.source-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 8px 10px;
  background: #faf8f5;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.source-row-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.1px;
  color: #a89f95;
  flex: none;
}
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  flex: none;
}
.platform-badge.is-local { color: #6b7280; background: #f1ede7; border-color: #e4dbd1; }
.platform-badge.is-upload { color: #0f766e; background: rgba(15, 118, 110, .08); border-color: rgba(15, 118, 110, .18); }
.platform-badge.is-douyin { color: #b91c1c; background: rgba(254, 44, 85, .08); border-color: rgba(254, 44, 85, .22); }
.platform-badge.is-xiaohongshu { color: #be123c; background: rgba(255, 36, 66, .08); border-color: rgba(255, 36, 66, .2); }
.platform-badge.is-bilibili { color: #0369a1; background: rgba(0, 161, 214, .09); border-color: rgba(0, 161, 214, .22); }
.platform-badge.is-tiktok { color: #0f172a; background: rgba(37, 244, 238, .16); border-color: rgba(15, 23, 42, .14); }
.platform-badge.is-kuaishou { color: #c2410c; background: rgba(255, 80, 0, .08); border-color: rgba(255, 80, 0, .2); }
.platform-badge.is-other { color: var(--accent-deep); background: var(--accent-soft); border-color: rgba(228, 87, 46, .2); }
.source-author { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: #4b5563; }
.source-author-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; max-width: 180px; white-space: nowrap; }
.source-note { font-size: 11.5px; color: var(--muted-2); }
.author-avatar {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(145deg, #f0b092, #e4572e);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.author-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.source-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.source-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: #57534e;
  font-family: inherit;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.source-action .icon { width: 12px; height: 12px; }
.source-action:hover { color: var(--accent-deep); border-color: rgba(228, 87, 46, .4); background: #fff8f3; }

/* 通用小圆点 / spinner */
.platform-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: #8a8177;
}
.platform-dot.is-local { background: #8a8177; }
.platform-dot.is-upload { background: #0f766e; }
.platform-dot.is-douyin { background: #fe2c55; }
.platform-dot.is-xiaohongshu { background: #ff2442; }
.platform-dot.is-bilibili { background: #00a1d6; }
.platform-dot.is-tiktok { background: #25f4ee; }
.platform-dot.is-kuaishou { background: #ff5000; }
.platform-dot.is-other { background: var(--accent); }

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(228, 87, 46, .18);
  border-top-color: var(--accent);
  animation: spin .9s linear infinite;
  flex: none;
  display: inline-block;
}
.spinner.dark { border-color: rgba(228, 87, 46, .18); border-top-color: var(--accent); }

/* =========================================================================
 * 数据大屏（深色科技风）
 * ========================================================================= */
.dashboard-page {
  background: #070b16;
  color: #e6edf9;
  scrollbar-color: rgba(99, 130, 220, .35) transparent;
}
.dashboard-page::-webkit-scrollbar-thumb { background: rgba(99, 130, 220, .32); }
.dashboard-page::-webkit-scrollbar-thumb:hover { background: rgba(99, 130, 220, .5); }

.dash {
  position: relative;
  min-height: 100%;
  padding: 20px 28px 26px;
  overflow: hidden;
  isolation: isolate;
}
.dash::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(96, 130, 220, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 130, 220, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(1200px 620px at 50% -10%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(1200px 620px at 50% -10%, #000 20%, transparent 78%);
  pointer-events: none;
  z-index: -1;
}
.dash-aurora {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 8% -12%, rgba(34, 211, 238, .16), transparent 62%),
    radial-gradient(820px 380px at 90% -8%, rgba(139, 92, 246, .20), transparent 64%),
    radial-gradient(760px 480px at 50% 116%, rgba(20, 184, 166, .10), transparent 70%);
}

.dash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.dash-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 2.4px;
  color: #67e8f9;
  text-transform: uppercase;
}
.dash-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .16), 0 0 14px rgba(34, 211, 238, .8);
  animation: softPulse 2s ease-in-out infinite;
}
.dash-title {
  margin-top: 6px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1.5px;
  line-height: 1.15;
  background: linear-gradient(100deg, #ffffff 10%, #a5b4fc 58%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dash-sub { margin-top: 6px; font-size: 12px; letter-spacing: .3px; color: rgba(148, 163, 184, .82); }
.dash-head-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dash-updated { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 10px; color: rgba(148, 163, 184, .7); }
.dash-updated b { font-weight: 500; font-size: 11px; color: rgba(203, 213, 225, .9); letter-spacing: .3px; }
.dash-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid rgba(96, 130, 255, .28);
  background: rgba(15, 23, 42, .78);
  color: #a5b4fc;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.dash-refresh .icon { width: 14px; height: 14px; }
.dash-refresh:hover { border-color: rgba(34, 211, 238, .45); color: #67e8f9; background: rgba(30, 41, 59, .85); }
.dash-refresh:disabled { opacity: .7; cursor: default; }

/* KPI */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.kpi-card {
  position: relative;
  padding: 14px 16px 13px;
  border-radius: 15px;
  border: 1px solid rgba(96, 130, 255, .16);
  background: linear-gradient(160deg, rgba(20, 30, 54, .92), rgba(9, 14, 28, .94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 22px 44px -34px #000;
  overflow: hidden;
}
.kpi-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--kpi-glow), transparent 70%);
  pointer-events: none;
}
.kpi-card.tone-cyan { --kpi: #22d3ee; --kpi-soft: rgba(34, 211, 238, .12); --kpi-glow: rgba(34, 211, 238, .22); }
.kpi-card.tone-violet { --kpi: #a78bfa; --kpi-soft: rgba(167, 139, 250, .12); --kpi-glow: rgba(167, 139, 250, .24); }
.kpi-card.tone-amber { --kpi: #fbbf24; --kpi-soft: rgba(251, 191, 36, .12); --kpi-glow: rgba(251, 191, 36, .2); }
.kpi-card.tone-emerald { --kpi: #34d399; --kpi-soft: rgba(52, 211, 153, .12); --kpi-glow: rgba(52, 211, 153, .2); }
.kpi-top { display: flex; align-items: center; gap: 7px; }
.kpi-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--kpi);
  background: var(--kpi-soft);
  border: 1px solid color-mix(in srgb, var(--kpi) 30%, transparent);
}
.kpi-icon .icon { width: 15px; height: 15px; }
.kpi-label { font-size: 11px; letter-spacing: .6px; color: rgba(203, 213, 225, .74); }
.kpi-spark { margin-left: auto; width: 68px; height: 22px; opacity: .9; }
.kpi-spark svg { width: 100%; height: 100%; overflow: visible; }
.kpi-spark polyline { fill: none; stroke: var(--kpi); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.kpi-main { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.kpi-value {
  font-family: var(--font);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.8px;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 26px var(--kpi-glow);
}
.kpi-unit { font-size: 11.5px; color: rgba(148, 163, 184, .85); letter-spacing: .3px; }
.kpi-hint { margin-top: 6px; font-size: 10.5px; color: rgba(148, 163, 184, .68); letter-spacing: .2px; }

/* 面板通用 */
.dash-panel {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(96, 130, 255, .16);
  background: linear-gradient(160deg, rgba(16, 25, 47, .92), rgba(8, 13, 26, .94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 26px 48px -40px #000;
  padding: 14px 16px 12px;
  min-width: 0;
}
.panel-kicker { font-size: 8.5px; font-weight: 600; letter-spacing: 1.9px; color: rgba(103, 232, 249, .68); }
.dash-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.dash-panel-head h2 { margin-top: 3px; font-size: 15px; font-weight: 600; letter-spacing: .4px; color: #eef2ff; }
.panel-tag {
  flex: none;
  font-size: 10px;
  color: rgba(148, 163, 184, .78);
  background: rgba(96, 130, 255, .10);
  border: 1px solid rgba(96, 130, 255, .16);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  margin-top: 2px;
}
.panel-foot { margin-top: 8px; font-size: 10px; color: rgba(148, 163, 184, .6); letter-spacing: .2px; }
.panel-foot b { color: rgba(103, 232, 249, .9); font-weight: 600; }
.dash-empty-mini { padding: 26px 12px; text-align: center; font-size: 11.5px; color: rgba(148, 163, 184, .65); }

.dash-middle {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 14px;
  margin-bottom: 14px;
}
.dash-sources, .dash-keywords { min-height: 242px; }

/* 来源分布 */
.source-bars { display: flex; flex-direction: column; gap: 9px; }
.source-bar-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) 64px; align-items: center; gap: 9px; }
.source-bar-name { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: rgba(226, 232, 240, .85); white-space: nowrap; }
.source-bar-track {
  height: 7px;
  border-radius: 99px;
  background: rgba(96, 130, 255, .10);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
}
.source-bar-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bar-color) 55%, #0f172a), var(--bar-color));
  box-shadow: 0 0 12px color-mix(in srgb, var(--bar-color) 55%, transparent);
  animation: dashBarGrow .8s ease both;
}
.source-bar-count {
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
}
.source-bar-count em { display: block; font-style: normal; font-size: 9.5px; font-weight: 400; color: rgba(148, 163, 184, .6); }

/* 词云 */
.word-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 6px 14px;
  min-height: 156px;
  padding: 2px 4px 4px;
}
.cloud-word {
  display: inline-block;
  line-height: 1.25;
  color: rgba(165, 180, 252, .78);
  letter-spacing: .5px;
  font-weight: 500;
  animation: cloudIn .55s ease both;
  animation-delay: var(--wc-delay, 0ms);
  user-select: none;
}
.cloud-word.is-warm { color: rgba(103, 232, 249, .9); font-weight: 600; }
.cloud-word.is-hot {
  color: #f8fafc;
  font-weight: 700;
  text-shadow: 0 0 22px rgba(34, 211, 238, .55), 0 0 42px rgba(139, 92, 246, .35);
}
.cloud-word:nth-child(5n+2) { color: rgba(196, 181, 253, .82); }
.cloud-word:nth-child(5n+4) { color: rgba(94, 234, 212, .78); }

/* Top 视频 */
.dash-top-videos { margin-bottom: 14px; }
.top-video-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 11px;
}
.top-video {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0;
  border: 1px solid rgba(96, 130, 255, .13);
  border-radius: 12px;
  background: rgba(11, 18, 34, .72);
  overflow: hidden;
  text-align: left;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.top-video:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, .4);
  box-shadow: 0 18px 34px -22px rgba(34, 211, 238, .55);
}
.dash-thumb { position: relative; overflow: hidden; background: #0f172a; }
.top-thumb { aspect-ratio: 16 / 9; width: 100%; border-radius: 0; }
.recent-thumb { width: 54px; height: 38px; border-radius: 8px; flex: none; }
.dash-thumb-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  color: rgba(255, 255, 255, .78);
  letter-spacing: 1px;
}
.dash-thumb-fallback.tone-1 { background: linear-gradient(140deg, #0e7490, #1e3a8a 60%, #111827); }
.dash-thumb-fallback.tone-2 { background: linear-gradient(140deg, #7c3aed, #312e81 62%, #0f172a); }
.dash-thumb-fallback.tone-3 { background: linear-gradient(140deg, #be123c, #7c2d12 62%, #111827); }
.dash-thumb-fallback.tone-4 { background: linear-gradient(140deg, #0f766e, #134e4a 60%, #0b1220); }
.dash-thumb-fallback.tone-5 { background: linear-gradient(140deg, #c2410c, #7c2d12 58%, #111827); }
.dash-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.dash-thumb-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(2, 6, 20, .05) 30%, rgba(2, 6, 20, .55));
  pointer-events: none;
}
.top-video-rank {
  position: absolute;
  left: 7px;
  top: 6px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  color: #0b1220;
  background: rgba(103, 232, 249, .92);
  border-radius: 5px;
  padding: 1px 5px;
  letter-spacing: .4px;
}
.top-video-body { display: flex; flex-direction: column; gap: 4px; padding: 0 9px 9px; min-width: 0; }
.top-video-title {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(238, 242, 255, .92);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 31px;
}
.top-video-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  color: rgba(148, 163, 184, .72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 最近添加 */
.recent-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.recent-item {
  flex: 1 1 0;
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid rgba(96, 130, 255, .13);
  border-radius: 11px;
  background: rgba(11, 18, 34, .7);
  text-align: left;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.recent-item:hover { border-color: rgba(34, 211, 238, .35); background: rgba(17, 28, 52, .9); }
.recent-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.recent-title {
  font-size: 11px;
  font-weight: 500;
  color: rgba(238, 242, 255, .9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-meta { display: flex; align-items: center; gap: 4px; font-size: 9.5px; color: rgba(148, 163, 184, .7); white-space: nowrap; overflow: hidden; }
.dash-footnote { margin-top: 10px; text-align: center; font-size: 9.5px; letter-spacing: .3px; color: rgba(148, 163, 184, .46); }

/* 大屏加载 / 错误 */
.dash-loading { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; }
.dash-loading-head { display: flex; align-items: center; gap: 14px; }
.dash-loading-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(150deg, #22d3ee, #6366f1);
  box-shadow: 0 0 30px rgba(34, 211, 238, .4);
  animation: softPulse 1.6s ease-in-out infinite;
}
.dash-loading-head b { display: block; font-size: 14px; color: #e2e8f0; }
.dash-loading-head span { font-size: 11px; color: rgba(148, 163, 184, .7); }
.dash-skeleton-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dash-skeleton-kpis span {
  height: 118px;
  border-radius: 15px;
  background: linear-gradient(100deg, rgba(30, 41, 59, .55) 20%, rgba(51, 65, 85, .65) 40%, rgba(30, 41, 59, .55) 60%);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}
.dash-skeleton-blocks { display: grid; grid-template-columns: 1fr 1.1fr; gap: 14px; }
.dash-skeleton-blocks span {
  height: 250px;
  border-radius: 16px;
  background: linear-gradient(100deg, rgba(30, 41, 59, .55) 20%, rgba(51, 65, 85, .65) 40%, rgba(30, 41, 59, .55) 60%);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}
.dash-error { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.dash-error-card {
  max-width: 420px;
  padding: 30px 32px;
  text-align: center;
  border-radius: 18px;
  border: 1px solid rgba(248, 113, 113, .22);
  background: rgba(24, 15, 24, .8);
}
.dash-error-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fca5a5;
  background: rgba(248, 113, 113, .12);
}
.dash-error-icon .icon { width: 22px; height: 22px; }
.dash-error-card h2 { font-size: 16px; color: #fee2e2; }
.dash-error-card p { margin-top: 8px; font-size: 12px; line-height: 1.7; color: rgba(252, 165, 165, .8); word-break: break-all; }
.dash-retry {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid rgba(248, 113, 113, .35);
  background: rgba(248, 113, 113, .12);
  color: #fecaca;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.dash-retry .icon { width: 14px; height: 14px; }
.dash-retry:hover { background: rgba(248, 113, 113, .2); }

@keyframes dashBarGrow { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
@keyframes cloudIn { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 160% 0; } to { background-position: -60% 0; } }

/* =========================================================================
 * 配置中心弹窗
 * ========================================================================= */
.modal-card.is-settings {
  width: 792px;
  max-width: min(792px, calc(100vw - 40px));
  max-height: min(90vh, 900px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.settings-head {
  flex: none;
  align-items: center;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.modal-icon.is-settings {
  color: #fff;
  background: linear-gradient(160deg, #f0805a, #c2410c);
  border: none;
  box-shadow: 0 8px 20px -10px rgba(194, 65, 12, .8);
}
.settings-head .icon-btn { margin-left: auto; }
.settings-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 22px 6px; }
.settings-group {
  margin-bottom: 12px;
  padding: 13px 15px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.settings-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.settings-group-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex: none;
  display: grid;
  place-items: center;
}
.settings-group-icon .icon { width: 16px; height: 16px; }
.settings-group-icon.is-deepseek { color: #fff; background: linear-gradient(150deg, #6366f1, #4338ca); }
.settings-group-icon.is-doubao { color: #fff; background: linear-gradient(150deg, #38bdf8, #0369a1); }
.settings-group-icon.is-chanjing { color: #fff; background: linear-gradient(150deg, #fb923c, #c2410c); }
.settings-group-copy { min-width: 0; flex: 1; }
.settings-group-copy h3 { font-size: 13.5px; font-weight: 650; color: var(--ink); letter-spacing: .2px; }
.settings-group-copy p { margin-top: 2px; font-size: 10.5px; color: var(--muted-2); line-height: 1.5; }
.settings-status {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid transparent;
}
.settings-status.is-on { color: #15803d; background: rgba(21, 128, 61, .08); border-color: rgba(21, 128, 61, .2); }
.settings-status.is-on::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #16a34a; }
.settings-status.is-off { color: #a16207; background: rgba(161, 98, 7, .08); border-color: rgba(161, 98, 7, .2); }
.settings-status.is-off::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #d97706; }
.settings-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 13px; }
.settings-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.settings-field.is-wide { grid-column: 1 / -1; }
.settings-field-label { font-size: 10px; font-weight: 600; letter-spacing: .9px; color: #a89f95; text-transform: uppercase; }
.settings-field input {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: #fffdfb;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.settings-field input::placeholder { color: #b3a99e; }
.settings-field input:hover { border-color: #d8cec2; }
.settings-field input:focus { border-color: rgba(228, 87, 46, .55); box-shadow: 0 0 0 3px rgba(228, 87, 46, .11); background: #fff; }
.key-field { position: relative; }
.key-field input { padding-right: 38px; }
.key-eye {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #a89f95;
  cursor: pointer;
}
.key-eye:hover { color: var(--accent-deep); background: #faf6f0; }
.key-eye .icon { width: 15px; height: 15px; }
.settings-field-hint { font-size: 9.5px; line-height: 1.5; color: #b3a99e; }
.settings-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 4px 0 6px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid #f3d9c8;
  background: #fff8f2;
  color: #9a5b3a;
}
.settings-note .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; color: #c2410c; }
.settings-note b { display: block; font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.settings-note p { font-size: 10.5px; line-height: 1.7; color: #a16207; }
.settings-loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 220px; color: var(--muted-2); font-size: 12px; }
.settings-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 6px 0;
  padding: 12px 14px;
  border: 1px solid rgba(220, 38, 38, .22);
  border-radius: 10px;
  background: #fef6f6;
  color: #b91c1c;
}
.settings-error .icon { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.settings-error b { font-size: 12.5px; }
.settings-error p { margin-top: 3px; font-size: 11px; line-height: 1.6; word-break: break-all; }
.settings-error .btn { margin-left: auto; flex: none; }
.settings-foot {
  flex: none;
  margin-top: 0;
  padding: 13px 22px 16px;
  border-top: 1px solid var(--line);
  background: #fdfcfa;
}
.settings-foot .spacer { flex: 1; }
.settings-foot .btn { height: 38px; }

/* =========================================================================
 * 数字人工作台
 * ========================================================================= */
.digital-page { background: var(--bg); }
.digital { max-width: 1500px; margin: 0 auto; padding: 20px 24px 26px; }
.digital-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.digital-eyebrow { font-size: 9.5px; font-weight: 700; letter-spacing: 2.4px; color: var(--accent-deep); opacity: .8; }
.digital-head h1 { margin-top: 5px; font-size: 26px; font-weight: 700; letter-spacing: 1px; color: var(--ink); }
.digital-head p { margin-top: 6px; font-size: 12px; color: var(--muted); letter-spacing: .2px; }
.digital-head-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.digital-head-actions .btn { height: 34px; font-size: 12px; }
.digital-head-actions .settings-status { font-size: 10.5px; padding: 4px 10px; }

.steps-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 11px 16px;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}
.step { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.step:last-child { flex: 0 0 auto; }
.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: #a89f95;
  background: #f4efe9;
  border: 1px solid #e7ded4;
  transition: all .2s ease;
}
.step-label { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.step-line { flex: 1; height: 1px; min-width: 12px; background: #ece5dd; margin: 0 6px; }
.step.is-active .step-num { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(228, 87, 46, .12); }
.step.is-active .step-label { color: var(--accent-deep); font-weight: 600; }
.step.is-done .step-num { color: #15803d; background: rgba(21, 128, 61, .1); border-color: rgba(21, 128, 61, .25); }
.step.is-done .step-label { color: #3f3a35; }
.step.is-done .step-line { background: rgba(21, 128, 61, .22); }

.digital-error {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(220, 38, 38, .22);
  background: #fef6f6;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.65;
}
.digital-error .icon { width: 16px; height: 16px; flex: none; margin-top: 1px; }

.digital-grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: 14px; align-items: start; }
.digital-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dpanel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.dpanel-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 17px 10px; }
.step-badge {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-deep);
  background: rgba(228, 87, 46, .09);
  border: 1px solid rgba(228, 87, 46, .18);
}
.dpanel-head h2 { font-size: 14px; font-weight: 650; color: var(--ink); letter-spacing: .2px; }
.dpanel-head p { margin-top: 2px; font-size: 10.5px; color: var(--muted-2); line-height: 1.5; }
.dpanel-tag {
  margin-left: auto;
  flex: none;
  font-family: var(--mono);
  font-size: 10.5px;
  color: #8a8177;
  background: #faf7f2;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
}
.dpanel-body { padding: 0 17px 16px; }
.digital-select-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.digital-label { flex: none; font-size: 10px; font-weight: 600; letter-spacing: 1px; color: #a89f95; text-transform: uppercase; width: 36px; }
.digital-select {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 30px 0 11px;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink-soft);
  background: #fffdfb;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a89f95' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}
.digital-select:hover { border-color: #d8cec2; }
.digital-select:focus { border-color: rgba(228, 87, 46, .55); box-shadow: 0 0 0 3px rgba(228, 87, 46, .11); }
.digital-video-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 9px; font-size: 11px; color: var(--muted-2); }
.digital-video-meta .platform-badge { font-size: 10px; }
.digital-video-author { color: #57534e; }
.digital-voice-desc { width: 100%; padding-left: 45px; font-size: 10.5px; color: #a89f95; }
.digital-textarea {
  display: block;
  width: 100%;
  min-height: 196px;
  max-height: 320px;
  padding: 12px 14px;
  font: inherit;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink);
  background: #fffdfb;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: none;
  resize: vertical;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.digital-textarea:focus { border-color: rgba(228, 87, 46, .55); box-shadow: 0 0 0 3px rgba(228, 87, 46, .11); background: #fff; }
.digital-text-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: 10.5px; color: #a89f95; flex-wrap: wrap; }
.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-2);
  font-family: inherit;
  font-size: 10.5px;
  cursor: pointer;
}
.text-btn .icon { width: 12px; height: 12px; }
.text-btn:hover { color: var(--accent-deep); background: rgba(228, 87, 46, .06); }

.digital-actions { display: flex; align-items: center; gap: 8px; margin: 11px 0 12px; flex-wrap: wrap; }
.digital-actions .btn { height: 36px; font-size: 12.5px; }
.digital-output {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px dashed #e7ded4;
  background: #fbf8f4;
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.6;
}
.digital-output .icon { width: 16px; height: 16px; flex: none; color: #b3a99e; }
.digital-output.is-empty { color: #a89f95; }
.digital-output.is-loading { color: var(--accent-deep); background: #fff8f2; border-color: #f3d9c8; }
.digital-output .spinner { width: 18px; height: 18px; border-width: 2px; }
.tts-output, .srt-output { display: block; padding: 12px 13px; }
.do-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.do-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--accent-deep);
  background: rgba(228, 87, 46, .09);
}
.do-icon .icon { width: 15px; height: 15px; }
.do-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.do-copy b { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.do-copy em { font-style: normal; font-size: 10px; color: #a89f95; }
.do-head .btn { flex: none; height: 28px; font-size: 11px; }
.digital-audio { width: 100%; height: 36px; display: block; }
.srt-preview {
  margin: 0;
  max-height: 164px;
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ece5dd;
  background: #fff;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
  color: #57534e;
  white-space: pre-wrap;
  word-break: break-all;
}
.digital-package-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; }
.digital-package-bar .btn { height: 38px; font-size: 13px; }
.digital-pkg-config { display: inline-flex; align-items: center; gap: 4px; }
.digital-package-result {
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(228, 87, 46, .2);
  background: linear-gradient(160deg, #fffaf6, #fff6ee);
}
.pkg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pkg-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pkg-kicker { font-size: 8.5px; font-weight: 700; letter-spacing: 1.6px; color: var(--accent-deep); opacity: .75; }
.pkg-copy b { font-size: 13px; color: var(--ink); word-break: break-all; }
.pkg-copy em { font-style: normal; font-size: 10.5px; color: #9a8172; }
.pkg-head .btn { flex: none; height: 34px; font-size: 12px; }
.pkg-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pkg-file {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 10.5px;
  color: #57534e;
  font-family: var(--mono);
}
.pkg-file .icon { width: 11px; height: 11px; color: #16a34a; }
.pkg-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 10.5px; color: #a89f95; }
.pkg-note .settings-status { font-size: 9.5px; }
.digital-demo-note {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
  font-size: 10px;
  color: #b3a99e;
}
.digital-demo-note .icon { width: 12px; height: 12px; }
.digital-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.digital-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(228, 87, 46, .07);
  border: 1px solid rgba(228, 87, 46, .16);
}
.digital-empty-icon .icon { width: 26px; height: 26px; }
.digital-empty h2 { font-size: 16px; color: var(--ink); font-weight: 650; }
.digital-empty p { font-size: 12px; line-height: 1.7; max-width: 420px; }
.digital-empty .btn { margin-top: 6px; height: 38px; }

/* =========================================================================
 * v3 响应式
 * ========================================================================= */
@media (max-width: 1400px) {
  .top-video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .top-video-title { min-height: auto; -webkit-line-clamp: 1; }
  .dash-middle { grid-template-columns: 1fr; }
  .dash-sources, .dash-keywords { min-height: 0; }
}

@media (max-width: 1180px) {
  .digital-grid { grid-template-columns: 1fr; }
  .digital { padding: 16px 18px 22px; }
  .recent-item { flex: 0 0 230px; }
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-skeleton-kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  /* 顶部导航：品牌行 / 导航行 / 统计行 / 搜索行 */
  .topbar { gap: 9px; padding: 10px 14px 11px; }
  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding: 3px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-tab { flex: 1 0 auto; height: 36px; padding: 0 10px; font-size: 12px; justify-content: center; }
  .stat-chips { order: 4; }
  .topbar-actions { order: 5; }
  .topbar-actions .btn-settings { min-width: 42px; }
  .topbar-actions .btn-settings .btn-label { display: none; }
  body[data-route="dashboard"] .topbar { padding: 10px 14px 11px; }

  .app-footer { padding: 7px 14px 8px; }
  .footer-brand { font-size: 9.5px; gap: 5px; }
  .footer-en { font-size: 7.5px; letter-spacing: 1px; }
  .footer-tech { font-size: 9.5px; }

  /* 数据大屏单列 */
  .dash { padding: 14px 14px 22px; }
  .dash-head { align-items: flex-start; gap: 12px; }
  .dash-title { font-size: 24px; }
  .dash-sub { font-size: 11px; line-height: 1.7; }
  .dash-head-right { width: 100%; justify-content: space-between; }
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .kpi-card { padding: 11px 12px 10px; border-radius: 12px; }
  .kpi-value { font-size: 26px; }
  .kpi-spark { width: 48px; }
  .kpi-hint { font-size: 9.5px; }
  .dash-middle { grid-template-columns: 1fr; gap: 10px; margin-bottom: 10px; }
  .dash-panel { padding: 12px 12px 10px; border-radius: 13px; }
  .source-bar-row { grid-template-columns: 78px minmax(0, 1fr) 56px; }
  .word-cloud { min-height: 120px; gap: 5px 10px; }
  .dash-top-videos, .dash-middle { margin-bottom: 10px; }
  .top-video-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; gap: 9px; scrollbar-width: none; }
  .top-video-grid::-webkit-scrollbar { display: none; }
  .top-video { flex: 0 0 190px; scroll-snap-align: start; }
  .top-video-title { -webkit-line-clamp: 2; min-height: 31px; }
  .recent-row { gap: 8px; }
  .recent-item { flex: 0 0 214px; min-width: 0; }
  .dash-loading { padding-top: 14px; }
  .dash-skeleton-kpis { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .dash-skeleton-blocks { grid-template-columns: 1fr; }
  .dash-error-card { padding: 24px 18px; }

  /* 配置中心 */
  .modal-card.is-settings { width: calc(100vw - 20px); max-height: 92vh; border-radius: 16px; }
  .settings-head { padding: 14px 15px 12px; }
  .settings-head .icon-btn { width: 40px; height: 40px; }
  .settings-body { padding: 11px 13px 4px; }
  .settings-group { padding: 11px 12px 12px; }
  .settings-group-copy h3 { font-size: 12.5px; }
  .settings-fields { grid-template-columns: 1fr; }
  .settings-field input { height: 40px; font-size: 13px; }
  .settings-foot { padding: 11px 13px 13px; }
  .settings-foot .btn { height: 42px; }
  .settings-foot .btn-primary { flex: 1; }
  .settings-loading { min-height: 180px; }

  /* 数字人工作台单列 */
  .digital { padding: 14px 14px 20px; }
  .digital-head { align-items: flex-start; gap: 10px; }
  .digital-head h1 { font-size: 22px; }
  .digital-head p { font-size: 11px; line-height: 1.7; }
  .digital-head-actions { width: 100%; }
  .digital-head-actions .btn { height: 38px; flex: 1; }
  .steps-bar { padding: 9px 11px; overflow-x: auto; gap: 0; scrollbar-width: none; }
  .steps-bar::-webkit-scrollbar { display: none; }
  .step { flex: 1 0 auto; }
  .step-label { font-size: 10.5px; }
  .step-line { min-width: 8px; margin: 0 4px; }
  .digital-grid { grid-template-columns: 1fr; gap: 10px; }
  .digital-col { gap: 10px; }
  .dpanel { border-radius: 14px; }
  .dpanel-head { padding: 12px 13px 9px; }
  .dpanel-body { padding: 0 13px 13px; }
  .digital-label { width: 32px; }
  .digital-select { height: 40px; font-size: 13px; }
  .digital-textarea { min-height: 170px; font-size: 13px; }
  .digital-actions .btn { flex: 1; height: 42px; }
  .digital-package-bar { flex-direction: column; align-items: stretch; }
  .digital-package-bar .btn { width: 100%; height: 42px; }
  .digital-pkg-config { justify-content: center; }
  .pkg-head .btn { height: 38px; }
  .do-head .btn { height: 32px; }
  .digital-error { font-size: 11.5px; }
  .source-row { padding: 7px 8px; gap: 6px; }
  .source-actions { margin-left: 0; width: 100%; }
  .source-action { flex: 1; justify-content: center; height: 34px; }
  .source-author-name { max-width: 140px; }
}

/* ------------------------------- v3 收尾修正 / 紧凑化 ------------------------------- */
/* 配置弹窗位于深色大屏之上时，主按钮仍使用品牌赤陶橙 */
body[data-route="dashboard"] .modal-card .btn-primary,
.modal-card.is-settings .btn-primary {
  background: linear-gradient(180deg, #ea6033 0%, #e0501f 100%);
  border-color: #cf4a20;
  color: #fff;
  box-shadow: 0 1px 2px rgba(194, 65, 12, .28), 0 10px 22px -16px rgba(194, 65, 12, .9);
}
body[data-route="dashboard"] .modal-card .btn-primary:hover,
.modal-card.is-settings .btn-primary:hover {
  background: linear-gradient(180deg, #e15a2b 0%, #d34718 100%);
  border-color: #b8421a;
  color: #fff;
}

/* 桌面端把数据大屏压进 1600×1000 首屏，展示更完整 */
@media (min-width: 721px) {
  .dash { padding: 14px 26px 14px; }
  .dash-head { margin-bottom: 10px; }
  .dash-title { font-size: 27px; margin-top: 4px; }
  .dash-sub { margin-top: 3px; }
  .dash-kpis { gap: 12px; margin-bottom: 10px; }
  .kpi-card { padding: 11px 14px 10px; }
  .kpi-main { margin-top: 6px; }
  .kpi-value { font-size: 30px; }
  .kpi-hint { margin-top: 4px; }
  .dash-middle { gap: 12px; margin-bottom: 10px; }
  .dash-panel { padding: 12px 14px 10px; }
  .dash-sources, .dash-keywords { min-height: 220px; }
  .word-cloud { min-height: 142px; }
  .dash-top-videos { margin-bottom: 10px; }
  .top-video-body { padding: 0 8px 7px; gap: 3px; }
  .top-video-title { min-height: 29px; }
  .recent-item { padding: 6px; }
  .dash-footnote { margin-top: 6px; }
}

/* 数字人页底部说明卡片 */
.digital-tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.digital-tip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.tip-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--accent-deep);
  background: rgba(228, 87, 46, .08);
  border: 1px solid rgba(228, 87, 46, .14);
}
.tip-icon .icon { width: 15px; height: 15px; }
.digital-tip b { display: block; font-size: 11.5px; font-weight: 650; color: var(--ink-soft); }
.digital-tip p { margin-top: 2px; font-size: 10.5px; color: var(--muted-2); line-height: 1.55; }

@media (max-width: 720px) {
  .digital-tips { grid-template-columns: 1fr; margin-top: 10px; }
  .steps-bar { padding: 8px 9px; }
  .step { gap: 4px; }
  .step-num { width: 18px; height: 18px; font-size: 9px; }
  .step-label { font-size: 9.5px; }
  .step-line { min-width: 4px; margin: 0 2px; }
}

/* =========================================================================
 * v3.1：配置中心推荐数字人平台 / 数字人工作台合成平台快捷链接
 * ========================================================================= */
.settings-platforms {
  margin-bottom: 14px;
  padding: 14px 15px 12px;
  border: 1px solid rgba(228, 87, 46, .22);
  border-radius: 14px;
  background: linear-gradient(160deg, #fffaf6, #fff7f0);
}
.settings-platforms-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.settings-platform-kicker {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--accent-deep);
  opacity: .72;
}
.settings-platforms-head h3 { margin-top: 3px; font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: .3px; }
.settings-platforms-head p { margin-top: 4px; max-width: 560px; font-size: 10.5px; line-height: 1.65; color: #9a8172; }
.platform-count {
  flex: none;
  margin-top: 2px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(228, 87, 46, .18);
  background: rgba(228, 87, 46, .07);
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.platform-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 2px 7px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #e2d5c8 transparent;
}
.platform-rail::-webkit-scrollbar { height: 7px; }
.platform-rail::-webkit-scrollbar-thumb { background: #e6dbcf; border-radius: 99px; }
.platform-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 26px 12px;
  color: #a89f95;
  font-size: 11px;
}
.platform-loading .spinner { width: 18px; height: 18px; border-width: 2px; }
.platform-loading .icon { width: 14px; height: 14px; }
.platform-card {
  flex: 0 0 258px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 35, 40, .04);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.platform-card:hover {
  transform: translateY(-2px);
  border-color: rgba(228, 87, 46, .34);
  box-shadow: 0 14px 26px -22px rgba(31, 35, 40, .4);
}
.platform-card-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.platform-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
}
.platform-logo.tone-1 { background: linear-gradient(150deg, #f0805a, #c2410c); }
.platform-logo.tone-2 { background: linear-gradient(150deg, #38bdf8, #0369a1); }
.platform-logo.tone-3 { background: linear-gradient(150deg, #a78bfa, #5b21b6); }
.platform-logo.tone-4 { background: linear-gradient(150deg, #34d399, #047857); }
.platform-logo.tone-5 { background: linear-gradient(150deg, #fbbf24, #b45309); }
.platform-name-wrap { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
.platform-name-wrap b { font-size: 13px; font-weight: 650; color: var(--ink); line-height: 1.3; }
.platform-region {
  flex: none;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid transparent;
}
.platform-region.is-cn { color: #b45309; background: rgba(180, 83, 9, .08); border-color: rgba(180, 83, 9, .18); }
.platform-region.is-global { color: #0369a1; background: rgba(3, 105, 161, .08); border-color: rgba(3, 105, 161, .18); }
.platform-note {
  margin: 0;
  min-height: 31px;
  font-size: 10px;
  line-height: 1.55;
  color: #8a8177;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.platform-tags { display: flex; flex-wrap: wrap; gap: 4px; min-height: 20px; }
.platform-tag {
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid #eee4d9;
  background: #faf6f0;
  color: #8a8177;
  font-size: 9px;
  line-height: 1.6;
  white-space: nowrap;
}
.platform-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: auto; padding-top: 2px; }
.platform-link,
.platform-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 26px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #57534e;
  font-family: inherit;
  font-size: 10px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.platform-link .icon { width: 11px; height: 11px; }
.platform-link:hover { color: var(--accent-deep); border-color: rgba(228, 87, 46, .4); background: #fff8f3; }
.platform-link.is-primary {
  color: var(--accent-deep);
  border-color: rgba(228, 87, 46, .26);
  background: rgba(228, 87, 46, .07);
  font-weight: 600;
}
.platform-apply {
  margin-left: auto;
  color: #fff;
  border-color: #cf4a20;
  background: linear-gradient(180deg, #ea6033, #e0501f);
  font-weight: 600;
}
.platform-apply:hover { background: linear-gradient(180deg, #e15a2b, #d34718); border-color: #b8421a; }
.settings-platforms-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 5px 2px 0;
  font-size: 9.5px;
  line-height: 1.65;
  color: #a89f95;
}
.settings-platforms-hint .icon { width: 12px; height: 12px; flex: none; margin-top: 2px; }
.settings-select-wrap { width: 100%; min-width: 0; }
.settings-select-wrap select { width: 100%; height: 36px; font-size: 12.5px; }
.settings-field input.is-filled,
.settings-select-wrap select.is-filled { animation: fieldFilled 1.8s ease; }
@keyframes fieldFilled {
  0% { border-color: rgba(228, 87, 46, .8); background: #fff3ea; box-shadow: 0 0 0 4px rgba(228, 87, 46, .16); }
  60% { border-color: rgba(228, 87, 46, .45); background: #fffaf5; box-shadow: 0 0 0 2px rgba(228, 87, 46, .08); }
  100% { border-color: var(--line-strong); background: #fffdfb; box-shadow: none; }
}

/* 数字人工作台：推荐合成平台快捷链接 */
.digital-platform-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -2px 0 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.dpl-title { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 10.5px; font-weight: 600; color: #8a8177; }
.dpl-title .icon { width: 13px; height: 13px; color: var(--accent); }
.dpl-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #faf8f5;
  color: #57534e;
  font-size: 10.5px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.dpl-link small { font-size: 9px; color: #a89f95; font-weight: 400; }
.dpl-link .icon { width: 10px; height: 10px; color: #a89f95; }
.dpl-link:hover { color: var(--accent-deep); border-color: rgba(228, 87, 46, .35); background: #fff8f3; }
.dpl-hint { margin-left: auto; font-size: 9.5px; color: #a89f95; letter-spacing: .2px; }

@media (max-width: 720px) {
  .settings-platforms { padding: 11px 11px 9px; margin-bottom: 12px; }
  .settings-platforms-head h3 { font-size: 14px; }
  .settings-platforms-head p { font-size: 10px; }
  .platform-count { font-size: 9.5px; }
  .platform-rail { gap: 8px; padding-top: 10px; }
  .platform-card { flex: 0 0 232px; padding: 10px; }
  .platform-actions { gap: 4px; }
  .platform-link,
  .platform-apply { height: 28px; font-size: 10px; }
  .settings-platforms-hint { font-size: 9px; }
  .settings-select-wrap select { height: 40px; }
  .digital-platform-links { padding: 8px 10px; gap: 6px; }
  .dpl-title { width: 100%; }
  .dpl-link { flex: 1 0 auto; justify-content: center; height: 30px; }
  .dpl-hint { margin-left: 0; width: 100%; line-height: 1.6; }
}

/* =========================================================================
 * v3.2：我的音色 / 上传我的配音 / HeyGen 一键生成
 * ========================================================================= */
.settings-group-icon.is-voice { background: linear-gradient(150deg, #a78bfa, #6d28d9); }
.settings-heygen-hint {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 2px;
  padding: 8px 10px;
  border: 1px dashed rgba(228, 87, 46, .3);
  border-radius: 8px;
  background: #fffbf7;
  font-size: 10px;
  line-height: 1.65;
  color: #8a8177;
}
.settings-heygen-hint > .icon { width: 13px; height: 13px; color: var(--accent); flex: none; margin-top: 2px; }
.settings-heygen-hint b { display: block; font-size: 10.5px; color: #57534e; }
.settings-heygen-hint p { margin: 2px 0 0; }
.settings-heygen-hint a { display: inline-flex; align-items: center; gap: 2px; color: var(--accent-deep); font-weight: 600; }
.settings-heygen-hint a .icon { width: 10px; height: 10px; }

.settings-voice-links {
  margin-top: 13px;
  padding: 13px 15px;
  border: 1px solid rgba(139, 92, 246, .2);
  border-radius: 14px;
  background: linear-gradient(160deg, #fbf9ff, #f7f3ff);
}
.settings-voice-links-head b { display: block; margin-top: 3px; font-size: 14px; color: var(--ink); }
.settings-voice-links-head p { margin-top: 4px; max-width: 620px; font-size: 10.5px; line-height: 1.65; color: #8f879b; }
.settings-voice-link-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.settings-voice-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(139, 92, 246, .22);
  border-radius: 6px;
  background: #fff;
  color: #6d5b8f;
  font-size: 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.settings-voice-link .icon { width: 10px; height: 10px; color: #a99bc4; }
.settings-voice-link:hover { color: #5b21b6; border-color: rgba(139, 92, 246, .45); background: #faf7ff; }

.digital-head-actions { flex-wrap: wrap; }
.heygen-btn { white-space: nowrap; }
.heygen-btn.is-disabled {
  opacity: .6;
  cursor: not-allowed;
  background: #f5f0ea;
  color: #a89f95;
  border-color: var(--line-strong);
}
.my-audio {
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: #fdfbf8;
}
.my-audio.is-ready { border-style: solid; border-color: rgba(34, 197, 94, .28); background: #f7fdf9; }
.my-audio.is-uploading { border-color: rgba(228, 87, 46, .35); background: #fffaf6; }
.my-audio-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.my-audio-kicker { flex: none; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; color: #a89f95; }
.my-audio-name {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink);
}
.my-audio-dur { padding: 1px 6px; border-radius: 999px; background: #f0ece5; color: #8a8177; font-size: 9.5px; }
.my-audio-del { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; color: #b45c4a; font-size: 10px; }
.my-audio-del .icon { width: 11px; height: 11px; }
.my-audio-hint { margin: 5px 0 0; font-size: 9.5px; line-height: 1.6; color: #a89f95; }
.my-audio-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.my-audio-player { display: block; width: 100%; height: 34px; margin-top: 7px; border-radius: 6px; }
.my-audio-replace { margin-top: 7px; }
.my-audio-pct { margin-left: auto; font-size: 10px; font-weight: 600; color: var(--accent-deep); }
.audio-progress { height: 7px; margin-top: 7px; border-radius: 999px; background: #f0e9e0; overflow: hidden; }
.audio-progress-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #ea6033);
  transition: width .15s ease;
}
.digital-voice-config { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; color: var(--accent-deep); font-size: 10px; }
.digital-voice-config .icon { width: 11px; height: 11px; }
.digital-pkg-audio {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid rgba(4, 120, 87, .18);
  border-radius: 999px;
  background: rgba(4, 120, 87, .07);
  color: #047857;
  font-size: 9.5px;
}
.digital-pkg-audio .icon { width: 11px; height: 11px; }
.pkg-audio-source {
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #faf7f2;
  color: #8a8177;
  font-size: 9.5px;
}
.pkg-audio-source b { color: var(--ink); }

/* HeyGen 任务面板 */
.heygen-panel {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.heygen-panel.is-pending { border-color: rgba(228, 87, 46, .25); background: linear-gradient(160deg, #fffaf6, #fff7f0); }
.heygen-panel.is-done { display: block; border-color: rgba(34, 197, 94, .24); background: linear-gradient(160deg, #f7fdf9, #f2fbf5); }
.heygen-panel.is-error { display: block; border-color: rgba(220, 38, 38, .26); background: #fff8f7; }
.heygen-panel > .spinner { flex: none; margin-top: 4px; }
.heygen-head { display: flex; align-items: flex-start; gap: 9px; }
.heygen-badge {
  flex: none;
  margin-top: 1px;
  padding: 3px 7px;
  border-radius: 5px;
  background: #111827;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .8px;
}
.heygen-copy { flex: 1; min-width: 0; }
.heygen-copy b { display: block; font-size: 12.5px; color: var(--ink); }
.heygen-copy p { margin-top: 3px; font-size: 10.5px; line-height: 1.6; color: #8a8177; }
.heygen-task-id {
  display: inline-block;
  margin-top: 4px;
  color: #a89f95;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
}
.heygen-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; margin-left: auto; }
.heygen-panel.is-pending .heygen-actions { margin-top: 0; align-self: center; }
.heygen-panel.is-done .heygen-actions,
.heygen-panel.is-error .heygen-actions { margin-left: 0; }
.heygen-video { display: block; width: 100%; max-height: 380px; margin-top: 10px; border-radius: 9px; background: #000; object-fit: cover; }
.heygen-error { display: flex; align-items: flex-start; gap: 7px; color: #b91c1c; font-size: 11px; line-height: 1.6; }
.heygen-error > .icon { flex: none; width: 14px; height: 14px; margin-top: 1px; }
.heygen-error b { display: block; font-size: 12px; }
.heygen-error p { margin-top: 2px; color: #b45c4a; }

@media (max-width: 720px) {
  .settings-voice-links { padding: 11px 12px; }
  .settings-voice-links-head b { font-size: 13px; }
  .settings-voice-link { height: 30px; }
  .heygen-btn { width: 100%; }
  .digital-head-actions .heygen-btn { flex: 1 0 100%; }
  .my-audio-name { max-width: 150px; }
  .my-audio-actions .btn { width: 100%; }
  .heygen-panel { padding: 11px; }
  .heygen-panel.is-pending .heygen-actions { width: 100%; margin-top: 2px; }
  .heygen-panel.is-pending .heygen-actions .btn { flex: 1; }
  .heygen-video { max-height: 240px; }
}

/* =========================================================================
 * v3.3：数字人平台卡片 API 修正 / 聚合平台 / 素材准备 / HeyGen 选择器
 * ========================================================================= */
.platform-tag.is-no-api {
  color: #047857;
  border-color: rgba(4, 120, 87, .2);
  background: rgba(4, 120, 87, .07);
}
.platform-card.is-no-api { background: #fdfcfb; }
.platform-card.is-no-api .platform-note { color: #9a958e; }

.settings-api-links {
  margin: -2px 0 14px;
  padding: 12px 15px;
  border: 1px solid rgba(245, 158, 11, .24);
  border-radius: 14px;
  background: linear-gradient(160deg, #fffdf7, #fffaf0);
}
.settings-api-links-head b { display: block; margin-top: 3px; font-size: 13.5px; color: var(--ink); }
.settings-api-links-head p { margin-top: 3px; max-width: 680px; font-size: 10px; line-height: 1.65; color: #9a8f7c; }
.settings-api-link-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.settings-api-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 9px;
  border: 1px solid rgba(180, 83, 9, .2);
  border-radius: 6px;
  background: #fff;
  color: #9a5b12;
  font-size: 10.5px;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s ease, background .15s ease;
}
.settings-api-link small { font-size: 9px; color: #b7a78f; font-weight: 400; }
.settings-api-link .icon { width: 10px; height: 10px; color: #c9a86a; }
.settings-api-link:hover { border-color: rgba(180, 83, 9, .4); background: #fffdf7; }

.settings-heygen-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 9px 10px;
  border: 1px solid rgba(228, 87, 46, .18);
  border-radius: 9px;
  background: #fffaf6;
}
.settings-heygen-actions.is-disabled {
  border-style: dashed;
  background: #fbf8f4;
  color: #a89f95;
  font-size: 10px;
  line-height: 1.6;
}
.settings-heygen-actions.is-disabled .icon { width: 13px; height: 13px; flex: none; color: var(--accent); }
.settings-heygen-actions-hint { font-size: 9.5px; color: #a89f95; }

/* 素材准备 */
.material-prep {
  margin: 0 0 12px;
  padding: 13px 15px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, #fff, #fffaf6);
  box-shadow: var(--shadow-sm);
}
.material-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.material-kicker { font-size: 8.5px; font-weight: 700; letter-spacing: 1.8px; color: var(--accent-deep); opacity: .72; }
.material-head h2 { margin-top: 2px; font-size: 16px; color: var(--ink); letter-spacing: .3px; }
.material-head p { margin-top: 3px; max-width: 620px; font-size: 10.5px; line-height: 1.65; color: #9a8172; }
.material-tip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(4, 120, 87, .07);
  border: 1px solid rgba(4, 120, 87, .16);
  color: #047857;
  font-size: 9px;
  white-space: nowrap;
}
.material-tip .icon { width: 11px; height: 11px; }
.material-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.material-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.material-card-head { display: flex; align-items: flex-start; gap: 8px; }
.material-icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(228, 87, 46, .1);
  color: var(--accent-deep);
}
.material-icon.is-voice { background: rgba(139, 92, 246, .12); color: #6d28d9; }
.material-icon .icon { width: 15px; height: 15px; }
.material-card-head > div { min-width: 0; flex: 1; }
.material-card-head b { display: block; font-size: 12.5px; color: var(--ink); }
.material-card-head em { display: block; margin-top: 2px; font-size: 9.5px; line-height: 1.55; color: #8a8177; font-style: normal; }
.material-card-head .settings-status { margin-left: auto; flex: none; }
.material-thumb {
  height: 94px;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #faf5ee;
  display: flex;
  align-items: center;
  justify-content: center;
}
.material-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.material-thumb.is-empty { flex-direction: column; gap: 4px; color: #c0b5a8; font-size: 9px; }
.material-thumb.is-empty .icon { width: 22px; height: 22px; }
.material-file {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(4, 120, 87, .06);
  color: #047857;
  font-size: 9.5px;
  line-height: 1.5;
}
.material-file .icon { width: 11px; height: 11px; }
.material-file em { color: #8a8177; font-style: normal; }
.material-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.material-actions .btn { height: 27px; padding: 0 8px; font-size: 10px; }
.material-actions .btn[disabled] { opacity: .5; cursor: not-allowed; }
.material-hint { margin: 0; font-size: 9.5px; line-height: 1.6; color: #a89f95; }
.material-customtts {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding: 4px 8px;
  border: 1px solid rgba(139, 92, 246, .16);
  border-radius: 6px;
  background: rgba(139, 92, 246, .07);
  color: #6d28d9;
  font-size: 9.5px;
}
.material-customtts .icon { width: 11px; height: 11px; }
.material-customtts em { color: #8a8177; font-style: normal; }
.material-sample { display: flex; flex-direction: column; gap: 3px; }
.material-sample audio { display: block; width: 100%; height: 32px; }
.material-file-name { font-size: 9.5px; color: #8a8177; }

/* HeyGen 形象 / 声音选择器 */
.hp-overlay { position: fixed; inset: 0; z-index: 1400; display: flex; align-items: center; justify-content: center; padding: 22px; }
.hp-overlay[hidden] { display: none; }
.hp-backdrop { position: absolute; inset: 0; background: rgba(24, 18, 13, .52); backdrop-filter: blur(4px); }
.hp-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(780px, 95vw);
  max-height: 88vh;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 40px 90px -36px rgba(24, 18, 13, .65);
  animation: hpIn .18s ease;
}
@keyframes hpIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.hp-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.hp-head > div { flex: 1; min-width: 0; }
.hp-kicker { font-size: 8.5px; font-weight: 700; letter-spacing: 1.8px; color: var(--accent-deep); opacity: .72; }
.hp-head h3 { margin-top: 3px; font-size: 17px; color: var(--ink); }
.hp-head p { margin-top: 4px; font-size: 10.5px; line-height: 1.6; color: #8a8177; }
.hp-tools { display: flex; align-items: center; gap: 10px; padding: 11px 18px 8px; }
.hp-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #faf8f5;
}
.hp-search .icon { width: 14px; height: 14px; color: #a89f95; flex: none; }
.hp-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: inherit; font-size: 12px; color: var(--ink); }
.hp-count { flex: none; font-size: 10px; color: #a89f95; white-space: nowrap; }
.hp-body { flex: 1; min-height: 190px; max-height: 58vh; overflow-y: auto; padding: 6px 18px 12px; }
.hp-loading, .hp-empty { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 160px; color: #a89f95; font-size: 11px; }
.hp-empty .icon { width: 20px; height: 20px; }
.hp-error { display: flex; align-items: flex-start; gap: 8px; padding: 18px 4px; color: #b91c1c; font-size: 11px; line-height: 1.6; }
.hp-error > .icon { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.hp-error b { display: block; font-size: 12px; }
.hp-error p { margin-top: 2px; color: #b45c4a; }
.hp-error .btn { margin-left: auto; flex: none; }
.hp-avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
.hp-avatar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.hp-avatar-item:hover { border-color: rgba(228, 87, 46, .45); box-shadow: 0 12px 22px -20px rgba(31, 35, 40, .5); transform: translateY(-1px); }
.hp-avatar-thumb { position: relative; aspect-ratio: 1 / 1; border-radius: 7px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(150deg, #f1e7dc, #e4d3c2); }
.hp-avatar-thumb img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.hp-avatar-thumb.is-broken img { display: none; }
.hp-avatar-initial { position: absolute; z-index: 0; font-size: 22px; font-weight: 700; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.2); }
.hp-avatar-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; color: var(--ink); }
.hp-avatar-item em { font-size: 9px; color: #a89f95; font-style: normal; }
.hp-voice-list { display: flex; flex-direction: column; gap: 6px; }
.hp-voice-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.hp-voice-item:hover { border-color: rgba(228, 87, 46, .4); background: #fffaf6; }
.hp-voice-icon { flex: none; width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: rgba(139, 92, 246, .1); color: #6d28d9; }
.hp-voice-icon .icon { width: 14px; height: 14px; }
.hp-voice-copy { flex: 1; min-width: 0; }
.hp-voice-copy b { display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--ink); }
.hp-voice-copy em { display: block; margin-top: 2px; font-size: 9.5px; color: #a89f95; font-style: normal; }
.hp-voice-mine { flex: none; padding: 1px 5px; border-radius: 999px; background: rgba(228, 87, 46, .1); color: var(--accent-deep); font-size: 8.5px; font-weight: 600; }
.hp-voice-preview { flex: none; display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: #8a8177; font-family: inherit; font-size: 10px; cursor: pointer; }
.hp-voice-preview .icon { width: 10px; height: 10px; }
.hp-voice-preview:hover, .hp-voice-preview.is-playing { color: var(--accent-deep); border-color: rgba(228, 87, 46, .4); background: #fff8f3; }
.hp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--line); background: #fffdfb; font-size: 9.5px; color: #a89f95; }

@media (max-width: 720px) {
  .material-prep { padding: 11px 12px; }
  .material-head { flex-direction: column; gap: 5px; }
  .material-head p { font-size: 10px; }
  .material-grid { grid-template-columns: 1fr; }
  .material-thumb { height: 82px; }
  .material-actions .btn { flex: 1 0 auto; justify-content: center; }
  .settings-api-links { padding: 11px 12px; }
  .settings-api-link { height: 30px; }
  .hp-overlay { padding: 10px; align-items: flex-end; }
  .hp-modal { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
  .hp-head { padding: 13px 14px 10px; }
  .hp-tools { padding: 9px 14px 6px; }
  .hp-body { padding: 4px 14px 10px; }
  .hp-avatar-grid { grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); }
  .hp-foot { padding: 9px 14px; }
  .settings-heygen-actions .btn { flex: 1; justify-content: center; }
}

/* =========================================================================
 * v3.4：形象预览完整显示 + 国内创建渠道 + 上传配音即当前结果 + 任务包路径
 * ========================================================================= */
.material-thumb {
  position: relative;
  width: 100%;
  height: 178px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #f8f4ee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
button.material-thumb { cursor: zoom-in; }
.material-thumb.is-media img,
.material-thumb.is-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8f4ee;
}
.material-thumb.is-video { cursor: default; }
.material-thumb.is-empty {
  flex-direction: column;
  gap: 6px;
  border: 1.5px dashed var(--line-strong);
  background: #fcfaf7;
  color: #b9ad9f;
  font-size: 9.5px;
  line-height: 1.6;
  text-align: center;
  padding: 12px;
}
.material-thumb.is-empty .icon { width: 26px; height: 26px; opacity: .7; }
.material-zoom {
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(24, 20, 16, .66);
  color: #fff;
  font-size: 9px;
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
}
.material-zoom .icon { width: 10px; height: 10px; }
.material-thumb:hover .material-zoom { opacity: 1; }
.material-selected {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 8px;
  border-radius: 6px;
  background: #faf7f2;
  color: #8a8177;
  font-size: 9.5px;
  line-height: 1.5;
}
.material-selected b { color: var(--ink); font-weight: 600; }
.material-selected code {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8.5px;
  color: #a89f95;
}
.material-domestic {
  margin-top: 1px;
  padding: 9px 10px;
  border: 1px solid rgba(245, 158, 11, .24);
  border-radius: 9px;
  background: #fffdf7;
}
.material-domestic-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 6px; }
.material-domestic-head b { font-size: 10.5px; color: #9a5b12; }
.material-domestic-head em { font-style: normal; font-size: 9px; color: #b7a78f; }
.material-domestic-links { display: flex; flex-wrap: wrap; gap: 4px; }
.material-domestic-links a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(180, 83, 9, .18);
  border-radius: 5px;
  background: #fff;
  color: #9a5b12;
  font-size: 9.5px;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s ease, background .15s ease;
}
.material-domestic-links a .icon { width: 9px; height: 9px; color: #c9a86a; }
.material-domestic-links a:hover { border-color: rgba(180, 83, 9, .4); background: #fffaf0; }
.material-domestic p { margin: 6px 0 0; font-size: 9px; line-height: 1.6; color: #a89f95; }

/* 形象大图 lightbox */
.lightbox-overlay { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox-overlay[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(16, 12, 8, .8); backdrop-filter: blur(6px); }
.lightbox-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px; max-width: min(940px, 94vw); max-height: 92vh; }
.lightbox-media {
  display: block;
  max-width: min(940px, 94vw);
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  background: #0b1120;
  box-shadow: 0 40px 90px -36px rgba(0, 0, 0, .7);
}
.lightbox-close { position: absolute; top: -2px; right: -2px; z-index: 2; width: 34px; height: 34px; background: rgba(255, 255, 255, .94); color: #57534e; border-radius: 50%; }
.lightbox-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .95);
  color: #57534e;
  font-size: 10.5px;
}
.lightbox-caption b { font-weight: 600; }
.lightbox-caption code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  color: #8a8177;
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 上传配音即当前结果：锁定按钮 + 提示 */
.btn.is-locked,
.btn[disabled].is-locked {
  opacity: .72;
  cursor: not-allowed;
  background: #f5f0ea;
  border-color: var(--line-strong);
  color: #8a8177;
}
.tts-locked-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 5px 8px;
  border: 1px solid rgba(245, 158, 11, .22);
  border-radius: 6px;
  background: #fffaf0;
  color: #9a5b12;
  font-size: 9.5px;
  line-height: 1.5;
}
.tts-locked-hint .icon { flex: none; width: 12px; height: 12px; color: #b45309; }
.voice-replace-hint {
  margin-left: auto;
  padding: 1px 6px;
  border: 1px solid rgba(245, 158, 11, .2);
  border-radius: 999px;
  background: #fffaf0;
  color: #b45309;
  font-size: 9px;
  white-space: nowrap;
}
.digital-output.tts-output.is-upload {
  border-color: rgba(34, 197, 94, .3);
  background: #f7fdf9;
}
.tts-upload-note { display: flex; align-items: center; gap: 4px; margin-top: 5px; color: #047857; font-size: 9.5px; }
.tts-upload-note .icon { width: 11px; height: 11px; }

/* 任务包本机路径 */
.pkg-local { margin-top: 8px; padding: 8px 9px; border: 1px solid rgba(4, 120, 87, .18); border-radius: 7px; background: #f7fdf9; }
.pkg-local-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: #047857; font-size: 9.5px; }
.pkg-local-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  color: #047857;
  font-size: 9.5px;
}
.pkg-local-btn .icon { width: 11px; height: 11px; }
.pkg-local-path {
  display: block;
  margin-top: 5px;
  padding: 4px 6px;
  border: 1px solid #e7f0ea;
  border-radius: 4px;
  background: #fff;
  color: #57534e;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  line-height: 1.5;
  word-break: break-all;
}

@media (max-width: 720px) {
  .material-thumb { height: 168px; }
  .material-domestic-links a { height: 28px; }
  .material-selected code { max-width: 100%; }
  .lightbox-overlay { padding: 12px; }
  .lightbox-card { max-width: 100%; }
  .lightbox-media { max-width: 100%; max-height: 76vh; }
  .voice-replace-hint { margin-left: 0; width: 100%; white-space: normal; line-height: 1.5; }
  .pkg-local-btn { margin-left: 0; }
}

/* v4.0：主应用顶部「网址导航」入口 */
.nav-tab-link { text-decoration: none; }
.nav-tab-link:hover { color: var(--ink); }
.nav-tab-link .icon { color: #a89f95; }

/* =========================================================================
 * v4.1：视频缩略图选择器 / 我的录音 / 代理预览 / 剪映文案
 * ========================================================================= */
.digital-manual-note {
  flex-basis: 100%;
  margin-top: 3px;
  font-size: 9.5px;
  line-height: 1.6;
  color: #a89f95;
}
.material-voice-note {
  margin: 0;
  padding: 5px 8px;
  border: 1px solid rgba(139, 92, 246, .16);
  border-radius: 6px;
  background: #fbf9ff;
  color: #7b6a95;
  font-size: 9px;
  line-height: 1.6;
}

/* 已选视频卡片 */
.digital-video-selected {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.digital-video-selected:hover { border-color: rgba(228, 87, 46, .42); box-shadow: 0 10px 24px -22px rgba(33, 29, 24, .5); }
.vp-selected-thumb,
.vp-thumb {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(145deg, #f1e7dc, #e6d6c5);
}
.vp-selected-thumb { width: 86px; height: 58px; }
.vp-thumb { width: 100%; height: 100%; }
.vp-selected-thumb img,
.vp-thumb img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.vp-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}
.vp-fallback.tone-0 { background: linear-gradient(145deg, #f59e0b, #b45309); }
.vp-fallback.tone-1 { background: linear-gradient(145deg, #38bdf8, #0369a1); }
.vp-fallback.tone-2 { background: linear-gradient(145deg, #a78bfa, #5b21b6); }
.vp-fallback.tone-3 { background: linear-gradient(145deg, #34d399, #047857); }
.vp-fallback.tone-4 { background: linear-gradient(145deg, #fb7185, #9f1239); }
.vp-fallback.tone-5 { background: linear-gradient(145deg, #64748b, #1e293b); }
.digital-video-selected-copy { flex: 1; min-width: 0; }
.digital-video-selected-copy b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ink); }
.digital-video-selected-copy em { display: block; margin-top: 3px; font-style: normal; font-size: 10px; color: var(--ink-3); }
.digital-video-change {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid rgba(228, 87, 46, .25);
  background: rgba(228, 87, 46, .07);
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 600;
}
.digital-video-change .icon { width: 12px; height: 12px; }
.digital-keyboard-select { margin-top: 7px; }
.digital-keyboard-select summary { cursor: pointer; font-size: 9.5px; color: #a89f95; }
.digital-keyboard-select .digital-select { margin-top: 5px; }

/* 视频选择弹层 */
.vp-overlay { position: fixed; inset: 0; z-index: 1380; display: flex; align-items: center; justify-content: center; padding: 22px; }
.vp-overlay[hidden] { display: none; }
.vp-backdrop { position: absolute; inset: 0; background: rgba(24, 18, 13, .54); backdrop-filter: blur(5px); }
.vp-card-panel {
  position: relative;
  width: min(1020px, 95vw);
  height: min(830px, 90vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fbf8f3;
  box-shadow: 0 50px 100px -40px rgba(24, 18, 13, .65);
  animation: hpIn .18s ease;
}
.vp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px 10px; background: #fff; border-bottom: 1px solid var(--line); }
.vp-head h3 { margin: 4px 0 0; font-size: 20px; }
.vp-head p { margin: 4px 0 0; font-size: 10.5px; color: #8a8177; }
.vp-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 20px 9px; background: #fff; }
.vp-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #faf8f5; }
.vp-search .icon { width: 14px; height: 14px; color: #a89f95; }
.vp-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 12px; color: var(--ink); }
.vp-filters { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.vp-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 29px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-3);
  font-size: 10px;
  cursor: pointer;
  font-family: inherit;
}
.vp-filter em { font-style: normal; font-size: 8.5px; color: #b3a89b; }
.vp-filter:hover { border-color: rgba(228, 87, 46, .3); color: var(--accent-deep); }
.vp-filter.is-active { color: var(--accent-deep); border-color: rgba(228, 87, 46, .35); background: var(--accent-soft); font-weight: 600; }
.vp-body { flex: 1; overflow-y: auto; padding: 12px 20px 16px; }
.vp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.vp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.vp-card:hover { transform: translateY(-1px); border-color: rgba(228, 87, 46, .4); box-shadow: 0 14px 24px -24px rgba(33, 29, 24, .6); }
.vp-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(228, 87, 46, .16); }
.vp-thumb-wrap { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; }
.vp-copy { display: block; min-width: 0; }
.vp-copy b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink);
  min-height: 32px;
}
.vp-copy em { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 3px; font-style: normal; font-size: 9px; color: #a89f95; }
.vp-copy em .platform-badge { font-size: 8.5px; }
.vp-check {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 20px;
  height: 20px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}
.vp-check .icon { width: 12px; height: 12px; }
.vp-card.is-selected .vp-check { display: grid; }
.vp-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 300px; color: #a89f95; font-size: 11px; }
.vp-empty .icon { width: 26px; height: 26px; }
.vp-empty b { color: var(--ink-2); font-size: 14px; }
.vp-empty p { margin: 0; }
.vp-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 20px; border-top: 1px solid var(--line); background: #fff; font-size: 10px; color: #a89f95; }
.vp-foot > span:first-child { margin-right: auto; }
.vp-foot-tip { color: #b3a89b; }

@media (max-width: 720px) {
  .digital-video-selected { padding: 8px; gap: 8px; }
  .vp-selected-thumb { width: 64px; height: 46px; }
  .digital-video-selected-copy b { font-size: 11.5px; }
  .digital-video-change { height: 26px; padding: 0 7px; font-size: 9.5px; }
  .vp-overlay { padding: 0; align-items: stretch; }
  .vp-card-panel { width: 100%; height: 100vh; border-radius: 0; }
  .vp-head { padding: 12px 14px 9px; }
  .vp-tools { padding: 9px 14px 7px; }
  .vp-search { min-width: 100%; }
  .vp-body { padding: 9px 12px 12px; }
  .vp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vp-foot { padding: 9px 14px; flex-wrap: wrap; }
  .vp-foot .btn { flex: 1; }
}
