/* =====================================================================
   帧作 · AI 短视频工坊 — 设计系统
   暖调深色影棚 + 信号黄
   ===================================================================== */

:root {
  --bg: #0b0a09;
  --bg-2: #11100e;
  --surface: #161513;
  --surface-2: #1d1b19;
  --surface-3: #25231f;
  --surface-4: #2e2b27;
  --line: rgba(255, 238, 214, 0.07);
  --line-2: rgba(255, 238, 214, 0.12);
  --line-3: rgba(255, 238, 214, 0.2);

  --text: #f6f2ea;
  --text-2: #b9b1a5;
  --text-3: #7d766c;
  --text-4: #57524b;

  --accent: #ffd23f;
  --accent-2: #ffae1f;
  --accent-soft: rgba(255, 210, 63, 0.12);
  --accent-line: rgba(255, 210, 63, 0.38);
  --accent-ink: #1c1500;

  --coral: #ff6363;
  --coral-soft: rgba(255, 99, 99, 0.12);
  --mint: #52dca0;
  --mint-soft: rgba(82, 220, 160, 0.12);
  --sky: #78b9ff;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.035) inset, 0 24px 48px -28px rgba(0, 0, 0, 0.7);
  --font: 'PuHuiTi', -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'tnum' 0;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--accent); }
[hidden] { display: none !important; }
::selection { background: rgba(255, 210, 63, 0.35); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 238, 214, 0.1); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 238, 214, 0.18); }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 背景氛围 */
.bg-aura {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(255, 186, 58, 0.11), transparent 60%),
    radial-gradient(700px 520px at 100% 0%, rgba(255, 120, 72, 0.06), transparent 60%),
    radial-gradient(900px 700px at 85% 110%, rgba(255, 210, 63, 0.05), transparent 60%),
    linear-gradient(180deg, #0d0c0a 0%, #0a0908 100%);
}
.bg-grain {
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 图标 */
i[data-icon], .ic { display: inline-flex; width: 18px; height: 18px; flex: none; align-items: center; justify-content: center; }
i[data-icon] svg { width: 100%; height: 100%; }

/* ===================== 顶栏 ===================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  background: rgba(11, 10, 9, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, #ffe680 0%, #ffcf33 45%, #ffa51c 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 6px 18px -6px rgba(255, 190, 40, 0.6);
}
.brand-mark svg { width: 22px; height: 22px; fill: var(--accent-ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 18px; font-weight: 800; letter-spacing: 0.06em; }
.brand-text span { font-size: 11.5px; color: var(--text-3); letter-spacing: 0.08em; }

.mode-switch {
  position: relative;
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}
.mode-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: var(--tw, 120px);
  transform: translateX(var(--tx, 0));
  border-radius: 999px;
  background: linear-gradient(140deg, #ffe066, #ffc226 60%, #ffab1f);
  box-shadow: 0 6px 20px -8px rgba(255, 190, 40, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transition: transform 0.45s var(--ease-out), width 0.45s var(--ease-out);
}
.mode-btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 20px;
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 700;
  font-size: 14px;
  transition: color 0.3s var(--ease);
}
.mode-btn i { width: 17px; height: 17px; }
.mode-btn:hover { color: var(--text); }
.mode-btn.is-active { color: var(--accent-ink); }

.topbar-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }

/* ===================== 按钮 ===================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.25s, opacity 0.2s;
  user-select: none;
}
.btn i { width: 17px; height: 17px; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
.btn-sm i { width: 15px; height: 15px; }
.btn-xl { height: 56px; padding: 0 26px; font-size: 16px; border-radius: 16px; }
.btn-xl i { width: 20px; height: 20px; }

.btn-primary {
  color: var(--accent-ink);
  background: linear-gradient(135deg, #ffe46b 0%, #ffd03a 42%, #ffb021 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset, 0 -2px 0 rgba(0, 0, 0, 0.12) inset, 0 12px 32px -12px rgba(255, 186, 40, 0.65);
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease-out);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3) inset, 0 -2px 0 rgba(0, 0, 0, 0.12) inset, 0 16px 40px -12px rgba(255, 186, 40, 0.85); transform: translateY(-1px); }
.btn-primary:hover:not(:disabled)::after { transform: translateX(120%); }
.btn-primary em {
  font-style: normal;
  font-weight: 700;
  font-size: 12.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(28, 21, 0, 0.12);
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
.btn-primary.is-busy { pointer-events: none; }
.btn-primary.is-busy i { animation: spin 1s linear infinite; }

.btn-secondary { background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); }
.btn-secondary:hover { background: var(--surface-4); border-color: var(--line-3); }
.btn-ghost { color: var(--text-2); border: 1px solid var(--line); background: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); border-color: var(--line-2); }
.btn-soft { color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(255, 210, 63, 0.18); }
.btn-soft:hover { background: rgba(255, 210, 63, 0.18); border-color: var(--accent-line); }
.btn-danger { background: var(--coral); color: #2a0606; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-danger-ghost { color: var(--coral); border: 1px solid rgba(255, 99, 99, 0.25); }
.btn-danger-ghost:hover { background: var(--coral-soft); }

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: var(--text-2);
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm i { width: 15px; height: 15px; }
.link-btn { color: var(--accent); font-size: 12.5px; font-weight: 700; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

.count {
  font-style: normal;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

/* ===================== 布局 ===================== */
.workspace {
  max-width: 1400px;
  margin: 0 auto;
  padding: 36px 32px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 40px;
  align-items: start;
  animation: viewIn 0.6s var(--ease-out);
}
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.col-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.col-preview { position: sticky; top: 92px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 10px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: var(--accent); }
.page-head h1 { margin: 0; font-size: 30px; line-height: 1.25; font-weight: 800; letter-spacing: 0.01em; }
.lede { margin: 10px 0 0; max-width: 620px; color: var(--text-2); font-size: 14.5px; }

.stepper { list-style: none; display: flex; gap: 6px; margin: 0; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); flex: none; }
.stepper li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.3s var(--ease);
}
.stepper li span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.stepper li.is-done { color: var(--text-2); cursor: pointer; }
.stepper li.is-done span { background: var(--mint-soft); color: var(--mint); }
.stepper li.is-active { color: var(--text); background: var(--surface-3); }
.stepper li.is-active span { background: var(--accent); color: var(--accent-ink); }

