/* 清新工具风 · PC 优先 */
:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --border: #e4e7ec;
  --text: #1d2129;
  --muted: #86909c;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --success: #00b578;
  --warning: #ff7d00;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  /* 与 body 14px 对齐：表单主按钮、弹窗底部按钮、内联链接按钮统一 */
  --wb-btn-font-size: 14px;
  --wb-btn-line-height: 1.25;
  --wb-btn-min-height: 38px;
  --wb-btn-radius: 4px;
  --wb-btn-font-weight: 500;
  /* 主按钮：与参考库网格「+」悬停同系 indigo */
  --wb-btn-primary-bg: rgb(99, 102, 241);
  --wb-btn-primary-bg-hover: rgb(129, 140, 248);
  --wb-btn-primary-bg-active: rgb(79, 70, 229);
  /* 品牌强调：与其它页 #a5b4fc 边线、indigo 字/面一致（勿用警告橙） */
  --wb-brand: #6366f1;
  --wb-brand-hover: #818cf8;
  --wb-brand-ink: #4338ca;
  --wb-brand-rgb: 99, 102, 241;
  --wb-brand-soft: rgba(165, 180, 252, 0.35);
  --wb-brand-muted-bg: #eef2ff;
  --wb-brand-border: #a5b4fc;
  --wb-token-bg: #e0e7ff;
  --wb-token-fg: #4338ca;
}

/* 原生单选/多选圆点与勾选颜色（提需方式、优化范围勾选等） */
input[type='radio'],
input[type='checkbox'] {
  accent-color: var(--wb-brand);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}

body.viewer-mode [data-owner-only],
body.closed-variant-mode [data-owner-only] {
  opacity: 0.45;
  pointer-events: none;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-shell.is-hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(165deg, #ede9fe 0%, #f0f2f5 45%, #eef2ff 100%);
}

.login-screen.is-hidden {
  display: none !important;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 28px 26px 26px;
}

.login-card__brand {
  text-align: center;
  margin-bottom: 22px;
}

.login-logo {
  display: inline-block;
  margin-bottom: 10px;
}

.login-card__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
}

.login-card__sub {
  margin: 0;
  font-size: 13px;
}

.login-form .field {
  margin-bottom: 14px;
}

.login-captcha__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.login-captcha__input {
  flex: 1 1 140px;
  min-width: 0;
}

.login-captcha__img-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.login-captcha__canvas {
  display: block;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: #fafbfc;
}

.login-hint {
  margin: 0 0 16px;
  line-height: 1.45;
}

.login-hint code {
  font-size: 12px;
  padding: 1px 6px;
  background: #fff;
  border-radius: 4px;
}

.login-actions {
  margin-top: 0;
  justify-content: stretch;
}

.login-submit {
  width: 100%;
  padding: 10px 16px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin-right: 4px;
}

.topbar__nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 6px 10px;
  border: none;
  border-radius: var(--wb-btn-radius);
  background: transparent;
  white-space: nowrap;
  box-shadow: none;
  transition: color 0.12s ease, background 0.12s ease;
}

.topbar__nav-link:hover {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  text-decoration: none;
}

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

/* 与 <a class="topbar__nav-link"> 对齐：勿用 font: inherit，否则会盖掉本类的 14px/600 */
button.topbar__nav-link {
  margin: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar__user {
  max-width: 240px;
}

.topbar__account {
  position: relative;
}

.topbar__account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 300px;
  margin: 0;
  padding: 6px 8px;
  border: none;
  border-radius: var(--wb-btn-radius);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  transition: color 0.12s ease, background 0.12s ease;
}

.topbar__account-trigger:hover {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  text-decoration: none;
}

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

.topbar__account-text {
  display: block;
  min-width: 0;
}

.topbar__account-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

.topbar__account-chev {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  align-self: center;
  font-size: 11px;
  line-height: 1;
  opacity: 0.55;
  transition: transform 0.15s ease;
}

.topbar__account-chev::before {
  content: '\25BE';
}

.topbar__account--open .topbar__account-chev {
  transform: rotate(-180deg);
}

.topbar__account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  padding: 6px;
  margin: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow);
  z-index: 40;
}

.topbar__account-logout-form {
  display: block;
  margin: 0;
  padding: 0;
}

.topbar__account-logout-form--divider {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.wb-change-password-dialog__error {
  margin-bottom: 12px;
}

.wb-change-password-dialog__error .wb-dismissible {
  margin-bottom: 0;
}

.wb-change-password-dialog {
  width: min(400px, calc(100vw - 32px));
  max-width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.wb-change-password-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.wb-change-password-dialog__form {
  padding: 20px 22px 22px;
  margin: 0;
}

.wb-change-password-dialog__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
}

.wb-change-password-dialog__hint {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.45;
}

.wb-change-password-dialog__field {
  display: block;
  margin: 0 0 14px;
  font-size: 13px;
}

.wb-change-password-dialog__label {
  display: block;
  margin: 0 0 6px;
  font-weight: 500;
}

.wb-change-password-dialog__field input,
.wb-change-password-dialog__field select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  background: var(--bg);
  color: var(--text);
}

.wb-change-password-dialog__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

