﻿/* ============================================
   AnchorForge Design System
   鐜颁唬娣辫壊涓婚 路 鐜荤拑鎷熸€?路 娓愬彉鍏夋晥
   ============================================ */

/* ---------- 瀛椾綋 ---------- */
@import url('https://fonts.loli.net/css2?family=Sora:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- 璁捐鍙橀噺 ---------- */
:root {
  /* ============ 闈欏ア宸ヤ綔瀹?路 鐢诲粖鐧藉 + 鏀炬槧鍘?============ */
  --bg-base: #F5F2EC;
  --bg-surface: #FFFFFF;
  --bg-elevated: #FAF7F1;
  --bg-glass: rgba(255, 255, 255, 0.82);

  /* 鏀炬槧鍘咃紙娣卞ⅷ鑸炲彴锛氳棰戦瑙?/ 鍒剁墖闂?/ 鏃堕棿杞达級 */
  --stage-base: #171512;
  --stage-surface: #1D1915;
  --stage-elevated: #241F1A;
  --stage-border: rgba(245, 242, 236, 0.1);
  --stage-text: #F0EBE2;
  --stage-text-dim: #9A9188;

  /* 涓昏壊璋?- 鍙ら摐閲戯紙鍏ㄧ珯鍞竴鐐圭紑鑹诧級 */
  --accent-primary: #8A6D3F;
  --accent-secondary: #6E5731;
  --accent-tertiary: #8A6D3F;
  --gradient-primary: #8A6D3F;
  --gradient-cyan: #8A6D3F;
  --gradient-glow: none;

  /* 鐘舵€佽壊锛堟澗缁?鏆楅噾/璧孩/榛涜摑锛?*/
  --color-success: #3E7C5B;
  --color-warning: #A6791F;
  --color-error: #B4533A;
  --color-info: #4A6B8A;
  --color-skipped: #8A8177;

  --text-primary: #1F1B16;
  --text-secondary: #5D564C;
  --text-muted: #8A8177;
  --text-inverse: #FFFFFF;

  --border-subtle: rgba(31, 27, 22, 0.07);
  --border-default: rgba(31, 27, 22, 0.12);
  --border-strong: rgba(31, 27, 22, 0.22);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(31, 27, 22, 0.05);
  --shadow-md: 0 2px 6px rgba(31, 27, 22, 0.05), 0 10px 28px rgba(31, 27, 22, 0.07);
  --shadow-lg: 0 6px 16px rgba(31, 27, 22, 0.07), 0 22px 48px rgba(31, 27, 22, 0.1);
  --shadow-glow: 0 2px 10px rgba(138, 109, 63, 0.22);

  --font-display: 'Noto Serif SC', 'Source Han Serif SC', 'STZhongsong', 'SimSun', serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', 'Source Han Sans SC', -apple-system, sans-serif;
  --font-mono: 'Consolas', 'JetBrains Mono', monospace;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================
   SuperIP Koubo Workshop: restrained black-gold production UI
   ========================================================== */
:root {
  --bg-base: #08090b;
  --bg-surface: #0f1115;
  --bg-elevated: #15181e;
  --bg-glass: rgba(15, 17, 21, 0.96);
  --stage-base: #050608;
  --stage-surface: #0b0d11;
  --stage-elevated: #12151a;
  --stage-border: rgba(231, 191, 94, 0.18);
  --stage-text: #f5f1e7;
  --stage-text-dim: #aaa397;
  --accent-primary: #ddb34f;
  --accent-secondary: #f0d583;
  --accent-tertiary: #b98a2d;
  --gradient-primary: #ddb34f;
  --gradient-cyan: #ddb34f;
  --gradient-glow: none;
  --text-primary: #f5f1e7;
  --text-secondary: #c5beb1;
  --text-muted: #8f897f;
  --text-inverse: #08090b;
  --border-subtle: rgba(231, 191, 94, 0.10);
  --border-default: rgba(231, 191, 94, 0.20);
  --border-strong: rgba(231, 191, 94, 0.38);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.38);
  --shadow-glow: 0 0 0 1px rgba(221, 179, 79, 0.2);
}

body,
.main-content,
.page,
.app-layout {
  background: var(--bg-base);
  color: var(--text-primary);
}

/*
 * Prevent caret-browsing and accidental text selection across the application
 * chrome while preserving a normal editing experience in real form controls.
 */
html,
body {
  caret-color: transparent;
}

body {
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea,
select,
[contenteditable="true"],
[contenteditable="plaintext-only"] {
  -webkit-user-select: text;
  user-select: text;
  caret-color: auto;
}

pre,
code,
.text-selectable {
  -webkit-user-select: text;
  user-select: text;
}

body::before,
.dashboard-hero::before,
.hero-orb {
  display: none !important;
  background: none !important;
}

.sidebar,
.mobile-topbar,
.bottom-nav,
.card,
.modal,
.modal-content,
.dashboard-hero,
.sub-tabs,
.upload-zone,
.cover-preview-box,
.table-wrap,
.asset-card,
.recent-card,
.scene-card,
.template-card,
.voice-card,
.avatar-card {
  background: var(--bg-surface) !important;
  border-color: var(--border-default) !important;
  border-radius: 8px !important;
  box-shadow: none;
}

.sidebar {
  border-right: 1px solid var(--border-default);
}

.sidebar-header,
.card-header,
.modal-header,
.modal-footer {
  border-color: var(--border-subtle) !important;
}

.nav-item:hover,
.sub-tab:hover,
.bottom-nav-item:hover {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
}

.nav-item.active,
.sub-tab.active,
.bottom-nav-item.active {
  background: #1a1710 !important;
  color: var(--accent-secondary) !important;
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

.form-input,
.form-textarea,
.form-select,
input,
textarea,
select {
  background: #090a0d !important;
  border-color: var(--border-default) !important;
  color: var(--text-primary) !important;
  border-radius: 6px !important;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 2px rgba(221, 179, 79, 0.12) !important;
}

.btn,
button {
  border-radius: 6px !important;
}

.btn-primary {
  background: var(--accent-primary) !important;
  background-image: none !important;
  border-color: var(--accent-primary) !important;
  color: #11100c !important;
  box-shadow: none !important;
}

.btn-primary:hover {
  background: var(--accent-secondary) !important;
  transform: none;
}

.btn-secondary {
  background: #121419 !important;
  border-color: var(--border-default) !important;
  color: var(--text-primary) !important;
}

.card-title-icon {
  background: #1a1710 !important;
  color: var(--accent-primary) !important;
}

.page-title::after {
  background: var(--accent-primary) !important;
  background-image: none !important;
}

.superip-info-card {
  background: #111216 !important;
  border-left: 3px solid var(--accent-primary) !important;
}

.superip-cover-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding: 2px;
}

.superip-cover-template {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: #0a0b0e !important;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  text-align: left;
}

.superip-cover-template img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #050608;
}

.superip-cover-template span {
  display: block;
  padding: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.superip-cover-template.selected {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 2px rgba(221, 179, 79, 0.18) !important;
  color: var(--accent-secondary);
}

.superip-cover-selected-preview {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: #090a0d;
  border: 1px solid var(--border-default);
  border-radius: 8px;
}

.superip-cover-selected-preview img {
  width: 116px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.superip-cover-selected-preview strong,
.superip-cover-selected-preview .hint {
  display: block;
}

.superip-info-title {
  color: var(--accent-secondary);
  font-weight: 700;
  margin-bottom: 6px;
}

.superip-info-copy {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.75;
}

.badge-success,
.badge-info {
  background: rgba(62, 124, 91, 0.16) !important;
  color: #77c59a !important;
  border-color: rgba(119, 197, 154, 0.26) !important;
}

.badge-warning {
  background: rgba(221, 179, 79, 0.12) !important;
  color: var(--accent-secondary) !important;
  border-color: var(--border-default) !important;
}

code,
pre {
  background: #06070a !important;
  color: var(--accent-secondary) !important;
}

/* ---------- 鍏ㄥ眬閲嶇疆 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

/* 鐢诲粖绾哥汗锛堟瀬娣★紝鏇夸唬鏃ц緣鍏夛級 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(138, 109, 63, 0.05), transparent 55%),
    repeating-linear-gradient(0deg, rgba(31, 27, 22, 0.012) 0 1px, transparent 1px 4px);
  pointer-events: none;
  z-index: 0;
}

/* ---------- 婊氬姩鏉?---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(31, 27, 22, 0.12);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(31, 27, 22, 0.2);
}

/* ---------- 甯冨眬 ---------- */
.app-layout {
  display: flex;
  height: 100vh;
  position: relative;
  z-index: 1;
}

/* ---------- 渚ц竟鏍?---------- */
.sidebar {
  width: 240px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width var(--transition-base);
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.product-brand-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-icon .product-brand-logo {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 6px 12px rgba(99, 45, 220, 0.18));
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.logo-text span {
  color: var(--accent-primary);
}

.logo-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  margin-top: 2px;
  font-family: var(--font-body);
  font-weight: 500;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 15.5px;
  font-weight: 500;
  margin-bottom: 3px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}

.nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--stage-base);
  color: #F0EBE2;
  box-shadow: var(--shadow-md);
  font-weight: 600;
}

.nav-item.active .nav-icon {
  color: #D8B878;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
  animation: pulse 2s ease-in-out infinite;
}

.status-dot.offline {
  background: var(--color-error);
  box-shadow: 0 0 8px var(--color-error);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---------- 涓诲唴瀹瑰尯 ---------- */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
}

.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.page-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  background: var(--accent-primary);
  margin-top: 12px;
  border-radius: 2px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
}

/* ---------- 鍗＄墖 ---------- */
.card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  transition: border-color var(--transition-base);
}

.card:hover {
  border-color: var(--border-strong);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title-icon {
  font-size: 20px;
}

/* ---------- 琛ㄥ崟 ---------- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-label .hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 8px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(138, 109, 63, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

#wiz-voice-instruction::placeholder {
  color: rgba(255, 255, 255, 0.42);
  opacity: 1;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---------- 鎸夐挳 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15.5px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 3px 10px rgba(138, 109, 63, 0.28);
}

.btn-primary:hover {
  background: var(--accent-secondary);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(138, 109, 63, 0.36);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover {
  background: var(--bg-surface);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-danger {
  background: rgba(180, 83, 58, 0.15);
  color: var(--color-error);
  border: 1px solid rgba(180, 83, 58, 0.3);
}

.btn-danger:hover {
  background: rgba(180, 83, 58, 0.25);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 15px 36px;
  font-size: 17px;
}

.btn-block {
  width: 100%;
}

/* ---------- 杩涘害娴佹按绾?---------- */
.pipeline {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  transition: all var(--transition-base);
  border: 1px solid transparent;
}

.pipeline-step.running {
  border-color: var(--accent-primary);
  background: rgba(138, 109, 63, 0.08);
}

.pipeline-step.success {
  border-color: rgba(62, 124, 91, 0.2);
}

.pipeline-step.failed {
  border-color: rgba(180, 83, 58, 0.2);
  background: rgba(180, 83, 58, 0.05);
}

.step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 2px solid var(--border-default);
  transition: all var(--transition-base);
}

.pipeline-step.pending .step-icon {
  color: var(--text-muted);
}

.pipeline-step.running .step-icon {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  animation: spin 1s linear infinite;
}

.pipeline-step.success .step-icon {
  background: var(--color-success);
  color: white;
  border-color: transparent;
}

.pipeline-step.failed .step-icon {
  background: var(--color-error);
  color: white;
  border-color: transparent;
}

.pipeline-step.skipped .step-icon {
  color: var(--color-skipped);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.step-info {
  flex: 1;
}

.step-name {
  font-weight: 600;
  font-size: 14px;
}

.step-status {
  font-size: 12px;
  color: var(--text-muted);
}

.pipeline-step.running .step-status {
  color: var(--accent-primary);
}

.pipeline-step.success .step-status {
  color: var(--color-success);
}

.pipeline-step.failed .step-status {
  color: var(--color-error);
}

/* ---------- 缁撴灉灞曠ず ---------- */
.result-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.result-video {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-default);
}

.result-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-video-placeholder {
  color: var(--text-muted);
  text-align: center;
}

.result-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.meta-item {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-subtle);
}

.meta-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.meta-value {
  font-size: 14px;
  color: var(--text-primary);
  word-break: break-word;
}

.meta-image {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

/* ---------- 琛ㄦ牸 ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-default);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}

.data-table tr:hover {
  background: var(--bg-elevated);
}

/* ---------- 寰界珷 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: rgba(62, 124, 91, 0.15);
  color: var(--color-success);
}

.badge-error {
  background: rgba(180, 83, 58, 0.15);
  color: var(--color-error);
}

.badge-warning {
  background: rgba(166, 121, 31, 0.15);
  color: var(--color-warning);
}

.badge-info {
  background: rgba(74, 107, 138, 0.15);
  color: var(--color-info);
}

.badge-muted {
  background: rgba(138, 129, 119, 0.15);
  color: var(--color-skipped);
}

/* ---------- 涓婁紶鍖?---------- */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg-elevated);
}

.upload-zone:hover {
  border-color: var(--accent-primary);
  background: rgba(138, 109, 63, 0.05);
}

.upload-zone.dragover {
  border-color: var(--accent-primary);
  background: rgba(138, 109, 63, 0.1);
}

.upload-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.upload-text {
  color: var(--text-secondary);
  font-size: 14px;
}

.upload-hint {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 6px;
}

/* ---------- 缃戞牸鍗＄墖 ---------- */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.asset-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all var(--transition-base);
}

.asset-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.asset-id {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.asset-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Toast 閫氱煡 ---------- */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none; /* 瀹瑰櫒鏈韩涓嶆嫤鎴偣鍑伙紝閬垮厤瑕嗙洊灞忓箷 */
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  animation: slideIn 0.3s ease;
  backdrop-filter: blur(12px);
  pointer-events: auto; /* 鍗曟潯 toast 鍙氦浜?*/
}

.toast.success { border-left: 3px solid var(--color-success); }
.toast.error { border-left: 3px solid var(--color-error); }
.toast.info { border-left: 3px solid var(--color-info); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---------- 鍔犺浇鍔ㄧ敾 ---------- */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(31, 27, 22, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---------- 椤甸潰鍒囨崲 ---------- */
.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 绌虹姸鎬?---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ---------- 鍝嶅簲寮?---------- */
/* 鍙屽垪缃戞牸锛堟浛浠ｅ唴鑱?style锛屾敮鎸佺Щ鍔ㄧ鑷姩鍗曞垪锛?*/
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .result-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .two-col-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* 鏃?768px 瑙勫垯宸茶縼绉昏嚦鏂囦欢鏈熬鐨勭Щ鍔ㄧ鍝嶅簲寮忕郴缁燂紝姝ゅ淇濈暀绌轰綅閬垮厤鍐茬獊 */

/* ============================================
   鏂板缁勪欢鏍峰紡锛堣缃腑蹇?/ 鏂囨宸ヤ綔鍙?/ 鎵归噺澶勭悊锛?
   ============================================ */

/* ---------- 瀛愭爣绛鹃〉锛堟ā鍨嬮厤缃級 ---------- */
.sub-tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.sub-tab {
  flex: 1;
  min-width: max-content;
  padding: 10px 18px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.sub-tab:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.sub-tab.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.sub-page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.sub-page.active {
  display: block;
}

/* ---------- 鎿嶄綔鎸夐挳缃戞牸锛堟枃妗堝伐浣滃彴锛?---------- */
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.action-btn {
  padding: 14px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-align: center;
}

.action-btn:hover {
  background: var(--bg-glass);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.action-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
}

/* ---------- 鏂囨鐖嗘妯℃澘鍗＄墖缃戞牸 ---------- */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.template-card {
  padding: 12px 8px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.template-card i {
  width: 22px;
  height: 22px;
  color: var(--accent-primary);
  margin-bottom: 2px;
}

.template-card .tpl-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.template-card .tpl-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.template-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.template-card.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
}

.template-card.active i,
.template-card.active .tpl-name,
.template-card.active .tpl-desc {
  color: white;
}

.template-card.active .tpl-desc {
  opacity: 0.85;
}

/* ---------- 灏侀潰鏍峰紡閫夋嫨缃戞牸 ---------- */
.cover-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* 鐭╅樀鐢熸垚澶氶€?checkbox 缃戞牸锛堝鏍囦竾鍏存挱鐖嗘壒閲忚鍙橈級 */
.matrix-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}
.matrix-checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-default);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: all var(--transition-fast);
}
.matrix-checkbox-item:hover {
  border-color: var(--accent-primary);
  background: var(--bg-hover);
}
.matrix-checkbox-item input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent-primary);
}
.matrix-checkbox-item input[type="checkbox"]:checked + span {
  color: var(--accent-primary);
  font-weight: 600;
}

.web-system-announcement {
  position: fixed;
  z-index: 1100;
  top: 18px;
  left: 50%;
  width: min(680px, calc(100vw - 40px));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px 13px 16px;
  border: 1px solid rgba(218, 178, 78, 0.32);
  border-radius: 13px;
  color: var(--text-primary);
  background: rgba(21, 18, 29, 0.96);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.web-system-announcement-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.web-system-announcement-copy strong {
  color: var(--accent-gold);
  font-size: 13px;
}

.web-system-announcement-copy span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.web-system-announcement > button {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
}

.web-system-announcement.is-warning {
  border-color: rgba(255, 188, 74, 0.46);
}

.web-system-announcement.is-danger {
  border-color: rgba(255, 100, 117, 0.48);
}

@media (max-width: 768px) {
  .web-system-announcement {
    top: calc(68px + env(safe-area-inset-top));
    width: calc(100vw - 24px);
  }
}

.batch-script-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.batch-script-entry {
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.batch-script-entry:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(221, 179, 79, 0.1);
}

.batch-title-input {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  outline: 0;
  background: rgba(255, 255, 255, 0.012);
}

.batch-title-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  opacity: 0.58;
}

.batch-script-input {
  min-height: 132px;
  resize: vertical;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.batch-script-input:focus {
  border-color: transparent;
  box-shadow: none;
}

.settings-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 16px;
  padding: 18px 20px;
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-md);
  background: linear-gradient(100deg, rgba(221, 179, 79, 0.08), var(--bg-elevated));
}

.settings-section-heading h2 {
  margin: 0 0 5px;
  color: var(--text-primary);
  font-size: 18px;
}

.settings-section-heading p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

@media (max-width: 820px) {
  .batch-script-grid {
    grid-template-columns: 1fr;
  }

  .settings-section-heading {
    align-items: flex-start;
  }
}

.publish-platform-dropdowns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  max-height: none;
  overflow: visible;
  padding: 0;
  background: transparent;
  border: 0;
}

.publish-platform-dropdown {
  position: relative;
  min-width: 0;
}

.publish-platform-dropdown summary {
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 18px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  cursor: pointer;
  list-style: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.publish-platform-dropdown summary::-webkit-details-marker {
  display: none;
}

.publish-platform-dropdown summary:hover,
.publish-platform-dropdown[open] summary,
.publish-platform-dropdown.has-selection summary {
  border-color: var(--accent-primary);
  background: var(--bg-hover);
}

.publish-platform-dropdown summary > i {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.publish-platform-dropdown[open] summary > i {
  transform: rotate(180deg);
}

.publish-platform-summary-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}

.publish-platform-summary-icon {
  font-size: 18px;
}

.publish-platform-summary-state {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.publish-platform-dropdown.has-selection .publish-platform-summary-state {
  color: var(--accent-primary);
}

.publish-platform-account-menu {
  position: absolute;
  z-index: 80;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 240px;
  overflow-y: auto;
  padding: 8px;
  background: #111318;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.publish-platform-account-option {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.publish-platform-account-option:hover {
  border-color: var(--border-default);
  background: var(--bg-hover);
}

.publish-platform-account-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.publish-platform-account-check {
  width: 16px;
  height: 16px;
  border: 1px solid var(--text-muted);
  border-radius: 4px;
  display: grid;
  place-items: center;
}

.publish-platform-account-option input:checked + .publish-platform-account-check {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
}

.publish-platform-account-option input:checked + .publish-platform-account-check::after {
  content: "✓";
  color: #111;
  font-size: 12px;
  font-weight: 900;
}

.publish-platform-account-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-platform-account-option small,
.publish-platform-empty {
  color: var(--text-muted);
  font-size: 11px;
}

.publish-platform-empty {
  padding: 12px 10px;
  text-align: center;
}

.publish-platform-dropdown.is-disabled summary {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .publish-platform-dropdowns {
    grid-template-columns: 1fr;
  }

  .publish-platform-account-menu {
    position: static;
    margin-top: 6px;
  }
}

.cover-style-card {
  padding: 12px 8px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.cover-style-card i {
  width: 22px;
  height: 22px;
  color: var(--accent-primary);
  margin-bottom: 2px;
}

.cover-style-card .cs-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.cover-style-card .cs-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.cover-style-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.cover-style-card.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
}

.cover-style-card.active i,
.cover-style-card.active .cs-name,
.cover-style-card.active .cs-desc {
  color: white;
}

.cover-style-card.active .cs-desc {
  opacity: 0.85;
}

.cover-preview-box {
  background: var(--bg-glass);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 8px;
  text-align: center;
}

/* ---------- 婊戝潡锛坮ange input锛?---------- */
.form-range {
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  margin-top: 10px;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--gradient-primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  border: 2px solid white;
}

.form-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--accent-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
}

.avatar-generation-hint {
  display: block;
  margin-top: 8px;
  color: #74706a;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.65;
}

/* Every range uses gold only for the selected portion. The unselected
   remainder stays black, including sliders rendered dynamically. */
input[type="range"] {
  --range-progress: 0%;
  -webkit-appearance: none;
  appearance: none;
  height: 18px;
  background: transparent;
  border: 0;
  outline: none;
  cursor: pointer;
  accent-color: #ddb34f;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(to right,
    #ddb34f 0%,
    #ddb34f var(--range-progress),
    #050608 var(--range-progress),
    #050608 100%);
  border: 0;
  border-radius: 999px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  background: #ddb34f;
  border: 2px solid #fff4d6;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(221, 179, 79, 0.35),
              0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

input[type="range"]::-moz-range-track {
  height: 6px;
  background: #050608;
  border: 0;
  border-radius: 999px;
}

input[type="range"]::-moz-range-progress {
  height: 6px;
  background: #ddb34f;
  border: 0;
  border-radius: 999px;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #ddb34f;
  border: 2px solid #fff4d6;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(221, 179, 79, 0.35),
              0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

/* ---------- 骞冲彴鍒楄〃锛堝彂甯冭缃級 ---------- */
.platform-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.platform-card {
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.platform-card:hover {
  border-color: var(--accent-primary);
}

.platform-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.platform-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.platform-icon {
  font-size: 20px;
}

.platform-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--bg-base);
  border-radius: 11px;
  cursor: pointer;
  transition: background var(--transition-fast);
  border: 1px solid var(--border-default);
}

.platform-toggle.active {
  background: var(--gradient-primary);
}

.platform-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
}

.platform-toggle.active::after {
  transform: translateX(18px);
}

.platform-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.platform-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

/* ---------- 鎵归噺杩涘害椤?---------- */
.batch-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all var(--transition-fast);
}

.batch-item:hover {
  border-color: var(--border-default);
}

.batch-item-index {
  width: 28px;
  height: 28px;
  background: var(--bg-base);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.batch-item.success .batch-item-index {
  background: var(--color-success);
  color: white;
}

.batch-item.failed .batch-item-index {
  background: var(--color-error);
  color: white;
}

.batch-item.running .batch-item-index {
  background: var(--color-info);
  color: white;
}

.batch-item-content {
  flex: 1;
  min-width: 0;
}

.batch-item-text {
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.batch-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.batch-video-preview-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.batch-video-preview-link:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

.batch-video-preview-link svg {
  width: 13px;
  height: 13px;
}

.batch-item-action {
  flex-shrink: 0;
}

.batch-elastic-deployment-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(229, 184, 74, 0.28);
  border-radius: var(--radius-md);
  background: rgba(229, 184, 74, 0.07);
  color: var(--color-primary);
  font-size: 12px;
  line-height: 1.65;
}

.batch-elastic-deployment-notice[hidden] {
  display: none;
}

.batch-elastic-deployment-notice svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .batch-elastic-deployment-notice {
    padding: 10px 12px;
    font-size: 11px;
  }
}

/* ---------- 閰嶇疆鐘舵€佸窘绔?---------- */
.badge.badge-success { background: rgba(62, 124, 91, 0.15); color: var(--color-success); border: 1px solid rgba(62, 124, 91, 0.3); }
.badge.badge-error { background: rgba(180, 83, 58, 0.15); color: var(--color-error); border: 1px solid rgba(180, 83, 58, 0.3); }
.badge.badge-warning { background: rgba(166, 121, 31, 0.15); color: var(--color-warning); border: 1px solid rgba(166, 121, 31, 0.3); }
.badge.badge-info { background: rgba(74, 107, 138, 0.15); color: var(--color-info); border: 1px solid rgba(74, 107, 138, 0.3); }
.badge.badge-muted { background: rgba(138, 129, 119, 0.15); color: var(--text-muted); border: 1px solid rgba(138, 129, 119, 0.3); }

/* ---------- 娴嬭瘯缁撴灉妗?---------- */
.test-result {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.6;
  animation: fadeIn 0.3s ease;
}

.test-result.success {
  background: rgba(62, 124, 91, 0.1);
  border: 1px solid rgba(62, 124, 91, 0.3);
  color: var(--color-success);
}

.test-result.error {
  background: rgba(180, 83, 58, 0.1);
  border: 1px solid rgba(180, 83, 58, 0.3);
  color: var(--color-error);
}

.test-result.info {
  background: rgba(74, 107, 138, 0.1);
  border: 1px solid rgba(74, 107, 138, 0.3);
  color: var(--color-info);
}