.stage { display: flex; flex-direction: column; gap: 18px; animation: viewIn 0.5s var(--ease-out); }

/* ===================== 卡片 ===================== */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 40%), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 22px 24px 24px;
  box-shadow: var(--shadow-card);
}
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.card-head > div:first-of-type { flex: 1; min-width: 0; }
.card-head h2 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: 0.01em; }
.card-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-3); }
.card-no {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.card-no i { width: 16px; height: 16px; }
.live-dot { position: relative; }
.live-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 210, 63, 0.6);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 210, 63, 0.55); } 70% { box-shadow: 0 0 0 10px rgba(255, 210, 63, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 210, 63, 0); } }

/* ===================== 表单 ===================== */
.field { display: flex; flex-direction: column; gap: 8px; }
.field + .field, .grid-2 + .field, .field + .grid-2, .field + .adv, .grid-2 + .adv { margin-top: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 > .field + .field { margin-top: 0; }
.label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.label em { font-style: normal; font-weight: 400; color: var(--text-4); margin-left: 6px; font-size: 12px; }
.label-row { display: flex; align-items: center; gap: 10px; }
.label-row .label { margin-right: auto; }
.hint { margin: 0; font-size: 12px; color: var(--text-3); line-height: 1.7; }
.hint code { font-size: 11.5px; }

.input, textarea, .select-wrap select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 14px;
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.25s, background 0.2s;
}
.input::placeholder, textarea::placeholder { color: var(--text-4); }
.input:hover, textarea:hover { border-color: var(--line-2); }
.input:focus, textarea:focus, .select-wrap select:focus {
  border-color: var(--accent-line);
  background: #1f1d1a;
  box-shadow: 0 0 0 4px rgba(255, 210, 63, 0.08);
}
textarea { resize: vertical; min-height: 96px; padding: 13px 16px; }
#script, #mText { font-size: 15px; line-height: 1.75; }
.input-title { font-size: 16px; font-weight: 700; padding: 13px 16px; }
.mono { font-family: var(--mono) !important; font-size: 12.5px !important; line-height: 1.7 !important; }
.field-foot { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.field-foot .link-btn { margin-left: auto; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-4); }
.warn-text { color: var(--coral); margin-left: auto; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--text-3);
  border-bottom: 1.6px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select-wrap select { appearance: none; padding-right: 36px; cursor: pointer; }

/* 分段选择 */
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.seg button {
  flex: 1;
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.seg button:hover { color: var(--text); }
.seg button.is-on { background: var(--surface-4); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 4px 12px -6px rgba(0, 0, 0, 0.6); }
.seg-sm button { height: 30px; padding: 0 11px; font-size: 12.5px; }
.seg-xs { border-radius: 10px; }
.seg-xs button { height: 28px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.seg-res { display: flex; }
.seg-res button { height: 46px; padding: 0 6px; }
#paceSeg { display: flex; }
#paceSeg button { height: 46px; }

/* 比例 */
.ratio-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ratio-row button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s var(--ease);
}
.ratio-row button:hover { color: var(--text); border-color: var(--line-2); }
.ratio-row button.is-on { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }
.rt {
  --s: 22px;
  display: block;
  width: calc(var(--s) * var(--w) / max(var(--w), var(--h)));
  height: calc(var(--s) * var(--h) / max(var(--w), var(--h)));
  border: 1.6px solid currentColor;
  border-radius: 4px;
  opacity: 0.9;
}
.ratio-row button.is-on .rt { border-color: var(--accent); background: rgba(255, 210, 63, 0.18); }

/* 滑块 */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; --p: 5%; }
.range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent) 0 var(--p), var(--surface-4) var(--p) 100%);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s;
}
.range:hover::-webkit-slider-thumb { transform: scale(1.1); }
.range:disabled { opacity: 0.5; cursor: default; }
.range::-moz-range-track { height: 6px; border-radius: 6px; background: var(--surface-4); }
.range::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--accent); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); }
.range-thin::-webkit-slider-runnable-track { height: 4px; }
.range-thin::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -5px; border-width: 3px; }
.range-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-4); padding: 0 2px; margin-top: -2px; font-variant-numeric: tabular-nums; }
.dur-val { font-size: 15px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; }