/* 用户管理「创建账户」：侧滑抽屉（原 <dialog> 改为固定层，避免与原生弹层混用） */
.wb-mac-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.22s step-end;
}
.wb-mac-drawer[aria-hidden='false'] {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s step-start;
}
.wb-mac-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.wb-mac-drawer[aria-hidden='false'] .wb-mac-drawer__backdrop {
  opacity: 1;
}
.wb-mac-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  max-width: 100%;
  background: var(--surface, #ffffff);
  color: var(--text, #1d2129);
  border-left: 1px solid var(--border, #e4e7ec);
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}
.wb-mac-drawer[aria-hidden='false'] .wb-mac-drawer__panel {
  transform: translateX(0);
}
.wb-mac-drawer__bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  background: var(--bg, #f0f2f5);
  color: var(--text, #1d2129);
  border-bottom: 1px solid var(--border, #e4e7ec);
}
.wb-mac-drawer__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text, #1d2129);
  min-width: 0;
}
.wb-mac-drawer__bar .btn--icon {
  color: var(--text, #1d2129);
  border-color: transparent;
}
.wb-mac-drawer__bar .btn--icon:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.12);
  color: var(--text, #1d2129);
}
.wb-mac-drawer__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--surface, #ffffff);
}
.wb-mac-drawer__body .wb-change-password-dialog__form {
  padding: 18px 20px 22px;
}

/* 顶栏「任务提需」：侧滑抽屉（变体步骤页；内容见 batch_context_brief_panel） */
.wb-brief-drawer {
  position: fixed;
  inset: 0;
  z-index: 58;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.22s step-end;
}
.wb-brief-drawer[aria-hidden='false'] {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s step-start;
}
.wb-brief-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.wb-brief-drawer[aria-hidden='false'] .wb-brief-drawer__backdrop {
  opacity: 1;
}
.wb-brief-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100vw);
  max-width: 100%;
  background: var(--surface, #ffffff);
  color: var(--text, #1d2129);
  border-left: 1px solid var(--border, #e4e7ec);
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  outline: none;
}
.wb-brief-drawer[aria-hidden='false'] .wb-brief-drawer__panel {
  transform: translateX(0);
}
.wb-brief-drawer__bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  background: var(--bg, #f0f2f5);
  color: var(--text, #1d2129);
  border-bottom: 1px solid var(--border, #e4e7ec);
}
.wb-brief-drawer__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text, #1d2129);
  min-width: 0;
}
.wb-brief-drawer__bar .btn--icon {
  color: var(--text, #1d2129);
  border-color: transparent;
}
.wb-brief-drawer__bar .btn--icon:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.12);
  color: var(--text, #1d2129);
}
.wb-brief-drawer__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
.wb-brief-script-card {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 4px;
  padding: 12px 14px;
  background: var(--surface, #fff);
}
.wb-brief-drawer__body .wb-brief-variant-script {
  max-height: min(78vh, 52rem);
  overflow-y: auto;
  margin: 0;
}

.topbar__account-menu-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: none;
  border-radius: 4px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
}

.topbar__account-menu-item:hover {
  background: #f7f8fa;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.closed-banner {
  margin: 8px 0 0;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.closed-banner.is-hidden {
  display: none;
}

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

.topbar__titles {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 36px;
}

.logo,
img.logo.wb-brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  margin: 0;
  padding: 0;
  display: block;
  object-fit: contain;
  object-position: center center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.product-name {
  margin: 0;
  padding: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.product-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
  color: var(--muted);
}

.role-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.main {
  flex: 1;
  padding: 24px 28px 48px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.view {
  display: none;
  animation: fadeIn 0.28s ease;
}

.view--active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-head {
  margin-bottom: 20px;
}

.page-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
}

.page-head__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.page-head__title-row h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.wb-batch-brief-trigger {
  flex-shrink: 0;
}

/* 变体步骤页：时间轴放在标题下（取代「第 N 步」说明） */
.page-head:has(.variant-page-stepper) {
  margin-bottom: 18px;
}

.page-head:has(.variant-page-stepper) .page-head__title-row {
  margin-bottom: 10px;
}

.page-head .variant-page-stepper {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

/* 参考库三页：与 .gen-seedance-refmedia-shell 同用；本类仅作子选择器挂钩，Tab 视觉与生成页 Seedance 一致 */
.wb-ref-lib-with-tabs > .gen-seedance-refmedia-tabs a.gen-seedance-refmedia-tab,
.wb-ref-lib-with-tabs > .gen-seedance-refmedia-tabs a.gen-seedance-refmedia-tab:visited {
  text-decoration: none;
  color: inherit;
}

.wb-ref-lib-with-tabs > .panel {
  margin-top: 0;
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.wb-ref-lib-with-tabs > .wb-portrait-ref-hint {
  margin: 0;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.5;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-top: none;
  color: #92400e;
}

.wb-ref-lib-with-tabs > .gen-seedance-refmedia-tabs > :is(a, span, button).gen-seedance-refmedia-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wb-ref-lib-with-tabs > .gen-seedance-refmedia-tabs > a.gen-seedance-refmedia-tab:not(.gen-seedance-refmedia-tab--active) {
  color: var(--muted);
}

.wb-ref-lib-with-tabs > .gen-seedance-refmedia-tabs > button.gen-seedance-refmedia-tab:not(.gen-seedance-refmedia-tab--active) {
  color: var(--muted);
}

/* 步骤页 · 批次提需摘要：默认折叠；展开后分段切换，单块正文 */
.batch-context.batch-context--collapsible {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.batch-context--collapsible > summary {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--text);
}

.batch-context--collapsible > summary::-webkit-details-marker {
  display: none;
}

.batch-context__summary-lead {
  font-weight: 600;
  color: var(--text);
}

.batch-context__summary-hint {
  font-size: 12px;
  margin: 0;
}

.batch-context__summary .muted {
  margin-bottom: 0;
}

.batch-context__chev {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  line-height: 1;
}

.batch-context__chev::before {
  content: '展开 \25BE';
}

.batch-context--collapsible[open] .batch-context__chev::before {
  content: '收起 \25B4';
}

.batch-context__panel {
  border-top: 1px solid var(--border);
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.batch-context__state {
  position: fixed;
  left: 0;
  top: 0;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.batch-context__seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
}

.batch-context__seg-item {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.batch-context__seg-item:hover {
  color: var(--text);
  background: rgba(241, 245, 249, 0.9);
}

.batch-context__seg-item--warn {
  color: #92400e;
}

.batch-context__seg-item--reference {
  color: var(--wb-brand-ink);
}

#wb-bctx-theme:checked ~ .batch-context__seg label[for='wb-bctx-theme'],
#wb-bctx-benefits:checked ~ .batch-context__seg label[for='wb-bctx-benefits'],
#wb-bctx-constraints:checked ~ .batch-context__seg label[for='wb-bctx-constraints'],
#wb-bctx-reference:checked ~ .batch-context__seg label[for='wb-bctx-reference'] {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

#wb-bctx-constraints:checked ~ .batch-context__seg label[for='wb-bctx-constraints'] {
  color: #92400e;
  border-color: #fcd34d;
}

#wb-bctx-reference:checked ~ .batch-context__seg label[for='wb-bctx-reference'] {
  color: var(--wb-brand-ink);
  border-color: var(--wb-brand-border);
}

.batch-context__sheet {
  display: none;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.batch-context__prose {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #475569;
  word-break: break-word;
  max-height: 15rem;
  overflow-y: auto;
}

.batch-context__sheet--constraints .batch-context__prose {
  color: #78350f;
}

#wb-bctx-theme:checked ~ .batch-context__sheet--theme,
#wb-bctx-benefits:checked ~ .batch-context__sheet--benefits,
#wb-bctx-constraints:checked ~ .batch-context__sheet--constraints,
#wb-bctx-reference:checked ~ .batch-context__sheet--reference {
  display: block;
}

.batch-context__sheet--reference .batch-context__prose {
  max-height: min(60vh, 28rem);
}

@media (max-width: 480px) {
  .batch-context__chev {
    margin-left: 0;
    width: 100%;
    text-align: right;
  }

  .batch-context__seg {
    flex-direction: column;
  }

  .batch-context__seg-item {
    text-align: left;
  }
}

.page-head--row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.page-head--row h2 {
  margin: 0;
}

.muted {
  color: var(--muted);
  margin: 0 0 12px;
}

.small {
  font-size: 12px;
}

.btn,
a.btn,
a.btn:visited,
a.btn:hover,
a.btn:active,
button {
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--wb-btn-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-family: inherit;
  font-size: var(--wb-btn-font-size);
  line-height: var(--wb-btn-line-height);
  font-weight: var(--wb-btn-font-weight);
  min-height: var(--wb-btn-min-height);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s;
  box-sizing: border-box;
}

/* .btn 的 display:inline-flex 会盖掉原生 [hidden]{display:none}，否则带 .btn 的节点设 hidden 仍可见 */
.btn[hidden],
a.btn[hidden],
button.btn[hidden] {
  display: none !important;
}

.btn:hover:not(:disabled) {
  background: #f7f8fa;
  text-decoration: none;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  font-weight: 600;
  background: var(--wb-btn-primary-bg);
  border-color: var(--wb-btn-primary-bg);
  color: #fff;
  box-shadow:
    0 1px 2px rgba(99, 102, 241, 0.25),
    0 0 0 1px rgba(99, 102, 241, 0.12);
}

.btn--primary:hover:not(:disabled) {
  background: var(--wb-btn-primary-bg-hover);
  border-color: var(--wb-btn-primary-bg-hover);
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45);
  text-decoration: none;
}

.btn--primary:active:not(:disabled) {
  background: var(--wb-btn-primary-bg-active);
  border-color: var(--wb-btn-primary-bg-active);
}

.btn--ghost {
  background: transparent;
}

.btn--sm {
  padding: 7px 16px;
  min-height: 34px;
  font-size: var(--wb-btn-font-size);
  line-height: var(--wb-btn-line-height);
  font-weight: var(--wb-btn-font-weight);
}

.btn--icon {
  padding: 0;
  min-width: 36px;
  min-height: 36px;
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 300;
  border: none;
  background: transparent;
}

.btn:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.85);
  outline-offset: 2px;
}

.btn--primary:focus-visible {
  outline-color: var(--wb-btn-primary-bg-hover);
}

/* 外观：月亮 / 太阳；无边框按钮，仅图标 + 悬停弱底 */
.wb-theme-toggle__icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
}

.wb-theme-toggle__moon,
.wb-theme-toggle__sun {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

[data-wb-theme-toggle] .wb-theme-toggle__sun {
  display: none !important;
}

html[data-theme='dark'] [data-wb-theme-toggle] .wb-theme-toggle__moon {
  display: none !important;
}

html[data-theme='dark'] [data-wb-theme-toggle] .wb-theme-toggle__sun {
  display: block !important;
}

button.wb-theme-toggle[data-wb-theme-toggle] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: inherit;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.12s ease, opacity 0.12s ease;
}

button.wb-theme-toggle[data-wb-theme-toggle]:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text);
  opacity: 1;
}

button.wb-theme-toggle[data-wb-theme-toggle]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button.wb-theme-toggle[data-wb-theme-toggle]:active:not(:disabled) {
  transform: none;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.panel--inline {
  max-width: 520px;
}

/* 资料库卡片区、权限页「用户列表」等：panel 内首个 h3 取消 UA 上边距，与 .vag-asset-panel__head 内标题对齐；form-grid 表单仅收上边距由 gap 控距 */
.panel.scene-lib__grid-wrap > h3.form-section-title:first-child,
.panel.refvid-lib__grid-wrap > h3.form-section-title:first-child,
.panel.refaud-lib__grid-wrap > h3.form-section-title:first-child,
.panel.actor-lib__grid-wrap > h3.form-section-title:first-child,
.panel.uvr-page .uvr-panel__head .form-section-title {
  margin: 0;
}

.panel.form-grid > h3.form-section-title:first-child {
  margin-top: 0;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  border: none;
  margin: 0;
  padding: 0;
}

.form-row legend {
  font-weight: 600;
  margin-bottom: 10px;
}

/* 同一块内连续 .field（如核心利益点 → 制作要求与禁忌）：与 .form-grid 子块间距 16px 对齐 */
.form-block.form-block--field-gap-lg > .field + .field {
  margin-top: 16px;
}

/* 新建任务 · 脚本优化：后续字段标题与上方的空隙与 legend→首项一致（10px） */
.form-row.form-row--optimize-spacing > .field + .field {
  margin-top: 10px;
}
.form-row.form-row--optimize-spacing > .field + .wb-opt-locks-intro {
  margin: 10px 0 8px;
}
.form-row.form-row--optimize-spacing .check-row {
  display: block;
  margin: 0;
}
.form-row.form-row--optimize-spacing .check-row + .check-row {
  margin-top: 8px;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
  margin-bottom: 8px;
  cursor: pointer;
}

/* 新建任务 · 提需方式：选项与行尾帮助按钮同一行（可换行） */
.form-row__pill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 16px;
  row-gap: 8px;
}

.form-row__pill-row .radio-pill {
  margin-right: 0;
  margin-bottom: 0;
}

.form-row__pill-row .wb-help-icon-btn {
  align-self: center;
}

/* 行内帮助：悬停读 title；同类入口统一使用 .wb-help-icon-btn */
.wb-help-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.12s ease, background 0.12s ease;
}

.wb-help-icon-btn:hover:not(:disabled) {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

.wb-help-icon-btn:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.85);
  outline-offset: 2px;
}

.wb-help-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.wb-help-icon-btn svg {
  display: block;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span:first-child {
  font-weight: 500;
  font-size: 13px;
}

.hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}

.input {
  padding: 9px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font: inherit;
  background: #fafbfc;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus {
  outline: none;
  border-color: var(--wb-brand-border);
  box-shadow: 0 0 0 3px var(--wb-brand-soft);
  background: #fff;
}

.input--area {
  resize: vertical;
  min-height: 80px;
}

.input--script {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.step-panel--script.step-panel--active {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.script-editor-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: min(72vh, 820px);
}

.script-editor-wrap .input--script {
  flex: 1;
  width: 100%;
  min-height: min(68vh, 760px);
  resize: vertical;
  line-height: 1.6;
}

/* 分镜：紧凑卡片网格 + 弹窗编辑 */
.subcard__body--story {
  max-height: min(56vh, 520px);
  overflow-y: auto;
  padding-right: 2px;
}

.story-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.story-card-mini {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 176px;
  margin: 0;
  padding: 12px 12px 10px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.story-card-mini:hover {
  border-color: var(--wb-brand-border);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.story-card-mini:active {
  transform: translateY(1px);
}

.story-card-mini:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.story-card-mini__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

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

.story-card-mini__shot {
  font-weight: 700;
  font-size: 14px;
  color: var(--wb-brand);
}

.story-card-mini__idx {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.story-card-mini__refthumb {
  flex-shrink: 0;
}

.story-card-mini__refthumb img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.story-card-mini__line {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.45em * 2);
  flex-shrink: 0;
}

.story-card-mini__sub {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.4em * 2);
  flex-shrink: 0;
}

.story-card-mini__sub[hidden] {
  display: -webkit-box !important;
  visibility: hidden;
}

.story-card-mini__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 11px;
  color: var(--muted);
  margin-top: auto;
  flex-shrink: 0;
}

.story-card-mini__dur {
  font-weight: 600;
  color: var(--text);
}

.gen-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.gen-toolbar__start {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 220px;
}

/* 视频生成页：成片比例与「全选」同一行 */
.gen-toolbar__ratio-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.gen-toolbar__ratio-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.gen-toolbar__ratio-select {
  min-width: 5.5rem;
  max-width: 8rem;
  min-height: 32px;
  padding: 5px 28px 5px 10px;
  font-size: 13px;
  line-height: 1.3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: #fff;
  color: var(--text);
  cursor: pointer;
  box-sizing: border-box;
  vertical-align: middle;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M3 4.5L6 8l3-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.gen-toolbar__ratio-select:hover {
  border-color: rgba(99, 102, 241, 0.45);
}

.gen-toolbar__ratio-select:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.75);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.gen-toolbar__ratio-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted, #64748b);
  max-width: min(28rem, 100%);
}

/* 片段核验：重新生成确认弹窗内比例（单行） */
.wb-seg-ratio-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 8px;
  min-width: 0;
}

.wb-seg-ratio-field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #0f172a);
  white-space: nowrap;
}

.wb-seg-ratio-field__select {
  min-width: 5.5rem;
  max-width: 8rem;
  min-height: 32px;
  padding: 5px 28px 5px 10px;
  font-size: 13px;
  line-height: 1.3;
  border-radius: var(--radius);
  border: 1px solid var(--border, #e2e8f0);
  background-color: #fff;
  color: var(--text, #0f172a);
  cursor: pointer;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M3 4.5L6 8l3-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.wb-seg-ratio-field__select:hover {
  border-color: rgba(99, 102, 241, 0.45);
}

.wb-seg-ratio-field__select:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.75);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.wb-seg-ratio-field__hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted, #64748b);
  flex: 1 1 12rem;
  min-width: min(12rem, 100%);
}

.gen-toolbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 视频生成工具栏：纯文字按钮 */
.gen-toolbar__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  width: auto;
  height: auto;
  min-height: 36px;
  padding: 0.45rem 0.75rem;
}