/* ---------- 閰嶇疆鍙樻洿鎻愮ず ---------- */
.config-changed-hint {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(166, 121, 31, 0.15);
  color: var(--color-warning);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

/* ---------- 棰滆壊閫夋嫨鍣ㄧ壒娈婃牱寮?---------- */
input[type="color"] {
  cursor: pointer;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

/* ---------- 婊氬姩鏉＄編鍖?---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}

/* ---------- 琛ㄥ崟鍏冪礌缁熶竴 ---------- */
.form-input[type="number"],
.form-input[type="password"] {
  font-family: var(--font-mono);
}

/* ---------- 鎸夐挳缁?---------- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row > *:only-child {
  grid-column: 1 / -1;
}

/* ============================================
   鍒涗綔鍚戝 / 妯℃澘涓績 / 鍦烘櫙涓庢晥鏋?鏂板鏍峰紡
   ============================================ */

/* ---------- 鍚戝姝ラ鎸囩ず鍣?---------- */
.wizard-stepper {
  --wizard-purple: #8b5cf6;
  --wizard-purple-bright: #a78bfa;
  --wizard-purple-soft: #c4b5fd;
  --wizard-purple-deep: #6d28d9;
  --wizard-focus-x: 10%;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 126px;
  padding: 28px 24px 24px;
  margin-bottom: 28px;
  background: #0e0e14;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: var(--radius-lg);
  flex-wrap: nowrap;
  overflow-x: auto;
}

.wizard-focus-glow {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: var(--wizard-focus-x);
  width: 240px;
  height: 128px;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(139, 92, 246, 0.22) 0%,
    rgba(109, 40, 217, 0.09) 42%,
    transparent 72%
  );
  transform: translate(-50%, -50%);
  transition: left 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.wizard-step {
  --wizard-node-size: 32px;
  position: relative;
  z-index: 1;
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 0;
  gap: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.wizard-step:hover {
  transform: translateY(-1px);
}

.wizard-step:focus-visible {
  outline: none;
}

.wizard-step:focus-visible .wizard-step-circle {
  outline: 2px solid var(--wizard-purple-soft);
  outline-offset: 5px;
}

.wizard-step[data-step="1"] { --wizard-node-size: 32px; }
.wizard-step[data-step="2"] { --wizard-node-size: 34px; }
.wizard-step[data-step="3"] { --wizard-node-size: 36px; }
.wizard-step[data-step="4"] { --wizard-node-size: 38px; }
.wizard-step[data-step="5"] { --wizard-node-size: 40px; }

.wizard-step:not(.active):not(.completed) {
  opacity: 0.72;
}

.wizard-step-circle {
  position: relative;
  width: var(--wizard-node-size);
  height: var(--wizard-node-size);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  background: #181820;
  border: 1px solid #52525b;
  color: #a1a1aa;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  transition:
    background-color 200ms ease,
    border-color 200ms ease,
    color 200ms ease,
    box-shadow 220ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--font-display);
}

.wizard-step-circle::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: rotate(-18deg) scale(0.72);
  background:
    radial-gradient(circle at 50% 2px, var(--wizard-purple-soft) 0 2px, transparent 2.5px),
    radial-gradient(circle at calc(100% - 3px) 50%, var(--wizard-purple) 0 2px, transparent 2.5px),
    radial-gradient(circle at 50% calc(100% - 2px), var(--wizard-purple-soft) 0 1.5px, transparent 2px),
    radial-gradient(circle at 3px 50%, var(--wizard-purple) 0 1.5px, transparent 2px);
  transition:
    opacity 180ms ease,
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.wizard-step.active .wizard-step-circle {
  background: var(--wizard-purple);
  border-color: var(--wizard-purple-bright);
  color: white;
  box-shadow:
    0 0 0 5px rgba(139, 92, 246, 0.14),
    0 0 28px rgba(139, 92, 246, 0.4);
  transform: scale(1.08);
}

.wizard-step.active .wizard-step-circle::before {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.wizard-step.completed .wizard-step-circle {
  background: var(--wizard-purple-deep);
  border-color: var(--wizard-purple);
  color: white;
  box-shadow: 0 0 16px rgba(109, 40, 217, 0.24);
}

.wizard-step-text {
  font-size: 13px;
  font-weight: 600;
  color: #a1a1aa;
  white-space: nowrap;
  transition: color 180ms ease;
}

.wizard-step.active .wizard-step-text {
  color: var(--wizard-purple-soft);
}

.wizard-step.completed .wizard-step-text {
  color: var(--wizard-purple-bright);
}

.wizard-step-line {
  position: relative;
  z-index: 1;
  flex: 1;
  height: 3px;
  min-width: 24px;
  background: #3f3f46;
  margin: 0 4px 27px;
  transition: background 220ms ease, box-shadow 220ms ease;
  border-radius: 999px;
}

.wizard-step-line.completed {
  background: linear-gradient(90deg, var(--wizard-purple-deep), var(--wizard-purple-bright));
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.26);
}

@media (prefers-reduced-motion: reduce) {
  .wizard-focus-glow,
  .wizard-step,
  .wizard-step-circle,
  .wizard-step-circle::before,
  .wizard-step-line,
  .wizard-step-text {
    transition: none !important;
  }
}

/* ---------- 鍚戝闈㈡澘 ---------- */
.wizard-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.wizard-panel.active {
  display: block;
}

/* ---------- 鍚戝搴曢儴瀵艰埅 ---------- */
.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  margin-top: 24px;
  background: rgba(34, 21, 52, 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
  border: 1px solid rgba(151, 112, 203, 0.26);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(222, 202, 245, 0.08),
    0 14px 38px rgba(13, 7, 22, 0.3);
  position: sticky;
  bottom: 16px;
  z-index: 10;
}

@media (prefers-reduced-transparency: reduce) {
  .wizard-footer {
    background: #221534;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.wizard-progress-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* ---------- 鎸夐挳鍗＄墖缃戞牸锛堝Э鎬?鎯呮劅/浣嶇疆绛夛級 ---------- */
.btn-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.btn-card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.btn-card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.btn-card {
  padding: 14px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.btn-card:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-card.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(138, 109, 63, 0.4);
}

#avatar-generation-model-grid .btn-card.active {
  background: linear-gradient(145deg, rgba(91, 33, 182, 0.92), rgba(139, 92, 246, 0.96));
  border-color: #8b5cf6;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.32), 0 0 0 1px rgba(167, 139, 250, 0.2);
}

#avatar-generation-model-grid .btn-card:disabled {
  cursor: wait;
}

.avatar-generation-status {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: 10px;
  color: var(--text-secondary);
  background: rgba(139, 92, 246, 0.08);
  font-size: 12px;
  line-height: 1.55;
}

.avatar-generation-status:not(:empty) {
  display: block;
}

.avatar-generation-status.is-pending {
  color: #c4b5fd;
}

.avatar-generation-status.is-success {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.08);
}

.avatar-generation-status.is-error {
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.28);
  background: rgba(244, 63, 94, 0.08);
}

.seedance-real-face-reminder {
  display: block;
  margin-top: 8px;
  line-height: 1.55;
}

.avatar-library-action-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.avatar-library-inline-hint {
  min-width: 0;
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
}

.hint-link-button {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  color: #c4b5fd;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: transparent;
  cursor: pointer;
}

.face-verification-guide {
  margin-bottom: 18px;
}

.face-verification-guide .card-title {
  margin-bottom: 10px;
}

.face-verification-grid {
  align-items: stretch;
  margin-bottom: 18px;
}

.face-verification-grid > .card {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.face-verification-grid > .card > .btn:last-child {
  margin-top: auto;
}

.face-verification-qr-dialog {
  width: min(680px, calc(100vw - 32px));
}

.face-verification-qr-body {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.face-verification-qr-image {
  display: block;
  width: 232px;
  height: 232px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
}

.face-verification-qr-copy {
  display: grid;
  gap: 10px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.face-verification-qr-copy strong {
  color: var(--text-primary);
  font-size: 18px;
}

.face-verification-qr-copy p {
  margin: 0;
}

.face-verification-qr-state {
  grid-column: 1 / -1;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 12px;
  color: #d8ccff;
  background: rgba(139, 92, 246, 0.08);
}

.face-verification-qr-state.is-success {
  border-color: rgba(74, 222, 128, 0.3);
  color: #86efac;
  background: rgba(22, 101, 52, 0.15);
}

.face-verification-qr-state.is-error {
  border-color: rgba(248, 113, 113, 0.32);
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.16);
}

.face-verification-qr-actions {
  justify-content: flex-end;
}

@media (max-width: 760px) {
  #seedance-real-verify-qr-modal {
    display: none !important;
  }
}

.seedance-avatar-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.seedance-avatar-library-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(24, 21, 31, 0.96), rgba(14, 14, 19, 0.98));
}

.seedance-avatar-library-preview {
  grid-row: 1 / span 2;
  overflow: hidden;
  width: 76px;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(221, 179, 79, 0.16);
  border-radius: 10px;
  background: #0a0a0f;
}

.seedance-avatar-library-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seedance-avatar-library-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #8b5cf6;
}

.seedance-avatar-library-placeholder svg {
  width: 28px;
  height: 28px;
}

.seedance-avatar-library-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.seedance-avatar-library-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.seedance-avatar-library-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seedance-avatar-library-copy > span,
.seedance-avatar-library-copy > small {
  color: var(--text-muted);
  font-size: 11px;
}

.seedance-avatar-library-copy code {
  overflow: hidden;
  color: #c4b5fd;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seedance-avatar-library-card > .btn {
  grid-column: 2;
  justify-self: start;
}

@media (max-width: 700px) {
  #avatar-generation-model-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  #avatar-generation-model-grid .btn-card {
    min-width: 0;
    padding: 9px 4px;
    gap: 3px;
  }

  #avatar-generation-model-grid .btn-card-icon,
  #avatar-generation-model-grid .btn-card-icon svg {
    width: 17px;
    height: 17px;
    font-size: 17px;
  }

  #avatar-generation-model-grid .btn-card-label {
    font-size: 10px;
    line-height: 1.25;
    white-space: normal;
  }

  #avatar-generation-model-grid .btn-card-desc {
    font-size: 9px;
    line-height: 1.25;
    white-space: normal;
  }

  .seedance-avatar-library-grid {
    grid-template-columns: 1fr;
  }

  .seedance-avatar-library-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .seedance-avatar-library-preview {
    width: 64px;
  }
}

.btn-card-icon {
  font-size: 22px;
  line-height: 1;
}

.btn-card-label {
  font-weight: 600;
}

.btn-card-desc {
  font-size: 11px;
  opacity: 0.8;
  line-height: 1.4;
}

/* ---------- 寮€鍏筹紙toggle switch锛?---------- */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--gradient-primary);
  border-color: transparent;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateY(-50%) translateX(20px);
  background: white;
}

/* ---------- 妯℃澘鍗＄墖缃戞牸 ---------- */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.template-card {
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.template-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.template-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.template-card:hover::before {
  opacity: 1;
}

.template-card.selected {
  border-color: var(--accent-primary);
  background: rgba(138, 109, 63, 0.08);
  box-shadow: 0 0 0 2px var(--accent-primary), var(--shadow-glow);
}

.template-card.selected::before {
  opacity: 1;
}

.template-card-icon {
  font-size: 36px;
  margin-bottom: 12px;
  line-height: 1;
}

.template-card-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.template-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.template-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.template-card-tag {
  font-size: 10px;
  padding: 2px 8px;
  background: rgba(138, 109, 63, 0.15);
  color: var(--accent-primary);
  border-radius: 10px;
  font-weight: 500;
}

.template-card-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}

/* ---------- 瀛楀箷鏍峰紡棰勮缃戞牸 ---------- */
.subtitle-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.subtitle-style-card {
  padding: 16px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.subtitle-style-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.subtitle-style-card.active {
  border-color: var(--accent-primary);
  background: rgba(138, 109, 63, 0.1);
  box-shadow: 0 0 0 2px var(--accent-primary);
}

.subtitle-style-preview {
  font-size: 15px;
  font-weight: 700;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: #000;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subtitle-style-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ---------- 閰嶇疆姹囨€荤綉鏍?---------- */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.summary-card {
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.summary-card-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.summary-card-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}

.summary-card-row .key {
  color: var(--text-muted);
}

.summary-card-row .val {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  word-break: break-all;
}

/* ---------- 鎶樺彔鍖?---------- */
.collapse-body {
  animation: fadeIn 0.3s ease;
}

/* ============================================
   棣栭〉浠〃鐩?/ 鍒涗綔鍚戝澧炲己 / 杩涘害妯℃€佹
   ============================================ */

/* ---------- 浠〃鐩?Hero 娆㈣繋鍖?---------- */
/* 棣栭〉寮€骞曞尯锛氭斁鏄犲巺娣卞ⅷ澶у箷锛堢敾寤婇噷鐨勪竴闈㈡垙鍓у锛?*/
.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 56px 56px;
  margin-bottom: 40px;
  background: var(--stage-base);
  border: 1px solid rgba(138, 109, 63, 0.35);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  color: var(--stage-text);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.dashboard-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 100% at 86% 28%, rgba(116, 52, 176, 0.055), transparent 68%),
    linear-gradient(102deg, rgba(3, 4, 7, 0.995) 0%, rgba(5, 6, 10, 0.985) 58%, rgba(8, 6, 13, 0.97) 100%),
    repeating-linear-gradient(90deg, rgba(240, 235, 226, 0.02) 0 1px, transparent 1px 96px);
  pointer-events: none;
  z-index: 0;
}

.hero-particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
}

.hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--stage-text);
  white-space: nowrap;
}

.hero-title-cascade {
  position: relative;
  display: inline-block;
  width: max-content;
  max-width: 100%;
  padding: 0.15em 0.08em;
  margin-left: -0.08em;
  overflow: hidden;
  color: var(--stage-text);
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: color 350ms ease;
}

.hero-cascade-track {
  position: relative;
  display: inline-flex;
  height: 1em;
  overflow: hidden;
}

.hero-cascade-char {
  position: relative;
  display: inline-block;
  text-shadow: 0 1em currentColor;
  transform: translateY(0);
  transition: transform 250ms ease-in-out;
  transition-delay: calc(var(--cascade-index) * 25ms);
  will-change: transform;
}

.hero-title-cascade:hover,
.hero-title-cascade:focus-visible {
  color: #ddb34f;
}

.hero-title-cascade:hover .hero-cascade-char,
.hero-title-cascade:focus-visible .hero-cascade-char {
  transform: translateY(-1em);
}

.hero-title-cascade:focus-visible {
  outline: 2px solid rgba(221, 179, 79, 0.72);
  outline-offset: 4px;
}

.hero-title-motion {
  position: relative;
  display: flex;
  align-items: baseline;
  isolation: isolate;
  width: max-content;
  max-width: none;
}

.hero-title-fixed {
  flex: 0 0 auto;
}

.hero-title-focus-track {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.12em;
}

.hero-title-focus-word {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  filter: blur(5px);
  opacity: 0.72;
  transition: filter 500ms ease, opacity 500ms ease;
  will-change: filter, opacity;
}

.hero-title-focus-word.is-active {
  filter: blur(0);
  opacity: 1;
}

.hero-title-focus-box {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  transition: transform 500ms ease, width 500ms ease, height 500ms ease, opacity 180ms ease;
  will-change: transform, width, height;
}

.hero-title-focus-box .corner {
  position: absolute;
  display: block;
  width: 11px;
  height: 11px;
  border-color: rgba(173, 99, 255, 0.96);
  filter: drop-shadow(0 0 5px rgba(153, 72, 245, 0.55));
}

.hero-title-focus-box .tl {
  left: -5px;
  top: -3px;
  border-left: 2px solid;
  border-top: 2px solid;
}

.hero-title-focus-box .tr {
  right: -5px;
  top: -3px;
  border-right: 2px solid;
  border-top: 2px solid;
}

.hero-title-focus-box .bl {
  left: -5px;
  bottom: -3px;
  border-left: 2px solid;
  border-bottom: 2px solid;
}

.hero-title-focus-box .br {
  right: -5px;
  bottom: -3px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.hero-subtitle {
  color: var(--stage-text-dim);
  font-size: 17px;
  letter-spacing: 0.06em;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-actions .btn-secondary {
  background: transparent;
  color: var(--stage-text);
  border: 1px solid rgba(240, 235, 226, 0.3);
}

.hero-actions .btn-secondary:hover {
  background: rgba(240, 235, 226, 0.08);
  border-color: rgba(240, 235, 226, 0.5);
}

.hero-decoration {
  position: relative;
  z-index: 2;
  width: 460px;
  height: 326px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -154px;
  margin-right: 4px;
}

.hero-assistant-orb {
  --orb-pointer-x: 0px;
  --orb-pointer-y: 0px;
  --orb-pointer-tilt: 0deg;
  position: relative;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  isolation: isolate;
  filter: drop-shadow(0 0 22px rgba(244, 114, 182, 0.72)) drop-shadow(0 0 42px rgba(168, 85, 247, 0.46));
  animation: hero-orb-float 5.2s ease-in-out infinite;
  transition: filter 220ms ease, transform 220ms ease;
  will-change: transform, filter;
}

.hero-assistant-orb::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 245, 255, 0.74) 0%, rgba(244, 114, 182, 0.48) 26%, rgba(168, 85, 247, 0.32) 48%, rgba(59, 130, 246, 0.14) 66%, transparent 78%);
  filter: blur(18px) saturate(1.35);
  animation: hero-orb-breathe 2.2s ease-in-out infinite alternate;
}

.hero-assistant-orb::after {
  content: '';
  position: absolute;
  z-index: 5;
  left: 48px;
  top: 61px;
  width: 13px;
  height: 23px;
  border-radius: 50%;
  background: #090711;
  box-shadow: 35px 0 0 #090711, 0 0 10px rgba(216, 180, 254, 0.6), 35px 0 10px rgba(216, 180, 254, 0.6);
  transform-origin: center center;
  animation: hero-orb-blink 4.2s ease-in-out infinite;
}

.hero-assistant-orb span {
  position: absolute;
  z-index: 2;
  display: block;
  border: 0;
  border-radius: 58% 42% 34% 66% / 58% 34% 66% 42%;
  filter: blur(7px);
  mix-blend-mode: screen;
  opacity: 0.95;
}

.hero-assistant-orb span:nth-child(1) {
  inset: 10px;
  background: linear-gradient(45deg, rgba(255, 245, 255, 0.98), rgba(217, 70, 239, 0.88), rgba(99, 102, 241, 0.56));
  animation: hero-orb-morph 4s ease-in-out infinite, hero-orb-spin 6s linear infinite;
}

.hero-assistant-orb span:nth-child(2) {
  inset: 18px;
  background: linear-gradient(45deg, rgba(126, 34, 206, 0.92), rgba(236, 72, 153, 0.82), rgba(56, 189, 248, 0.34));
  animation: hero-orb-morph 5s ease-in-out infinite reverse, hero-orb-spin 7.2s linear infinite reverse;
}

.hero-assistant-orb span:nth-child(3) {
  inset: 4px;
  background: linear-gradient(45deg, rgba(59, 130, 246, 0.68), rgba(168, 85, 247, 0.88), rgba(244, 114, 182, 0.62));
  animation: hero-orb-morph 3.6s ease-in-out infinite, hero-orb-spin 4.8s linear infinite;
}

.hero-decoration:hover .hero-assistant-orb {
  filter: drop-shadow(0 0 26px rgba(244, 114, 182, 0.82)) drop-shadow(0 0 50px rgba(168, 85, 247, 0.56)) brightness(1.06);
}

.hero-decoration.is-pointer-active .hero-assistant-orb::before {
  filter: blur(20px) saturate(1.5);
}

@keyframes hero-orb-float {
  0%, 100% {
    transform: translate3d(var(--orb-pointer-x), var(--orb-pointer-y), 0) rotate(var(--orb-pointer-tilt));
  }
  42% {
    transform: translate3d(calc(var(--orb-pointer-x) + 3px), calc(var(--orb-pointer-y) - 13px), 0) rotate(calc(var(--orb-pointer-tilt) + 1deg));
  }
  72% {
    transform: translate3d(calc(var(--orb-pointer-x) - 2px), calc(var(--orb-pointer-y) - 6px), 0) rotate(calc(var(--orb-pointer-tilt) - 0.6deg));
  }
}

@keyframes hero-orb-breathe {
  0% { opacity: 0.72; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1.08); }
}

@keyframes hero-orb-morph {
  0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  33% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 50%; }
  66% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

@keyframes hero-orb-spin {
  0% { transform: rotate(0); }
  100% { transform: rotate(1turn); }
}

@keyframes hero-orb-blink {
  0%, 84%, 100% { transform: scaleY(1); }
  89%, 94% { transform: scaleY(0.12); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-assistant-orb,
  .hero-assistant-orb::before,
  .hero-assistant-orb::after,
  .hero-assistant-orb span,
  .hero-title-focus-word,
  .hero-title-focus-box {
    animation: none !important;
    transition: none !important;
  }

  .hero-title-focus-word {
    filter: none;
    opacity: 1;
  }

  .hero-title-focus-box {
    display: none;
  }

  .hero-cascade-char {
    transition: none !important;
  }

  .hero-title-cascade:hover .hero-cascade-char,
  .hero-title-cascade:focus-visible .hero-cascade-char {
    transform: none;
  }
}

/* ========== 算力中心 ========== */
#page-health {
  max-width: 1440px;
  margin: 0 auto;
}

.compute-center-shell {
  display: grid;
  gap: 18px;
}

.compute-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 24px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: #0f1115;
  box-shadow: inset 3px 0 0 rgba(221, 179, 79, 0.72);
}

.compute-overview-copy {
  max-width: 680px;
}

.compute-overview-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--accent-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.compute-overview-eyebrow svg {
  width: 16px;
  height: 16px;
}

.compute-overview-copy h2 {
  margin: 0 0 7px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.35;
}

.compute-overview-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

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

.compute-sync-state {
  display: flex;
  min-width: 184px;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: #0a0b0e;
}

.compute-sync-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 3px rgba(62, 124, 91, 0.14);
}

.compute-center-sync {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.compute-wallets {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 18px;
}

.compute-wallet-card {
  display: flex;
  min-height: 356px;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: #0f1115;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.compute-wallet-card:hover {
  border-color: rgba(221, 179, 79, 0.4);
}

.compute-wallet-card.is-unlimited {
  box-shadow: inset 0 3px 0 rgba(197, 190, 177, 0.18);
}

.compute-wallet-card.is-metered {
  border-color: rgba(221, 179, 79, 0.32);
  box-shadow: inset 0 3px 0 rgba(221, 179, 79, 0.74);
}

.compute-wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
}

.compute-wallet-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.compute-wallet-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(221, 179, 79, 0.28);
  border-radius: 7px;
  color: var(--accent-primary);
  background: #1a1710;
}

.compute-wallet-icon svg {
  width: 22px;
  height: 22px;
}

.compute-wallet-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.compute-wallet-status {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 12px;
  background: #0a0b0e;
}

.compute-wallet-status svg {
  width: 14px;
  height: 14px;
  color: var(--accent-primary);
}

.compute-wallet-name {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.compute-wallet-balance {
  display: flex;
  min-height: 58px;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.compute-wallet-balance strong {
  color: var(--accent-primary);
  font-size: clamp(44px, 4vw, 58px);
  line-height: 1;
}

.compute-wallet-balance span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.compute-wallet-description {
  min-height: 44px;
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.compute-wallet-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.compute-wallet-scope span {
  padding: 7px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  color: var(--text-secondary);
  font-size: 12px;
  background: #0a0b0e;
}

.compute-wallet-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.compute-wallet-rule {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.compute-wallet-rule svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--accent-primary);
}

.compute-wallet-card .compute-recharge-btn {
  min-width: 150px;
}

.compute-wallet-card .compute-recharge-btn:disabled {
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  background: #121419;
  opacity: 1;
  cursor: default;
}

.compute-usage-panel {
  display: grid;
  grid-template-columns: minmax(210px, 0.68fr) minmax(0, 2fr);
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: #0f1115;
}

.compute-usage-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.compute-usage-heading h2 {
  margin: 1px 0 6px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 17px;
}

.compute-usage-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.compute-usage-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.compute-usage-list article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: #0a0b0e;
}

.compute-usage-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(221, 179, 79, 0.2);
  border-radius: 6px;
  color: var(--accent-primary);
  background: #1a1710;
}

.compute-usage-icon svg {
  width: 16px;
  height: 16px;
}

.compute-usage-list strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text-primary);
  font-size: 13px;
}

.compute-usage-list p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.65;
}

@media (prefers-reduced-motion: reduce) {
  .compute-wallet-card {
    transition: none;
  }
}

