/* 口播工坊 · 深色玻璃质感 */
:root {
  --bg: #0a0c12;
  --card: rgba(36, 40, 54, 0.55);
  --card-solid: rgba(30, 34, 46, 0.62);
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.055);
  --text: #f3f4f6;
  --muted: #9aa3b5;
  --dim: #7a8499;
  --chip: rgba(255, 255, 255, 0.06);
  --chip-on: rgba(255, 255, 255, 0.14);
  --white: #f4f5f8;
  --ink: #12141a;
  --accent: #7dffd0;
  --radius: 14px;
  --radius-sm: 10px;
  --font: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --shadow-card:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; }

/* pywebview 无边框桌面窗口的自定义标题栏 */
.desktop-titlebar {
  display: none;
}
html.desktop-mode .desktop-titlebar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 0 10px 0 14px;
  background: rgba(10, 12, 18, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-app-region: drag;
  user-select: none;
}
.desktop-title {
  color: rgba(243, 244, 246, 0.62);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.desktop-window-actions {
  display: inline-flex;
  gap: 6px;
  -webkit-app-region: no-drag;
}
.desktop-window-actions button {
  width: 22px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(243, 244, 246, 0.68);
  font: 14px/20px sans-serif;
  cursor: pointer;
}
.desktop-window-actions button:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.desktop-window-actions button:last-child:hover { background: #d34f5f; }
html.desktop-mode body { padding-top: 30px; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    /* 左上翠绿光晕 —— 参考图主氛围 */
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(28, 120, 95, 0.55), transparent 58%),
    /* 右上褐灰光晕 */
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(95, 75, 55, 0.32), transparent 52%),
    /* 右侧冷蓝 */
    radial-gradient(ellipse 45% 40% at 92% 42%, rgba(55, 70, 120, 0.22), transparent 55%),
    /* 底部压暗 */
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(8, 10, 18, 0.9), transparent 55%),
    linear-gradient(165deg, #141820 0%, #0a0c12 42%, #08090e 100%);
}
.aurora::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 35% at 18% 18%, rgba(60, 180, 140, 0.12), transparent 70%),
    radial-gradient(ellipse 40% 30% at 82% 12%, rgba(140, 110, 70, 0.1), transparent 70%);
  filter: blur(40px);
}
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.topbar, .stepper, .workspace, .stage {
  position: relative;
  z-index: 1;
}
.workspace[hidden] { display: none !important; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px 0;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.linkish {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.linkish:hover {
  color: #c8e6dc;
}
.auth-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(240px, 42vw);
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(125, 255, 208, 0.22);
  background: rgba(125, 255, 208, 0.08);
  color: #e8f5f0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.auth-chip:hover {
  background: rgba(125, 255, 208, 0.14);
  border-color: rgba(125, 255, 208, 0.38);
}
.auth-chip-name {
  font-size: 13px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12em;
}
.auth-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(125, 255, 208, 0.35);
  background: linear-gradient(135deg, rgba(125, 255, 208, 0.18), rgba(125, 255, 208, 0.08));
  color: #e8faf3;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.auth-entry:hover {
  border-color: rgba(125, 255, 208, 0.55);
  background: linear-gradient(135deg, rgba(125, 255, 208, 0.26), rgba(125, 255, 208, 0.12));
  box-shadow: 0 6px 18px rgba(125, 255, 208, 0.12);
}
.btn-xs {
  width: auto !important;
  margin-top: 0 !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  min-height: 32px !important;
  white-space: nowrap;
  flex-shrink: 0;
}
.seg-2 {
  grid-template-columns: 1fr 1fr;
}
.seg-2 .seg-item {
  padding: 9px 8px;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}

