body.workspace-body {
  overflow-x: hidden;
  background: var(--canvas);
}

.workspace {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.workspace-sidebar {
  position: fixed;
  z-index: var(--z-sidebar);
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  border-right: 1px solid #20232a;
  background: var(--canvas);
}

.workspace-brand {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 8px 14px;
}

.workspace-brand .brand-mark {
  color: var(--signal);
  border-color: #3a3f47;
  background: var(--surface);
}

.workspace-nav {
  display: grid;
  gap: 3px;
  overflow-y: auto;
  scrollbar-width: none;
}

.workspace-nav::-webkit-scrollbar {
  display: none;
}

.nav-label {
  padding: 17px 10px 5px;
  color: #626772;
  font-size: 11px;
  font-weight: 700;
}

.workspace-nav a, .sidebar-credit, .sidebar-account {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  font-weight: 500;
  text-decoration: none;
}

.workspace-nav a:hover, .sidebar-credit:hover, .sidebar-account:hover {
  color: var(--ink);
  background: #121419;
}

.workspace-nav a.active, .workspace-nav a[aria-current="page"], .sidebar-credit.active, .sidebar-account.active {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}

.workspace-nav a.active .icon, .workspace-nav a[aria-current="page"] .icon {
  color: var(--signal);
}

.workspace-sidebar-foot {
  display: grid;
  gap: 3px;
  margin-top: auto;
}

.sidebar-credit strong {
  margin-left: auto;
  color: var(--signal);
  font-variant-numeric: tabular-nums;
}

.workspace-switch {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.workspace-switch a {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-tertiary);
  font-size: 12px;
  text-decoration: none;
}

.workspace-main {
  min-width: 0;
  grid-column: 2;
}

.workspace-topbar {
  position: sticky;
  z-index: var(--z-sticky);
  top: 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: rgb(8 9 12 / 92%);
  backdrop-filter: blur(16px);
}

.page-context {
  min-width: 0;
}

.page-context h1 {
  margin: 0;
  font-size: var(--text-3);
  line-height: var(--leading-3);
}

.page-context p {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--ink-tertiary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.credit-button, .task-button, .account-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  background: var(--surface);
  font-weight: 500;
  text-decoration: none;
}

.credit-button {
  justify-content: center;
  padding-inline: 12px;
}

.credit-button strong, .task-button strong {
  min-width: 0;
  max-width: 7ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.workspace-content {
  width: min(var(--content-max), 100%);
  margin: 0 auto;
  padding: 30px 32px 64px;
}

.workspace-icp-footer {
  text-align: center;
  color: var(--ink-secondary);
}

.workspace-icp-footer .icp-filing-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 12px;
  color: inherit;
}

.creator-workspace .authenticated-only {
  display: none;
}

html[data-authenticated] .creator-workspace .guest-only {
  display: none;
}

html[data-authenticated] .creator-workspace .authenticated-only {
  display: block;
}

.workspace-auth-fallback {
  min-height: calc(100dvh - 154px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 32px;
  text-align: center;
}

.workspace-auth-fallback-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in oklch, var(--signal), transparent 55%);
  border-radius: 50%;
  color: var(--signal-strong);
  background: var(--signal-soft);
}

.workspace-auth-fallback-icon .icon {
  width: 26px;
  height: 26px;
}

.workspace-auth-fallback span, .workspace-auth-fallback h2, .workspace-auth-fallback p {
  margin: 0;
}

.workspace-auth-fallback > div > span {
  color: var(--signal-strong);
  font-size: 12px;
  font-weight: 700;
}

.workspace-auth-fallback h2 {
  margin-top: 6px;
  font-size: var(--text-7);
  line-height: var(--leading-7);
}

.workspace-auth-fallback p {
  margin-top: 8px;
  color: var(--ink-secondary);
}

.workspace-entry-copy {
  max-width: 600px;
}

.workspace-auth-fallback .workspace-entry-login {
  margin-top: -2px;
  color: var(--ink-tertiary);
  font-size: 13px;
}

.workspace-entry-login a {
  color: var(--ink-secondary);
  font-weight: 600;
  text-underline-offset: 3px;
}

.workspace-entry-login a:hover {
  color: var(--signal-strong);
}

.workspace-auth-fallback-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 639px) {
  .workspace-auth-fallback {
    min-height: calc(100dvh - 150px - var(--mobile-nav-height));
    padding: 28px 0;
  }

  .workspace-auth-fallback h2 {
    font-size: var(--text-6);
    line-height: var(--leading-6);
  }

  .workspace-auth-fallback-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-heading h2 {
  margin: 0;
  font-size: var(--text-7);
  line-height: var(--leading-7);
}

.page-heading p {
  max-width: 660px;
  margin: 6px 0 0;
  color: var(--ink-secondary);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.panel-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3, .panel-head p {
  margin: 0;
}

.panel-head h3 {
  font-size: 15px;
}

.panel-head p {
  margin-top: 2px;
  color: var(--ink-tertiary);
  font-size: 12px;
}

.panel-body {
  padding: 16px;
}

.segmented.compact {
  width: auto;
}

@media (max-width: 540px) {
  .workspace-topbar {
    gap: 8px;
  }

  .page-context {
    min-width: 44px;
  }

  .page-context h1 {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    gap: 5px;
  }

  .credit-button {
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    padding-inline: 7px;
  }

  .credit-button .icon {
    display: none;
  }
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.mv-history {
  margin-top: 34px;
}

.section-row {
  margin-bottom: 14px;
}

.section-row h3, .section-row p {
  margin: 0;
}

.section-row h3 {
  font-size: 18px;
}

.section-row p {
  margin-top: 3px;
  color: var(--ink-tertiary);
  font-size: 12px;
}

.section-row > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-secondary);
  font-size: 12px;
  text-decoration: none;
}

.work-list {
  min-width: 0;
}

.work-library-filters {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.work-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 16px;
}

.work-search .input {
  flex: 1;
  min-width: 0;
}

.work-search .btn { min-height: 44px; }

.work-vocal-status {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 7px;
  border: 1px solid var(--warning);
  border-radius: var(--radius-sm);
  color: var(--ink-primary);
  font-size: 12px;
}

.work-lyrics-note {
  margin: 0;
  padding: 10px 16px;
  color: var(--ink-secondary);
  font-size: var(--workspace-label);
  line-height: 1.5;
}

.cover-generation-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--signal-strong);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  background: var(--signal-soft);
}

.cover-generation-status[hidden] {
  display: none;
}

.cover-generation-status > i {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--signal);
}

.cover-generation-status > i .icon {
  animation: spin 1s linear infinite;
}

.cover-generation-status strong, .cover-generation-status span {
  display: block;
}

.cover-generation-status span {
  margin-top: 3px;
  color: var(--ink-tertiary);
  font-size: 12px;
}

.field-label {
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 700;
}

.work-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vocal-gender {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--ink-secondary);
  background: var(--surface-raised);
  font-size: 11px;
}

.vocal-gender.f, .work-voice.f {
  color: #f4a7bf;
}

.vocal-gender.m, .work-voice.m {
  color: #82b8ef;
}

.work-total-heading {
  min-width: 68px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}

.work-total-heading strong {
  color: var(--ink);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.work-total-heading span {
  color: var(--ink-tertiary);
  font-size: 12px;
}

.pagination {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-tertiary);
  font-size: 12px;
}

.work-row {
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto 28px;
  gap: 14px;
  align-items: start;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.work-row.is-preferred {
  background: color-mix(in oklch, var(--signal), var(--surface) 96%);
}

.work-row:last-child {
  border-bottom: 0;
}

.work-row:hover {
  background: var(--surface-subtle);
}

.work-cover-stack {
  width: 48px;
  height: 48px;
  position: relative;
  margin-top: 5px;
}

.work-cover-preview, .work-cover-play {
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.work-cover-preview {
  width: 48px;
  height: 48px;
  padding: 0;
}

.work-cover-play {
  width: 24px;
  height: 24px;
  position: absolute;
  right: -6px;
  bottom: -5px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.work-cover-play .icon {
  width: 12px;
  height: 12px;
}

.cover, .player-cover {
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid #343944;
  border-radius: var(--radius-md);
  color: var(--signal);
  background: var(--surface-strong);
}

.cover {
  width: 48px;
  height: 48px;
}

.cover img, .player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-main {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.work-main strong, .work-main p, .work-voice {
  display: block;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-title {
  min-width: 0;
  display: block;
}

.work-title strong {
  min-width: 0;
}

.work-voice {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--ink-tertiary);
  font-size: 12px;
  line-height: 1.2;
}

.work-main p {
  margin-top: 4px;
  color: var(--ink-tertiary);
  font-size: 12px;
}

.work-meta {
  align-self: center;
  color: var(--ink-tertiary);
  font-size: 12px;
  white-space: nowrap;
}

.work-open {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--ink-tertiary);
}

.work-open .icon {
  width: 17px;
  height: 17px;
}

.work-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.work-preference, .work-trash {
  width: 36px;
  min-width: 36px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-tertiary);
  background: var(--surface);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.work-preference .icon, .work-trash .icon {
  width: 15px;
  height: 15px;
}

.work-preference:hover, .work-preference.active {
  border-color: color-mix(in oklch, var(--danger), var(--line) 48%);
  color: var(--danger);
}

.work-preference.active .icon {
  fill: currentColor;
}

.work-trash:hover, .work-trash:focus-visible {
  border-color: color-mix(in oklch, var(--danger), var(--line) 48%);
  color: var(--danger);
}

.generation-policy-hint {
  margin-top: 8px;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--warning);
  font-size: 11px;
  line-height: 1.5;
}

.generation-policy-hint .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.work-preference-filter {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-tertiary);
  background: var(--surface);
  cursor: pointer;
}

.work-preference-filter:hover, .work-preference-filter.active {
  border-color: color-mix(in oklch, var(--danger), var(--line) 48%);
  color: var(--danger);
}

.work-preference-filter.active .icon {
  fill: currentColor;
}

.work-model-badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--info);
  background: var(--info-soft);
  font-size: 10px;
  line-height: 16px;
  white-space: nowrap;
}

