:root {
  --blue: #0868f5;
  --blue-2: #0b86ff;
  --blue-soft: #eef5ff;
  --orange: #ff7a21;
  --orange-2: #ffa31f;
  --orange-soft: #fff2e6;
  --ink: #112744;
  --muted: #647793;
  --line: #d8e5f5;
  --line-strong: #bad2ef;
  --bg: #f4f8fd;
  --card: #fff;
  --success: #17a979;
  --danger: #ef584f;
  --shadow: 0 13px 31px rgba(16, 54, 110, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(8, 104, 245, .08), transparent 30%),
    radial-gradient(circle at 92% 22%, rgba(255, 122, 33, .075), transparent 22%),
    var(--bg);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.is-hidden { display: none !important; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.03fr .97fr;
  align-items: center;
  padding: clamp(26px, 6vw, 72px);
  gap: clamp(32px, 8vw, 110px);
  background:
    radial-gradient(circle at 22% 18%, rgba(8, 104, 245, .18), transparent 33%),
    linear-gradient(110deg, #f0f7ff, #fff 55%, #fff7f0);
}
.auth-brand img { width: min(208px, 50vw); height: auto; margin-bottom: 40px; }
.auth-tag, .section-label {
  display: inline-flex;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 700;
}
.auth-brand h1 {
  font-size: clamp(38px, 4.8vw, 64px);
  line-height: 1.14;
  letter-spacing: -2px;
  margin: 18px 0;
}
.auth-brand h1 strong { color: var(--orange); }
.auth-brand p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 17px;
  max-width: 570px;
}
.auth-points { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 31px; }
.auth-points span {
  padding: 11px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #355172;
  font-weight: 600;
}
.auth-card {
  background: #fff;
  border-radius: 27px;
  border: 1px solid #e3ebf6;
  padding: 12px 34px 34px;
  box-shadow: 0 24px 60px rgba(14, 48, 105, .12);
  max-width: 490px;
  width: 100%;
}
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); margin: 0 -10px 27px; }
.auth-tab {
  flex: 1;
  height: 57px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  position: relative;
}
.auth-tab.is-active { color: var(--blue); }
.auth-tab.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  height: 3px;
  left: 30px;
  right: 30px;
  background: var(--blue);
  border-radius: 4px;
}
.auth-form { display: none; gap: 19px; }
.auth-form.is-active { display: grid; }
.auth-form h2 { font-size: 29px; margin: 0; }
.auth-form p { margin: -10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.auth-form label, .code-create-form label {
  display: grid;
  gap: 8px;
  font-weight: 650;
  color: #35506e;
  font-size: 14px;
}
.auth-form input, .code-create-form input, .activate-card input {
  height: 51px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
  background: #fbfdff;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(8, 104, 245, .1);
  outline: none;
}
.code-field { position: relative; display: flex; }
.code-field input { width: 100%; padding-right: 124px; }
.inline-btn {
  position: absolute;
  right: 7px;
  top: 7px;
  height: 37px;
  border: 0;
  border-radius: 9px;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}
.primary-btn, .action-btn {
  border: 0;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #fff;
  border-radius: 12px;
  min-height: 49px;
  font-weight: 700;
  box-shadow: 0 9px 17px rgba(8, 104, 245, .18);
}
.primary-btn.orange, .action-btn.orange {
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  box-shadow: 0 9px 18px rgba(255, 122, 33, .22);
}
.primary-btn:hover:not(:disabled),
.action-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  cursor: pointer;
}
.primary-btn:active:not(:disabled),
.action-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.auth-note code { color: var(--orange); font-weight: 700; }