/* 朗读方式：四卡片 */
.tts-pick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.tts-card {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 12px 12px 11px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s, box-shadow 0.14s, color 0.14s;
}
.tts-card:hover {
  border-color: rgba(125, 255, 208, 0.22);
  background: rgba(0, 0, 0, 0.38);
}
.tts-card.on {
  border-color: rgba(125, 255, 208, 0.45);
  background: linear-gradient(160deg, rgba(125, 255, 208, 0.12), rgba(0, 0, 0, 0.32));
  color: #eefaf5;
  box-shadow:
    0 0 0 1px rgba(125, 255, 208, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.28);
}
.tts-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.tts-card-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: inherit;
  white-space: nowrap;
}
.tts-card.on .tts-card-title {
  color: #fff;
}
.tts-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
.tts-badge.free {
  background: rgba(125, 255, 208, 0.16);
  color: #7dffd0;
}
.tts-badge.paid {
  background: rgba(255, 196, 120, 0.16);
  color: #ffc478;
}
.tts-card.on .tts-badge.free {
  background: rgba(125, 255, 208, 0.22);
}
.tts-card.on .tts-badge.paid {
  background: rgba(255, 196, 120, 0.22);
}
.tts-card-desc {
  font-size: 11px;
  line-height: 1.45;
  color: var(--dim);
  white-space: normal;
}
.tts-card.on .tts-card-desc {
  color: rgba(232, 245, 240, 0.78);
}
.tts-hint {
  margin-top: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.hidden {
  display: none !important;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 12, 14, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}
.modal[hidden] {
  display: none !important;
}
.auth-card {
  position: relative;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 28px 24px 24px;
  border-radius: 20px;
  border: 1px solid rgba(125, 255, 208, 0.22);
  background:
    linear-gradient(180deg, rgba(28, 42, 46, 0.98) 0%, rgba(16, 24, 28, 0.98) 100%);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
#auth-panel-guest,
#auth-panel-user {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
#auth-panel-guest[hidden],
#auth-panel-user[hidden] {
  display: none !important;
}
.auth-card-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.auth-card-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.auth-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-right: 32px;
}
.auth-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(125, 255, 208, 0.28);
  background: rgba(125, 255, 208, 0.1);
  color: var(--accent);
}
.auth-card-icon--ok {
  border-color: rgba(125, 255, 208, 0.4);
  background: rgba(125, 255, 208, 0.16);
}
.auth-card-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.auth-card-title {
  margin: 6px 0 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  color: #f4faf7;
}
.auth-card-user {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 750;
  color: #f4faf7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-bonus-line {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.65;
  color: rgba(125, 255, 208, 0.85);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
}
.auth-tabs[hidden] {
  display: none !important;
}
.auth-tab {
  min-height: 40px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.auth-tab.on {
  background: rgba(125, 255, 208, 0.14);
  color: #e8faf3;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-field[hidden] {
  display: none !important;
}
.auth-field input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.32);
  color: #e8f5f0;
  font-size: 14px;
}
.auth-field input::placeholder {
  color: var(--dim);
}
.auth-field input:focus {
  outline: none;
  border-color: rgba(125, 255, 208, 0.45);
  box-shadow: 0 0 0 3px rgba(125, 255, 208, 0.12);
}
.auth-error {
  min-height: 1.2em;
  margin: 0;
  color: #ff8f8f;
  font-size: 13px;
}
.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 4px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #3d9f84 0%, #2a7a66 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(61, 159, 132, 0.28);
}
.auth-submit:hover {
  filter: brightness(1.06);
}
.auth-forgot-link {
  display: inline-flex;
  align-self: center;
  margin: -4px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(125, 255, 208, 0.85);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-forgot-link[hidden] {
  display: none !important;
}
.auth-forgot-link:hover {
  color: #7dffd0;
}
.auth-footnote {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--dim);
  text-align: center;
}
.auth-quota-block {
  padding: 16px 16px 15px;
  border-radius: 14px;
  border: 1px solid rgba(125, 255, 208, 0.22);
  background: rgba(125, 255, 208, 0.08);
}
.auth-quota-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(125, 255, 208, 0.8);
}
.auth-quota-value {
  margin: 10px 0 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  color: #f4faf7;
}
.auth-quota-meta {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}
.auth-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 2px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.billing-card {
  width: min(440px, 100%);
  gap: 0;
}
.billing-card .auth-card-head {
  margin-bottom: 6px;
}
.billing-card .auth-card-title {
  margin: 0;
}
.billing-balance {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 650;
  color: rgba(125, 255, 208, 0.9);
}
.billing-lead {
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--dim);
}
.billing-section-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: none;
}
.billing-products {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.billing-paytypes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
}
.billing-paytype {
  padding: 10px 12px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.billing-paytype:hover {
  color: #e8faf3;
}
.billing-paytype.on {
  color: #e8faf3;
  background: rgba(125, 255, 208, 0.16);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}
.billing-orders-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.billing-orders-block[hidden] {
  display: none !important;
}
.billing-orders {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 132px;
  overflow: auto;
}
.billing-order-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 12px;
  color: #cfe8df;
}
.billing-order-row .st-fulfilled { color: var(--accent); font-weight: 700; }
.billing-order-row .st-pending { color: #f0c674; font-weight: 700; }
.billing-order-row .st-paid { color: #9ecbff; font-weight: 700; }
.billing-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 14px 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  color: #e8f5f0;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.billing-product:hover {
  border-color: rgba(125, 255, 208, 0.45);
  background: rgba(125, 255, 208, 0.1);
  transform: translateY(-1px);
}
.billing-product:active {
  transform: translateY(0);
}
.billing-product:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.billing-product-chars {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.billing-product-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--dim);
}
.billing-product-aside {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.billing-product-price {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #f4faf7;
}
.billing-product-cta {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}
.billing-product:hover .billing-product-cta {
  color: #9dffdf;
}
.billing-product:disabled .billing-product-cta {
  color: var(--dim);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.min-w-0 { min-width: 0; }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  display: inline-flex;
}
.brand-mark svg {
  width: 38px;
  height: 38px;
  display: block;
}
.logo {
  font-family: "Songti SC", "Noto Serif SC", "STSong", "Songti TC", serif;
  font-weight: 700;
  font-size: 23px;
  letter-spacing: 0.14em;
  line-height: 1.05;
  color: #f4f1ea;
}
.brand-tag {
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: lowercase;
  color: rgba(244, 241, 234, 0.48);
  white-space: nowrap;
}
.hub-link {
  margin-left: 2px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(244, 241, 234, 0.42);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.12s;
}
.hub-link:hover {
  color: rgba(244, 241, 234, 0.82);
}
.hub-link:focus-visible {
  outline: 2px solid rgba(244, 241, 234, 0.35);
  outline-offset: 3px;
  border-radius: 4px;
}
.linkish {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}
.linkish:hover { color: #fff; }
.muted { color: var(--muted); font-size: 13px; }

/* —— 步骤条（无胶囊底，横向散开） —— */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  width: 100%;
  max-width: 1320px;
  margin: 8px auto 20px;
  padding: 10px 28px 16px;
  flex-wrap: nowrap;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.4;
  min-width: 0;
  padding: 0 4px;
  flex: 0 1 auto;
  transition: opacity 0.15s;
  cursor: pointer;
}
.step.active {
  opacity: 1;
}
.step.has-result {
  opacity: 0.85;
  cursor: pointer;
}
.step.has-result:hover {
  opacity: 1;
}
.step.has-result .step-num {
  border-color: rgba(125, 255, 208, 0.55);
  color: #7dffd0;
}
.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
  background: transparent;
}
.step.active .step-num {
  background: #fff;
  border-color: #fff;
  color: #111;
  box-shadow: none;
}
.step-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.step-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.2;
}
.step.active .step-title { color: #fff; }
.step-desc {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.3;
  white-space: nowrap;
}
.step.active .step-desc {
  color: rgba(255, 255, 255, 0.6);
}
.step-arrow {
  flex: 1 1 96px;
  min-width: 64px;
  max-width: none;
  text-align: center;
  font-size: 11px;
  letter-spacing: 3px;
  user-select: none;
  padding: 0 16px;
  color: transparent;
  background: linear-gradient(90deg, rgba(255,255,255,0.4), rgba(255,255,255,0.06));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* —— 主工作区 —— */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.85fr);
  gap: 12px;
  padding: 0 20px 16px;
  max-width: 1320px;
  margin: 0 auto;
}
.script-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.45fr);
  gap: 22px;
  align-items: stretch;
  min-height: min(62vh, 560px);
}
.script-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.script-main .script {
  flex: 1;
  min-height: 280px;
  max-height: none;
  height: 100%;
}
.script-editor-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.script-editor-wrap:focus-within {
  border-color: rgba(125, 255, 208, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(125, 255, 208, 0.08);
}
.script-editor-wrap .script {
  width: 100%;
  padding-bottom: 40px;
  box-sizing: border-box;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 280px;
}
.script-editor-actions {
  position: absolute;
  left: 10px;
  bottom: 8px;
  z-index: 1;
  display: flex;
  gap: 6px;
  align-items: center;
}
.script-opt-pill {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 7px;
  background: rgba(8, 12, 16, 0.78);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(232, 236, 240, 0.7);
}
.script-opt-pill:hover:not(:disabled) {
  background: rgba(12, 18, 22, 0.92);
  border-color: rgba(125, 255, 208, 0.28);
  color: #fff;
}
.script-opt-pill.on {
  background: rgba(125, 255, 208, 0.12);
  border-color: rgba(125, 255, 208, 0.32);
  color: #7dffd0;
}
.script-opt-pill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.script-char-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 1;
  pointer-events: none;
  font-size: 11px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: rgba(232, 236, 240, 0.55);
  background: rgba(8, 12, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 5px 9px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.script-topic-row {
  margin: 0 0 12px;
}
.script-topic-combo-wrap {
  min-width: 0;
}
.topic-combo {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: visible;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.topic-combo:focus-within,
.topic-combo.open {
  border-color: rgba(125, 255, 208, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(125, 255, 208, 0.1),
    0 10px 28px rgba(0, 0, 0, 0.28);
}
.topic-combo-input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  border-radius: 0 10px 10px 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-left: 12px;
}
.topic-combo-trigger {
  flex: 0 0 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, rgba(125, 255, 208, 0.12), rgba(125, 255, 208, 0.04));
  color: rgba(184, 255, 232, 0.92);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.topic-combo-trigger:hover,
.topic-combo.open .topic-combo-trigger {
  background: linear-gradient(180deg, rgba(125, 255, 208, 0.2), rgba(125, 255, 208, 0.08));
  color: #d8fff0;
}
.topic-combo-ico {
  display: inline-flex;
  opacity: 0.92;
}
.topic-combo-caret {
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4.5px solid currentColor;
  opacity: 0.75;
  transition: transform 0.14s;
}
.topic-combo.open .topic-combo-caret {
  transform: rotate(180deg);
}
.topic-combo-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: min(42vh, 300px);
  overflow-y: auto;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(125, 255, 208, 0.16);
  background: rgba(10, 14, 20, 0.96);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.topic-combo-menu[hidden] {
  display: none !important;
}
.topic-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  padding: 10px 11px;
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.topic-option:hover {
  background: rgba(255, 255, 255, 0.06);
}
.topic-option.on {
  background: rgba(61, 159, 132, 0.2);
  color: #b8ffe8;
  box-shadow: inset 0 0 0 1px rgba(125, 255, 208, 0.18);
}
.topic-option-custom {
  color: rgba(125, 255, 208, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px 9px 0 0;
  margin-bottom: 4px;
  padding-bottom: 11px;
  font-weight: 650;
}
.script-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(165deg, rgba(125, 255, 208, 0.05), transparent 42%),
    rgba(8, 10, 16, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.22);
  max-height: min(68vh, 640px);
  overflow: auto;
}
.script-side-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.script-side-head .field-label {
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}
.script-side .sg-pick {
  position: relative;
  width: 100%;
  max-width: none;
}
.script-side .sg-pick .voice-trigger {
  min-height: 40px;
  font-size: 13px;
}
.script-side .sg-pick .voice-menu {
  right: 0;
  width: 100%;
  min-width: 0;
  z-index: 40;
}
.visual-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 22px;
  align-items: stretch;
  min-height: min(52vh, 480px);
}
.visual-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.visual-main .source-panel {
  flex: 1;
  display: none;
  min-height: 0;
}
.visual-main .source-panel.on {
  display: flex;
  flex-direction: column;
}
.visual-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 16, 0.38);
}
.styles-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.styles-visual .style {
  aspect-ratio: auto;
  max-height: none;
  min-height: 72px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.28);
}
.styles-visual .style-thumb {
  position: static;
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.styles-visual .style-name {
  position: static;
  padding: 0;
  background: none;
  font-size: 12px;
  text-align: center;
}
.styles-visual .style-soon-btn {
  min-height: 48px;
  opacity: 0.55;
  padding: 8px 6px;
}
.styles-visual .style-soon-btn .style-name {
  font-size: 11px;
}
.styles-visual .style-soon {
  position: static;
  margin: 0;
}
.styles-visual .style-soon-btn .style-thumb { display: none; }
.dropzone-lg {
  flex: 1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 20px;
  border-style: dashed;
  border-width: 1.5px;
  background:
    radial-gradient(600px 240px at 50% 0%, rgba(125, 255, 208, 0.08), transparent 70%),
    rgba(0, 0, 0, 0.22);
}
.media-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.media-stage.drag .media-lib {
  border-color: rgba(125, 255, 208, 0.45);
}
.media-stage.has-media .dropzone-lg {
  display: none;
}
.media-lib {
  flex: 1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
}
.media-lib[hidden] {
  display: none !important;
}
.media-lib-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.media-lib-count {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}
.media-lib-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.media-lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
  overflow: auto;
  align-content: start;
  min-height: 0;
  flex: 1;
}
.media-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.media-card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: #0a1014;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.media-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-card-thumb.is-empty {
  display: grid;
  place-items: center;
  color: var(--dim);
  font-size: 12px;
}
.media-card-dur {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.media-card-remove {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s;
}
.media-card:hover .media-card-remove,
.media-card:focus-within .media-card-remove {
  opacity: 1;
}
.media-card-name {
  font-size: 12px;
  color: rgba(232, 238, 242, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}
.dropzone-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(125, 255, 208, 0.75);
  font-weight: 650;
}
.dropzone-lg .dropzone-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.visual-soon-card {
  flex: 1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
}
.ratios-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.ratios-compact .ratio {
  padding: 8px 4px;
  font-size: 11px;
}
.editor-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
@media (max-width: 900px) {
  .script-split,
  .visual-split {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 14px;
  }
  .script-side {
    max-width: none;
    max-height: none;
    order: -1;
  }
  .script-main {
    order: 0;
  }
  .script-main .script,
  .script-editor-wrap .script {
    min-height: 42vh;
  }
  .dropzone-lg,
  .visual-soon-card {
    min-height: 200px;
  }
}

.card {
  position: relative;
  background: var(--card);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
/* 顶部高光边 —— 玻璃质感关键 */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.22) 20%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.22) 80%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}