.work-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.detail-preference {
  height: 40px;
}

.credit-confirm-modal {
  width: min(500px, calc(100% - 28px));
}

.credit-confirm-modal .modal-head small {
  display: block;
  margin-top: 3px;
  color: var(--ink-tertiary);
}

.credit-confirm-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.credit-confirm-summary > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--signal);
  background: color-mix(in oklch, var(--signal), transparent 88%);
}

.credit-confirm-summary > div, .credit-confirm-summary > div > * {
  min-width: 0;
}

.credit-confirm-summary small, .credit-confirm-summary strong, .credit-confirm-summary p {
  display: block;
  margin: 0;
}

.credit-confirm-summary > div > small, .credit-confirm-summary p {
  color: var(--ink-tertiary);
  font-size: 12px;
}

.credit-confirm-summary p {
  margin-top: 4px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.credit-confirm-summary > b {
  color: var(--signal);
  font-size: 24px;
  text-align: right;
}

.credit-confirm-summary > b small {
  font-size: 11px;
  font-weight: var(--weight-medium);
}

.credit-confirm-balance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  padding: 10px;
  color: var(--ink-secondary);
  font-size: 13px;
}

.credit-confirm-balance .icon {
  width: 16px;
  color: var(--ink-tertiary);
}

.credit-confirm-note, .credit-confirm-warning {
  margin: 0;
  color: var(--ink-tertiary);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.credit-confirm-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--danger);
}

.credit-confirm-warning .icon {
  width: 16px;
}

.work-detail {
  display: grid;
  gap: 20px;
}

.work-detail {
  grid-template-columns: minmax(0, 1fr) 310px;
}

.work-identity {
  min-height: 206px;
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

/* 作品库回收站恢复按钮 */
/* 作品库回收站恢复按钮 */
.work-restore {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-secondary);
  background: var(--surface);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.work-restore:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.work-identity > .cover {
  width: 176px;
  height: 176px;
}

.work-identity-cover {
  position: relative;
  width: 176px;
  height: 176px;
}

.work-identity-cover .cover {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
}

.cover-download-link {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  color: #fff;
  background: rgb(0 0 0 / 72%);
}

.work-identity h2 {
  margin: 12px 0 8px;
  font-size: var(--text-7);
  line-height: var(--leading-7);
}

.work-identity p {
  margin: 0;
  color: var(--ink-secondary);
}

.work-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.lyrics-sheet {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink-secondary);
  background: var(--surface-subtle);
  line-height: 1.9;
}

.lyrics-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.lyrics-sheet-body {
  padding-top: 14px;
  white-space: pre-wrap;
}

.mv-mode-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.mv-mode {
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  background: var(--surface);
  text-align: left;
}

.mv-mode.active {
  border-color: var(--signal-strong);
  background: var(--signal-soft);
}

.mv-mode:disabled {
  opacity: 0.52;
}

.mv-mode-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--signal);
  background: #1d2421;
}

.mv-mode strong, .mv-mode small {
  display: block;
}

.mv-mode small {
  margin-top: 4px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-tertiary);
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.mv-mode b {
  color: var(--signal);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.mv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.mv-builder {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.mv-step {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.mv-step-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 14px;
}

.mv-step-head > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0b1210;
  background: var(--signal);
  font-weight: 700;
}

.mv-step-head h3, .mv-step-head p {
  margin: 0;
}

.mv-step-head h3 {
  font-size: 15px;
}

.mv-step-head p {
  margin-top: 3px;
  color: var(--ink-tertiary);
  font-size: 12px;
}

#mv-library-sources {
  margin: 6px 0 18px;
}

.mv-work-picker {
  max-height: 252px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 2px;
  overflow-y: auto;
}

.mv-work-option {
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  gap: 11px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  background: var(--surface-subtle);
  text-align: left;
  cursor: pointer;
}

.mv-work-option .cover {
  width: 42px;
  height: 42px;
}

.mv-work-option strong, .mv-work-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mv-work-option small {
  margin-top: 3px;
  color: var(--ink-tertiary);
  font-size: 11px;
}

.mv-work-option .mv-work-preferred {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  color: var(--danger);
  border: 1px solid color-mix(in oklch, var(--danger), var(--line) 45%);
  background: var(--danger-soft);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  vertical-align: 1px;
}

.mv-work-option > .icon {
  opacity: 0;
  color: var(--signal);
}

.mv-work-option.selected {
  border-color: var(--signal-strong);
  background: var(--signal-soft);
}

.mv-work-option.selected > .icon {
  opacity: 1;
}

.mv-audio-repair {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px dashed #343941;
  border-radius: var(--radius-md);
  background: #0c0e11;
}

.mv-audio-repair > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--signal);
  background: var(--signal-soft);
}

.mv-audio-repair > div {
  min-width: 0;
}

.mv-audio-repair strong, .mv-audio-repair small {
  display: block;
}

.mv-audio-repair strong {
  color: var(--ink-secondary);
  font-size: 12px;
}

.mv-audio-repair strong i {
  margin-left: 5px;
  color: var(--ink-tertiary);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}

.mv-audio-repair small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-tertiary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mv-custom-lyrics {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.mv-custom-lyrics[hidden] {
  display: none;
}

.mv-custom-lyrics .field {
  margin: 0;
}

.mv-custom-lyrics .section-row {
  flex-wrap: wrap;
  gap: var(--space-3);
}

.mv-lyrics-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* 音频里没找到位置的歌词行：提醒用户这句可能没唱或识别漏了 */
.mv-lyrics-unlocated {
  display: block;
  margin-top: var(--space-2);
  color: var(--warning);
}

.mv-direction-picker {
  display: grid;
  gap: var(--space-4);
}

.mv-direction-picker section {
  display: grid;
  gap: var(--space-2);
}

/* 分镜＝景别构图、运镜＝机位运动：把两者的分工写在标题上，避免用户以为是一回事。 */
.mv-direction-picker section strong {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.mv-direction-picker section strong small {
  color: var(--ink-tertiary);
  font-size: 11px;
  font-weight: 400;
}

.mv-direction-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.mv-direction-options button {
  min-height: 44px;
}

/* 选中态必须一眼可见：边框、底色和勾号三重反馈。 */
.mv-direction-options button.selected {
  color: var(--ink);
  border-color: var(--signal);
  background: var(--signal-soft);
  box-shadow: inset 0 0 0 1px var(--signal);
}

.mv-direction-options button.selected::after {
  content: "✓";
  margin-left: 5px;
  font-weight: 700;
}

/* 歌词字幕与歌名的排版设置：两项一组，窄屏自动堆叠。 */
.mv-text-styles {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.mv-text-style-group {
  display: grid;
  gap: var(--space-2);
}

.mv-text-style-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.mv-text-color-field {
  margin: 0;
}

.mv-text-style-row .field {
  margin: 0;
}

.mv-text-style-group .section-row {
  align-items: center;
}

/* 颜色板：视觉圆点 24px，点击热区 44px，满足触屏最小热区。 */
.mv-color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.mv-color-picker button {
  width: 44px;
  height: 44px;
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.mv-color-picker button::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--swatch-color, #fff);
}

.mv-color-picker button.selected::after {
  border-color: var(--signal);
  box-shadow: 0 0 0 2px var(--signal-soft);
}

.mv-shot-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-tertiary);
  font-size: 11px;
}

.mv-shot-lines {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mv-shot-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.mv-shot-line-text {
  flex: 1 1 160px;
  min-width: 0;
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.mv-shot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mv-shot-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid var(--signal-strong);
  border-radius: 999px;
  color: var(--signal);
  background: var(--signal-soft);
  font-size: 11px;
  cursor: pointer;
}

/* 这一句的画面描述：属于整句歌词而不是某一条分镜/运镜，所以单独一颗、不可单独删除。 */
.mv-shot-scene {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  color: var(--ink-secondary);
  background: var(--surface-subtle);
  font-size: 11px;
  line-height: 1.5;
}

.mv-shot-add {
  margin-left: auto;
}

.mv-audio-repair .btn, .mv-custom-lyrics .btn {
  min-height: 44px;
  min-width: 44px;
}

.mv-character-field {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.mv-character-thumb {
  width: 56px;
  height: 56px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--signal);
  background: #171b1f;
  padding: 0;
  cursor: zoom-in;
}

.mv-character-thumb:disabled {
  cursor: default;
}

.mv-character-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mv-character-copy {
  min-width: 0;
}

.mv-character-copy strong, .mv-character-copy small {
  display: block;
}

.mv-character-copy strong {
  color: var(--ink-secondary);
  font-size: 13px;
}

.mv-character-copy strong span {
  margin-left: 5px;
  color: var(--ink-tertiary);
  font-size: 10px;
  font-weight: 500;
}

.mv-character-copy small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink-tertiary);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mv-character-actions {
  display: flex;
  gap: 6px;
}

.mv-character-actions input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.mv-character-consent {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-top: 10px;
  color: var(--ink-tertiary);
  font-size: 11px;
  line-height: 1.5;
  cursor: pointer;
}

.mv-character-consent input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--signal);
}