@media (max-width: 1080px) {
  .compute-wallets {
    grid-template-columns: 1fr;
  }

  .compute-wallet-card {
    min-height: 330px;
  }

  .compute-usage-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .compute-overview {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .compute-center-toolbar {
    width: 100%;
    justify-content: space-between;
  }

  .compute-usage-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  #page-health {
    width: 100%;
  }

  .compute-overview,
  .compute-usage-panel {
    padding: 18px;
  }

  .compute-overview-copy h2 {
    font-size: 18px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .compute-overview-copy p,
  .compute-wallet-description,
  .compute-wallet-rule {
    overflow-wrap: anywhere;
  }

  .compute-center-toolbar {
    align-items: stretch;
    flex-direction: column;
    justify-content: space-between;
  }

  .compute-sync-state {
    width: 100%;
  }

  .compute-center-toolbar .btn {
    width: 100%;
  }

  .compute-wallet-card {
    min-height: 0;
    padding: 20px 18px;
  }

  .compute-wallet-head,
  .compute-wallet-action {
    align-items: flex-start;
    flex-direction: column;
  }

  .compute-wallet-head {
    margin-bottom: 24px;
  }

  .compute-wallet-card .compute-recharge-btn {
    width: 100%;
  }

  .compute-wallet-balance {
    font-size: 30px;
  }

  .compute-wallet-balance strong {
    font-size: 42px;
  }

  .compute-wallet-scope {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compute-wallet-scope span {
    min-width: 0;
    text-align: center;
  }
}

/* ==========================================================
   Mobile product adaptation v1
   Touch-first layout for the web workspace (320px - 768px).
   ========================================================== */
@media (max-width: 768px) {
  body.mobile-drawer-open {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  .mobile-topbar {
    min-height: calc(56px + env(safe-area-inset-top));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
    background: rgba(12, 12, 16, 0.96) !important;
  }

  .mobile-logo {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-logo .product-brand-logo {
    width: 28px;
    height: 28px;
    flex: none;
  }

  .sidebar {
    width: min(86vw, 320px);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    overscroll-behavior: contain;
  }

  .sidebar-overlay {
    backdrop-filter: blur(2px);
  }

  .main-content {
    min-width: 0;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
    padding-left: max(12px, env(safe-area-inset-left)) !important;
  }

  .page,
  .page > *,
  .card,
  .card-header > *,
  .montage-workspace > *,
  .clone-workspace > * {
    min-width: 0;
  }

  .page-header,
  .montage-page-header,
  .clone-page-header,
  .clipforge-page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .page-title {
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .page-subtitle,
  .form-hint,
  .montage-retention-note,
  .montage-vision-note {
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  .card-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .card-header > .btn,
  .card-header > .badge,
  .card-header > .clone-progress-updated {
    flex: none;
  }

  .btn-sm,
  .action-btn,
  .montage-group-delete,
  .montage-file-delete {
    min-height: 44px;
  }

  .montage-group-delete,
  .montage-file-delete {
    min-width: 44px;
  }

  .form-input,
  .form-textarea,
  .form-select,
  .web-auth-input,
  .web-auth-send-code {
    font-size: 16px;
  }

  .bottom-nav {
    height: calc(64px + env(safe-area-inset-bottom));
    padding-right: env(safe-area-inset-right);
    padding-left: env(safe-area-inset-left);
    background: rgba(12, 12, 16, 0.97) !important;
  }

  .bottom-nav-item {
    min-height: 56px;
    gap: 4px;
  }

  .bottom-nav-icon svg {
    width: 20px;
    height: 20px;
  }

  .modal,
  .progress-modal {
    max-height: 100dvh;
  }

  .web-desktop-only-notice {
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: calc(100% - 24px);
    max-width: 430px;
  }

  /* Smart montage: keep upload, settings and task controls thumb-friendly. */
  .montage-compose-card,
  .montage-result-card {
    padding: 14px;
  }

  .montage-dropzone,
  .montage-dropzone.compact {
    min-height: 116px;
    padding: 16px 12px;
  }

  .montage-upload-limit {
    margin-top: 10px;
  }

  .montage-file-list {
    max-height: 44dvh;
  }

  .montage-material-group-head {
    min-height: 48px;
  }

  .montage-file-row {
    grid-template-columns: 24px 18px minmax(0, 1fr) 44px;
    min-height: 48px;
    padding-right: 0;
  }

  .montage-file-size {
    display: none;
  }

  .montage-start-btn {
    width: 100%;
    min-width: 0;
    margin-top: 4px;
  }

  .montage-job-actions {
    align-items: stretch;
    justify-content: stretch;
  }

  .montage-job-actions .btn {
    flex: 1 1 0;
  }

  /* Hot clone: the four stages become a horizontally scannable mobile rail. */
  .clone-stepper {
    display: flex;
    gap: 8px;
    margin-right: -12px;
    margin-left: -12px;
    padding: 0 12px 8px;
    overflow-x: auto;
    border: 0;
    background: transparent;
    scroll-padding-inline: 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .clone-stepper::-webkit-scrollbar {
    display: none;
  }

  .clone-stepper button,
  .clone-stepper button:nth-child(2),
  .clone-stepper button:last-child {
    flex: 0 0 min(78vw, 286px);
    min-height: 76px;
    padding: 12px 14px;
    border: 1px solid rgba(231, 185, 73, 0.2);
    border-radius: 10px;
    background: #0d0d12;
    scroll-snap-align: start;
  }

  .clone-flow-card {
    min-height: 0;
    padding: 14px;
  }

  .clone-dropzone {
    min-height: 150px;
    padding: 20px 14px;
  }

  .clone-step-actions {
    flex-wrap: wrap;
  }

  .clone-step-actions > span:empty {
    display: none;
  }

  .clone-step-actions .btn,
  .clone-submit-btn {
    flex: 1 1 140px;
    width: 100%;
    min-width: 0;
  }

  .clone-task-actions {
    align-items: stretch;
  }

  .clone-task-actions .btn {
    flex: 1 1 0;
  }

  .clone-task-video-player {
    width: min(100%, 320px);
  }

  .clone-task-video-controls {
    min-height: 52px;
    grid-template-columns: 44px auto minmax(44px, 1fr) 44px;
  }

  .clone-task-video-controls button {
    width: 44px;
    height: 44px;
  }

  /* The embedded commerce workspace should fill the usable mobile viewport. */
  .clipforge-shell {
    height: calc(100dvh - 156px);
    min-height: 520px;
    border-radius: 10px;
  }
}

@media (max-width: 480px) {
  .mobile-logo {
    font-size: 14px;
  }

  .bottom-nav-label {
    display: block;
  }

  .montage-job-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
  }

  .montage-job-preview {
    width: 64px;
  }

  .clone-progress-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clone-progress-item-head {
    flex-direction: column;
    gap: 4px;
  }

  .clone-progress-item-head em {
    align-self: flex-start;
  }
}

/* 閾滅幆鑸炲彴鐏紙鏇夸唬鏃ф笎鍙樺厜鐞冿級 */
.hero-orb {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(190, 155, 100, 0.5);
  animation: float 7s ease-in-out infinite;
}

.hero-orb-2 {
  width: 120px;
  height: 120px;
  border-color: rgba(190, 155, 100, 0.28);
  animation: float 7s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(8px, -8px); }
}

.hero-icon-big {
  position: relative;
  z-index: 1;
  font-size: 64px;
  color: #D8B878;
  animation: float 5s ease-in-out infinite;
}

/* ---------- 鍖哄潡鏍囬锛堝畫浣?+ 閾滆壊灏忔爣锛?---------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  margin-top: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 22px;
  background: var(--accent-primary);
  border-radius: 2px;
}

/* ---------- 鍦烘櫙鍖栧叆鍙ｅ崱 ---------- */
.scene-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.scene-card {
  position: relative;
  padding: 24px 20px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  overflow: hidden;
}

.scene-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.scene-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.scene-card:hover::before {
  opacity: 1;
}

.scene-card-icon {
  font-size: 36px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.scene-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.scene-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* ---------- 鏈€杩戝垱浣滄í鍚戞粴鍔?---------- */
.recent-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 36px;
  scroll-snap-type: x mandatory;
}

.recent-card {
  flex-shrink: 0;
  width: 224px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
  scroll-snap-align: start;
}

.recent-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.recent-card-thumb {
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #070708;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}

.recent-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.recent-card-body {
  padding: 14px 16px;
}

.recent-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: 39px;
}

.recent-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.recent-card-time {
  font-size: 11px;
  color: var(--text-muted);
}

.recent-scroll .empty-state {
  width: 100%;
  flex-shrink: 0;
}

/* ---------- 绯荤粺鐘舵€佹潯 ---------- */
.dashboard-status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 18px 24px;
  margin-top: 12px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
}

.status-bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-bar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-skipped);
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.status-bar-item.ok .status-bar-dot {
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

.status-bar-item.warn .status-bar-dot {
  background: var(--color-warning);
  box-shadow: 0 0 8px var(--color-warning);
}

.status-bar-item.error .status-bar-dot {
  background: var(--color-error);
  box-shadow: 0 0 8px var(--color-error);
}

.status-bar-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-bar-item.ok .status-bar-label {
  color: var(--color-success);
}

.status-bar-item.warn .status-bar-label {
  color: var(--color-warning);
}

.status-bar-item.error .status-bar-label {
  color: var(--color-error);
}

/* ---------- 鏁板瓧浜哄崱鐗囩綉鏍?---------- */
.avatar-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.avatar-card {
  position: relative;
  padding: 16px;
  background: var(--bg-elevated);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

.subtitle-preview-layered {
  width: 100%;
  min-height: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.subtitle-preview-headline {
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 15px;
  line-height: 1.1;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 0 #000, 1px 0 0 #000, -1px 0 0 #000;
}

.subtitle-preview-caption {
  font-size: 17px;
  line-height: 1.05;
  font-weight: 900;
}

.subtitle-preview-layered small {
  color: rgba(255, 255, 255, 0.78);
  font-family: Arial, sans-serif;
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.1px;
}

.avatar-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.avatar-card.selected {
  border-color: #8b5cf6 !important;
  background: rgba(139, 92, 246, 0.1) !important;
  box-shadow: 0 0 0 2px #8b5cf6, 0 0 20px rgba(139, 92, 246, 0.24) !important;
}

.avatar-card.selected::after {
  content: '鉁?;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-card-img {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 10px;
  overflow: hidden;
}

.avatar-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.avatar-portrait-media {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.avatar-card-img .avatar-portrait-media {
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}

.avatar-upload-preview-media {
  display: block;
  width: 100%;
  max-height: 440px;
  aspect-ratio: var(--avatar-upload-ratio, 4 / 5);
  object-fit: contain;
  background: #050507;
}

.avatar-upload-preview {
  margin-top: 12px;
}

.avatar-upload-preview-card {
  width: min(100%, 360px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(231, 185, 73, 0.25);
  border-radius: var(--radius-md);
  background: #09090d;
}

.avatar-upload-preview-card.is-landscape {
  width: min(100%, 620px);
}

.avatar-upload-preview-card > strong {
  display: block;
  overflow: hidden;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-portrait-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.avatar-library-card {
  grid-column: 1 / -1;
  min-width: 0;
}

.avatar-library-card .empty-state {
  grid-column: 1 / -1;
}

#avatars-grid {
  display: flex;
  align-items: flex-start;
  align-content: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.avatar-library-item {
  display: flex;
  width: 178px;
  min-width: 0;
  padding: 8px;
  flex: 0 0 auto;
  flex-direction: column;
  align-self: flex-start;
}

.avatar-library-item.is-landscape {
  width: 248px;
}

.avatar-library-item.is-square {
  width: 198px;
}

.avatar-library-item-body {
  display: flex;
  min-height: 84px;
  padding-top: 8px;
  flex: 0 0 auto;
  flex-direction: column;
}

.avatar-library-item .asset-id {
  margin: 0 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-library-badges {
  display: flex;
  min-height: 18px;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
}

.avatar-library-reference-type {
  display: flex;
  min-height: 18px;
  margin-top: 2px;
  align-items: center;
  gap: 4px;
  color: #6b7280;
  font-size: 11px;
}

.avatar-library-reference-type svg {
  width: 12px;
  height: 12px;
}

.avatar-library-media-shell {
  position: relative;
  width: min(100%, 160px);
  margin: 0 auto;
  overflow: hidden;
  aspect-ratio: var(--avatar-media-ratio, 9 / 16);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.avatar-library-media-shell.is-landscape {
  width: min(100%, 230px);
}

.avatar-library-media-shell.is-square {
  width: min(100%, 180px);
}

.avatar-library-item > .avatar-library-preview-media {
  width: min(100%, 160px);
  margin: 0 auto;
}

.avatar-library-media-shell .avatar-portrait-media {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: inherit;
}

.avatar-video-preview {
  cursor: pointer;
}

.avatar-video-state {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  padding: 5px 7px;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(9, 10, 13, 0.78);
  color: rgba(255, 255, 255, 0.92);
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
  transition: opacity 160ms ease-out;
}

.avatar-video-state svg {
  width: 11px;
  height: 11px;
}

.avatar-library-media-shell.is-playing .avatar-video-state {
  opacity: 0;
}

.avatar-library-delete-btn {
  display: inline-flex;
  width: 30px;
  height: 30px;
  margin-top: auto;
  align-self: flex-end;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(239, 83, 80, 0.42);
  border-radius: 8px;
  background: rgba(239, 83, 80, 0.09);
  color: #ef6b63;
  cursor: pointer;
}

.avatar-library-delete-btn:hover,
.avatar-library-delete-btn:focus-visible {
  border-color: rgba(239, 83, 80, 0.75);
  background: rgba(239, 83, 80, 0.16);
}

.avatar-library-delete-btn svg {
  width: 14px;
  height: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .avatar-video-state {
    transition: none;
  }
}

@media (max-width: 720px) {
  #avatars-grid {
    gap: 10px;
  }

  .avatar-library-item {
    width: calc(50% - 5px);
    max-width: 158px;
    padding: 8px;
  }

  .avatar-library-item.is-landscape {
    width: 100%;
    max-width: 280px;
  }

  .avatar-library-item.is-square {
    width: calc(50% - 5px);
    max-width: 158px;
  }

  .avatar-library-item-body {
    min-height: 80px;
    padding-top: 7px;
  }

  .avatar-library-badges {
    gap: 5px;
  }

  .avatar-library-delete-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }

  .avatar-library-delete-btn svg {
    width: 13px;
    height: 13px;
  }

  .avatar-video-state {
    right: 6px;
    bottom: 6px;
    padding: 4px 6px;
  }

  .avatar-library-media-shell {
    width: min(100%, 132px);
  }

  .avatar-library-media-shell.is-landscape {
    width: min(100%, 262px);
  }

  .avatar-library-media-shell.is-square {
    width: min(100%, 142px);
  }

  .avatar-library-item > .avatar-library-preview-media {
    width: min(100%, 132px);
  }
}

/* ===== 素材重生：共享于网页、桌面客户端和移动端 ===== */
.rebirth-page-header { margin-bottom: 12px; }
.rebirth-view-tabs { display: flex; width: fit-content; gap: 6px; margin: 0 auto 14px; padding: 5px; border: 1px solid var(--border-default); border-radius: 12px; background: rgba(14, 14, 20, .86); }
.rebirth-view-tab { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 116px; padding: 9px 16px; border: 0; border-radius: 8px; color: var(--text-muted); background: transparent; font: inherit; font-weight: 700; cursor: pointer; }
.rebirth-view-tab svg { width: 16px; height: 16px; }
.rebirth-view-tab.active { color: #fff; background: linear-gradient(135deg, #6d28d9, #8b5cf6); box-shadow: 0 8px 22px rgba(109, 40, 217, .26); }
.rebirth-view-panel[hidden], .rebirth-settings-panel[hidden], .rebirth-face-dropzone[hidden], .rebirth-switch-setting[hidden], #rebirth-face-options[hidden], .rebirth-nested-card[hidden] { display: none !important; }
.rebirth-original-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(330px, .72fr); grid-template-areas: "queue settings" "log controls"; gap: 14px; align-items: start; }
.rebirth-queue-card, .rebirth-settings-card, .rebirth-control-card, .rebirth-log-card, .rebirth-result-card, .rebirth-config-card { min-width: 0; }
.rebirth-queue-card { grid-area: queue; }
.rebirth-settings-card { grid-area: settings; max-height: 620px; overflow: auto; scrollbar-width: thin; }
.rebirth-log-card { grid-area: log; align-self: stretch; }
.rebirth-control-card { grid-area: controls; align-self: stretch; }
.rebirth-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rebirth-panel-heading.compact { margin-bottom: 12px; }
.rebirth-panel-heading .eyebrow { display: block; margin-bottom: 2px; color: #a78bfa; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.rebirth-panel-heading h2 { margin: 0; color: var(--text-primary); font-size: 19px; line-height: 1.2; }
.rebirth-panel-heading h2 b { color: #a78bfa; font-size: 15px; }
.rebirth-log-tools, .rebirth-live-status { display: flex; align-items: center; }
.rebirth-log-tools { gap: 8px; }
.rebirth-live-status { gap: 6px; padding: 6px 9px; border: 1px solid rgba(167,139,250,.22); border-radius: 999px; color: var(--text-muted); background: rgba(124,58,237,.06); font-size: 9px; white-space: nowrap; }
.rebirth-live-status i { width: 7px; height: 7px; border-radius: 50%; background: #71717a; }
.rebirth-live-status[data-status="queued"] i { background: #fbbf24; box-shadow: 0 0 0 0 rgba(251,191,36,.5); animation: rebirth-live-pulse 1.35s infinite; }
.rebirth-live-status[data-status="running"] { color: #c4b5fd; border-color: rgba(139,92,246,.42); }
.rebirth-live-status[data-status="running"] i { background: #8b5cf6; box-shadow: 0 0 0 0 rgba(139,92,246,.55); animation: rebirth-live-pulse 1.1s infinite; }
@keyframes rebirth-live-pulse { 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.rebirth-queue-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.rebirth-queue-dropzone { display: flex; min-height: 108px; align-items: center; justify-content: center; gap: 14px; padding: 18px; border: 1px dashed rgba(167, 139, 250, .48); border-radius: 12px; background: rgba(8, 8, 13, .72); color: var(--text-muted); cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.rebirth-queue-dropzone:hover, .rebirth-queue-dropzone.is-dragging { border-color: #a78bfa; background: rgba(91, 33, 182, .12); transform: translateY(-1px); }
.rebirth-queue-dropzone > svg { width: 34px; height: 34px; color: #a78bfa; }
.rebirth-queue-dropzone > span { display: grid; gap: 5px; text-align: left; }
.rebirth-queue-dropzone strong { color: var(--text-primary); font-size: 14px; }
.rebirth-queue-dropzone small { color: var(--text-muted); font-size: 11px; }
.rebirth-queue-table { margin-top: 14px; overflow: hidden; border: 1px solid var(--border-default); border-radius: 11px; background: #0c0c11; }
.rebirth-queue-row { display: grid; grid-template-columns: 32px minmax(210px, 1.45fr) minmax(85px, .52fr) minmax(125px, .72fr) minmax(96px, .62fr); align-items: center; gap: 10px; min-width: 720px; padding: 11px 13px; border-bottom: 1px solid rgba(255,255,255,.055); color: var(--text-secondary); }
.rebirth-queue-row:last-child { border-bottom: 0; }
.rebirth-queue-row > input { accent-color: #8b5cf6; }
.rebirth-queue-head { color: var(--text-muted); background: rgba(139, 92, 246, .07); font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.rebirth-queue-list { min-height: 250px; max-height: 48vh; overflow: auto; }
.rebirth-queue-list > .empty-state { min-width: 720px; min-height: 250px; }
.rebirth-queue-row > span { min-width: 0; }
.rebirth-queue-row > span:not(.rebirth-file-cell) { display: grid; gap: 3px; }
.rebirth-queue-row strong { overflow: hidden; color: var(--text-primary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.rebirth-queue-row small { overflow: hidden; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.rebirth-file-cell { display: flex; align-items: center; gap: 9px; }
.rebirth-file-cell > svg { width: 18px; height: 18px; flex: none; color: #a78bfa; }
.rebirth-file-cell > span { display: grid; min-width: 0; gap: 3px; }
.rebirth-queue-status.uploading strong, .rebirth-queue-status.submitted strong { color: #a78bfa; }
.rebirth-queue-status.failed strong { color: #f87171; }
.rebirth-queue-status.stopped strong { color: #fbbf24; }
.rebirth-settings-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 0 0 14px; padding: 4px; border: 1px solid var(--border-default); border-radius: 10px; background: #0b0b10; }
.rebirth-settings-tabs button { min-width: 0; padding: 9px 5px; border: 0; border-radius: 7px; color: var(--text-muted); background: transparent; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.rebirth-settings-tabs button.active { color: #fff; background: #7c3aed; }
.rebirth-settings-panel { min-height: 124px; }
.rebirth-settings-panel .is-disabled { opacity: .48; }
.rebirth-option-list { display: grid; gap: 8px; margin-bottom: 11px; }
.rebirth-option-list.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rebirth-check-line { display: flex; min-width: 0; align-items: flex-start; gap: 9px; padding: 10px 11px; border: 1px solid var(--border-default); border-radius: 9px; background: rgba(17, 17, 24, .92); cursor: pointer; }
.rebirth-check-line.compact { min-height: 62px; padding: 9px 10px; }
.rebirth-check-line.align-end { align-self: end; }
.rebirth-check-line > input { width: 15px; height: 15px; flex: none; margin-top: 2px; accent-color: #8b5cf6; }
.rebirth-check-line > span { display: grid; min-width: 0; gap: 3px; }
.rebirth-check-line strong { color: var(--text-primary); font-size: 11px; line-height: 1.25; }
.rebirth-check-line small { color: var(--text-muted); font-size: 9px; line-height: 1.45; }
.rebirth-inline-field { display: grid; grid-template-columns: 1fr 82px; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border-default); border-radius: 9px; color: var(--text-secondary); background: rgba(17, 17, 24, .92); font-size: 10px; }
.rebirth-inline-field input, .rebirth-static-field { min-width: 0; }
.rebirth-inline-field input { width: 100%; padding: 8px 9px; border: 1px solid var(--border-default); border-radius: 7px; color: var(--text-primary); background: #09090d; }
.rebirth-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 11px; }
.rebirth-field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rebirth-field-grid .form-group { margin-bottom: 0; }
.rebirth-static-field { display: grid; gap: 4px; padding: 10px 11px; border: 1px solid var(--border-default); border-radius: 9px; background: rgba(17, 17, 24, .92); }
.rebirth-static-field span { color: var(--text-muted); font-size: 9px; }
.rebirth-static-field strong { color: var(--text-primary); font-size: 11px; }
.rebirth-static-field small { color: var(--text-muted); font-size: 8px; line-height: 1.4; }
.rebirth-nested-card { display: grid; gap: 10px; margin: 0 0 11px; padding: 11px; border: 1px solid rgba(139,92,246,.25); border-radius: 10px; background: rgba(124,58,237,.055); }
.rebirth-radio-row { display: flex; flex-wrap: wrap; gap: 14px; color: var(--text-secondary); font-size: 10px; }
.rebirth-radio-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.rebirth-radio-row input { accent-color: #8b5cf6; }
.rebirth-helper-box { padding: 9px 10px; border: 1px dashed rgba(167,139,250,.28); border-radius: 8px; color: var(--text-muted); background: rgba(8,8,13,.52); font-size: 9px; line-height: 1.5; }
.rebirth-nested-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.rebirth-nested-head > strong { color: var(--text-primary); font-size: 11px; }
.rebirth-nested-head > div { display: flex; flex-wrap: wrap; gap: 6px; }
.rebirth-nested-head label.btn { margin: 0; cursor: pointer; }
.rebirth-slider-field { display: grid; gap: 8px; margin: 0 0 11px; padding: 10px 11px; border: 1px solid var(--border-default); border-radius: 9px; background: rgba(17,17,24,.92); }
.rebirth-slider-field > span { display: flex; justify-content: space-between; gap: 10px; color: var(--text-secondary); font-size: 10px; }
.rebirth-slider-field b { color: #a78bfa; }
.rebirth-slider-field input { width: 100%; accent-color: #8b5cf6; }
.rebirth-default-note, .rebirth-config-grid > div { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid rgba(139,92,246,.2); border-radius: 10px; background: rgba(124,58,237,.07); }
.rebirth-default-note svg { width: 20px; height: 20px; flex: none; color: #a78bfa; }
.rebirth-default-note span { display: grid; gap: 3px; }
.rebirth-default-note strong { color: var(--text-primary); font-size: 12px; }
.rebirth-default-note small { color: var(--text-muted); font-size: 10px; line-height: 1.45; }
.rebirth-mode-grid { display: grid; gap: 8px; }
.rebirth-mode-card { position: relative; display: flex; min-height: 74px; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--border-default); border-radius: 10px; background: var(--bg-elevated); cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.rebirth-mode-card:hover { border-color: rgba(139, 92, 246, .7); transform: translateY(-1px); }
.rebirth-mode-card.active { border-color: #8b5cf6; background: linear-gradient(135deg, rgba(124, 58, 237, .22), rgba(17, 17, 24, .96)); box-shadow: 0 0 0 1px rgba(139, 92, 246, .16); }
.rebirth-mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.rebirth-mode-card > svg { width: 21px; height: 21px; flex: none; color: #a78bfa; }
.rebirth-mode-card span { display: grid; gap: 5px; }
.rebirth-mode-card strong { color: var(--text-primary); font-size: 12px; }
.rebirth-mode-card small { color: var(--text-muted); font-size: 10px; line-height: 1.45; }
.rebirth-face-only-card { margin-bottom: 10px; }
.rebirth-face-toggle { margin-bottom: 10px; }
.rebirth-face-dropzone { display: flex; min-height: 82px; align-items: center; gap: 11px; margin-bottom: 9px; padding: 13px; border: 1px dashed rgba(167,139,250,.45); border-radius: 10px; cursor: pointer; }
.rebirth-face-dropzone > svg { width: 24px; height: 24px; color: #a78bfa; }
.rebirth-face-dropzone > span { display: grid; gap: 4px; min-width: 0; }
.rebirth-face-dropzone strong { color: var(--text-primary); font-size: 12px; }
.rebirth-face-dropzone small { overflow: hidden; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.rebirth-switch-setting { display: flex; min-height: 58px; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border-default); border-radius: 10px; background: var(--bg-elevated); cursor: pointer; }
.rebirth-switch-setting > span:first-child { display: grid; gap: 3px; margin-right: auto; }
.rebirth-switch-setting strong { color: var(--text-primary); font-size: 12px; }
.rebirth-switch-setting small { color: var(--text-muted); font-size: 9px; }
.rebirth-switch-setting input { position: absolute; opacity: 0; }
.rebirth-switch-setting .switch { position: relative; width: 38px; height: 21px; flex: none; border-radius: 999px; background: #292934; transition: background .18s ease; }
.rebirth-switch-setting .switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .18s ease; }
.rebirth-switch-setting input:checked + .switch { background: #7c3aed; }
.rebirth-switch-setting input:checked + .switch::after { transform: translateX(17px); }
.rebirth-consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 13px; color: var(--text-secondary); font-size: 10px; line-height: 1.5; }
.rebirth-consent input { margin-top: 2px; accent-color: #8b5cf6; }
.rebirth-control-card { display: grid; gap: 11px; }
.rebirth-stat { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; border: 1px solid var(--border-default); border-radius: 9px; background: #0c0c11; }
.rebirth-stat span, .rebirth-progress-summary > span { color: var(--text-muted); font-size: 10px; }
.rebirth-stat strong { color: var(--text-primary); font-size: 13px; }
.rebirth-stat strong#rebirth-pending-count { color: #a78bfa; font-size: 25px; }
.rebirth-stat small { color: var(--text-muted); font-size: 9px; }
.rebirth-progress-summary { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.rebirth-progress-summary b { color: #a78bfa; font-size: 11px; }
.rebirth-progress-summary > div { grid-column: 1 / -1; height: 5px; overflow: hidden; border-radius: 999px; background: #22222c; }
.rebirth-progress-summary i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#6d28d9,#a78bfa); transition: width .2s ease; }
.rebirth-control-buttons { display: grid; grid-template-columns: 1fr auto auto; gap: 7px; }
.rebirth-control-buttons .danger { color: #f87171; }
.rebirth-log-card { margin-top: 0; }
.rebirth-run-log { min-height: 112px; max-height: 164px; overflow: auto; padding: 12px; border: 1px solid var(--border-default); border-radius: 10px; background: #08080c; }
.rebirth-run-log p { margin: 0 0 6px; color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; line-height: 1.5; animation: rebirth-log-entry .18s cubic-bezier(.16,1,.3,1) both; }
.rebirth-run-log p:last-child { margin-bottom: 0; }
.rebirth-run-log time { margin-right: 7px; color: #a78bfa; }
.rebirth-run-log .success { color: #86efac; }
.rebirth-run-log .error { color: #fca5a5; }
@keyframes rebirth-log-entry { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .rebirth-live-status i, .rebirth-run-log p { animation: none !important; } }
.rebirth-job-list { display: grid; gap: 10px; max-height: calc(100vh - 290px); overflow: auto; }
.rebirth-job-card { display: grid; grid-template-columns: 112px minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 11px; border: 1px solid rgba(139,92,246,.24); border-radius: 11px; background: #0d0d12; }
.rebirth-job-card.is-failed { border-color: rgba(248,113,113,.35); }
.rebirth-job-video, .rebirth-job-pending { width: 112px; aspect-ratio: 9 / 12; border-radius: 8px; background: #050507; object-fit: cover; }
.rebirth-job-pending { display: grid; place-content: center; justify-items: center; gap: 7px; padding: 8px; color: var(--text-muted); text-align: center; font-size: 10px; }
.rebirth-job-pending svg { width: 25px; height: 25px; color: #8b5cf6; }
.rebirth-job-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rebirth-job-heading strong { color: var(--text-primary); font-size: 14px; }
.rebirth-job-heading .badge { max-width: min(360px, 64%); white-space: normal; line-height: 1.35; text-align: right; }
.rebirth-job-file { display: block; margin-top: 7px; overflow: hidden; color: var(--text-secondary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.rebirth-job-progress { height: 4px; margin: 10px 0 7px; overflow: hidden; border-radius: 999px; background: #22222c; }
.rebirth-job-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#6d28d9,#a78bfa); }
.rebirth-job-info small { display: block; color: var(--text-muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.rebirth-job-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.rebirth-config-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 16px 0; }
.rebirth-config-grid > div { display: grid; align-items: start; gap: 5px; }
.rebirth-config-grid span { color: var(--text-muted); font-size: 10px; }
.rebirth-config-grid strong { color: var(--text-primary); font-size: 12px; }

@media (max-width: 1180px) {
  .rebirth-original-layout { grid-template-columns: minmax(0,1fr) minmax(280px,.55fr); grid-template-areas: "queue queue" "settings settings" "log controls"; }
  .rebirth-job-list { max-height: none; }
}

@media (max-width: 720px) {
  .rebirth-page-header { align-items: flex-start; }
  .rebirth-view-tabs { width: 100%; }
  .rebirth-view-tab { min-width: 0; flex: 1; padding: 8px 5px; font-size: 11px; }
  .rebirth-view-tab svg { display: none; }
  .rebirth-original-layout { grid-template-columns: minmax(0,1fr); grid-template-areas: "queue" "settings" "log" "controls"; }
  .rebirth-panel-heading { align-items: flex-start; flex-direction: column; }
  .rebirth-queue-actions { width: 100%; justify-content: flex-start; }
  .rebirth-queue-actions .btn { flex: 1 1 calc(50% - 7px); }
  .rebirth-queue-dropzone { min-height: 94px; justify-content: flex-start; }
  .rebirth-queue-table { overflow-x: auto; }
  .rebirth-queue-list { max-height: 360px; }
  .rebirth-settings-tabs button { font-size: 10px; }
  .rebirth-settings-card { max-height: none; overflow: visible; }
  .rebirth-option-list.two-col, .rebirth-field-grid, .rebirth-field-grid.three { grid-template-columns: minmax(0,1fr); }
  .rebirth-inline-field { grid-template-columns: 1fr 76px; }
  .rebirth-nested-head { align-items: flex-start; flex-direction: column; }
  .rebirth-nested-head > div { width: 100%; }
  .rebirth-nested-head .btn { flex: 1; justify-content: center; }
  .rebirth-control-buttons { grid-template-columns: 1fr 1fr 1fr; }
  .rebirth-job-card { grid-template-columns: 82px minmax(0,1fr); }
  .rebirth-job-video, .rebirth-job-pending { width: 82px; }
  .rebirth-job-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
  .rebirth-config-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

.avatar-card-id {
  font-weight: 600;
  font-size: 14px;
}

.avatar-card-grid .empty-state {
  grid-column: 1 / -1;
}

/* ---------- 闊宠壊鍗＄墖缃戞牸 ---------- */
.voice-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.voice-card {
  position: relative;
  padding: 18px;
  background: var(--bg-elevated);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
}

.voice-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.voice-card.selected {
  border-color: var(--accent-primary);
  background: rgba(138, 109, 63, 0.08);
  box-shadow: 0 0 0 2px var(--accent-primary), var(--shadow-glow);
}

.voice-card.selected::after {
  content: '鉁?;
  position: absolute;
  top: 10px;
  left: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.voice-card-info {
  flex: 1;
  min-width: 0;
}

.voice-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
  word-break: break-all;
}

.voice-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.voice-card-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.voice-card-tag.type-default {
  background: rgba(62, 124, 91, 0.15);
  color: var(--color-success);
}

.voice-card-tag.type-custom {
  background: rgba(166, 121, 31, 0.15);
  color: var(--color-warning);
}

.voice-card-tag.provider {
  background: rgba(138, 109, 63, 0.15);
  color: var(--accent-primary);
}

.voice-preview-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--accent-primary);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.voice-preview-btn:hover {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  transform: scale(1.1);
}

.voice-preview-btn.playing {
  background: var(--color-success);
  color: white;
  border-color: transparent;
  animation: pulse 1.5s ease-in-out infinite;
}

.voice-card-grid .empty-state {
  grid-column: 1 / -1;
}

/* ---------- 鏂囨宸ュ叿鏍?---------- */
.script-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.script-toolbar-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.script-dropdown {
  position: relative;
  display: inline-block;
}

.script-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 140px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 100;
  display: none;
}

.script-dropdown-menu.open {
  display: block;
}

.script-dropdown-item {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.script-dropdown-item:hover {
  background: var(--bg-surface);
  color: var(--accent-primary);
}

.script-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.script-stats-sep {
  opacity: 0.5;
}

.script-warning {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(166, 121, 31, 0.1);
  border: 1px solid rgba(166, 121, 31, 0.3);
  border-radius: var(--radius-sm);
  color: var(--color-warning);
  font-size: 12px;
}

/* ---------- 鐖嗘缁撴瀯鍒嗘瀽鎶ュ憡 ---------- */
.viral-analysis {
  margin-top: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.viral-analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(138,109,63,0.08), rgba(138,109,63,0.08));
  border-bottom: 1px solid var(--border-default);
}

.viral-analysis-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.viral-analysis-title i {
  width: 16px;
  height: 16px;
  color: var(--accent-primary);
}

.viral-analysis-body {
  padding: 16px;
  max-height: 600px;
  overflow-y: auto;
}

.viral-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

.viral-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  color: var(--color-error);
  font-size: 13px;
}

.viral-mock-hint {
  padding: 8px 12px;
  margin-bottom: 12px;
  background: rgba(166, 121, 31, 0.1);
  border-radius: var(--radius-sm);
  color: var(--color-warning);
  font-size: 12px;
}

/* 鐖嗘鍒嗘暟鍖?*/
.viral-score-section {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.viral-score-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--score-color, var(--accent-primary));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.viral-score-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--score-color, var(--accent-primary));
  line-height: 1;
}

.viral-score-label {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
  text-align: center;
}

.viral-score-meta {
  flex: 1;
}

.viral-meta-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}

.viral-meta-label {
  color: var(--text-secondary);
  min-width: 60px;
  flex-shrink: 0;
}

.viral-meta-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* 鍒嗘瀽娈佃惤 */
.viral-section {
  margin-bottom: 16px;
}

.viral-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.viral-section-title i {
  width: 14px;
  height: 14px;
  color: var(--accent-primary);
}

.viral-section-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* 缁撴瀯鎷嗚В鍒楄〃 */
.viral-structure-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.viral-structure-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.viral-structure-tag {
  padding: 2px 8px;
  background: var(--accent-primary);
  color: white;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}

.viral-structure-content {
  flex: 1;
  color: var(--text-primary);
}

.viral-structure-effect {
  color: var(--text-secondary);
  font-style: italic;
  flex-shrink: 0;
  max-width: 200px;
}

/* 浜偣涓庝笉瓒?*/
.viral-sw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.viral-sw-col {
  padding: 12px;
  border-radius: var(--radius-sm);
}

.viral-highlights {
  background: rgba(62, 124, 91, 0.08);
}

.viral-weaknesses {
  background: rgba(180, 83, 58, 0.08);
}

.viral-sw-head {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.viral-highlights .viral-sw-head {
  color: #3E7C5B;
}

.viral-weaknesses .viral-sw-head {
  color: #B4533A;
}

.viral-sw-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.5;
}

.viral-sw-item i {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.viral-highlights .viral-sw-item i {
  color: #3E7C5B;
}

.viral-weaknesses .viral-sw-item i {
  color: #B4533A;
}

/* 浠垮啓鍖哄煙 */
.viral-rewrite-section {
  padding: 16px;
  background: linear-gradient(135deg, rgba(138,109,63,0.06), rgba(138,109,63,0.06));
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
}

.viral-rewrite-section .btn {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .viral-score-section {
    flex-direction: column;
    text-align: center;
  }
  .viral-sw-grid {
    grid-template-columns: 1fr;
  }
  .viral-structure-item {
    flex-direction: column;
    gap: 4px;
  }
  .viral-structure-effect {
    max-width: 100%;
  }
  .script-diff-grid {
    grid-template-columns: 1fr !important;
  }
  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cover-style-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- 鏂囨瀵规瘮瑙嗗浘 ---------- */
.script-diff-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.script-diff-info {
  font-size: 12px;
  color: var(--text-secondary);
}

.script-diff-actions {
  display: flex;
  gap: 8px;
}

.script-diff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.script-diff-col {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.script-diff-col-head {
  padding: 8px 12px;
  background: var(--bg-secondary);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-default);
}

.script-diff-col-head.script-diff-modified {
  background: rgba(138, 109, 63, 0.08);
  color: var(--accent-primary);
}

.script-diff-content {
  padding: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
  font-family: inherit;
}

.subtitle-settings-card {
  grid-column: 1 / -1;
}

.subtitle-preview-hint {
  margin: -2px 0 14px;
  color: var(--text-muted);
  font-size: 11px;
}

/* ---------- 瀛楀箷鏍峰紡鍙鍖栭瑙堝崱锛堝寮猴級 ---------- */
.subtitle-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  align-items: start;
}

.subtitle-style-card {
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition-base);
  overflow: hidden;
  min-width: 0;
}

.subtitle-style-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.subtitle-style-card.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-primary), 0 16px 34px rgba(0, 0, 0, 0.2);
}

.subtitle-style-preview {
  position: relative;
  aspect-ratio: 9 / 16;
  padding: 0;
  margin: 0;
  background: #171512;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 0;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.subtitle-style-preview-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.subtitle-style-preview-fallback {
  padding: 20px;
  color: var(--stage-text);
  font-size: 13px;
  line-height: 1.6;
}

.subtitle-style-engine-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 210, 86, 0.72);
  border-radius: 999px;
  background: rgba(12, 10, 8, 0.68);
  color: #ffd256;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.subtitle-style-selected-mark {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #111;
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.subtitle-style-card.active .subtitle-style-selected-mark {
  opacity: 1;
  transform: scale(1);
}

.subtitle-style-name {
  min-height: 62px;
  padding: 11px 12px 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.subtitle-style-name strong {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.subtitle-style-name span {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .subtitle-style-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* ---------- 视频生成进度弹窗 ---------- */
.progress-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(18, 15, 12, 0.86);
  backdrop-filter: blur(14px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.progress-modal {
  width: 92%;
  max-width: 880px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--stage-base);
  border: 1px solid var(--stage-border);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
  color: var(--stage-text);
}

.progress-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.progress-modal-header::after {
  content: none !important;
  display: none !important;
}

.progress-modal-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  color: var(--stage-text);
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}

.progress-modal-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--stage-elevated);
  border: 1px solid var(--stage-border);
  color: var(--stage-text-dim);
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-modal-close:hover {
  background: var(--color-error);
  color: white;
  border-color: transparent;
}

.progress-stages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}

.progress-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 10px 14px;
  background: var(--stage-surface);
  border: 1px solid var(--stage-border);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--transition-base);
}

.progress-stage.running {
  border-color: rgba(190, 155, 100, 0.75);
  background: rgba(138, 109, 63, 0.14);
  animation: stage-breathe 2.2s ease-in-out infinite;
}

@keyframes stage-breathe {
  0%, 100% { box-shadow: 0 0 0 rgba(190, 155, 100, 0); }
  50% { box-shadow: 0 0 26px rgba(190, 155, 100, 0.32); }
}

.progress-stage.success {
  border-color: rgba(96, 158, 125, 0.4);
  background: rgba(62, 124, 91, 0.12);
}

.progress-stage.failed {
  border-color: rgba(196, 110, 86, 0.55);
  background: rgba(180, 83, 58, 0.14);
}

.progress-stage-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  background: var(--stage-elevated);
  border: 2px solid var(--stage-border);
  color: var(--stage-text-dim);
}

.progress-stage.pending .progress-stage-icon {
  color: var(--stage-text-dim);
}

.progress-stage.running .progress-stage-icon {
  background: var(--accent-primary);
  color: #fff;
  border-color: transparent;
  animation: spin 1.2s linear infinite;
}

.progress-stage.success .progress-stage-icon {
  background: var(--color-success);
  color: #fff;
  border-color: transparent;
}

.progress-stage.failed .progress-stage-icon {
  background: var(--color-error);
  color: #fff;
  border-color: transparent;
}

.progress-stage.skipped .progress-stage-icon {
  color: var(--color-skipped);
}

.progress-stage-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--stage-text);
  letter-spacing: 0.04em;
}

.progress-stage.pending .progress-stage-name {
  color: var(--stage-text-dim);
}

.progress-stage.running .progress-stage-name {
  color: #D8B878;
}

.progress-stage.success .progress-stage-name {
  color: #8FC3A8;
}

.progress-stage.failed .progress-stage-name {
  color: #DB9078;
}

.progress-stage-status {
  font-size: 11px;
  color: var(--stage-text-dim);
  letter-spacing: 0.06em;
}

.progress-bar-wrap {
  margin-bottom: 22px;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--stage-elevated);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #8A6D3F, #C09A5E);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.progress-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--stage-text-dim);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.progress-modal-result {
  text-align: center;
  animation: fadeIn 0.4s ease;
  color: var(--stage-text);
}

.progress-modal-result video {
  width: 100%;
  max-height: 360px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  background: #000;
}

.progress-modal-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.progress-modal-result-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* ---------- 鍝嶅簲寮忚ˉ鍏?---------- */
@media (max-width: 1024px) {
  .scene-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .progress-stages {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-decoration {
    display: none;
  }
}

@media (max-width: 768px) {
  .scene-card-grid {
    grid-template-columns: 1fr;
  }
  .progress-stages {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-status-bar {
    flex-wrap: wrap;
    gap: 16px;
  }
}

/* ---------- 鏃堕棿杞村壀杈戠紪杈戝櫒 ---------- */
.timeline-container {
  background: var(--bg-elevated, #171512);
  border: 1px solid var(--border-default, #241F1A);
  border-radius: 8px;
  padding: 12px;
  overflow-x: auto;
}

.timeline-ruler {
  height: 24px;
  background: var(--bg-surface, #1D1915);
  border-radius: 4px;
  margin-left: 80px;
  margin-bottom: 8px;
  position: relative;
  color: var(--text-secondary, #9A9188);
  font-size: 10px;
}

.timeline-ruler-tick {
  position: absolute;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--border-default, #332C25);
}

.timeline-ruler-label {
  position: absolute;
  top: 4px;
  font-size: 10px;
  color: var(--text-secondary, #9A9188);
  transform: translateX(-50%);
}

.timeline-track {
  display: flex;
  align-items: center;
  height: 36px;
  margin-bottom: 6px;
  position: relative;
}

.timeline-track-label {
  width: 72px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-secondary, #9A9188);
  padding-right: 8px;
  text-align: right;
}

.timeline-track-content {
  flex: 1;
  height: 100%;
  background: var(--bg-surface, #1D1915);
  border-radius: 4px;
  position: relative;
  min-width: 400px;
  cursor: pointer;
}

.timeline-track-content:hover {
  background: var(--bg-surface-hover, #241F1A);
}

/* 涓昏棰戣建閬撶墖娈?*/
.tl-main-segment {
  position: absolute;
  top: 2px;
  bottom: 2px;
  background: linear-gradient(135deg, #4A6B8A, #3A576F);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  overflow: hidden;
}

/* B-roll 鐗囨锛堢敾涓敾/鍒囨崲锛?*/
.tl-broll-segment {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  overflow: hidden;
  cursor: move;
  border: 2px solid rgba(31,27,22,0.28);
}

.tl-broll-segment.pip {
  background: linear-gradient(135deg, #A6791F, #8A6419);
}

.tl-broll-segment.cut {
  background: linear-gradient(135deg, #B4533A, #96432E);
}

.tl-broll-segment .tl-segment-delete {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.65);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  cursor: pointer;
  border: 1px solid rgba(31,27,22,0.2);
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.tl-broll-segment:hover .tl-segment-delete,
.tl-broll-segment .tl-segment-delete:focus {
  opacity: 1;
}

/* 瑙﹀睆璁惧锛氬垹闄ゆ寜閽缁堝彲瑙侊紙hover 鍦ㄨЕ灞忎笉鍙潬锛?*/
@media (hover: none) and (pointer: coarse) {
  .tl-broll-segment .tl-segment-delete {
    opacity: 1;
    width: 22px;
    height: 22px;
    font-size: 13px;
  }
}

/* 瀛楀箷鐗囨 */
.tl-subtitle-segment {
  position: absolute;
  top: 2px;
  bottom: 2px;
  background: rgba(74, 107, 138, 0.2);
  border-left: 2px solid #4A6B8A;
  border-radius: 2px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  color: var(--text-primary, #F0EBE2);
  font-size: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 瀛楀箷闂存彃鍏ョ偣锛?鍙锋寜閽級 */
.tl-insert-point {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: #3E7C5B;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 1px 4px rgba(62, 124, 91, 0.5);
  transition: all 0.2s;
  line-height: 1;
}

/* 棰勫埗褰㈣薄/闊宠壊鍗＄墖缃戞牸 */
.preset-avatar-grid,
.preset-voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.preset-avatar-card,
.preset-voice-card {
  background: var(--bg-surface, #1D1915);
  border: 1px solid var(--border-color, #332C25);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: all 0.2s;
}

.preset-avatar-card:hover,
.preset-voice-card:hover {
  border-color: #4A6B8A;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 107, 138, 0.15);
}

.preset-avatar-card img,
.preset-avatar-preview-media {
  width: min(100%, 160px);
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  object-fit: cover;
  object-position: center top;
  margin: 0 auto 8px;
  border: 2px solid var(--border-color, #332C25);
}

.preset-avatar-icon,
.preset-voice-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.preset-avatar-name,
.preset-voice-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text-primary, #F0EBE2);
}

.preset-avatar-desc,
.preset-voice-desc {
  font-size: 11px;
  color: var(--text-secondary, #9A9188);
  line-height: 1.4;
  margin-bottom: 8px;
  min-height: 30px;
}

.preset-avatar-scenes,
.preset-voice-scenes {
  font-size: 10px;
  color: #4A6B8A;
  margin-bottom: 8px;
}

/* 鍦烘櫙妯℃澘鍗＄墖 */
.scene-template-card {
  background: var(--bg-surface, #1D1915);
  border: 1px solid var(--border-color, #332C25);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.scene-template-card:hover {
  border-color: #3E7C5B;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(62, 124, 91, 0.2);
}

.scene-template-card .scene-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.scene-template-card .scene-label {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text-primary, #F0EBE2);
}

.scene-template-card .scene-category {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  background: rgba(74, 107, 138, 0.15);
  color: #4A6B8A;
  border-radius: 10px;
  margin-bottom: 8px;
}

.scene-template-card .scene-desc {
  font-size: 12px;
  color: var(--text-secondary, #9A9188);
  line-height: 1.5;
  margin-bottom: 8px;
}

.scene-template-card .scene-style-tags {
  font-size: 10px;
  color: var(--text-muted, #8A8177);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.scene-template-card .scene-style-tag {
  padding: 1px 6px;
  background: rgba(31, 27, 22, 0.05);
  border-radius: 8px;
}

/* 鍦烘櫙寮圭獥鍗犱綅绗﹁緭鍏?*/
.placeholder-input-group {
  margin-bottom: 12px;
}

.placeholder-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary, #F0EBE2);
  margin-bottom: 4px;
}

.placeholder-input-group label .placeholder-hint {
  font-weight: 400;
  color: var(--text-muted, #8A8177);
  font-size: 11px;
}

.placeholder-input-group input {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-main, #171512);
  border: 1px solid var(--border-color, #332C25);
  border-radius: 6px;
  color: var(--text-primary, #F0EBE2);
  font-size: 13px;
}

.placeholder-input-group input:focus {
  outline: none;
  border-color: #4A6B8A;
}

.scene-preview-script {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-main, #171512);
  border: 1px solid var(--border-color, #332C25);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text-primary, #F0EBE2);
  max-height: 200px;
  overflow-y: auto;
}

.tl-insert-point:hover {
  background: #356A4E;
  transform: translate(-50%, -50%) scale(1.25);
  box-shadow: 0 2px 8px rgba(62, 124, 91, 0.7);
}

.tl-insert-point.disabled {
  background: #8A8177;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.5;
}

/* 蹇嵎鍓緫宸ュ叿鏍?*/
.tl-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-surface, #1D1915);
  border-radius: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tl-toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tl-toolbar-label {
  font-size: 11px;
  color: var(--text-secondary, #9A9188);
  margin-right: 4px;
}

.tl-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.tl-source-choice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--border-default);
  border-radius: 7px;
  background: #0a0b0e;
  color: var(--text-secondary);
  font-size: 11px;
}

.tl-source-choice > span {
  color: var(--text-muted);
}

.tl-source-choice label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
}

.tl-source-choice input {
  accent-color: var(--accent-primary);
}

.tl-suggest-panel {
  margin-top: 12px;
  padding: 14px;
  background: #0d0f13;
  border: 1px solid var(--border-default);
  border-radius: 8px;
}

.broll-stock-candidate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  background: #111318;
}

.broll-stock-candidate-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.broll-stock-candidate-copy strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broll-stock-candidate-copy span,
.broll-stock-candidate-copy small {
  color: var(--text-muted);
  font-size: 11px;
}

.broll-stock-candidate-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

/* 鎿嶄綔鎻愮ず鏉?*/
.tl-tip-bar {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(74, 107, 138, 0.08);
  border-left: 3px solid #4A6B8A;
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-secondary, #9A9188);
  line-height: 1.5;
}

.tl-insert-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: #3E7C5B;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: bold;
  vertical-align: middle;
  margin: 0 2px;
}

/* 鎻掑叆鐐规彁绀?*/
.tl-insert-hint {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #3E7C5B;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.timeline-track-content:hover .tl-insert-hint {
  opacity: 0.6;
}

/* B-roll 绱犳潗鍗＄墖 */
.broll-asset-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border-default, #241F1A);
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.broll-asset-card:hover {
  border-color: var(--accent-primary, #4A6B8A);
  background: var(--bg-surface-hover, #241F1A);
}

.broll-asset-card.selected {
  border-color: #3E7C5B;
  background: rgba(62, 124, 91, 0.1);
}

.broll-asset-thumb {
  width: 48px;
  height: 36px;
  background: var(--bg-elevated, #171512);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}

.broll-asset-thumb img,
.broll-asset-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.broll-asset-info {
  flex: 1;
  min-width: 0;
}

.broll-asset-delete {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 9px;
  color: rgba(248, 113, 113, 0.72);
  background: rgba(127, 29, 29, 0.08);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.broll-asset-delete:hover {
  border-color: rgba(239, 68, 68, 0.44);
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.2);
}

.broll-asset-delete svg {
  width: 15px;
  height: 15px;
}

.recent-card-delete {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 10px;
  color: rgba(254, 202, 202, 0.82);
  background: rgba(18, 11, 13, 0.72);
  backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.recent-history-card:hover .recent-card-delete,
.recent-card-delete:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.recent-card-delete:hover {
  background: rgba(127, 29, 29, 0.74);
}

.recent-card-delete svg {
  width: 15px;
  height: 15px;
}

.broll-asset-name {
  font-size: 12px;
  color: var(--text-primary, #F0EBE2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.broll-asset-meta {
  font-size: 10px;
  color: var(--text-secondary, #9A9188);
}

/* 宸叉坊鍔犵墖娈靛垪琛ㄩ」 */
.tl-clip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-default, #241F1A);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}

.tl-clip-item .clip-badge {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}

.tl-clip-item .clip-badge.pip {
  background: rgba(166, 121, 31, 0.2);
  color: #A6791F;
}

.tl-clip-item .clip-badge.cut {
  background: rgba(180, 83, 58, 0.2);
  color: #B4533A;
}

.tl-clip-item .clip-delete {
  margin-left: auto;
  color: var(--text-secondary, #9A9188);
  cursor: pointer;
  padding: 2px 6px;
}

.tl-clip-item .clip-delete:hover {
  color: #B4533A;
}

.tl-clip-item .clip-edit {
  margin-left: auto;
  color: var(--text-secondary, #9A9188);
  cursor: pointer;
  padding: 2px 6px;
}

.tl-clip-item .clip-edit:hover {
  color: #4A6B8A;
}

.tl-clip-item .clip-edit + .clip-delete {
  margin-left: 0;
}

/* 閫氱敤妯℃€佹锛圔-roll 缂栬緫寮圭獥鐢級 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal {
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-surface, #171512);
  border: 1px solid var(--border-default, #241F1A);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-default, #241F1A);
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #F0EBE2);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary, #9A9188);
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary, #F0EBE2);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-default, #241F1A);
}

/* ============================================
   绉诲姩绔搷搴斿紡绯荤粺锛堝鏍囧壀鏄?HeyGen 绉诲姩绔級
   鏂偣锛?024px(骞虫澘) / 768px(澶ф墜鏈? / 480px(鎵嬫満) / 375px(灏忓睆)
   ============================================ */

/* ---------- 绉诲姩绔《閮ㄦ爮 ---------- */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  padding-top: env(safe-area-inset-top);
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.mobile-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.mobile-logo span { color: var(--accent-primary); }

.menu-toggle {
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 10px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-quick-create {
  width: 44px;
  height: 44px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(138, 109, 63, 0.3);
}

/* ---------- 渚ц竟鏍忛伄缃?---------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
  opacity: 0;
  transition: opacity var(--transition-base);
}
.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ---------- 搴曢儴瀵艰埅鏍?---------- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  align-items: stretch;
  justify-content: space-around;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
}

.bottom-nav-item {
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 10px;
  padding: 8px 2px;
  transition: color var(--transition-fast);
  min-height: 48px;
}

.bottom-nav-icon {
  font-size: 20px;
  line-height: 1;
}

.bottom-nav-label {
  font-size: 10px;
  font-weight: 500;
}

.bottom-nav-item.active {
  color: var(--accent-primary);
}

.bottom-nav-item:active {
  background: var(--bg-elevated);
}

/* ============================================
   鍝嶅簲寮忔柇鐐癸細768px锛堝ぇ鎵嬫満/灏忓钩鏉跨珫灞忥級
   ============================================ */
@media (max-width: 768px) {
  /* 绉诲姩绔細鏀逛负 body 鑷劧婊氬姩锛岄伩鍏?overflow 瀹瑰櫒鎷︽埅瑙︽懜浜嬩欢 */
  html, body {
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* 鏄剧ず绉诲姩绔粍浠?*/
  .mobile-topbar { display: flex; }
  .bottom-nav { display: flex; }

  /* 渚ц竟鏍忔敼涓烘娊灞夋ā寮?*/
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    visibility: hidden;
    z-index: 200;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base), visibility var(--transition-base);
    pointer-events: none;
  }
  .sidebar.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  /* 鎭㈠渚ц竟鏍忔枃瀛楁樉绀猴紙鎶藉眽妯″紡涓嬪畬鏁存樉绀猴級 */
  .logo-text, .nav-label, .nav-item span:not(.nav-icon), .status-indicator span {
    display: inline;
  }

  /* 涓诲唴瀹瑰尯閫傞厤 鈥?绉诲姩绔笉浣跨敤 overflow 瀹瑰櫒锛屾敼涓?body 鑷劧婊氬姩 */
  .app-layout {
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }
  .main-content {
    flex: none; /* 涓嶇敤 flex:1锛岃鍐呭鑷劧鎾戝紑 */
    padding: 76px 16px 80px;
    padding-top: calc(76px + env(safe-area-inset-top));
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
    width: 100%;
    overflow: visible; /* 鍏抽敭锛氫笉浣跨敤 overflow:auto/scroll锛岄伩鍏嶇Щ鍔ㄧ瑙︽懜鎷︽埅 */
    position: relative;
    z-index: 1;
    touch-action: manipulation;
  }

  /* 椤甸潰鏍囬缂╁皬 */
  .page-title {
    font-size: 22px;
  }
  .page-header {
    margin-bottom: 20px;
  }

  /* 鍗＄墖闂磋窛缂╁皬 */
  .card {
    margin-bottom: 12px;
  }

  /* Hero 鍖洪€傞厤 */
  .dashboard-hero {
    flex-direction: column;
    padding: 20px 16px;
    gap: 16px;
  }
  .hero-title {
    font-size: 22px;
  }
  .hero-actions {
    flex-direction: column;
    gap: 10px;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .hero-decoration {
    display: none;
  }

  /* 鎸夐挳瑙︽帶浼樺寲锛堚墺44px锛?*/
  .btn {
    min-height: 44px;
    padding: 12px 20px;
  }
  .btn-sm {
    min-height: 40px;
    padding: 10px 16px;
  }
  .btn-lg {
    min-height: 52px;
    padding: 16px 28px;
  }

  /* 琛ㄥ崟鍏冪礌瑙︽帶浼樺寲 */
  .form-input, .form-textarea, .form-select {
    min-height: 44px;
    font-size: 15px; /* 鈮?6px 闃叉 iOS 缂╂斁 */
  }
  .form-textarea {
    min-height: 100px;
  }
  .form-label {
    font-size: 14px;
    margin-bottom: 6px;
  }

  /* 瀵艰埅椤硅Е鎺т紭鍖?*/
  .nav-item {
    min-height: 48px;
    padding: 12px 14px;
    font-size: 15px;
  }

  /* 妯℃€佹閫傞厤 */
  .modal-overlay, .progress-modal-overlay {
    padding: 0;
    align-items: stretch;
  }
  .modal, .progress-modal {
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  /* 琛ㄦ牸姘村钩婊氬姩 */
  .table-wrap, .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    min-width: 600px;
  }

  /* 鍗＄墖缃戞牸鑷€傚簲 */
  .avatar-card-grid, .voice-card-grid, .template-grid,
  .scene-card-grid, .scene-templates-grid,
  .preset-avatar-grid, .preset-voice-grid,
  .asset-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  /* 璇煶璇曞惉鎸夐挳瑙︽帶浼樺寲 */
  .voice-preview-btn {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  /* 鏍囩椤垫按骞虫粴鍔?*/
  .sub-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 鍚戝姝ラ鏉￠€傞厤 */
  .wizard-stepper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  /* 鏃堕棿杞存按骞虫粴鍔?*/
  .timeline-container, .timeline-track {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 鍚戝姝ラ鏉★細绉诲姩绔í鍚戞粴鍔紝姝ラ鏂囧瓧缂╁皬 */
  .wizard-stepper {
    min-height: 104px;
    padding: 18px 10px 16px;
    margin-bottom: 16px;
    justify-content: flex-start;
  }
  .wizard-step {
    min-width: 58px;
    gap: 8px;
  }
  .wizard-step[data-step="1"] { --wizard-node-size: 28px; }
  .wizard-step[data-step="2"] { --wizard-node-size: 30px; }
  .wizard-step[data-step="3"] { --wizard-node-size: 32px; }
  .wizard-step[data-step="4"] { --wizard-node-size: 34px; }
  .wizard-step[data-step="5"] { --wizard-node-size: 36px; }
  .wizard-step-text {
    font-size: 10px;
  }
  .wizard-step-circle {
    width: var(--wizard-node-size);
    height: var(--wizard-node-size);
    font-size: 12px;
  }
  .wizard-step-line {
    min-width: 8px;
    margin-inline: 0;
    margin-bottom: 23px;
  }

  /* 鍚戝搴曢儴瀵艰埅锛氱Щ鍔ㄧ鍥哄畾鍦ㄥ簳閮ㄥ鑸爮涓婃柟 */
  .wizard-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(60px + env(safe-area-inset-bottom));
    border-radius: 0;
    padding: 12px 16px;
    margin: 0;
    z-index: 50;
  }
  .wizard-progress-text {
    font-size: 12px;
  }
  .wizard-footer .btn {
    flex: 1;
    max-width: 45%;
  }

  /* 鍚戝闈㈡澘搴曢儴鐣欏嚭绌洪棿锛堥伩鍏嶈鍥哄畾footer閬尅锛?*/
  .wizard-panel {
    padding-bottom: 80px;
  }

  /* 鍦烘櫙鍗＄Щ鍔ㄧ浼樺寲 */
  .scene-card {
    padding: 16px 12px;
  }
  .scene-card-icon {
    font-size: 28px;
  }
  .scene-card-title {
    font-size: 14px;
  }
  .scene-card-desc {
    font-size: 12px;
  }

  /* 鏈€杩戝垱浣滃崱鐗囩Щ鍔ㄧ浼樺寲 */
  .recent-card {
    width: 188px;
  }

  /* 鍖哄潡鏍囬闂磋窛缂╁皬 */
  .section-header {
    margin-bottom: 16px;
  }
  .section-title {
    font-size: 16px;
  }
}

/* ============================================
   鍝嶅簲寮忔柇鐐癸細480px锛堟墜鏈虹珫灞忥級
   ============================================ */
@media (max-width: 480px) {
  .main-content {
    padding: 72px 12px 76px;
    padding-top: calc(72px + env(safe-area-inset-top));
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .page-title {
    font-size: 20px;
  }
  .page-subtitle {
    font-size: 13px;
  }

  /* 鍗＄墖鍐呰竟璺濈缉灏?*/
  .card {
    padding: 14px;
  }
  .card-header {
    margin-bottom: 12px;
  }
  .card-title {
    font-size: 15px;
  }

  /* Hero 鍖鸿繘涓€姝ョ缉灏?*/
  .hero-title {
    font-size: 20px;
  }
  .hero-subtitle {
    font-size: 13px;
  }

  /* 鍗＄墖缃戞牸鍗曞垪 */
  .avatar-card-grid, .voice-card-grid, .template-grid,
  .scene-card-grid, .scene-templates-grid,
  .preset-avatar-grid, .preset-voice-grid,
  .asset-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* 鍙屽垪缃戞牸寮哄埗鍗曞垪 */
  .two-col-grid {
    grid-template-columns: 1fr;
  }

  /* 琛ㄥ崟琛屽己鍒跺崟鍒?*/
  .form-row {
    grid-template-columns: 1fr;
  }

  /* 鎸夐挳鍏ㄥ */
  .hero-actions .btn,
  .card .btn-block {
    width: 100%;
  }

  /* 搴曢儴瀵艰埅鍥炬爣绋嶅皬 */
  .bottom-nav-icon {
    font-size: 18px;
  }
  .bottom-nav-label {
    font-size: 9px;
  }

  /* 妯℃€佹鍐呰竟璺濈缉灏?*/
  .modal-body, .progress-modal {
    padding: 14px;
  }

  /* Toast 閫傞厤 */
  .toast-container {
    left: 12px;
    right: 12px;
    bottom: calc(80px + env(safe-area-inset-bottom));
  }
  .toast {
    max-width: 100%;
  }
}

/* ============================================
   鍝嶅簲寮忔柇鐐癸細375px锛堝皬灞忔墜鏈猴級
   ============================================ */
@media (max-width: 375px) {
  .main-content {
    padding: 68px 10px 72px;
    padding-top: calc(68px + env(safe-area-inset-top));
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .page-title {
    font-size: 18px;
  }

  /* 鍗＄墖缃戞牸鍗曞垪 */
  .avatar-card-grid, .voice-card-grid, .template-grid,
  .scene-card-grid, .scene-templates-grid,
  .preset-avatar-grid, .preset-voice-grid,
  .asset-grid {
    grid-template-columns: 1fr;
  }

  /* 搴曢儴瀵艰埅浠呮樉绀哄浘鏍?*/
  .bottom-nav-label {
    display: none;
  }
  .bottom-nav-item {
    padding: 10px 2px;
  }
  .bottom-nav-icon {
    font-size: 22px;
  }
}

/* ============================================
   骞虫澘閫傞厤锛?69px-1024px
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  .main-content {
    padding: 24px 24px;
  }
  .sidebar {
    width: 200px;
  }
  .avatar-card-grid, .voice-card-grid, .template-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* ============================================
   妯睆鎵嬫満閫傞厤
   ============================================ */
@media (max-width: 926px) and (orientation: landscape) and (max-height: 500px) {
  .mobile-topbar {
    height: 44px;
  }
  .main-content {
    padding-top: calc(56px + env(safe-area-inset-top));
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
  .bottom-nav {
    height: calc(50px + env(safe-area-inset-bottom));
  }
  .bottom-nav-icon {
    font-size: 18px;
  }
  .bottom-nav-label {
    display: none;
  }
}

/* ============================================
   瑙︽帶璁惧浼樺寲锛堟墍鏈夎Е灞忥級
   ============================================ */
@media (hover: none) and (pointer: coarse) {
  /* 绉婚櫎 hover 鏁堟灉锛屾敼鐢?active 鐘舵€?*/
  .nav-item:hover,
  .btn:hover,
  .card:hover {
    background: inherit;
    transform: none;
  }
  .nav-item:active,
  .btn:active {
    opacity: 0.7;
  }
  /* 澧炲ぇ鎵€鏈夊彲鐐瑰嚮鍏冪礌鐨勮Е鎺у尯鍩?*/
  .voice-preview-btn,
  .modal-close,
  .progress-modal-close,
  .btn-icon {
    min-width: 44px;
    min-height: 44px;
  }
  /* 纭繚鎵€鏈夊彲浜や簰鍏冪礌鍙偣鍑?*/
  .btn,
  .nav-item,
  .bottom-nav-item,
  .scene-card,
  .template-card,
  .avatar-card,
  .voice-card,
  .preset-avatar-card,
  .preset-voice-card,
  .scene-template-card,
  .menu-toggle,
  .mobile-quick-create,
  .voice-preview-btn,
  .modal-close,
  .progress-modal-close,
  .upload-zone,
  .wizard-step,
  .sub-tab,
  .action-btn,
  .asset-card,
  .recent-card,
  [onclick],
  button,
  a,
  input[type="button"],
  input[type="submit"],
  select,
  label {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(138, 109, 63, 0.2);
    pointer-events: auto;
  }
  /* 纭繚閬僵灞備笉闃绘尅鍐呭锛堜粎 active 鏃舵墠鎷︽埅锛?*/
  .sidebar-overlay:not(.active) {
    pointer-events: none;
  }
}

/* ---------- 鏂囨鎻愬彇瀹炴椂棰勮鍖?---------- */
.extract-preview {
  margin: 12px 0 16px;
  padding: 14px 16px;
  background: rgba(138, 109, 63, 0.06);
  border: 1px solid rgba(138, 109, 63, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.preview-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.preview-label {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-weight: 600;
  min-width: 72px;
}

.preview-value {
  flex: 1;
  color: var(--text-primary);
  word-break: break-all;
}

.preview-value#wiz-preview-url {
  font-family: var(--font-mono);
  color: var(--accent-tertiary);
  font-size: 12px;
}

.preview-value#wiz-preview-desc {
  color: var(--text-primary);
}

/* 棰勮鍖哄湪绉诲姩绔殑閫傞厤 */
@media (max-width: 480px) {
  .extract-preview {
    padding: 12px;
    margin: 10px 0 12px;
  }
  .preview-row {
    flex-direction: column;
    gap: 4px;
  }
  .preview-label {
    min-width: 0;
  }
  .preview-value#wiz-preview-url {
    font-size: 11px;
  }
}

@media (max-width: 375px) {
  .extract-preview {
    padding: 10px;
  }
  .preview-value#wiz-preview-url {
    font-size: 10px;
    word-break: break-all;
  }
}

/* ---------- Lucide 鐭㈤噺鍥炬爣绯荤粺锛堟浛鎹?Emoji锛?--------- */
.nav-icon svg,
.bottom-nav-icon svg,
.card-title-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-icon svg {
  color: currentColor;
}
.bottom-nav-icon svg {
  width: 22px;
  height: 22px;
}
.card-title-icon svg {
  color: var(--accent-primary);
}
/* 鎸夐挳鍐呭浘鏍囧榻?*/
.btn svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
  stroke-width: 2;
}

/* ---------- 鏂囨鎻愬彇鎻愮ず鍖猴紙鏇夸唬鍘?cookies 閰嶇疆锛?---------- */
.extract-tip {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: rgba(138, 109, 63, 0.06);
  border: 1px solid rgba(138, 109, 63, 0.15);
  border-radius: var(--radius-md);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ---------- 楠ㄦ灦灞忥紙Skeleton Screen锛?---------- */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(31, 27, 22, 0.08) 37%,
    rgba(255, 255, 255, 0.04) 63%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
/* 楠ㄦ灦灞忔潯 */
.skeleton-line {
  height: 14px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
}
.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.long { width: 90%; }
/* 楠ㄦ灦灞忓崱鐗囷紙缃戞牸鍒楄〃鐢級 */
.skeleton-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.skeleton-card .skeleton-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
}
.skeleton-card .skeleton-title {
  height: 16px;
  width: 70%;
  margin-bottom: 8px;
}
.skeleton-card .skeleton-meta {
  height: 12px;
  width: 45%;
}
/* 楠ㄦ灦灞忚锛堣〃鏍?鍒楄〃鐢級 */
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.skeleton-row .skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}
.skeleton-row .skeleton-content {
  flex: 1;
}

/* ---------- 琛ㄥ崟鏍￠獙瑙嗚鐘舵€?---------- */
.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--danger, #B4533A);
  box-shadow: 0 0 0 3px rgba(180, 83, 58, 0.12);
}
.form-input.success,
.form-select.success,
.form-textarea.success {
  border-color: var(--success, #3E7C5B);
}
/* 鍐呰仈閿欒鎻愮ず */
.field-error {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--danger, #B4533A);
  line-height: 1.4;
  min-height: 16px;
}
.field-error:empty { display: none; }



/* ============================================
   闈欏ア宸ヤ綔瀹?v2 路 鏂板缁勪欢
   ============================================ */

/* ---------- 渚ц竟鏍忋€岄珮绾у姛鑳姐€嶆姌鍙犵粍 ---------- */
.nav-advanced {
  margin-top: 20px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.nav-advanced-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 500;
  list-style: none;
  user-select: none;
  transition: all var(--transition-fast);
}

.nav-advanced-summary::-webkit-details-marker { display: none; }

.nav-advanced-summary:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.nav-advanced-chevron {
  margin-left: auto;
  width: 16px;
  height: 16px;
  transition: transform var(--transition-base);
}

.nav-advanced[open] .nav-advanced-chevron { transform: rotate(180deg); }

.nav-advanced > .nav-section { margin-top: 10px; }

/* ---------- 棣栭〉寮€骞曚笁姝?---------- */
.hero-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 30px;
}

.hero-step {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--stage-text-dim);
  font-size: 16px;
  letter-spacing: 0.04em;
}

.hero-step-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  color: #D8B878;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(190, 155, 100, 0.45);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- 视频生成进度弹窗标题布局 ---------- */
.progress-modal { position: relative; }

.progress-modal-header { position: relative; }

.progress-modal-header::after {
  content: none !important;
  display: none !important;
}

.progress-modal-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.progress-modal-close {
  position: absolute;
  top: 0;
  right: 0;
}

.progress-modal-header-actions {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-modal-header-actions .progress-modal-close {
  position: static;
}

.progress-background-btn {
  min-height: 38px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(143, 91, 238, 0.5);
  border-radius: 999px;
  color: #d8c7ff;
  background: rgba(104, 59, 185, 0.18);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.progress-background-btn:hover {
  color: #fff;
  border-color: rgba(167, 117, 255, 0.82);
  background: rgba(122, 70, 214, 0.34);
}

.progress-background-btn svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 640px) {
  .progress-modal-title {
    padding-right: 138px;
  }

  .progress-background-btn {
    min-height: 36px;
    padding-inline: 12px;
    font-size: 13px;
  }
}

/* ---------- 视频生成结果区域 ---------- */
.progress-modal-result-title {
  color: var(--stage-text);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.progress-modal-result video {
  max-width: 100%;
  max-height: 46vh;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(190, 155, 100, 0.35);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  margin: 12px auto;
  display: block;
}

.progress-modal-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.progress-modal-result .btn-secondary {
  background: transparent;
  color: var(--stage-text);
  border: 1px solid rgba(240, 235, 226, 0.3);
}

.progress-modal-result .btn-secondary:hover {
  background: rgba(240, 235, 226, 0.08);
}

/* ============ 鏈満绠楀姏涓庢ā鍨嬪簱锛圓7 纭欢鍒嗘。锛?============ */
.model-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.model-card {
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 16px 18px;
  background: var(--bg-surface);
  transition: border-color 0.2s ease;
}
.model-card:hover { border-color: var(--accent-primary); }
.model-card.model-locked {
  opacity: 0.55;
  background: transparent;
}
.model-card.model-locked:hover { border-color: var(--border-default); }
.model-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.model-name { font-weight: 600; font-size: 14px; }
.model-state {
  flex-shrink: 0;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.model-state.installed { color: #3E7C5B; border-color: rgba(62,124,91,0.35); background: rgba(62,124,91,0.08); }
.model-state.missing { color: #A6791F; border-color: rgba(166,121,31,0.35); background: rgba(166,121,31,0.08); }
.model-state.locked { color: var(--text-muted); border-color: var(--border-default); }
.model-desc { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 8px; }
.model-meta { font-size: 12px; color: var(--text-muted); }

/* Final cascade for the SuperIP black-gold skin. */
body,
.main-content,
.page,
.app-layout {
  background: var(--bg-base);
  color: var(--text-primary);
}

@media (max-width: 760px) {
  .tl-header-actions {
    justify-content: flex-start;
  }

  .tl-source-choice {
    width: 100%;
    justify-content: space-between;
  }
}
body::before,
.dashboard-hero::before,
.hero-orb {
  display: none !important;
  background: none !important;
}
.sidebar,
.mobile-topbar,
.bottom-nav,
.card,
.modal,
.modal-content,
.dashboard-hero,
.sub-tabs,
.upload-zone,
.cover-preview-box,
.table-wrap,
.asset-card,
.recent-card,
.scene-card,
.template-card,
.voice-card,
.avatar-card {
  background: var(--bg-surface) !important;
  border-color: var(--border-default) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.nav-item:hover,
.sub-tab:hover,
.bottom-nav-item:hover {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
}
.nav-item.active,
.sub-tab.active,
.bottom-nav-item.active {
  background: #1a1710 !important;
  color: var(--accent-secondary) !important;
  box-shadow: inset 3px 0 0 var(--accent-primary) !important;
}
.form-input,
.form-textarea,
.form-select,
input,
textarea,
select {
  background: #090a0d !important;
  border-color: var(--border-default) !important;
  color: var(--text-primary) !important;
  border-radius: 6px !important;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 2px rgba(221, 179, 79, 0.12) !important;
}
.btn,
button {
  border-radius: 6px !important;
}
.btn-primary {
  background: var(--accent-primary) !important;
  background-image: none !important;
  border-color: var(--accent-primary) !important;
  color: #11100c !important;
  box-shadow: none !important;
}
.btn-primary:hover {
  background: var(--accent-secondary) !important;
  transform: none !important;
}
.btn-secondary {
  background: #121419 !important;
  border-color: var(--border-default) !important;
  color: var(--text-primary) !important;
}
.card-title-icon {
  background: #1a1710 !important;
  color: var(--accent-primary) !important;
}
.page-title::after {
  background: var(--accent-primary) !important;
  background-image: none !important;
}
.superip-info-card {
  background: #111216 !important;
  border-left: 3px solid var(--accent-primary) !important;
}
/* Blogger Distiller */
.distiller-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(520px, 1.5fr);
  gap: 18px;
  align-items: start;
}

.distiller-control-panel {
  position: sticky;
  top: 18px;
}

.distiller-transcript-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.distiller-quota-note {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.distiller-current {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(229, 184, 76, 0.35);
  background: rgba(229, 184, 76, 0.05);
  border-radius: 6px;
}

.distiller-current-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.distiller-current-top span {
  color: var(--color-primary);
  font-weight: 700;
}

.distiller-progress {
  height: 6px;
  overflow: hidden;
  margin: 8px 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.distiller-progress.compact {
  height: 4px;
  margin-top: 10px;
}

.distiller-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.distiller-job-list {
  display: grid;
  gap: 10px;
}

.distiller-job-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 102px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.018);
}

.distiller-job-title {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distiller-job-meta,
.distiller-job-message {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.distiller-job-message.error,
.empty-state.error {
  color: var(--color-error);
}

.distiller-job-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 330px;
}

.btn.danger {
  color: var(--color-error);
}

.blogger-reference-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.blogger-reference-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 300px;
  margin-bottom: 14px;
  overflow-y: auto;
}

.blogger-reference-item {
  display: flex;
  min-width: 0;
  min-height: 76px;
  padding: 13px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--text-primary);
  cursor: pointer;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}

.blogger-reference-item:hover {
  border-color: rgba(229, 184, 76, 0.55);
}

.blogger-reference-item.selected {
  border-color: var(--color-primary);
  box-shadow: inset 3px 0 0 var(--color-primary);
  background: rgba(229, 184, 76, 0.08);
}

.blogger-reference-name {
  width: 100%;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blogger-reference-meta {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 12px;
}

.empty-state.compact {
  min-height: 92px;
  padding: 24px 16px;
}

@media (max-width: 1180px) {
  .distiller-layout {
    grid-template-columns: 1fr;
  }

  .distiller-control-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .distiller-job-card {
    grid-template-columns: 1fr;
  }

  .distiller-job-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .blogger-reference-list {
    grid-template-columns: 1fr;
  }
}

/* Keep the workshop brand on one line in the desktop sidebar. */
.sidebar-header .logo { align-items: center; }
.sidebar-header .logo > div:last-child { min-width: 0; }
.sidebar-header .logo-text { white-space: nowrap; font-size: 21px; }

/* Legacy green states are purple in the Koubo workshop skin. */
.badge-success,
.badge-info { color: #d8ccff !important; border-color: rgba(139, 92, 246, 0.48) !important; background: rgba(139, 92, 246, 0.14) !important; }
.status-dot { background: #8b5cf6 !important; box-shadow: 0 0 10px rgba(139, 92, 246, 0.72) !important; }

/* ===== Hot clone ===== */
.clone-page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.clone-stepper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; border: 1px solid rgba(231, 185, 73, 0.22); background: #0d0d12; }
.clone-stepper button { min-width: 0; min-height: 92px; padding: 15px 18px; border: 0; border-right: 1px solid rgba(231, 185, 73, 0.16); background: transparent; color: var(--text-muted); cursor: pointer; display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 10px; text-align: left; }
.clone-stepper button:last-child { border-right: 0; }
.clone-stepper button span { grid-row: 1 / 3; width: 32px; height: 32px; border: 1px solid rgba(231, 185, 73, 0.32); display: grid; place-items: center; color: #cfaa52; font: 700 12px ui-monospace, Consolas, monospace; }
.clone-stepper button strong { color: var(--text-secondary); font-size: 14px; }
.clone-stepper button em { overflow: hidden; font-size: 12px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.clone-stepper button.active { background: rgba(139, 92, 246, 0.12); box-shadow: inset 0 -3px 0 #8b5cf6; }
.clone-stepper button.active span { border-color: #a78bfa; background: #8b5cf6; color: #fff; }
.clone-stepper button.active strong, .clone-stepper button.complete strong { color: #f0d583; }
.clone-workspace { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(390px, .72fr); gap: 18px; align-items: start; }
.clone-flow-card { min-height: 590px; }
.clone-task-column { min-width: 0; display: grid; gap: 18px; }
.clone-progress-card { overflow: hidden; }
.clone-progress-updated { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.clone-progress-board { display: grid; gap: 12px; }
.clone-progress-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid rgba(231, 185, 73, 0.16); border-radius: 10px; background: rgba(231, 185, 73, 0.12); }
.clone-progress-stats > div { min-width: 0; padding: 10px 6px; background: #0b0b10; text-align: center; }
.clone-progress-stats span { display: block; color: var(--text-muted); font-size: 10px; }
.clone-progress-stats strong { display: block; margin-top: 3px; color: #f0d583; font: 700 17px ui-monospace, Consolas, monospace; }
.clone-progress-items { display: grid; gap: 10px; }
.clone-progress-item { padding: 12px; border: 1px solid rgba(139, 92, 246, 0.24); border-radius: 10px; background: rgba(12, 12, 17, 0.92); }
.clone-progress-item.is-complete { border-color: rgba(231, 185, 73, 0.24); }
.clone-progress-item.is-failed { border-color: rgba(239, 68, 68, 0.32); }
.clone-progress-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.clone-progress-item-head > div { min-width: 0; display: grid; gap: 3px; }
.clone-progress-item-head strong { overflow: hidden; color: var(--text-primary); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.clone-progress-item-head span { overflow: hidden; color: var(--text-muted); font: 10px ui-monospace, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.clone-progress-item-head em { flex: none; color: #c4b5fd; font-size: 11px; font-style: normal; }
.clone-progress-item.is-complete .clone-progress-item-head em { color: #f0d583; }
.clone-progress-item.is-failed .clone-progress-item-head em { color: #fca5a5; }
.clone-progress-track { height: 7px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: rgba(148, 163, 184, 0.14); }
.clone-progress-bar { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7c3aed, #c4b5fd); transition: width .35s ease; }
.clone-progress-item.is-complete .clone-progress-bar { background: linear-gradient(90deg, #b4872e, #f0d583); }
.clone-progress-item.is-failed .clone-progress-bar { background: #ef4444; }
.clone-progress-item p { margin: 8px 0 0; color: var(--text-secondary); font-size: 11px; line-height: 1.5; }
.clone-step-panel { display: none; }
.clone-step-panel.active { display: block; }
.clone-composer { overflow: visible; border: 1px solid rgba(231, 185, 73, 0.28); border-radius: 16px; background: linear-gradient(180deg, rgba(18, 18, 24, .98), rgba(8, 8, 12, .98)); box-shadow: 0 20px 54px rgba(0, 0, 0, .26); }
.clone-composer-config { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; border-bottom: 1px solid rgba(231, 185, 73, .14); }
.clone-composer-config label { min-width: 0; display: grid; gap: 7px; }
.clone-composer-config label > span { color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.clone-composer-config .form-select { width: 100%; min-width: 0; color: var(--text-primary); background-color: #08080c; }
.clone-composer-cards { padding: 0 16px; }
.clone-composer-cards[hidden] { display: none; }
.clone-composer .clone-reference-preview-grid { margin-top: 16px; }
.clone-reference-link-card { min-height: 66px; margin-top: 14px; padding: 10px; border: 1px solid rgba(139, 92, 246, .34); border-radius: 11px; background: rgba(139, 92, 246, .07); display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 34px; align-items: center; gap: 10px; }
.clone-reference-link-card[hidden] { display: none; }
.clone-reference-card-icon { width: 40px; height: 40px; border: 1px solid rgba(231, 185, 73, .3); border-radius: 9px; display: grid; place-items: center; color: #e7bd57; background: rgba(231, 185, 73, .08); }
.clone-reference-card-icon svg { width: 18px; height: 18px; }
.clone-reference-link-card > div { min-width: 0; display: grid; gap: 4px; }
.clone-reference-link-card strong { color: var(--text-primary); font-size: 13px; }
.clone-reference-link-card em { overflow: hidden; color: var(--text-muted); font-size: 12px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.clone-reference-link-card button { min-height: 32px; padding: 0 10px; border: 1px solid rgba(231, 185, 73, .25); border-radius: 9px; color: var(--text-secondary); background: rgba(231, 185, 73, .06); cursor: pointer; }
.clone-reference-link-card button.is-referenced { border-color: rgba(139, 92, 246, .58); color: #d8ccff; background: rgba(139, 92, 246, .14); }
.clone-reference-link-card button:last-child { width: 34px; padding: 0; display: grid; place-items: center; }
.clone-reference-link-card button svg { width: 15px; height: 15px; }
.clone-composer .clone-prompt-group { margin: 0 16px 16px; }
.clone-composer .clone-prompt { min-height: 156px; padding: 16px; border-color: rgba(231, 185, 73, .24); border-radius: 12px; background: #060609; font-size: 15px; line-height: 1.7; resize: vertical; }
.clone-composer .clone-prompt:focus { border-color: #b99cff; box-shadow: 0 0 0 3px rgba(139, 92, 246, .12); }
.clone-reference-mention-strip { display: flex; flex-wrap: wrap; gap: 7px; min-height: 34px; margin-top: 9px; }
.clone-reference-mention-strip button { min-height: 32px; padding: 0 9px; border: 1px solid rgba(231, 185, 73, .2); border-radius: 9px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); background: #0a0a0e; cursor: pointer; }
.clone-reference-mention-strip button.is-referenced { border-color: rgba(139, 92, 246, .5); color: #d8ccff; background: rgba(139, 92, 246, .11); }
.clone-reference-mention-strip button svg { width: 14px; height: 14px; }
.clone-reference-mention-strip button em { color: inherit; opacity: .74; font-size: 10px; font-style: normal; }
.clone-reference-empty-hint { color: var(--text-muted); font-size: 12px; line-height: 32px; }
.clone-composer .clone-face-library { margin: 0 16px 14px; padding: 0; border-color: rgba(231, 185, 73, .18); border-radius: 11px; background: rgba(231, 185, 73, .035); }
.clone-face-library summary { min-height: 48px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-secondary); cursor: pointer; list-style: none; }
.clone-face-library summary::-webkit-details-marker { display: none; }
.clone-face-library summary span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.clone-face-library summary svg { width: 17px; height: 17px; color: #e7bd57; }
.clone-face-library summary em { color: var(--text-muted); font-size: 11px; font-style: normal; }
.clone-face-library[open] summary { border-bottom: 1px solid rgba(231, 185, 73, .12); }
.clone-face-library[open] .clone-face-library__header { padding: 12px 12px 0; }
.clone-face-library[open] .clone-face-library-grid { padding: 0 12px 12px; }
.clone-composer .clone-preserve-list { padding: 0 16px 14px; }
.clone-composer-toolbar { min-height: 70px; margin-top: 14px; padding: 10px 14px 6px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; background: rgba(255, 255, 255, .012); }
.clone-composer-add { min-height: 40px; padding: 0 13px; border: 1px solid rgba(231, 185, 73, .3); border-radius: 10px; display: inline-flex; align-items: center; gap: 7px; color: #f0d583; background: rgba(231, 185, 73, .07); cursor: pointer; }
.clone-composer-add:hover { border-color: #e7b949; background: rgba(231, 185, 73, .13); }
.clone-composer-add svg { width: 17px; height: 17px; }
.clone-composer-hint { min-width: 0; display: grid; gap: 3px; }
.clone-composer-hint strong, .clone-composer-hint span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clone-composer-hint strong { color: var(--text-secondary); font-size: 12px; }
.clone-composer-hint span { color: var(--text-muted); font-size: 11px; }
.clone-composer-bottom-action { padding: 4px 16px 18px; }
.clone-composer-next-button { width: 100%; min-height: 50px; padding: 0 22px; border: 1px solid #e1b84c; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #151109; background: linear-gradient(135deg, #e9bd50, #d4a83c); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 14px 30px rgba(214, 173, 77, .18); }
.clone-composer-next-button:hover { background: linear-gradient(135deg, #f1cb68, #ddb346); transform: translateY(-1px); }
.clone-composer-next-button svg { width: 18px; height: 18px; }
.clone-dropzone { min-height: 190px; padding: 28px; border: 1px dashed rgba(231, 185, 73, 0.56); background: #09090d; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: var(--text-primary); cursor: pointer; }
.clone-dropzone:hover { border-color: #f0c65a; background: #15120c; }
.clone-dropzone svg { width: 30px; height: 30px; color: #a78bfa; }
.clone-dropzone span { color: var(--text-muted); font-size: 12px; text-align: center; }
.clone-reference-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.clone-reference-preview-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.clone-reference-preview-card { min-width: 0; overflow: hidden; border: 1px solid rgba(231, 185, 73, 0.22); border-radius: var(--radius-md); background: #09090d; }
.clone-reference-preview-grid.is-single .clone-reference-preview-card { width: min(100%, 380px); justify-self: center; }
.clone-reference-preview-card.is-landscape { grid-column: 1 / -1; }
.clone-reference-preview-media { display: block; width: 100%; max-height: 420px; aspect-ratio: var(--clone-preview-ratio, 4 / 5); object-fit: contain; background: #050507; }
.clone-reference-preview-grid.is-multiple .clone-reference-preview-card.is-portrait .clone-reference-preview-media { max-height: 440px; }
.clone-reference-preview-card footer { display: flex; min-height: 46px; align-items: center; gap: 10px; padding: 0 12px; }
.clone-reference-preview-card footer strong { flex: 1; overflow: hidden; min-width: 0; color: var(--text-secondary); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.clone-reference-preview-card footer strong em { display: block; overflow: hidden; margin-top: 2px; color: var(--text-muted); font-size: 10px; font-style: normal; text-overflow: ellipsis; }
.clone-reference-preview-card footer button,
.clone-file-row button { flex: 0 0 auto; border: 0; color: #d58a7a; background: transparent; cursor: pointer; font: inherit; font-size: 13px; }
.clone-reference-preview-card footer button.is-referenced,
.clone-file-row button.is-referenced { color: #c4b5fd; }
.clone-link-reference { margin-top: 12px; padding: 16px; border: 1px solid rgba(139, 92, 246, 0.26); background: rgba(139, 92, 246, 0.055); display: grid; grid-template-columns: minmax(220px, 0.62fr) minmax(280px, 1fr); align-items: center; gap: 12px 16px; }
.clone-link-reference__title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.clone-link-reference__title > span { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid rgba(231, 185, 73, 0.3); background: rgba(231, 185, 73, 0.08); display: grid; place-items: center; color: #e2bd5d; }
.clone-link-reference__title svg { width: 17px; height: 17px; }
.clone-link-reference__title div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.clone-link-reference__title strong { color: var(--text-primary); font-size: 14px; }
.clone-link-reference__title em { color: var(--text-muted); font-size: 11px; font-style: normal; }
.clone-link-reference .form-input { width: 100%; min-width: 0; }
.clone-link-reference p { grid-column: 2; display: flex; align-items: center; gap: 6px; margin: -3px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
.clone-link-reference p svg { width: 13px; height: 13px; flex: 0 0 auto; color: #b99cff; }
@media (max-width: 720px) {
  .clone-link-reference { grid-template-columns: minmax(0, 1fr); }
  .clone-link-reference p { grid-column: 1; margin-top: -2px; }
}
.clone-file-list { margin-top: 14px; max-height: 225px; overflow: auto; border-top: 1px solid rgba(231, 185, 73, 0.13); }
.clone-file-row { min-height: 46px; display: grid; grid-template-columns: 32px 20px minmax(0, 1fr) auto auto auto; align-items: center; gap: 9px; border-bottom: 1px solid rgba(231, 185, 73, 0.1); }
.clone-file-row > span { color: #cfa640; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.clone-file-row svg { width: 16px; height: 16px; color: #a78bfa; }
.clone-file-row strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.clone-file-row em { color: var(--text-muted); font-size: 12px; font-style: normal; }
.clone-file-row.is-link strong { color: #d8ccff; }
.clone-step-actions { min-height: 58px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(231, 185, 73, 0.14); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.clone-strategy-grid, .clone-model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-bottom: 18px; }
.clone-strategy-card, .clone-model-card { position: relative; min-height: 116px; padding: 17px; border: 1px solid rgba(231, 185, 73, 0.22); background: #0a0a0e; cursor: pointer; display: flex; flex-direction: column; gap: 7px; }
.clone-strategy-card input, .clone-model-card input { position: absolute; opacity: 0; pointer-events: none; }
.clone-strategy-card strong, .clone-model-card strong { color: var(--text-primary); }
.clone-strategy-card span, .clone-model-card p { margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.55; }
.clone-strategy-card.active, .clone-model-card.active { border-color: #8b5cf6; background: rgba(139, 92, 246, 0.1); box-shadow: inset 3px 0 0 #8b5cf6; }
.clone-preserve-list { display: flex; flex-wrap: wrap; gap: 10px; }
.clone-preserve-list label { min-height: 38px; padding: 0 12px; border: 1px solid rgba(231, 185, 73, 0.19); display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 13px; }
.clone-face-library { margin: 0 0 18px; padding: 15px; border: 1px solid rgba(139, 92, 246, 0.25); background: rgba(139, 92, 246, 0.045); }
.clone-face-library__header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.clone-face-library__header > div { min-width: 0; display: grid; gap: 3px; }
.clone-face-library__header strong { color: var(--text-primary); font-size: 14px; }
.clone-face-library__header span { color: var(--text-muted); font-size: 11px; line-height: 1.45; }
.clone-face-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 9px; }
.clone-face-library-grid > .empty-state { grid-column: 1 / -1; min-height: 72px; }
.clone-face-card { position: relative; min-width: 0; min-height: 68px; padding: 8px 32px 8px 8px; border: 1px solid rgba(231, 185, 73, 0.2); border-radius: 10px; background: #0a0a0e; display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; gap: 9px; color: var(--text-secondary); text-align: left; cursor: pointer; transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.clone-face-card:hover { border-color: rgba(167, 139, 250, 0.72); background: rgba(139, 92, 246, 0.08); transform: translateY(-1px); }
.clone-face-card.active { border-color: #8b5cf6; background: rgba(139, 92, 246, 0.14); box-shadow: inset 3px 0 0 #8b5cf6, 0 8px 22px rgba(76, 29, 149, 0.18); }
.clone-face-card__preview { width: 50px; height: 50px; overflow: hidden; border: 1px solid rgba(231, 185, 73, 0.2); border-radius: 9px; background: #050507; display: grid; place-items: center; }
.clone-face-card__preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.clone-face-card__preview svg { width: 22px; height: 22px; color: #a78bfa; }
.clone-face-card__body { min-width: 0; display: grid; gap: 5px; }
.clone-face-card__body strong { overflow: hidden; color: var(--text-primary); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.clone-face-card__body em { color: var(--text-muted); font-size: 10px; font-style: normal; }
.clone-face-card__check { position: absolute; top: 8px; right: 8px; width: 16px; height: 16px; color: transparent; transition: color 160ms ease; }
.clone-face-card.active .clone-face-card__check { color: #c4b5fd; }
.clone-prompt-group { position: relative; }
.clone-prompt { min-height: 138px; }
.clone-face-mention-menu { position: absolute; z-index: 25; top: 194px; left: 0; right: 0; max-height: 248px; overflow-y: auto; padding: 6px; border: 1px solid rgba(139, 92, 246, 0.48); border-radius: 10px; background: #101016; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.52); }
.clone-face-mention-menu[hidden], .clone-face-selection[hidden] { display: none !important; }
.clone-face-mention-menu button { width: 100%; min-height: 54px; padding: 7px 9px; border: 0; border-radius: 8px; background: transparent; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 9px; color: var(--text-secondary); text-align: left; cursor: pointer; }
.clone-face-mention-menu button:hover, .clone-face-mention-menu button[aria-selected="true"] { background: rgba(139, 92, 246, 0.16); }
.clone-face-mention-menu button > img, .clone-face-mention-menu button > span:first-child { width: 40px; height: 40px; overflow: hidden; border-radius: 7px; background: #07070a; display: grid; place-items: center; object-fit: cover; }
.clone-face-mention-menu button > span:last-child { min-width: 0; display: grid; gap: 3px; }
.clone-face-mention-menu button strong { overflow: hidden; color: var(--text-primary); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.clone-face-mention-menu button em { color: var(--text-muted); font-size: 10px; font-style: normal; }
.clone-face-mention-empty { padding: 16px; color: var(--text-muted); font-size: 12px; text-align: center; }
.clone-face-selection { min-height: 38px; margin-top: 9px; padding: 6px 8px 6px 12px; border: 1px solid rgba(139, 92, 246, 0.28); border-radius: 9px; background: rgba(139, 92, 246, 0.08); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-secondary); font-size: 12px; }
.clone-face-selection strong { color: #d8ccff; }
.clone-model-grid { grid-template-columns: 1fr; }
.clone-model-card { min-height: 126px; justify-content: center; padding: 22px; cursor: default; }
.clone-model-grid-selectable { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.clone-model-grid-selectable .clone-model-card { min-height: 142px; cursor: pointer; }
.clone-upload-heading { margin-top: 22px; }
.clone-model-kicker { color: #d6b45c !important; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.clone-model-card strong { font-size: 18px; }
.clone-model-card em { margin-top: 7px; color: #d8ccff; font-size: 13px; font-style: normal; font-weight: 700; }
.clone-model-card.recommended::after { content: '推荐'; position: absolute; top: 11px; right: 11px; padding: 3px 8px; background: #8b5cf6; color: #fff; font-size: 11px; }
.clone-spec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.clone-static-value { min-height: 42px; padding: 0 13px; border: 1px solid var(--border-color); background: #09090d; display: flex; align-items: center; color: var(--text-secondary); }
.clone-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid rgba(231, 185, 73, 0.2); background: rgba(231, 185, 73, 0.12); }
.clone-summary > div { min-height: 76px; padding: 15px; background: #0b0b10; display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.clone-summary span { color: var(--text-muted); font-size: 12px; }
.clone-summary strong { color: #f0d583; }
.clone-submit-btn { min-width: 200px; margin-top: 18px; }
.clone-task-list { display: grid; gap: 10px; max-height: calc(100vh - 250px); overflow: auto; }
.clone-task-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 11px; align-items: center; min-height: 102px; padding: 13px; border: 1px solid rgba(231, 185, 73, 0.18); background: #0b0b10; }
.clone-task-mark { width: 32px; height: 32px; display: grid; place-items: center; color: #a78bfa; }
.clone-task-mark svg { width: 22px; height: 22px; }
.clone-task-row > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.clone-task-row strong { overflow: hidden; color: var(--text-primary); text-overflow: ellipsis; white-space: nowrap; }
.clone-task-row span, .clone-task-row em { color: var(--text-muted); font-size: 12px; font-style: normal; line-height: 1.4; }
.clone-task-actions { grid-column: 1 / -1; min-width: 0; padding-top: 10px; border-top: 1px solid rgba(231, 185, 73, 0.12); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.clone-task-action-buttons { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.clone-task-action-buttons .btn { width: auto; min-width: 62px; min-height: 34px; padding: 0 11px; border-radius: 9px; justify-content: center; gap: 6px; font-size: 12px; }
.clone-task-action-buttons .btn.btn-ghost { width: 34px; min-width: 34px; padding: 0; }
.clone-task-action-buttons .btn svg { width: 14px; height: 14px; }
.clone-task-actions .badge { min-height: 30px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 10px; }
.clone-task-preview-shell { grid-column: 1 / -1; padding: 14px; border-top: 1px solid rgba(231, 185, 73, 0.14); background: #050507; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.clone-task-preview-shell[hidden] { display: none; }
.clone-task-video-player { width: min(100%, 250px); overflow: hidden; border: 1px solid rgba(231, 185, 73, 0.28); border-radius: 12px; background: #000; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34); }
.clone-task-preview-video { display: block; width: 100%; aspect-ratio: 9 / 16; border: 0; background: #000; object-fit: contain; cursor: pointer; }
.clone-task-video-controls { min-height: 42px; padding: 6px 8px; display: grid; grid-template-columns: 30px auto minmax(56px, 1fr) 30px; gap: 7px; align-items: center; border-top: 1px solid rgba(231, 185, 73, 0.18); background: linear-gradient(180deg, #101014, #070709); }
.clone-task-video-controls button { width: 30px; height: 30px; padding: 0; border: 1px solid rgba(231, 185, 73, 0.26); border-radius: 8px; display: grid; place-items: center; color: #f0d583; background: rgba(231, 185, 73, 0.08); cursor: pointer; }
.clone-task-video-controls button:hover { border-color: rgba(231, 185, 73, 0.62); background: rgba(231, 185, 73, 0.16); }
.clone-task-video-controls button svg { width: 15px; height: 15px; }
.clone-task-video-controls span { color: var(--text-secondary); font: 10px ui-monospace, Consolas, monospace; white-space: nowrap; }
.clone-task-video-controls input[type="range"] { width: 100%; min-width: 0; accent-color: #e7b949; cursor: pointer; }
.clone-task-preview-error { max-width: 420px; padding: 10px 14px; border: 1px solid rgba(239, 68, 68, 0.34); border-radius: 10px; color: #fca5a5; background: rgba(127, 29, 29, 0.16); font-size: 13px; text-align: center; }
.clone-task-preview-error[hidden] { display: none; }
@media (max-width: 1180px) { .clone-workspace { grid-template-columns: 1fr; } .clone-task-list { max-height: none; } }
@media (max-width: 760px) {
  .clone-stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .clone-stepper button { min-height: 74px; padding: 10px; grid-template-columns: 28px minmax(0, 1fr); }
  .clone-stepper button span { width: 28px; height: 28px; }
  .clone-stepper button em { display: none; }
  .clone-strategy-grid, .clone-model-grid, .clone-spec-grid, .clone-summary { grid-template-columns: 1fr; }
  .clone-composer-config { grid-template-columns: 1fr; }
  .clone-reference-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .clone-reference-preview-grid.is-single { grid-template-columns: 1fr; }
  .clone-reference-preview-media { max-height: 360px; }
  .clone-reference-preview-card footer { min-height: 58px; padding: 6px 8px; gap: 6px; flex-wrap: wrap; }
  .clone-reference-preview-card footer strong { flex-basis: 100%; }
  .clone-reference-link-card { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .clone-reference-link-card > button:last-child { grid-column: 3; }
  .clone-file-row { grid-template-columns: 24px 18px minmax(0, 1fr) auto auto; }
  .clone-file-row em { grid-column: 3; }
  .clone-file-row > button:first-of-type { grid-column: 4; grid-row: 1 / 3; }
  .clone-file-row > button:last-of-type { grid-column: 5; grid-row: 1 / 3; }
  .clone-composer-toolbar { grid-template-columns: auto minmax(0, 1fr); padding: 10px; }
  .clone-composer-add span { display: none; }
  .clone-task-row { grid-template-columns: 32px minmax(0, 1fr); }
  .clone-task-actions { gap: 8px; }
  .clone-task-action-buttons { gap: 5px; }
  .clone-task-action-buttons .btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 56px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 11px;
  }
  .clone-task-action-buttons .btn.btn-ghost {
    width: 30px;
    min-width: 30px;
    padding: 0;
  }
  .clone-task-action-buttons .btn svg {
    width: 13px;
    height: 13px;
  }
  .clone-task-actions .badge {
    min-height: 28px;
    padding: 0 9px;
    font-size: 10px;
  }
  .clone-face-library { padding: 12px; }
  .clone-face-library__header { align-items: flex-start; }
  .clone-face-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clone-face-card { grid-template-columns: 42px minmax(0, 1fr); min-height: 60px; padding-left: 7px; }
  .clone-face-card__preview { width: 42px; height: 42px; }
}

/* Final interactive accents for the Koubo workshop skin. */
.scene-card:hover {
  border-color: rgba(229, 185, 79, 0.92) !important;
  background: #15130e !important;
  box-shadow: 0 12px 30px rgba(229, 185, 79, 0.16), inset 0 0 0 1px rgba(229, 185, 79, 0.16) !important;
  transform: translateY(-5px);
}

.scene-card:hover .scene-card-icon,
.scene-card:hover .scene-card-title {
  color: #f0d583;
}

.scene-card:hover .scene-card-icon {
  transform: scale(1.08);
}

.scene-card-icon,
.scene-card-title {
  transition: color var(--transition-base), transform var(--transition-base);
}

/* ===== Smart montage ===== */
.montage-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.montage-workspace { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr); gap: 18px; align-items: start; }
.montage-retention-note, .montage-vision-note { color: var(--text-muted); font-size: 13px; }
.montage-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.montage-dropzone {
  min-height: 142px; padding: 24px; border: 1px dashed rgba(231, 185, 73, 0.55);
  background: #0d0d12; display: flex; flex-direction: column; justify-content: center;
  align-items: center; gap: 8px; color: var(--text-primary); cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.montage-dropzone svg { width: 26px; height: 26px; color: #e6b94b; }
.montage-dropzone span { color: var(--text-muted); font-size: 12px; text-align: center; }
.montage-dropzone:hover { border-color: #f2c75d; background: #15120b; box-shadow: inset 0 0 0 1px rgba(242, 199, 93, 0.14); }
.montage-file-list { margin-top: 12px; max-height: 310px; overflow: auto; border-top: 1px solid rgba(231, 185, 73, 0.16); }
.montage-material-group { border-bottom: 1px solid rgba(231, 185, 73, 0.14); }
.montage-material-group-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px; padding: 0 8px; background: #111116; }
.montage-material-group-title { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-secondary); font-size: 12px; }
.montage-material-group-title strong { color: #e8c76e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.montage-material-count { color: var(--text-muted); }
.montage-group-toggle { flex: 1; justify-content: flex-start; min-height: 38px; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.montage-group-toggle:hover strong { color: #f2d780; }
.montage-group-toggle > svg:first-child { width: 18px; height: 18px; color: #e8c76e; flex: 0 0 auto; }
.montage-group-chevron { width: 14px !important; height: 14px !important; margin-left: auto; color: var(--text-muted) !important; }
.montage-material-group.is-collapsed .montage-material-group-files { display: none; }
.montage-group-delete, .montage-file-delete { border: 0; background: transparent; color: var(--text-muted); cursor: pointer; display: inline-grid; place-items: center; padding: 6px; border-radius: 6px; }
.montage-group-delete:hover, .montage-file-delete:hover { color: #f87171; background: rgba(248, 113, 113, 0.1); }
.montage-file-row { display: grid; grid-template-columns: 34px 20px minmax(0, 1fr) auto 32px; align-items: center; gap: 9px; min-height: 42px; padding: 0 8px; border-top: 1px solid rgba(231, 185, 73, 0.08); font-size: 13px; }
.montage-file-index { color: #d6a93d; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.montage-file-row svg { width: 16px; height: 16px; color: #a78bfa; }
.montage-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.montage-file-size { color: var(--text-muted); }
.montage-group-delete svg, .montage-file-delete svg { width: 15px; height: 15px; color: currentColor; }
.montage-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 18px; align-items: start; }
.montage-settings-grid > .form-group { min-width: 0; margin-bottom: 0; }
.montage-settings-grid .form-input,
.montage-settings-grid .form-select,
.montage-settings-grid .input-suffix { height: 44px; box-sizing: border-box; }
.montage-settings-grid .input-suffix .form-input { height: 44px; }
#montage-fast-strategy { grid-column: span 2; min-width: 320px; }
.montage-control-hint { display: block; margin-top: 6px; color: rgba(160, 158, 168, 0.72); font-size: 11px; line-height: 1.45; }
.montage-file-select { display: flex; width: 100%; height: 44px !important; min-height: 44px !important; max-height: 44px !important; align-items: center; overflow: hidden; padding: 0 38px 0 14px !important; line-height: 1; cursor: pointer; }
.montage-file-select > span { display: block; overflow: hidden; color: var(--text-primary); text-overflow: ellipsis; white-space: nowrap; }
.montage-file-select:hover { border-color: var(--accent-primary) !important; }
.montage-segmented { display: grid; grid-template-columns: repeat(3, 1fr); min-height: 44px; border: 1px solid rgba(231, 185, 73, 0.28); background: #09090d; }
#montage-kind-control { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 10px; }
#montage-kind-control button { min-width: 0; min-height: 40px; border: 0; border-radius: 7px; }
#montage-kind-control button.active { box-shadow: 0 4px 16px rgba(231, 185, 73, 0.18); }
.montage-segmented button { border: 0; border-right: 1px solid rgba(231, 185, 73, 0.18); background: transparent; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.montage-segmented button:last-child { border-right: 0; }
.montage-segmented button svg { width: 16px; height: 16px; }
.montage-segmented button.active { background: #e7b949; color: #09090d; font-weight: 700; }
.input-suffix { position: relative; }
.input-suffix .form-input { padding-right: 42px; }
.input-suffix > span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; }
.montage-script-detail { margin-top: 10px; color: var(--text-secondary); font-size: 13px; }
.montage-script-detail summary { cursor: pointer; color: var(--gold); }
.montage-script-detail p { margin: 8px 0 0; line-height: 1.65; }
.montage-script-group { margin-top: 16px; }
.montage-script-group .form-textarea { min-height: 126px; resize: vertical; }
.montage-start-btn { min-width: 190px; }
.montage-current { padding: 14px; margin-bottom: 14px; border: 1px solid rgba(167, 139, 250, 0.35); background: rgba(139, 92, 246, 0.08); }
.montage-current-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.montage-current-head span { color: #c4b5fd; font-weight: 700; }
.montage-progress { height: 7px; margin: 10px 0 8px; background: #22212b; overflow: hidden; }
.montage-progress span { display: block; height: 100%; background: #8b5cf6; transition: width 240ms ease; }
.montage-job-list { display: grid; gap: 10px; max-height: calc(100vh - 290px); overflow: auto; }
.montage-job-card { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px; border: 1px solid rgba(231, 185, 73, 0.2); background: #0d0d12; }
.montage-job-preview { width: 92px; aspect-ratio: 9 / 12; background: #050507; overflow: hidden; }
.montage-job-preview video { width: 100%; height: 100%; object-fit: cover; }
.montage-job-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #8b5cf6; }
.montage-job-placeholder svg { width: 28px; height: 28px; }
.montage-job-title { color: var(--text-primary); font-weight: 700; }
.montage-job-meta { margin-top: 7px; color: var(--text-muted); font-size: 12px; }
.montage-job-error { margin-top: 7px; color: #f87171; font-size: 12px; line-height: 1.45; }
.montage-job-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.montage-preview-dialog { width: min(760px, calc(100vw - 32px)); max-width: 760px; }
.montage-preview-body { display: grid; min-height: 320px; place-items: center; padding: 12px; background: #050507; }
.montage-preview-body video { display: block; width: 100%; max-height: min(72vh, 760px); background: #000; object-fit: contain; }
@media (max-width: 1180px) { .montage-workspace { grid-template-columns: 1fr; } .montage-job-list { max-height: none; } }
@media (max-width: 760px) {
  .montage-upload-grid, .montage-settings-grid { grid-template-columns: 1fr; }
  #montage-fast-strategy { grid-column: auto; min-width: 0; }
  .montage-segmented { grid-template-columns: 1fr; }
  #montage-kind-control { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #montage-kind-control button { border-bottom: 0; }
  .montage-segmented button { min-height: 44px; border-right: 0; border-bottom: 1px solid rgba(231, 185, 73, 0.18); }
  .montage-job-card { grid-template-columns: 72px minmax(0, 1fr); }
  .montage-job-preview { width: 72px; }
  .montage-job-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
}

/* Keep the home banner black; WebGL supplies only the subtle purple movement. */
.dashboard-hero {
  background: #08090d !important;
  border-color: rgba(231, 191, 94, 0.2) !important;
}

/* Voice selection must remain unmistakable after the global card reset above. */
.voice-card.selected {
  border-color: #ddb34f !important;
  background: rgba(221, 179, 79, 0.18) !important;
  box-shadow: 0 0 0 2px rgba(221, 179, 79, 0.72), 0 10px 28px rgba(0, 0, 0, 0.32) !important;
  transform: translateY(-2px);
}

.voice-card.selected::after {
  content: '\2713';
  position: absolute;
  top: 9px;
  left: 9px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ddb34f;
  color: #08090b;
  font-size: 14px;
  font-weight: 900;
}

.voice-card:focus-visible {
  outline: 2px solid #f0d583;
  outline-offset: 3px;
}
.clipforge-page-header { align-items: flex-end; }
.clipforge-security-note { margin-bottom: 14px; }
.clipforge-security-note a { color: var(--accent-primary); }
.clipforge-shell {
  position: relative;
  min-height: 760px;
  height: calc(100vh - 72px);
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: #090b10;
}
.clipforge-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-secondary);
}
#clipforge-frame { width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .2s ease; }
#clipforge-frame.is-ready { opacity: 1; }
.avatar-source-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  padding: 3px 7px;
  border: 1px solid rgba(230, 184, 78, .55);
  border-radius: 999px;
  background: rgba(8, 8, 10, .82);
  color: var(--gold, #e6b84e);
  font-size: 10px;
  line-height: 1;
  backdrop-filter: blur(6px);
}

.avatar-card.avatar-incompatible {
  opacity: 1;
  filter: none;
  isolation: isolate;
  border-color: rgba(157, 125, 242, .34) !important;
  background:
    linear-gradient(145deg, rgba(75, 49, 116, .18), rgba(15, 14, 21, .94)) !important;
  cursor: not-allowed;
}

.avatar-card.avatar-incompatible .avatar-card-img {
  position: relative;
  border-color: rgba(184, 160, 239, .22);
}

.avatar-card.avatar-incompatible .avatar-card-img::after {
  content: '';
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(145deg, rgba(85, 56, 130, .2), rgba(15, 14, 22, .34));
  -webkit-backdrop-filter: blur(7px) saturate(92%);
  backdrop-filter: blur(7px) saturate(92%);
  box-shadow: inset 0 0 0 1px rgba(216, 204, 255, .08);
  pointer-events: none;
}

.avatar-card.avatar-incompatible::before {
  content: '当前模式不可选';
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 6;
  padding: 5px 8px;
  border: 1px solid rgba(196, 181, 253, .3);
  border-radius: 999px;
  color: #ddd5f5;
  background: rgba(45, 33, 66, .56);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .03em;
  line-height: 1;
  pointer-events: none;
}

.avatar-card.avatar-incompatible .avatar-card-id {
  color: #b8adcc;
}

.avatar-card.avatar-incompatible:hover {
  transform: none;
  border-color: rgba(157, 125, 242, .34) !important;
  box-shadow: inset 0 0 0 1px rgba(196, 181, 253, .06) !important;
}

/* ===== Auto B-roll: clear black-gold information hierarchy ===== */
.broll-page-header {
  max-width: 980px;
  margin-bottom: 28px;
}

.broll-page-kicker {
  margin-bottom: 9px;
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.broll-page-header .page-title {
  margin-bottom: 12px;
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.broll-page-header .page-title::after {
  width: 72px;
  margin-top: 18px;
}

.broll-page-header .page-subtitle {
  max-width: 760px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.broll-panel,
.broll-guide-card {
  margin-bottom: 20px;
}

.broll-panel {
  padding: 26px 28px;
  background: #0e1014 !important;
  border-color: rgba(221, 179, 79, 0.22) !important;
}

.broll-panel .card-header {
  align-items: flex-start;
  margin-bottom: 22px;
}

.broll-panel-heading {
  min-width: 0;
}

.broll-panel-heading .card-title {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
}

.broll-panel-heading .card-title-icon {
  color: var(--accent-primary);
}

.broll-panel-caption {
  margin: 6px 0 0 38px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.broll-quota-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.broll-quota-item {
  min-width: 0;
  padding: 21px 24px 22px;
  border-right: 1px solid var(--border-subtle);
}

.broll-quota-item:first-child {
  padding-left: 0;
}

.broll-quota-item:last-child {
  padding-right: 0;
  border-right: 0;
}

.broll-quota-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 22px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.broll-quota-label span {
  padding: 3px 7px;
  border: 1px solid rgba(221, 179, 79, 0.28);
  border-radius: 999px;
  color: var(--accent-secondary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.broll-quota-value {
  margin-top: 14px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.broll-quota-value small {
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.broll-quota-balance {
  color: var(--accent-secondary);
}

.broll-quota-note {
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.broll-panel-state {
  min-height: 18px;
  margin-top: 13px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.55;
}

.broll-enable-control {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.broll-settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.broll-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.broll-demo-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 10px;
  margin: -4px 0 22px;
  padding: 12px;
  border: 1px solid rgba(221, 179, 79, 0.2);
  border-radius: 14px;
  background: rgba(5, 6, 9, 0.66);
  overflow: hidden;
}

.broll-demo-preview video {
  display: block;
  width: min(100%, 224px);
  height: auto;
  aspect-ratio: 9 / 16;
  border: 0;
  border-radius: 10px;
  background: #07080b;
  object-fit: cover;
}

.broll-demo-preview figcaption {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  width: 100%;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.broll-demo-label {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid rgba(221, 179, 79, 0.4);
  border-radius: 999px;
  background: rgba(221, 179, 79, 0.08);
  color: var(--accent-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.broll-vox-card {
  background:
    radial-gradient(circle at 88% 12%, rgba(112, 84, 200, 0.16), transparent 32%),
    linear-gradient(145deg, rgba(231, 188, 73, 0.06), transparent 48%),
    var(--card-bg);
}

.broll-vox-subtitle-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid rgba(231, 188, 73, 0.28);
  border-radius: 12px;
  background: rgba(231, 188, 73, 0.045);
  cursor: pointer;
}

.broll-vox-subtitle-option input {
  margin-top: 3px;
}

.broll-vox-subtitle-option span {
  display: grid;
  gap: 4px;
}

.broll-vox-subtitle-option small {
  color: var(--text-secondary);
  line-height: 1.5;
}

.broll-editor-layout {
  display: grid;
  width: 100%;
  gap: 20px;
}

.broll-editor-top-row {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: stretch;
  gap: 20px;
}

.broll-editor-top-row > .card {
  height: 100%;
  margin: 0;
  min-width: 0;
}

.broll-timeline-card {
  width: 100%;
  min-width: 0;
}

.tl-preview-stage {
  position: relative;
  display: flex;
  min-height: 520px;
  align-items: center;
  justify-content: center;
  padding: 16px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 30%, rgba(229, 184, 75, 0.07), transparent 42%),
    #050505;
}

.tl-preview-canvas {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid rgba(229, 184, 75, 0.25);
  border-radius: 10px;
  background: #000;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.42);
}

.tl-preview-canvas > #tl-video-preview {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.tl-broll-preview-layer {
  position: absolute;
  z-index: 3;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(229, 184, 75, 0.82);
  border-radius: 8px;
  background: #050505;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.tl-broll-preview-layer.active {
  display: block;
}

.tl-broll-preview-layer.mode-pip {
  width: calc(var(--tl-pip-scale, 0.3) * 100%);
  aspect-ratio: 9 / 16;
  max-height: 78%;
}

.tl-broll-preview-layer.mode-cut {
  inset: 0;
  border: 0;
  border-radius: 0;
}

.tl-broll-preview-layer.mode-pip.pos-top_left {
  top: 16px;
  left: 16px;
}

.tl-broll-preview-layer.mode-pip.pos-top_right {
  top: 16px;
  right: 16px;
}

.tl-broll-preview-layer.mode-pip.pos-bottom_left {
  bottom: 70px;
  left: 16px;
}

.tl-broll-preview-layer.mode-pip.pos-bottom_right {
  right: 16px;
  bottom: 70px;
}

.tl-broll-preview-layer.mode-pip.pos-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.tl-preview-broll-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tl-subtitle-preview-layer {
  position: absolute;
  z-index: 6;
  right: 7%;
  bottom: 19%;
  left: 7%;
  display: none;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.28;
  text-align: center;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.6),
    1px 1px 1px rgba(0, 0, 0, 0.6),
    -1px -1px 1px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.tl-subtitle-preview-layer.active {
  display: block;
}

.tl-preview-timecode {
  position: absolute;
  z-index: 7;
  right: 12px;
  bottom: 10px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.timeline-container {
  position: relative;
}

.tl-playhead {
  position: absolute;
  z-index: 12;
  top: 8px;
  bottom: 10px;
  width: 2px;
  transform: translateX(-1px);
  background: #e5b84b;
  box-shadow: 0 0 0 1px rgba(229, 184, 75, 0.16);
  pointer-events: none;
}

.tl-playhead-handle {
  position: absolute;
  top: -4px;
  left: 50%;
  min-width: 48px;
  padding: 4px 7px;
  transform: translateX(-50%);
  border: 1px solid #e5b84b;
  border-radius: 5px;
  background: #e5b84b;
  color: #111;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: ew-resize;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.tl-playhead-handle::after {
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-top: 6px solid #e5b84b;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  content: "";
}

.broll-asset-card {
  align-items: flex-start;
}

.broll-asset-thumb {
  width: 72px;
  height: auto;
  aspect-ratio: 9 / 16;
}

.broll-asset-video {
  background: #000;
}

.broll-boundary-preview {
  width: 72px;
  height: auto;
  aspect-ratio: 9 / 16;
  flex: 0 0 auto;
  border-radius: 6px;
  background: #000;
  object-fit: cover;
}

.broll-user-candidate {
  align-items: center;
}

.tl-clip-item {
  min-height: 136px;
}

.tl-clip-preview {
  width: 72px;
  height: auto;
  aspect-ratio: 9 / 16;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: #000;
}

.tl-clip-preview-video,
.tl-clip-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tl-clip-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 5px;
}

.tl-clip-copy strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl-clip-copy span {
  color: var(--text-muted);
  font-size: 10px;
}

.broll-source-card .broll-settings-grid {
  grid-template-columns: 1fr;
}

.broll-source-card .card-title {
  line-height: 1.45;
}

.wiz-broll-sync-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.wiz-broll-sync-grid > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-secondary);
}

.wiz-broll-sync-grid span {
  color: var(--text-muted);
  font-size: 11px;
}

.wiz-broll-sync-grid strong {
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.45;
}

.broll-license-note {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.7;
}

.broll-settings-grid .form-group {
  margin-bottom: 18px;
}

.broll-settings-grid .form-label {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.broll-settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.broll-estimate {
  max-width: 780px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.65;
}

.broll-guide-card {
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(221, 179, 79, 0.11), rgba(15, 17, 21, 0.98) 42%) !important;
  border-color: rgba(221, 179, 79, 0.28) !important;
}

.broll-guide-layout {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.broll-guide-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(221, 179, 79, 0.28);
  border-radius: 50%;
  background: rgba(221, 179, 79, 0.08);
  color: var(--accent-primary);
}

.broll-guide-icon svg {
  width: 20px;
  height: 20px;
}

.broll-guide-content {
  flex: 1;
  min-width: 0;
}

.broll-guide-eyebrow {
  margin-bottom: 4px;
  color: var(--accent-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.broll-guide-title {
  margin-bottom: 10px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.broll-guide-copy {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.75;
}

.broll-guide-copy strong {
  color: var(--text-secondary);
  font-weight: 700;
}

@media (max-width: 1100px) {
  .broll-source-grid {
    grid-template-columns: 1fr;
  }

  .broll-editor-top-row {
    grid-template-columns: 1fr;
  }

  .broll-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wiz-broll-sync-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .broll-page-header .page-title {
    font-size: 32px;
  }

  .broll-panel {
    padding: 20px;
  }

  .broll-panel .card-header,
  .broll-settings-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .broll-panel .card-header .btn,
  .broll-settings-footer .btn {
    width: 100%;
  }

  .broll-panel-caption {
    margin-left: 0;
  }

  .broll-demo-preview {
    margin-top: 0;
    padding: 10px;
  }

  .broll-quota-grid,
  .broll-settings-grid,
  .wiz-broll-sync-grid {
    grid-template-columns: 1fr;
  }

  .broll-quota-item,
  .broll-quota-item:first-child,
  .broll-quota-item:last-child {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .broll-quota-item:last-child {
    border-bottom: 0;
  }

  .broll-guide-card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .broll-page-kicker {
    font-size: 9px;
  }

  .broll-page-header .page-title {
    font-size: 28px;
  }

  .broll-guide-layout {
    gap: 12px;
  }
}

/* ---------- 首页主标题循环卖点与可点击小助手 ---------- */
.hero-title-cycle {
  display: flex;
  align-items: baseline;
  width: max-content;
  max-width: 100%;
  font-size: clamp(38px, 3.15vw, 58px);
  line-height: 1.16;
  white-space: nowrap;
}

.hero-title-fixed {
  flex: 0 0 auto;
}

.hero-cycle-shell {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  flex: 0 0 auto;
  height: 1.16em;
  margin-inline: 0.08em;
  overflow: hidden;
  color: #ddb34f;
  transition: width 560ms cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: width;
}

.hero-cycle-word {
  display: inline-block;
  color: #ddb34f;
  white-space: nowrap;
  text-shadow: 0 0 24px rgba(221, 179, 79, 0.18);
  will-change: transform, opacity, filter;
}

.hero-cycle-word.is-entering {
  animation: hero-cycle-enter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-cycle-word.is-exiting {
  animation: hero-cycle-exit 300ms cubic-bezier(0.4, 0, 1, 1) both;
}

.hero-cycle-measure {
  position: absolute;
  left: -10000px;
  top: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes hero-cycle-enter {
  from { opacity: 0; transform: translateY(-0.42em); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes hero-cycle-exit {
  from { opacity: 1; transform: translateY(0); filter: blur(0); }
  to { opacity: 0; transform: translateY(0.42em); filter: blur(8px); }
}

.hero-steps {
  margin-bottom: 0;
}

.hero-decoration {
  width: 410px;
  margin-left: -96px;
  margin-right: 0;
  padding-right: 20px;
  justify-content: flex-end;
  cursor: pointer;
  border-radius: 20px;
  outline: none;
}

.hero-decoration:focus-visible {
  box-shadow: 0 0 0 2px rgba(221, 179, 79, 0.72);
}

.hero-assistant-hint {
  position: absolute;
  left: 18px;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  transform: translateY(-50%);
  color: var(--stage-text-dim);
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-align: right;
  pointer-events: none;
  transition: color 220ms ease, transform 220ms ease;
}

.hero-assistant-hint strong {
  color: #ddb34f;
  font-size: 16px;
  font-weight: 800;
}

.hero-decoration:hover .hero-assistant-hint,
.hero-decoration:focus-visible .hero-assistant-hint {
  color: var(--stage-text);
  transform: translateY(-50%) translateX(4px);
}

@media (max-width: 1280px) {
  .hero-title-cycle {
    font-size: 40px;
  }

  .hero-decoration {
    width: 330px;
    margin-left: -64px;
  }

  .hero-assistant-hint {
    left: 0;
  }
}

@media (max-width: 1024px) {
  .dashboard-hero {
    align-items: center;
  }

  .hero-title-cycle {
    justify-content: center;
    margin-inline: auto;
  }

  .hero-decoration {
    display: flex !important;
    width: 100%;
    height: 180px;
    margin: -8px 0 0;
    padding: 0;
    justify-content: center;
    gap: 26px;
  }

  .hero-assistant-hint {
    position: static;
    transform: none;
  }

  .hero-decoration:hover .hero-assistant-hint,
  .hero-decoration:focus-visible .hero-assistant-hint {
    transform: translateX(4px);
  }
}

@media (max-width: 768px) {
  .hero-title-cycle {
    font-size: clamp(20px, 6vw, 28px);
  }

  .hero-subtitle {
    margin-bottom: 22px;
    letter-spacing: 0.02em;
  }

  .hero-step {
    font-size: 14px;
  }

  .hero-decoration {
    display: flex !important;
    height: 170px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-cycle-shell,
  .hero-cycle-word,
  .hero-assistant-hint {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================
   Homepage v1: tutorial, recent-work showcase and avatar shelf
   ========================================================== */

/* Remove a legacy mojibake label that leaked into the progress modal. */
.progress-modal-header::after {
  content: none !important;
  display: none !important;
}

.dashboard-section {
  margin-top: 34px;
}

.section-header > div {
  min-width: 0;
}

.section-subtitle {
  margin: 7px 0 0 16px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.dashboard-tutorial-frame {
  position: relative;
  width: min(100%, 1120px);
  aspect-ratio: 16 / 9;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: 16px;
  background:
    linear-gradient(rgba(221, 179, 79, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(221, 179, 79, 0.035) 1px, transparent 1px),
    #07080b;
  background-size: 42px 42px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.dashboard-tutorial-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 46%, rgba(221, 179, 79, 0.07), transparent 42%);
}

.dashboard-tutorial-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: var(--text-muted);
  text-align: center;
}

.dashboard-tutorial-placeholder strong {
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: clamp(17px, 2vw, 24px);
  letter-spacing: 0.04em;
}

.dashboard-tutorial-placeholder > span:last-child {
  font-size: 12px;
}

.dashboard-tutorial-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(221, 179, 79, 0.42);
  border-radius: 50%;
  color: var(--accent-secondary);
  background: rgba(221, 179, 79, 0.07);
}

.dashboard-tutorial-icon svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}

.recent-showcase {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
  margin-bottom: 12px;
}

.recent-feature-card,
.recent-history-card,
.recent-create-card,
.dashboard-avatar-slot {
  appearance: none;
  min-width: 0;
  padding: 0;
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: 14px !important;
  background: var(--bg-surface);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 420ms ease;
}

.recent-feature-card {
  position: relative;
  display: block;
  min-height: 0;
  aspect-ratio: 9 / 16;
}

.recent-feature-card:hover,
.recent-history-card:hover,
.recent-create-card:hover {
  border-color: rgba(221, 179, 79, 0.62);
  transform: translateY(-4px) scale(1.018);
  box-shadow: 0 22px 52px -24px rgba(221, 179, 79, 0.5);
}

.dashboard-avatar-slot:hover {
  border-color: rgba(221, 179, 79, 0.62);
  background: #121419;
  transform: translateY(-2px);
}

.recent-feature-card:focus-visible,
.recent-history-card:focus-visible,
.recent-create-card:focus-visible,
.dashboard-avatar-slot:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 3px;
}

.recent-destination-card {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 28%, rgba(221, 179, 79, 0.12), transparent 52%),
    #08090c;
}

.recent-destination-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--text-muted);
  background: #050608;
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.recent-destination-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition:
    transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 420ms ease;
}

.recent-destination-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #050608;
  transition:
    transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 420ms ease;
}

.recent-destination-card:hover .recent-destination-media video,
.recent-destination-card.is-playing .recent-destination-media video {
  transform: scale(1.04);
  filter: saturate(1.04) contrast(1.02);
}

.recent-destination-media svg {
  width: 42px;
  height: 42px;
}

.recent-destination-card:hover .recent-destination-media img {
  transform: scale(1.075);
  filter: saturate(1.05) contrast(1.03);
}

.recent-destination-shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(7, 8, 10, 0.98) 0%, rgba(8, 9, 12, 0.84) 38%, rgba(8, 9, 12, 0.22) 72%, rgba(8, 9, 12, 0.08) 100%),
    linear-gradient(110deg, rgba(12, 10, 5, 0.28), transparent 58%);
}

.recent-destination-content {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: 24px;
  color: #fff;
}

.recent-destination-kicker {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--accent-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.recent-destination-kicker svg {
  width: 16px;
  height: 16px;
}

.recent-destination-title {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 7px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(20px, 1.65vw, 28px);
  line-height: 1.3;
  text-wrap: balance;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recent-destination-summary {
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.6;
}

.recent-destination-meta {
  display: flex;
  min-height: 24px;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.recent-destination-action {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 11px 13px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid rgba(221, 179, 79, 0.28);
  border-radius: 10px;
  background: rgba(221, 179, 79, 0.1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition:
    color 260ms ease,
    border-color 260ms ease,
    background-color 260ms ease;
}

.recent-destination-action svg {
  width: 16px;
  height: 16px;
  color: var(--accent-secondary);
  transition: transform 260ms ease;
}

.recent-destination-card:hover .recent-destination-action {
  color: #17130a;
  border-color: rgba(232, 193, 100, 0.84);
  background: rgba(232, 193, 100, 0.9);
}

.recent-destination-card:hover .recent-destination-action svg {
  color: #17130a;
  transform: translateX(4px);
}

.recent-history-card {
  position: relative;
  display: block;
  min-height: 0;
  aspect-ratio: 9 / 16;
}

.recent-history-card .recent-destination-shade {
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(
    to top,
    rgba(7, 8, 10, 0.98) 0%,
    rgba(8, 9, 12, 0.88) 36%,
    rgba(8, 9, 12, 0.42) 72%,
    transparent 100%
  );
}

.recent-history-card .recent-destination-content {
  padding: 15px 13px 13px;
}

.recent-history-card .recent-destination-title {
  font-family: var(--font-body);
  font-size: 15px;
}

.recent-preview-state {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 5px 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(4, 5, 7, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.recent-preview-state svg {
  width: 12px;
  height: 12px;
  color: var(--accent-secondary);
}

.recent-preview-card.is-playing .recent-preview-state {
  color: #161109;
  border-color: rgba(232, 193, 100, 0.82);
  background: rgba(232, 193, 100, 0.92);
}

.recent-preview-card.is-playing .recent-preview-state svg {
  color: #161109;
}

.recent-work-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  color: var(--text-muted);
  text-align: center;
  border-style: dashed;
  cursor: default;
}

.recent-work-placeholder:hover {
  border-color: var(--border-default);
  transform: none;
  box-shadow: none;
}

.recent-create-card {
  position: relative;
  display: flex;
  aspect-ratio: 9 / 16;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  padding: 20px;
  color: var(--text-primary);
  text-align: center;
  border-style: dashed;
  background:
    radial-gradient(circle at 50% 34%, rgba(221, 179, 79, 0.16), transparent 44%),
    linear-gradient(150deg, rgba(221, 179, 79, 0.05), transparent 58%),
    #0b0d11;
}

.recent-create-card strong {
  font-family: var(--font-display);
  font-size: 18px;
}

.recent-create-card > span:not(.recent-create-icon):not(.recent-create-action) {
  color: var(--text-muted);
  font-size: 11px;
}

.recent-create-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  color: #17130a;
  border-radius: 50%;
  background: var(--accent-secondary);
  box-shadow: 0 16px 36px -18px rgba(221, 179, 79, 0.85);
}

.recent-create-icon svg {
  width: 22px;
  height: 22px;
}

.recent-create-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--accent-secondary);
  font-size: 11px;
  font-weight: 700;
}

.recent-create-action svg {
  width: 14px;
  height: 14px;
  transition: transform 220ms ease;
}

.recent-create-card:hover .recent-create-action svg {
  transform: translateX(4px);
}

.recent-history-empty-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  color: var(--accent-primary);
}

.recent-showcase-skeleton {
  display: flex;
  min-height: 0;
  aspect-ratio: 9 / 16;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-default);
  border-radius: 14px;
  background: var(--bg-surface);
}

.recent-showcase-skeleton.is-featured {
  padding: 24px;
}

.recent-showcase-skeleton .skeleton:first-child {
  flex: 1 1 auto;
}

.recent-showcase-skeleton .skeleton:nth-child(2) {
  height: 22px;
}

.recent-showcase-skeleton .skeleton:nth-child(3) {
  width: 62%;
  height: 14px;
}

.dashboard-avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-avatar-slot {
  position: relative;
  display: flex;
  min-height: 0;
  flex-direction: column;
  aspect-ratio: 3 / 4;
}

.dashboard-avatar-slot.has-avatar {
  padding: 0;
}

.dashboard-avatar-media {
  inset: 0;
  margin: 0;
  background: #050608;
}

.dashboard-avatar-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  transform: scale(1.025);
}

.dashboard-avatar-slot .recent-destination-shade {
  background:
    linear-gradient(
      to top,
      rgba(7, 8, 10, 0.96) 0%,
      rgba(8, 9, 12, 0.7) 22%,
      rgba(8, 9, 12, 0.18) 43%,
      transparent 62%
    );
}

.dashboard-avatar-content {
  padding: 14px 12px 12px;
}

.dashboard-avatar-content .recent-destination-kicker {
  margin-bottom: 5px;
  font-size: 9px;
}

.dashboard-avatar-content .recent-destination-title {
  overflow: hidden;
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-line-clamp: 1;
}

.dashboard-avatar-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.dashboard-avatar-action svg {
  width: 12px;
  height: 12px;
  color: var(--accent-secondary);
}

.dashboard-avatar-slot.is-placeholder {
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  text-align: center;
  border-style: dashed;
  background:
    linear-gradient(145deg, rgba(221, 179, 79, 0.035), transparent 54%),
    #0c0e12;
}

.dashboard-avatar-slot.is-placeholder strong {
  color: var(--text-primary);
  font-size: 13px;
}

.dashboard-avatar-slot.is-placeholder > span:last-child {
  color: var(--text-muted);
  font-size: 10px;
}

.dashboard-avatar-placeholder-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  color: var(--accent-primary);
}

.dashboard-section-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.dashboard-voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 240px));
  gap: 10px;
  justify-content: start;
}

.dashboard-voice-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 10px 12px;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background:
    radial-gradient(circle at 90% 8%, rgba(221, 179, 79, 0.1), transparent 38%),
    #0d0f13;
  transition:
    border-color 220ms ease,
    transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 320ms ease;
}

.dashboard-voice-card:hover {
  border-color: rgba(221, 179, 79, 0.48);
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -28px rgba(221, 179, 79, 0.7);
}

.dashboard-voice-card.is-loading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 56px;
  min-height: 58px;
  gap: 10px;
}

.dashboard-voice-card.is-loading .skeleton:first-child {
  width: 34px;
  height: 34px;
}

.dashboard-voice-art {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--accent-secondary);
  border: 1px solid rgba(221, 179, 79, 0.26);
  border-radius: 12px;
  background: rgba(221, 179, 79, 0.08);
}

.dashboard-voice-art svg {
  width: 16px;
  height: 16px;
}

.dashboard-voice-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dashboard-voice-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-voice-copy small {
  color: var(--text-muted);
  font-size: 10px;
}

.dashboard-voice-play {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  padding: 6px 10px;
  color: #17130a;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: var(--accent-secondary);
}

.dashboard-voice-play svg {
  width: 13px;
  height: 13px;
}

.dashboard-voice-card.is-placeholder {
  min-height: 58px;
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-style: dashed;
}

.dashboard-voice-card.is-placeholder > svg {
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: var(--accent-secondary);
}

.dashboard-voice-card.is-placeholder > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.dashboard-voice-card.is-placeholder small {
  color: var(--text-muted);
  font-size: 10px;
}

.dashboard-voice-placeholder-icon {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--accent-secondary);
  border: 1px solid rgba(221, 179, 79, 0.26);
  border-radius: 50%;
}

/* Native equivalent of the supplied interactive hover button.
   The app is HTML/CSS/JS, so the interaction is applied without a React runtime. */
.btn {
  border-radius: 999px !important;
  transition:
    color 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease,
    box-shadow 300ms ease,
    transform 180ms ease !important;
}

.btn svg[data-lucide="arrow-right"] {
  transition: transform 220ms ease;
}

.btn:hover svg[data-lucide="arrow-right"] {
  transform: translateX(4px);
}

.dashboard-section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
}

.interactive-hover-button {
  position: relative;
  isolation: isolate;
  min-width: 132px;
  overflow: hidden;
  color: var(--text-primary) !important;
  border-color: var(--border-default) !important;
  background: var(--bg-surface) !important;
}

.interactive-hover-copy,
.interactive-hover-reveal {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition:
    transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 240ms ease;
}

.interactive-hover-copy {
  transform: translateX(4px);
}

.interactive-hover-reveal {
  position: absolute;
  inset: 0;
  z-index: 3;
  color: #151109;
  opacity: 0;
  transform: translateX(48px);
}

.interactive-hover-orb {
  position: absolute;
  z-index: 1;
  left: 20%;
  top: 40%;
  width: 8px;
  height: 8px;
  pointer-events: none;
  border-radius: 9px;
  background: var(--accent-primary);
  transform: scale(1);
  transition:
    left 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
    top 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.interactive-hover-button:hover .interactive-hover-copy,
.interactive-hover-button:focus-visible .interactive-hover-copy,
.interactive-hover-button:active .interactive-hover-copy {
  opacity: 0;
  transform: translateX(48px);
}

.interactive-hover-button:hover .interactive-hover-reveal,
.interactive-hover-button:focus-visible .interactive-hover-reveal,
.interactive-hover-button:active .interactive-hover-reveal {
  opacity: 1;
  transform: translateX(0);
}

.interactive-hover-button:hover .interactive-hover-orb,
.interactive-hover-button:focus-visible .interactive-hover-orb,
.interactive-hover-button:active .interactive-hover-orb {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: scale(1.8);
}

.interactive-hover-button:active {
  transform: scale(0.98);
}

.interactive-hover-button svg {
  width: 16px;
  height: 16px;
}

.global-hover-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.global-hover-copy,
.global-hover-reveal {
  position: relative;
  z-index: 2;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  transition:
    transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 240ms ease;
}

.global-hover-copy {
  transform: translateX(3px);
}

.global-hover-reveal {
  position: absolute;
  inset: 0;
  z-index: 3;
  color: #151109;
  opacity: 0;
  transform: translateX(44px);
}

.global-hover-orb {
  position: absolute;
  z-index: 1;
  left: 18%;
  top: 42%;
  width: 8px;
  height: 8px;
  pointer-events: none;
  border-radius: 50%;
  background: var(--accent-primary);
  transition:
    left 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
    top 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.global-hover-button:hover .global-hover-copy,
.global-hover-button:focus-visible .global-hover-copy,
.global-hover-button:active .global-hover-copy {
  opacity: 0;
  transform: translateX(44px);
}

.global-hover-button:hover .global-hover-reveal,
.global-hover-button:focus-visible .global-hover-reveal,
.global-hover-button:active .global-hover-reveal {
  opacity: 1;
  transform: translateX(0);
}

.global-hover-button:hover .global-hover-orb,
.global-hover-button:focus-visible .global-hover-orb,
.global-hover-button:active .global-hover-orb {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: scale(1.8);
}

.global-hover-button:active {
  transform: scale(0.98);
}

.global-hover-button svg {
  width: 16px;
  height: 16px;
}

.tutorial-page-card {
  padding: 18px;
}

@media (max-width: 1180px) {
  .recent-showcase {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .dashboard-avatar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dashboard-section {
    margin-top: 26px;
  }

  .section-header {
    align-items: flex-end;
    gap: 12px;
  }

  .section-subtitle {
    margin-left: 0;
    font-size: 12px;
  }

  .section-header .btn-sm {
    min-height: 44px;
    padding-inline: 15px;
  }

  .dashboard-tutorial-frame {
    border-radius: 12px;
  }

  .dashboard-tutorial-placeholder > span:last-child {
    display: none;
  }

  .dashboard-tutorial-icon {
    width: 48px;
    height: 48px;
  }

  .recent-showcase {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 3px 3px 10px;
    scroll-snap-type: x mandatory;
  }

  .recent-feature-card {
    min-width: min(58vw, 210px);
    min-height: 0;
    scroll-snap-align: start;
  }

  .recent-destination-content {
    padding: 20px 17px 17px;
  }

  .recent-destination-summary {
    display: none;
  }

  .recent-feature-card .recent-destination-title {
    font-size: 19px;
  }

  .recent-history-card {
    min-width: min(58vw, 210px);
    min-height: 0;
    scroll-snap-align: start;
  }

  .recent-history-card .recent-destination-title {
    font-size: 16px;
  }

  .dashboard-avatar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }

  .dashboard-avatar-slot {
    min-height: 0;
    border-radius: 10px !important;
  }

  .dashboard-avatar-media {
    min-height: 0;
  }

  .dashboard-avatar-content .recent-destination-title {
    font-size: 12px;
  }

  .dashboard-avatar-content .recent-destination-kicker {
    font-size: 9px;
  }

  .dashboard-avatar-slot.is-placeholder {
    gap: 8px;
    font-size: 11px;
  }

  .dashboard-avatar-placeholder-icon {
    width: 38px;
    height: 38px;
  }

  .interactive-hover-button {
    min-width: 122px;
  }

  .recent-create-card,
  .recent-work-placeholder {
    min-width: min(58vw, 210px);
    scroll-snap-align: start;
  }

  .dashboard-voice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .recent-feature-card,
  .recent-history-card,
  .dashboard-avatar-slot,
  .dashboard-voice-card,
  .btn,
  .interactive-hover-copy,
  .interactive-hover-reveal,
  .interactive-hover-orb {
    transition: none !important;
  }

  .global-hover-copy,
  .global-hover-reveal,
  .global-hover-orb {
    transition: none !important;
  }

}

/* ===== Web authentication shell ===== */

body.web-auth-active {
  overflow: hidden;
}

.web-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 28px 20px;
  overflow: hidden auto;
  color: #f6f2ff;
  background:
    radial-gradient(circle at 50% -8%, rgba(124, 58, 237, 0.22), transparent 42%),
    radial-gradient(circle at 9% 92%, rgba(79, 70, 229, 0.15), transparent 39%),
    linear-gradient(145deg, #07060a 0%, #0c0912 48%, #050508 100%);
  opacity: 0;
  transition: opacity 220ms ease;
}

.web-auth-gate.is-visible {
  display: flex;
  opacity: 1;
}

.web-auth-ambient {
  position: absolute;
  width: min(62vw, 760px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.3;
  pointer-events: none;
  animation: web-auth-drift 13s ease-in-out infinite alternate;
}

.web-auth-ambient-top {
  top: -42%;
  right: -12%;
  background: rgba(139, 92, 246, 0.34);
}

.web-auth-ambient-bottom {
  left: -22%;
  bottom: -55%;
  background: rgba(67, 56, 202, 0.28);
  animation-delay: -6s;
}

.web-auth-noise {
  position: absolute;
  inset: 0;
  opacity: 0.11;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.web-auth-card-wrap {
  --auth-rotate-x: 0deg;
  --auth-rotate-y: 0deg;
  --auth-glow-x: 50%;
  --auth-glow-y: 24%;
  position: relative;
  width: min(100%, 460px);
  padding: 1px;
  border-radius: 25px;
  background: linear-gradient(135deg, rgba(196, 181, 253, 0.58), rgba(109, 40, 217, 0.12) 38%, rgba(255, 255, 255, 0.14) 74%, rgba(124, 58, 237, 0.4));
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.62),
    0 0 80px rgba(109, 40, 217, 0.13);
  transform: perspective(1100px) rotateX(var(--auth-rotate-x)) rotateY(var(--auth-rotate-y));
  transform-style: preserve-3d;
  transition: transform 180ms ease, box-shadow 220ms ease;
  isolation: isolate;
}

.web-auth-card-wrap::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: 24px;
  pointer-events: none;
  background: radial-gradient(circle at var(--auth-glow-x) var(--auth-glow-y), rgba(167, 139, 250, 0.15), transparent 38%);
}

.web-auth-card-beam {
  position: absolute;
  inset: -2px;
  z-index: -2;
  overflow: hidden;
  border-radius: 27px;
  pointer-events: none;
}

.web-auth-card-beam::before {
  content: "";
  position: absolute;
  width: 44%;
  height: 180%;
  left: -10%;
  top: -42%;
  background: linear-gradient(90deg, transparent, rgba(196, 181, 253, 0.82), transparent);
  filter: blur(5px);
  transform-origin: 140% 50%;
  animation: web-auth-beam 7s linear infinite;
}

.web-auth-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 17px;
  width: 100%;
  padding: 38px 38px 31px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(24, 20, 33, 0.91), rgba(10, 8, 15, 0.96));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(26px) saturate(130%);
  -webkit-backdrop-filter: blur(26px) saturate(130%);
}

.web-auth-brand {
  margin-bottom: 5px;
  text-align: center;
}

.web-auth-logo {
  width: 84px;
  height: 84px;
  margin: 0 auto 15px;
  filter: drop-shadow(0 14px 28px rgba(76, 29, 149, 0.26));
}

.web-auth-logo .product-brand-logo {
  width: 84px;
  height: 84px;
}

.web-auth-eyebrow {
  margin-bottom: 7px;
  color: #a994d4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.23em;
}

.web-auth-brand h1 {
  margin: 0;
  color: #fbfaff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.web-auth-brand p {
  margin: 9px 0 0;
  color: #8e879d;
  font-size: 13px;
  line-height: 1.6;
}

.web-auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #c7c0d2;
  font-size: 12px;
  font-weight: 600;
}

.web-auth-input-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 47px;
  padding: 0 14px;
  border: 1px solid rgba(163, 142, 196, 0.2);
  border-radius: 12px;
  background: rgba(6, 5, 9, 0.52);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.web-auth-input-shell:focus-within {
  border-color: rgba(167, 139, 250, 0.76);
  background: rgba(10, 7, 15, 0.75);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12), 0 8px 24px rgba(0, 0, 0, 0.18);
}

.web-auth-input-shell > svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: #8f7bab;
}

.web-auth-input-shell input {
  width: 100%;
  min-width: 0;
  height: 45px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #f5f1fb;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 14px;
}

.web-auth-input-shell input::placeholder {
  color: #635c6e;
}

.web-auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

.web-auth-send-code {
  min-height: 47px;
  padding: 0 12px;
  border: 1px solid rgba(167, 139, 250, 0.32);
  border-radius: 12px;
  color: #d9cded;
  background: rgba(124, 58, 237, 0.12);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.web-auth-send-code:hover:not(:disabled) {
  border-color: rgba(196, 181, 253, 0.72);
  color: #fff;
  background: rgba(124, 58, 237, 0.23);
}

.web-auth-send-code:disabled {
  color: #71697c;
  cursor: wait;
  opacity: 0.76;
}

.web-auth-remember {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  color: #8f8899;
  font-size: 12px;
  cursor: pointer;
}

.web-auth-remember input {
  width: 15px;
  height: 15px;
  accent-color: #8b5cf6;
}

.web-auth-status {
  min-height: 18px;
  margin: -3px 0;
  color: #8f8899;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.web-auth-status.is-error {
  color: #fb7185;
}

.web-auth-status.is-success {
  color: #86efac;
}

.web-auth-status.is-pending {
  color: #c4b5fd;
}

.web-auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 49px;
  border: 1px solid rgba(196, 181, 253, 0.5);
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(110deg, #6d28d9, #8b5cf6 52%, #6d28d9);
  background-size: 180% 100%;
  box-shadow: 0 13px 32px rgba(91, 33, 182, 0.27);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-position 220ms ease;
}

.web-auth-submit:hover:not(:disabled) {
  background-position: 100% 0;
  box-shadow: 0 17px 38px rgba(91, 33, 182, 0.36);
  transform: translateY(-1px);
}

.web-auth-submit:disabled {
  cursor: wait;
  opacity: 0.74;
}

.web-auth-submit svg {
  width: 17px;
  height: 17px;
}

.web-auth-submit.is-loading svg {
  animation: web-auth-pulse 900ms ease-in-out infinite alternate;
}

.web-auth-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  color: #6f6879;
  font-size: 10px;
}

.web-auth-security-note svg {
  width: 12px;
  height: 12px;
}

/* Web keeps the publishing entry discoverable while making its limitation clear. */
.nav-item.nav-item-desktop-only {
  color: #746f7c !important;
  background: rgba(255, 255, 255, 0.018) !important;
  filter: saturate(0.15);
  cursor: pointer !important;
}

.nav-item.nav-item-desktop-only:hover {
  color: #9a93a4 !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

.nav-item.nav-item-desktop-only::after {
  content: "桌面端";
  margin-left: auto;
  padding: 2px 6px;
  border: 1px solid rgba(154, 147, 164, 0.19);
  border-radius: 999px;
  color: #77717f;
  font-size: 9px;
  line-height: 1.4;
}

.web-publish-desktop-only {
  position: relative;
  opacity: 0.48 !important;
  filter: grayscale(1) saturate(0.1);
  cursor: pointer !important;
}

.web-publish-desktop-only *,
.web-publish-desktop-only input,
.web-publish-desktop-only button {
  cursor: pointer !important;
}

.web-publish-desktop-only input {
  pointer-events: none;
}

.btn.web-publish-desktop-only {
  color: #8c8791 !important;
  background: #2a2830 !important;
  border-color: #47434f !important;
  box-shadow: none !important;
}

.btn.web-publish-desktop-only:hover {
  color: #aaa4b0 !important;
  background: #333039 !important;
  border-color: #55505e !important;
  transform: none !important;
}

.web-desktop-only-notice {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 21000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 17px;
  border: 1px solid rgba(221, 179, 79, 0.36);
  border-radius: 12px;
  color: #eee8d8;
  background: rgba(20, 18, 24, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.web-desktop-only-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.web-desktop-only-notice > span {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid rgba(221, 179, 79, 0.6);
  border-radius: 50%;
  color: #ddb34f;
  font: 700 11px/1 serif;
}

.web-desktop-only-notice strong {
  font-size: 13px;
  font-weight: 600;
}

@keyframes web-auth-drift {
  to {
    transform: translate3d(7%, -5%, 0) scale(1.08);
  }
}

@keyframes web-auth-beam {
  to {
    transform: rotate(360deg);
  }
}

@keyframes web-auth-pulse {
  to {
    transform: translateX(3px);
  }
}

@media (max-width: 560px) {
  .web-auth-gate {
    align-items: flex-start;
    padding: max(18px, env(safe-area-inset-top)) 13px max(18px, env(safe-area-inset-bottom));
  }

  .web-auth-card-wrap {
    margin: auto 0;
    border-radius: 22px;
  }

  .web-auth-card {
    padding: 29px 21px 24px;
    border-radius: 21px;
  }

  .web-auth-brand h1 {
    font-size: 21px;
  }

  .web-auth-code-row {
    grid-template-columns: minmax(0, 1fr) 108px;
  }

  .web-auth-send-code {
    padding: 0 8px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .web-auth-ambient,
  .web-auth-card-beam::before,
  .web-auth-submit.is-loading svg {
    animation: none !important;
  }

  .web-auth-card-wrap,
  .web-auth-gate,
  .web-desktop-only-notice {
    transition: none !important;
  }
}

/* Mobile homepage adaptation v2 */
.mobile-tutorial-trigger,
.mobile-more-tools {
  display: none;
}

.tutorial-video-player {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: #030405;
}

.tutorial-video-dialog {
  width: min(760px, calc(100vw - 40px));
  max-width: none;
  padding: 0;
  border: 1px solid rgba(221, 179, 79, 0.32);
  border-radius: 22px;
  color: var(--text-primary);
  background: #0d0e12;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}

.tutorial-video-dialog::backdrop {
  background: rgba(2, 3, 5, 0.82);
  backdrop-filter: blur(8px);
}

.tutorial-video-dialog-panel {
  overflow: hidden;
  border-radius: inherit;
}

.tutorial-video-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(221, 179, 79, 0.16);
}

.tutorial-video-dialog-header h2,
.tutorial-video-dialog-header p {
  margin: 0;
}

.tutorial-video-dialog-header h2 {
  font-size: 18px;
}

.tutorial-video-dialog-header p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.tutorial-video-dialog-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  background: var(--surface-2);
  cursor: pointer;
}

.tutorial-video-dialog-close svg {
  width: 18px;
  height: 18px;
}

.tutorial-video-dialog-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #030405;
}

.tutorial-dialog-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted);
  background:
    radial-gradient(circle at 50% 35%, rgba(139, 92, 246, 0.16), transparent 42%),
    #07080b;
}

.tutorial-dialog-placeholder[hidden] {
  display: none;
}

.tutorial-dialog-placeholder strong {
  color: var(--text-primary);
  font-size: 15px;
}

.tutorial-dialog-placeholder > span:last-child {
  font-size: 12px;
}

@media (max-width: 720px) {
  #page-dashboard {
    --mobile-preview-columns: 3;
  }

  #page-dashboard #hero-assistant-zone {
    display: none !important;
  }

  .mobile-tutorial-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    margin-top: 14px;
    padding: 0 16px;
    border: 1px solid rgba(221, 179, 79, 0.22);
    border-radius: 999px;
    color: rgba(238, 232, 216, 0.82);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 750;
  }

  .mobile-tutorial-trigger svg {
    width: 17px;
    height: 17px;
  }

  .recent-showcase {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 16px) / var(--mobile-preview-columns));
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .recent-showcase::-webkit-scrollbar {
    display: none;
  }

  .recent-history-card,
  .recent-create-card,
  .recent-work-placeholder,
  .recent-showcase-skeleton {
    min-width: 0 !important;
    scroll-snap-align: start;
  }

  .recent-history-card .recent-destination-content {
    padding: 8px;
  }

  .recent-card-delete {
    top: 6px;
    right: 6px;
    width: 36px;
    height: 36px;
    opacity: 1;
    transform: none;
  }

  .recent-preview-state {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
  }

  .recent-preview-state span,
  .recent-card-time,
  .recent-create-card > span:not(.recent-create-icon) {
    display: none;
  }

  .recent-history-card .recent-destination-title {
    overflow: hidden;
    font-size: 11px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .recent-create-card {
    gap: 7px;
    padding: 8px;
    font-size: 11px;
    text-align: center;
  }

  .recent-create-icon {
    width: 32px;
    height: 32px;
  }

  .dashboard-avatar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .dashboard-avatar-slot:nth-child(n + 4) {
    display: none;
  }

  .dashboard-avatar-slot {
    min-height: 118px;
    padding: 8px;
  }

  .dashboard-avatar-slot span {
    font-size: 11px;
  }

  .subtitle-style-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .subtitle-style-name {
    min-height: 48px;
    padding: 7px 6px;
  }

  .subtitle-style-name strong {
    font-size: 11px;
    line-height: 1.25;
  }

  .subtitle-style-name span {
    display: none;
  }

  .subtitle-style-badge {
    top: 5px;
    right: 5px;
    padding: 1px 4px;
    font-size: 8px;
  }

  .mobile-more-tools {
    display: block;
  }

  .mobile-more-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-more-tool {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 14px;
    align-items: center;
    gap: 9px;
    min-height: 68px;
    padding: 10px;
    border: 1px solid rgba(221, 179, 79, 0.18);
    border-radius: 14px;
    color: var(--text-primary);
    text-align: left;
    background: linear-gradient(145deg, rgba(19, 20, 25, 0.98), rgba(13, 14, 18, 0.98));
  }

  .mobile-more-tool-featured {
    grid-column: 1 / -1;
    border-color: rgba(221, 179, 79, 0.32);
    background:
      linear-gradient(100deg, rgba(221, 179, 79, 0.1), transparent 54%),
      linear-gradient(145deg, rgba(19, 20, 25, 0.98), rgba(13, 14, 18, 0.98));
  }

  .mobile-more-tool-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(221, 179, 79, 0.25);
    border-radius: 11px;
    color: var(--gold, #ddb34f);
    background: rgba(221, 179, 79, 0.08);
  }

  .mobile-more-tool-icon svg {
    width: 17px;
    height: 17px;
  }

  .mobile-more-tool-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
  }

  .mobile-more-tool-copy strong {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-more-tool-copy small {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 9px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-more-tool-arrow {
    width: 14px;
    height: 14px;
    color: rgba(221, 179, 79, 0.68);
  }

  .tutorial-video-dialog {
    width: calc(100vw - 24px);
    border-radius: 18px;
  }

  .tutorial-video-dialog-header {
    padding: 14px;
  }

  .tutorial-video-dialog-header h2 {
    font-size: 16px;
  }

  .tutorial-video-dialog-close {
    width: 44px;
    height: 44px;
  }

  .tutorial-dialog-placeholder strong {
    font-size: 13px;
  }

  .tutorial-dialog-placeholder > span:last-child {
    font-size: 10px;
  }
}

/* Mobile wizard containment and compact avatar selection */
@media (max-width: 720px) {
  #page-wizard .wizard-stepper {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  #page-wizard .wizard-stepper::-webkit-scrollbar {
    display: none;
  }

  #page-wizard .wizard-step {
    scroll-snap-align: start;
  }

  #page-wizard .avatar-card-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #page-wizard .avatar-card {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 10px;
  }

  #page-wizard .avatar-card-id {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 12px;
  }
}

/* Wizard generation-engine flip cards */
#wiz-engine-grid {
  grid-template-columns: repeat(2, minmax(260px, 340px));
  justify-content: start;
  gap: 16px;
}

#wiz-engine-grid .engine-flip-card,
#wiz-engine-grid .engine-flip-card:hover,
#wiz-engine-grid .engine-flip-card.active {
  display: block;
  min-width: 0;
  min-height: 240px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: var(--text-primary);
  background: transparent;
  box-shadow: none;
  transform: none;
  perspective: 1000px;
}

.engine-flip-card-inner {
  position: relative;
  width: 100%;
  height: 240px;
  transform-style: preserve-3d;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.engine-flip-card.is-flipped .engine-flip-card-inner {
  transform: rotateY(180deg);
}

.engine-flip-card-face {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 24px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  color: var(--text-primary);
  background: var(--bg-elevated);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.engine-flip-card-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  cursor: pointer;
}

.engine-flip-card-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  transform: rotateY(180deg);
  pointer-events: none;
}

.engine-flip-card.is-flipped .engine-flip-card-front {
  pointer-events: none;
}

.engine-flip-card.is-flipped .engine-flip-card-back {
  pointer-events: auto;
}

.engine-flip-card-icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 1px solid rgba(221, 179, 79, 0.36);
  border-radius: 12px;
  color: var(--accent-primary);
  background: rgba(221, 179, 79, 0.08);
}

.engine-flip-card-icon svg {
  width: 34px;
  height: 34px;
  stroke-width: 1.7;
}

.engine-flip-card-label {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 760;
  text-wrap: balance;
}

.engine-flip-card-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.engine-flip-card-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
}

.engine-flip-card-hint svg {
  width: 14px;
  height: 14px;
}

.engine-flip-card-back strong {
  font-size: 18px;
  line-height: 1.3;
}

.engine-flip-card-back p {
  max-width: 31ch;
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.75;
  text-wrap: pretty;
}

.engine-flip-card-confirm {
  display: inline-flex;
  min-width: 150px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border: 0;
  border-radius: 8px;
  color: #17130a;
  background: var(--accent-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.engine-flip-card-confirm svg {
  width: 17px;
  height: 17px;
}

.engine-flip-card-confirm:hover {
  background: var(--accent-secondary);
}

.engine-flip-card-confirm:disabled {
  opacity: 0.62;
  cursor: wait;
}

.engine-flip-card-front:focus-visible,
.engine-flip-card-confirm:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 3px;
}

.engine-selected-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--accent-secondary);
  background: rgba(221, 179, 79, 0.1);
  font-size: 10px;
  font-weight: 700;
}

.engine-selected-badge svg {
  width: 12px;
  height: 12px;
}

.engine-flip-card.active .engine-selected-badge {
  display: inline-flex;
}

.engine-recommended-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #17130a;
  background: var(--accent-primary);
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.engine-flip-card.active .engine-flip-card-face {
  border-color: var(--accent-primary);
  box-shadow: inset 0 0 0 1px rgba(221, 179, 79, 0.26);
}

@media (hover: hover) and (pointer: fine) {
  .engine-flip-card:hover .engine-flip-card-inner {
    transform: rotateY(180deg);
  }

  .engine-flip-card:hover .engine-flip-card-front {
    pointer-events: none;
  }

  .engine-flip-card:hover .engine-flip-card-back {
    pointer-events: auto;
  }
}

@media (max-width: 720px) {
  #wiz-engine-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  #wiz-engine-grid .engine-flip-card,
  #wiz-engine-grid .engine-flip-card:hover,
  #wiz-engine-grid .engine-flip-card.active,
  .engine-flip-card-inner {
    min-height: 228px;
    height: 228px;
  }

  .engine-flip-card-face {
    padding: 20px;
  }

  .engine-flip-card-icon {
    width: 58px;
    height: 58px;
  }

  .engine-flip-card-icon svg {
    width: 30px;
    height: 30px;
  }

  .engine-flip-card-label {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .engine-flip-card-inner {
    transition: none;
  }
}

/* 开始创作 · 发布目标与流水线：并排紧凑展示，生成动作统一留在向导底栏 */
.wizard-action-row {
  display: grid;
  width: min(100%, 1240px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

#wizard-panel-5 .wizard-publish-card {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: var(--bg-surface);
}

#wizard-panel-5 .wizard-pipeline-card {
  min-width: 0;
  margin: 0;
  padding: 16px;
}

#wizard-panel-5 .wizard-pipeline-card .card-header {
  margin-bottom: 12px;
}

#wizard-panel-5 .wizard-pipeline-compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#wizard-panel-5 .wizard-pipeline-compact .pipeline-step {
  min-width: 0;
  gap: 10px;
  padding: 9px 11px;
}

#wizard-panel-5 .wizard-pipeline-compact .step-icon {
  width: 28px;
  height: 28px;
  border-width: 1px;
}

#wizard-panel-5 .wizard-pipeline-compact .step-info {
  min-width: 0;
}

#wizard-panel-5 .wizard-pipeline-compact .step-name,
#wizard-panel-5 .wizard-pipeline-compact .step-status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#wizard-panel-5 .wizard-pipeline-compact .step-name {
  font-size: 13px;
}

#wizard-panel-5 .wizard-pipeline-compact .step-status {
  font-size: 11px;
}

.wizard-publish-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.wizard-publish-description {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.wizard-publish-manage {
  display: inline-flex;
  min-height: 38px;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-secondary);
  background: transparent;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.wizard-publish-manage svg {
  width: 14px;
  height: 14px;
}

.wizard-publish-manage:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.wizard-publish-targets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 206px;
  overflow: auto;
  overscroll-behavior: contain;
}

.wizard-publish-target {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 58px;
  grid-template-columns: 32px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.wizard-publish-target:hover {
  border-color: var(--border-strong);
}

.wizard-publish-target:has(input:checked) {
  border-color: var(--accent-primary);
  background: rgba(221, 179, 79, 0.08);
}

.wizard-publish-target:has(input:focus-visible) {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.wizard-publish-target > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.wizard-publish-platform-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: rgba(221, 179, 79, 0.09);
  font-size: 16px;
}

.wizard-publish-target-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.wizard-publish-target-copy strong,
.wizard-publish-target-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wizard-publish-target-copy strong {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
}

.wizard-publish-target-copy small {
  color: var(--text-muted);
  font-size: 10px;
}

.wizard-publish-check {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: transparent;
}

.wizard-publish-check svg {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

.wizard-publish-target:has(input:checked) .wizard-publish-check {
  border-color: var(--accent-primary);
  color: var(--text-inverse);
  background: var(--accent-primary);
}

.wizard-publish-state,
.wizard-publish-empty,
.wizard-publish-unavailable {
  grid-column: 1 / -1;
  display: flex;
  min-height: 64px;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px dashed var(--border-default);
  border-radius: 9px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  font: inherit;
  font-size: 12px;
  text-align: left;
}

button.wizard-publish-empty,
button.wizard-publish-unavailable {
  cursor: pointer;
}

.wizard-publish-empty > svg,
.wizard-publish-unavailable > svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.wizard-publish-empty > span,
.wizard-publish-unavailable > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wizard-publish-empty strong,
.wizard-publish-unavailable strong {
  color: var(--text-secondary);
  font-size: 12px;
}

.wizard-publish-empty small,
.wizard-publish-unavailable small {
  color: var(--text-muted);
  font-size: 10px;
}

.wizard-publish-foot {
  display: flex;
  min-height: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 11px;
}

.wizard-publish-desktop-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.wizard-publish-desktop-note svg {
  width: 13px;
  height: 13px;
}

#wizard-panel-5 .wizard-publish-card.is-unavailable,
#wizard-panel-5 .wizard-publish-card.web-publish-desktop-only {
  filter: grayscale(0.8);
  opacity: 0.72;
}

@media (max-width: 900px) {
  .wizard-action-row {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  #wizard-panel-5 .wizard-publish-card {
    width: 100%;
    gap: 10px;
    padding: 14px;
  }

  .wizard-publish-header {
    gap: 10px;
  }

  .wizard-publish-targets {
    grid-template-columns: minmax(0, 1fr);
    max-height: 236px;
  }

  .wizard-publish-target {
    min-height: 54px;
  }

  .wizard-publish-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  #wizard-panel-5 .wizard-pipeline-compact {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* TTS capability-aware voice settings and reusable full narration */
.tts-model-notice {
  padding: 14px 16px;
  margin-bottom: 20px;
  border: 1px solid rgba(221, 179, 79, 0.35);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(221, 179, 79, 0.12), rgba(125, 77, 255, 0.06));
}

.tts-model-inline {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.tts-model-notice-label {
  color: var(--text-muted);
  font-size: 12px;
}

.tts-model-notice strong {
  color: var(--accent-gold, #ddb34f);
}

.tts-model-switch-hint {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.tts-model-summary {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.form-group.is-disabled {
  opacity: 0.55;
}

.form-group.is-disabled .tts-control-hint {
  color: #d4a94d;
}

.tts-control-hint {
  min-height: 18px;
  margin-top: 7px;
  line-height: 1.45;
}

.tts-emotion-mobile-select {
  display: none;
  width: 100%;
}

.tts-voice-instruction-group[hidden] {
  display: none;
}

.tts-direct-music-group[hidden] {
  display: none;
}

.tts-direct-music-group {
  padding: 14px 16px;
  border: 1px solid rgba(221, 179, 79, 0.24);
  border-radius: 12px;
  background: rgba(221, 179, 79, 0.06);
}

.tts-direct-music-hint {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

.tts-guidance-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tts-guidance-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid rgba(221, 179, 79, 0.46);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(221, 179, 79, 0.18), rgba(138, 109, 63, 0.08)),
    rgba(17, 16, 14, 0.68);
  color: #e7c86d;
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 181, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.tts-guidance-chip:hover,
.tts-guidance-chip.is-active {
  border-color: rgba(231, 200, 109, 0.88);
  background:
    linear-gradient(135deg, rgba(231, 200, 109, 0.34), rgba(154, 113, 35, 0.16)),
    rgba(20, 18, 14, 0.78);
  color: #ffe29a;
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 191, 0.15),
    0 0 0 2px rgba(221, 179, 79, 0.08),
    0 7px 18px rgba(0, 0, 0, 0.2);
}

#wiz-voice-instruction {
  min-height: 82px;
  resize: vertical;
}

@media (max-width: 768px) {
  #wiz-emotion-grid {
    display: none;
  }

  .tts-emotion-mobile-select {
    display: block;
    min-height: 44px;
    padding: 10px 40px 10px 14px;
    border-color: rgba(221, 179, 79, 0.34);
    border-radius: 10px;
    background-color: rgba(12, 12, 15, 0.96);
    color: var(--text-primary);
    font-size: 15px;
  }
}

.voice-sample-tips {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.8;
}

.voiceover-preview-card .card-header {
  align-items: flex-start;
}

.voiceover-preview-card .card-header > div:first-child {
  display: grid;
  gap: 6px;
}

.voiceover-preview-hint {
  color: #ddb34f;
  font-size: 12px;
  line-height: 1.65;
}

.voiceover-preview-actions,
.voiceover-task-heading,
.voiceover-task-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.voiceover-preview-actions {
  margin: 6px 0 18px;
  flex-wrap: wrap;
}

.voiceover-preview-status {
  color: var(--text-muted);
  font-size: 13px;
}

.voiceover-current {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.4fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(221, 179, 79, 0.42);
  border-radius: 12px;
  background: rgba(221, 179, 79, 0.07);
}

.voiceover-current[hidden] {
  display: none;
}

.voiceover-current-meta,
.voiceover-task-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.voiceover-current-meta strong,
.voiceover-task-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voiceover-current-meta span,
.voiceover-task-copy span {
  color: var(--text-muted);
  font-size: 12px;
}

.voiceover-current audio,
.voiceover-task-item audio {
  width: 100%;
  min-width: 220px;
  height: 36px;
}

.voiceover-task-section {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.voiceover-task-heading {
  justify-content: space-between;
  margin-bottom: 10px;
}

.voiceover-task-list {
  display: grid;
  gap: 10px;
}

.voiceover-task-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.25fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.015);
}

.voiceover-task-item.is-selected {
  border-color: rgba(221, 179, 79, 0.65);
  box-shadow: inset 3px 0 0 #ddb34f;
}

.empty-state.compact {
  padding: 18px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .voiceover-current,
  .voiceover-task-item {
    grid-template-columns: 1fr;
  }

  .voiceover-current audio,
  .voiceover-task-item audio {
    min-width: 0;
  }

  .voiceover-task-buttons {
    flex-wrap: wrap;
  }
}

.voiceover-current {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.voiceover-current[hidden] {
  display: none;
}

.voiceover-task-list {
  grid-template-columns: repeat(auto-fill, minmax(280px, 304px));
  align-items: stretch;
  justify-content: start;
}

.voice-testimonial-card,
.voice-testimonial-card.voiceover-task-item {
  display: flex;
  width: 100%;
  max-width: 304px;
  aspect-ratio: 1 / 1;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(221, 179, 79, 0.34);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 0%, rgba(118, 72, 186, 0.18), transparent 42%),
    linear-gradient(145deg, rgba(24, 22, 30, 0.98), rgba(11, 11, 15, 0.98));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
}

.voice-testimonial-card.is-selected {
  border-color: rgba(221, 179, 79, 0.72);
  box-shadow:
    inset 3px 0 0 #ddb34f,
    0 16px 42px rgba(0, 0, 0, 0.24);
}

.voice-testimonial-card.is-compact {
  gap: 10px;
  padding: 14px;
}

.voice-testimonial-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.voice-testimonial-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
}

.voice-testimonial-card.is-compact .voice-testimonial-avatar {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
}

.voice-testimonial-identity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.voice-testimonial-identity strong {
  color: var(--text-primary);
  font-size: 16px;
  letter-spacing: 0.02em;
}

.voice-testimonial-identity span,
.voice-testimonial-duration,
.voice-testimonial-time {
  color: var(--text-muted);
  font-size: 12px;
}

.voice-testimonial-duration {
  margin-left: auto;
  padding: 5px 9px;
  border: 1px solid rgba(221, 179, 79, 0.26);
  border-radius: 999px;
  color: #e7c870;
  background: rgba(221, 179, 79, 0.08);
  white-space: nowrap;
}

.voice-testimonial-copy {
  display: -webkit-box;
  height: 66px;
  min-height: 66px;
  max-height: 66px;
  margin: 0;
  overflow: hidden;
  color: rgba(244, 241, 235, 0.9);
  font-size: 14px;
  line-height: 1.75;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.voice-testimonial-card.is-compact .voice-testimonial-copy {
  -webkit-line-clamp: 4;
}

.voice-testimonial-player {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.voice-testimonial-toggle {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  place-items: center;
  color: #171319;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.voice-testimonial-toggle:hover {
  transform: scale(1.05);
  background: #fff;
}

.voice-testimonial-toggle svg {
  width: 21px;
  height: 21px;
}

.voice-testimonial-wave {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  height: 34px;
  overflow: hidden;
}

.voice-testimonial-wave span {
  width: 3px;
  height: var(--wave-height);
  flex: 0 0 3px;
  border-radius: 999px;
  background: rgba(238, 223, 190, 0.48);
  transform-origin: center;
}

.voice-testimonial-card.is-playing .voice-testimonial-wave span {
  animation: voice-testimonial-pulse 0.72s ease-in-out infinite alternate;
  animation-delay: calc(var(--wave-delay) * -1);
}

.voice-testimonial-player audio {
  display: none;
}

.voice-testimonial-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 32px;
  margin-top: auto;
  flex-wrap: wrap;
}

.voice-testimonial-time {
  width: 100%;
}

.voiceover-task-buttons {
  width: 100%;
  gap: 7px;
  flex-wrap: wrap;
}

.voiceover-task-buttons .btn {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1;
}

.voiceover-task-buttons .btn svg {
  width: 14px;
  height: 14px;
}

.voiceover-compatibility {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(221, 179, 79, 0.2);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.voiceover-compatibility.is-current {
  color: #e7c870;
  border-color: rgba(221, 179, 79, 0.42);
  background: rgba(221, 179, 79, 0.09);
}

.voiceover-delete-btn:hover {
  color: #ff918b;
  border-color: rgba(255, 112, 102, 0.48);
}

.voiceover-current .voice-testimonial-card {
  margin-bottom: 20px;
}

.voice-current-player {
  width: min(100%, 560px);
  margin: 0 auto 24px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.voice-current-player-button {
  display: flex;
  width: 100%;
  min-height: 236px;
  align-items: center;
  padding: 24px 28px 20px;
  border: 0;
  flex-direction: column;
  color: var(--text-primary);
  background: transparent;
  cursor: pointer;
  font: inherit;
  transition: background 0.2s ease;
}

.voice-current-player-button:hover {
  background: transparent;
}

.voice-current-player-button:focus-visible {
  outline: 0;
}

.voice-current-player-button:focus-visible .voice-current-player-icon {
  box-shadow: 0 0 0 2px #e0b84f;
}

.voice-current-player-icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin-bottom: 12px;
  border: 1px solid rgba(221, 179, 79, 0.34);
  border-radius: 18px;
  place-items: center;
  color: #edc75e;
  background: rgba(221, 179, 79, 0.09);
  transition: transform 0.2s ease, background 0.2s ease;
}

.voice-current-player-icon svg {
  width: 29px;
  height: 29px;
}

.voice-current-player.is-playing .voice-current-player-icon {
  transform: scale(1.04);
  background: rgba(221, 179, 79, 0.17);
}

.voice-current-player-name {
  max-width: 100%;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-current-player-meta {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.voice-current-player-time {
  margin-top: 12px;
  color: rgba(238, 223, 190, 0.72);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.voice-current-player-wave {
  display: flex;
  width: min(100%, 360px);
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 7px;
  overflow: hidden;
}

.voice-current-player-wave span {
  width: 3px;
  height: var(--wave-height);
  flex: 0 0 3px;
  border-radius: 999px;
  background: rgba(238, 223, 190, 0.38);
  transform-origin: center;
}

.voice-current-player.is-playing .voice-current-player-wave span {
  animation: voice-testimonial-pulse 0.72s ease-in-out infinite alternate;
  animation-delay: calc(var(--wave-delay) * -1);
}

.voice-current-player-state {
  min-height: 18px;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.voice-current-player-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 20px 0;
  border-top: 0;
}

.voice-current-player audio {
  display: none;
}

@keyframes voice-testimonial-pulse {
  from { transform: scaleY(0.42); opacity: 0.54; }
  to { transform: scaleY(1.12); opacity: 1; }
}

@media (max-width: 680px) {
  .voiceover-task-list {
    grid-template-columns: 1fr;
  }

  .voice-testimonial-card,
  .voice-testimonial-card.voiceover-task-item {
    padding: 14px;
  }

  .voice-testimonial-wave {
    gap: 2px;
  }

  .voice-testimonial-wave span:nth-child(n+23) {
    display: none;
  }

  .voice-testimonial-actions {
    align-items: center;
    flex-direction: row;
  }

  .voice-testimonial-time {
    width: 100%;
  }

  .voice-current-player-button {
    min-height: 220px;
    padding-inline: 18px;
  }

  .voice-current-player-wave {
    gap: 2px;
  }

  .voice-current-player-wave span:nth-child(n+35) {
    display: none;
  }
}

/* Registered voices share the same compact mobile card contract as the Mini Program. */
#voices-grid > .asset-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

#voices-grid .asset-id {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-asset-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.voice-asset-actions .btn {
  min-width: 0;
  flex: 1 1 82px;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 768px) {
  #voices-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  #voices-grid > .asset-card {
    padding: 14px;
  }

  .voice-asset-actions .btn {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 12px;
  }
}

@media (max-width: 359px) {
  #voices-grid {
    grid-template-columns: 1fr;
  }
}