.editor {
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.editor-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.title-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 2px 0;
}
.counter {
  color: var(--dim);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.editor-hint {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.script-gen-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.sg-pack-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.sg-pack-card {
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 10px 10px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.14s, background 0.14s, box-shadow 0.14s, color 0.14s;
}
.sg-pack-card:hover {
  border-color: rgba(125, 255, 208, 0.22);
  background: rgba(0, 0, 0, 0.38);
}
.sg-pack-card.on {
  border-color: rgba(125, 255, 208, 0.45);
  background: linear-gradient(160deg, rgba(125, 255, 208, 0.12), rgba(0, 0, 0, 0.32));
  color: #eefaf5;
  box-shadow:
    0 0 0 1px rgba(125, 255, 208, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.28);
}
.sg-pack-card .tts-card-top {
  gap: 6px;
}
.sg-pack-card .tts-card-title {
  font-size: 13px;
}
.sg-pack-card .tts-badge {
  font-size: 10px;
  padding: 1px 6px;
}
.sg-pack-card .tts-card-desc {
  font-size: 11px;
  line-height: 1.35;
  color: var(--dim);
}
.sg-pack-card.on .tts-card-title {
  color: #fff;
}
.sg-pack-card.on .tts-card-desc {
  color: rgba(232, 245, 240, 0.78);
}
.script-gen-points {
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
}
.sg-brief {
  margin: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.sg-brief-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  user-select: none;
}
.sg-brief-summary::-webkit-details-marker { display: none; }
.sg-brief-summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-right: 1.5px solid rgba(232, 236, 240, 0.55);
  border-bottom: 1.5px solid rgba(232, 236, 240, 0.55);
  transform: rotate(45deg);
  transition: transform 0.15s;
  flex-shrink: 0;
}
.sg-brief[open] .sg-brief-summary::after {
  transform: rotate(225deg);
  margin-top: 4px;
}
.sg-brief-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 12px 12px;
}
.show-sm { display: none; }
.hide-sm { }
.script-side select.field-input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(232,236,240,0.55) 50%),
    linear-gradient(135deg, rgba(232,236,240,0.55) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
.script-gen-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.script-gen-actions #sg-status {
  margin: 0;
  text-align: left;
  min-height: 1.2em;
}
.script-gen-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.script-gen-actions .btn-primary {
  flex: 0 0 auto;
}
.script-gen-topics {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow: auto;
  padding: 2px 0;
}
.script-gen-topic {
  text-align: left;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  cursor: pointer;
}
.script-gen-topic:hover {
  border-color: rgba(125, 255, 208, 0.28);
}
.script-gen-topic.on {
  border-color: rgba(125, 255, 208, 0.45);
  background: rgba(61, 159, 132, 0.16);
}
.script {
  flex: 1;
  width: 100%;
  resize: vertical;
  min-height: 280px;
  max-height: 520px;
  background: rgba(8, 10, 16, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.7;
  outline: none;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.script::placeholder { color: rgba(154, 163, 181, 0.65); }
.script:focus {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.45),
    0 0 0 3px rgba(255, 255, 255, 0.04);
}
.upload {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}
.upload:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }

/* —— 右侧 —— */
.side {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--card-solid);
}
.field-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.field-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: border-color 0.15s;
}
.field-input:focus {
  border-color: rgba(125, 255, 208, 0.25);
}
.field-note {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 9px;
  overflow: hidden;
  padding: 3px;
  border: 1px solid var(--line-soft);
}
.seg-5 {
  grid-template-columns: repeat(5, 1fr);
}
.seg-6 {
  grid-template-columns: repeat(6, 1fr);
}
.seg-item {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px 4px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 7px;
  transition: background 0.12s, color 0.12s;
}
.seg-item.on {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ratios {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.ratio {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  padding: 8px 4px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.ratio.on {
  border-color: rgba(255, 255, 255, 0.75);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06), 0 4px 14px rgba(0, 0, 0, 0.3);
}
.ratio-frame {
  border: 1.5px solid currentColor;
  border-radius: 2px;
  opacity: 0.9;
}
.r-916 { width: 12px; height: 22px; }
.r-45 { width: 14px; height: 18px; }
.r-34 { width: 15px; height: 20px; }
.r-23 { width: 14px; height: 21px; }
.r-11 { width: 18px; height: 18px; }
.r-43 { width: 20px; height: 15px; }
.r-169 { width: 24px; height: 14px; }
.r-219 { width: 26px; height: 11px; }
@media (max-width: 520px) {
  .ratios:not(.ratios-compact) {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 精简时间轴：固定刻度 */
.timeline {
  margin-top: 12px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.confirm-left .timeline {
  margin-top: 10px;
}
.timeline-dock.timeline {
  margin-top: 8px;
}
.tl-lane {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 6px;
}
.tl-lane-side {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.tl-lane-sw {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 8px;
  color: rgba(190, 200, 208, 0.7);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.tl-lane-sw:hover {
  color: rgba(232, 238, 242, 0.92);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}
.tl-lane-sw input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.tl-lane-ico {
  display: grid;
  place-items: center;
  pointer-events: none;
}
.tl-lane-ico svg {
  width: 16px;
  height: 16px;
}
.tl-lane-sw .tl-ico-mute {
  display: none;
}
.tl-lane-sw input:not(:checked) ~ .tl-lane-ico .tl-ico-wave {
  display: none;
}
.tl-lane-sw input:not(:checked) ~ .tl-lane-ico .tl-ico-mute {
  display: inline;
}
.tl-lane-sw input:checked ~ .tl-lane-ico {
  color: rgba(170, 210, 190, 0.95);
}
.tl-lane-sw input:not(:checked) ~ .tl-lane-ico {
  color: rgba(140, 150, 158, 0.55);
}
.tl-lane.is-off .timeline-track,
.tl-lane.is-off .timeline-audio-track,
.tl-lane.is-off .timeline-subs-track {
  opacity: 0.38;
}
.tl-lane-audio .tl-lane-sw,
.tl-lane-subs .tl-lane-sw {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.tl-lane-audio .tl-lane-ico svg,
.tl-lane-subs .tl-lane-ico svg {
  width: 14px;
  height: 14px;
}
.tl-lane-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--muted);
  writing-mode: horizontal-tb;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.timeline-track {
  position: relative;
  height: 64px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}
.timeline-audio-track,
.timeline-subs-track {
  position: relative;
  height: 22px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}
.tl-audio-clip {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 5px;
  background: linear-gradient(90deg, #3a5a8a 0%, #2a4068 55%, #243656 100%);
  border: 1px solid rgba(140, 180, 255, 0.4);
  color: #e8f0ff;
  font-size: 10px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
}
.tl-cue-audio,
.tl-cue-subs {
  position: absolute;
  top: 2px;
  bottom: 2px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  cursor: grab;
  user-select: none;
}
.tl-cue-audio {
  background: linear-gradient(90deg, #3a5a8a 0%, #2a4068 100%);
  border: 1px solid rgba(140, 180, 255, 0.45);
  color: #e8f0ff;
}
.tl-cue-subs {
  background: linear-gradient(90deg, #3d6b5a 0%, #2d5246 100%);
  border: 1px solid rgba(125, 255, 208, 0.4);
  color: #e8fff6;
}
.tl-cue-audio.on,
.tl-cue-subs.on {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
  z-index: 2;
}
.tl-cue-audio:active,
.tl-cue-subs:active {
  cursor: grabbing;
}
.tl-rate {
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(125, 255, 208, 0.18);
  color: #a8ffe8;
  font-size: 9px;
  font-weight: 700;
}
.tl-clip-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tl-clip-tools[hidden] {
  display: none !important;
}
.tl-speed-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.tl-speed-label select {
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  color: #e8eef2;
  font-size: 11px;
}
.tl-subs-clip {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 5px;
  background: linear-gradient(90deg, #3d6b5a 0%, #2d5246 55%, #244038 100%);
  border: 1px solid rgba(125, 255, 208, 0.35);
  color: #e8fff6;
  font-size: 10px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
}
.tl-lane-subs.is-editing .tl-subs-clip {
  box-shadow: 0 0 0 1px rgba(125, 255, 208, 0.55);
}
.tl-lane-audio[hidden],
.tl-lane-subs[hidden] {
  display: none !important;
}
.timeline-ruler {
  position: relative;
  height: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 4px;
  margin-left: 40px;
}
.timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fff;
  z-index: 5;
  pointer-events: auto;
  cursor: ew-resize;
}
.timeline-playhead::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 2px 2px 6px 6px;
  background: #fff;
}
.timeline-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.timeline-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #e8eef2);
}
.timeline-clock {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #7dffd0;
}
.timeline-meta {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.tl-add-btn {
  margin-left: 4px;
  height: 24px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(125, 255, 208, 0.35);
  background: rgba(125, 255, 208, 0.1);
  color: #c8fff0;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.tl-add-btn:hover {
  background: rgba(125, 255, 208, 0.22);
  border-color: rgba(125, 255, 208, 0.55);
}
.timeline-zoom {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.tl-zoom-btn {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #e8eef2;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.tl-zoom-btn:hover {
  background: rgba(125, 255, 208, 0.18);
  border-color: rgba(125, 255, 208, 0.45);
}
.tl-zoom-range {
  width: 88px;
  accent-color: #7dffd0;
  cursor: pointer;
}
.timeline-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 255, 208, 0.45) rgba(255, 255, 255, 0.06);
}
.timeline-scroll::-webkit-scrollbar {
  height: 8px;
}
.timeline-scroll::-webkit-scrollbar-track {
  margin: 0 2px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.timeline-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(125, 255, 208, 0.35), rgba(125, 255, 208, 0.55));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  min-width: 40px;
}
.timeline-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, rgba(125, 255, 208, 0.55), rgba(125, 255, 208, 0.8));
  background-clip: padding-box;
  border: 2px solid transparent;
}
.timeline-scroll::-webkit-scrollbar-corner {
  background: transparent;
}
.timeline-canvas {
  position: relative;
  min-height: 72px;
}
.tl-mark {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
  pointer-events: none;
}
.tl-clip {
  position: absolute;
  top: 4px;
  bottom: 4px;
  display: flex;
  align-items: stretch;
  border-radius: 8px;
  background: #12201e;
  border: 1px solid rgba(125, 255, 208, 0.35);
  color: #e8fff6;
  cursor: grab;
  user-select: none;
  touch-action: none;
  overflow: hidden;
  box-sizing: border-box;
}
.tl-clip.on {
  border-color: #7dffd0;
  box-shadow: 0 0 0 2px rgba(125, 255, 208, 0.25);
  z-index: 2;
}
.tl-film {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 0;
  pointer-events: none;
  background: #0d1614;
}
.tl-film img {
  flex: 1 0 0;
  min-width: 0;
  height: 100%;
  object-fit: cover;
  border-right: 1px solid rgba(0, 0, 0, 0.35);
}
.tl-film img:last-child {
  border-right: 0;
}
.tl-loop-gap {
  position: absolute;
  top: 4px;
  bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  pointer-events: none;
}
.tl-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  background: linear-gradient(
    180deg,
    rgba(8, 16, 14, 0.72) 0%,
    rgba(8, 16, 14, 0.2) 55%,
    rgba(8, 16, 14, 0.05) 100%
  );
  pointer-events: auto;
}
.tl-name {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.tl-dur {
  font-size: 10px;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.tl-handle {
  position: relative;
  z-index: 2;
  width: 10px;
  flex: 0 0 10px;
  padding: 0;
  border: 0;
  background: rgba(125, 255, 208, 0.28);
  cursor: ew-resize;
}
.tl-del {
  position: absolute;
  top: 3px;
  right: 12px;
  z-index: 3;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s;
}
.tl-clip:hover .tl-del,
.tl-clip.on .tl-del {
  opacity: 1;
}
.tl-del:hover {
  background: rgba(220, 70, 70, 0.9);
}
.tl-empty {
  position: absolute;
  inset: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px dashed rgba(125, 255, 208, 0.35);
  color: rgba(200, 255, 240, 0.7);
  font-size: 12px;
  pointer-events: none;
}
.timeline-scroll.tl-drop-hover {
  outline: 1px dashed rgba(125, 255, 208, 0.55);
  outline-offset: 2px;
  background: rgba(125, 255, 208, 0.06);
}
.tl-handle:hover,
.tl-handle:focus-visible {
  background: rgba(125, 255, 208, 0.55);
}
.tl-l { border-right: 1px solid rgba(0, 0, 0, 0.25); }
.tl-r { border-left: 1px solid rgba(0, 0, 0, 0.25); }

.styles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.styles-4 {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.style {
  position: relative;
  aspect-ratio: 16 / 11;
  max-height: 88px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: #111;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s;
}
.style:hover:not(:disabled) { transform: translateY(-1px); }
.style.on {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12), 0 6px 16px rgba(0, 0, 0, 0.35);
}
.style:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.25);
}
.style-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.style-bg {
  position: absolute;
  inset: 0;
}
.style-name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 4px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.55) 100%);
  border-radius: 0;
}
.style-soon {
  position: absolute;
  top: 4px; right: 4px;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.85);
  z-index: 1;
}
.s-broll { background: linear-gradient(160deg, #245a52, #0e1c24 55%, #1c3a32); }
.s-illus { background: linear-gradient(160deg, #6a3a5a, #2a1428 55%, #4a2840), radial-gradient(circle at 30% 30%, #ffb6c8, transparent 45%); }
.s-mecha { background: linear-gradient(160deg, #3a5070, #101820 55%, #2a3848); }
.s-dream { background: linear-gradient(160deg, #4050a0, #181828 55%, #503868); }
.s-classic { background: linear-gradient(160deg, #8a6a40, #2a2010 55%, #5a4830); }
.s-city { background: linear-gradient(160deg, #406080, #101820 55%, #304858); }

.source-panel { display: none; margin-bottom: 4px; }
.source-panel.on { display: block; }

.dropzone {
  display: block;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.dropzone:hover, .dropzone.drag {
  border-color: rgba(125, 255, 208, 0.45);
  background: rgba(125, 255, 208, 0.05);
  box-shadow: inset 0 0 0 1px rgba(125, 255, 208, 0.08);
}
.dropzone-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  word-break: break-all;
}
.dropzone-sub { color: var(--dim); font-size: 12px; line-height: 1.5; }

.btn-next {
  margin-left: auto;
  background: var(--white);
  color: var(--ink);
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 500;
}
.check.block { display: flex; padding-bottom: 0; }
.field-note.center { text-align: center; }
.editor.dim { opacity: 0.72; }
.side.focus {
  box-shadow:
    var(--shadow-card),
    0 0 0 1px rgba(125, 255, 208, 0.12);
}

.row2 {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}
.check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 10px;
  white-space: nowrap;
}

.btn-primary {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin-top: 0;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #e6e9f0 55%, #d8dce8 100%);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
  padding: 0 18px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.45),
    0 2px 0 rgba(255, 255, 255, 0.6) inset,
    0 -1px 0 rgba(0, 0, 0, 0.08) inset;
  transition: transform 0.12s, filter 0.12s, box-shadow 0.12s;
}
.btn-primary:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}
.side > .btn-primary {
  display: flex;
  width: 100%;
  margin-top: 6px;
}

/* —— 步骤 3：进度 / 预览舞台 —— */
.stage {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto 28px;
  padding: 28px 24px 32px;
  min-height: 420px;
}
.stage[hidden] { display: none !important; }
.stage-script,
.stage-visual,
.stage-confirm {
  max-width: 1320px;
  padding-left: 28px;
  padding-right: 28px;
}
.step-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}
.step-foot > .field-note {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.step-foot .btn-primary {
  flex: 0 0 auto;
  width: auto;
  min-width: 140px;
  margin: 0;
}
@media (max-width: 900px) {
  .step-foot {
    flex-wrap: wrap;
  }
  .step-foot .btn-primary {
    width: 100%;
  }
}

.confirm-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.confirm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 0;
}
.confirm-head-copy {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  min-width: 0;
}
.confirm-head-copy .preview-title {
  margin: 0;
  flex: 0 0 auto;
}
.confirm-head-copy .muted {
  margin: 0;
  font-size: 12px;
  color: var(--dim);
  line-height: 1.35;
}
.confirm-split {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.confirm-left {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 420px;
  max-width: 100%;
  flex: 0 0 auto;
}
.confirm-left .reel-stage {
  width: 100%;
  height: 420px;
}
.confirm-left .reel-meta[hidden] {
  display: none !important;
}
.confirm-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 0;
}
.confirm-lower-controls {
  display: grid;
  gap: 6px;
  margin-top: -4px;
}
.confirm-meta-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}
.confirm-meta-row .pad-row {
  width: max-content;
  max-width: 100%;
}
.confirm-meta-row .confirm-stats {
  min-width: 0;
}
.confirm-voice {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.audio-source-field { padding-bottom: 2px; }
.audio-source-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.audio-source-btn { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 58px; padding: 10px 12px; text-align: left; color: var(--muted); background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; cursor: pointer; transition: 160ms ease; }
.audio-source-btn:hover { color: #e8faf5; border-color: rgba(125,255,208,.34); transform: translateY(-1px); }
.audio-source-btn.on { color: #e8faf5; background: rgba(75,222,174,.12); border-color: rgba(125,255,208,.68); box-shadow: inset 0 0 0 1px rgba(125,255,208,.08), 0 8px 24px rgba(15,55,49,.18); }
.audio-source-btn > span:last-child { display: grid; gap: 3px; min-width: 0; }
.audio-source-btn strong { font-size: 13px; font-weight: 700; }
.audio-source-btn small { overflow: hidden; color: var(--dim); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.audio-source-btn.on small { color: rgba(232,250,245,.66); }
.audio-source-icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; color: #7dffd0; font-size: 19px; font-weight: 800; border: 1px solid rgba(125,255,208,.34); border-radius: 8px; }
.audio-source-icon.record-dot::before { content: ""; width: 10px; height: 10px; background: #ff7184; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,113,132,.13); }
.manual-audio-panel[hidden], #tts-actions[hidden], #tts-source-panel[hidden], #audio-upload-panel[hidden], #audio-record-panel[hidden] { display: none !important; }
.manual-audio-drop, .manual-record-panel { display: flex; flex-direction: column; align-items: stretch; gap: 14px; min-height: 98px; padding: 16px 18px; border: 1px dashed rgba(125,255,208,.36); border-radius: 12px; background: linear-gradient(110deg, rgba(75,222,174,.09), rgba(255,255,255,.025)); }
.manual-audio-control, .manual-record-control { display: flex; align-items: center; gap: 14px; min-width: 0; }
.manual-audio-main { display: flex; align-items: center; gap: 12px; min-width: 210px; padding: 10px 12px; color: #e8faf5; text-align: left; background: rgba(9,28,27,.55); border: 1px solid rgba(125,255,208,.2); border-radius: 9px; cursor: pointer; }
.manual-audio-main:hover { border-color: rgba(125,255,208,.62); }
.manual-audio-main > span:last-child, .record-copy { display: grid; gap: 4px; }
.manual-audio-main strong, .record-copy strong { font-size: 13px; }
.manual-audio-main small, .record-copy span { color: var(--dim); font-size: 11px; }
.manual-audio-main-icon { color: #7dffd0; font-size: 22px; font-weight: 800; }
.manual-audio-control > .field-note { margin: 0; }
.audio-preview-slot {
  width: 100%;
  min-width: 0;
}
.tts-preview-slot {
  margin-top: 10px;
}
.narration-preview {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.narration-preview .confirm-status {
  padding: 0 4px;
  font-size: 11px;
  line-height: 1.3;
}
.manual-record-panel { border-style: solid; }
.record-meter { display: flex; align-items: center; gap: 3px; height: 34px; }
.record-meter span { width: 3px; height: 10px; background: rgba(255,113,132,.55); border-radius: 2px; }
.record-meter.recording span { animation: record-wave 820ms ease-in-out infinite alternate; }
.record-meter.recording span:nth-child(2n) { animation-delay: 120ms; }
.record-meter.recording span:nth-child(3n) { animation-delay: 260ms; }
@keyframes record-wave { to { height: 30px; background: #ff7184; } }
.record-copy { min-width: 78px; margin-right: auto; }
.manual-record-panel .btn-primary.is-recording { color: #fff; background: rgba(190, 54, 76, .82); border-color: rgba(255, 145, 160, .8); }
.confirm-voice .field {
  margin: 0;
}
.confirm-voice .field-label {
  margin-bottom: 10px;
}
/* 确认页：朗读方式横向 4 档，选中项内联显示音色 */
.confirm-right .tts-pick {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}
.tts-card-wrap {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 5px;
  border-radius: 10px;
  transition: 160ms ease;
}
.tts-card-wrap.on {
  padding: 5px;
}
.confirm-right .tts-card {
  width: 100%;
  min-height: 52px;
  padding: 9px 10px;
  gap: 4px;
  justify-content: center;
}
.tts-card-voice {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.tts-card-voice-label {
  color: rgba(232, 250, 245, 0.74);
  font-size: 10px;
  font-weight: 700;
}
.tts-card-voice .voice-trigger,
.tts-card-voice .voice-slot-static {
  min-height: 32px;
  padding: 0 9px;
  font-size: 11px;
}
.confirm-right .tts-card-top {
  flex-wrap: wrap;
  gap: 5px 8px;
}
.confirm-right .tts-card-title {
  font-size: 13px;
}
.confirm-right .tts-badge {
  font-size: 10px;
  padding: 2px 6px;
}
.confirm-right .tts-card-desc {
  display: block;
  font-size: 10px;
  line-height: 1.25;
  color: var(--dim);
}
.confirm-right .tts-card.on .tts-card-desc {
  color: rgba(232, 250, 245, 0.72);
}
.confirm-right .tts-hint {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.timeline-dock {
  margin-top: 0;
  width: 100%;
}
.voice-rate-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}
.voice-rate-panel {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(125, 255, 208, 0.16);
  background: rgba(125, 255, 208, 0.045);
}
.voice-rate-actions > .btn-primary {
  align-self: center;
  white-space: nowrap;
}
.voice-rate-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.voice-rate-head .field-label {
  flex: 0 0 auto;
  margin: 0;
}
.voice-rate-tier .seg-6 {
  max-width: none;
  gap: 3px;
}
.voice-slot-static {
  display: flex;
  align-items: center;
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
}
.voice-rate-tier .tier-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.voice-pick.hidden,
.field-note.hidden,
#voice-browser-slot.hidden,
.voice-slot-static.hidden {
  display: none !important;
}
.confirm-stats {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 6px 12px;
  align-items: center;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.confirm-align-bar {
  order: 0;
}
.pad-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.pad-row[hidden] {
  display: none !important;
}
.pad-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(232, 236, 240, 0.82);
  cursor: pointer;
}
.pad-label {
  font-weight: 600;
  white-space: nowrap;
}
.pad-input {
  width: 4.2em;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 12, 16, 0.65);
  color: #e8eef2;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.pad-input:focus {
  outline: none;
  border-color: rgba(125, 255, 208, 0.35);
}
.pad-unit {
  color: var(--muted);
  font-size: 11px;
}
.pad-total {
  margin: 0;
  margin-left: auto;
}
.confirm-stats[hidden] {
  display: none !important;
}
.confirm-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
.confirm-stat .confirm-k {
  font-size: 11px;
  color: var(--muted);
}
.confirm-stat .confirm-v {
  font-size: 14px;
  font-weight: 750;
  color: #e8eef2;
  font-variant-numeric: tabular-nums;
}
.confirm-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.25;
  color: #f0c674;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.confirm-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.confirm-audio-label {
  flex: 0 0 auto;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.confirm-audio-inline {
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}
.audio-preview-slot .confirm-result {
  margin-top: 2px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}
.audio-preview-slot .confirm-audio-inline {
  margin-top: 0;
}
.timeline-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 8px;
}
.timeline-foot > .field-note {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.timeline-foot-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.reel-subs-tip {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--dim);
  line-height: 1.4;
  text-align: center;
}
.reel-subs-tip[hidden] {
  display: none !important;
}
.reel-subs-box {
  position: absolute;
  z-index: 4;
  box-sizing: border-box;
  min-width: 72px;
  padding: 6px 8px;
  border: 1.5px solid transparent;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}
.reel-subs-box[hidden] {
  display: none !important;
}
.reel-subs-box.is-selected {
  border-color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.12);
  cursor: move;
}
.reel-subs-box.is-selected.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.reel-subs-text {
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  pointer-events: none;
  text-shadow:
    0 0 2px #000,
    1px 0 1px #000,
    -1px 0 1px #000,
    0 1px 1px #000,
    0 -1px 1px #000,
    2px 2px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    -2px -2px 0 #000;
}
.reel-subs-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  z-index: 4;
  touch-action: none;
  opacity: 0;
  pointer-events: none;
}
.reel-subs-box.is-selected .reel-subs-handle {
  opacity: 1;
  pointer-events: auto;
}
.reel-subs-handle[data-h="nw"] { left: -6px; top: -6px; cursor: nwse-resize; }
.reel-subs-handle[data-h="ne"] { right: -6px; top: -6px; cursor: nesw-resize; }
.reel-subs-handle[data-h="sw"] { left: -6px; bottom: -6px; cursor: nesw-resize; }
.reel-subs-handle[data-h="se"] { right: -6px; bottom: -6px; cursor: nwse-resize; }
.reel-subs-handle-edge {
  width: 8px;
  height: 18px;
  border-radius: 999px;
  top: 50%;
  margin-top: -9px;
}
.reel-subs-handle[data-h="w"] { left: -4px; cursor: ew-resize; }
.reel-subs-handle[data-h="e"] { right: -4px; cursor: ew-resize; }
.timeline-foot .btn-primary {
  flex: 0 0 auto;
  min-width: 140px;
  margin: 0;
}
.timeline-foot .btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.timeline-foot .btn-primary.is-warn:disabled {
  opacity: 0.55;
  border-color: rgba(255, 186, 90, 0.45);
  color: rgba(255, 220, 170, 0.85);
}
.confirm-result {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.confirm-result[hidden] {
  display: none !important;
}
.confirm-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 24px;
  margin-top: 0;
}
.confirm-status {
  margin: 0;
  text-align: left;
  min-height: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sample-script {
  margin: -4px 0 0;
  opacity: 0.85;
  font-size: 12px;
  line-height: 1.45;
}
.reel-stage-wrap {
  position: relative;
  width: 420px;
  max-width: 100%;
  margin: 0 auto;
  flex: 0 0 auto;
}
.reel-stage {
  position: relative;
  width: 100%;
  height: 420px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #0a0b0f;
  border: 1px solid var(--line-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.reel-ratio-pick {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
}
.reel-ratio {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: rgba(232, 238, 242, 0.92);
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.reel-ratio::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid rgba(232, 238, 242, 0.7);
  margin-left: 1px;
}
.reel-ratio:hover,
.reel-ratio-pick.is-open .reel-ratio {
  background: rgba(0, 0, 0, 0.78);
  border-color: rgba(125, 255, 208, 0.35);
}
.reel-ratio-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 88px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(14, 16, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 2px;
}
.reel-ratio-menu[hidden] {
  display: none !important;
}
.reel-ratio-menu button {
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(232, 238, 242, 0.88);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: left;
  cursor: pointer;
}
.reel-ratio-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}
.reel-ratio-menu button.on {
  background: rgba(125, 255, 208, 0.16);
  color: #e8fff6;
}
.reel-frame {
  position: relative;
  width: 168px;
  height: 300px;
  background: #000;
  overflow: hidden;
  flex: 0 0 auto;
}
.reel-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}
.reel-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.reel-frame.has-media .reel-empty { display: none; }
.reel-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
}
.reel-meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}
.reel-bar {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 3px 6px;
  border-radius: 8px;
  background: rgba(8, 10, 14, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.reel-bar[hidden] {
  display: none !important;
}
.reel-frame:hover .reel-bar,
.reel-frame:focus-within .reel-bar,
.reel-frame.is-playing .reel-bar {
  opacity: 1;
  pointer-events: auto;
}
@media (hover: none) {
  .reel-frame.has-media .reel-bar {
    opacity: 1;
    pointer-events: auto;
  }
}
.reel-play {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-size: 9px;
  line-height: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  transition: background 0.12s ease;
}
.reel-play:hover {
  background: rgba(125, 255, 208, 0.22);
}
.reel-time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(232, 238, 242, 0.82);
  white-space: nowrap;
  min-width: 6.8em;
}
.reel-seek {
  flex: 1;
  min-width: 0;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  accent-color: #7dffd0;
}
.reel-seek:focus {
  outline: none;
}
.reel-seek:focus-visible {
  outline: 2px solid rgba(125, 255, 208, 0.55);
  outline-offset: 3px;
}
.reel-seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.reel-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border-radius: 50%;
  background: #7dffd0;
  border: none;
  box-shadow: 0 0 8px rgba(125, 255, 208, 0.35);
}
.reel-seek::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
}
.reel-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7dffd0;
  border: none;
}
.confirm-right {
  /* 上方已定义 flex 布局 */
  min-width: 0;
}
.confirm-grid {
  display: none; /* 已改用 confirm-stats */
}
.confirm-k {
  font-size: 11px;
  color: var(--muted);
}
.confirm-v {
  font-variant-numeric: tabular-nums;
}
.confirm-voice {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.confirm-voice .field {
  min-width: 0;
  margin: 0;
}
.confirm-voice .seg {
  width: 100%;
}
.voice-field {
  max-width: none;
}
.voice-pick {
  position: relative;
  width: 100%;
  min-width: 0;
}
.voice-rate-voice .voice-pick {
  max-width: 200px;
}
.voice-rate-voice .voice-slot-static {
  max-width: 200px;
}
.voice-rate-voice .voice-trigger {
  min-height: 40px;
}
.voice-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.12s, background 0.12s;
}
.voice-trigger:hover {
  border-color: rgba(125, 255, 208, 0.28);
  background: rgba(0, 0, 0, 0.45);
}
.voice-pick.open .voice-trigger {
  border-color: rgba(125, 255, 208, 0.35);
}
.voice-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
  transition: transform 0.12s;
}
.voice-pick.open .voice-caret {
  transform: rotate(180deg);
}
.voice-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 120;
  min-width: 100%;
  width: 100%;
  max-height: min(52vh, 360px);
  overflow-y: auto;
  padding: 4px;
  border-radius: 10px;
  background: rgba(22, 24, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 255, 208, 0.4) transparent;
}
.voice-menu::-webkit-scrollbar {
  width: 6px;
}
.voice-menu::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}
.voice-menu::-webkit-scrollbar-thumb {
  background: rgba(125, 255, 208, 0.35);
  border-radius: 999px;
  border: 1px solid transparent;
  background-clip: padding-box;
}
.voice-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(125, 255, 208, 0.55);
  background-clip: padding-box;
  border: 1px solid transparent;
}
.voice-menu::-webkit-scrollbar-corner {
  background: transparent;
}
.voice-menu[hidden] { display: none !important; }
.voice-option {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}
.voice-option:hover {
  background: rgba(125, 255, 208, 0.12);
  color: #fff;
}
.voice-option.on {
  background: rgba(125, 255, 208, 0.18);
  color: #7dffd0;
}
.confirm-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 24px;
  margin-top: 0;
}
.confirm-toolbar-slot {
  flex: 1;
  min-width: 0;
  min-height: 22px;
  display: flex;
  align-items: center;
}
.confirm-toolbar:has(#sample-status[hidden]) {
  display: none;
}
.confirm-toolbar-slot .field-note {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.confirm-toolbar-slot:has(.a-player:not([hidden])) .field-note {
  display: none;
}
.confirm-status {
  margin: 0;
  text-align: left;
  min-height: 1.4em;
  line-height: 1.45;
}
.btn-sm {
  width: auto !important;
  min-width: 0;
  min-height: 36px !important;
  margin-top: 0 !important;
  padding: 0 14px;
  font-size: 13px;
  flex-shrink: 0;
}
.confirm-sample audio,
.confirm-audio audio {
  display: none;
}
.a-player {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.a-player-sm {
  margin-top: 0;
  padding: 3px 7px;
  gap: 7px;
}
.a-player-sm .a-play {
  width: 24px;
  height: 24px;
}
.a-player[hidden] { display: none !important; }
.a-play {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
  transition: background 0.12s, transform 0.12s;
}
.a-play:hover {
  background: rgba(125, 255, 208, 0.22);
  transform: scale(1.04);
}
.a-ico-pause { letter-spacing: -1px; font-size: 10px; }
.a-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 70px;
}
.a-seek {
  flex: 1;
  min-width: 0;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.a-seek:focus { outline: none; }
.a-seek:focus-visible {
  outline: 2px solid rgba(125, 255, 208, 0.55);
  outline-offset: 3px;
}
.a-seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.a-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border-radius: 50%;
  background: #7dffd0;
  border: none;
  box-shadow: 0 0 8px rgba(125, 255, 208, 0.35);
}
.a-seek::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
}
.a-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7dffd0;
  border: none;
}

.confirm-result[hidden] { display: none !important; }

.progress-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 16px 20px;
  gap: 12px;
}
.progress-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.progress-title {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}
.progress-status {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  min-height: 1.4em;
}
.progress-elapsed {
  margin: 0;
  max-width: 420px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--dim);
}
.progress-track {
  width: min(360px, 80%);
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.progress-bar {
  height: 100%;
  width: 8%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(125, 255, 208, 0.5), #7dffd0);
  transition: width 0.45s ease;
}
.progress-steps {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.progress-steps li {
  font-size: 13px;
  color: var(--dim);
  position: relative;
  padding-left: 16px;
}
.progress-steps li[hidden] {
  display: none !important;
}
.progress-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.progress-steps li.on {
  color: #fff;
}
.progress-steps li.on::before {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(125, 255, 208, 0.45);
}
.progress-steps li.done {
  color: var(--muted);
}
.progress-steps li.done::before {
  background: rgba(125, 255, 208, 0.55);
}

.preview-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.preview-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.preview-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.preview-save {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.preview-save .field-label {
  margin: 0;
}
.preview-save-row {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.export-name {
  flex: 1;
  min-width: 0;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: #f4f1ea;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.01em;
}
.export-name:focus {
  outline: none;
  border-color: rgba(244, 241, 234, 0.42);
}
.export-name::placeholder {
  color: rgba(244, 241, 234, 0.32);
}
.preview-save .field-note {
  margin: 0;
}
@media (max-width: 640px) {
  .preview-save-row {
    flex-direction: column;
    align-items: stretch;
  }
}
.btn-ghost {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
}
.preview-player {
  display: flex;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  overflow: hidden;
  min-height: 320px;
}
.preview-player video {
  width: 100%;
  max-height: min(68vh, 640px);
  background: #000;
  display: block;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 50;
  background: rgba(20, 22, 30, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  max-width: min(90vw, 520px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.tts-card:focus-visible,
.auth-chip:focus-visible,
.auth-entry:focus-visible,
.auth-submit:focus-visible,
.style:focus-visible,
.ratio:focus-visible,
.seg-item:focus-visible,
.voice-trigger:focus-visible,
.reel-play:focus-visible,
.a-play:focus-visible {
  outline: 2px solid rgba(125, 255, 208, 0.65);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .workspace { grid-template-columns: 1fr; }
  .stepper {
    flex-wrap: nowrap;
    gap: 0;
    margin: 4px auto 12px;
    padding: 6px 12px 10px;
    justify-content: space-between;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .stepper::-webkit-scrollbar { display: none; }
  .step {
    flex: 1 1 0;
    gap: 6px;
    padding: 0;
    justify-content: center;
    min-width: 0;
  }
  .step-arrow { display: none; }
  .step-desc { display: none; }
  .step-title {
    font-size: 12px;
    white-space: nowrap;
  }
  .step-num {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
  .preview-head { flex-direction: column; }
  .confirm-split { grid-template-columns: 1fr; }
  .confirm-meta-row { grid-template-columns: 1fr; }
  .confirm-meta-row .pad-row { width: 100%; }
  .confirm-left { position: static; }
  .confirm-right .tts-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .confirm-right .tts-card { min-height: 64px; }
  .confirm-align-bar {
    grid-template-columns: 1fr 1fr;
  }
  .confirm-align-bar .confirm-hint {
    grid-column: 1 / -1;
  }
  .confirm-left {
    width: min(100%, 420px);
    margin: 0 auto;
  }
  .reel-stage-wrap {
    width: min(100%, 420px);
  }
  .reel-stage,
  .confirm-left .reel-stage {
    width: 100%;
    height: min(70vw, 420px);
  }
  .confirm-toolbar {
    flex-wrap: wrap;
  }
  .confirm-toolbar .btn-primary {
    margin-left: auto;
  }
  .timeline-foot {
    flex-wrap: wrap;
  }
  .timeline-foot-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .timeline-foot .btn-primary {
    min-width: 120px;
  }
  .seg-5 {
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
  }
  .seg-6 {
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
  }
  .tts-pick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 手机：减负、分区、吸底操作 */
@media (max-width: 720px) {
  .show-sm { display: block; }
  .hide-sm { display: none !important; }

  .topbar {
    padding: 8px 14px 0;
    gap: 8px;
  }
  .topbar-right .muted,
  .brand-tag,
  .hub-link {
    display: none;
  }
  .topbar-right {
    gap: 10px;
  }
  .brand-text .logo {
    font-size: 15px;
  }

  .stage,
  .stage-script,
  .stage-visual,
  .stage-confirm {
    margin-bottom: 16px;
    padding: 16px 14px 18px;
    min-height: 0;
    border-radius: 12px;
  }

  .confirm-panel {
    gap: 14px;
  }
  .confirm-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .confirm-head-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    min-width: 0;
  }
  .confirm-head-copy .preview-title {
    font-size: 20px;
    writing-mode: horizontal-tb;
    white-space: normal;
  }
  .confirm-head-copy .muted {
    writing-mode: horizontal-tb;
    white-space: normal;
    max-width: 100%;
  }
  .confirm-head .preview-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .confirm-head .preview-actions .btn-ghost {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    justify-content: center;
  }

  .visual-split {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .visual-side {
    order: -1;
    gap: 10px;
    padding: 12px;
  }
  .visual-main {
    order: 0;
    min-height: 0;
  }
  .styles-visual {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .styles-visual .style {
    min-height: 0;
    padding: 7px 4px;
    gap: 3px;
  }
  .styles-visual .style-thumb {
    width: 20px;
    height: 20px;
  }
  .styles-visual .style-name {
    font-size: 10px;
    line-height: 1.2;
  }
  .styles-visual .style-soon-btn {
    min-height: 0;
    padding: 8px 4px;
  }
  .styles-visual .style-soon-btn .style-name {
    font-size: 10px;
  }
  .styles-visual .style-soon {
    font-size: 9px;
    padding: 0 4px;
  }
  .ratios,
  .ratios-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .ratios-compact .ratio {
    padding: 6px 2px;
    font-size: 10px;
    gap: 3px;
  }
  .ratios .ratio-frame {
    transform: scale(0.85);
  }
  .dropzone-lg,
  .visual-soon-card {
    min-height: 140px;
  }
  .media-stage.has-media {
    min-height: 0;
  }
  .media-lib {
    min-height: 0;
  }
  .media-lib-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .confirm-split {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .confirm-right {
    order: -1;
    gap: 10px;
    width: 100%;
  }
  .confirm-left {
    order: 0;
    width: 100%;
    margin: 0;
  }
  .confirm-voice,
  .confirm-voice .field {
    width: 100%;
  }
  .reel-stage-wrap {
    width: 100%;
  }
  .reel-stage,
  .confirm-left .reel-stage {
    height: min(58vw, 320px);
  }
  .confirm-voice {
    gap: 10px;
  }
  .confirm-voice .field {
    gap: 0;
  }
  .confirm-voice .field-label {
    margin-bottom: 6px;
  }
  .confirm-right .tts-pick {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .audio-source-seg { gap: 5px; }
  .audio-source-btn { min-height: 52px; padding: 7px 5px; gap: 5px; justify-content: center; }
  .audio-source-btn > span:last-child { text-align: center; }
  .audio-source-btn strong { font-size: 11px; }
  .audio-source-btn small { display: none; }
  .audio-source-icon { flex-basis: 22px; width: 22px; height: 22px; font-size: 15px; border-radius: 6px; }
  .manual-audio-drop, .manual-record-panel { min-height: 0; padding: 12px; gap: 10px; }
  .manual-audio-control, .manual-record-control { flex-wrap: wrap; gap: 10px; }
  .manual-audio-main { flex: 1 1 100%; min-width: 0; }
  .manual-audio-control > .field-note { flex: 1 1 100%; }
  .manual-record-panel .record-copy { margin-right: auto; }
  .confirm-right .tts-card {
    min-height: 0;
    width: 100%;
    padding: 8px 4px;
    gap: 4px;
    align-items: center;
    text-align: center;
  }
  .confirm-right .tts-card-top {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
  }
  .confirm-right .tts-card-title {
    font-size: 11px;
    line-height: 1.2;
  }
  .confirm-right .tts-badge {
    font-size: 9px;
    padding: 1px 5px;
  }
  .confirm-right .tts-card-desc {
    display: none;
  }
  .confirm-right .tts-hint {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.4;
  }
  .tts-card-wrap.on {
    padding: 6px;
  }
  .tts-card-voice-label {
    font-size: 10px;
  }
  .voice-rate-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .voice-rate-panel {
    gap: 6px;
    margin-top: 8px;
    padding: 6px 8px;
  }
  .voice-rate-actions > .btn-primary {
    width: 100%;
  }
  /* 音色 / 语速：标题与控件同一行，控件拉满剩余宽度 */
  .voice-rate-voice,
  .voice-rate-tier {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 6px;
    align-items: center;
    width: 100%;
  }
  .voice-rate-voice .field-label,
  .voice-rate-tier .field-label {
    margin: 0;
    white-space: nowrap;
    font-size: 13px;
  }
  .voice-rate-tier .field-label .tag {
    display: none;
  }
  .voice-rate-voice .voice-pick,
  .voice-rate-voice .voice-slot-static,
  .voice-rate-tier .seg-6 {
    grid-column: 2;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .voice-rate-voice .voice-slot-static {
    min-height: 40px;
    padding: 0 12px;
    font-size: 12px;
  }
  .voice-rate-voice .voice-trigger {
    min-height: 40px;
    width: 100%;
  }
  .voice-rate-tier .tier-note {
    grid-column: 1 / -1;
    margin: 0;
  }
  .voice-rate-panel .seg-6,
  .confirm-right .seg-6 {
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 3px;
  }
  .confirm-right .seg-item {
    padding: 8px 2px;
    font-size: 11px;
    min-width: 0;
  }
  .confirm-toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: center;
  }
  .confirm-toolbar-slot {
    min-width: 0;
  }
  .confirm-result {
    flex-wrap: wrap;
    gap: 5px;
  }
  .confirm-audio-label {
    width: 100%;
  }
  .confirm-hint,
  .confirm-status {
    white-space: normal;
  }
  .script-split {
    gap: 12px;
  }
  .script-side {
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
  }
  .script-side-head {
    margin-bottom: 0;
  }
  .sg-pack-card {
    padding: 8px 8px 7px;
    gap: 2px;
  }
  .sg-pack-card .tts-card-title {
    font-size: 12px;
  }
  .sg-pack-card .tts-card-desc {
    font-size: 10px;
  }
  .sg-pack-card .tts-badge {
    font-size: 9px;
    padding: 1px 5px;
  }
  .script-gen-actions-row {
    width: 100%;
  }
  .script-gen-actions .btn-primary {
    width: 100%;
    min-height: 42px;
    margin: 0;
  }
  .script-gen-points {
    min-height: 64px;
  }

  .script-editor-wrap {
    border-radius: 12px;
    overflow: hidden;
  }
  .script-main .script,
  .script-editor-wrap .script {
    min-height: min(48vh, 420px);
    font-size: 15px;
    line-height: 1.65;
  }

  .step-foot {
    position: sticky;
    bottom: 0;
    z-index: 8;
    margin: 4px -14px -6px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    background: linear-gradient(180deg, rgba(12, 14, 18, 0) 0%, rgba(12, 14, 18, 0.88) 28%, rgba(12, 14, 18, 0.96) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .step-foot > .field-note {
    display: none;
  }
  .step-foot .btn-primary,
  .step-foot .btn-ghost {
    width: 100%;
    min-height: 44px;
  }

  .toast {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 24px);
  }
}