.mv-character-library {
  margin-top: 12px;
}

.mv-character-generation {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.mv-character-generation > div:first-child {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.mv-character-generation > div:first-child > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--signal);
  background: var(--signal-soft);
}

.mv-character-generation strong, .mv-character-generation small {
  display: block;
}

.mv-character-generation small {
  margin-top: 2px;
  color: var(--ink-tertiary);
  font-size: 10px;
}

.mv-character-generation b {
  color: var(--signal);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.mv-character-library:empty {
  display: none;
}

.mv-character-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--ink-secondary);
  font-size: 12px;
}

.mv-character-library-head small {
  color: var(--ink-tertiary);
}

.mv-character-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.mv-character-item {
  position: relative;
  min-width: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.mv-character-item.selected {
  border-color: var(--signal);
  box-shadow: 0 0 0 2px var(--signal-soft);
}

.mv-character-item > [data-character-id] {
  width: 100%;
  height: 100%;
  display: block;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.mv-character-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.mv-character-item [data-character-id] span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  overflow: hidden;
  padding: 4px 5px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: rgb(0 0 0 / 66%);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mv-character-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: var(--radius-sm);
  opacity: 0;
  color: #fff;
  background: rgb(0 0 0 / 64%);
  cursor: pointer;
}

.mv-character-preview {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: var(--radius-sm);
  opacity: 0;
  color: #fff;
  background: rgb(0 0 0 / 64%);
  cursor: zoom-in;
}

.mv-character-item:hover .mv-character-delete, .mv-character-delete:focus-visible, .mv-character-item:hover .mv-character-preview, .mv-character-preview:focus-visible {
  opacity: 1;
}

.mv-character-delete .icon {
  width: 14px;
  height: 14px;
}

.mv-character-preview .icon {
  width: 14px;
  height: 14px;
}

.image-preview-stage {
  max-height: min(70vh, 720px);
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 16px;
  background: #090a0c;
}

.image-preview-stage img {
  max-width: 100%;
  max-height: min(66vh, 680px);
  display: block;
  object-fit: contain;
}

.work-cover-editor {
  display: grid;
  gap: 16px;
}

.work-cover-current {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.work-cover-current .cover {
  width: 76px;
  height: 76px;
}

.work-cover-current strong, .work-cover-current p {
  display: block;
  margin: 0;
}

.work-cover-current p {
  margin-top: 4px;
  color: var(--ink-tertiary);
  font-size: 11px;
  line-height: 1.5;
}

.work-cover-library {
  display: grid;
  gap: 10px;
}

.work-cover-library .section-row {
  margin: 0;
}

.work-cover-library .section-row strong, .work-cover-library .section-row p {
  display: block;
  margin: 0;
}

.work-cover-library .section-row p {
  margin-top: 3px;
  color: var(--ink-tertiary);
  font-size: 11px;
}

.work-cover-assets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.work-cover-asset {
  position: relative;
  min-width: 0;
}

.cover-asset-image {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: var(--surface-subtle);
  text-align: left;
  cursor: pointer;
}

.work-cover-asset.selected .cover-asset-image {
  border-color: var(--signal);
  box-shadow: inset 0 0 0 1px var(--signal);
}

.work-cover-asset img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  transition: transform 160ms ease;
}

.cover-asset-image:hover img, .cover-asset-image:focus-visible img {
  transform: scale(1.03);
}

.cover-asset-check {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 1;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--signal);
  box-shadow: 0 1px 6px rgb(0 0 0 / 45%);
}

.cover-asset-check .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
}

.cover-asset-overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 78px;
  display: grid;
  justify-items: center;
  padding: 18px 42px 8px 8px;
  background: linear-gradient(to top, rgb(5 7 10 / 92%), rgb(5 7 10 / 74%) 78%, transparent);
  pointer-events: none;
}

.cover-asset-overlay > * {
  pointer-events: auto;
}

.cover-asset-select {
  width: 100%;
  min-width: 0;
  align-self: stretch;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.cover-asset-select:disabled {
  cursor: default;
}

.cover-asset-select:hover:not(:disabled) .cover-asset-meta strong, .cover-asset-select:focus-visible:not(:disabled) .cover-asset-meta strong {
  color: var(--signal);
}

.cover-asset-meta {
  display: block;
  width: 100%;
  padding-top: 1px;
}

.cover-asset-meta strong, .cover-asset-meta small {
  color: #fff;
}

.cover-asset-meta small {
  opacity: .72;
}

.work-cover-asset strong, .work-cover-asset small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cover-asset-download {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 38%);
  border-radius: 50%;
  color: #fff;
  background: rgb(0 0 0 / 46%);
}

.cover-asset-download:hover {
  border-color: var(--signal);
  color: #fff;
  background: var(--signal);
}

.work-cover-asset strong {
  font-size: 12px;
}

.work-cover-asset small {
  margin-top: 3px;
  color: var(--ink-tertiary);
  font-size: 10px;
}

.mv-highlight-selector {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.mv-highlight-modes {
  width: fit-content;
}

.mv-manual-highlight {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.mv-highlight-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.mv-highlight-preview-row audio, .mv-clip-preview audio {
  display: block;
  width: 100%;
  min-width: 0;
}

.mv-clip-preview, .mv-selected-lyrics {
  margin-top: var(--space-4);
  display: grid;
  gap: var(--space-3);
}

.mv-clip-preview .section-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.mv-clip-preview small {
  color: var(--ink-tertiary);
  font-size: var(--text-1);
}

#mv-preview-highlight {
  min-height: var(--touch-target);
}

#mv-selected-lyrics {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mv-manual-highlight[hidden] {
  display: none;
}

.mv-waveform {
  height: 82px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.mv-waveform:focus-visible {
  border-color: var(--signal);
  outline: 2px solid color-mix(in srgb, var(--signal), transparent 65%);
  outline-offset: 2px;
}

.mv-waveform canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.mv-waveform > span {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 2px;
  border-right: 1px solid var(--signal);
  border-left: 1px solid var(--signal);
  background: color-mix(in srgb, var(--signal), transparent 82%);
  cursor: grab;
}

/* 手机端拖动波形经常被系统滚动手势抢走，这里保留原生滑块作为可靠入口。 */
/* 波形缩放（毫秒级微调）是手机端专用的精细控制；PC 端保持原有的拖动与原生滑块。 */
/* 手机端拖动波形经常被系统滚动手势抢走，这里保留原生滑块作为可靠入口。 */
/* 波形缩放（毫秒级微调）是手机端专用的精细控制；PC 端保持原有的拖动与原生滑块。 */
#mv-zoom-modes {
  display: none;
}

.mv-highlight-sliders {
  display: none;
}

.mv-highlight-sliders label {
  display: grid;
  gap: 6px;
  color: var(--ink-tertiary);
  font-size: 12px;
}

.mv-highlight-sliders input[type="range"] {
  width: 100%;
  accent-color: var(--signal);
  touch-action: pan-y;
}

.mv-waveform > span > button {
  width: 24px;
  position: absolute;
  top: 0;
  bottom: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
}

.mv-waveform > span > button::after {
  width: 6px;
  position: absolute;
  top: 18%;
  bottom: 18%;
  border-radius: 4px;
  background: var(--signal);
  box-shadow: 0 0 0 2px rgb(11 13 16 / 70%);
  content: '';
}

.mv-waveform [data-highlight-handle="start"] { left: -12px; }
.mv-waveform [data-highlight-handle="end"] { right: -12px; }
.mv-waveform [data-highlight-handle="start"]::after { left: 9px; }
.mv-waveform [data-highlight-handle="end"]::after { right: 9px; }

.mv-waveform-hint {
  color: var(--ink-tertiary);
  font-size: 11px;
}

.mv-manual-highlight audio {
  width: 100%;
  height: 36px;
  color-scheme: dark;
}

@media (max-width: 639px) {
  .mv-highlight-preview-row { grid-template-columns: 1fr; }
  .mv-highlight-preview-row .btn { width: 100%; }
  .mv-waveform { height: 96px; }
  .mv-waveform > span > button { width: 44px; }
  .mv-waveform [data-highlight-handle="start"] { left: -22px; }
  .mv-waveform [data-highlight-handle="end"] { right: -22px; }
  .mv-waveform [data-highlight-handle="start"]::after { left: 19px; }
  .mv-waveform [data-highlight-handle="end"]::after { right: 19px; }
}

.mv-trim-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-tertiary);
  font-size: 11px;
}

.mv-trim-summary strong {
  color: var(--signal);
  font-variant-numeric: tabular-nums;
}

.modal-head > div small {
  display: block;
  margin-top: 3px;
  color: var(--ink-tertiary);
  font-size: 11px;
}

.ai-character-form {
  display: grid;
  gap: 16px;
}

.ai-character-modes {
  width: 100%;
}