.gen-toolbar__action-btn__text {
  white-space: nowrap;
}

.gen-toolbar__action-btn.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.gen-toolbar__action-btn--busy {
  opacity: 0.82;
}

.gen-toolbar__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}

.gen-toolbar--disabled {
  opacity: 0.45;
  pointer-events: none;
}

.gen-shot-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  align-items: stretch;
  padding-right: 2px;
}

/* 视频生成：左侧片段轨 + 右侧详情（由 gen.html 挂载 .gen-split-layout） */
.gen-shot-list:has(.gen-split-layout) {
  display: block;
  padding-right: 0;
}

.gen-split-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.gen-split-layout__rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
  min-width: 0;
}

.gen-rail-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafbfc;
  cursor: pointer;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.gen-rail-tile:focus-visible {
  outline: 2px solid var(--wb-brand);
  outline-offset: 2px;
}

.gen-rail-tile[aria-current='true'] {
  border-color: var(--wb-brand);
  box-shadow: 0 0 0 1px rgba(var(--wb-brand-rgb), 0.35);
}

.gen-split-layout__stage {
  min-width: 0;
}

.gen-shot-card--stage-pane {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  background: #fafbfc;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.gen-shot-card--stage-pane[hidden] {
  display: none !important;
}

.gen-rail-tile .gen-shot-teaser--rail,
.gen-rail-tile .gen-shot-teaser {
  cursor: inherit;
}

.gen-rail-tile .gen-shot-teaser--rail:hover,
.gen-rail-tile .gen-shot-teaser:hover {
  background: transparent;
}

/* 左侧小卡内层与轨同圆角，避免将来若有背景层时出现直角裁切圆角 */
.gen-rail-tile .gen-shot-card__teaser-row {
  border-radius: inherit;
  overflow: hidden;
}

.gen-split-layout .gen-shot-detail__bar {
  display: none;
}

/* 分栏下隐藏了顶栏，补上原先由 __bar 占掉的顶部留白 */
.gen-split-layout .gen-shot-detail {
  padding-top: 14px;
}

@media (max-width: 900px) {
  .gen-split-layout {
    grid-template-columns: 1fr;
  }
}

.gen-shot-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  background: #fafbfc;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.gen-shot-card--expanded {
  grid-column: 1 / -1;
  align-self: start;
}

.gen-shot-card--expanded .gen-shot-teaser {
  display: none;
}

.gen-shot-card__teaser-row {
  display: flex;
  align-items: center;
  flex: 1;
  min-height: 0;
}

.gen-shot-card__teaser-row .gen-shot-teaser {
  flex: 1;
  min-width: 0;
}

.gen-shot-teaser__cbwrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  align-self: stretch;
  padding: 0 0 0 12px;
}

.gen-shot-teaser__cbwrap label {
  display: flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.gen-shot-teaser__cbwrap input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

.gen-shot-card--expanded .gen-shot-teaser__cbwrap {
  display: none;
}

.gen-shot-teaser {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 12px 14px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  border-radius: inherit;
}

.gen-shot-teaser:hover {
  background: transparent;
}

.gen-shot-teaser:focus-visible {
  outline: 2px solid var(--wb-brand);
  outline-offset: 2px;
}

.gen-shot-teaser__main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.gen-shot-teaser__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  min-height: 1.5em;
}

.gen-shot-teaser__code {
  font-size: 15px;
  line-height: 1.25;
}

