/* 石榴 AI 色调 — 对齐 app.shiliu.chat */
body.workspace-shiliu {
  --bg: #f7f8fa;
  --bg-card: #ffffff;
  --bg-elevated: #f2f3f5;
  --border: #e5e6eb;
  --text: #1d2129;
  --text-secondary: #4e5969;
  --text-muted: #86909c;
  --primary: #4080ff;
  --primary-hover: #3371e6;
  --primary-light: #e8f3ff;
  --accent: #4080ff;
  --gradient: linear-gradient(135deg, #4080ff 0%, #6aa1ff 100%);
  --gradient-soft: #e8f3ff;
  --shadow: 0 2px 16px rgba(29, 33, 41, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --gold: linear-gradient(135deg, #ffe7a3 0%, #f5c842 50%, #e8a317 100%);
  --font: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body.workspace-shiliu .bg-glow { display: none; }

body.workspace-shiliu .workspace { min-height: 100vh; }

/* 侧栏 — 高级彩色导航 */
body.workspace-shiliu .sidebar {
  width: 220px;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 45%, #f3f6fc 100%);
  border-right: 1px solid rgba(64, 128, 255, 0.1);
  box-shadow: 4px 0 28px rgba(29, 33, 41, 0.04);
  padding: 14px 0 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.workspace-shiliu .sidebar-logo {
  border-bottom: none;
  padding: 4px 14px 14px;
  margin-bottom: 2px;
}

body.workspace-shiliu .logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  gap: 10px;
  align-items: center;
}

body.workspace-shiliu .logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

body.workspace-shiliu .logo-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #1d2129 0%, #4e5969 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.workspace-shiliu .logo-sub {
  font-size: 0.625rem;
  font-weight: 500;
  color: #86909c;
  letter-spacing: 0.04em;
}

body.workspace-shiliu .logo-icon {
  background: linear-gradient(145deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
  border-radius: 11px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

body.workspace-shiliu .ws-create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 12px 14px;
  padding: 11px 14px;
  background: linear-gradient(135deg, #4080ff 0%, #6366f1 55%, #7c5cff 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 6px 20px rgba(64, 128, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  letter-spacing: 0.02em;
}

body.workspace-shiliu .ws-create-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(64, 128, 255, 0.42);
}

body.workspace-shiliu .ws-create-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.workspace-shiliu .ws-create-icon svg {
  width: 16px;
  height: 16px;
}

/* 彩色导航项 */
body.workspace-shiliu .nav-link {
  --nav-accent: #4080ff;
  --nav-icon-bg: rgba(64, 128, 255, 0.12);
  --nav-icon-fg: #4080ff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin: 2px 8px;
  border-radius: 10px;
  color: #4e5969;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.12s;
  position: relative;
}

body.workspace-shiliu .nav-link--blue { --nav-accent: #4080ff; --nav-icon-bg: rgba(64,128,255,.12); --nav-icon-fg: #4080ff; }
body.workspace-shiliu .nav-link--violet { --nav-accent: #7c5cff; --nav-icon-bg: rgba(124,92,255,.12); --nav-icon-fg: #7c5cff; }
body.workspace-shiliu .nav-link--amber { --nav-accent: #ff7d00; --nav-icon-bg: rgba(255,125,0,.12); --nav-icon-fg: #ff7d00; }
body.workspace-shiliu .nav-link--pink { --nav-accent: #f759ab; --nav-icon-bg: rgba(247,89,171,.12); --nav-icon-fg: #f759ab; }
body.workspace-shiliu .nav-link--indigo { --nav-accent: #597ef7; --nav-icon-bg: rgba(89,126,247,.12); --nav-icon-fg: #597ef7; }
body.workspace-shiliu .nav-link--cyan { --nav-accent: #13c2c2; --nav-icon-bg: rgba(19,194,194,.12); --nav-icon-fg: #13c2c2; }
body.workspace-shiliu .nav-link--teal { --nav-accent: #36cfc9; --nav-icon-bg: rgba(54,207,201,.12); --nav-icon-fg: #36cfc9; }
body.workspace-shiliu .nav-link--green { --nav-accent: #52c41a; --nav-icon-bg: rgba(82,196,26,.12); --nav-icon-fg: #52c41a; }
body.workspace-shiliu .nav-link--coral { --nav-accent: #ff4d4f; --nav-icon-bg: rgba(255,77,79,.12); --nav-icon-fg: #ff4d4f; }
body.workspace-shiliu .nav-link--rose { --nav-accent: #eb2f96; --nav-icon-bg: rgba(235,47,150,.12); --nav-icon-fg: #eb2f96; }
body.workspace-shiliu .nav-link--sky { --nav-accent: #1890ff; --nav-icon-bg: rgba(24,144,255,.12); --nav-icon-fg: #1890ff; }
body.workspace-shiliu .nav-link--gold { --nav-accent: #faad14; --nav-icon-bg: rgba(250,173,20,.14); --nav-icon-fg: #d48806; }
body.workspace-shiliu .nav-link--purple { --nav-accent: #9254de; --nav-icon-bg: rgba(146,84,222,.12); --nav-icon-fg: #9254de; }
body.workspace-shiliu .nav-link--mint { --nav-accent: #2fc25b; --nav-icon-bg: rgba(47,194,91,.12); --nav-icon-fg: #2fc25b; }
body.workspace-shiliu .nav-link--slate { --nav-accent: #722ed1; --nav-icon-bg: rgba(114,46,209,.12); --nav-icon-fg: #722ed1; }

body.workspace-shiliu .nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--nav-icon-bg);
  color: var(--nav-icon-fg);
  transition: transform 0.15s, box-shadow 0.15s;
}

body.workspace-shiliu .nav-icon svg {
  width: 17px;
  height: 17px;
}

body.workspace-shiliu .nav-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.workspace-shiliu .sidebar-nav a,
body.workspace-shiliu .ws-subnav a,
body.workspace-shiliu .ws-lab-link a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin: 2px 8px;
  border-radius: 10px;
  color: #4e5969;
  font-size: 0.8125rem;
  transition: background 0.18s, color 0.18s;
}

body.workspace-shiliu .nav-link:hover {
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
}

body.workspace-shiliu .nav-link:hover .nav-icon {
  transform: scale(1.04);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.workspace-shiliu .nav-link.active,
body.workspace-shiliu .sidebar-nav a.active,
body.workspace-shiliu .ws-subnav a.active {
  background: linear-gradient(90deg, color-mix(in srgb, var(--nav-accent) 14%, transparent) 0%, rgba(255,255,255,.5) 100%);
  color: var(--nav-accent);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--nav-accent), 0 2px 12px rgba(0, 0, 0, 0.04);
}

body.workspace-shiliu .nav-link.active .nav-icon,
body.workspace-shiliu .sidebar-nav a.active .nav-icon {
  background: var(--nav-accent);
  color: #fff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--nav-accent) 40%, transparent);
}

body.workspace-shiliu .nav-link.sl-highlight:not(.active) {
  color: #cf1322;
}

body.workspace-shiliu .nav-link.sl-highlight:not(.active) .nav-icon {
  background: rgba(255, 77, 79, 0.14);
  color: #ff4d4f;
}

body.workspace-shiliu .nav-link.sl-highlight.active {
  --nav-accent: #ff4d4f;
  --nav-icon-bg: rgba(255, 77, 79, 0.14);
  --nav-icon-fg: #ff4d4f;
}

body.workspace-shiliu .sidebar-nav a .icon,
body.workspace-shiliu .ws-subnav a .icon {
  width: 18px;
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.85;
}

body.workspace-shiliu .nav-link .jobs-badge {
  margin-left: auto;
  flex-shrink: 0;
}

body.workspace-shiliu .ws-nav-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px 6px;
  font-size: 0.6875rem;
  color: #86909c;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.workspace-shiliu .ws-nav-label::before {
  content: "";
  width: 3px;
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(180deg, #4080ff, #7c5cff);
  flex-shrink: 0;
}

body.workspace-shiliu .ws-subnav { margin-bottom: 2px; }

body.workspace-shiliu .ws-lab-link {
  margin-top: auto;
  padding: 8px 0 4px;
  font-size: 0.8125rem;
}

body.workspace-shiliu .ws-lab-link a {
  margin: 0 8px;
}

body.workspace-shiliu .ws-lab-link a:hover { color: var(--primary); }

body.workspace-shiliu .sidebar-bottom {
  border-top: 1px solid rgba(64, 128, 255, 0.08);
  padding: 12px 14px 16px;
  margin-top: 8px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.6));
}

body.workspace-shiliu .credits-box {
  background: linear-gradient(135deg, #fffbe6 0%, #fff1b8 50%, #ffe58f 100%);
  border: 1px solid rgba(250, 173, 20, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.75rem;
  color: #874d00;
  box-shadow: 0 4px 14px rgba(250, 173, 20, 0.15);
}

body.workspace-shiliu .credits-box strong {
  color: #d48806;
  font-size: 1.05rem;
  font-weight: 700;
}

body.workspace-shiliu .sidebar-support {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

body.workspace-shiliu .sidebar-support-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 4px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  width: 100%;
  text-align: left;
  border-radius: 6px;
  font-family: inherit;
  line-height: 1.3;
}

body.workspace-shiliu .sidebar-support-item:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

body.workspace-shiliu .sidebar-support-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

body.workspace-shiliu .sidebar-support-icon svg {
  width: 18px;
  height: 18px;
}

/* 侧栏支持弹窗 */
.support-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.support-modal.hidden { display: none; }

.support-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.support-modal-dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: min(440px, 92vw);
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.support-modal-dialog-sm { width: min(360px, 92vw); }

.support-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.support-modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.support-modal-close {
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
}

.support-modal-close:hover { color: var(--text-primary); }

.support-modal-body {
  padding: 20px;
  overflow-y: auto;
}

.support-modal-lead {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.support-info-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.support-info-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border);
}

.support-info-list li:last-child { border-bottom: none; }

.support-info-list span { color: var(--text-muted); }

.support-info-list strong {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}

.support-info-list-compact { margin-bottom: 0; }

.support-modal-primary {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.support-modal-primary:hover {
  filter: brightness(1.05);
  color: #fff;
}

.support-contact-body { text-align: center; }

.support-qr-wrap {
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.support-qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.support-qr-img.hidden { display: none; }

.support-qr-placeholder {
  color: var(--text-muted);
}

.support-qr-placeholder svg {
  width: 72px;
  height: 72px;
}

.support-contact-wechat {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.support-modal-body .form-group {
  margin-bottom: 14px;
}

.support-modal-body .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.support-modal-body textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

/* 顶栏 */
body.workspace-shiliu .workspace-header {
  position: relative;
  z-index: 1100;
  overflow: visible;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  min-height: 52px;
}

body.workspace-shiliu .workspace-header .header-actions {
  position: relative;
  z-index: 1101;
  overflow: visible;
}

body.workspace-shiliu .workspace-header h1 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

body.workspace-shiliu .feature-hidden {
  display: none !important;
}

body.workspace-shiliu .workspace-header h1.hidden-title {
  visibility: hidden;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body.workspace-shiliu .ws-member-btn {
  background: var(--gold);
  color: #7c5e00;
  border: none;
  padding: 7px 16px;
  border-radius: 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  box-shadow: 0 1px 4px rgba(232, 163, 23, 0.3);
}

.dual-dl-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.dual-dl-row.hidden {
  display: none;
}

body.workspace-shiliu .ws-invite-btn {
  background: linear-gradient(90deg, #e8fff4, #e8f3ff);
  color: #1a7f5a;
  border: 1px solid #b8ead6;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

body.workspace-shiliu .ws-user-menu-wrap {
  position: relative;
}

body.workspace-shiliu .ws-user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--text);
}

body.workspace-shiliu .ws-user-menu-id {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

body.workspace-shiliu .ws-user-menu-crown {
  font-size: 0.75rem;
  line-height: 1;
}

body.workspace-shiliu .ws-user-menu-chevron {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  opacity: 0.6;
}

body.workspace-shiliu .ws-user-dropdown {
  position: fixed;
  top: auto;
  right: auto;
  width: 300px;
  max-height: min(80vh, 520px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
  z-index: 10000;
  padding: 14px 0 10px;
}

body.workspace-shiliu .ws-user-dropdown.hidden {
  display: none;
}

body.workspace-shiliu .ws-user-dropdown-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border);
}

body.workspace-shiliu .ws-user-dropdown-id {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

body.workspace-shiliu .ws-user-dropdown-phone {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

body.workspace-shiliu .ws-clear-cache-btn {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  font-family: inherit;
}

body.workspace-shiliu .ws-user-plan-card {
  margin: 12px 16px;
  padding: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff8e6, #fff3cc);
  border: 1px solid #f5dfa0;
}

body.workspace-shiliu .ws-user-plan-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

body.workspace-shiliu .ws-user-plan-logo {
  font-weight: 700;
  font-size: 0.9375rem;
}

body.workspace-shiliu .ws-user-plan-badge {
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.06);
  color: #666;
}

body.workspace-shiliu .ws-user-plan-desc {
  font-size: 0.8125rem;
  color: #666;
  margin: 0 0 10px;
}

body.workspace-shiliu .ws-user-plan-subscribe {
  display: block;
  text-align: center;
  background: linear-gradient(90deg, #ffd666, #f5b800);
  color: #5c4500;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 8px;
  border-radius: 20px;
  text-decoration: none;
}

body.workspace-shiliu .ws-user-dropdown-nav {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

body.workspace-shiliu .ws-user-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

body.workspace-shiliu .ws-user-nav-item::after {
  content: '›';
  color: var(--text-muted);
  font-size: 1rem;
}

body.workspace-shiliu .ws-user-nav-item:hover {
  background: #f7f8fa;
}

body.workspace-shiliu .ws-user-logout {
  display: block;
  width: calc(100% - 32px);
  margin: 8px 16px 0;
  padding: 10px;
  border: none;
  border-top: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
}

body.workspace-shiliu .ws-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4080ff, #6aa1ff);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

body.workspace-shiliu .btn-ghost {
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: #fff;
}

body.workspace-shiliu .btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
}

body.workspace-shiliu .btn-primary:hover { background: var(--primary-hover); }

body.workspace-shiliu .workspace-body {
  position: relative;
  z-index: 1;
  padding: 16px 20px 28px;
  background: var(--bg);
}

body.workspace-shiliu .panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: var(--text);
  border-radius: var(--radius);
}

body.workspace-shiliu .form-input,
body.workspace-shiliu .form-select {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
}

body.workspace-shiliu .form-input:focus,
body.workspace-shiliu .form-select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(64, 128, 255, 0.15);
}

body.workspace-shiliu .upload-zone {
  background: #fafafa;
  border: 1px dashed #c9cdd4;
  border-radius: var(--radius-sm);
}

body.workspace-shiliu .upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

body.workspace-shiliu .progress-bar {
  background: #e5e6eb;
  border-radius: 4px;
}

body.workspace-shiliu .progress-fill {
  background: var(--primary);
}

body.workspace-shiliu .swap-step {
  background: #f2f3f5;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

body.workspace-shiliu .swap-step.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: #b3d4ff;
}

body.workspace-shiliu .swap-step.done {
  background: #e8ffea;
  color: #00b42a;
  border-color: #aff0b5;
}

body.workspace-shiliu .swap-tips {
  background: #f7f8fa;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

body.workspace-shiliu .checkbox-chip {
  background: #f2f3f5;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

body.workspace-shiliu .checkbox-chip:has(input:checked) {
  background: var(--primary-light);
  border-color: #b3d4ff;
  color: var(--primary);
}

body.workspace-shiliu .process-step {
  background: #f2f3f5;
  color: var(--text-muted);
}

body.workspace-shiliu .process-step.active {
  background: var(--primary-light);
  color: var(--primary);
}

body.workspace-shiliu .project-card,
body.workspace-shiliu .project-thumb {
  background: #fff;
  border-color: var(--border);
}

body.workspace-shiliu .toast {
  background: #1d2129;
  color: #fff;
  border-radius: 8px;
}

/* 首页横幅 — 黑 + 粉橙 */
.sl-hero-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.sl-hero-card {
  border-radius: 10px;
  padding: 22px 24px;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: #fff;
}

.sl-hero-card.dark {
  background: linear-gradient(135deg, #3d3d47 0%, #1a1a22 55%, #252530 100%);
}

.sl-hero-card.coral {
  background: linear-gradient(135deg, #ffb8a8 0%, #ff8a7a 35%, #ff6b6b 70%, #ff9470 100%);
}

.sl-hero-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.sl-hero-card p {
  font-size: 0.8125rem;
  opacity: 0.9;
  max-width: 240px;
  line-height: 1.55;
}

.sl-hero-card .sl-hero-btn {
  margin-top: 14px;
  align-self: flex-start;
  padding: 7px 18px;
  background: #fff;
  color: #1d2129;
  border: none;
  border-radius: 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.sl-hero-card.coral .sl-hero-btn { color: #e8392a; }

.sl-hero-visual {
  position: absolute;
  right: 12px;
  bottom: 8px;
  width: 45%;
  max-width: 200px;
  height: 80%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.sl-hero-visual span {
  font-size: 3.5rem;
  opacity: 0.35;
}

.sl-section-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.sl-create-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}

.sl-create-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 14px;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
  text-align: left;
}

.sl-create-card:hover {
  border-color: #b3d4ff;
  box-shadow: 0 4px 16px rgba(64, 128, 255, 0.1);
  transform: translateY(-1px);
}

.sl-create-card.sl-card-hot {
  border-color: #ffccc7;
  background: linear-gradient(180deg, #fff 0%, #fffafa 100%);
}

.sl-create-card.sl-card-hot:hover {
  border-color: #ff7875;
}

.sl-create-card .sl-card-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.sl-create-card h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.sl-create-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.sl-empty-works {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
  background: #fff;
  border-radius: 10px;
  border: none;
}

.sl-empty-works .sl-empty-icon {
  font-size: 2.5rem;
  opacity: 0.25;
  margin-bottom: 10px;
}

.sl-empty-works p { font-size: 0.875rem; }

.sl-works-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sl-batch-dl-btn {
  font-size: 0.8125rem;
}

.sl-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.sl-work-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.2s;
}

.sl-work-card:hover {
  box-shadow: var(--shadow);
}

.sl-work-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e8f3ff, #f2f3f5);
  overflow: hidden;
}

.sl-work-card-thumb video,
.sl-work-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sl-work-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #94a3b8;
}

.sl-work-card-tags {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.sl-work-card-tag {
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(64, 128, 255, 0.92);
  color: #fff;
  font-weight: 500;
}

.sl-work-card-body {
  padding: 10px 12px 12px;
}

.sl-work-card-body h5 {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.sl-work-card-time {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.work-card-menu-wrap {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
}

.work-card-menu-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.work-card-menu-btn:hover {
  background: #fff;
}

.work-card-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 120px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 4px 0;
  z-index: 20;
}

.work-card-menu.hidden {
  display: none;
}

.work-card-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.8125rem;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.work-card-menu-item:hover {
  background: #f5f7fa;
}

.work-card-menu-item.danger {
  color: #e34d59;
}

.work-card-menu-item .menu-icon {
  width: 16px;
  text-align: center;
  opacity: 0.7;
}

.jobs-item-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 0 4px 0 0;
}

.jobs-item-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 10px 8px 10px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.jobs-item-toggle:hover {
  background: rgba(0, 0, 0, 0.02);
}

.jobs-item-menu-wrap {
  position: relative;
  flex-shrink: 0;
  margin-right: 6px;
}

.jobs-item-menu-wrap .work-card-menu-wrap {
  position: relative;
  top: auto;
  right: auto;
}

.jobs-item-menu-wrap .work-card-menu {
  z-index: 30;
}

.sl-work-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.sl-work-item:hover { box-shadow: var(--shadow); }

.sl-work-thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #e8f3ff, #f2f3f5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.sl-work-info { padding: 8px 10px; }

.sl-work-info h5 {
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sl-work-info span { font-size: 0.6875rem; color: var(--text-muted); }

/* 占位页 */
.sl-placeholder {
  text-align: center;
  padding: 80px 24px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.sl-placeholder h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
  color: var(--text);
}

.sl-placeholder p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 20px;
}

/* 右下角咨询 */
.ws-consult-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.6875rem;
}

.ws-consult-float .ws-consult-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #07c160;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(7, 193, 96, 0.4);
}

@media (max-width: 1200px) {
  .sl-create-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .sl-create-grid { grid-template-columns: repeat(2, 1fr); }
  .sl-hero-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  body.workspace-shiliu .sidebar { width: 64px; }
  body.workspace-shiliu .nav-label,
  body.workspace-shiliu .logo-text,
  body.workspace-shiliu .ws-nav-label,
  body.workspace-shiliu .ws-create-btn span:last-child,
  body.workspace-shiliu .sidebar-bottom { display: none; }
  body.workspace-shiliu .nav-link { justify-content: center; padding: 8px; margin: 2px 6px; }
  body.workspace-shiliu .ws-create-btn { margin: 0 8px 12px; padding: 10px; }
  .sl-create-grid { grid-template-columns: 1fr; }
  .tts-layout, .dlg-layout { grid-template-columns: 1fr; }
}

/* 首页横幅 — 门户配置图片 */
.sl-banner-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.sl-banner-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  aspect-ratio: 1100 / 480;
  background: #1a1a22;
}

.sl-banner-item:first-child {
  background: linear-gradient(135deg, #ff9a62 0%, #ff7849 100%);
}

.sl-banner-item:last-child {
  background: linear-gradient(135deg, #2a2a35 0%, #121218 100%);
}

.sl-banner-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.sl-banner-fallback {
  display: none;
  position: absolute;
  inset: 0;
  padding: 24px 28px;
  align-items: center;
}

.sl-banner-fallback-vtr {
  background: linear-gradient(135deg, #ffb07a 0%, #ff7849 55%, #ff6a45 100%);
  color: #fff;
}

.sl-banner-fallback-cover {
  background: linear-gradient(135deg, #3a3a48 0%, #17171f 100%);
  color: #fff;
}

.sl-banner-fallback-text h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.sl-banner-fallback-text p {
  font-size: 0.875rem;
  opacity: 0.92;
  margin-bottom: 14px;
}

.sl-banner-fallback-btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  color: #1d2129;
  font-size: 0.8125rem;
  font-weight: 600;
}

.sl-banner-fallback-cover .sl-banner-fallback-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.75);
  color: #fff;
}

@media (max-width: 900px) {
  .sl-banner-row {
    grid-template-columns: 1fr;
  }
}

.sl-nav-icon { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.sidebar-nav a, .ws-subnav a { display: flex; align-items: center; gap: 10px; }
.sl-card-icon-img { width: 40px; height: 40px; margin-bottom: 8px; }
.sl-card-icon-img img { width: 32px; height: 32px; }
.sl-create-card { border: 1px solid rgba(0,0,0,.04); }

.sl-hero-card.translate {
  background: linear-gradient(135deg, #fff8e6 0%, #ffe7ba 45%, #ffd666 100%);
  color: #1d2129;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 168px;
  padding: 20px 24px;
}

.sl-hero-card.record {
  background: linear-gradient(135deg, #ffd6e7 0%, #ffadd2 40%, #ff85c0 100%);
  color: #1d2129;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 168px;
  padding: 20px 24px;
}

.sl-hero-card.translate .sl-hero-btn,
.sl-hero-card.record .sl-hero-btn {
  color: #1d2129;
  margin-top: 12px;
}

.sl-hero-mock { position: relative; height: 120px; }

.mock-phone {
  width: 72px;
  height: 128px;
  background: #1d2129;
  border-radius: 12px;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  position: relative;
  top: -8px;
}

.mock-phone::after {
  content: '';
  position: absolute;
  inset: 8px;
  background: linear-gradient(180deg,#4080ff,#6aa1ff);
  border-radius: 6px;
}

.mock-flags {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.mock-flags span {
  background: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.record-mock {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
}

.mock-avatar {
  width: 48px;
  height: 64px;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #e8f3ff 100%);
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.mock-avatar:nth-child(2) { height: 72px; width: 52px; }
.mock-avatar:nth-child(3) { height: 56px; opacity: .85; }

/* 文生语音 */
.tts-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
  align-items: start;
}

.tts-page-title { font-size: 1.125rem; margin-bottom: 16px; }
.tts-label { font-size: 0.8125rem; color: var(--text-muted); display: block; margin-bottom: 8px; }
.tts-script { min-height: 320px; resize: vertical; line-height: 1.7; }
.tts-voice-picker {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  text-align: left;
}

.tts-voice-picker:hover { border-color: var(--primary); background: var(--primary-light); }
.tts-voice-icon { font-size: 1.25rem; }
.tts-voice-arrow { margin-left: auto; color: var(--primary); font-size: 0.8125rem; }
.tts-slider { width: 100%; accent-color: var(--primary); }
.tts-generate-btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #7c5cff, #4080ff);
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
}

/* 音色弹窗 */
.voice-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-modal.hidden { display: none; }

.vm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.vm-dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: min(720px, 92vw);
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.vm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.vm-header h3 { font-size: 1rem; }
.vm-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }
.vm-sub { padding: 12px 20px 0; font-size: 0.8125rem; color: var(--text-muted); }

.vm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 20px 20px;
  overflow-y: auto;
}

.vm-voice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.vm-voice-card:hover,
.vm-voice-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.vm-play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 0.7rem;
}

.vm-voice-info { min-width: 0; }
.vm-voice-info strong { display: block; font-size: 0.8125rem; }
.vm-voice-info span { font-size: 0.6875rem; color: var(--text-muted); }

/* 互动对话 — 图1 设置页 */
.dlg-setup-header { margin-bottom: 16px; }
.dlg-setup-header h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }
.dlg-setup-header p { color: var(--text-muted); font-size: 0.875rem; }

.dlg-setup-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.dlg-setup-preview-wrap { position: relative; margin-bottom: 12px; }
.dlg-setup-preview {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 10px;
  overflow: hidden;
  background: #eef0f4;
}
.dlg-setup-preview > .dlg-scene-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
}
.dlg-setup-preview .de-canvas { width: 100%; height: 100%; max-width: none; aspect-ratio: auto; border-radius: 0; box-shadow: none; }

.dlg-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.dlg-tab {
  padding: 8px 12px;
  border: none;
  background: none;
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.dlg-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }

.dlg-panel-label { font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }

.dlg-setup-preview { aspect-ratio: 16/10; min-height: 220px; }
.dlg-scene-preview { width: 100%; height: 100%; min-height: 220px; position: relative; border-radius: 10px; overflow: hidden; }
.dlg-scene-preview-cover-only {
  background: #1a1a2e;
}
.dlg-scene-preview-cover-only .dlg-live-bg,
.dlg-scene-preview-cover-only .dlg-live-cover {
  object-fit: cover;
  object-position: center center;
}
.dlg-scene-preview-img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; display: block; }

/* 石榴图2：空场景 + 双角色同屏（封面只作墙景，地面遮罩盖住默认人） */
.dlg-scene-preview-live {
  background: var(--dlg-floor, #e8eef4);
}
.dlg-live-bg,
.dlg-live-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}
.dlg-live-room {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.dlg-live-room-cover,
.dlg-live-room-empty,
.dlg-live-room-plain {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.dlg-live-room-plain .st-wall {
  background: var(--dlg-wall, #c8d8e8);
}
.dlg-live-room-plain .st-floor {
  background: var(--dlg-floor, #e8eef4);
}
.dlg-live-wall-zone {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 58%;
  overflow: hidden;
  z-index: 0;
}
.dlg-live-cover-crop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 172%;
  object-fit: cover;
  object-position: center top;
}
.dlg-live-floor-zone {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  z-index: 1;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--dlg-wall, #c8d8e8) 65%, var(--dlg-floor, #e8eef4)) 0%,
    var(--dlg-floor, #e8eef4) 28%,
    var(--dlg-floor, #e8eef4) 100%
  );
}
.dlg-scene-preview-live .dlg-live-chars {
  z-index: 2;
}
.dlg-live-room .st-wall,
.dlg-live-room .st-floor {
  position: absolute;
}
.dlg-live-room .st-wall { inset: 0 0 30% 0; }
.dlg-live-room .st-floor { left: 0; right: 0; bottom: 0; height: 30%; }

/* SoundView 自研高端 procedural 场景 */
.dlg-scene-preview-native { background: #0f172a; }
.pm-room {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.pm-wall {
  position: absolute;
  inset: 0 0 28%;
  z-index: 0;
}
.pm-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  z-index: 1;
  box-shadow: inset 0 8px 24px rgba(0, 0, 0, 0.12);
}
.pm-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 40%, transparent 30%, rgba(0, 0, 0, 0.45) 100%);
}
.pm-spotlight {
  position: absolute;
  top: -10%;
  width: 38%;
  height: 55%;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.22) 0%, transparent 70%);
}
.pm-spot-left { left: 8%; }
.pm-spot-right { right: 8%; }
.pm-screen {
  position: absolute;
  top: 14%;
  left: 50%;
  transform: translateX(-50%);
  width: 52%;
  height: 28%;
  z-index: 2;
  border-radius: 6px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.35), 0 12px 32px rgba(0, 0, 0, 0.35);
}
.pm-desk-bar {
  position: absolute;
  bottom: 28%;
  left: 12%;
  right: 12%;
  height: 4%;
  z-index: 2;
  background: linear-gradient(180deg, #334155, #1e293b);
  border-radius: 3px 3px 0 0;
  opacity: 0.85;
}
.pm-window-grid {
  position: absolute;
  top: 8%;
  right: 6%;
  width: 42%;
  height: 42%;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(255,255,255,.15) 1px, transparent 1px) 0 0 / 20% 100%,
    linear-gradient(180deg, rgba(255,255,255,.12) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(180deg, #93c5fd 0%, #64748b 100%);
  border-radius: 4px;
  opacity: 0.9;
}
.pm-table-long {
  position: absolute;
  bottom: 30%;
  left: 8%;
  right: 8%;
  height: 6%;
  z-index: 2;
  background: #475569;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.pm-chair-row {
  position: absolute;
  bottom: 28%;
  left: 10%;
  right: 10%;
  height: 8%;
  z-index: 2;
  background: repeating-linear-gradient(90deg, #64748b 0 8%, transparent 8% 16%);
  opacity: 0.5;
}
.pm-plant {
  position: absolute;
  bottom: 30%;
  width: 10%;
  height: 22%;
  z-index: 2;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  opacity: 0.75;
}
.pm-plant-l { left: 6%; }
.pm-plant-r { right: 6%; }
.pm-sofa-hint {
  position: absolute;
  bottom: 30%;
  left: 22%;
  right: 22%;
  height: 10%;
  z-index: 2;
  background: #a68a64;
  border-radius: 8px 8px 2px 2px;
  opacity: 0.55;
}
.pm-lamp {
  position: absolute;
  top: 18%;
  left: 12%;
  width: 6%;
  height: 18%;
  z-index: 2;
  background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 40%, transparent 40%);
  border-radius: 50% 50% 0 0;
  opacity: 0.7;
}
.pm-board {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: 48%;
  padding: 3% 2%;
  z-index: 2;
  background: #fff;
  border-radius: 4px;
  font-size: clamp(6px, 2.2vw, 11px);
  font-weight: 700;
  text-align: center;
  color: #3b82f6;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.pm-shelf-row {
  position: absolute;
  top: 38%;
  right: 8%;
  width: 14%;
  height: 24%;
  z-index: 2;
  background: linear-gradient(180deg, #fde68a, #fbbf24);
  border-radius: 2px;
  opacity: 0.8;
}
.pm-desk-row {
  position: absolute;
  bottom: 32%;
  left: 15%;
  width: 22%;
  height: 7%;
  z-index: 2;
  background: #fff;
  border-radius: 3px;
  opacity: 0.85;
}
.pm-cross-badge {
  position: absolute;
  top: 12%;
  right: 10%;
  z-index: 2;
  color: #10b981;
  font-size: clamp(10px, 3vw, 18px);
  font-weight: 700;
  opacity: 0.85;
}
.pm-cabinet {
  position: absolute;
  top: 28%;
  right: 8%;
  width: 16%;
  height: 28%;
  z-index: 2;
  background: #fff;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px #d1fae5;
  opacity: 0.9;
}
.pm-bed-hint {
  position: absolute;
  bottom: 30%;
  left: 10%;
  width: 28%;
  height: 12%;
  z-index: 2;
  background: #ecfdf5;
  border-radius: 6px;
  border: 1px solid #a7f3d0;
  opacity: 0.85;
}
.pm-bookshelf {
  position: absolute;
  top: 18%;
  width: 12%;
  height: 42%;
  z-index: 2;
  background: linear-gradient(180deg, #92400e, #78350f);
  border-radius: 2px;
  opacity: 0.85;
}
.pm-bookshelf-l { left: 5%; }
.pm-bookshelf-r { right: 5%; }
.pm-rug {
  position: absolute;
  bottom: 28%;
  left: 20%;
  right: 20%;
  height: 10%;
  z-index: 2;
  background: radial-gradient(ellipse, #b45309 0%, #92400e 100%);
  border-radius: 50%;
  opacity: 0.45;
}
.pm-skyline {
  position: absolute;
  bottom: 28%;
  left: 0;
  right: 0;
  height: 22%;
  z-index: 2;
  background:
    linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.15) 100%),
    repeating-linear-gradient(90deg, #64748b 0 6%, transparent 6% 10%);
  opacity: 0.55;
}
.pm-cloud {
  position: absolute;
  z-index: 2;
  width: 18%;
  height: 8%;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  filter: blur(1px);
}
.pm-cloud-a { top: 16%; left: 12%; }
.pm-cloud-b { top: 22%; right: 18%; width: 14%; }
.pm-cyclorama {
  position: absolute;
  inset: 0 0 28% 0;
  z-index: 2;
  background: radial-gradient(ellipse 90% 80% at 50% 100%, rgba(0, 0, 0, 0.06) 0%, transparent 55%);
  pointer-events: none;
}
.pm-floor-line {
  position: absolute;
  bottom: 28%;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 3;
  background: rgba(100, 116, 139, 0.35);
}
.dlg-live-room .pm-room,
.dlg-scene-thumb-inner .pm-room {
  position: absolute;
  inset: 0;
}
.dlg-bg-card-thumb-native .dlg-scene-thumb-inner {
  aspect-ratio: 16/10;
  border-radius: 6px;
  overflow: hidden;
}
.dlg-char-card-role {
  display: block;
  font-size: 0.6rem;
  color: #94a3b8;
  text-align: center;
  margin-top: -2px;
  padding-bottom: 4px;
}
.dlg-char-card-premium.active .dlg-char-card-role { color: #4080ff; }
.dlg-live-floor-mask {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--dlg-wall, #e8eef4) 88%, transparent) 0%,
    var(--dlg-floor, #e8eef4) 14%,
    var(--dlg-floor, #e8eef4) 100%
  );
}
.dlg-live-chars {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 10% 4%;
  pointer-events: none;
}
.dlg-live-char {
  flex: 0 1 34%;
  height: 56%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: opacity 0.2s, transform 0.2s;
}
.dlg-live-char-active {
  transform: scale(1.03);
  z-index: 1;
}
.dlg-live-chars-single {
  justify-content: center;
  padding: 0 18% 4%;
}
.dlg-live-chars-single .dlg-live-char {
  flex: 0 1 46%;
}
.dlg-live-char-figure {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dlg-live-char-figure .cartoon-full {
  height: 100% !important;
  max-height: 100%;
  width: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
}
.dlg-live-char-img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}
.dlg-live-char-realistic {
  height: 100%;
  width: 92%;
  object-fit: cover;
  object-position: center 16%;
}
.dlg-live-char-cartoon {
  object-position: bottom center;
}
.dlg-setup-preview.dlg-preview-flash {
  animation: dlgPreviewFlash .28s ease;
}
@keyframes dlgPreviewFlash {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

.dlg-scene-preview-bg-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.dlg-scene-preview-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #e8eef4;
}

.dlg-change-bg {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
}

/* 换背景弹窗 — 对标石榴通用素材 */
.dlg-bg-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dlg-bg-modal.hidden { display: none; }
.dlg-bg-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}
.dlg-bg-dialog {
  position: relative;
  display: flex;
  width: min(920px, 94vw);
  height: min(560px, 82vh);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
}
.dlg-bg-side {
  width: 140px;
  flex-shrink: 0;
  padding: 16px 10px;
  border-right: 1px solid var(--border);
  background: #fafbfc;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dlg-bg-side-btn {
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
}
.dlg-bg-side-btn:hover { background: #f1f5f9; }
.dlg-bg-side-btn.active {
  background: #eef2ff;
  color: var(--primary);
  font-weight: 500;
}
.dlg-bg-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dlg-bg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.dlg-bg-filters {
  display: flex;
  gap: 20px;
}
.dlg-bg-filter {
  border: none;
  background: none;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
  border-bottom: 2px solid transparent;
}
.dlg-bg-filter.active {
  color: var(--primary);
  font-weight: 500;
  border-bottom-color: var(--primary);
}
.dlg-bg-close {
  border: none;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}
.dlg-bg-grid {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-content: start;
}
.dlg-bg-grid.hidden { display: none; }
.dlg-bg-card {
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.dlg-bg-card:hover { border-color: #cbd5e1; }
.dlg-bg-card.active {
  border-color: #4080ff;
  box-shadow: 0 0 0 2px rgba(64,128,255,.2);
}
.dlg-bg-card-thumb {
  aspect-ratio: 16/10;
  background: #e8eef4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dlg-bg-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dlg-bg-ph { font-size: 1.5rem; opacity: .5; }
.dlg-bg-card-name {
  padding: 8px 10px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dlg-bg-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.dlg-bg-empty.hidden { display: none; }

.dlg-scene-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}
.dlg-scene-item { cursor: pointer; border-radius: 10px; overflow: hidden; border: 2px solid transparent; transition: border-color .15s; }
.dlg-scene-item.active { border-color: #4080ff; box-shadow: 0 0 0 2px rgba(64,128,255,.25); }
.dlg-scene-item small { display: none; }

.dlg-scene-thumb-inner { aspect-ratio: 16/10; position: relative; overflow: hidden; border-radius: 8px; }
.st-wall { position: absolute; inset: 0 0 30% 0; }
.st-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; }
.dlg-scene-thumb-chars {
  position: absolute; bottom: 8%; left: 0; right: 0;
  display: flex; justify-content: center; align-items: flex-end; gap: 8px; z-index: 2;
}
.dlg-scene-thumb-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 4px 6px; font-size: 0.65rem; color: #fff; text-align: center;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  z-index: 3;
}
.st-whiteboard { position: absolute; top: 12%; left: 50%; transform: translateX(-50%); width: 45%; height: 22%; background: #fff; border-radius: 3px; }
.st-board-abc { position: absolute; top: 10%; left: 50%; transform: translateX(-50%); width: 50%; padding: 3px; background: #fff; font-size: 6px; text-align: center; color: #f472b6; font-weight: 700; border-radius: 2px; }
.st-board-abc.big { font-size: 5px; letter-spacing: 1px; }
.st-shelf { position: absolute; top: 35%; right: 8%; width: 12%; height: 25%; background: #fde68a; border-radius: 2px; }
.st-shelf-c { background: linear-gradient(180deg,#fca5a5,#fde68a,#86efac); }
.st-desk { position: absolute; bottom: 32%; left: 15%; width: 20%; height: 8%; background: #fff; border-radius: 2px; }
.st-office-window { position: absolute; top: 18%; right: 8%; width: 22%; height: 28%; background: linear-gradient(180deg,#dbeafe,#93c5fd); border-radius: 4px; opacity: .75; }
.st-class-board { position: absolute; top: 14%; left: 50%; transform: translateX(-50%); font-size: 1.1rem; font-weight: 700; color: rgba(255,255,255,.85); letter-spacing: .2em; }
.st-chairs { position: absolute; bottom: 32%; left: 20%; width: 60%; height: 6%; background: repeating-linear-gradient(90deg,#f9a8d4 0 12px,transparent 12px 20px); opacity: .5; }
.st-bookshelf.tall { top: 20%; right: 5%; width: 18%; height: 45%; background: #92400e; border-radius: 2px; }
.st-scales { position: absolute; top: 15%; left: 10%; font-size: 10px; }
.st-cross { position: absolute; top: 12%; right: 12%; color: #ef4444; font-size: 10px; font-weight: 700; }
.st-temple { position: absolute; top: 8%; left: 50%; transform: translateX(-50%); width: 40%; height: 35%; background: #dc2626; border-radius: 4px 4px 0 0; opacity: .7; }

.dlg-char-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px 2px;
}
.dlg-char-count {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0 0 6px 2px;
}
.dlg-char-style-bar {
  display: flex;
  gap: 6px;
  margin: 0 0 8px;
  flex-wrap: wrap;
}
.dlg-char-style-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.dlg-char-style-btn:hover { border-color: #cbd5e1; color: #334155; }
.dlg-char-style-btn.active {
  border-color: #4080ff;
  color: #4080ff;
  background: #eff6ff;
  font-weight: 600;
}
.dlg-char-card {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  transition: border-color .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
}
.dlg-char-card:hover { border-color: #cbd5e1; }
.dlg-char-card.active { border-color: #4080ff; box-shadow: 0 0 0 2px rgba(64,128,255,.2); }
.dlg-char-card-body {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.dlg-char-card-body.has-cover {
  position: relative;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: linear-gradient(180deg, #f1f5f9 0%, #e8eef4 100%);
}
.dlg-char-card.has-svg .dlg-char-card-body.has-cover {
  padding: 4px 2px 0;
}
.dlg-char-card.has-svg .cartoon-card-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dlg-char-fallback {
  font-size: 1.4rem;
  font-weight: 700;
  color: #94a3b8;
}
.dlg-char-card-name {
  flex-shrink: 0;
  font-size: 0.65rem;
  text-align: center;
  color: #64748b;
  padding: 4px 2px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dlg-char-card.active .dlg-char-card-name { color: #4080ff; font-weight: 600; }
.cartoon-card-wrap .cartoon-full { height: 100% !important; max-height: 110px; width: auto; }
.cartoon-thumb-wrap .cartoon-full { height: 72px !important; width: auto; }
.cartoon-realistic { max-height: 100%; width: auto; }

.dlg-scene-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.dlg-char-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.dlg-char-cover-cartoon {
  object-fit: cover;
  object-position: center 88%;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.dlg-char-cover-realistic {
  object-position: center 15%;
}
.dlg-char-cover-figo {
  object-position: center 88%;
}
.dlg-scene-thumb-inner.has-cover { aspect-ratio: 16/10; }
.dlg-scene-thumb-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.de-char-cover-img { height: 130px; width: auto; max-width: 42%; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.2)); }
.de-char-cover-realistic { object-fit: cover; object-position: center 12%; max-height: 85%; border-radius: 8px; }
.overlay-chars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 4%;
  padding: 0 8% 6%;
  pointer-events: none;
}
.dlg-scene-preview .overlay-chars .de-char {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  flex: 0 1 38%;
  display: flex;
  justify-content: center;
}
.dlg-scene-preview .overlay-chars .de-char-cover-img {
  height: clamp(120px, 42vh, 260px);
  max-width: 100%;
  width: auto;
}
.de-char-figo-crop {
  height: clamp(140px, 48%, 280px);
  width: min(42vw, 180px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.de-char-cover-figo {
  width: 340% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 100%;
  object-fit: cover;
  object-position: center 92%;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.25));
}
.de-char-active { z-index: 2; transform: scale(1.04); }
.de-char-dim { opacity: 1; filter: saturate(0.85); transform: scale(0.96); }
.dlg-scene-preview-single-char .overlay-chars {
  justify-content: center;
}
.dlg-scene-preview-single-char .de-char {
  flex: 0 1 46%;
  margin: 0 4%;
}
.dlg-av-figo-wrap {
  display: inline-block;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 8px;
  vertical-align: middle;
}
.dlg-av-figo {
  width: 200% !important;
  height: auto !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center 90%;
  margin-left: -50%;
}
.dlg-import-row { margin-bottom: 8px; }
.dlg-import-btn { font-size: 0.75rem !important; padding: 4px 10px !important; }

.dlg-char-av, .dlg-line-av, .de-tl-av, .de-voice-av {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f0f4ff, #e2e8f0);
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.dlg-char-av { width: 56px; height: 56px; margin: 0 auto; border-radius: 12px; }
.dlg-scene-preview-chars { position: absolute; inset: 0; }
.dlg-line-av, .de-tl-av { width: 40px; height: 40px; border-radius: 50%; background: #f1f5f9; overflow: hidden; }
.dlg-line-av { cursor: pointer; }
.dlg-line-av:hover { box-shadow: 0 0 0 2px rgba(64,128,255,.35); }
.dlg-av-cover { width: 100%; height: 100%; object-fit: contain; object-position: bottom center; display: block; background: #f1f5f9; }
.dlg-av-mini { border-radius: 50%; }
.dlg-av-avatar { border-radius: 12px; }
.de-voice-av { width: 36px; height: 36px; border-radius: 50%; padding: 0; }

.dlg-scene-cartoons {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: flex-end;
  padding: 8px 4px 4px;
}
.dlg-scene-cartoons .cartoon-mini { width: 28px; height: 28px; }

.cartoon-svg { display: block; }
.cartoon-full { height: 130px; width: auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,.15)); }
.cartoon-avatar { width: 100%; height: 100%; }
.cartoon-mini { width: 40px; height: 40px; }

.de-char-figure {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 135px;
  transition: transform .2s, filter .2s;
}
.de-char.speaking .de-char-figure {
  transform: scale(1.08) translateY(-4px);
  filter: drop-shadow(0 6px 14px rgba(64,128,255,.35));
}
.de-char.speaking .cartoon-full { filter: drop-shadow(0 6px 12px rgba(64,128,255,.25)); }

/* legacy avatar placeholders removed */
.dlg-char-av::before, .dlg-char-av::after,
.dlg-line-av::before, .dlg-line-av::after { display: none; }

.dlg-right-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.dlg-mini-btn { padding: 4px 8px !important; font-size: 0.75rem !important; }

.dlg-lines { max-height: 360px; overflow-y: auto; margin-bottom: 12px; }
.dlg-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.dlg-line-role { font-size: 0.75rem; color: var(--primary); min-width: 40px; }
.dlg-line-input { flex: 1; padding: 10px 12px; border-radius: 8px; }
.dlg-line-del { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; }

.dlg-setup-foot { margin-top: auto; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.dlg-create-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.dlg-cost { font-size: 0.8125rem; color: var(--text-muted); }
.dlg-create-btn {
  padding: 10px 28px;
  background: linear-gradient(135deg, #7c5cff, #4080ff);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* 3D 角色 */
.de-char-face {
  width: 100%;
  height: 100%;
  background: var(--skin, #f5d0c5);
  border-radius: 50%;
  position: relative;
}
.de-char-head {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--hair, #1a1a2e);
  padding: 6px;
  position: relative;
}
.de-char-body {
  width: 52px;
  height: 64px;
  margin-top: -4px;
  border-radius: 20px 20px 6px 6px;
  background: var(--outfit, #2563eb);
}

.de-deco { position: absolute; z-index: 0; }
.de-deco-chart { top: 15%; left: 8%; width: 40%; height: 30%; background: #fff; border-radius: 4px; opacity: .9; }
.de-deco-window { top: 10%; right: 5%; width: 25%; height: 35%; background: linear-gradient(180deg,#bae6fd,#7dd3fc); border-radius: 4px; }
.de-deco-books { top: 20%; left: 10%; font-size: 2rem; }
.de-deco-scales { top: 15%; right: 15%; font-size: 2rem; }
.de-deco-bookshelf { top: 25%; right: 8%; width: 20%; height: 40%; background: #92400e; border-radius: 4px; }
.de-deco-podium { bottom: 30%; left: 50%; transform: translateX(-50%); width: 30%; height: 8%; background: #78716c; border-radius: 4px; }
.de-deco-cross { top: 12%; right: 12%; font-size: 1.5rem; color: #ef4444; }
.de-deco-desk { bottom: 28%; left: 15%; width: 25%; height: 10%; background: #fff; border-radius: 4px; }
.de-deco-scroll { top: 20%; left: 15%; font-size: 2rem; }
.de-deco-lantern { top: 15%; right: 12%; font-size: 1.75rem; }

/* 互动对话 — 图2 编辑器 */
.workspace.dialogue-active .sidebar,
.workspace.dialogue-active .workspace-header,
.workspace.dialogue-active .ws-consult-float { display: none; }
.workspace.dialogue-active .workspace-main { margin-left: 0; }
.workspace.dialogue-active .workspace-body { padding: 0; height: calc(100vh - 0px); }

.dlg-editor-panel { padding: 0 !important; height: 100%; }
.dlg-editor-panel.hidden { display: none !important; }

.de-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 48px);
  background: #f7f8fa;
  border-radius: 8px;
  overflow: hidden;
}

.de-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.de-back {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
}

.de-title {
  border: none;
  background: transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  min-width: 120px;
  font-family: inherit;
}

.de-tools {
  display: flex;
  gap: 4px;
  margin-left: 24px;
  flex: 1;
}

.de-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  color: var(--text-muted);
  font-family: inherit;
}
.de-tool span { font-size: 1.1rem; }
.de-tool small { font-size: 0.625rem; }
.de-tool.active, .de-tool:hover { background: var(--primary-light); color: var(--primary); }

.de-generate {
  padding: 8px 20px;
  background: linear-gradient(135deg, #7c5cff, #4080ff);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.de-generate:disabled { opacity: .6; cursor: not-allowed; }

.de-body {
  display: grid;
  grid-template-columns: 140px 1fr 240px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.de-clips {
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 12px 8px;
  overflow-y: auto;
}

.de-add-clip {
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
  font-size: 0.75rem;
  margin-bottom: 12px;
  font-family: inherit;
}

.de-clip-item {
  margin-bottom: 10px;
  cursor: pointer;
  text-align: center;
}
.de-clip-item small { font-size: 0.65rem; color: var(--text-muted); }
.de-clip-item.active .de-clip-thumb { outline: 2px solid var(--primary); }

.de-clip-thumb {
  aspect-ratio: 16/10;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.de-canvas-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #eef0f4;
  overflow: hidden;
}

.de-canvas {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  position: relative;
}

.de-room {
  width: 100%;
  height: 100%;
  position: relative;
  transform-origin: center center;
}

.de-room-wall {
  position: absolute;
  inset: 0 0 28% 0;
  background: var(--de-wall, #E8F4FC);
}
.de-room-floor {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 28%;
  background: var(--de-floor, #FADADD);
}
.de-room-board {
  position: absolute;
  top: 12%; left: 50%;
  transform: translateX(-50%);
  width: 55%;
  padding: 8px 12px;
  background: #fff;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #f472b6;
  text-align: center;
  letter-spacing: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.de-room-shelf {
  position: absolute;
  top: 38%; right: 8%;
  width: 48px; height: 64px;
  background: #fde68a;
  border-radius: 4px;
  border: 2px solid #fbbf24;
}
.de-room-lamp {
  position: absolute;
  top: 8%; right: 12%;
  width: 20px; height: 28px;
  background: #fef08a;
  border-radius: 4px 4px 0 0;
}

.de-char {
  position: absolute;
  bottom: 18%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}
.de-char-left { left: 12%; }
.de-char-right { right: 12%; }

.de-layout-left .de-char-left { left: 28%; transform: scale(1.15); }
.de-layout-left .de-char-right { right: 10%; opacity: .7; transform: scale(.85); }
.de-layout-right .de-char-right { right: 28%; transform: scale(1.15); }
.de-layout-right .de-char-left { left: 10%; opacity: .7; transform: scale(.85); }

.de-char-head { font-size: 2.8rem; line-height: 1; }
.de-char-body {
  width: 48px; height: 56px;
  margin-top: -4px;
  border-radius: 24px 24px 8px 8px;
}
.de-char-teacher .de-char-body,
.de-char-student .de-char-body,
.de-char-body {
  background: var(--outfit, #2563eb);
}
.de-char-name {
  font-size: 0.65rem;
  margin-top: 2px;
  color: #374151;
  font-weight: 600;
  background: rgba(255,255,255,.75);
  padding: 2px 8px;
  border-radius: 10px;
}

.de-subtitle-bar {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80%;
  padding: 6px 16px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: 20px;
  font-size: 0.75rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.de-props {
  background: #fff;
  border-left: 1px solid var(--border);
  padding: 16px 12px;
  overflow-y: auto;
}

.de-prop-section { margin-bottom: 20px; }
.de-prop-section h4 { font-size: 0.8125rem; margin-bottom: 8px; color: var(--text-muted); font-weight: 500; }

.de-prop-btn {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  text-align: left;
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: inherit;
}

.de-scene-picker {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.de-scene-opt {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: inherit;
}
.de-scene-opt.active { border-color: var(--primary); background: var(--primary-light); }

.de-layout-btns { display: flex; flex-direction: column; gap: 6px; }
.de-layout-btn {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: inherit;
  text-align: left;
}
.de-layout-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.de-voice-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  margin-bottom: 6px;
  font-family: inherit;
  font-size: 0.8125rem;
}
.de-voice-av { font-size: 1.25rem; }
.de-voice-arrow { margin-left: auto; color: var(--text-muted); }
.de-scale-label { font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 4px; }

.de-timeline {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  min-height: 120px;
}

.de-playback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 48px;
}
.de-play-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--primary-light);
  color: var(--primary);
  cursor: pointer;
  font-size: 0.875rem;
}
#dlgTimeDisplay { font-size: 0.6875rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.de-timeline-scroll {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
}

.de-timeline-ruler {
  height: 20px;
  position: relative;
  border-bottom: 1px solid var(--border);
  min-width: 1200px;
}
.de-ruler-mark {
  position: absolute;
  top: 2px;
  font-size: 0.625rem;
  color: var(--text-muted);
  transform: translateX(-50%);
}

.de-timeline-track {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  min-width: max-content;
}

.de-tl-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  max-width: 280px;
  padding: 8px 10px;
  background: #f7f8fa;
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-shrink: 0;
}

.de-tl-av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid var(--primary-light);
}

.de-tl-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.8125rem;
  font-family: inherit;
  min-width: 0;
}
.de-tl-input:focus { outline: none; }

.de-tl-del {
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 2px;
}

.de-timeline-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}
.de-timeline-tools button {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.de-output-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.de-output-modal.hidden { display: none; }
.de-output-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.de-output-dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: min(640px, 92vw);
  z-index: 1;
}
.de-output-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.de-output-close {
  border: none;
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}
.de-output-dialog video { width: 100%; border-radius: 8px; }
.de-output-actions { display: flex; gap: 8px; margin-top: 12px; }

@media (max-width: 900px) {
  .vm-grid { grid-template-columns: repeat(2, 1fr); }
  .dlg-setup-layout { grid-template-columns: 1fr; }
  .dlg-scene-grid { grid-template-columns: repeat(2, 1fr); }
  .dlg-char-grid { grid-template-columns: repeat(3, 1fr); }
  .de-body { grid-template-columns: 1fr; }
  .de-clips, .de-props { display: none; }
}

.sl-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.sl-template-card {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 12px;
  padding: 20px 16px;
  cursor: pointer;
  transition: box-shadow .2s, border-color .2s;
  text-align: center;
}

.sl-template-card:hover {
  border-color: var(--primary, #4080ff);
  box-shadow: 0 4px 16px rgba(64, 128, 255, .12);
}

.sl-template-emoji { font-size: 2rem; margin-bottom: 8px; }
.sl-template-card h4 { font-size: .95rem; margin: 0 0 4px; }
.sl-template-cat { font-size: .75rem; color: var(--text-muted); }
.sl-template-use {
  margin-top: 12px;
  padding: 6px 14px;
  border: 1px solid var(--primary, #4080ff);
  background: var(--primary-light, #eef3ff);
  color: var(--primary, #4080ff);
  border-radius: 6px;
  font-size: .8rem;
  cursor: pointer;
}

.sl-knowledge-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #eee);
}

/* 生成进度 / 任务中心 */
.sidebar-nav a.has-active-jobs,
body.workspace-shiliu .nav-link.has-active-jobs {
  background: rgba(255, 125, 0, 0.08);
}

.jobs-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ff4d4f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.jobs-badge.hidden {
  display: none;
}

.jobs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.jobs-summary {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 6px;
}

.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 880px;
}

.jobs-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.jobs-categories {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jobs-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  position: relative;
  opacity: 0.45;
  transition: transform 0.2s ease;
}

.jobs-chevron::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-60%, -70%) rotate(-45deg);
}

.jobs-cat.open > .jobs-cat-head .jobs-chevron,
.jobs-item.open > .jobs-item-toggle .jobs-chevron {
  transform: rotate(90deg);
}

.jobs-cat {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #eee);
  border-radius: var(--radius-sm, 10px);
  overflow: visible;
}

.jobs-cat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.jobs-cat-head:hover {
  background: rgba(64, 128, 255, 0.04);
}

.jobs-cat-icon {
  font-size: 1.25rem;
}

.jobs-cat-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.jobs-cat-count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: rgba(64, 128, 255, 0.1);
  color: var(--primary, #4080ff);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.jobs-cat-hint {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.jobs-cat-hint-active {
  color: var(--primary, #4080ff);
  font-weight: 600;
}

.jobs-cat-body {
  display: none;
  border-top: 1px solid var(--border, #eee);
  padding: 8px;
  background: rgba(0, 0, 0, 0.015);
  content-visibility: auto;
  contain-intrinsic-size: auto 120px;
}

.jobs-cat.open .jobs-cat-body {
  display: block;
}

.jobs-loading-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 4px;
  color: var(--text-muted, #888);
  font-size: 0.88rem;
}

.jobs-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary, #4080ff);
  animation: jobs-pulse 0.9s ease-in-out infinite;
}

@keyframes jobs-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1); }
}

.jobs-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}

.jobs-skeleton-row {
  height: 52px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f0f2f5 25%, #e8ebef 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: jobs-shimmer 1s ease-in-out infinite;
}

@keyframes jobs-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.jobs-item {
  border: 1px solid var(--border, #eee);
  border-radius: 8px;
  background: #fff;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.jobs-item:has(.work-card-menu:not(.hidden)) {
  z-index: 50;
}

.jobs-item + .jobs-item {
  margin-top: 8px;
}

.jobs-item-active {
  border-color: rgba(64, 128, 255, 0.35);
}

.jobs-item-failed {
  border-color: rgba(255, 77, 79, 0.35);
}

.jobs-item-head {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.jobs-item-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 10px 8px 10px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.jobs-item-toggle:hover {
  background: rgba(0, 0, 0, 0.02);
}

.jobs-item-name {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jobs-item-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.jobs-item-eta {
  font-size: 0.72rem;
  color: var(--accent, #4080ff);
  flex-shrink: 0;
  white-space: nowrap;
}

.jobs-item-err-hint {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  color: #ff4d4f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  max-width: 42%;
}

.jobs-item-body {
  display: none;
  padding: 0 12px 12px;
  content-visibility: auto;
}

.jobs-item.open .jobs-item-body {
  display: block;
}

.jobs-cat-head,
.jobs-item-toggle {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.jobs-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.jobs-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.jobs-empty-hint {
  font-size: 0.85rem;
  margin-top: 8px;
}

.jobs-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #eee);
  border-radius: var(--radius-sm, 10px);
  padding: 16px;
}

.jobs-card-active {
  border-color: rgba(64, 128, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(64, 128, 255, 0.08);
}

.jobs-card-failed {
  border-color: rgba(255, 77, 79, 0.35);
}

.jobs-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.jobs-card-icon {
  font-size: 1.5rem;
}

.jobs-card-meta {
  flex: 1;
  min-width: 0;
}

.jobs-card-meta strong {
  display: block;
  font-size: 0.95rem;
}

.jobs-card-meta span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.jobs-progress {
  margin-top: 12px;
}

.jobs-step {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.jobs-error {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #ff4d4f;
}

.jobs-preview {
  width: 100%;
  margin-top: 12px;
  border-radius: var(--radius-sm, 8px);
  background: #000;
  display: block;
}

.jobs-preview-landscape .jobs-preview {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  max-height: none;
}

.jobs-preview-portrait .jobs-preview {
  aspect-ratio: 9 / 16;
  width: auto;
  max-width: 100%;
  max-height: min(420px, 70vh);
  margin-left: auto;
  margin-right: auto;
  object-fit: cover;
}

.jobs-dual-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 720px) {
  .jobs-dual-preview {
    grid-template-columns: 1fr;
  }
}

.jobs-preview-cell {
  min-width: 0;
}

.jobs-preview-cell .jobs-preview {
  margin-top: 6px;
}

.jobs-preview-label {
  display: inline-block;
  font-size: 12px;
  color: var(--text-muted, #888);
  font-weight: 500;
}

.jobs-preview-portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.jobs-card-actions-dual {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jobs-card-actions-retry {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.jobs-card-actions {
  margin-top: 10px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.wvideo-ref-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wvideo-ref-zone {
  padding: 16px 10px !important;
  min-height: 88px;
}

.wvideo-ref-zone p {
  font-size: 0.78rem;
  margin: 6px 0 0;
  color: var(--text-muted);
}

.wvideo-ref-preview {
  width: 100%;
  max-height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 8px;
  background: #000;
}

.wvideo-ref-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 4px 0 0;
  text-align: center;
}

.wvideo-voice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.wvideo-voice-head > label:first-child {
  font-weight: 500;
  font-size: 0.9rem;
}

.wvideo-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.wvideo-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.wvideo-switch-slider {
  position: absolute;
  inset: 0;
  background: #c9cdd4;
  border-radius: 24px;
  transition: background 0.2s;
}

.wvideo-switch-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.wvideo-switch input:checked + .wvideo-switch-slider {
  background: var(--primary, #4080ff);
}

.wvideo-switch input:checked + .wvideo-switch-slider::before {
  transform: translateX(20px);
}

#wvideoVoiceGroup.voice-off .tts-voice-picker {
  opacity: 0.45;
  pointer-events: none;
}

/* SoundView 工具箱 */
.sv-tools-featured {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.sv-tool-featured {
  position: relative;
  padding: 24px 20px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f0f6ff 0%, #fff 55%);
  border: 1px solid #e3ebf7;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  min-height: 168px;
}

.sv-tool-featured:hover {
  box-shadow: 0 8px 28px rgba(64, 128, 255, 0.12);
  transform: translateY(-2px);
}

.sv-tool-featured .sv-tool-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.sv-tool-featured h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.sv-tool-featured p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
}

.sv-tool-go {
  font-size: 0.85rem;
  color: var(--primary, #4080ff);
  font-weight: 500;
}

.sv-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.sv-tool-card {
  position: relative;
  padding: 18px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border, #e8ecf2);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sv-tool-card:hover {
  border-color: #4080ff;
  box-shadow: 0 4px 16px rgba(64, 128, 255, 0.08);
}

.sv-tool-icon-sm {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.sv-tool-card h5 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.sv-tool-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.sv-tool-hot {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, #ff6b6b, #ff8e53);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.tool-page-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.tool-page-icon {
  font-size: 2.4rem;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: #f0f6ff;
  border-radius: 12px;
}

.tool-form-panel {
  max-width: 640px;
}

.tool-back {
  margin-bottom: 12px;
  padding: 6px 10px;
  font-size: 0.85rem;
}

.tool-status {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tool-script-output {
  margin-top: 12px;
  padding: 14px;
  background: var(--bg-elevated, #f5f7fa);
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.55;
  white-space: pre-wrap;
  max-height: 280px;
  overflow: auto;
}

@media (max-width: 900px) {
  .sv-tools-featured,
  .sv-tools-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- 音色库 ---- */
.vl-page { padding: 0 4px 32px; }
.vl-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.vl-tab {
  background: none;
  border: none;
  padding: 12px 4px;
  font-size: 0.9375rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.vl-tab.active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--primary);
}
.vl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.vl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
  flex: 1;
  justify-content: flex-end;
}
.vl-select {
  min-width: 110px;
  max-width: 140px;
  padding: 6px 10px;
  font-size: 0.8125rem;
}
.vl-search {
  min-width: 160px;
  max-width: 220px;
  padding: 6px 12px;
  font-size: 0.8125rem;
}
.vl-chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  cursor: pointer;
}
.vl-chip.active {
  background: var(--primary-light, #eef4ff);
  border-color: var(--primary);
  color: var(--primary);
}
.vl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.vl-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.vl-card:hover {
  border-color: #c8d4e8;
  box-shadow: 0 4px 16px rgba(15, 35, 80, 0.06);
}
.vl-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.vl-play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--primary, #4080ff);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vl-play.playing { opacity: 0.7; }
.vl-card-title {
  min-width: 0;
  flex: 1;
}
.vl-card-title strong {
  display: block;
  font-size: 0.875rem;
  line-height: 1.35;
}
.vl-card-flag {
  font-size: 0.875rem;
  margin-right: 4px;
}
.vl-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.6em;
}
.vl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vl-tag {
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f0f2f5;
  color: #666;
}
.vl-tag.gender-male { background: #e8f0ff; color: #2f5fd4; }
.vl-tag.gender-female { background: #ffe8f0; color: #d42f6a; }
.vl-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 4px;
}
.vl-stats {
  display: flex;
  gap: 10px;
  font-size: 0.6875rem;
  color: var(--text-muted);
}
.vl-use {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 4px 0;
}
.vl-use:hover { color: var(--primary); }
.vl-clone-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #f8faff 0%, #eef4ff 100%);
  border: 1px solid #dce8ff;
  border-radius: 12px;
  margin-bottom: 18px;
}
.vl-clone-banner strong { font-size: 1rem; display: block; margin-bottom: 4px; }
.vl-clone-banner p { font-size: 0.8125rem; color: var(--text-muted); margin: 0; }
.btn-dark {
  background: #111;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
}
.btn-dark:hover { background: #333; }
.vl-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.vl-empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.5; }
.vl-clone-dialog { max-width: 480px; }
.vl-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.vl-del {
  background: none;
  border: none;
  color: #999;
  font-size: 0.75rem;
  cursor: pointer;
}
.vl-del:hover { color: #e44; }
.vl-badge-personal {
  font-size: 0.625rem;
  background: #fff3e0;
  color: #e65100;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}
@media (max-width: 768px) {
  .vl-filters { margin-left: 0; justify-content: flex-start; }
  .vl-clone-banner { flex-direction: column; align-items: flex-start; }
}