.ai-character-asset-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-character-asset-types > label {
  min-width: 0;
  cursor: pointer;
}

.ai-character-asset-types input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ai-character-asset-types span {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line-default);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
}

.ai-character-asset-types input:checked + span {
  border-color: var(--signal);
  box-shadow: inset 0 0 0 1px var(--signal);
  background: var(--signal-soft);
}

.ai-character-asset-types strong {
  color: var(--ink-primary);
  font-size: 13px;
}

.ai-character-asset-types small {
  color: var(--ink-tertiary);
  font-size: 11px;
  line-height: 1.45;
}

.ai-character-reference {
  display: grid;
  gap: 10px;
}

.ai-character-reference[hidden] {
  display: none;
}

.ai-character-upload {
  min-height: 92px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 12px;
  align-items: center;
  padding: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  background: var(--surface-subtle);
  cursor: pointer;
}

.ai-character-upload > span {
  width: 64px;
  height: 68px;
  grid-row: 1 / 3;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--signal);
  background: var(--signal-soft);
}

.ai-character-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-character-upload strong {
  align-self: end;
  font-size: 13px;
}

.ai-character-upload small {
  align-self: start;
  overflow: hidden;
  color: var(--ink-tertiary);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-character-cost {
  margin-right: auto;
  color: var(--ink-tertiary);
  font-size: 12px;
}

.ai-character-cost strong {
  color: var(--signal);
}

.mv-style-label {
  display: block;
  margin: 16px 0 8px;
}

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

.style-swatches button {
  min-width: 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  background: var(--surface-subtle);
  cursor: pointer;
}

.style-swatches button.selected {
  color: var(--ink);
  border-color: var(--signal);
  background: var(--signal-soft);
}

.style-swatches button > span {
  display: block;
  overflow: hidden;
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  margin-bottom: 6px;
  border-radius: var(--radius-sm);
  background: #313640;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

/* 每个画面风格一块带图标的背景图：用场景化的小图（光线、地形、介质）替代纯色块，
   让「这个风格大概长什么样」一眼可辨。 */
.swatch.cinematic {
  background-color: #22322e;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3CradialGradient id='g' cx='50%25' cy='38%25' r='65%25'%3E%3Cstop offset='0' stop-color='%235d7f72'/%3E%3Cstop offset='1' stop-color='%23101816'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect width='64' height='64' fill='url(%23g)'/%3E%3Cpath d='M4 56 L26 8 L34 8 L12 56 Z' fill='%23eafff6' fill-opacity='.22'/%3E%3Cpath d='M26 58 L48 12 L54 12 L32 58 Z' fill='%23eafff6' fill-opacity='.12'/%3E%3Ccircle cx='32' cy='30' r='9' fill='none' stroke='%23eafff6' stroke-opacity='.35' stroke-width='1.5'/%3E%3Crect y='0' width='64' height='6' fill='%23000' fill-opacity='.45'/%3E%3Crect y='58' width='64' height='6' fill='%23000' fill-opacity='.45'/%3E%3C/svg%3E");
}

.swatch.cool {
  background-color: #16283b;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='sky' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%233f7ba8'/%3E%3Cstop offset='1' stop-color='%230b1522'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='64' height='64' fill='url(%23sky)'/%3E%3Ccircle cx='46' cy='15' r='7' fill='%23dff2ff' fill-opacity='.75'/%3E%3Cpath d='M14 52 L32 30 L50 52 Z' fill='%2312263a' fill-opacity='.9'/%3E%3Cpath d='M0 52 H64' stroke='%239fd8ff' stroke-opacity='.35' stroke-width='1.5'/%3E%3C/svg%3E");
}

.swatch.natural {
  background-color: #46523c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='n' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%239db98a'/%3E%3Cstop offset='1' stop-color='%232c3826'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='64' height='64' fill='url(%23n)'/%3E%3Ccircle cx='47' cy='14' r='6' fill='%23fffbe6' fill-opacity='.8'/%3E%3Cpath d='M0 52 L18 30 L34 52 Z' fill='%23384830'/%3E%3Cpath d='M22 52 L42 34 L64 52 Z' fill='%23273322'/%3E%3Cpath d='M0 52 H64' stroke='%23e6f0d8' stroke-opacity='.3' stroke-width='1.5'/%3E%3C/svg%3E");
}

.swatch.warm {
  background-color: #8a5230;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='w' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffc178'/%3E%3Cstop offset='.55' stop-color='%23c96f3c'/%3E%3Cstop offset='1' stop-color='%234a2416'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='64' height='64' fill='url(%23w)'/%3E%3Ccircle cx='44' cy='17' r='9' fill='%23fff1cf' fill-opacity='.85'/%3E%3Cellipse cx='44' cy='17' rx='16' ry='16' fill='%23ffd79a' fill-opacity='.22'/%3E%3Cpath d='M0 54 L64 40 L64 64 L0 64 Z' fill='%236b3418' fill-opacity='.75'/%3E%3Cpath d='M0 50 Q22 44 44 50' stroke='%23ffe0b0' stroke-opacity='.35' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
}

.swatch.film {
  background-color: #5c4a38;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='f' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23a3835c'/%3E%3Cstop offset='1' stop-color='%23423022'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='64' height='64' fill='url(%23f)'/%3E%3Crect y='0' width='64' height='8' fill='%23f6ead6' fill-opacity='.55'/%3E%3Crect y='56' width='64' height='8' fill='%23f6ead6' fill-opacity='.55'/%3E%3Cg fill='%23392a1c' fill-opacity='.75'%3E%3Crect x='3' y='1' width='6' height='6' rx='1'/%3E%3Crect x='14' y='1' width='6' height='6' rx='1'/%3E%3Crect x='25' y='1' width='6' height='6' rx='1'/%3E%3Crect x='36' y='1' width='6' height='6' rx='1'/%3E%3Crect x='47' y='1' width='6' height='6' rx='1'/%3E%3Crect x='3' y='57' width='6' height='6' rx='1'/%3E%3Crect x='14' y='57' width='6' height='6' rx='1'/%3E%3Crect x='25' y='57' width='6' height='6' rx='1'/%3E%3Crect x='36' y='57' width='6' height='6' rx='1'/%3E%3Crect x='47' y='57' width='6' height='6' rx='1'/%3E%3C/g%3E%3Ccircle cx='32' cy='33' r='11' fill='%23f0d9a8' fill-opacity='.28'/%3E%3C/svg%3E");
}

.swatch.neon {
  background-color: #221b45;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='k' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%233b2a72'/%3E%3Cstop offset='1' stop-color='%230c0a1c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='64' height='64' fill='url(%23k)'/%3E%3Cg opacity='.85'%3E%3Crect x='6' y='26' width='7' height='38' fill='%23150f2e'/%3E%3Crect x='17' y='18' width='9' height='46' fill='%231a1236'/%3E%3Crect x='30' y='30' width='7' height='34' fill='%23150f2e'/%3E%3Crect x='41' y='22' width='9' height='42' fill='%231a1236'/%3E%3Crect x='54' y='34' width='6' height='30' fill='%23150f2e'/%3E%3C/g%3E%3Cpath d='M6 24 Q22 6 38 24 T62 22' stroke='%23ff5ec4' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3Cpath d='M6 32 Q24 16 42 32 T64 30' stroke='%2358e2ff' stroke-width='2' fill='none' stroke-linecap='round' stroke-opacity='.85'/%3E%3Cpath d='M0 56 H64' stroke='%23ff9de0' stroke-opacity='.3' stroke-width='6'/%3E%3C/svg%3E");
}

.mv-settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
  gap: 18px;
  align-items: end;
}

.mv-settings-row .field-label {
  display: block;
  margin-bottom: 7px;
}

.mv-custom-prompt {
  margin-top: 16px;
}

.mv-subtitle-setting {
  width: fit-content;
  margin-top: 14px;
}

.mv-custom-prompt > span i {
  margin-left: 5px;
  color: var(--ink-tertiary);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}

.mv-custom-prompt textarea {
  min-height: 88px;
  resize: vertical;
}

.toggle-row {
  min-height: 45px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-row > span {
  width: 38px;
  height: 22px;
  position: relative;
  border-radius: 12px;
  background: var(--surface-strong);
}

.toggle-row > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  transition: transform 150ms var(--ease);
}

.toggle-row input:checked + span {
  background: var(--signal-strong);
}

.toggle-row input:checked + span::after {
  transform: translateX(16px);
}

.toggle-row strong, .toggle-row small {
  display: block;
}

.toggle-row small {
  margin-top: 2px;
  color: var(--ink-tertiary);
  font-size: 10px;
}

.mv-submit {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface-subtle);
}

.mv-submit span, .mv-submit strong, .mv-submit small {
  display: block;
}

.mv-submit span, .mv-submit small {
  color: var(--ink-tertiary);
  font-size: 11px;
}

.mv-submit strong {
  margin: 2px 0;
  color: var(--signal);
  font-size: 18px;
}

.mv-preview {
  position: sticky;
  top: 84px;
}

.mv-preview-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.mv-preview-frame.portrait {
  width: min(230px, 100%);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
}

.mv-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7) saturate(0.9);
}