.gen-shot-teaser__dur {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.gen-shot-teaser__viz {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  /* 固定为两行高度：文案不足两行时留白，与多卡对齐（与 SC04 类两行情形一致） */
  min-height: calc(2 * 1.45em);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gen-shot-teaser__meta {
  margin: auto 0 0;
}

.gen-shot-teaser__chev {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.4;
  padding-top: 2px;
}

.gen-shot-detail {
  padding: 0 14px 14px;
}

.gen-shot-detail[hidden] {
  display: none !important;
}

.gen-shot-detail__bar {
  margin: 0 -14px 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--wb-hover-medium, var(--bg, #f3f4f6));
}

.gen-shot-card__hd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.gen-shot-card__hd strong {
  min-width: 0;
}

.gen-shot-card__status {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  line-height: 1.25;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.gen-shot-card__status--pending {
  background: #fff7e8;
  color: var(--warning);
}

.gen-shot-card__status--generating {
  background: var(--wb-brand-muted-bg);
  color: var(--wb-brand-ink);
}

.gen-shot-card__status--done {
  background: #e8ffea;
  color: var(--success);
}

.gen-shot-card__status--failed {
  background: #fde8e8;
  color: var(--danger, #cf222e);
  font-weight: 600;
}

.gen-rail-tile--failed {
  border-color: rgba(207, 34, 46, 0.45);
  background: rgba(207, 34, 46, 0.04);
}

.gen-shot-compare {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: visible;
  background: var(--surface, #fff);
}

.gen-shot-compare__col {
  min-width: 0;
  padding: 12px 14px;
  overflow: visible;
}

.gen-shot-compare__col--left {
  background: var(--surface, #fff);
}

.gen-shot-compare__col--right {
  border-left: 1px solid var(--border);
  background: var(--wb-hover-soft, var(--bg, #f8f9fb));
}

.gen-shot-compare__head {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border, #eef0f3);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.gen-shot-compare__head--seedance {
  display: block;
  border-bottom: none;
  padding-bottom: 0;
  margin: 0 0 8px;
  min-width: 0;
}

.gen-shot-compare__head-title {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gen-shot-compare__head--seedance .gen-shot-compare__head-title {
  display: block;
  white-space: normal;
  overflow: visible;
}

/* 参考图 / 参考视频：卡片式顶栏 Tab（与内容区顶边衔接） */
.gen-seedance-refmedia-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  margin: 0 0 8px;
}

.gen-seedance-refmedia-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 6px;
  padding: 4px 2px 0 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.gen-seedance-refmedia-tab {
  position: relative;
  z-index: 0;
  margin: 0 0 -1px;
  padding: 7px 14px 8px;
  border: 1px solid var(--border);
  border-radius: 4px 4px 0 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  background: var(--wb-hover-medium, #eef2f7);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.gen-seedance-refmedia-tab:hover:not(:disabled) {
  background: var(--wb-hover-on-elevated, #e2e8f0);
  color: var(--text);
}

.gen-seedance-refmedia-tab--active {
  z-index: 2;
  color: var(--accent);
  background: var(--surface, #fff);
  border-color: var(--border);
  border-top-width: 2px;
  border-top-color: var(--accent);
  border-bottom-color: var(--surface, #fff);
  padding-top: 6px;
}

.gen-seedance-refmedia-tab:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 1px;
}

.gen-seedance-refmedia-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gen-seedance-refmedia-tabpanel[hidden] {
  display: none !important;
}

.gen-seedance-refmedia-tabpanel:not([hidden]) {
  display: block;
}

@media (max-width: 900px) {
  .gen-shot-compare {
    grid-template-columns: 1fr;
  }

  .gen-shot-compare__col--right {
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

.gen-shot-original {
  margin-bottom: 12px;
  padding: 12px 14px;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.gen-shot-original--in-compare {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gen-shot-original__title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.gen-shot-original__meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.gen-shot-original__item {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 4px;
  background: var(--surface, #fff);
}

.gen-shot-original__item--meta {
  background: var(--surface-2, var(--bg, #f8fafc));
}

.gen-shot-original__item--main {
  background: linear-gradient(180deg, var(--wb-hover-soft, #f8fbff) 0%, var(--surface, #ffffff) 100%);
  border-color: rgba(var(--wb-brand-rgb, 99, 102, 241), 0.22);
}

.gen-shot-original__label {
  display: block;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted, #475569);
  margin-bottom: 5px;
}

.gen-shot-original__content {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  line-height: 1.66;
  font-size: 13px;
}

.gen-shot-original__item--meta .gen-shot-original__content {
  font-size: 13px;
  line-height: 1.66;
  white-space: normal;
  word-break: break-word;
}

@media (max-width: 1080px) {
  .gen-shot-original__meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .gen-shot-original__meta-grid {
    grid-template-columns: 1fr;
  }
}

.gen-shot-seedance-inline {
  margin: 0;
  padding: 0;
  background: transparent;
}

.gen-seedance-trunc {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--warning);
}

.gen-seedance-refstrip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.gen-seedance-refslots-row .gen-seedance-refstrip {
  flex-wrap: nowrap;
  margin-bottom: 0;
  max-width: 100%;
}

/* 生成页：已使用 / 未使用参考图同一行分区；状态色在缩略图圆/方框上 */
.gen-seedance-refslots-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 10px;
  min-width: 0;
}

.gen-seedance-refslots-bar .gen-seedance-refstrip--merged-refimg {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 10px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.gen-seedance-refslots-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.gen-seedance-refslot--ref-used .gen-seedance-refslot__thumb {
  border-width: 2px;
  border-color: #16a34a;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.2);
}

.gen-seedance-refslot--ref-unused .gen-seedance-refslot__thumb {
  border-width: 2px;
  border-color: #cbd5e1;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.gen-seedance-refsection__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 2px;
  line-height: 1.3;
}

/* 生成页：参考图 + 参考视频（与上方 Tab 连成卡片） */
.gen-seedance-refmedia-shell .gen-seedance-refmedia-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 12px 12px 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 4px 4px;
}

.gen-seedance-refmedia-shell > .gen-prompt-label {
  margin-top: 14px;
}

.gen-seedance-refmedia-shell > .gen-prompt-label:not([hidden]) {
  display: block;
}

.gen-seedance-refmedia-shell > .gen-prompt-label[hidden] {
  display: none !important;
  margin: 0;
}

/* 视频生成 · Seedance：参考模式 / 接上段 */
.gen-seedance-linkmode-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 10px;
  background: var(--bg, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 4px;
  min-width: 0;
}

/* 作者样式 display:flex 会盖掉 UA 对 [hidden] 的 display:none，与 .gen-seedance-linkmode-sub[hidden] 一致须显式隐藏 */
.gen-seedance-linkmode-bar[hidden] {
  display: none !important;
}

.gen-seedance-linkmode-bar--locked {
  opacity: 0.88;
  pointer-events: none;
}

.gen-seedance-linkmode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

/* 与 [hidden] 同用：勿与 .gen-seedance-linkmode-row 合并选择器，否则 display:flex 会盖掉 hidden 的 display:none */
.gen-seedance-linkmode-sub {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px 12px;
  min-width: 0;
  padding-top: 8px;
  margin-top: 2px;
  border-top: 1px solid var(--border);
}

.gen-seedance-linkmode-sub[hidden] {
  display: none !important;
  padding: 0;
  margin: 0;
  border: none;
}

.gen-seedance-linkmode-sub__lead {
  flex: 0 0 auto;
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
}

.gen-seedance-linkmode-sub__pills {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 8px;
  align-items: stretch;
}

.gen-seedance-linkmode-sub__pills .gen-seedance-linkmode-pill {
  flex: 1 1 0;
  justify-content: center;
  min-width: 0;
}

.gen-seedance-linkmode-row__label {
  flex: 0 0 auto;
  margin: 0;
  font-weight: 600;
}

.gen-seedance-linkmode-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface, #fff);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.gen-seedance-linkmode-pill:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}

.gen-seedance-linkmode-pill input {
  margin: 0;
}

.gen-seedance-refvisual {
  min-width: 0;
}

.gen-seedance-refmedia-stack > .gen-seedance-refslots-bar .gen-seedance-refstrip--merged-refimg {
  margin-bottom: 0;
}

.gen-seedance-refvideo-wrap--in-stack {
  margin-top: 0;
}

.gen-refvid-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  margin: 0 0 2px;
  min-width: 0;
}

.gen-refvid-toolbar__title {
  margin: 0 !important;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gen-refvid-toolbar__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.gen-refvid-toolbtn {
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface, #fff);
  color: var(--text, #334155);
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.gen-refvid-toolbtn:hover:not(:disabled) {
  background: var(--wb-hover-soft, #f1f5f9);
  border-color: rgba(var(--wb-brand-rgb, 99, 102, 241), 0.4);
  color: var(--accent);
}

.gen-refvid-toolbtn:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.55);
  outline-offset: 2px;
}

.gen-refvid-toolbtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gen-refvid-toolbtn--save:not([hidden]) {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.5);
  color: var(--accent);
}

.gen-refvid-toolbtn--save:not([hidden]):hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.18);
}

.gen-refvid-toolbtn__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.gen-refvid-toolbtn__ico svg {
  display: block;
}

.gen-seedance-refmedia-stack .gen-refvid-list {
  margin-top: 4px;
}

.gen-seedance-refslot {
  width: 88px;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
}

.gen-seedance-refslot:hover .gen-seedance-refslot__thumb {
  border-color: var(--wb-brand, #2563eb);
}

.gen-seedance-refslot--ref-used:hover .gen-seedance-refslot__thumb {
  border-color: #16a34a;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.28);
}

.gen-seedance-refslot--ref-unused:hover .gen-seedance-refslot__thumb {
  border-color: var(--wb-brand, #2563eb);
}

.gen-seedance-refslot {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gen-seedance-refslot:focus {
  outline: none;
}

.gen-seedance-refslot:focus-visible .gen-seedance-refslot__thumb {
  outline: 2px solid var(--wb-brand, #2563eb);
  outline-offset: 2px;
}

.gen-seedance-refslot__thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--wb-hover-medium, #f2f3f5);
  margin: 0 auto 4px;
}

.gen-seedance-refslot--actor .gen-seedance-refslot__thumb {
  border-radius: 999px;
}

.gen-seedance-refslot__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gen-seedance-refslot__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 14px;
  color: var(--muted);
}

.gen-seedance-refslot__badge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px 4px;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
}

.gen-seedance-refslot__role {
  display: block;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.gen-seedance-editor-wrap {
  position: relative;
  margin-bottom: 8px;
}

.gen-seedance-atpop {
  margin: 0 0 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface, #fff);
  box-shadow: var(--shadow, 0 6px 20px rgba(0, 0, 0, 0.08));
  max-height: 220px;
  overflow-y: auto;
}

.gen-seedance-atpop[hidden] {
  display: none !important;
}

.gen-seedance-atpop__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  text-align: left;
  font: inherit;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.gen-seedance-atpop__opt:hover {
  background: var(--wb-hover-soft, var(--wb-brand-muted-bg));
  color: var(--text);
}

.gen-seedance-atpop__opt--active,
.gen-seedance-atpop__opt.gen-seedance-atpop__opt--active:hover {
  background: var(--wb-hover-soft, var(--wb-brand-muted-bg));
  color: var(--text);
}

.gen-seedance-atpop__thumb {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.gen-seedance-atpop__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gen-seedance-atpop__txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gen-seedance-atpop__name {
  font-size: 13px;
  font-weight: 600;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: var(--wb-brand-ink);
}

.gen-seedance-atpop__sub {
  font-size: 11px;
  line-height: 1.35;
}

.gen-shot-compare .gen-prompt-pre {
  max-height: none;
  overflow-y: visible;
}

.gen-seedance-prompt-edit {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.55;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: var(--text);
  background: var(--surface-2, var(--surface, #fff));
  border: 1px solid var(--border);
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  resize: vertical;
  min-height: 160px;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
}

.gen-seedance-prompt-overlay {
  position: relative;
  margin: 0 0 10px;
}

.gen-seedance-prompt-overlay .gen-seedance-prompt-edit {
  margin: 0;
}

.gen-seedance-prompt-edit.gen-seedance-prompt-edit--overlay {
  position: relative;
  z-index: 2;
  background: transparent !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  caret-color: var(--text);
}

/* overlay 态：选区画在下层 mirror（.gen-seedance-prompt-overlay__sel），上层 textarea 勿铺灰底 */
.gen-seedance-prompt-edit.gen-seedance-prompt-edit--overlay::selection {
  background: transparent !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

.gen-seedance-prompt-edit.gen-seedance-prompt-edit--overlay::-moz-selection {
  background: transparent !important;
  color: transparent !important;
}

.gen-seedance-prompt-overlay__sel {
  background: rgba(99, 102, 241, 0.28);
  color: inherit;
  border-radius: 2px;
  padding: 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

html[data-theme='dark'] .gen-seedance-prompt-overlay__sel {
  background: rgba(165, 180, 252, 0.32);
}

.gen-seedance-prompt-overlay__backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid transparent;
  font-size: 12px;
  line-height: 1.55;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: var(--text);
  background: var(--surface-2, var(--surface, #fff));
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  overflow: auto;
  border-radius: 4px;
  pointer-events: none;
}

.gen-seedance-prompt-overlay__content {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  font: inherit;
  line-height: inherit;
}

.gen-seedance-prompt-overlay__token {
  display: inline;
  margin: 0;
  padding: 0;
  border-radius: 3px;
  background-color: var(--wb-token-bg);
  color: var(--wb-token-fg);
  font-weight: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.gen-ref-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 10px 12px;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 4px;
}

@media (max-width: 900px) {
  .gen-ref-strip {
    grid-template-columns: 1fr;
  }
}

.gen-ref-col__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.gen-ref-col__body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  min-height: 56px;
}

.gen-ref-col__body--actors {
  flex-direction: row;
}

.gen-ref-actor-item,
.gen-ref-scene-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: 100%;
}

.gen-ref-actor-name {
  font-size: 11px;
  color: var(--muted);
  text-align: left;
  line-height: 1.3;
  max-width: 88px;
  word-break: break-all;
}

.gen-ref-scene-name {
  font-size: 11px;
  color: var(--muted);
  text-align: left;
  line-height: 1.3;
  max-width: 88px;
  word-break: break-all;
}

.gen-ref-thumb {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--wb-hover-medium, var(--bg, #f2f3f5));
  flex-shrink: 0;
}

.gen-ref-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gen-ref-thumb--ref,
.gen-ref-thumb--scene {
  width: 72px;
  height: 72px;
  max-width: 100%;
}

.gen-ref-col:first-child .gen-ref-thumb {
  border-radius: 999px;
}

.gen-ref-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.gen-ref-thumb__ph {
  font-size: 11px;
  text-align: center;
  padding: 4px;
  line-height: 1.2;
}

.gen-prompt-label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--muted);
}

.gen-prompt-label strong {
  font-weight: 600;
  color: var(--accent);
}

.gen-prompt-label code {
  font-size: 11px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 500;
  padding: 1px 5px;
  margin: 0 1px;
  vertical-align: baseline;
  border-radius: 4px;
  color: var(--text);
  background: rgba(var(--wb-brand-rgb, 99, 102, 241), 0.08);
  border: 1px solid rgba(var(--wb-brand-rgb, 99, 102, 241), 0.2);
}

.gen-prompt-pre {
  margin: 0 0 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.55;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: var(--surface-2, var(--surface, #fff));
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow-y: auto;
}

.gen-prompt-store {
  display: none !important;
}

.gen-shot-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.step-panel__foot--gen {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* 各步骤底栏：进入下一步的主按钮右对齐（无旁白说明） */
.step-panel__foot--cta-end {
  justify-content: flex-end;
}

.modal__dialog--story-shot {
  width: min(720px, 94vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.modal__body--story {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-top: 8px;
}

.modal--story-readonly .input,
.modal--story-readonly .input--area {
  background: #f1f2f4;
  cursor: default;
}

.modal--story-readonly #wb-story-readonly-hint {
  margin: 0 0 12px;
}

.story-editor-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

@media (max-width: 560px) {
  .story-editor-form {
    grid-template-columns: 1fr;
  }
}

.story-editor-form .story-field--full {
  grid-column: 1 / -1;
}

/* 并行核验 · 编辑片段弹窗：纵向排布；只读元信息为一行小卡片 */
.story-editor-form--hub-modal {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.story-editor-form--hub-modal .story-editor-form__meta--cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.story-editor-form--hub-modal .story-meta-card {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.story-editor-form--hub-modal .story-meta-card__k {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.2;
}

.story-editor-form--hub-modal .story-meta-card__v {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  font-weight: 400;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

.story-editor-form--hub-modal .story-field--duration .input {
  max-width: 7.5rem;
}

@media (max-width: 520px) {
  .story-editor-form--hub-modal .story-editor-form__meta--cards {
    grid-template-columns: 1fr;
  }
}

.story-ref-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.story-ref-preview {
  display: block;
}

/* 全站统一：图片用右上角「×」移除 */
.img-drop-slot__frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}

.img-drop-slot__img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  border-radius: 4px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: #f7f8fa;
}

.img-drop-slot__clear {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  transition: background 0.15s;
  font-family: system-ui, sans-serif;
}

.img-drop-slot__clear:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.92);
}

.img-drop-slot__clear:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.story-ref-pick {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  width: fit-content;
}

.story-ref-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  opacity: 0;
}

.story-ref-pick__btn {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.story-ref-pick:hover .story-ref-pick__btn {
  border-color: var(--wb-brand-border);
  background: #f8fafc;
}

.story-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.story-field > span,
.story-field label > span:first-child {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.story-field--full {
  grid-column: 1 / -1;
}

.story-field textarea {
  width: 100%;
  min-height: 72px;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  background: #fafbfc;
  resize: vertical;
}

.story-field textarea:focus {
  outline: none;
  border-color: var(--wb-brand-border);
  background: #fff;
}

.story-field input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 13px;
  background: #fafbfc;
}

.story-field__note {
  margin: 0 0 6px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.input--sm {
  min-width: 160px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.form-block.is-hidden {
  display: none;
}

.batch-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.batch-overview-toolbar {
  margin: 0 0 10px;
}

.batch-overview-toolbar__stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: 960px;
}

.batch-overview-toolbar__k {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.batch-overview-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  width: 100%;
}

.batch-overview-toolbar__row .input {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 420px;
  width: auto;
}

.batch-overview-toolbar__mine {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.batch-overview-toolbar__mine input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}

.batch-overview-meta {
  margin: 0 0 16px;
  font-size: 13px;
}

.batch-pager {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px 14px;
  margin: 20px 0 0;
  padding-top: 4px;
  width: 100%;
  white-space: nowrap;
}

/* 与 .btn--sm 同高，避免「纯文字」与「按钮」基线不一致；并抵消 .muted 的段落下边距 */
.batch-pager > * {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  box-sizing: border-box;
}

.batch-pager .muted {
  margin: 0;
}

.batch-pager__pos {
  font-size: 13px;
  line-height: var(--wb-btn-line-height, 1.45);
  white-space: nowrap;
}

.batch-pager__total {
  font-size: 13px;
  line-height: var(--wb-btn-line-height, 1.45);
  white-space: nowrap;
  margin-right: 4px;
}

.batch-pager__muted {
  font-size: 13px;
  line-height: var(--wb-btn-line-height, 1.45);
  color: var(--muted);
  user-select: none;
  white-space: nowrap;
  padding: 0 4px;
}

.wb-pager-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: var(--wb-btn-line-height, 1.45);
  white-space: nowrap;
}

.wb-pager-jump__input {
  width: 4.5em;
  padding: 4px 6px;
  border-radius: var(--wb-radius-sm, 4px);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  font: inherit;
  font-size: inherit;
  text-align: center;
  min-height: 34px;
  box-sizing: border-box;
  background: var(--wb-surface, transparent);
  color: inherit;
}

.wb-pager-jump__go:not(.btn) {
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: inherit;
  cursor: pointer;
}

.wb-pager-jump__go:not(.btn):hover {
  border-color: var(--wb-brand, #6366f1);
  color: var(--wb-brand, #6366f1);
}

.batch-list__empty {
  margin: 0;
  padding: 4px 0;
}

.batch-list__empty a {
  display: inline-block;
  padding: 4px 8px;
  margin: -4px -8px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--wb-btn-radius);
  transition: background 0.12s ease, color 0.12s ease;
}

.batch-list__empty a:hover {
  text-decoration: none;
  background: rgba(99, 102, 241, 0.1);
}

.proto-logout-form:not(.topbar__account-logout-form) {
  display: inline;
  margin: 0;
  padding: 0;
}

.shell-notice {
  margin: 0 0 16px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 4px;
}

.form-error-banner {
  margin: 0 0 16px;
  padding: 10px 12px;
  font-size: 13px;
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 4px;
}

.batch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.batch-card:hover {
  border-color: #c9d6f5;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.batch-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

/* 单列子项须拉满宽，否则内部 meta 无法与下方变体行同宽对齐 */
.batch-card__head > div {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.batch-card__title {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.batch-card__meta {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 4px 0 0;
  /* 与 .variant-row 左右 padding 一致，右缘与「进入工作台」等按钮右对齐 */
  padding-right: 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.batch-card__meta-lead {
  flex: 1 1 auto;
  min-width: 0;
}

.batch-card__meta .batch-card__batch-status {
  flex: 0 0 auto;
  margin-left: auto;
  justify-self: unset;
}

.batch-card__creator {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.batch-card__creator-k {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--text);
}

.batch-card__creator-v {
  min-width: 0;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}

.batch-card__hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.batch-card--alldone {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--surface) 0%, #ecfdf5 55%, var(--surface) 100%);
  border-color: #6ee7b7;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.12);
}

.batch-card--alldone:hover {
  border-color: #34d399;
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.16);
}

/* 全部已结束，但无一走完制作流程（多为提前关闭）：中性灰框，与「至少一条已走完」的绿色区分 */
.batch-card--allended {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--surface) 0%, #f1f5f9 52%, var(--surface) 100%);
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.batch-card--allended:hover {
  border-color: #94a3b8;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.batch-card__batch-status {
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
}

.batch-card__batch-status--batch_done {
  color: #047857;
}

.batch-card__batch-status--batch_active {
  color: #4338ca;
}

.batch-card__batch-status--batch_pending {
  color: #b45309;
}

.batch-card__batch-status--batch_ended {
  color: #64748b;
}

.variant-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.variant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto max-content;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: #f7f8fa;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.variant-row:hover {
  border-color: #d0d7e2;
  background: #fff;
}

.variant-row--closed {
  opacity: 0.88;
  background: #eceff2;
  border-color: #d8dde5;
}

.variant-row--closed:hover {
  background: #e5e9ef;
  border-color: #cdd3dd;
}

.variant-row__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.variant-row__close {
  color: var(--muted);
}

.variant-close-form {
  display: inline;
  margin: 0;
  padding: 0;
}

.variant-row__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.variant-row__name {
  font-weight: 500;
}

.variant-row__step {
  font-size: 12px;
  color: var(--muted);
}

.status-pill {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
  font-weight: 500;
}

/* 任务总览 · 变体阶段标签（颜色区分流程） */
.status-pill--script {
  background: #fff7e8;
  color: #b45309;
}

.status-pill--split {
  background: #f5f0ff;
  color: #6d28d9;
}

.status-pill--parallel {
  background: #e0e7ff;
  color: #4338ca;
}

.status-pill--gen {
  background: #e6fffb;
  color: #08979c;
}

.status-pill--clips {
  background: #fff2e8;
  color: #d4380d;
}

.status-pill--done {
  background: #e8ffea;
  color: var(--success);
}

.status-pill--closed {
  background: #e8eaed;
  color: #4e5969;
}

/* 变体步骤页：顶部横向步骤条 + 节点进度（无侧栏、非 sticky，避免遮挡主区） */
.batch-context.batch-context--collapsible:has(+ .workspace) {
  margin-bottom: 6px;
}

.workspace {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
  min-height: 0;
}

.workspace .workspace__body {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (max-width: 960px) {
  .workspace {
    gap: 6px;
  }
}

.stepper {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  align-content: flex-start;
  gap: 6px 8px;
  padding: 8px 10px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stepper a {
  text-decoration: none;
}

/* 时间轴：灰轴 + 绿段由 JS 按「首末节点圆心」定位，与圆点同一高度（--stepper-line-y + translateY） */
.stepper.stepper--timeline::before {
  content: '';
  position: absolute;
  left: var(--stepper-track-left, 12px);
  width: var(--stepper-track-width, calc(100% - 24px));
  top: var(--stepper-line-y, 47px);
  transform: translateY(-50%);
  height: 3px;
  background: #d4d4d8;
  border-radius: 4px;
  z-index: 0;
  pointer-events: none;
}

.stepper.stepper--timeline::after {
  content: '';
  position: absolute;
  left: var(--stepper-track-left, 12px);
  top: var(--stepper-line-y, 47px);
  transform: translateY(-50%);
  width: var(--stepper-done-px, 0px);
  height: 3px;
  background: var(--success);
  border-radius: 4px;
  z-index: 1;
  pointer-events: none;
}

.stepper > .stepper__btn,
.stepper > a.stepper__btn,
.stepper > span {
  flex: 1 1 0;
  min-width: 5rem;
  max-width: 10.5rem;
}

.stepper > span {
  display: flex;
  min-width: 5rem;
}

.stepper > span > .stepper__btn,
.stepper > span > a.stepper__btn {
  width: 100%;
}

.stepper__btn {
  display: block;
  box-sizing: border-box;
  width: 100%;
  text-align: center;
  padding: 26px 6px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  cursor: pointer;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  position: relative;
  margin-left: 0;
}

.stepper .stepper__btn::before,
.stepper a.stepper__btn::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 9px;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: #b4bac7;
  box-sizing: border-box;
}

.stepper .stepper__btn--done::before,
.stepper a.stepper__btn--done::before {
  background: var(--success);
  box-shadow: none;
}

.stepper .stepper__btn--active::before {
  width: 11px;
  height: 11px;
  top: 8px;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.28);
  transform: translateX(-50%);
}

/* 当前步且已计入完成（末步）：实心绿点，避免与「进行中」紫点混淆 */
.stepper .stepper__btn--active.stepper__btn--done::before,
.stepper a.stepper__btn--active.stepper__btn--done::before {
  width: 9px;
  height: 9px;
  top: 9px;
  background: var(--success);
  box-shadow: none;
}

.stepper.stepper--timeline .stepper__btn::before,
.stepper.stepper--timeline a.stepper__btn::before {
  z-index: 2;
}

.stepper.stepper--timeline .stepper__btn--active.stepper__btn--done,
.stepper.stepper--timeline a.stepper__btn--active.stepper__btn--done {
  color: var(--text);
  font-weight: 600;
  opacity: 0.92;
}

.stepper.stepper--timeline .stepper__btn--active.stepper__btn--done:disabled,
.stepper.stepper--timeline a.stepper__btn--active.stepper__btn--done:disabled {
  opacity: 0.92;
  cursor: default;
}

.stepper.stepper--timeline .stepper__btn--active.stepper__btn--done:disabled::before,
.stepper.stepper--timeline a.stepper__btn--active.stepper__btn--done:disabled::before {
  opacity: 1;
}

a.stepper__btn:visited {
  color: var(--muted);
}

.stepper__btn:hover:not(:disabled) {
  background: #f7f8fa;
  color: var(--text);
}

.stepper .stepper__btn--done:hover:not(:disabled),
.stepper a.stepper__btn--done:hover:not(:disabled) {
  background: rgba(0, 181, 120, 0.08);
  color: var(--text);
}

.stepper__btn--active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--accent);
  font-weight: 600;
}

/* 时间轴：当前步不铺底框；去掉默认 focus/点击高亮，避免浅蓝块 */
.stepper.stepper--timeline .stepper__btn--active {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}

.stepper.stepper--timeline button.stepper__btn--active:focus {
  outline: none;
}

.stepper.stepper--timeline button.stepper__btn--active:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 2px;
}

.stepper.stepper--timeline .stepper__btn--active:hover:not(:disabled) {
  background: transparent !important;
  border-color: transparent !important;
}

/* 时间轴：悬停不用整格铺底，避免盖住与圆点同高的横线（尤其步骤 4 右侧线段） */
.stepper.stepper--timeline .stepper__btn:hover:not(:disabled),
.stepper.stepper--timeline a.stepper__btn:hover:not(:disabled) {
  background: transparent !important;
}

.stepper.stepper--timeline .stepper__btn--done:hover:not(:disabled),
.stepper.stepper--timeline a.stepper__btn--done:hover:not(:disabled) {
  background: transparent !important;
}

.stepper .stepper__btn--done,
.stepper a.stepper__btn--done {
  color: var(--text);
  opacity: 0.92;
}

.stepper__btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.stepper .stepper__btn:disabled::before {
  opacity: 0.65;
}

.stepper.stepper--timeline .stepper__btn:disabled::before,
.stepper.stepper--timeline a.stepper__btn:disabled::before {
  opacity: 1;
}


.step-panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

.step-panel--active {
  display: block;
}

.step-panel__head h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.step-panel__foot {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.parallel-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.subcard {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: #fafbfc;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.subcard:hover {
  border-color: #d0d7e2;
  box-shadow: var(--shadow);
}

.subcard__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.subcard__top h4 {
  margin: 0;
  font-size: 14px;
}

.subcard__desc {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
}

.subcard__body {
  font-size: 13px;
}

.subcard__actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff7e8;
  color: var(--warning);
}

.badge--ok {
  background: #e8ffea;
  color: var(--success);
}

.table-wrap {
  overflow: auto;
  max-height: 280px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  vertical-align: top;
}

.data-table th {
  background: #f7f8fa;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.data-table input,
.data-table select {
  width: 100%;
  min-width: 72px;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font: inherit;
  background: #fff;
}

.scene-block {
  margin-bottom: 10px;
  padding: 10px;
  background: var(--surface, #fff);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.scene-block h5 {
  margin: 0 0 6px;
  font-size: 13px;
}

.scene-block--media {
  padding: 12px;
}

.scene-block__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.scene-block__hd h5 {
  margin: 0;
}

.scene-source-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--wb-brand-muted-bg);
  color: var(--wb-brand-ink);
  white-space: nowrap;
}

.scene-source-pill--pending {
  background: var(--bg, #f1f5f9);
  color: var(--muted, #64748b);
}

.cast-gender-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.cast-gender-pill--female {
  background: #fce7f3;
  color: #9d174d;
}

.cast-gender-pill--male {
  background: #dbeafe;
  color: #1d4ed8;
}

.cast-gender-pill--unknown {
  background: #fef3c7;
  color: #b45309;
}

.scene-pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding: 4px 2px 8px;
}

.scene-pool__card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 6px 10px;
  cursor: pointer;
  background: var(--surface, #fff);
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
  font: inherit;
  color: inherit;
}

.scene-pool__card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.scene-pool__card img,
.scene-pool__ph {
  width: 100%;
  max-height: 100px;
  object-fit: cover;
  border-radius: 4px;
  margin: 0 auto 6px;
  display: block;
  background: var(--wb-hover-medium, #e5e7eb);
  aspect-ratio: 16 / 10;
}

.scene-pool__name {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text);
}

.scene-pool__tags {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.scene-lib-detail__hero {
  margin-bottom: 12px;
}

.scene-lib-detail__hero img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface-2, var(--bg, #f8fafc));
}

.scene-lib-detail__meta {
  font-size: 13px;
  line-height: 1.55;
}

.scene-lib-detail__meta p {
  margin: 0 0 8px;
}

.scene-fig-slot .js-scene-ref-img {
  max-height: 200px;
  width: 100%;
  object-fit: contain;
  border-radius: 4px;
  background: var(--surface-2, var(--bg, #f8fafc));
}

.scene-block__detail {
  margin: 0 0 10px !important;
}

.scene-block__figlabel {
  margin: 0 0 6px;
}

.scene-fig-slot .img-drop-slot__img {
  max-height: 180px;
}

.scene-fig-empty {
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 4px;
  background: var(--wb-hover-soft, var(--bg, #fafbfc));
}

.scene-fig-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.scene-fig-upload {
  position: relative;
  cursor: pointer;
  margin: 0;
}

.scene-fig-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.cast-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 10px;
}

.cast-row__info {
  flex: 1;
  min-width: 160px;
}

.cast-row__info strong {
  display: block;
  margin-bottom: 4px;
}

.cast-hint {
  margin: 8px 0 2px;
}

.cast-row__cands {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  flex: 1 1 260px;
  min-width: 0;
  max-width: 100%;
}

.cand {
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 6px;
  cursor: pointer;
  background: #f7f8fa;
  transition: border-color 0.15s, transform 0.12s;
}

.cand:hover {
  border-color: #c7d2fe;
}

.cand--selected {
  border-color: var(--accent);
  background: #eef2ff;
}

.cand img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.cand span {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.cand {
  font: inherit;
  color: inherit;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

/* 场景与环境：与演员行同构，右侧单张「候选」参考图卡 */
.scene-row .scene-row__titleline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.scene-row .scene-row__titleline .cast-name-gender {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  white-space: nowrap;
  max-width: 100%;
}

.scene-row .scene-row__titleline .cast-gender-pill {
  flex-shrink: 0;
}

.scene-row .scene-row__titleline strong {
  display: inline;
  margin: 0;
  font-size: 14px;
}

/* 与演员行共用 .cast-row__cands；仅保证候选区从左起排，不贴行尾 */
.cast-row__cands.scene-row__cands {
  justify-content: flex-start;
  align-items: flex-start;
}

.scene-cand {
  min-width: 104px;
  max-width: 120px;
}

/* 卡片外壳：含主选区 + 右上角清除（避免 button 嵌套） */
.scene-cand.scene-cand--shell {
  position: relative;
  cursor: default;
}

.scene-cand--shell > .scene-cand__main {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
}

.scene-cand--shell > .scene-cand__main:hover {
  filter: brightness(0.98);
}

/* 参考视频/音频卡片 · 右上角圆形清除 */
.gen-refvid-main__clear {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  transition: background 0.12s ease, transform 0.1s ease;
}

.gen-refvid-main__clear:hover {
  background: rgba(185, 28, 28, 0.92);
  color: #fff;
}

.gen-refvid-main__clear:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.75);
  outline-offset: 2px;
}

.cand-tile-clear {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 4;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

/* 叠加层清除钮：几何叉号代替 × 字符，避免 Firefox 等浏览器字形度量偏心 */
.cand-tile-clear::before,
.cand-tile-clear::after,
.gen-refvid-main__clear::before,
.gen-refvid-main__clear::after,
.img-drop-slot__clear::before,
.img-drop-slot__clear::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
}

.cand-tile-clear::before,
.gen-refvid-main__clear::before,
.img-drop-slot__clear::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.cand-tile-clear::after,
.gen-refvid-main__clear::after,
.img-drop-slot__clear::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.cand-tile-clear:hover {
  background: rgba(185, 28, 28, 0.95);
  color: #fff;
}

.cand-tile-clear:focus-visible {
  outline: 2px solid var(--wb-brand);
  outline-offset: 2px;
}

.cand-tile-clear:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.scene-cand__media {
  border-radius: 4px;
  overflow: hidden;
  background: #e5e7eb;
  margin: 0 auto 4px;
}

.scene-cand__media img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  display: block;
}

.scene-cand__ph {
  width: 96px;
  height: 72px;
  background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
}

.scene-cand span {
  max-width: 104px;
  font-size: 11px;
}

button.scene-cand {
  font: inherit;
  color: inherit;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
}

.cast-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.gate-banner {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--wb-hover-soft, var(--bg, #f7f8fa));
  border: 1px dashed var(--border);
  font-size: 13px;
  color: var(--muted);
}

.actor-pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding: 4px 2px 8px;
}

.actor-pool__card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 6px 10px;
  cursor: pointer;
  background: var(--surface, #fff);
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.actor-pool__card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.actor-pool__card img,
.actor-pool__ph {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  margin: 0 auto 6px;
  display: block;
  background: var(--wb-hover-medium, #e5e7eb);
}

.actor-pool__name {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text);
}

.actor-pool__tags {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.actor-detail__avatar {
  float: left;
  margin: 0 14px 8px 0;
  max-width: min(100%, 220px);
}

.actor-detail__avatar img {
  display: block;
  max-width: 100%;
  max-height: min(52vh, 320px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.actor-detail__meta {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.55;
}

.actor-detail__meta p {
  margin: 0 0 8px;
}

/* 并行核验 · 演员库 / 演员详情 / 场景库 / 场景库条目 */
.wb-hub-modal--pick {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.16);
}

.wb-hub-modal--pick .modal__head {
  flex-shrink: 0;
  padding: 16px 20px;
  background: linear-gradient(180deg, var(--bg, #f8fafc) 0%, var(--surface, #fff) 55%);
  border-bottom: 1px solid var(--border);
}

.wb-hub-modal--pick .modal__head h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.wb-hub-modal--pick .modal__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 20px 20px;
}

.wb-hub-modal__hint {
  margin: 0 0 14px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted, #475569);
  background: var(--bg, #f1f5f9);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 4px;
}

.wb-hub-modal__search {
  width: 100%;
  max-width: 440px;
  margin-bottom: 14px;
}

.wb-hub-modal--detail {
  border-radius: 4px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.wb-hub-modal--detail .modal__head {
  padding: 16px 20px;
  background: linear-gradient(180deg, var(--bg, #f8fafc) 0%, var(--surface, #fff) 55%);
  border-bottom: 1px solid var(--border);
}

.wb-hub-modal--detail .modal__head h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.wb-hub-modal--detail .modal__body {
  padding: 18px 20px 24px;
}

.wb-hub-modal--detail #wb-scene-lib-detail-body .scene-lib-detail__hero {
  margin-bottom: 16px;
}

.wb-hub-modal--detail #wb-scene-lib-detail-body .scene-lib-detail__hero img {
  border-radius: 4px;
  border: 0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1);
  background: #f8fafc;
}

.wb-hub-modal--detail #wb-scene-lib-detail-body .scene-lib-detail__meta {
  font-size: 13px;
}

.wb-hub-modal--detail #wb-scene-lib-detail-body .scene-lib-detail__meta p {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.wb-hub-modal--detail #wb-scene-lib-detail-body .scene-lib-detail__meta p:last-child {
  border-bottom: 0;
}

.wb-hub-modal--detail #wb-scene-lib-detail-body .scene-lib-detail__meta strong {
  display: inline-block;
  min-width: 3.2em;
  margin-right: 6px;
  color: #64748b;
  font-weight: 600;
}

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

.clip-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: transform 0.15s, box-shadow 0.15s;
}

.clip-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.clip-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, #e5e7eb, #f3f4f6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 8px;
  box-sizing: border-box;
}

.clip-card__thumb--playable {
  cursor: pointer;
}

.clip-card__thumb--playable:hover {
  filter: brightness(0.97);
}

.clip-card__thumb--playable:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.clip-card__thumb__label {
  pointer-events: none;
}

.clip-card__thumb__tap {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 11px;
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  padding: 3px 9px;
  border-radius: 4px;
  pointer-events: none;
}

.clip-card__thumb--generating {
  background: linear-gradient(145deg, #e0e7ff, #e0e7ff);
}

.clip-card__meta {
  padding: 6px 12px 0;
}

.clip-card__badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
}

.clip-card__badge--pending {
  background: #fff7e8;
  color: var(--warning);
}

.clip-card__badge--generating {
  background: var(--wb-brand-muted-bg);
  color: var(--wb-brand-ink);
}

.clip-card__badge--done {
  background: #e8ffea;
  color: var(--success);
}

.clip-card__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--border);
}

.clip-card__hint {
  font-size: 11px;
}

.clip-card__hint-btn {
  margin: 0;
  padding: 4px 8px;
  border: none;
  border-radius: var(--wb-btn-radius);
  background: transparent;
  font: inherit;
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.12s ease, background 0.12s ease;
}

.clip-card__hint-btn:hover {
  color: var(--accent-hover);
  background: rgba(99, 102, 241, 0.1);
}

.clip-card__body {
  padding: 10px 12px;
  font-size: 12px;
}

.pack-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.pack-toolbar__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.step-panel__foot--pack {
  flex-wrap: wrap;
  align-items: flex-end;
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f7f8fa;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 13px;
}

.file-list li.file-list__row {
  justify-content: flex-start;
  gap: 10px;
  align-items: center;
}

.file-list__check {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
}

.file-list__main {
  flex: 1;
  min-width: 0;
}

.file-list__tag {
  flex-shrink: 0;
  margin-left: auto;
}

.file-list code {
  font-size: 12px;
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 18px;
  background: rgba(29, 33, 41, 0.92);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
}

.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 92vw);
  max-height: 86vh;
  overflow: auto;
  background: var(--surface);
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  animation: pop 0.22s ease;
}

.modal__dialog--narrow {
  width: min(420px, 92vw);
}

.modal__dialog--xl {
  width: min(920px, 96vw);
}

.modal__dialog--clip-play {
  width: min(720px, 96vw);
}

.modal__body--clip-play {
  padding-top: 8px;
}

.clip-play__hint {
  margin: 0 0 10px;
}

.clip-play__video {
  display: block;
  width: 100%;
  max-height: min(70vh, 520px);
  border-radius: 4px;
  background: #0f172a;
}

.modal__dialog--clip-prompt {
  width: min(640px, 96vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal__body--clip-prompt {
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.clip-prompt__pre {
  margin: 0;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.55;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface-2, var(--bg, #fafbfc));
  border: 1px solid var(--border);
  border-radius: 4px;
  max-height: min(60vh, 480px);
  overflow: auto;
}

.modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border);
  background: var(--wb-hover-medium, var(--bg, #fafbfc));
  border-radius: 0 0 4px 4px;
}

.modal__foot__btns {
  display: flex;
  gap: 10px;
}

/* 并行核验 · 编辑片段：底栏按钮右对齐（需高于上方 .modal__foot 的 space-between） */
.modal__foot.modal__foot--story {
  justify-content: flex-end;
}

.modal__foot.modal__foot--story .modal__foot__btns {
  justify-content: flex-end;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.modal__head h3 {
  margin: 0;
  font-size: 16px;
}

.modal__body {
  padding: 16px 18px 20px;
}

.actor-lib {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(52vh, 480px);
  overflow-y: auto;
  padding-right: 4px;
}

.actor-lib-row {
  display: grid;
  grid-template-columns: 22px 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface, #fff);
  transition: border-color 0.15s, background 0.15s;
}

.actor-lib-row:hover {
  border-color: rgba(var(--wb-brand-rgb, 99, 102, 241), 0.38);
  background: var(--wb-hover-soft, var(--bg, #fafbfc));
}

.actor-lib-row--checked {
  border-color: var(--wb-brand-border);
  background: var(--wb-brand-muted-bg);
}

.actor-lib-row > input[type="checkbox"] {
  margin-top: 28px;
}

.actor-lib-thumb {
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  border-radius: 4px;
  cursor: zoom-in;
  flex-shrink: 0;
}

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

.actor-lib-row__text {
  cursor: pointer;
  min-width: 0;
}

.actor-lib-row__text h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.actor-lib-row__img {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
  background: var(--wb-hover-medium, #e5e7eb);
}

.actor-lib-row__meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.actor-lib-row__meta p {
  margin: 0 0 4px;
}

.modal--lightbox .modal__dialog--lightbox-detail {
  padding: 20px 22px 24px;
  width: min(720px, 94vw);
}

.lightbox__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(200px, 1fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 640px) {
  .lightbox__layout {
    grid-template-columns: 1fr;
  }
}

.lightbox__img-wrap {
  border-radius: 4px;
  overflow: hidden;
  background: #0f172a;
}

.lightbox__img-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 52vh;
  object-fit: contain;
}

.lightbox__detail h4 {
  margin: 0 0 10px;
  font-size: 17px;
}

.lightbox__detail dl {
  margin: 0;
  font-size: 13px;
}

.lightbox__detail dt {
  float: left;
  clear: left;
  width: 72px;
  color: var(--muted);
  font-weight: 500;
}

.lightbox__detail dd {
  margin: 0 0 8px 80px;
  line-height: 1.5;
}

.lightbox__close {
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--muted);
  z-index: 2;
}

.lightbox__close:hover {
  color: var(--text);
}

/* 智能拆分 · 任务列表 */
.split-job-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.split-job-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafbfc;
  transition: border-color 0.2s, background 0.2s;
}

.split-job-item__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  background: var(--border);
}

.split-job-item--running .split-job-item__dot {
  background: var(--wb-brand);
  box-shadow: 0 0 0 3px rgba(var(--wb-brand-rgb), 0.22);
  animation: pulse-dot 1s ease-in-out infinite;
}

.split-job-item--done .split-job-item__dot {
  background: var(--success);
}

.split-job-item--pending .split-job-item__dot {
  background: #d0d7e2;
}

@keyframes pulse-dot {
  50% {
    opacity: 0.55;
  }
}

.split-job-item__body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.split-job-item__title {
  font-weight: 500;
  font-size: 14px;
}

.split-job-item__state {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.split-job-item--running {
  border-color: #c7d2fe;
  background: #f8fafc;
}

.split-job-item--done {
  border-color: #a7f3d0;
  background: #f0fdf4;
}

.split-job-hint {
  margin: 14px 0 0;
  min-height: 1.25em;
}

.split-requeue-wrap {
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

/* —— 视频集（成片浏览）：左右分栏 + 与片段核验一致的卡片骨架 —— */
.wb-video-gallery .page-head {
  margin-bottom: 1rem;
}

.wb-video-gallery__cols {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px 24px;
}

.wb-video-gallery__sidebar {
  flex: 0 1 24%;
  max-width: 320px;
  min-width: 220px;
}

.wb-video-gallery__main {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 900px) {
  .wb-video-gallery__sidebar {
    flex: 1 1 100%;
    max-width: none;
  }
}

.wb-video-gallery__batch-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wb-video-gallery .batch-card {
  margin: 0;
}

.wb-video-gallery .wb-vg-batch-card {
  /* 视频集：不用任务总览「成功结束」绿框，选中态单独用品牌紫（与生成页左侧轨 aria-current 一致） */
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.wb-video-gallery .wb-vg-batch-card:hover {
  border-color: rgba(var(--wb-brand-rgb, 99, 102, 241), 0.35);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.wb-video-gallery .wb-vg-batch-card.wb-vg-batch-card--active {
  border-color: var(--wb-brand, #6366f1);
  box-shadow: 0 0 0 1px rgba(var(--wb-brand-rgb), 0.35), 0 4px 18px rgba(99, 102, 241, 0.1);
}

.wb-video-gallery .batch-card__title {
  font-size: 1rem;
}

.wb-video-gallery .variant-row {
  cursor: pointer;
  border-radius: 4px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  grid-template-columns: minmax(0, 1fr);
}

.wb-video-gallery .variant-row:hover {
  background: rgba(99, 102, 241, 0.06);
}

.wb-video-gallery .variant-row--active {
  outline: none;
  border-color: var(--wb-brand, #6366f1);
  box-shadow: 0 0 0 1px rgba(var(--wb-brand-rgb), 0.35);
  background: rgba(99, 102, 241, 0.06);
}

.wb-video-gallery__pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--muted, #64748b);
}

.wb-video-gallery__main-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.wb-video-gallery__main-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.wb-video-gallery .wb-seg-page__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.wb-video-gallery .wb-seg-card {
  border: 1px solid var(--border, var(--border, #e8e8e8));
  border-radius: 4px;
  background: var(--surface, #fff);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wb-video-gallery .wb-seg-card__media {
  position: relative;
  background: #e8eaef;
  aspect-ratio: 16 / 10;
  min-height: 120px;
}

.wb-video-gallery .wb-seg-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0f172a;
}

.wb-video-gallery .wb-seg-card__mask {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(232, 234, 239, 0.96);
  z-index: 1;
}

.wb-video-gallery .wb-seg-card__ph-label {
  font-size: 13px;
  color: #555;
}

.wb-video-gallery .wb-seg-card__playfab {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  border-radius: 50%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.wb-video-gallery .wb-seg-card__body {
  padding: 10px 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wb-video-gallery .wb-seg-card__status {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.wb-video-gallery .wb-seg-card__status--done {
  color: #15803d;
}

.wb-video-gallery .wb-seg-card__status--generating {
  color: #4338ca;
}

.wb-video-gallery .wb-seg-card__status--pending {
  color: #b45309;
}

.wb-video-gallery .wb-seg-card__status--skipped {
  color: #64748b;
}

.wb-video-gallery .wb-seg-card__meta {
  font-size: 13px;
  line-height: 1.45;
  color: #333;
}

#wb-vg-play-modal .modal__dialog--clip-play.wb-vg-play-dialog {
  width: min(1080px, 98vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#wb-vg-play-modal .wb-vg-play-dialog:focus {
  outline: none;
}

#wb-vg-play-modal .wb-vg-play-dialog:focus-visible {
  outline: 2px solid var(--wb-brand, #2563eb);
  outline-offset: 2px;
}

#wb-vg-play-modal .wb-vg-play-video-wrap {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: #0f172a;
  max-height: min(70vh, 520px);
  transition:
    opacity 0.3s ease,
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 1;
  transform: scale(1);
  transform-origin: center center;
}

#wb-vg-play-modal .wb-vg-play-video-wrap--out {
  opacity: 0;
  transform: scale(0.985);
}

#wb-vg-play-modal .wb-vg-play-video-wrap .clip-play__video {
  width: 100%;
  max-height: min(70vh, 520px);
  display: block;
  background: #0f172a;
  vertical-align: top;
}

@media (prefers-reduced-motion: reduce) {
  #wb-vg-play-modal .wb-vg-play-video-wrap {
    transition: none !important;
  }

  #wb-vg-play-modal .wb-vg-play-video-wrap--out {
    opacity: 1;
    transform: none;
  }
}

/* 视频集 · 播放弹层：主栏 + 右侧片段文案轨 + 底部胶片 */
#wb-vg-play-modal .wb-vg-play-modal__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

#wb-vg-play-modal .wb-vg-play-modal__hint {
  margin: 0 0 8px;
}

.wb-vg-play-modal__split {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 16px;
  min-height: 0;
  flex: 1;
}

.wb-vg-play-modal__maincol {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wb-vg-play-rail {
  width: 280px;
  flex-shrink: 0;
  max-height: min(calc(90vh - 140px), 620px);
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 2px 2px 0;
  scrollbar-width: thin;
}

.wb-vg-play-rail-tile {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 4px);
  background: var(--wb-hover-soft, var(--bg, #fafbfc));
  padding: 10px 12px 10px;
  cursor: pointer;
  outline: none;
  text-align: left;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.wb-vg-play-rail-tile:hover {
  border-color: var(--muted, #cbd5e1);
}

.wb-vg-play-rail-tile:focus-visible {
  outline: 2px solid var(--wb-brand, #2563eb);
  outline-offset: 2px;
}

.wb-vg-play-rail-tile--active,
.wb-vg-play-rail-tile[aria-current='true'] {
  border-color: var(--wb-brand, #2563eb);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.28);
}

.wb-vg-play-rail-tile__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.wb-vg-play-rail-tile__code {
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
}

.wb-vg-play-rail-tile__dur {
  flex-shrink: 0;
}

.wb-vg-play-rail-tile__sec-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.wb-vg-play-rail-tile__block {
  margin-bottom: 10px;
}

.wb-vg-play-rail-tile__block:last-child {
  margin-bottom: 0;
}

.wb-vg-play-rail-tile__viz {
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
  max-height: min(360px, 46vh);
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.wb-vg-play-rail-tile__line {
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
  max-height: min(220px, 32vh);
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 820px) {
  .wb-vg-play-modal__split {
    flex-direction: column;
  }

  .wb-vg-play-rail {
    width: 100%;
    max-height: 220px;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 6px;
  }

  .wb-vg-play-rail-tile {
    flex: 0 0 min(260px, 85vw);
    max-height: 200px;
  }

  .wb-vg-play-rail-tile__viz {
    max-height: min(200px, 28vh);
  }

  .wb-vg-play-rail-tile__line {
    max-height: min(140px, 22vh);
  }
}

.wb-vg-play-filmstrip {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 10px;
  padding: 12px 2px 6px;
  margin-top: 10px;
  border-top: 1px solid var(--border, #e5e7eb);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.wb-vg-filmstrip__btn {
  flex: 0 0 auto;
  width: 144px;
  margin: 0;
  padding: 0 0 2px;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  text-align: center;
  color: inherit;
  outline: none;
  box-shadow: 0 0 0 2px transparent;
  transition:
    box-shadow 0.15s ease,
    transform 0.15s ease,
    opacity 0.15s ease;
}

.wb-vg-filmstrip__btn:hover {
  opacity: 0.92;
}

.wb-vg-filmstrip__btn:focus-visible {
  box-shadow: 0 0 0 2px var(--wb-focus, #2563eb);
}

.wb-vg-filmstrip__btn--active {
  box-shadow: 0 0 0 3px var(--wb-accent, #2563eb);
  transform: translateY(-1px);
}

.wb-vg-filmstrip__thumb {
  display: block;
  width: 144px;
  height: 81px;
  border-radius: 4px;
  overflow: hidden;
  background: #0f172a;
  margin: 0 auto;
}

.wb-vg-filmstrip__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wb-vg-filmstrip__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 12px;
  color: #94a3b8;
  background: #1e293b;
}

/* 任务总览 · 小卡片网格（类似视频生成片段列表；原宽卡片见 shell.html.pre-compact-bak） */
#viewOverview.wb-overview-tiles .wb-overview-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;
}

#viewOverview.wb-overview-tiles .wb-overview-page-head {
  margin-bottom: 10px;
}

#viewOverview.wb-overview-tiles .wb-overview-page-head__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
}

#viewOverview.wb-overview-tiles .wb-overview-page-head__title {
  margin: 0;
  flex: 0 0 auto;
}

#viewOverview.wb-overview-tiles .wb-overview-page-head__desc {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

#viewOverview.wb-overview-tiles .wb-overview-page-head__desc.muted {
  margin-bottom: 0;
}

#viewOverview.wb-overview-tiles .wb-overview-page-head__toolbar {
  margin: 0;
  flex: 1 1 280px;
  max-width: min(100%, 640px);
}

#viewOverview.wb-overview-tiles .wb-overview-page-head__toolbar .batch-overview-toolbar__stack {
  max-width: none;
  width: 100%;
}

#viewOverview.wb-overview-tiles .wb-overview-page-head__toolbar .batch-overview-toolbar__row {
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 100%;
  gap: 8px 10px;
}

#viewOverview.wb-overview-tiles .wb-overview-page-head__search {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 220px;
  width: auto;
}

#viewOverview.wb-overview-tiles .wb-overview-page-head__toolbar .batch-overview-toolbar__mine {
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  #viewOverview.wb-overview-tiles .wb-overview-page-head__toolbar {
    flex: 1 1 100%;
    max-width: none;
  }

  #viewOverview.wb-overview-tiles .wb-overview-page-head__toolbar .batch-overview-toolbar__row {
    justify-content: flex-start;
  }

  #viewOverview.wb-overview-tiles .wb-overview-page-head__search {
    flex: 1 1 100%;
    max-width: none;
  }
}

/* 任务总览：每张大任务一张卡片；网格顶对齐，避免被同行撑高 */
#viewOverview.wb-overview-tiles .batch-list--card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  align-items: start;
}

#viewOverview.wb-overview-tiles .batch-list--card-grid .batch-list__empty {
  grid-column: 1 / -1;
}

#viewOverview.wb-overview-tiles .overview-batch-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  padding: 10px 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 6px;
  min-width: 0;
  height: 152px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#viewOverview.wb-overview-tiles .overview-batch-card:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

#viewOverview.wb-overview-tiles .overview-batch-card__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#viewOverview.wb-overview-tiles .overview-batch-card__variants {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

#viewOverview.wb-overview-tiles .overview-batch-card--multi .overview-batch-card__variants {
  flex-direction: row;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  gap: 4px;
  overflow-y: auto;
}

#viewOverview.wb-overview-tiles .overview-batch-card__variant {
  min-width: 0;
}

#viewOverview.wb-overview-tiles .overview-batch-card__variant--chip {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 4px 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  line-height: 1.2;
}

#viewOverview.wb-overview-tiles .overview-batch-card__variant--chip:hover {
  border-color: rgba(var(--wb-brand-rgb, 99, 102, 241), 0.28);
}

#viewOverview.wb-overview-tiles .overview-batch-card__chip-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 4.5em;
}

#viewOverview.wb-overview-tiles .overview-batch-card__variant--chip .status-pill {
  font-size: 10px;
  padding: 1px 5px;
  flex-shrink: 0;
}

#viewOverview.wb-overview-tiles .overview-batch-card__chip-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: auto;
}

#viewOverview.wb-overview-tiles .overview-batch-card__variant--chip .overview-tile-icon-btn {
  width: 22px;
  height: 22px;
}

#viewOverview.wb-overview-tiles .overview-batch-card__variant--chip .overview-tile-icon-btn svg {
  width: 12px;
  height: 12px;
}

#viewOverview.wb-overview-tiles .overview-batch-card:not(.overview-batch-card--multi) .overview-batch-card__variant {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
}

#viewOverview.wb-overview-tiles .overview-batch-card:not(.overview-batch-card--multi) .overview-task-tile__step {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#viewOverview.wb-overview-tiles .overview-batch-card__variant--closed {
  opacity: 0.88;
}

#viewOverview.wb-overview-tiles .overview-batch-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
  min-width: 0;
  padding-top: 0;
}

#viewOverview.wb-overview-tiles .overview-batch-card__foot-spacer {
  flex: 1 1 auto;
}

#viewOverview.wb-overview-tiles .overview-task-tile--alldone {
  background: linear-gradient(145deg, var(--surface) 0%, #ecfdf5 55%, var(--surface) 100%);
  border-color: #6ee7b7;
}

#viewOverview.wb-overview-tiles .overview-task-tile--allended {
  background: linear-gradient(145deg, var(--surface) 0%, #f1f5f9 52%, var(--surface) 100%);
  border-color: #cbd5e1;
}

#viewOverview.wb-overview-tiles .overview-task-tile__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

#viewOverview.wb-overview-tiles .overview-task-tile__variant {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
}

#viewOverview.wb-overview-tiles .overview-task-tile__meta {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  word-break: break-word;
}

#viewOverview.wb-overview-tiles .overview-task-tile__status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 2px;
}

#viewOverview.wb-overview-tiles .overview-task-tile__batch-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

#viewOverview.wb-overview-tiles .overview-task-tile__batch-status--batch_done {
  color: #047857;
}

#viewOverview.wb-overview-tiles .overview-task-tile__batch-status--batch_active {
  color: #4338ca;
}

#viewOverview.wb-overview-tiles .overview-task-tile__batch-status--batch_pending {
  color: #b45309;
}

#viewOverview.wb-overview-tiles .overview-task-tile__batch-status--batch_ended {
  color: #64748b;
}

#viewOverview.wb-overview-tiles .overview-task-tile__step {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

#viewOverview.wb-overview-tiles .overview-task-tile__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 2px;
  min-width: 0;
}

#viewOverview.wb-overview-tiles .overview-task-tile__creator {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#viewOverview.wb-overview-tiles .overview-task-tile__action-btns {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

#viewOverview.wb-overview-tiles .overview-task-tile__actions:has(.overview-task-tile__creator) .overview-task-tile__action-btns {
  margin-left: 0;
}

#viewOverview.wb-overview-tiles .overview-task-tile__close-form {
  display: inline;
  margin: 0;
  padding: 0;
}

#viewOverview.wb-overview-tiles .overview-tile-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: background 0.12s ease, color 0.12s ease;
}

#viewOverview.wb-overview-tiles .overview-tile-icon-btn svg {
  display: block;
  width: 15px;
  height: 15px;
}

#viewOverview.wb-overview-tiles .overview-tile-icon-btn:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.85);
  outline-offset: 1px;
}