.chip-toggle { display: inline-flex; align-items: center; cursor: pointer; }
.chip-toggle input { display: none; }
.chip-toggle span {
  height: 26px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  border: 1px solid var(--line-2);
  transition: all 0.2s;
}
.chip-toggle input:checked + span { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .sw { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--surface-4); border: 1px solid var(--line-2); transition: background 0.25s, border-color 0.25s; flex: none; }
.switch .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform 0.3s var(--ease-out), background 0.25s; }
.switch input:checked + .sw { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .sw::after { transform: translateX(16px); background: var(--accent-ink); }
.switch.sm { font-size: 12.5px; gap: 8px; }
.switch.sm .sw { width: 32px; height: 19px; }
.switch.sm .sw::after { width: 13px; height: 13px; }
.switch.sm input:checked + .sw::after { transform: translateX(13px); }
.toggles { justify-content: flex-end; gap: 12px; padding-bottom: 4px; }
.head-toggles { display: flex; gap: 16px; }

.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--mint-soft); color: var(--mint); }
.tag.is-custom { background: var(--accent-soft); color: var(--accent); }
.pill-count { font-size: 12px; font-weight: 700; color: var(--text-3); padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pill-count.is-full { color: var(--coral); }

/* 高级设置 */
.adv { border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(0, 0, 0, 0.12); overflow: hidden; }
.adv summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.adv summary::-webkit-details-marker { display: none; }
.adv summary span { font-weight: 400; color: var(--text-4); font-size: 12px; }
.adv summary .chev { margin-left: auto; transition: transform 0.3s var(--ease); width: 16px; height: 16px; color: var(--text-3); }
.adv[open] summary .chev { transform: rotate(180deg); }
.adv summary:hover { color: var(--text); }
.adv-body { padding: 4px 16px 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.adv.slim summary { padding: 11px 14px; }

/* 上传 */
.drops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 22px 12px 18px;
  border-radius: var(--r-lg);
  border: 1.5px dashed var(--line-3);
  background: rgba(255, 255, 255, 0.012);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.drop:hover, .drop.is-over { border-color: var(--accent-line); background: var(--accent-soft); transform: translateY(-2px); }
.drop.is-over { border-style: solid; }
.drop.is-full { opacity: 0.45; pointer-events: none; }
.drop-ic {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  background: var(--surface-3);
  color: var(--accent);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease-out);
}
.drop:hover .drop-ic { transform: scale(1.06) rotate(-4deg); }
.drop-ic i { width: 21px; height: 21px; }
.drop-ic.sm { width: 34px; height: 34px; border-radius: 10px; margin: 0; }
.drop-ic.sm i { width: 17px; height: 17px; }
.drop-t { font-weight: 800; font-size: 14px; }
.drop-d { font-size: 11.5px; color: var(--text-3); line-height: 1.6; }

.drops-4 { grid-template-columns: repeat(4, 1fr); gap: 10px; }
.drops-4 .drop { padding: 18px 8px 15px; }

/* 口播形式 */
.styles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.style-card {
  position: relative;
  text-align: left;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: border-color 0.25s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.style-card:hover { border-color: var(--line-3); transform: translateY(-2px); }
.style-card.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 210, 63, 0.15), 0 18px 36px -20px rgba(255, 190, 40, 0.55); }
.style-media { position: relative; aspect-ratio: 4 / 3; background: #0c0b0a; overflow: hidden; }
.style-media video, .style-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block; transition: transform 0.6s var(--ease-out); }
.style-card:hover .style-media video { transform: scale(1.04); }
.style-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 7, 6, 0.1) 0%, transparent 35%, rgba(8, 7, 6, 0.9) 100%); pointer-events: none; }
.style-card:not(.is-on) .style-media video { filter: saturate(0.75) brightness(0.85); }
.style-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px 3px 7px;
  border-radius: 8px;
  background: rgba(10, 9, 8, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.style-badge i { width: 13px; height: 13px; color: var(--accent); }
.style-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 12px 13px 13px; }
.style-name { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.style-name b { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.45); display: grid; place-items: center; transition: all 0.2s; }
.style-card.is-on .style-name b { background: var(--accent); border-color: var(--accent); }
.style-card.is-on .style-name b::after { content: ''; width: 5px; height: 9px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.style-desc { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.5; color: var(--text-2); }

.assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; margin-top: 16px; }
.asset {
  position: relative;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
  animation: popIn 0.4s var(--ease-out);
}
@keyframes popIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
.asset-media { position: relative; aspect-ratio: 1; background: #0c0b0a; display: grid; place-items: center; overflow: hidden; }
.asset-media img, .asset-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-media.is-audio { background: radial-gradient(circle at 50% 40%, rgba(255, 210, 63, 0.16), transparent 70%), #0f0e0c; }
.wave { display: flex; align-items: center; gap: 3px; height: 40px; }
.wave i { width: 3px; border-radius: 3px; background: var(--accent); opacity: 0.85; height: calc(var(--h) * 1%); }
.asset.is-playing .wave i { animation: wave 0.9s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.12s); }
@keyframes wave { from { transform: scaleY(0.4); } to { transform: scaleY(1.1); } }
.asset-tag {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(10, 9, 8, 0.72);
  backdrop-filter: blur(6px);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
  border: 1px solid rgba(255, 210, 63, 0.2);
}
.asset-dur {
  position: absolute;
  bottom: 7px;
  right: 7px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(10, 9, 8, 0.72);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.asset-dur.is-warn { color: var(--coral); }
.asset-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(10, 9, 8, 0.72);
  color: var(--text-2);
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
}
.asset-x i { width: 14px; height: 14px; }
.asset:hover .asset-x { opacity: 1; }
.asset-x:hover { background: var(--coral); color: #fff; }
.asset-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}
.asset-play i { width: 16px; height: 16px; }
.asset:hover .asset-play, .asset.is-playing .asset-play { opacity: 1; }
.asset-meta { padding: 8px 8px 9px; display: flex; flex-direction: column; gap: 6px; }
.asset-name { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-role {
  appearance: none;
  width: 100%;
  height: 28px;
  padding: 0 24px 0 9px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--surface-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23b9b1a5' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}
.asset-role:focus { border-color: var(--accent-line); }

/* 素材库 · 音乐库（口播、文字动画共用） */
.lib-save {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(255, 210, 63, 0.18);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.lib-save i { width: 13px; height: 13px; }
.lib-save:hover { background: rgba(255, 210, 63, 0.2); border-color: var(--accent-line); }
.lib-save[aria-disabled='true'] { cursor: default; }
.lib-save[aria-disabled='true']:not(.is-saved) i { animation: spin 1s linear infinite; }
.lib-save.is-saved, .lib-save.is-saved:hover { color: var(--mint); background: var(--mint-soft); border-color: rgba(82, 220, 160, 0.2); }
.asset-meta .lib-save { width: 100%; }

.lib { margin-top: 14px; padding: 12px; border-radius: var(--r-lg); background: rgba(0, 0, 0, 0.14); border: 1px solid var(--line); }
.lib-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.lib-title { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--text-2); }
.lib-title i { width: 15px; height: 15px; color: var(--accent); }
.lib-sub { margin-left: auto; font-size: 11.5px; color: var(--text-4); }
.lib-head .seg em { font-style: normal; color: var(--text-3); font-variant-numeric: tabular-nums; }
.lib-empty { margin: 0; padding: 2px; font-size: 12px; line-height: 1.7; color: var(--text-3); }

.tlib { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.tlib-item { position: relative; flex: none; width: 80px; }
.tlib-pick { position: relative; display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; }
.tlib-media {
  display: grid;
  place-items: center;
  width: 80px;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #0c0b0a;
  border: 1.5px solid var(--line-2);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease);
}
.tlib-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tlib-media.is-audio { color: var(--accent); background: radial-gradient(circle at 50% 40%, rgba(255, 210, 63, 0.16), transparent 70%), #0f0e0c; }
.tlib-media.is-audio i { width: 24px; height: 24px; }
.tlib-pick:hover .tlib-media { border-color: var(--accent-line); transform: translateY(-1px); }
.tlib-item.is-on .tlib-media { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 210, 63, 0.15); }
.tlib-check {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.2s var(--ease-out);
}
.tlib-check i { width: 12px; height: 12px; }
.tlib-item.is-on .tlib-check { opacity: 1; transform: none; }
.tlib-name { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tlib-item.is-on .tlib-name { color: var(--accent); font-weight: 700; }
.tlib-x, .tlib-play { position: absolute; display: grid; place-items: center; transition: opacity 0.2s, background 0.2s, color 0.2s; }
.tlib-x { top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 7px; background: rgba(10, 9, 8, 0.72); color: var(--text-2); opacity: 0; }
.tlib-x i { width: 13px; height: 13px; }
.tlib-item:hover .tlib-x, .tlib-x:focus-visible { opacity: 1; }
.tlib-x:hover { background: var(--coral); color: #fff; }
.tlib-play { top: 51px; right: 5px; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: #111; }
.tlib-play i { width: 11px; height: 11px; }
@media (hover: none) {
  .tlib-x { opacity: 1; }
}

/* CTA */
.cta-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 4px; }
.cta-bar .btn-xl { flex: 1; min-width: 240px; }
.import-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-3); cursor: pointer; padding: 8px 4px; transition: color 0.2s; }
.import-link i { width: 15px; height: 15px; }
.import-link:hover { color: var(--accent); }
.sticky-cta {
  position: sticky;
  bottom: 16px;
  z-index: 10;
  padding: 12px;
  border-radius: 22px;
  background: rgba(22, 21, 19, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-2);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
}
.sticky-cta .btn-xl { height: 52px; }

/* ===================== 生成进度 ===================== */
.elapsed { font-family: var(--mono); font-size: 13px; color: var(--text-3); padding: 4px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.timeline { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { position: relative; display: flex; gap: 14px; padding: 0 0 18px 0; color: var(--text-4); }
.timeline li:last-child { padding-bottom: 4px; }
.timeline li::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 26px;
  bottom: 2px;
  width: 2px;
  border-radius: 2px;
  background: var(--surface-4);
}
.timeline li:last-child::before { display: none; }
.timeline li.is-done::before { background: linear-gradient(var(--mint), rgba(82, 220, 160, 0.3)); }
.tl-dot { position: relative; z-index: 1; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--line-2); }
.tl-dot i { width: 13px; height: 13px; }
.timeline li.is-done { color: var(--text-2); }
.timeline li.is-done .tl-dot { background: var(--mint-soft); border-color: rgba(82, 220, 160, 0.4); color: var(--mint); }
.timeline li.is-active { color: var(--text); }
.timeline li.is-active .tl-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 5px rgba(255, 210, 63, 0.12); }
.timeline li.is-active .tl-dot i { animation: spin 1.1s linear infinite; }
.timeline li.is-fail .tl-dot { background: var(--coral); border-color: var(--coral); color: #fff; }
.tl-body { padding-top: 1px; display: flex; flex-direction: column; }
.tl-title { font-weight: 700; font-size: 14px; }
.tl-sub { font-size: 12px; color: var(--text-3); }
.timeline li.is-active .tl-sub { color: var(--accent); }
.prog-msg { margin-top: 10px; font-size: 12.5px; color: var(--text-3); min-height: 20px; }
.warn-list { margin: 10px 0 0; padding: 12px 14px 12px 32px; border-radius: 12px; background: var(--accent-soft); color: #f3dc8b; font-size: 12.5px; border: 1px solid rgba(255, 210, 63, 0.15); }
.error-box { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--coral-soft); border: 1px solid rgba(255, 99, 99, 0.25); color: #ffb3b3; font-size: 13px; line-height: 1.7; word-break: break-word; }
.error-box strong { display: block; color: var(--coral); margin-bottom: 4px; }
.notice { margin-bottom: 14px; padding: 11px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid rgba(255, 210, 63, 0.18); color: #f3dc8b; font-size: 12.5px; }
.notice.is-error { background: var(--coral-soft); border-color: rgba(255, 99, 99, 0.25); color: #ffb3b3; }
.prompt-pre { margin: 0; padding: 4px 16px 16px; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 12px; line-height: 1.75; color: var(--text-2); max-height: 280px; overflow: auto; }
.row-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ===================== 花字编辑 ===================== */
.tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tpl {
  text-align: left;
  border-radius: 18px;
  padding: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: border-color 0.25s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.tpl:hover { border-color: var(--line-3); transform: translateY(-2px); }
.tpl.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 210, 63, 0.15), 0 16px 32px -18px rgba(255, 190, 40, 0.5); }
.tpl-mini { position: relative; display: flex; gap: 6px; }
.tpl-frame {
  position: relative;
  flex: 1;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(160deg, #3d4a3a, #1d241c 55%, #2b2f2a);
  background-size: cover;
  background-position: center;
}
.tpl-frame::after { content: attr(data-k); position: absolute; left: 6px; bottom: 5px; font-size: 9.5px; font-weight: 700; color: rgba(255, 255, 255, 0.85); padding: 1px 6px; border-radius: 5px; background: rgba(0, 0, 0, 0.45); }
.tpl-info { padding: 10px 4px 2px; display: flex; flex-direction: column; gap: 2px; }
.tpl-name { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.tpl-name b { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-3); display: grid; place-items: center; transition: all 0.2s; }
.tpl.is-on .tpl-name b { background: var(--accent); border-color: var(--accent); }
.tpl.is-on .tpl-name b::after { content: ''; width: 5px; height: 9px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.tpl-desc { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; margin-bottom: 16px; }
.tabs button { flex: 1; height: 36px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--text-3); transition: all 0.2s; }
.tabs button:hover { color: var(--text); }
.tabs button.is-on { background: var(--surface-4); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset; }
.tabs-sm button { height: 32px; font-size: 12.5px; }

.slot-list { display: flex; flex-direction: column; gap: 12px; }
.slot { display: grid; grid-template-columns: 132px 1fr; align-items: center; gap: 14px; }
.slot-label { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.slot-sw { flex: none; width: 16px; height: 16px; border-radius: 5px; box-shadow: 0 0 0 2px var(--sw-stroke) inset, 0 0 0 1px rgba(255, 255, 255, 0.1); background: var(--sw-fill); }
.slot-input { position: relative; }
.slot-input .input { padding-right: 60px; font-size: 15px; font-weight: 700; }
.slot-cnt { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11.5px; color: var(--text-4); font-variant-numeric: tabular-nums; pointer-events: none; }
.slot-cnt.is-over { color: var(--coral); font-weight: 700; }
.slot-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.inline-field { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-3); font-weight: 700; }

.subs { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; margin: 0 -6px; padding: 0 6px; }
.sub {
  display: grid;
  grid-template-columns: 26px 150px 1fr 28px;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: border-color 0.2s, background 0.2s;
}
.sub.is-current { border-color: var(--accent-line); background: #221f19; }
.sub.is-covered { opacity: 0.45; }
.sub-idx { height: 34px; display: grid; place-items: center; font-size: 11.5px; color: var(--text-4); font-variant-numeric: tabular-nums; font-weight: 700; }
.sub-time { display: flex; align-items: center; gap: 4px; height: 34px; }
.sub-time input {
  width: 62px;
  height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-3);
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  outline: none;
}
.sub-time input:focus { border-color: var(--accent-line); }
.sub-time span { color: var(--text-4); font-size: 11px; }
.sub-texts { display: flex; flex-direction: column; gap: 6px; }
.sub-texts input { height: 34px; padding: 0 11px; border-radius: 9px; font-size: 13.5px; }
.sub-texts input.trans { height: 30px; font-size: 12.5px; color: var(--text-2); }
.sub-seek { height: 34px; }
.subs-empty { padding: 26px; text-align: center; color: var(--text-3); font-size: 13px; border: 1px dashed var(--line-2); border-radius: 14px; }
.add-sub { margin-top: 12px; }

/* ===================== 预览 ===================== */
.preview-shell { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.preview-top { width: 100%; max-width: 360px; display: flex; align-items: center; justify-content: space-between; min-height: 34px; }
.pv-label { font-size: 12px; color: var(--text-3); font-weight: 700; letter-spacing: 0.08em; margin-left: auto; display: flex; align-items: center; gap: 7px; }
.pv-label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); }

.phone {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 10px;
  border-radius: 46px;
  background: linear-gradient(160deg, #2a2724, #0e0d0c 40%, #1a1816);
  box-shadow:
    0 0 0 1px rgba(255, 238, 214, 0.1),
    0 0 0 1px rgba(0, 0, 0, 0.6) inset,
    0 2px 0 rgba(255, 255, 255, 0.06) inset,
    0 50px 100px -40px rgba(0, 0, 0, 0.95),
    0 30px 80px -50px rgba(255, 190, 40, 0.25);
}
.screen {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar, 9/16);
  max-height: calc(100vh - 230px);
  margin: 0 auto;
  border-radius: 37px;
  overflow: hidden;
  background: #050505;
  isolation: isolate;
  transition: aspect-ratio 0.4s var(--ease);
}
.screen.is-landscape { border-radius: 22px; }
.phone:has(.screen.is-landscape) { border-radius: 30px; }
.screen video, .screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.screen video { object-fit: contain; }
.screen > .fz-stage { z-index: 2; }
#motionView .phone {
  --motion-preview-height: max(180px, 100dvh - 250px);
  width: min(100%, calc(var(--motion-preview-height) * var(--motion-ratio, 0.5625) + 20px));
}
#mScreen { max-height: none; }
#mFrame { width: var(--fw); height: var(--fh); inset: auto; top: 50%; left: 50%; }

.screen-empty { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; overflow: hidden; }
.aurora {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(40% 35% at 30% 30%, rgba(255, 196, 64, 0.35), transparent 70%),
    radial-gradient(45% 40% at 75% 70%, rgba(255, 110, 80, 0.22), transparent 70%),
    radial-gradient(50% 50% at 50% 50%, rgba(120, 90, 255, 0.12), transparent 70%),
    #0b0a09;
  filter: blur(30px);
  animation: aurora 14s ease-in-out infinite alternate;
}
@keyframes aurora { 0% { transform: rotate(0deg) scale(1); } 100% { transform: rotate(40deg) scale(1.15); } }
.empty-inner { position: relative; text-align: center; padding: 0 30px; z-index: 2; margin-top: -18%; }
.empty-ic { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(10px); color: var(--accent); }
.empty-ic i { width: 26px; height: 26px; }
.empty-t { margin: 0; font-weight: 800; font-size: 16px; }
.empty-d { margin: 6px 0 0; font-size: 12.5px; color: var(--text-2); }
.empty-sample { z-index: 1; opacity: 0.9; }

.screen-busy {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 28px;
  background: radial-gradient(70% 50% at 50% 45%, rgba(255, 200, 60, 0.14), transparent 70%), rgba(8, 7, 6, 0.86);
  backdrop-filter: blur(6px);
}
.busy-orb { position: relative; width: 96px; height: 96px; margin-bottom: 22px; }
.busy-orb span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent); animation: spin 1.4s linear infinite; }
.busy-orb span:nth-child(2) { inset: 12px; border-top-color: var(--accent-2); animation-duration: 2s; animation-direction: reverse; }
.busy-orb span:nth-child(3) { inset: 26px; border: 0; background: radial-gradient(circle, rgba(255, 210, 63, 0.9), rgba(255, 170, 30, 0.2) 70%); animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(0.75); opacity: 0.7; } 50% { transform: scale(1); opacity: 1; } }
.busy-fail { display: none; width: 64px; height: 64px; margin-bottom: 18px; border-radius: 22px; place-items: center; background: var(--coral-soft); border: 1px solid rgba(255, 99, 99, 0.3); color: var(--coral); }
.busy-fail i { width: 30px; height: 30px; }
.screen-busy.is-fail { background: radial-gradient(70% 50% at 50% 45%, rgba(255, 99, 99, 0.12), transparent 70%), rgba(8, 7, 6, 0.9); }
.screen-busy.is-fail .busy-orb, .screen-busy.is-fail .busy-bar { display: none; }
.screen-busy.is-fail .busy-fail { display: grid; }
.busy-t { margin: 0; font-weight: 800; font-size: 16px; }
.busy-d { margin: 6px 0 18px; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.busy-bar { width: 60%; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.busy-bar i { display: block; width: 40%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: slide 1.6s var(--ease) infinite; }
.busy-bar.is-det i { animation: none; width: var(--p, 0%); background: var(--accent); transition: width 0.4s var(--ease); }
@keyframes slide { from { transform: translateX(-110%); } to { transform: translateX(260%); } }

.player {
  width: 100%;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 7px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.player .icon-btn { width: 34px; height: 34px; }
.player .icon-btn:first-child { background: var(--accent); color: var(--accent-ink); border-radius: 11px; }
.player .icon-btn:first-child:hover { filter: brightness(1.06); }
.player .range { flex: 1; }
.time { font-family: var(--mono); font-size: 12px; color: var(--text-2); min-width: 38px; font-variant-numeric: tabular-nums; }
.time.muted { color: var(--text-4); text-align: right; }

/* 文字动画演示（未生成时的样式预览） */
.m-demo {
  position: absolute;
  inset: 0;
  z-index: 1;
  container-type: size;
  overflow: hidden;
  background: linear-gradient(110deg, #fcad40 0%, #ffc233 46%, #ffd52f 100%);
  font-family: var(--font);
}
.m-demo .sh { position: absolute; border: 3.6cqw solid rgba(246, 146, 28, 0.3); border-radius: 50%; animation: floaty 9s ease-in-out infinite alternate; }
.m-demo .sh1 { width: 70cqw; height: 70cqw; right: -28cqw; bottom: -14cqw; }
.m-demo .sh2 { width: 34cqw; height: 34cqw; left: -12cqw; bottom: 6cqh; border-radius: 22%; transform: rotate(45deg); animation-duration: 11s; }
.m-demo .sh3 { width: 18cqw; height: 18cqw; left: 18cqw; top: -6cqw; border-width: 2.4cqw; animation-duration: 7s; }
.m-demo .sh4 { width: 26cqw; height: 26cqw; right: -8cqw; top: 12cqh; border-radius: 24%; transform: rotate(30deg); border-width: 2.6cqw; }
@keyframes floaty { from { translate: 0 0; } to { translate: 2cqw -2.5cqw; } }
.m-demo-inner { position: relative; padding: 11cqh 8.5cqw 0; }
.m-demo h3 { margin: 0 0 5cqh; text-align: center; color: #7a1f0b; font-weight: 900; font-size: 7.2cqw; line-height: 1.35; animation: mIn 7s var(--ease-out) infinite; }
.m-demo p { margin: 0 0 2.4cqh; color: #2a1608; font-size: 4.7cqw; line-height: 1.65; animation: mIn 7s var(--ease-out) infinite; animation-delay: calc(0.75s + var(--d) * 0.75s); }
.m-demo b { color: #9c2e0e; font-weight: 700; }
@keyframes mIn {
  0% { opacity: 0; transform: translateY(2.6cqw); filter: blur(0.8cqw); }
  9%, 88% { opacity: 1; transform: none; filter: blur(0); }
  96%, 100% { opacity: 0; transform: none; filter: blur(0); }
}
.m-demo[data-theme='mint'] { background: linear-gradient(110deg, #8fe3bf, #b8f0c6 50%, #ddf8b5); }
.m-demo[data-theme='mint'] .sh { border-color: rgba(32, 160, 110, 0.24); }
.m-demo[data-theme='mint'] h3 { color: #0d4a37; }
.m-demo[data-theme='mint'] p { color: #11251d; }
.m-demo[data-theme='mint'] b { color: #0a7a55; }
.m-demo[data-theme='sakura'] { background: linear-gradient(110deg, #ffa8c0, #ffc4d3 50%, #ffe2e9); }
.m-demo[data-theme='sakura'] .sh { border-color: rgba(236, 84, 126, 0.24); }
.m-demo[data-theme='sakura'] h3 { color: #8b1437; }
.m-demo[data-theme='sakura'] p { color: #36101e; }
.m-demo[data-theme='sakura'] b { color: #c9285a; }
.m-demo[data-theme='sky'] { background: linear-gradient(110deg, #86c3ff, #a9d6ff 50%, #d3ebff); }
.m-demo[data-theme='sky'] .sh { border-color: rgba(36, 112, 214, 0.22); }
.m-demo[data-theme='sky'] h3 { color: #0b3878; }
.m-demo[data-theme='sky'] p { color: #0f1e34; }
.m-demo[data-theme='sky'] b { color: #1c58c8; }
.m-demo[data-theme='ink'] { background: linear-gradient(110deg, #17171d, #22222b 55%, #2c2a33); }
.m-demo[data-theme='ink'] .sh { border-color: rgba(255, 206, 84, 0.14); }
.m-demo[data-theme='ink'] h3 { color: #ffd34e; }
.m-demo[data-theme='ink'] p { color: #f1eee6; }
.m-demo[data-theme='ink'] b { color: #ff9a45; }

/* ===================== 文字动画表单 ===================== */
.themes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.theme {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 6px 9px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  transition: all 0.2s var(--ease);
}
.theme:hover { color: var(--text); border-color: var(--line-2); }
.theme.is-on { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }
.theme-sw { position: relative; width: 100%; height: 42px; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset; }
.theme-sw::before { content: ''; position: absolute; width: 30px; height: 30px; right: -8px; bottom: -10px; border-radius: 50%; border: 5px solid var(--shape); }
.theme-sw::after { content: 'Aa'; position: absolute; left: 8px; top: 6px; font-weight: 900; font-size: 15px; color: var(--title); }

.bgm-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px dashed var(--line-3);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.bgm-drop:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.bgm-drop.has-file { border-style: solid; border-color: var(--line-2); background: var(--surface-2); }
.bgm-text { flex: 1; font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bgm-drop.has-file .bgm-text { color: var(--text); font-weight: 700; }
.lib-music { margin-top: 10px; }
.music-upload { width: 100%; margin-bottom: 10px; text-align: left; }
.lib-music.is-over .music-upload { border-color: var(--accent-line); background: var(--accent-soft); }
.music-upload:disabled { cursor: progress; }
.music-upload:disabled i { animation: spin 1s linear infinite; }
.mlib { display: flex; flex-wrap: wrap; gap: 8px; }
.mlib-item {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  height: 32px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: border-color 0.2s, background 0.2s;
}
.mlib-item:hover { border-color: var(--line-3); }
.mlib-item.is-on { border-color: var(--accent); background: var(--accent-soft); }
.mlib-play, .mlib-x { flex: none; display: grid; place-items: center; border-radius: 50%; transition: color 0.2s, background 0.2s; }
.mlib-play { width: 28px; height: 28px; margin-left: 2px; color: var(--text-2); }
.mlib-play i { width: 13px; height: 13px; }
.mlib-play:hover, .mlib-item.is-playing .mlib-play { color: var(--accent); }
.mlib-name { min-width: 0; max-width: 220px; height: 100%; padding: 0 4px; font-size: 12.5px; font-weight: 700; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mlib-item.is-on .mlib-name { color: var(--accent); }
.mlib-x { width: 24px; height: 24px; margin-right: 4px; color: var(--text-4); }
.mlib-x i { width: 12px; height: 12px; }
.mlib-x:hover { color: #fff; background: var(--coral); }

/* 代码面板 */
.code-card { padding-bottom: 20px; }
.code-actions { display: flex; gap: 8px; }
.code-steps { list-style: none; margin: 0 0 14px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.code-steps li {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: all 0.3s;
}
.code-steps li span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.code-steps li.is-active { color: var(--accent); border-color: rgba(255, 210, 63, 0.3); background: var(--accent-soft); }
.code-steps li.is-active span { animation: blink 1s infinite; }
.code-steps li.is-done { color: var(--mint); }
.code-steps li.is-warn { color: var(--coral); border-color: rgba(255, 99, 99, 0.3); background: var(--coral-soft); }
@keyframes blink { 50% { opacity: 0.25; } }
.code-view { position: relative; border-radius: 16px; background: #080807; border: 1px solid var(--line); overflow: hidden; }
.think-line { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--line); background: rgba(255, 210, 63, 0.03); }
.think-line i { width: 15px; height: 15px; color: var(--accent); animation: breathe 1.6s ease-in-out infinite; }
.code-pre { margin: 0; height: 340px; overflow: auto; padding: 14px 16px 18px; font-family: var(--mono); font-size: 12px; line-height: 1.72; color: #d9d3c7; white-space: pre-wrap; word-break: break-all; tab-size: 2; }
.code-pre code { background: none; padding: 0; border-radius: 0; color: inherit; font-size: inherit; }
.code-pre.is-streaming code::after { content: ''; display: inline-block; width: 7px; height: 14px; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: blink 0.9s steps(1) infinite; }
.code-pre .t-tag { color: #ff9e6b; }
.code-pre .t-attr { color: #ffd23f; }
.code-pre .t-str { color: #9ee6b8; }
.code-pre .t-com { color: #6c665d; font-style: italic; }
.code-pre .t-prop { color: #8cc4ff; }
.code-edit { width: 100%; height: 340px; border: 0; border-radius: 0; background: #080807; padding: 14px 16px; color: #e8e2d6; resize: vertical; }
.code-edit:focus { box-shadow: none; background: #0b0b09; }

.revise-box { display: flex; gap: 10px; }
.revise-box .input { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips button {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: all 0.2s;
}
.chips button:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

.export-prog { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 12px; }
.ep-bar { flex: 1; height: 8px; border-radius: 8px; background: var(--surface-4); overflow: hidden; }
.ep-bar i { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, #ffb021, #ffe46b); transition: width 0.4s var(--ease); box-shadow: 0 0 16px rgba(255, 200, 50, 0.6); }
.export-prog span { font-size: 13px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 88px; }

/* ===================== 抽屉 ===================== */
.drawer-mask { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(3px); animation: fade 0.3s; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  width: min(440px, 100vw);
  display: flex;
  flex-direction: column;
  background: #12110f;
  border-left: 1px solid var(--line-2);
  box-shadow: -30px 0 80px -20px rgba(0, 0, 0, 0.8);
  transform: translateX(105%);
  transition: transform 0.5s var(--ease-out);
}
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 22px 16px; }
.drawer-head h3 { margin: 0; font-size: 18px; font-weight: 800; }
.drawer-head p { margin: 3px 0 0; font-size: 12px; color: var(--text-3); }
.drawer .tabs { margin: 0 22px 12px; }
.drawer-list { flex: 1; overflow: auto; padding: 4px 14px 24px; display: flex; flex-direction: column; gap: 6px; }
.job {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid transparent;
  text-align: left;
  transition: background 0.2s, border-color 0.2s;
}
.job:hover { background: var(--surface-2); border-color: var(--line); }
.job.is-current { background: var(--surface-2); border-color: var(--accent-line); }
.job-thumb { width: 54px; aspect-ratio: 9/16; border-radius: 9px; background: var(--surface-3) center/cover no-repeat; display: grid; place-items: center; color: var(--text-4); overflow: hidden; }
.job-thumb i { width: 18px; height: 18px; }
.job-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.job-title { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-3); }
.kind { padding: 1px 7px; border-radius: 6px; background: var(--surface-3); font-weight: 700; font-size: 11px; color: var(--text-2); }
.status { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.s-run { color: var(--accent); }
.status.s-run::before { animation: blink 1s infinite; }
.status.s-ok { color: var(--mint); }
.status.s-ready { color: var(--sky); }
.status.s-fail { color: var(--coral); }
.status.s-off { color: var(--text-4); }
.job-del { opacity: 0; }
.job:hover .job-del { opacity: 1; }
.job-del:hover { color: var(--coral); background: var(--coral-soft); }
.drawer-empty { padding: 60px 30px; text-align: center; color: var(--text-3); font-size: 13px; }
.drawer-empty i { width: 36px; height: 36px; color: var(--text-4); margin-bottom: 10px; }

/* ===================== Toast / Modal ===================== */
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: min(560px, 92vw);
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(32, 30, 27, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-2);
  box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.8);
  font-size: 13.5px;
  line-height: 1.55;
  pointer-events: auto;
  animation: toastIn 0.45s var(--ease-out);
}
.toast i { width: 17px; height: 17px; margin-top: 1px; }
.toast.ok i { color: var(--mint); }
.toast.err i { color: var(--coral); }
.toast.info i { color: var(--accent); }
.toast.is-out { animation: toastOut 0.3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

.modal-mask { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(4px); animation: fade 0.2s; }
.modal { width: min(400px, 90vw); padding: 24px; border-radius: 22px; background: #1a1916; border: 1px solid var(--line-2); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.9); animation: popIn 0.3s var(--ease-out); }
.modal h4 { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.modal p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== 响应式 ===================== */
@media (max-width: 1240px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; }
  .phone, .preview-top, .player { max-width: 330px; }
}
@media (max-width: 1020px) {
  .topbar { grid-template-columns: auto 1fr; padding: 0 18px; }
  .mode-switch { justify-self: center; }
  .topbar-right { grid-column: 1 / -1; display: none; }
  .workspace { grid-template-columns: 1fr; padding: 24px 18px 60px; }
  .col-preview { position: relative; top: 0; order: -1; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .screen { max-height: 62vh; }
  #motionView .phone { --motion-preview-height: 62dvh; }
}
@media (max-width: 680px) {
  .brand-text span { display: none; }
  .mode-btn { padding: 0 14px; }
  .mode-btn span { font-size: 13px; }
  .page-head h1 { font-size: 23px; }
  .card { padding: 18px 16px 20px; border-radius: 22px; }
  .drops { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .drops-4 { grid-template-columns: 1fr 1fr; }
  .styles { gap: 8px; }
  .style-desc { display: none; }
  .style-name { font-size: 13px; }
  .drop { padding: 16px 6px 14px; }
  .drop-d { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .tpl-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tpl-desc { display: none; }
  .slot { grid-template-columns: 1fr; gap: 6px; }
  .sub { grid-template-columns: 1fr 28px; }
  .sub-idx { display: none; }
  .sub-time { grid-column: 1; }
  .sub-texts { grid-column: 1 / -1; }
  .themes { grid-template-columns: repeat(3, 1fr); }
  .card-head { flex-wrap: wrap; }
  #langSeg { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ===================== 时长提醒 · 台词校对 ===================== */
.dur-warn { margin: 2px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--coral-soft); border: 1px solid rgba(255, 99, 99, 0.22); color: #ffb3b3; font-size: 12px; line-height: 1.6; }

.check-card .ck-body { display: flex; flex-direction: column; gap: 12px; }
.check-card .ck-body > .notice { margin: 0; }
.ck-status { display: flex; align-items: flex-start; gap: 9px; padding: 10px 13px; border-radius: 12px; font-size: 13px; line-height: 1.6; font-weight: 700; }
.ck-status i { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.ck-status.is-ok { background: var(--mint-soft); color: var(--mint); border: 1px solid rgba(82, 220, 160, 0.2); }
.ck-status.is-bad { background: var(--coral-soft); color: #ff9b9b; border: 1px solid rgba(255, 99, 99, 0.25); }
.ck-status.is-warn, .ck-status.is-busy { background: var(--accent-soft); color: #f3dc8b; border: 1px solid rgba(255, 210, 63, 0.18); }
.ck-status.is-busy i { animation: spin 0.9s linear infinite; }

.ck-diff { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; line-height: 1.95; color: var(--text-2); word-break: break-word; max-height: 220px; overflow: auto; }
.ck-extra { display: inline; padding: 1px 5px; margin: 0 2px; border-radius: 6px; border: 0; font: inherit; font-weight: 700; color: #fff; background: rgba(255, 99, 99, 0.55); cursor: pointer; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ck-extra:hover { background: var(--coral); }
.ck-extra.is-cut { color: var(--text-4); background: transparent; text-decoration: line-through; font-weight: 400; border: 1px dashed var(--line-2); }
.ck-miss { color: var(--text-4); text-decoration-color: var(--text-3); }
.ck-alt { text-decoration: underline dotted var(--accent); text-underline-offset: 4px; cursor: help; }

.ck-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ck-item { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.ck-item.is-cut { opacity: 0.62; }
.ck-where { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; background: var(--coral-soft); color: var(--coral); white-space: nowrap; }
.ck-where.is-tail { background: var(--surface-4); color: var(--text-2); }
.ck-text { min-width: 0; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-text:hover { color: var(--accent); }
.ck-item.is-cut .ck-text { text-decoration: line-through; }
.ck-time { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ck-item .btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }

@media (max-width: 680px) {
  .ck-item { grid-template-columns: auto 1fr auto; }
  .ck-time { grid-column: 2 / -1; grid-row: 2; }
}

/* ===================== 视频加花字 ===================== */
a.import-link { text-decoration: none; }
.drop-video { padding: 42px 20px 36px; gap: 6px; }
.drop-video .drop-ic { width: 54px; height: 54px; border-radius: 17px; }
.drop-video .drop-ic i { width: 24px; height: 24px; }
.drop-video .drop-t { font-size: 15px; }
.vfile { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.vfile-thumb { flex: none; width: 54px; height: 72px; border-radius: 10px; background: var(--surface-3) center / cover no-repeat; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-3); }
.vfile-thumb i { width: 20px; height: 20px; }
.vfile-thumb.has-img i { display: none; }
.vfile-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.vfile-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vfile-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.vfile-warn { color: var(--coral); font-weight: 700; }
.vfile-note { color: var(--text-2); font-weight: 600; }
.vfile .btn { flex: none; cursor: pointer; }
#impAIHint.is-warn { color: var(--coral); }
@media (max-width: 680px) {
  #impLangSeg { width: 100%; }
}
.mode-btn span { white-space: nowrap; }
@media (max-width: 520px) {
  .brand-text { display: none; }
  .mode-btn { padding: 0 11px; gap: 0; }
  .mode-btn i { display: none; }
  .vfile { gap: 10px; }
  .vfile .btn { padding: 0 10px; }
}