.mv-preview-frame[data-style="film"] img { filter: brightness(0.72) saturate(0.72) sepia(0.2); }
.mv-preview-frame[data-style="neon"] img { filter: brightness(0.67) saturate(1.35) hue-rotate(12deg); }
.mv-preview-frame[data-style="ink"] img { filter: grayscale(1) contrast(1.15); }
.mv-preview-frame[data-style="warm"] img { filter: brightness(0.73) saturate(1.12) sepia(0.28); }

.preview-caption {
  position: absolute;
  left: 50%;
  /* 与成片默认歌名位置一致：水平居中、距顶部 1/4 画面高（JS 会用内联样式覆盖） */
  top: 25%;
  max-width: min(86%, 320px);
  min-width: 0;
  /* 歌名折行完全按成片算好的断行来，所以容器要按内容撑开：
     left:50% 会把「可用宽度」砍掉一半，默认的收缩宽度会让预览比成片多折一行。 */
  width: max-content;
  transform: translate(-50%, -50%);
  text-align: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.preview-caption.is-dragging {
  cursor: grabbing;
}

/* 竖排：每字一行、多列从右往左，与成片的多列 ASS 事件一一对应。 */
.preview-caption[data-layout="vertical"] {
  max-width: none;
  max-height: 88%;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.preview-caption[data-layout="vertical"] strong {
  margin: 0 3px 0 9px;
}

/* 斜排：整块绕中心旋转，角度就是成片的 \frz。 */
.preview-caption[data-layout="diagonal"] {
  max-width: 120%;
}

.mv-title-layout-field {
  margin: 0;
}

.preview-caption span, .preview-caption strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-caption span {
  color: var(--signal);
  font-size: 9px;
  font-weight: 700;
}

.preview-caption strong {
  margin: 3px 0 9px;
  color: white;
  /* 长歌名按成片规则折行（最多 3 行），所以不能 nowrap */
  white-space: normal;
  line-height: 1.2;
}

/* 自定义文字（作者自由摆放的元素）：整块可拖，位置与成片一一对应。 */
.preview-overlay-layer {
  position: absolute;
  left: 50%;
  top: 94%;
  max-width: 90%;
  padding: 2px 5px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgb(0 0 0 / 60%);
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.preview-overlay-layer.is-dragging {
  cursor: grabbing;
}

/* 歌词字幕预览：水平始终居中，用户只能上下拖（与成片一致）。 */
.preview-lyric-layer {
  position: absolute;
  left: 50%;
  top: 87%;
  max-width: 88%;
  padding: 3px 6px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  color: white;
  background: rgb(0 0 0 / 42%);
  font-size: calc(12px * var(--preview-lyric-scale, 1));
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgb(0 0 0 / 65%);
  transform: translate(-50%, -50%);
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
}

.preview-lyric-layer.is-dragging {
  cursor: ns-resize;
}

.mv-preview-note {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-left: 2px solid var(--signal);
  color: var(--ink-tertiary);
  background: #0e1512;
  font-size: 11px;
}

.mv-preview-note .icon {
  color: var(--signal);
}

.mv-preview-note strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-secondary);
}

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

.mv-live-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--signal);
  font-size: 11px;
  font-weight: 650;
}

.mv-live-status[hidden] {
  display: none;
}

.mv-live-status > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 rgb(86 222 155 / 35%);
  animation: mv-live-pulse 1.8s ease-out infinite;
}

.mv-live-status.is-reconnecting {
  color: var(--stage);
}

.mv-task-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.mv-task-media {
  min-height: 126px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink-tertiary);
  background: var(--canvas);
}

.mv-task-media img, .mv-task-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mv-task-media.portrait img, .mv-task-media.portrait video {
  object-fit: contain;
}

.mv-media-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(8 9 12 / 55%);
}

.mv-media-state .icon[data-lucide="loader-circle"], .work-row .icon[data-lucide="loader-circle"] {
  animation: spin 1.1s linear infinite;
}

.mv-task-copy {
  min-width: 0;
  padding: 14px;
}

.mv-task-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.mv-task-title > div {
  min-width: 0;
}

.mv-task-title strong, .mv-task-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mv-task-title span, .mv-task-copy > p {
  color: var(--ink-tertiary);
  font-size: 11px;
}

/* 用户自己填的画面提示：卡片里截断两行，悬停看全文，放大查看弹窗里给全文。 */
/* 用户自己填的画面提示：卡片里截断两行，悬停看全文，放大查看弹窗里给全文。 */
.mv-task-copy > .mv-task-prompt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 9px 0 0;
  font-size: 12px;
  line-height: 1.6;
  word-break: break-word;
}

.mv-task-prompt b {
  margin-right: 4px;
  color: var(--ink-secondary);
  font-weight: 650;
}

/* 自动截取按完整唱句收束：卡片上说明实际时长与差额退款 */
.mv-task-copy > .mv-task-note {
  display: flex;
  gap: 5px;
  align-items: flex-start;
  margin: 9px 0 0;
  color: var(--success, #4ade80);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-word;
}

.mv-task-copy > .mv-task-note svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 2px;
}

.mv-progress {
  height: 4px;
  margin-top: 17px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-strong);
}

.mv-progress span {
  height: 100%;
  display: block;
  background: var(--signal);
  transition: width 320ms ease;
}

.mv-error {
  color: var(--danger) !important;
}

.mv-failed-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--ink-tertiary);
  font-size: 11px;
}

.mv-failed-actions .btn {
  color: var(--ink-tertiary);
}

.mv-task-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.wallet-balance {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.wallet-balance {
  display: grid;
  align-content: center;
}

.wallet-balance span, .wallet-balance small {
  color: var(--ink-tertiary);
}

.wallet-balance strong {
  margin: 8px 0;
  color: var(--signal);
  font-size: 48px;
  line-height: 1;
}

.transaction-list, .order-list {
  display: grid;
}

.transaction-row, .order-row {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.transaction-row:last-child, .order-row:last-child {
  border-bottom: 0;
}

.transaction-row small, .order-row small {
  display: block;
  margin: 3px 0 0;
  color: var(--ink-tertiary);
  font-size: 11px;
}

.amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.credit-overview {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
}

.credit-wallet {
  min-height: 230px;
}

.credit-wallet small {
  display: flex;
  align-items: center;
  gap: 6px;
}

.credit-wallet .btn {
  width: fit-content;
  margin-top: 18px;
}

.credit-cost-sheet {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.credit-cost-head {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.credit-cost-head span {
  color: var(--signal);
  font-size: var(--text-1);
  font-weight: var(--weight-bold);
}

.credit-cost-head h3 {
  margin: 3px 0 0;
  font-size: var(--text-4);
  line-height: var(--leading-4);
}

.credit-cost-head > small, .wechat-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-tertiary);
  font-size: var(--text-1);
}

.wechat-status.is-ready {
  color: var(--signal-strong);
}

.order-check {
  display: block;
  margin-top: 5px;
  padding: 0;
  border: 0;
  color: var(--signal-strong);
  background: transparent;
  font-size: var(--text-1);
  cursor: pointer;
}

.order-check:hover {
  text-decoration: underline;
}

.wechat-pay-body {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.wechat-pay-amount span, .wechat-pay-amount p {
  display: block;
  margin: 0;
  color: var(--ink-tertiary);
  font-size: var(--text-1);
}

.wechat-pay-amount strong {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  margin: 7px 0;
  font-size: var(--text-8);
  line-height: var(--leading-8);
  font-variant-numeric: tabular-nums;
}

.wechat-pay-amount strong small {
  font-size: var(--text-3);
}

.wechat-pay-qr {
  width: min(280px, 82vw);
  aspect-ratio: 1;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
}

.wechat-pay-help {
  max-width: 340px;
  margin: 0;
  color: var(--ink-secondary);
  font-size: var(--text-1);
  line-height: var(--leading-2);
}

.payment-polling {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
  color: var(--ink-tertiary);
  font-size: var(--text-1);
}

.payment-polling .icon {
  animation: spin 1.2s linear infinite;
}

.credit-cost-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.credit-cost-grid > div {
  min-width: 0;
  min-height: 150px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 17px 15px;
  border-left: 1px solid var(--line);
}

.credit-cost-grid > div:first-child {
  border-left: 0;
}

.credit-cost-grid > div:nth-child(3n + 1) {
  border-left: 0;
}

.credit-cost-grid > div:nth-child(n + 4) {
  border-top: 1px solid var(--line);
}

.credit-cost-grid > div > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--signal);
  background: var(--signal-soft);
}

.credit-cost-grid strong, .credit-cost-grid small {
  display: block;
}

.credit-cost-grid small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-tertiary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credit-cost-grid b {
  color: var(--ink);
  font-size: var(--text-5);
  font-variant-numeric: tabular-nums;
}

.credit-cost-grid b small {
  display: inline;
  margin-left: 3px;
  font-weight: var(--weight-regular);
}

.credit-products-section {
  margin-top: 30px;
  scroll-margin-top: 88px;
}

.credit-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.credit-product {
  min-width: 0;
  min-height: 286px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.credit-product.featured {
  border-color: var(--signal-strong);
  background: var(--surface);
}

/* 大客户定制：不走线上支付，用虚线边框与「面议」文案区分。 */
.credit-product.is-contact {
  border-style: dashed;
  border-color: var(--signal-strong);
}

.credit-product-price strong.is-text {
  font-size: 28px;
}

.credit-product-title {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-secondary);
  font-weight: var(--weight-medium);
}

.credit-product-title b {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--signal);
  background: var(--signal-soft);
  font-size: 10px;
}