.activate-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.activate-card {
  max-width: 470px;
  text-align: center;
  padding: 43px 45px 34px;
  background: white;
  border-radius: 27px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.activate-card img { width: 181px; display: block; margin: 0 auto 22px; }
.badge {
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  display: inline-flex;
  padding: 5px 10px;
  color: var(--success);
  background: #e9faf4;
}
.badge.orange { color: var(--orange); background: var(--orange-soft); }
.badge.muted { color: var(--muted); background: #f0f4f9; }
.activate-card h2 { margin: 15px 0 9px; }
.activate-card p { color: var(--muted); line-height: 1.7; }
.activate-card form { display: grid; gap: 14px; margin: 28px 0 16px; }
.text-btn {
  border: 0;
  color: var(--muted);
  background: transparent;
  padding: 10px 12px;
}

.topbar {
  height: 72px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 3vw, 36px);
  gap: 19px;
}
.topbar img { width: 153px; }
.top-title {
  font-size: 16px;
  border-left: 1px solid var(--line-strong);
  padding-left: 18px;
  color: #4a6282;
  font-weight: 650;
}
.top-spacer { flex: 1; }

.admin-main {
  max-width: 1220px;
  margin: 30px auto;
  display: grid;
  grid-template-columns: 370px 1fr;
  align-items: start;
  gap: 19px;
  padding: 0 18px;
}
.card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 19px;
  box-shadow: var(--shadow);
}
.admin-create { padding: 27px; }
.admin-create h1 { margin: 12px 0 9px; font-size: 25px; }
.admin-create p { color: var(--muted); line-height: 1.7; font-size: 14px; }
.code-create-form { margin-top: 23px; display: grid; gap: 18px; }
.admin-sms-status {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.admin-sms-status.is-ready { color: #0d7a3f; }
.admin-sms-status.is-warn { color: #b45309; }
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.checkbox-field input { margin-top: 3px; accent-color: var(--blue); }
.code-batch-result {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--blue-soft);
}
.code-batch-result__title { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.code-batch-result__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.code-batch-result__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.code-batch-result__list small {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: 12px;
}
.code-cell, .code-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.admin-list { padding: 25px; }
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 19px; }
.card-heading h2 { margin: 9px 0 0; }
.secondary-btn, .chip-btn, .secondary-mini, .outline-btn {
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--blue);
  border-radius: 10px;
  min-height: 42px;
  padding: 0 15px;
  font-weight: 650;
}
.secondary-btn:hover, .chip-btn:hover { background: var(--blue-soft); }
.table-wrap { overflow: auto; }
table { border-collapse: collapse; min-width: 620px; width: 100%; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; padding: 12px 10px; border-bottom: 1px solid var(--line); }
td { padding: 14px 10px; border-bottom: 1px solid #edf2f8; }
td code { font-weight: 750; color: var(--blue); }

.workspace-shell { min-height: 100vh; }
.workspace-topbar { height: 68px; }
.status-nav {
  display: flex;
  gap: 11px;
  margin-left: auto;
}
.service-pill {
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 13px;
  color: #43617e;
  background: #f3f7fc;
  border: 1px solid #e4ecf5;
}
.service-pill b { color: var(--success); margin-left: 5px; }
.service-pill.pending b { color: var(--orange); }
.user-chip {
  background: var(--orange-soft);
  color: #5e4836;
  height: 45px;
  padding: 6px 13px;
  display: grid;
  border-radius: 11px;
  font-size: 13px;
}
.user-chip small { color: var(--orange); font-weight: 700; }
.studio { padding: 18px clamp(14px, 1.5vw, 24px) 26px; }
/* 工作台内按钮/控件紧凑尺寸 */
.studio .action-btn {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(8, 104, 245, .14);
}
.studio .action-btn.orange {
  box-shadow: 0 4px 10px rgba(255, 122, 33, .18);
}
.studio .action-btn.subtle {
  min-height: 32px;
  font-size: 12px;
}
.studio .secondary-btn,
.studio .outline-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}
.studio .secondary-btn.small,
.studio .action-btn.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}
.studio .small { min-height: 32px; }
.studio .upload-btn,
.studio .upload-icon {
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}
.studio .media-row,
.media-row.voice-sample-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, 112px);
  align-items: start;
  gap: 8px;
}
.studio .media-row__voice,
.media-row__voice {
  min-width: 0;
  display: grid;
  gap: 4px;
  overflow: visible;
}
.voice-engine-pick {
  display: grid;
  gap: 5px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.voice-engine-pick select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  background: #fbfdff;
}
.voice-emotion-hint {
  display: block;
  font-weight: 500;
  color: #b45309;
}
.voice-triple-settings label:has(select:disabled) {
  opacity: 0.72;
}
.voice-sample-hint {
  margin: -2px 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.voice-sample-hint.is-ready {
  color: #0d7a3f;
  font-weight: 600;
}
.voice-upload-btn.is-uploaded {
  background: var(--blue-soft);
  border-color: var(--blue);
}
.media-row__voice .voice-status {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  min-height: 1.2em;
}
.media-row__voice .voice-status.is-ready {
  color: #0d7a3f;
  font-weight: 600;
}
.media-row__voice .voice-status.is-pending {
  color: #b45309;
}
.studio .media-row select,
.media-row select,
#voiceSelect {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  padding: 0 30px 0 10px;
  line-height: 44px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
  background-color: #fbfdff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a6282' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.studio .voice-upload-btn,
.voice-upload-btn {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blue);
  border-radius: 9px;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.studio .voice-upload-btn:hover,
.voice-upload-btn:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
  box-shadow: 0 2px 8px rgba(8, 104, 245, .12);
}
.studio .triple-settings.voice-triple-settings,
.voice-triple-settings {
  grid-template-columns: minmax(0, 1fr) minmax(76px, 92px) auto;
  gap: 8px;
  align-items: end;
}
.studio .voice-triple-settings label,
.voice-triple-settings label {
  min-width: 0;
}
.studio .voice-triple-settings select,
.voice-triple-settings select {
  min-width: 0;
  height: 36px;
  font-size: 12px;
}
.studio .voice-triple-settings input,
.voice-triple-settings input {
  height: 36px;
  font-size: 13px;
}
.studio .voice-triple-settings .secondary-btn,
.studio .voice-triple-settings .clone-voice-btn,
.voice-triple-settings .clone-voice-btn {
  min-height: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
  width: auto;
  justify-self: end;
}
.studio .triple-settings:not(.voice-triple-settings) {
  grid-template-columns: 1fr 56px auto;
  gap: 6px;
  align-items: end;
}
.studio .triple-settings:not(.voice-triple-settings) select,
.studio .triple-settings:not(.voice-triple-settings) input {
  height: 34px;
  font-size: 13px;
}
.studio .triple-settings:not(.voice-triple-settings) .secondary-btn,
.studio .triple-settings:not(.voice-triple-settings) .clone-voice-btn {
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
}
.studio .split-buttons { gap: 6px; }
.studio .chip-btn {
  height: 28px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
}
.studio .wide-input {
  height: 40px;
  padding: 0 12px;
  line-height: 40px;
  font-size: 13px;
}
.studio .field-action input { height: 36px; }
.studio .tag-editor { min-height: 36px; }
.studio .core-upload {
  min-height: 52px;
  padding: 8px 10px;
  font-size: 12px;
}
.studio-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.cloud-btn {
  border: 1px solid #ffd1ae;
  background: var(--orange-soft);
  color: #bc5b17;
  border-radius: 10px;
  min-height: 42px;
  padding: 0 15px;
  font-weight: 700;
}
.project-select { display: flex; align-items: center; gap: 11px; }
.primary-btn.compact { min-height: 43px; padding: 0 16px; }
.project-picker { position: relative; width: 238px; }
.project-picker__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 43px;
  border: 1px solid var(--line-strong);
  background: white;
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.project-picker__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.project-picker__caret { color: var(--muted); font-size: 12px; flex-shrink: 0; }
.project-picker__menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  padding: 6px;
}
.project-picker__menu.is-hidden { display: none; }
.project-picker__item {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  padding: 2px 2px 2px 4px;
}
.project-picker__item.is-active { background: rgba(37, 99, 235, 0.08); }
.project-picker__pick {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 6px;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-picker__pick:hover { color: var(--blue); }
.project-picker__delete {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #b42318;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.project-picker__delete:hover { background: rgba(180, 35, 24, 0.08); }
.project-state { color: var(--muted); font-size: 13px; }
#taskDrawerToggle b {
  background: var(--orange);
  color: #fff;
  border-radius: 999px;
  padding: 2px 7px;
  margin-left: 5px;
}
.pipeline-bar {
  min-height: 66px;
  margin: 0 0 15px;
  padding: 10px 17px;
  display: flex;
  align-items: center;
  gap: clamp(9px, 1vw, 18px);
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.pipeline-bar strong {
  white-space: nowrap;
  padding-right: 16px;
  border-right: 1px solid var(--line);
  color: var(--blue);
}
.pipeline-bar span {
  white-space: nowrap;
  color: #274361;
  font-size: 13px;
  font-weight: 700;
}
.pipeline-bar small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
  font-weight: 500;
}
.pipeline-bar i { font-style: normal; color: var(--orange); font-weight: 800; }
.studio-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr) minmax(520px, 1.15fr);
  gap: 16px;
  align-items: start;
}
.workflow-column {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.column-head {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #fff 0%, #f7fbff 100%);
  box-shadow: var(--shadow);
}
.column-head strong {
  font-size: 17px;
  color: var(--ink);
}
.column-head small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.column-step {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}
.workflow-column--script .column-head {
  border-color: #c9dcff;
  background: linear-gradient(135deg, #fff 0%, #eef5ff 100%);
}
.workflow-column--script .column-step { color: var(--blue); background: #dbeaff; }
.workflow-column--media .column-head {
  border-color: #ffd9bc;
  background: linear-gradient(135deg, #fff 0%, #fff7ef 100%);
}
.workflow-column--media .column-step { color: #c05600; background: #ffe8d1; }
.workflow-column--finish .column-head {
  border-color: #c8efe0;
  background: linear-gradient(135deg, #fff 0%, #eefbf4 100%);
}
.workflow-column--finish .column-step { color: #0f7a52; background: #d7f5e8; }
.workflow-column .panel {
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(16, 54, 110, .05);
}
.workflow-column .panel-title {
  font-size: 17px;
  margin-bottom: 12px;
}
.stage {
  display: grid;
  gap: 11px;
  margin-bottom: 18px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid #e8f0fa;
}
.stage + .stage { border-top: 1px dashed var(--line); padding-top: 16px; margin-top: 4px; }
.panel { padding: 15px 17px; }
.panel-title {
  text-align: center;
  font-size: 20px;
  margin: 3px 0 17px;
  font-weight: 760;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
}
.panel-title::before, .panel-title::after {
  content: "";
  height: 1px;
  width: 48px;
  background: linear-gradient(90deg, transparent, var(--blue));
}
.panel-title::after { background: linear-gradient(90deg, var(--orange), transparent); }
.link-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stage-head strong::before, .mini-stage strong::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 6px;
  display: inline-block;
  vertical-align: -4px;
  margin-right: 8px;
  background: linear-gradient(var(--blue), var(--orange));
}
.chip-btn {
  height: 31px;
  min-height: 31px;
  padding: 0 11px;
  font-size: 12px;
}
textarea, select, .field-action input, #coverTitle {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfdff;
  padding: 10px 12px;
  color: var(--ink);
}
.wide-input {
  width: 100%;
  height: 45px;
  padding: 0 12px;
  line-height: 45px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfdff;
  color: var(--ink);
}
.split-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.action-btn { width: 100%; }
.upload-btn, .upload-icon {
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: white;
  border: 1px dashed var(--blue);
  color: var(--blue);
  font-weight: 650;
  min-height: 49px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.upload-btn:hover, .upload-icon:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
  box-shadow: 0 2px 8px rgba(8, 104, 245, .12);
}
.upload-btn input, .upload-icon input { display: none; }
.upload-btn small, .upload-icon small {
  display: block;
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.text-editor {
  width: 100%;
  resize: vertical;
  line-height: 1.65;
  font-size: 13px;
}
.text-editor.source { height: 173px; }
.text-editor.rewrite { height: 210px; }
.analysis-box {
  min-height: 47px;
  border-radius: 9px;
  padding: 11px;
  background: var(--blue-soft);
  color: #536e91;
  font-size: 13px;
  line-height: 1.55;
}
.analysis-box ul { margin: 0; padding-left: 18px; }
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #4d6383;
}
.toggle-row .chip-btn { margin-left: auto; }
.outline-btn { width: 100%; }
.orange-outline { color: var(--orange); border-color: #ffd1ae; background: #fff8f2; }
.audit-message {
  border-radius: 9px;
  padding: 10px 12px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.center-stack, .right-stack { display: grid; gap: 14px; }
.field-action {
  display: grid;
  grid-template-columns: 1fr 108px;
  gap: 10px;
  align-items: end;
  margin-bottom: 11px;
}
.field-action label { display: grid; gap: 7px; color: #526b88; font-size: 13px; }
.field-action input { height: 44px; width: 100%; }
.small { min-height: 44px; }
.tag-editor {
  display: flex;
  gap: 6px;
  min-height: 44px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 0 8px;
  border-radius: 9px;
}
.tag-editor span {
  padding: 5px 8px;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 7px;
  font-size: 12px;
}
.media-panel select { width: 100%; }
.media-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(88px, 112px); gap: 8px; align-items: start; }
.media-row__voice { min-width: 0; overflow: visible; }
.media-row select {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 44px;
  height: 44px;
  padding: 0 30px 0 10px;
  line-height: 44px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
  background-color: #fbfdff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a6282' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.upload-icon { font-size: 12px; min-height: 43px; border-style: solid; }
.triple-settings {
  display: grid;
  grid-template-columns: 1fr 64px auto;
  gap: 8px;
  align-items: end;
}
.triple-settings label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.triple-settings select, .triple-settings input { width: 100%; height: 39px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; }
.triple-settings .secondary-btn,
.clone-voice-btn {
  white-space: nowrap;
  width: auto;
  justify-self: end;
}
.audio-preview {
  height: 42px;
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  color: var(--muted);
  font-size: 12px;
}
.audio-preview audio { display: none; }
.consent { font-size: 12px; color: #566e8d; display: flex; gap: 7px; align-items: center; }
.asset-upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.core-upload {
  border: 1px dashed #a9c9f6;
  border-radius: 10px;
  color: var(--blue);
  min-height: 63px;
  display: grid;
  gap: 3px;
  align-content: center;
  justify-items: center;
  font-size: 13px;
  font-weight: 700;
  background: #f7fbff;
}
.core-upload small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  max-width: 125px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.core-upload input { display: none; }
.flow-note {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--orange-soft);
  color: #855233;
  font-size: 11px;
  line-height: 1.55;
}
.duration-hint {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef5ff;
  color: #2f5f99;
  font-size: 11px;
  line-height: 1.55;
  border: 1px solid #c9daf3;
}
.duration-hint.warn {
  background: #fff4e8;
  color: #8a4d12;
  border-color: #f3d2a6;
}
.subtitle-status .warn-text { color: #b45309; }
.avatar-progress {
  display: grid;
  gap: 8px;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid #ffd8bc;
  background: linear-gradient(180deg, #fff9f3 0%, #fff3e8 100%);
}
.avatar-progress.is-complete {
  border-color: #b9ebd6;
  background: linear-gradient(180deg, #f4fff9 0%, #e9fbf2 100%);
}
.avatar-progress.is-error {
  border-color: #ffc8c3;
  background: linear-gradient(180deg, #fff7f6 0%, #ffeeec 100%);
}
.avatar-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.avatar-progress-head strong { color: #8a3e00; }
.avatar-progress.is-complete .avatar-progress-head strong { color: #0f7a52; }
.avatar-progress.is-error .avatar-progress-head strong { color: var(--danger); }
#avatarProgressPercent {
  font-weight: 800;
  color: var(--orange);
  white-space: nowrap;
}
.avatar-progress.is-complete #avatarProgressPercent { color: var(--success); }
.avatar-progress.is-error #avatarProgressPercent { color: var(--danger); }
.avatar-progress-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #ffe2c8;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
  transition: width .45s ease;
}
.progress-fill.is-indeterminate {
  width: 36%;
  animation: progress-slide 1.25s ease-in-out infinite;
}
.progress-fill.is-complete {
  background: linear-gradient(90deg, #17a979, #49c59a);
}
.progress-fill.is-error {
  background: var(--danger);
}
@keyframes progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
#avatarProgressHint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.finish-panel .panel-title { margin-bottom: 14px; }
.finish-pack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  min-width: 0;
}
.finish-pack__top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  min-width: 0;
}
.finish-pack__top > * {
  min-width: 0;
  max-width: 100%;
}
.finish-pack__stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}
.finish-pack__preview {
  container-type: inline-size;
  container-name: finish-preview;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  position: relative;
}
.finish-pack__preview .preview-card {
  width: 100%;
  min-width: 0;
}
.finish-pack__preview .video-canvas {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  aspect-ratio: 9 / 16;
  height: auto;
  /* 按右列宽度 9:16 自适应，同时不超过视口高度，避免压住左侧 */
  max-height: 58vh;
  max-height: min(58vh, calc(100cqi * 16 / 9));
}
.finish-panel {
  min-width: 0;
}
.finish-pack__broll {
  width: 100%;
}
.finish-pack__render {
  width: 100%;
}
.preview-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}
.preview-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.preview-card__head strong { font-size: 15px; color: var(--ink); }
.preview-quality-tag {
  font-size: 11px;
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  border: 1px solid #c9daf3;
}
.preview-caption {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}
.pack-steps__pair {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  flex: 1;
  min-height: 0;
  width: 100%;
}
.pack-step--music {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.pack-step--music .pack-step__foot-btn {
  margin-top: auto;
}
.finish-pack__broll.broll-stage {
  gap: 8px;
  padding: 10px 12px;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.finish-pack__broll .broll-step__head {
  flex-wrap: wrap;
  row-gap: 4px;
}
.finish-pack__broll .broll-step__head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  flex: 1 1 100%;
  min-width: 0;
}
.finish-pack__broll .broll-step__head-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.finish-pack__broll .pack-step__hint {
  flex: 1 1 100%;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}
.finish-pack__broll.broll-stage .broll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.finish-pack__broll .broll-slot {
  container-type: inline-size;
  container-name: broll-slot;
  display: grid;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f7fafd;
  border: 1px solid #e3ecf7;
  box-sizing: border-box;
}
.finish-pack__broll .broll-slot.is-active {
  border-color: #9ec5ff;
  background: #eef5ff;
}
.finish-pack__broll .broll-slot__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  min-width: 0;
}
.finish-pack__broll .broll-slot__name {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
}
.finish-pack__broll .broll-status {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}
.finish-pack__broll .broll-upload {
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
}
.finish-pack__broll .broll-upload input[type="file"] {
  display: none;
}
.finish-pack__broll .broll-pick-btn {
  display: inline-block;
  margin: 0;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
  color: var(--blue);
  background: #e8f1ff;
  border: 1px solid #c5d9f5;
}
.finish-pack__broll .broll-slot__times {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  min-width: 0;
}
@container broll-slot (min-width: 240px) {
  .finish-pack__broll .broll-slot__times {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 0;
  }
}
.finish-pack__broll .broll-time {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.finish-pack__broll .broll-time__label {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.finish-pack__broll .broll-stepper {
  display: flex;
  align-items: stretch;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
}
.finish-pack__broll .broll-stepper input[type="number"] {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  height: 30px;
  padding: 0 6px;
  font-size: 12px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: textfield;
}
.finish-pack__broll .broll-stepper input[type="number"]::-webkit-inner-spin-button,
.finish-pack__broll .broll-stepper input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
  margin: 0;
}
.finish-pack__broll .broll-stepper__actions {
  display: flex;
  flex-direction: column;
  flex: 0 0 20px;
  width: 20px;
  border-left: 1px solid var(--line);
  background: #f5f9ff;
}
.finish-pack__broll .broll-stepper__btn {
  flex: 1;
  width: 20px;
  min-height: 14px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.finish-pack__broll .broll-stepper__btn + .broll-stepper__btn {
  border-top: 1px solid #e3ecf7;
}
.finish-pack__broll .broll-stepper__btn:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}
.finish-pack__broll .broll-stepper__btn:active {
  background: #dbeaff;
}
.finish-pack__broll .broll-save-btn {
  flex-shrink: 0;
  margin-left: auto;
  min-height: 30px;
  padding: 0 11px;
  font-size: 12px;
  white-space: nowrap;
}
.finish-pack .pack-step {
  gap: 10px;
  padding: 12px 14px;
}
.finish-pack .pack-step select,
.finish-pack .caption-style-label select {
  min-height: 40px;
  font-size: 13px;
}
.finish-pack .split-buttons {
  gap: 10px;
}
.finish-pack .pack-step .action-btn.small,
.finish-pack .pack-step .secondary-btn.small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}
.finish-pack .pack-step .action-btn.subtle,
.finish-pack .pack-step .secondary-btn:not(.small) {
  min-height: 38px;
}
.finish-pack .pack-step .action-btn.subtle {
  font-size: 13px;
}
.finish-pack .bgm-upload-btn {
  min-height: 44px;
  padding: 9px 12px;
}
.finish-pack .slider-field {
  gap: 10px;
}
.pack-step {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e3ecf7;
  background: #fff;
}
.pack-step__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.pack-step__head strong { font-size: 14px; color: var(--ink); }
.pack-step__no {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}
.pack-step__head strong { display: inline-flex; align-items: center; }
.pack-render-btn {
  width: 100%;
  min-height: 44px;
  font-size: 15px;
  margin-top: 2px;
}
.finish-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}
.finish-bottom .panel { height: 100%; }
.mini-stage { display: grid; gap: 11px; }
.broll-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 72px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f7fafd;
  border: 1px solid #e3ecf7;
}
.broll-row.is-active {
  border-color: #9ec5ff;
  background: #eef5ff;
}
.broll-row > * { min-width: 0; }
.broll-row label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.broll-row input[type="number"] {
  width: 100%;
  min-width: 0;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 8px;
}
.broll-upload {
  overflow: hidden;
  cursor: pointer;
}
.broll-upload input[type="file"] { display: none; }
.broll-pick-btn {
  display: inline-block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 650;
  color: var(--blue);
}
.broll-status {
  display: block;
  color: var(--muted);
  font-weight: normal;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subtle {
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: none;
  border: 1px solid #cbdfff;
}
.mini-stage select { height: 43px; width: 100%; }
.caption-style-block {
  padding: 12px;
  border: 1px solid #c8dcff;
  border-radius: 12px;
  background: linear-gradient(180deg, #f5f9ff 0%, #fff 100%);
}
.caption-style-label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}
.caption-style-label select {
  font-weight: 500;
}
.subtitle-status {
  border-radius: 10px;
  padding: 10px 12px;
  background: #f3f7fc;
  border: 1px solid #d8e6f5;
  font-size: 12px;
  line-height: 1.65;
  color: #3d5570;
}
.subtitle-status small { display: block; }
.subtitle-status .engine-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.subtitle-status .engine-badge.hf {
  background: #e8f7ef;
  color: #0f7a52;
  border: 1px solid #b9e6cf;
}
.subtitle-status .engine-badge.ass {
  background: #eef3fa;
  color: #2f5f99;
  border: 1px solid #c9daf3;
}
.subtitle-status .engine-badge.warn {
  background: #fff4e8;
  color: #a35b00;
  border: 1px solid #f3d2a6;
}
.bgm-upload-btn {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 2px solid var(--blue);
  border-radius: 10px;
  background: linear-gradient(180deg, #f0f7ff 0%, #fff 100%);
  color: var(--blue);
  text-align: center;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.bgm-upload-btn:hover {
  background: var(--blue-soft);
  box-shadow: 0 4px 12px rgba(8, 104, 245, .15);
}
.bgm-upload-btn__main {
  font-size: 14px;
  font-weight: 700;
}
.bgm-upload-btn small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bgm-upload-btn input { display: none; }
.studio .bgm-upload-btn {
  min-height: 46px;
  padding: 8px 12px;
}
.studio .bgm-upload-btn__main { font-size: 13px; }
.switch input { display: none; }
.switch span {
  display: block;
  width: 39px;
  height: 23px;
  border-radius: 99px;
  background: var(--blue);
  position: relative;
}
.switch span::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  right: 3px;
  top: 3px;
}
.slider-field { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.slider-field input { flex: 1; accent-color: var(--blue); }
.video-canvas {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  width: 100%;
  max-height: 520px;
  margin: 0 auto;
  border-radius: 12px;
  background: #0f1726;
  color: #e4edf8;
  display: grid;
  place-items: center;
  text-align: center;
}
.video-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 18, 40, .05) 40%, rgba(7, 18, 40, .55));
}
.video-canvas.is-playable::after,
.video-canvas.is-playing::after {
  display: none;
}
.video-canvas img,
.video-canvas video.preview-player {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #101927;
}
.video-canvas img.is-hidden,
.video-canvas video.preview-player.is-hidden {
  display: none;
}
.video-canvas.is-playable video.preview-player:not(.is-hidden) {
  object-fit: contain;
}
.preview-card__head .preview-quality-tag {
  flex-shrink: 0;
  white-space: nowrap;
}
.play-circle {
  position: relative;
  z-index: 4;
  border: 0;
  color: white;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 104, 245, .75);
  font-size: 18px;
  cursor: pointer;
}
.play-circle.is-hidden { display: none; }
.video-canvas__placeholder {
  position: relative;
  z-index: 3;
  margin: 0;
  padding: 0 14px;
  color: #c5d4ea;
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
}
.video-canvas.is-playable .video-canvas__placeholder,
.video-canvas.is-playing .video-canvas__placeholder {
  display: none;
}
.cover-panel .field-action { grid-template-columns: 1fr 100px; }
.cover-preview { margin-top: 12px; }
.cover-preview-img {
  width: 100%;
  max-width: 220px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
  margin-bottom: 8px;
}
.cover-preview-img.is-hidden { display: none; }
.cover-preview small { color: var(--muted); line-height: 1.5; }
.cover-options { display: flex; gap: 7px; margin: 11px 0; }
.cover-options span {
  width: 25%;
  height: 59px;
  background: linear-gradient(140deg, #dbeaff, #fff2e6);
  border-radius: 7px;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 11px;
  color: #425c78;
}
.export-panel p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.platforms { display: flex; gap: 8px; margin: 19px 0 23px; }
.platforms button {
  flex: 1;
  padding: 12px 3px;
  border: 1px solid transparent;
  border-radius: 9px;
  text-align: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 650;
}
.platforms button:hover, .platforms button.is-active {
  color: var(--orange);
  background: var(--orange-soft);
  border-color: #ffcfaa;
}
.delivery-files {
  display: grid;
  gap: 7px;
  margin-top: 13px;
  padding: 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
}
.delivery-files a,
.delivery-files .delivery-link,
.delivery-files button.delivery-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-decoration: none;
  color: var(--blue);
  background: var(--blue-soft);
  border: none;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.delivery-files a::after,
.delivery-files .delivery-link::after { content: "下载"; color: var(--orange); }
.reserved-btn {
  margin-top: 11px;
  width: 100%;
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--muted);
  height: 37px;
  border-radius: 9px;
  font-size: 12px;
}

.task-drawer {
  position: fixed;
  width: 394px;
  max-width: 95vw;
  right: -410px;
  top: 0;
  bottom: 0;
  z-index: 20;
  background: white;
  border-left: 1px solid var(--line);
  padding: 24px;
  box-shadow: -15px 0 36px rgba(12, 39, 84, .13);
  transition: right .25s ease;
}
.task-drawer.is-open { right: 0; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head h2 { margin: 0; font-size: 20px; }
.drawer-head button {
  width: 36px;
  height: 36px;
  border: 0;
  background: #f3f6fb;
  color: var(--muted);
  border-radius: 50%;
  font-size: 23px;
}
.task-drawer > p { color: var(--muted); line-height: 1.6; font-size: 13px; }
.task-list { display: grid; gap: 12px; margin-top: 18px; }
.task-item {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  display: grid;
  gap: 5px;
}
.task-item strong { font-size: 14px; }
.task-item span { color: var(--muted); font-size: 12px; }
.task-item b { color: var(--success); font-size: 12px; }

.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  background: rgba(12, 26, 47, .4);
  display: grid;
  place-items: center;
  padding: 20px;
}
.info-modal {
  width: min(490px, 100%);
  background: white;
  border-radius: 19px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(12, 36, 75, .2);
}
#modalBody { margin: 19px 0; color: #4c6482; line-height: 1.75; font-size: 14px; }
#modalBody label { display: flex; gap: 8px; margin-top: 14px; color: var(--ink); }
.info-modal .primary-btn { width: 100%; }
.toast-host {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 9px;
  pointer-events: none;
}
.toast {
  min-width: 268px;
  max-width: 390px;
  border-radius: 12px;
  background: #122741;
  color: white;
  padding: 13px 15px;
  box-shadow: 0 13px 25px rgba(10, 25, 47, .2);
  font-size: 14px;
}
.toast.error { background: #b73f3d; }

@media (max-width: 1220px) {
  .studio-grid { grid-template-columns: 1fr 1fr; }
  .workflow-column--finish { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .auth-shell, .admin-main, .studio-grid, .finish-bottom { grid-template-columns: 1fr; }
  .auth-shell { padding: 25px; gap: 28px; }
  .auth-brand img { margin-bottom: 20px; }
  .top-title, .status-nav { display: none; }
  .workspace-topbar { gap: 8px; padding: 0 12px; }
  .workspace-topbar img { width: 126px; }
  .studio-toolbar, .project-select, .toolbar-actions { align-items: stretch; flex-direction: column; }
  .project-picker { width: 100%; }
  .finish-pack__top {
    grid-template-columns: 1fr;
  }
  .finish-pack__preview {
    order: -1;
  }
  .finish-pack__stack {
    order: 2;
  }
  .finish-pack__preview .video-canvas {
    width: min(100%, 320px);
    max-height: min(52vh, calc(100cqi * 16 / 9));
  }
  .pack-steps__pair {
    grid-template-rows: auto auto;
    flex: none;
  }
  .pack-step--music .pack-step__foot-btn {
    margin-top: 0;
  }
  .finish-pack__broll.broll-stage .broll-grid {
    grid-template-columns: 1fr;
  }
  .finish-pack__broll .broll-slot__top {
    flex-wrap: wrap;
  }
  .finish-bottom { grid-template-columns: 1fr; }
}