#viewOverview.wb-overview-tiles .overview-tile-icon-btn--close:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

#viewOverview.wb-overview-tiles .overview-tile-icon-btn--muted:hover:not(.variant-open-link--blocked) {
  background: var(--wb-hover-soft, rgba(15, 23, 42, 0.06));
  color: var(--text);
}

#viewOverview.wb-overview-tiles .overview-tile-icon-btn--primary {
  background: var(--wb-btn-primary-bg, #4f46e5);
  color: #fff;
}

#viewOverview.wb-overview-tiles .overview-tile-icon-btn--primary:hover:not(.variant-open-link--blocked) {
  background: var(--wb-btn-primary-bg-hover, #4338ca);
  color: #fff;
}

#viewOverview.wb-overview-tiles .overview-tile-icon-btn.variant-open-link--blocked {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

#wb-variant-close-modal .modal__dialog--narrow {
  width: min(360px, 92vw);
}

#wb-variant-close-modal .modal__head {
  padding: 12px 14px;
}

#wb-variant-close-modal .modal__head h3 {
  font-size: 15px;
}

#wb-variant-close-modal .modal__head .btn--icon {
  min-width: 26px;
  min-height: 26px;
  font-size: 1rem;
}

#wb-variant-close-modal .modal__body {
  padding: 12px 16px 14px;
  font-size: 13px;
}

#wb-variant-close-modal .wb-variant-close-modal__foot {
  padding: 8px 12px 10px;
}

#wb-variant-close-modal .modal__foot__btns {
  gap: 6px;
}

#wb-variant-close-modal .modal__foot__btns .btn {
  padding: 4px 10px;
  min-height: 28px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  border-radius: 4px;
}

#wb-variant-close-modal .wb-variant-close-modal__lead {
  margin: 0;
  line-height: 1.5;
}

.wb-variant-close-modal__label {
  margin: 8px 0 0;
  font-size: 12px;
}

#viewOverview.wb-overview-tiles .overview-task-tile .status-pill {
  font-size: 11px;
  padding: 2px 8px;
}