.credit-product-price {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 18px;
}

.credit-product-price small {
  color: var(--ink-secondary);
  font-size: var(--text-3);
}

.credit-product-price strong {
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.credit-product-points {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 15px;
}

.credit-product-points strong {
  color: var(--signal);
  font-size: var(--text-5);
}

.credit-product-points span, .credit-product > small, .credit-product > p, .credit-payment-note {
  color: var(--ink-tertiary);
  font-size: var(--text-1);
}

.credit-product > p {
  min-height: 40px;
  margin: 7px 0 2px;
  line-height: var(--leading-2);
}

.credit-product .btn {
  width: 100%;
  margin-top: auto;
}

.credit-payment-note {
  margin: 12px 0 0;
}

.amount.positive {
  color: var(--signal);
}

.account-page {
  width: min(1120px, 100%);
  display: grid;
  gap: 16px;
  margin: 0 auto;
}

.account-panel, .account-links {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.account-page .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.account-panel-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.account-panel-head h2 {
  margin: 0;
  font-size: var(--text-4);
  line-height: var(--leading-4);
}

.account-panel-head > span, .account-panel-head > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-tertiary);
  font-size: var(--text-1);
  text-decoration: none;
  white-space: nowrap;
}

.account-panel-head > a:hover {
  color: var(--ink);
}

.account-identity {
  min-height: 118px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--line);
}

.account-avatar {
  width: 64px;
  height: 64px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface-strong);
  font-size: var(--text-6);
  font-weight: var(--weight-bold);
}

.account-identity-copy {
  min-width: 0;
}

.account-identity-copy > div, .account-identity-copy p, .account-identity-actions {
  display: flex;
  align-items: center;
}

.account-identity-copy > div {
  gap: 10px;
  flex-wrap: wrap;
}

.account-identity-copy h3 {
  margin: 0;
  overflow: hidden;
  font-size: var(--text-5);
  line-height: var(--leading-5);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity-copy p {
  gap: 6px;
  margin: 9px 0 0;
  color: var(--ink-secondary);
}

.account-identity-copy p small {
  color: var(--signal);
}

.account-identity-actions {
  gap: 8px;
}

.account-logout:hover {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger), transparent 48%);
}

.account-feature-row, .account-security-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.account-security-row {
  border-bottom: 0;
}

.account-feature-icon {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--signal);
  background: var(--signal-soft);
}

.account-feature-row strong, .account-security-row strong {
  font-weight: var(--weight-medium);
}

.account-feature-row p, .account-security-row p {
  margin: 3px 0 0;
  color: var(--ink-tertiary);
  font-size: var(--text-1);
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-summary-item {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
}

.account-summary-item + .account-summary-item {
  border-left: 1px solid var(--line);
}

.account-summary-item span, .account-summary-item small {
  display: block;
  color: var(--ink-tertiary);
  font-size: var(--text-1);
}

.account-summary-item strong {
  display: block;
  margin: 7px 0 5px;
  color: var(--ink);
  font-size: var(--text-7);
  line-height: var(--leading-7);
  font-variant-numeric: tabular-nums;
}

.account-wallet-tabs {
  min-height: 54px;
  display: flex;
  align-items: end;
  gap: 24px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.account-wallet-tabs button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ink-tertiary);
  background: transparent;
  cursor: pointer;
}

.account-wallet-tabs button.active {
  color: var(--ink);
  border-bottom-color: var(--signal);
}

.account-wallet-tabs button span {
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 999px;
  color: var(--ink-secondary);
  background: var(--surface-strong);
  font-size: 10px;
  line-height: 18px;
  text-align: center;
}

.account-wallet-panel {
  min-height: 190px;
}

/* 列表内的操作按钮在桌面端只显示图标，手机端再显示文字（见 mobile.css）。 */
/* 列表内的操作按钮在桌面端只显示图标，手机端再显示文字（见 mobile.css）。 */
.work-action-label {
  display: none;
}

.account-wallet-panel .empty-state {
  min-height: 190px;
  border: 0;
  background: transparent;
}

.account-links {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 18px;
}

.account-links > div strong, .account-links > div span {
  display: block;
}

.account-links > div span {
  margin-top: 3px;
  color: var(--ink-tertiary);
  font-size: var(--text-1);
}

.account-links nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 18px;
}

.account-links nav a {
  color: var(--ink-secondary);
  font-size: var(--text-1);
  text-decoration: none;
}

.account-links nav a:hover {
  color: var(--signal);
}

.modal-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--signal);
  font-size: 10px;
  font-weight: var(--weight-bold);
}

.account-profile-editor, .account-password-editor {
  display: grid;
  gap: 18px;
}

.account-profile-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.account-profile-preview .account-avatar {
  width: 52px;
  height: 52px;
  font-size: var(--text-5);
}

.account-profile-preview strong, .account-profile-preview p {
  display: block;
  margin: 0;
}

.account-profile-preview p, .account-profile-editor .field small, .account-password-editor .field small {
  margin-top: 3px;
  color: var(--ink-tertiary);
  font-size: var(--text-1);
}

.global-player {
  position: fixed;
  z-index: 60;
  right: 0;
  bottom: 0;
  left: var(--sidebar-width);
  min-height: var(--player-height);
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 1.4fr) auto;
  gap: 16px;
  align-items: center;
  padding: 9px 18px;
  border-top: 1px solid var(--line-strong);
  background: rgb(14 16 21 / 96%);
  backdrop-filter: blur(16px);
  box-shadow: 0 -12px 28px rgb(0 0 0 / 24%);
}

.player-track {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.player-cover {
  width: 48px;
  height: 48px;
}

.player-track strong, .player-track div > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-track span {
  margin-top: 2px;
  color: var(--ink-tertiary);
  font-size: 11px;
}

.global-player audio {
  width: 100%;
  height: 36px;
  color-scheme: dark;
}

.player-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.player-toggle {
  color: var(--signal);
}

.player-close {
  color: var(--ink-tertiary);
}

.mobile-tabs {
  display: none;
}

.modal {
  width: min(540px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal > form {
  max-height: calc(100dvh - 30px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.modal::backdrop {
  background: rgb(0 0 0 / 70%);
  backdrop-filter: blur(4px);
}

.modal-head, .modal-foot {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 16px;
}

/* 2026-09-05 creator usability: platform-aware touch targets and clear work links. */
/* 2026-09-05 creator usability: platform-aware touch targets and clear work links. */
html[data-os="ios"], html[data-os="android"], html[data-os="harmonyos"] {
  --touch-target: 44px;
}

html[data-device="ipad"] {
  --touch-target: 48px;
}

html[data-os="ios"] button, html[data-os="android"] button, html[data-os="harmonyos"] button, html[data-os="ios"] .btn, html[data-os="android"] .btn, html[data-os="harmonyos"] .btn {
  min-height: var(--touch-target);
  touch-action: manipulation;
}

.work-main {
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
}

.work-main:focus-visible, .work-main:active {
  border-color: var(--signal);
  background: color-mix(in oklch, var(--signal), var(--surface) 91%);
  outline: none;
}

.work-cover-preview {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  cursor: zoom-in;
}

.work-cover-expand-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 34%);
  border-radius: 50%;
  background: rgb(0 0 0 / 54%);
  box-shadow: 0 2px 10px rgb(0 0 0 / 28%);
  transform: translate(-50%, -50%);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.work-cover-expand-icon svg {
  width: 16px;
  height: 16px;
}

.work-cover-preview:hover .cover img, .work-cover-preview:focus-visible .cover img {
  transform: scale(1.035);
}

.work-cover-preview:hover .work-cover-expand-icon, .work-cover-preview:focus-visible .work-cover-expand-icon {
  background: rgb(0 0 0 / 78%);
  box-shadow: 0 4px 14px rgb(0 0 0 / 42%);
  transform: translate(-50%, -50%) scale(1.1);
}

.work-cover-preview .cover img {
  transition: transform 160ms ease;
}

.image-preview-modal {
  width: min(94vw, 980px);
  max-height: 94dvh;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  color: #fff;
  background: var(--canvas);
  box-shadow: var(--shadow);
}

.image-preview-modal::backdrop {
  background: rgb(0 0 0 / 86%);
}

.image-preview-modal > button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 50%;
  color: #fff;
  background: rgb(0 0 0 / 70%);
}

.image-preview-modal img {
  width: 100%;
  max-height: calc(94dvh - 70px);
  display: block;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.image-preview-modal p {
  margin: 8px 4px 0;
  text-align: center;
}

@media (max-width: 720px) {
  .work-row > .work-main {
    min-height: 54px;
    padding: 7px 9px;
    border-color: var(--line);
    background: var(--surface-subtle);
  }

  .work-main strong {
    color: var(--ink);
    font-size: 14px;
  }

  .image-preview-modal {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
}

.modal-head {
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
}

.modal-foot {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.field input[type="range"] {
  width: 100%;
  margin: 10px 0 0;
  accent-color: var(--signal);
}

.discovery-notice {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-secondary);
}

.discovery-notice > .icon {
  color: var(--signal);
}

.discovery-notice strong, .discovery-notice span {
  display: block;
}

.discovery-notice span {
  font-size: var(--text-1);
}

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

.discovery-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.discovery-card > .cover {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 0;
}

.discovery-card-cover {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: block;
  color: var(--signal);
  background: var(--surface-strong);
}

.discovery-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.discovery-card-cover > .discovery-card-play {
  display: grid;
  place-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  min-height: 40px;
  padding: 0;
  color: var(--ink);
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
}

.discovery-card-cover > .discovery-card-play .icon {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 1px 3px rgb(0 0 0 / 80%));
}

.discovery-card-copy {
  padding: 14px 14px 16px;
}

.discovery-card-copy span, .discovery-card-copy h3, .discovery-card-copy p, .discovery-card-copy small {
  display: block;
  margin: 0;
}

.discovery-card-copy span, .discovery-card-copy small {
  color: var(--ink-tertiary);
  font-size: var(--text-1);
}

.discovery-card-copy h3 {
  margin-top: 5px;
  overflow: hidden;
  font-size: var(--text-3);
  line-height: var(--leading-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-card-copy p {
  min-height: 40px;
  margin: 7px 0 10px;
  overflow: hidden;
  color: var(--ink-secondary);
  font-size: var(--text-1);
  line-height: var(--leading-2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.visibility-panel p, .visibility-panel small {
  display: block;
  margin: 0;
  color: var(--ink-secondary);
}

.visibility-panel small {
  margin-top: 8px;
  color: var(--ink-tertiary);
  font-size: var(--text-1);
  line-height: var(--leading-2);
}

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

@keyframes mv-live-pulse {
  70% { box-shadow: 0 0 0 6px rgb(86 222 155 / 0%); }
  100% { box-shadow: 0 0 0 0 rgb(86 222 155 / 0%); }
}

@media (max-width: 1060px) {
  body.workspace-body {
    --sidebar-width: 204px;
  }

  .workspace-content {
    padding-right: 22px;
    padding-left: 22px;
  }

  .account-button span, .task-button span, .credit-button span {
    display: none;
  }

  .workspace-brand {
    grid-template-columns: 1fr;
  }

  .mv-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .mv-task-card {
    grid-template-columns: 145px minmax(0, 1fr);
  }

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

  .credit-cost-grid > div:nth-child(4) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .credit-cost-grid > div:nth-child(5) {
    border-top: 1px solid var(--line);
  }

  .credit-cost-grid > div:nth-child(6) {
    border-top: 1px solid var(--line);
  }

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

@media (max-width: 820px), (max-width: 1024px) and (max-height: 500px) {
  body.workspace-body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }

  body.workspace-body.has-player {
    padding-bottom: 142px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    display: none;
  }

  .workspace-main {
    grid-column: 1;
  }

  .workspace-topbar {
    min-height: calc(58px + env(safe-area-inset-top, 0px));
    padding: max(8px, env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px));
  }

  .page-context p, .account-button, .task-button {
    display: none;
  }

  .workspace-content {
    padding: 22px 16px 42px;
  }

  .mobile-tabs {
    position: fixed;
    z-index: var(--z-mobile-nav);
    inset: auto 0 0;
    height: calc(66px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--line);
    background: rgb(10 11 14 / 97%);
    backdrop-filter: blur(14px);
  }

  .mobile-tabs a {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    color: var(--ink-tertiary);
    font-size: 10px;
    text-decoration: none;
  }

  .mobile-tabs a.active, .mobile-tabs a[aria-current="page"] {
    color: var(--signal);
  }

  .mobile-tabs .icon {
    width: 20px;
    height: 20px;
  }

  .global-player {
    left: 0;
    bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    min-height: 76px;
    grid-template-columns: minmax(110px, 0.75fr) minmax(150px, 1.25fr) auto;
    gap: 8px;
    padding: 8px 12px;
  }

  .global-player .player-link {
    display: none;
  }

  .page-heading {
    align-items: start;
  }

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

  .page-heading h2 {
    font-size: 23px;
  }

  .work-detail, .mv-layout {
    grid-template-columns: 1fr;
  }

  .credit-overview {
    grid-template-columns: 1fr;
  }

  .credit-wallet {
    min-height: 190px;
  }

  .work-identity {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .work-identity > .cover, .work-identity-cover {
    width: 112px;
    height: 112px;
  }

  .mv-mode-strip {
    grid-template-columns: 1fr;
  }

  .mv-preview {
    position: static;
    grid-row: 1;
  }

  .mv-preview-frame {
    width: min(480px, 100%);
    margin: 0 auto;
  }

  .mv-task-list {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 540px) {
  .work-search { padding: 0 13px 13px; }
  .work-search .btn { padding-inline: 10px; }
  .input, .select, .textarea, input, select, textarea {
    font-size: 16px;
  }

  .btn, button, .segmented button {
    min-height: 44px;
  }

  .workspace-content {
    padding-bottom: calc(42px + env(safe-area-inset-bottom, 0px));
  }

  .work-library-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .work-cover-assets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-library-filters {
    width: 100%;
  }

  #work-period-filter {
    min-width: 0;
    flex: 1;
  }

  #work-period-filter button {
    min-width: 0;
    padding-inline: 8px;
    font-size: 12px;
  }

  .section-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .modal-foot {
    flex-wrap: wrap;
    gap: 8px;
  }

  .modal-foot > span {
    width: 100%;
    margin-right: 0;
  }

  .wechat-pay-dialog .modal-foot .btn {
    width: 100%;
  }
  .workspace-content {
    padding-right: 12px;
    padding-left: 12px;
  }

  .mv-trim-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .mv-character-preview, .mv-character-delete {
    opacity: 1;
  }

  .credit-cost-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .credit-cost-grid, .credit-product-grid {
    grid-template-columns: 1fr;
  }

  .credit-cost-grid > div {
    min-height: 78px;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-content: center;
    align-items: center;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .credit-cost-grid > div:first-child {
    border-top: 0;
  }

  .credit-cost-grid > div:nth-child(4), .credit-cost-grid > div:nth-child(5) {
    border-top: 1px solid var(--line);
  }

  .credit-product {
    min-height: 250px;
  }

  .account-page {
    gap: 12px;
  }

  .account-panel-head {
    min-height: 52px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .account-panel-head > span {
    display: none;
  }

  .account-identity {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    padding: 16px 14px;
  }

  .account-avatar {
    width: 52px;
    height: 52px;
    font-size: var(--text-5);
  }

  .account-identity-copy h3 {
    font-size: var(--text-4);
    line-height: var(--leading-4);
  }

  .account-identity-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-identity-actions .btn {
    width: 100%;
  }

  .account-feature-row, .account-security-row {
    grid-template-columns: 40px minmax(0, 1fr);
    padding-right: 14px;
    padding-left: 14px;
  }

  .account-feature-row .btn, .account-security-row .btn {
    width: fit-content;
    grid-column: 2;
  }

  .account-summary-grid {
    grid-template-columns: 1fr;
  }

  .account-summary-item {
    min-height: 104px;
    padding: 16px 14px;
  }

  .account-summary-item + .account-summary-item {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .account-wallet-tabs {
    gap: 18px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .account-links {
    display: grid;
    gap: 14px;
    padding: 16px 14px;
  }

  .account-links nav {
    justify-content: flex-start;
  }

  .page-heading {
    display: grid;
    gap: 12px;
  }

  .discovery-grid {
    grid-template-columns: 1fr;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .btn {
    flex: 1;
  }

  .pagination {
    justify-content: space-between;
    gap: 8px;
    padding-inline: 10px;
  }

  .pagination span {
    font-size: 12px;
    text-align: center;
  }

  .work-row {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 10px;
    padding: 10px;
  }

  .work-row > .cover, .work-row > .work-cover-stack {
    grid-row: 1 / span 2;
  }

  .work-row > .work-main {
    grid-column: 2;
    grid-row: 1;
  }

  .work-row > .work-meta {
    display: block;
    grid-column: 2;
    grid-row: 2;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .work-row > .work-row-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .work-total-heading {
    min-width: auto;
    padding-right: 0;
    border-right: 0;
  }

  .work-total-heading strong {
    font-size: 20px;
  }

  .work-row > .badge, .work-row > .icon:last-child, .work-row > .work-open {
    display: none;
  }

  .work-preference, .work-trash {
    width: 38px;
    min-width: 38px;
    padding: 0;
  }

  .work-title .work-model-badge {
    padding-inline: 4px;
    font-size: 9px;
  }

  .work-identity {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .work-identity > .cover, .work-identity-cover {
    width: 120px;
    height: 120px;
  }

  .work-identity h2 {
    font-size: 22px;
  }

  .work-actions .btn {
    flex: 1 1 140px;
  }

  .mv-work-picker {
    grid-template-columns: 1fr;
  }

  .mv-audio-repair {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .mv-audio-repair > .btn-icon {
    grid-column: 3;
  }

  .mv-audio-repair > #mv-source-audio-choose {
    grid-column: 1 / 3;
  }

  .mv-character-field {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .mv-character-thumb {
    width: 52px;
    height: 52px;
  }

  .mv-character-actions {
    grid-column: 1 / -1;
  }

  .mv-character-actions .btn:not(.btn-icon) {
    flex: 1;
  }

  .mv-character-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mv-character-delete {
    opacity: 1;
  }

  .modal-foot:has(.ai-character-cost) {
    flex-wrap: wrap;
  }

  .ai-character-cost {
    flex-basis: 100%;
  }

  .ai-character-asset-types {
    grid-template-columns: 1fr;
  }

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

  .mv-text-style-row {
    grid-template-columns: 1fr;
  }

  .mv-text-styles {
    padding: var(--space-3);
  }

  .mv-settings-row {
    grid-template-columns: 1fr;
  }

  .mv-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .mv-submit .btn {
    width: 100%;
  }

  .mv-task-card {
    grid-template-columns: 1fr;
  }

  .mv-task-media {
    aspect-ratio: 16 / 9;
  }

  .transaction-row, .order-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .transaction-row > span:nth-last-child(2), .order-row > .badge {
    display: none;
  }

  .global-player {
    grid-template-columns: 104px minmax(0, 1fr) auto;
  }

  .player-track {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .player-cover {
    width: 38px;
    height: 38px;
  }
}

/* Workspace typography and icon polish. Keep the scale intentionally small. */
/* Workspace typography and icon polish. Keep the scale intentionally small. */
body.workspace-body {
  --workspace-caption: 12px;
  --workspace-label: 13px;
  --workspace-body: 14px;
  --workspace-subheading: 17px;
  --workspace-heading: 28px;
  font-size: var(--workspace-body);
  line-height: 1.5;
}

.workspace-nav a, .sidebar-credit, .sidebar-account {
  font-size: var(--workspace-body);
}

.page-context h1 {
  font-size: 16px;
}

.page-context p, .nav-label {
  font-size: var(--workspace-caption);
}

.page-heading-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-heading-copy > div {
  min-width: 0;
}

.page-heading-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in oklch, var(--signal), var(--line) 62%);
  border-radius: var(--radius-md);
  color: var(--signal);
  background: color-mix(in oklch, var(--signal), var(--surface) 92%);
}

.page-heading-icon .icon {
  width: 21px;
  height: 21px;
}

.page-heading h2 {
  font-size: var(--workspace-heading);
  line-height: 1.25;
}

.page-heading p {
  margin-top: 4px;
  color: var(--ink-tertiary);
  font-size: var(--workspace-body);
  line-height: 1.5;
}

.panel-head h3, .section-row h3, .account-panel-head h2, .work-library-head h3 {
  font-size: var(--workspace-subheading);
  line-height: 1.4;
}

.panel-head p, .section-row p, .field > small, .field label, .field-label {
  font-size: var(--workspace-label);
  line-height: 1.5;
}

.btn {
  font-size: var(--workspace-body);
  white-space: nowrap;
}

.btn-sm {
  font-size: var(--workspace-label);
}

.segmented button, .modal-foot button, .page-actions .btn, .order-check {
  white-space: nowrap;
}

.btn .icon, .page-heading-icon .icon {
  transition: transform 160ms var(--ease), color 160ms var(--ease);
}

.btn:hover:not(:disabled) .icon {
  transform: translateY(-1px);
}

#work-period-filter button {
  white-space: nowrap;
}

@media (max-width: 540px) {
  body.workspace-body {
    --workspace-heading: 24px;
    --workspace-subheading: 16px;
  }

  .page-context h1 {
    font-size: 15px;
  }

  .page-heading-copy {
    align-items: flex-start;
    gap: 10px;
  }

  .page-heading-icon {
    width: 38px;
    height: 38px;
  }

  .page-heading-icon .icon {
    width: 19px;
    height: 19px;
  }

  .page-heading h2 {
    font-size: var(--workspace-heading);
  }

  .page-heading p {
    font-size: var(--workspace-body);
  }

  .mobile-tabs a {
    font-size: 11px;
  }

  #work-period-filter {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #work-period-filter button {
    min-width: 0;
    padding-inline: 6px;
    font-size: var(--workspace-caption);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn .icon, .page-heading-icon .icon {
    transition: none;
  }
}

@media (min-width: 1280px) {
  .creator-workspace .workspace-content {
    padding-right: 36px;
    padding-left: 36px;
  }

}

@media (min-width: 1440px) {
  .creator-workspace .workspace-content {
    width: min(1320px, 100%);
    padding-top: 34px;
  }
}

@media (max-width: 820px), (max-width: 1024px) and (max-height: 500px) {
  .creator-workspace .btn, .creator-workspace .segmented button {
    min-height: 44px;
  }

  .creator-workspace .btn-sm {
    min-height: 40px;
  }

  .creator-workspace .work-preference, .creator-workspace .work-trash, .creator-workspace .work-preference-filter {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .creator-workspace .mobile-tabs {
    height: calc(var(--mobile-nav-height) + var(--safe-bottom));
    padding-right: max(4px, var(--safe-right));
    padding-bottom: var(--safe-bottom);
    padding-left: max(4px, var(--safe-left));
  }

  .creator-workspace .mobile-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .creator-workspace .mobile-tabs > :is(a, button) {
    min-width: 0;
    min-height: var(--mobile-nav-height);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    padding: 0;
    border: 0;
    color: var(--ink-tertiary);
    background: transparent;
    font-size: 11px;
    text-decoration: none;
  }

  .creator-workspace .mobile-tabs > :is(a, button).active, .creator-workspace .mobile-tabs > :is(a, button)[aria-current="page"] {
    color: var(--signal);
  }

  .creator-workspace .mobile-tabs > :is(a, button) .icon {
    width: 21px;
    height: 21px;
  }

  .creator-workspace .workspace-topbar {
    min-height: calc(60px + var(--safe-top));
    padding: max(8px, var(--safe-top)) max(var(--mobile-gutter), var(--safe-right)) 8px max(var(--mobile-gutter), var(--safe-left));
  }

  .creator-workspace .workspace-content {
    padding: 24px 20px 46px;
  }

  .creator-workspace .global-player {
    bottom: calc(var(--mobile-nav-height) + var(--safe-bottom));
  }

  .creator-workspace .page-heading {
    margin-bottom: 20px;
  }

  .creator-workspace .mv-layout, .creator-workspace .work-detail {
    gap: 16px;
  }
}

@media (max-width: 639px) {
  .creator-workspace {
    padding-bottom: calc(var(--mobile-nav-height) + var(--safe-bottom));
  }

  .creator-workspace.has-player {
    padding-bottom: calc(var(--mobile-nav-height) + 76px + var(--safe-bottom));
  }

  .creator-workspace .workspace-content {
    padding: 20px var(--mobile-gutter) 40px;
  }

  .creator-workspace .page-context {
    flex: 1;
  }

  .creator-workspace .page-context h1 {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .creator-workspace .page-heading-copy {
    gap: 10px;
  }

  .creator-workspace .page-heading-icon {
    width: 36px;
    height: 36px;
  }

  .creator-workspace .page-heading-icon .icon {
    width: 18px;
    height: 18px;
  }

  .creator-workspace .page-heading h2 {
    font-size: 23px;
    line-height: 1.3;
  }

  .creator-workspace .page-heading p {
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.55;
  }

  .creator-workspace .page-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
  }

  .creator-workspace .page-actions .btn {
    flex: 1 1 132px;
  }

  .creator-workspace .page-actions .btn-primary {
    order: -1;
    flex-basis: 100%;
  }

  .creator-workspace .panel-head {
    padding-right: 14px;
    padding-left: 14px;
  }

  .creator-workspace .panel-body {
    padding: 14px;
  }

  .creator-workspace .discovery-grid {
    gap: 10px;
  }

  .creator-workspace .discovery-card {
    min-height: 108px;
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .creator-workspace .discovery-card > .cover {
    width: 108px;
    height: 100%;
    min-height: 108px;
    aspect-ratio: auto;
  }

  .creator-workspace .discovery-card > .discovery-card-cover {
    width: 108px;
    min-height: 108px;
    height: auto;
    align-self: center;
  }

  .creator-workspace .discovery-card-copy {
    min-width: 0;
    padding: 10px 11px;
  }

  .creator-workspace .discovery-card-copy p {
    min-height: 0;
    margin: 5px 0;
    -webkit-line-clamp: 1;
  }

  .creator-workspace .discovery-card > .btn {
    right: 7px;
    bottom: 7px;
  }

  .creator-workspace .mv-submit {
    position: sticky;
    z-index: 12;
    bottom: calc(var(--mobile-nav-height) + var(--safe-bottom) + 8px);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: rgb(17 19 24 / 97%);
    box-shadow: 0 12px 32px rgb(0 0 0 / 34%);
    backdrop-filter: blur(14px);
  }

  .creator-workspace .credit-product {
    min-height: 210px;
  }

  .creator-workspace .global-player {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .creator-workspace .global-player audio {
    display: none;
  }
}

@media (max-width: 374px) {

  .creator-workspace .credit-button {
    padding-right: 8px;
    padding-left: 8px;
  }
}

.mv-video-preview-modal {
  width: min(1100px, 96vw);
  max-width: 96vw;
}

.mv-video-preview-stage {
  display: grid;
  place-items: center;
  padding: 12px;
  background: #000;
}

.mv-video-preview-stage video {
  width: 100%;
  max-height: 76dvh;
  object-fit: contain;
}

.mv-preview-description { padding: var(--space-3) var(--space-4); color: var(--ink-secondary); font-size: var(--text-2); }
.mv-preview-description summary { min-height: var(--touch-target); align-content: center; cursor: pointer; }
.mv-preview-description p { margin: var(--space-2) 0 0; overflow-wrap: anywhere; }
.mv-video-preview-modal .modal-head h2 { min-width: 0; overflow-wrap: anywhere; }
#mv-duration { margin-bottom: 16px; }
