:root {
  --canvas: #edf1ed;
  --canvas-deep: #e5ebe6;
  --surface: #ffffff;
  --surface-soft: #f6f8f6;
  --surface-muted: #eef3f0;
  --forest-950: #102c2a;
  --forest-900: #143a36;
  --forest-800: #195148;
  --teal-700: #0b6f65;
  --teal-600: #0b8174;
  --teal-100: #dcefeb;
  --teal-50: #edf8f5;
  --amber-600: #b87318;
  --amber-500: #d69a36;
  --amber-100: #f9ead1;
  --blue-600: #3c6f96;
  --blue-100: #e2edf5;
  --coral-600: #c75240;
  --red-700: #a53a3f;
  --red-100: #f8e5e6;
  --ink: #172421;
  --ink-soft: #52615d;
  --ink-faint: #7c8985;
  --border: #dbe3de;
  --border-strong: #c8d2cc;
  --shadow: 0 12px 28px rgba(17, 47, 43, 0.08);
  --radius: 7px;
  --font: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background-color: var(--canvas);
  background-image: repeating-linear-gradient(135deg, rgba(16, 44, 42, 0.018) 0, rgba(16, 44, 42, 0.018) 1px, transparent 1px, transparent 22px);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

body.booting .login-screen,
body.booting .app-shell {
  visibility: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
label,
summary {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
label:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(11, 129, 116, 0.2);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 22px;
  background-color: #e7ece8;
  background-image: repeating-linear-gradient(135deg, rgba(16, 44, 42, 0.04) 0, rgba(16, 44, 42, 0.04) 1px, transparent 1px, transparent 20px);
}

.login-panel {
  width: min(420px, 100%);
  padding: 32px;
  border: 1px solid var(--border-strong);
  border-top: 4px solid var(--amber-500);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.brand-lockup img {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 6px;
}

.brand-lockup div {
  display: grid;
  min-width: 0;
}

.brand-lockup strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.brand-lockup span {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 10px;
}

.login-brand {
  margin-bottom: 28px;
}

.login-brand img {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
}

.login-brand strong {
  color: var(--forest-900);
  font-size: 20px;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form > label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.input-with-icon,
.input-shell,
.number-suffix {
  position: relative;
  display: block;
}

.input-with-icon svg,
.input-shell svg {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--teal-700);
  transform: translateY(-50%);
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  height: 46px;
  padding: 0 13px 0 42px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fbfcfb;
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--red-700);
  font-size: 11px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
  min-height: 60px;
  align-items: center;
  padding: 7px max(20px, calc((100vw - 1600px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--forest-950);
  color: #fff;
}

.topbar .brand-lockup span {
  color: rgba(255, 255, 255, 0.56);
}

#versionLabel {
  color: rgba(255, 255, 255, 0.78);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.topbar .brand-lockup img {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.topnav {
  display: flex;
  height: 38px;
  gap: 3px;
}

.topnav a {
  display: inline-flex;
  min-width: 108px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 700;
}

.topnav a:hover,
.topnav a.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.topnav svg,
.button svg,
.icon-button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.topbar-actions {
  display: flex;
  min-width: 0;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
}

.client-download-badge {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 219, 142, 0.42);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(231, 157, 39, 0.24), rgba(11, 112, 99, 0.38));
  color: #fff;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.09);
}

.client-download-badge::after {
  position: absolute;
  top: -18px;
  right: -20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 196, 82, 0.22);
  content: "";
}

.client-download-badge:hover {
  border-color: rgba(255, 222, 154, 0.72);
  background: linear-gradient(135deg, rgba(231, 157, 39, 0.34), rgba(11, 112, 99, 0.54));
}

.client-download-badge > svg {
  z-index: 1;
  width: 17px;
  height: 17px;
  color: #ffd78f;
}

.client-download-badge > span {
  z-index: 1;
  display: grid;
  line-height: 1.12;
}

.client-download-badge strong {
  font-size: 11px;
  font-weight: 800;
}

.client-download-badge small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 8px;
}

.cloud-state,
.workspace-session {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  white-space: nowrap;
}

.workspace-session {
  min-height: 31px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
}

.workspace-session svg {
  width: 15px;
  height: 15px;
  color: #72cfb7;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #2eae7a;
  box-shadow: 0 0 0 3px rgba(46, 174, 122, 0.13);
}

.cloud-state.is-offline .status-dot {
  background: #df5a5f;
  box-shadow: 0 0 0 3px rgba(223, 90, 95, 0.13);
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.resource-strip {
  position: sticky;
  z-index: 24;
  top: 60px;
  display: grid;
  grid-template-columns: minmax(175px, 1.15fr) repeat(4, minmax(125px, 1fr)) auto;
  min-height: 47px;
  align-items: center;
  gap: 18px;
  padding: 6px max(20px, calc((100vw - 1600px) / 2));
  border-bottom: 1px solid var(--border-strong);
  background: rgba(237, 241, 237, 0.97);
  backdrop-filter: blur(10px);
}

.resource-state {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.resource-state div {
  display: grid;
  min-width: 0;
}

.resource-state strong {
  overflow: hidden;
  color: var(--forest-900);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-state small {
  color: var(--ink-faint);
  font-size: 9px;
}

.resource-item {
  display: grid;
  grid-template-columns: 18px auto 1fr;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.resource-item > svg {
  width: 16px;
  height: 16px;
  grid-row: span 2;
  color: var(--teal-700);
}

.resource-item > span {
  color: var(--ink-faint);
  font-size: 9px;
}

.resource-item > strong {
  justify-self: end;
  color: var(--ink-soft);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.meter {
  height: 3px;
  grid-column: 2 / 4;
  overflow: hidden;
  border-radius: 2px;
  background: #d5ded8;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--teal-600);
  transition: width 300ms ease;
}

.resource-item:nth-of-type(3) .meter span {
  background: var(--blue-600);
}

.resource-item:nth-of-type(5) .meter span {
  background: var(--amber-600);
}

.queue-state {
  display: flex;
  gap: 10px;
  padding-left: 15px;
  border-left: 1px solid var(--border-strong);
  color: var(--ink-faint);
  font-size: 10px;
  white-space: nowrap;
}

.queue-state strong {
  color: var(--forest-900);
}

.page-content {
  width: min(1600px, 100%);
  margin: 0 auto;
}

.studio {
  display: grid;
  grid-template-columns: 218px minmax(520px, 1fr) 382px;
  align-items: start;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--surface);
}

.mode-rail {
  position: sticky;
  top: 107px;
  display: flex;
  min-width: 0;
  min-height: calc(100vh - 107px);
  flex-direction: column;
  padding: 24px 14px;
  border-right: 1px solid var(--border);
  background: #f2f6f3;
}

.rail-heading {
  display: grid;
  gap: 3px;
  padding: 0 7px 14px;
}

.rail-heading span,
.eyebrow {
  color: var(--teal-700);
  font-size: 9px;
  font-weight: 850;
}

.rail-heading strong {
  color: var(--forest-950);
  font-size: 16px;
}

.mode-list {
  display: grid;
  gap: 6px;
}

.mode-option {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 68px;
  grid-template-columns: 34px minmax(0, 1fr) 15px;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
}

.mode-option:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.65);
}

.mode-option.is-active {
  border-color: #a8c7bf;
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(15, 72, 64, 0.06);
  color: var(--forest-900);
}

.mode-option:disabled {
  opacity: 0.44;
  cursor: not-allowed;
}

.mode-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 5px;
  background: #e2ece8;
  color: var(--teal-700);
}

.mode-icon svg {
  width: 18px;
  height: 18px;
}

.mode-option:nth-child(2) .mode-icon {
  background: var(--amber-100);
  color: var(--amber-600);
}

.mode-option:nth-child(3) .mode-icon {
  background: var(--blue-100);
  color: var(--blue-600);
}

.mode-option:nth-child(4) .mode-icon {
  background: #f2e7e2;
  color: var(--coral-600);
}

.mode-option > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.mode-option strong,
.mode-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-option strong {
  font-size: 11px;
  font-weight: 800;
}

.mode-option small {
  color: var(--ink-faint);
  font-size: 9px;
}

.mode-check {
  width: 14px;
  height: 14px;
  visibility: hidden;
  color: var(--teal-700);
}

.mode-option.is-active .mode-check {
  visibility: visible;
}

.engine-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding: 14px 7px 0;
  border-top: 1px solid var(--border);
  color: var(--ink-faint);
  font-size: 9px;
}

.engine-note svg {
  width: 15px;
  height: 15px;
  color: var(--teal-700);
}

.engine-note.is-offline svg {
  color: var(--red-700);
}

.creator-pane {
  min-width: 0;
  border-right: 1px solid var(--border);
}

.creator-header {
  display: flex;
  min-width: 0;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 26px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.creator-header h1,
.monitor-header h2,
.result-heading h2,
.section-heading h2 {
  margin: 3px 0 0;
  color: var(--forest-950);
  font-size: 20px;
  font-weight: 820;
  line-height: 1.25;
}

.format-note {
  color: var(--ink-faint);
  font-size: 10px;
  white-space: nowrap;
}

.creator-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.top-generate-button {
  min-height: 38px;
  white-space: nowrap;
}

.form-section {
  min-width: 0;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
}

.project-section {
  padding-block: 16px;
  background: var(--surface-soft);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
}

.section-index {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border: 1px solid #9bbdb5;
  border-radius: 5px;
  color: var(--teal-700);
  font-size: 9px;
  font-weight: 850;
}

.section-title > div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.section-title strong {
  color: var(--forest-900);
  font-size: 13px;
  font-weight: 820;
}

.section-title small {
  color: var(--ink-faint);
  font-size: 9px;
}

.field-grid {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.project-grid {
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
}

.editorial-grid,
.package-grid,
.visual-grid,
.ppt-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.voice-grid {
  grid-template-columns: minmax(190px, 1.25fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr);
  margin-top: 12px;
}

.field,
.output-profile {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.field-label {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 750;
}

.field input[type="text"],
.field input[type="number"],
.field textarea,
.field select,
.input-shell input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input[type="text"],
.field input[type="number"],
.field select,
.input-shell input {
  height: 40px;
  padding: 0 11px;
}

.input-shell input {
  padding-left: 38px;
  color: var(--forest-950);
  font-weight: 750;
}

.field textarea {
  min-height: 76px;
  padding: 11px 12px;
  line-height: 1.65;
  resize: vertical;
}

.textarea-field textarea {
  min-height: 154px;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.input-shell input:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(11, 129, 116, 0.09);
  outline: 0;
}

.output-profile > div {
  display: flex;
  gap: 5px;
}

.output-profile strong {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.choice-fieldset {
  min-width: 0;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}

.choice-fieldset legend {
  margin-bottom: 6px;
}

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

.segmented-control label {
  min-width: 0;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control label > span {
  display: grid;
  min-height: 58px;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ink-soft);
}

.segmented-control.compact label > span {
  min-height: 44px;
}

.segmented-control label > span svg {
  width: 19px;
  height: 19px;
  grid-row: 1 / span 2;
  color: var(--ink-faint);
}

.segmented-control strong,
.segmented-control small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segmented-control strong {
  font-size: 10px;
}

.segmented-control small {
  color: var(--ink-faint);
  font-size: 8px;
}

.segmented-control input:checked + span {
  border-color: #78aa9f;
  background: var(--teal-50);
  box-shadow: inset 3px 0 var(--teal-600);
  color: var(--forest-900);
}

.segmented-control input:checked + span svg {
  color: var(--teal-700);
}

.segmented-control input:disabled + span {
  opacity: 0.45;
  cursor: not-allowed;
}

.upload-slot {
  display: grid;
  min-width: 0;
  min-height: 74px;
  grid-template-columns: 42px minmax(0, 1fr) 27px;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border: 1px dashed #aebdb6;
  border-radius: 6px;
  background: #f8faf8;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.upload-slot:hover,
.upload-slot.is-dragging {
  border-color: var(--teal-600);
  background: var(--teal-50);
}

.upload-slot.has-file {
  border-style: solid;
  border-color: #84b5aa;
  background: #f0f8f5;
}

.upload-slot.small {
  min-height: 64px;
  margin-top: 12px;
}

.upload-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 5px;
  background: var(--teal-100);
  color: var(--teal-700);
}

.upload-icon.amber {
  background: var(--amber-100);
  color: var(--amber-600);
}

.upload-icon.blue {
  background: var(--blue-100);
  color: var(--blue-600);
}

.upload-icon svg {
  width: 20px;
  height: 20px;
}

.upload-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.upload-copy strong,
.upload-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-copy strong {
  color: var(--forest-900);
  font-size: 11px;
}

.upload-copy small {
  color: var(--ink-faint);
  font-size: 9px;
}

.upload-action {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--teal-700);
}

.upload-action svg {
  width: 15px;
  height: 15px;
}

.clone-fields {
  margin-top: 8px;
  padding: 0 0 0 14px;
  border-left: 3px solid var(--amber-500);
}

.clone-fields .field {
  margin-top: 10px;
}

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

.media-preview {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
}

.media-preview video {
  display: block;
  width: 132px;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: #10201e;
  object-fit: contain;
}

.media-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
}

.media-facts > div {
  display: grid;
  gap: 2px;
  padding: 7px 11px;
  border-left: 1px solid var(--border);
}

.media-facts span {
  color: var(--ink-faint);
  font-size: 8px;
}

.media-facts strong {
  color: var(--forest-900);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.read-only-field {
  align-content: end;
}

.read-only-field strong {
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 10px;
}

.number-suffix input {
  padding-right: 42px !important;
}

.number-suffix > span {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--ink-faint);
  font-size: 10px;
  transform: translateY(-50%);
  pointer-events: none;
}

.toggle-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.8fr);
  align-items: center;
  gap: 16px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
}

.stock-row {
  margin-top: 14px;
}

.switch-control {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  opacity: 0;
}

.switch {
  position: relative;
  display: block;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: #c7d0cb;
  transition: background-color 150ms ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  content: "";
  transition: transform 150ms ease;
}

.switch-control input:checked + .switch {
  background: var(--teal-600);
}

.switch-control input:checked + .switch::after {
  transform: translateX(16px);
}

.switch-control > span:last-child {
  display: grid;
  min-width: 0;
}

.switch-control strong {
  color: var(--forest-900);
  font-size: 10px;
}

.switch-control small {
  color: var(--ink-faint);
  font-size: 8px;
}

.compact-field select {
  height: 34px;
}

.field-note {
  color: var(--ink-faint);
  font-size: 8px;
}

.advanced-section {
  border-bottom: 1px solid var(--border);
  background: #fbfcfb;
}

.advanced-section summary,
.job-log summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  color: var(--ink-soft);
  cursor: pointer;
  list-style: none;
  font-size: 10px;
  font-weight: 750;
}

.advanced-section summary::-webkit-details-marker,
.job-log summary::-webkit-details-marker {
  display: none;
}

.advanced-section summary span,
.job-log summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.advanced-section summary svg,
.job-log summary svg {
  width: 15px;
  height: 15px;
}

.advanced-section[open] summary > svg,
.job-log[open] summary > svg {
  transform: rotate(180deg);
}

.advanced-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 26px 20px;
}

.submit-row {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 26px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 18px rgba(17, 47, 43, 0.05);
  backdrop-filter: blur(10px);
}

.submit-summary {
  display: grid;
  min-width: 0;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 1px 10px;
}

.submit-summary span {
  color: var(--teal-700);
  font-size: 9px;
  font-weight: 800;
}

.submit-summary strong {
  color: var(--forest-900);
  font-size: 10px;
}

.submit-summary small {
  grid-column: 1 / -1;
  color: var(--ink-faint);
  font-size: 8px;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 780;
  cursor: pointer;
}

.button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.button-primary {
  border-color: #086b61;
  background: var(--teal-700);
  color: #fff;
  box-shadow: 0 5px 12px rgba(11, 111, 101, 0.18);
}

.button-primary:hover:not(:disabled) {
  background: #075e56;
}

.button-secondary {
  border-color: var(--border-strong);
  background: #fff;
  color: var(--forest-900);
}

.button-danger-soft {
  border-color: #e4b8bb;
  background: var(--red-100);
  color: var(--red-700);
}

.button-quiet {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink-soft);
}

.button-wide {
  width: 100%;
}

.generate-button {
  min-width: 190px;
  min-height: 46px;
  font-size: 12px;
}

.upload-progress {
  padding: 9px 26px 14px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.upload-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--ink-faint);
  font-size: 9px;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #dce4df;
}

.progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--teal-600);
  transition: width 280ms ease;
}

.monitor-pane {
  position: sticky;
  top: 107px;
  min-width: 0;
  max-height: calc(100vh - 107px);
  overflow-y: auto;
  background: #f7f9f7;
}

.monitor-empty,
.monitor-active,
.result-view {
  min-height: calc(100vh - 107px);
  padding: 24px;
}

.monitor-empty {
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 13px;
  place-items: center;
  border: 1px solid #afc9c2;
  border-radius: 7px;
  background: var(--teal-50);
  color: var(--teal-700);
}

.empty-icon svg {
  width: 25px;
  height: 25px;
}

.monitor-empty strong {
  color: var(--forest-900);
  font-size: 13px;
}

.monitor-empty small {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 9px;
}

.monitor-header,
.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.monitor-header h2,
.result-heading h2 {
  font-size: 17px;
}

.job-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #98bfb6;
  border-radius: 4px;
  background: var(--teal-100);
  color: var(--teal-700);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.job-badge.failed,
.job-badge.cancelled {
  border-color: #e4b8bb;
  background: var(--red-100);
  color: var(--red-700);
}

.job-badge.paused,
.job-badge.queued {
  border-color: #e2c292;
  background: var(--amber-100);
  color: #955c16;
}

.progress-display {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 29px 0 22px;
}

.progress-number {
  display: flex;
  align-items: baseline;
  color: var(--forest-900);
}

.progress-number strong {
  font-size: 42px;
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  line-height: 1;
}

.progress-number span {
  margin-left: 2px;
  color: var(--teal-700);
  font-size: 15px;
  font-weight: 750;
}

.progress-copy {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.progress-copy > strong {
  min-height: 34px;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 10px;
}

.progress-track.large {
  height: 8px;
}

.timing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.timing-grid > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  column-gap: 7px;
  padding: 13px 8px;
}

.timing-grid > div + div {
  border-left: 1px solid var(--border);
}

.timing-grid svg {
  width: 18px;
  height: 18px;
  grid-row: span 2;
  color: var(--teal-700);
}

.timing-grid span {
  color: var(--ink-faint);
  font-size: 8px;
}

.timing-grid strong {
  overflow: hidden;
  color: var(--forest-900);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.job-log {
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

.job-log summary {
  min-height: 42px;
  padding: 0;
}

#jobLog {
  max-height: 230px;
  overflow-y: auto;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #edf2ef;
  color: #40514d;
  font-family: Consolas, "Microsoft YaHei UI", monospace;
  font-size: 9px;
  line-height: 1.65;
}

.log-line {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 6px;
  overflow-wrap: anywhere;
}

.log-line time {
  color: var(--ink-faint);
  white-space: nowrap;
}

.result-check {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
}

.result-check svg {
  width: 18px;
  height: 18px;
}

.result-view video {
  display: block;
  width: 100%;
  max-height: 510px;
  margin-top: 18px;
  aspect-ratio: 9 / 16;
  border-radius: 6px;
  background: #10201e;
  object-fit: contain;
}

.result-meta {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 14px;
  color: var(--ink-faint);
  font-size: 9px;
}

.result-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-meta strong {
  flex: 0 0 auto;
}

.result-view .button + .button {
  margin-top: 8px;
}

.history-section {
  padding: 26px;
  background: rgba(237, 241, 237, 0.72);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-heading h2 {
  font-size: 17px;
}

.history-list {
  display: grid;
  border-top: 1px solid var(--border-strong);
}

.history-item {
  display: grid;
  min-width: 0;
  min-height: 66px;
  grid-template-columns: minmax(200px, 1.3fr) minmax(130px, 0.8fr) 90px 82px 74px auto;
  align-items: center;
  gap: 15px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.56);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.9);
}

.history-primary,
.history-cell {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.history-primary strong,
.history-primary span,
.history-cell strong,
.history-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-primary strong {
  color: var(--forest-900);
  font-size: 10px;
}

.history-primary span,
.history-cell span {
  color: var(--ink-faint);
  font-size: 8px;
}

.history-cell strong {
  color: var(--ink-soft);
  font-size: 9px;
}

.history-status {
  display: inline-flex;
  width: max-content;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--teal-100);
  color: var(--teal-700);
  font-size: 8px;
  font-weight: 850;
}

.history-status.failed,
.history-status.cancelled {
  background: var(--red-100);
  color: var(--red-700);
}

.history-status.running,
.history-status.queued,
.history-status.paused {
  background: var(--amber-100);
  color: #925a17;
}

.history-action {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--teal-700);
  cursor: pointer;
}

.history-action svg {
  width: 15px;
  height: 15px;
}

.history-empty {
  display: grid;
  min-height: 92px;
  place-items: center;
  color: var(--ink-faint);
  font-size: 10px;
}

.toast-region {
  position: fixed;
  z-index: 60;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(350px, calc(100vw - 36px));
  gap: 7px;
  pointer-events: none;
}

.toast {
  padding: 11px 13px;
  border: 1px solid #315852;
  border-radius: 5px;
  background: #173c37;
  box-shadow: var(--shadow);
  color: #fff;
  font-size: 10px;
}

.toast.error {
  border-color: #8e353a;
  background: #762c31;
}

.workspace-panel {
  min-width: 0;
}

.workspace-panel.is-active {
  animation: workspace-enter 220ms ease-out both;
}

@keyframes workspace-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.creator-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-tool-button {
  min-height: 34px;
  padding-inline: 11px;
  font-size: 10px;
}

.button-small {
  min-height: 31px;
  padding-inline: 10px;
  font-size: 9px;
}

.template-reuse-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 10px;
}

.template-reuse-row .button {
  margin-bottom: 1px;
}

.upload-slot.uses-template {
  border-style: solid;
  border-color: rgba(11, 129, 116, 0.48);
  background: linear-gradient(135deg, #f1faf7, #ffffff);
}

.inline-manager-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal-700);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.inline-manager-link:hover {
  color: var(--forest-900);
}

.inline-manager-link svg {
  width: 14px;
  height: 14px;
}

#audioResultPreview {
  width: 100%;
  margin: 10px 0 4px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: #f6f8f6;
}

.quality-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 12px;
  margin: 10px 0 14px;
  padding: 11px 12px;
  border: 1px solid #dfc892;
  border-left: 4px solid var(--amber-500);
  border-radius: 6px;
  background: #fff9ec;
}

.quality-summary span,
.quality-summary small {
  color: var(--ink-faint);
  font-size: 9px;
}

.quality-summary strong {
  grid-row: span 2;
  color: #87550f;
  font-size: 17px;
}

.quality-summary.is-pass {
  border-color: #b7d9cf;
  border-left-color: var(--teal-600);
  background: var(--teal-50);
}

.quality-summary.is-pass strong {
  color: var(--teal-700);
}

.quality-summary.is-block {
  border-color: #e4b8bb;
  border-left-color: var(--red-700);
  background: #fff3f3;
}

.quality-summary.is-block strong {
  color: var(--red-700);
}

.artifact-mini-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.artifact-mini-item {
  display: grid;
  min-width: 0;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-soft);
}

.artifact-mini-item > svg:first-child {
  width: 16px;
  height: 16px;
  justify-self: center;
  color: var(--teal-700);
}

.artifact-mini-item > svg:last-child {
  width: 14px;
  height: 14px;
  color: var(--ink-faint);
}

.artifact-mini-item span {
  display: grid;
  min-width: 0;
}

.artifact-mini-item strong,
.artifact-mini-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artifact-mini-item strong {
  color: var(--forest-900);
  font-size: 9px;
}

.artifact-mini-item small {
  color: var(--ink-faint);
  font-size: 8px;
}

.management-page {
  min-height: calc(100vh - 107px);
  padding: 28px clamp(18px, 3vw, 42px) 54px;
  background-color: #edf2ee;
  background-image:
    radial-gradient(circle at 8% 0%, rgba(11, 129, 116, 0.08), transparent 28%),
    repeating-linear-gradient(135deg, rgba(16, 44, 42, 0.018) 0, rgba(16, 44, 42, 0.018) 1px, transparent 1px, transparent 22px);
}

.management-hero {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 0 2px;
}

.management-hero h1 {
  margin: 3px 0 0;
  color: var(--forest-950);
  font-size: 30px;
  line-height: 1.15;
}

.management-grid,
.voice-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.voice-workbench {
  grid-template-columns: minmax(300px, 0.72fr) minmax(480px, 1.28fr);
}

.management-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--forest-800);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(17, 47, 43, 0.05);
}

.management-card:nth-child(2n) {
  border-top-color: var(--amber-500);
}

.card-heading {
  display: flex;
  min-height: 46px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.card-heading > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.card-heading > div > svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--teal-700);
}

.card-heading span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.card-heading strong {
  color: var(--forest-900);
  font-size: 13px;
}

.card-heading small {
  color: var(--ink-faint);
  font-size: 9px;
}

.management-page .icon-button,
.artifact-action {
  border-color: var(--border-strong);
  background: #fff;
  color: var(--teal-700);
}

.management-page .icon-button:hover,
.artifact-action:hover {
  background: var(--teal-50);
  color: var(--forest-900);
}

.asset-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.asset-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 11px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-soft);
}

.asset-card .button {
  grid-column: 1 / -1;
}

.asset-visual {
  display: grid;
  min-height: 62px;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 6px;
  background: linear-gradient(145deg, var(--forest-900), var(--teal-700));
  color: #fff;
}

.asset-visual svg {
  width: 23px;
  height: 23px;
}

.asset-visual span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 7px;
}

.asset-copy,
.delivery-copy {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 4px;
}

.asset-copy strong,
.asset-copy small,
.delivery-copy strong,
.delivery-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-copy strong,
.delivery-copy strong {
  color: var(--forest-900);
  font-size: 10px;
}

.asset-copy small,
.delivery-copy small {
  color: var(--ink-faint);
  font-size: 8px;
}

.delivery-grid {
  display: grid;
  gap: 8px;
}

.delivery-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.delivery-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 6px;
  background: var(--teal-100);
  color: var(--teal-700);
}

.delivery-icon.audio {
  background: var(--amber-100);
  color: #925a17;
}

.delivery-icon svg {
  width: 19px;
  height: 19px;
}

.delivery-actions,
.voice-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.empty-card {
  display: grid;
  min-height: 100px;
  place-items: center;
  color: var(--ink-faint);
  font-size: 10px;
}

.voice-profile-form {
  display: grid;
  gap: 13px;
}

.voice-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.voice-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-soft);
}

.voice-card.is-selected {
  border-color: rgba(11, 129, 116, 0.5);
  box-shadow: inset 0 0 0 1px rgba(11, 129, 116, 0.08);
}

.voice-card-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--forest-900);
  color: #fff;
}

.voice-card-mark svg {
  width: 19px;
  height: 19px;
}

.voice-card-copy {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 3px;
}

.voice-card-copy strong,
.voice-card-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-card-copy strong {
  color: var(--forest-900);
  font-size: 10px;
}

.voice-card-copy small {
  color: var(--ink-faint);
  font-size: 8px;
}

.voice-card-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.task-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.task-overview > div {
  display: grid;
  min-height: 82px;
  align-content: center;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--teal-600);
  border-radius: 7px;
  background: #fff;
}

.task-overview > div:nth-child(2) {
  border-left-color: var(--amber-500);
}

.task-overview > div:nth-child(4) {
  border-left-color: var(--red-700);
}

.task-overview span {
  color: var(--ink-faint);
  font-size: 9px;
}

.task-overview strong {
  color: var(--forest-950);
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}

.management-page .history-section {
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  overflow: hidden;
}

.artifact-browser {
  margin-top: 18px;
}

.artifact-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.artifact-filter button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.artifact-filter button.is-active {
  border-color: var(--teal-700);
  background: var(--teal-700);
  color: #fff;
}

.artifact-list {
  display: grid;
  border-top: 1px solid var(--border);
}

.artifact-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--border);
}

.artifact-row-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 5px;
  background: var(--surface-muted);
  color: var(--teal-700);
}

.artifact-row-icon svg {
  width: 16px;
  height: 16px;
}

.artifact-row > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.artifact-row > div:last-child {
  display: flex;
  gap: 6px;
}

.artifact-row strong,
.artifact-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artifact-row strong {
  color: var(--forest-900);
  font-size: 10px;
}

.artifact-row small {
  color: var(--ink-faint);
  font-size: 8px;
}

.artifact-action {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}

.production-presets {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 12px 16px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--border);
  background: #f4f7f4;
}

.preset-heading {
  display: grid;
  gap: 2px;
}

.preset-heading span {
  color: var(--teal-700);
  font-size: 8px;
  font-weight: 850;
}

.preset-heading strong {
  color: var(--forest-950);
  font-size: 13px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.production-preset {
  display: grid;
  min-width: 0;
  min-height: 52px;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
}

.production-preset:hover,
.production-preset.is-active {
  border-color: #8ab6ac;
  background: #fff;
  box-shadow: 0 4px 11px rgba(17, 47, 43, 0.06);
  color: var(--forest-900);
}

.production-preset > svg {
  width: 19px;
  height: 19px;
  justify-self: center;
  color: var(--teal-700);
}

.production-preset:nth-child(2) > svg {
  color: var(--amber-600);
}

.production-preset:nth-child(3) > svg {
  color: var(--coral-600);
}

.production-preset span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.production-preset strong,
.production-preset small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-preset strong {
  font-size: 9px;
}

.production-preset small {
  color: var(--ink-faint);
  font-size: 7px;
}

.draft-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.draft-actions > span,
.draft-actions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.draft-actions svg {
  width: 13px;
  height: 13px;
}

.draft-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal-700);
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.advanced-switch {
  min-height: 61px;
  align-self: end;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-soft);
}

.director-grade strong {
  display: flex;
  align-items: center;
  gap: 7px;
}

.director-grade svg {
  width: 15px;
  height: 15px;
  color: var(--teal-700);
}

.preflight-panel {
  margin: 14px 26px 0;
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--teal-600);
  border-radius: 6px;
  background: #f8faf8;
}

.preflight-panel.has-errors {
  border-left-color: var(--red-700);
}

.preflight-heading,
.preflight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.preflight-heading {
  border-bottom: 1px solid var(--border);
}

.preflight-heading > div:first-child {
  display: grid;
  gap: 1px;
}

.preflight-heading > div:first-child > strong {
  color: var(--forest-900);
  font-size: 12px;
}

.preflight-score {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.preflight-score strong {
  color: var(--teal-700);
  font-size: 18px;
}

.preflight-score span {
  color: var(--ink-faint);
  font-size: 8px;
}

.preflight-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
}

.preflight-item {
  display: grid;
  min-width: 0;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  background: #fff;
}

.preflight-item > svg {
  width: 16px;
  height: 16px;
  color: var(--teal-700);
}

.preflight-item.warn > svg {
  color: var(--amber-600);
}

.preflight-item.fail > svg {
  color: var(--red-700);
}

.preflight-item span {
  display: grid;
  min-width: 0;
}

.preflight-item strong,
.preflight-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preflight-item strong {
  color: var(--forest-900);
  font-size: 9px;
}

.preflight-item small {
  color: var(--ink-faint);
  font-size: 7px;
}

.preflight-footer {
  color: var(--ink-faint);
  font-size: 8px;
}

.job-config {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 10px 0 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--border);
}

.job-config span {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  background: var(--surface-soft);
  color: var(--ink-faint);
  font-size: 7px;
}

.job-config strong {
  overflow: hidden;
  color: var(--forest-900);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-compose-card {
  grid-column: 1 / -1;
}

.quality-lock,
.runtime-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid #b8d8d0;
  border-radius: 4px;
  background: var(--teal-50);
  color: var(--teal-700);
  font-size: 8px;
  font-weight: 850;
  white-space: nowrap;
}

.quality-lock svg {
  width: 13px;
  height: 13px;
}

.runtime-badge.is-offline {
  border-color: #e2b7ba;
  background: var(--red-100);
  color: var(--red-700);
}

.voice-compose-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.7fr);
  gap: 16px;
}

.voice-script-field .field-label {
  display: flex;
  justify-content: space-between;
}

.voice-control-stack {
  display: grid;
  align-content: start;
  gap: 10px;
}

.task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
}

.task-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.task-filters button {
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.task-filters button.is-active {
  border-color: var(--teal-700);
  background: var(--teal-700);
  color: #fff;
}

.task-search {
  position: relative;
  width: min(320px, 42%);
}

.task-search svg {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
  transform: translateY(-50%);
}

.task-search input {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 34px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: #fff;
}

.tools-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.runtime-grid > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 10px;
  border-left: 3px solid var(--teal-600);
  background: var(--surface-soft);
}

.runtime-grid span,
.workspace-metrics span {
  color: var(--ink-faint);
  font-size: 8px;
}

.runtime-grid strong {
  overflow: hidden;
  color: var(--forest-900);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capability-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.capability-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--ink-soft);
  font-size: 8px;
}

.capability-item svg {
  width: 14px;
  height: 14px;
  color: var(--teal-700);
}

.capability-item.is-offline svg {
  color: var(--red-700);
}

.tool-preset-list {
  display: grid;
  gap: 7px;
}

.tool-preset-list button {
  display: grid;
  min-width: 0;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--teal-700);
  text-align: left;
  cursor: pointer;
}

.tool-preset-list button:hover {
  border-color: #9fc7be;
  background: #fff;
}

.tool-preset-list button > svg:first-child {
  width: 19px;
  height: 19px;
  justify-self: center;
}

.tool-preset-list button > svg:last-child {
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
}

.tool-preset-list span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.tool-preset-list strong {
  color: var(--forest-900);
  font-size: 10px;
}

.tool-preset-list small {
  color: var(--ink-faint);
  font-size: 8px;
}

.quick-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quick-tool-grid button {
  display: flex;
  min-height: 47px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--forest-900);
  font-size: 9px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.quick-tool-grid button:hover {
  border-color: #9fc7be;
  background: #fff;
}

.quick-tool-grid svg {
  width: 17px;
  height: 17px;
  color: var(--teal-700);
}

.workspace-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.workspace-metrics > div {
  display: grid;
  min-height: 74px;
  place-content: center;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
  text-align: center;
}

.workspace-metrics strong {
  color: var(--forest-950);
  font-size: 22px;
}

.production-flow-card {
  margin-top: 18px;
}

.production-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) 20px minmax(0, 1fr) 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.production-flow > div {
  display: grid;
  min-height: 106px;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--teal-600);
  border-radius: 6px;
  background: var(--surface-soft);
  text-align: center;
}

.production-flow > div:nth-of-type(2) {
  border-top-color: var(--amber-500);
}

.production-flow > div:nth-of-type(3) {
  border-top-color: var(--blue-600);
}

.production-flow > div:nth-of-type(4) {
  border-top-color: var(--coral-600);
}

.production-flow > div > span {
  color: var(--ink-faint);
  font-size: 7px;
  font-weight: 850;
}

.production-flow > div > svg {
  width: 21px;
  height: 21px;
  color: var(--teal-700);
}

.production-flow > div > strong {
  color: var(--forest-900);
  font-size: 10px;
}

.production-flow > div > small {
  color: var(--ink-faint);
  font-size: 7px;
}

.production-flow > svg {
  width: 17px;
  height: 17px;
  color: var(--ink-faint);
}

.mobile-workspace-nav {
  display: none;
}

@media (max-width: 1320px) {
  .studio {
    grid-template-columns: 190px minmax(480px, 1fr) 344px;
  }

  .mode-rail {
    padding-inline: 10px;
  }

  .mode-option {
    grid-template-columns: 31px minmax(0, 1fr) 13px;
    gap: 7px;
    padding-inline: 7px;
  }

  .mode-icon {
    width: 31px;
    height: 31px;
  }

  .creator-header,
  .form-section {
    padding-inline: 21px;
  }

  .production-presets {
    grid-template-columns: 1fr;
    padding-inline: 21px;
  }

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

  .preflight-panel {
    margin-inline: 21px;
  }

  .advanced-section summary,
  .submit-row,
  .upload-progress {
    padding-inline: 21px;
  }

  .advanced-content {
    padding-inline: 21px;
  }

  .monitor-empty,
  .monitor-active,
  .result-view {
    padding-inline: 20px;
  }
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: minmax(230px, 1fr) auto;
  }

  .topnav {
    display: none;
  }

  .resource-strip {
    grid-template-columns: minmax(160px, 1fr) repeat(4, minmax(100px, 1fr));
    gap: 11px;
  }

  .queue-state {
    display: none;
  }

  .studio {
    grid-template-columns: minmax(0, 1fr) 350px;
  }

  .mode-rail {
    position: sticky;
    z-index: 18;
    top: 107px;
    display: grid;
    min-height: 0;
    grid-column: 1 / -1;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .rail-heading {
    padding: 0;
  }

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

  .mode-option {
    min-height: 52px;
    grid-template-columns: 29px minmax(0, 1fr);
  }

  .mode-icon {
    width: 29px;
    height: 29px;
  }

  .mode-check,
  .mode-option small,
  .engine-note {
    display: none;
  }

  .creator-pane {
    border-right: 1px solid var(--border);
  }

  .monitor-pane {
    top: 180px;
    max-height: calc(100vh - 180px);
  }

  .monitor-empty,
  .monitor-active,
  .result-view {
    min-height: calc(100vh - 180px);
  }
}

@media (max-width: 840px) {
  html {
    scroll-padding-top: 60px;
  }

  .resource-strip {
    position: static;
    grid-template-columns: minmax(150px, 1.3fr) repeat(2, minmax(100px, 1fr));
    padding: 7px 14px;
  }

  .resource-item:nth-of-type(4),
  .resource-item:nth-of-type(5) {
    display: none;
  }

  .studio {
    grid-template-columns: 1fr;
    border-right: 0;
    border-left: 0;
  }

  .mode-rail {
    position: static;
    display: block;
    grid-column: 1;
    padding: 10px 13px;
  }

  .rail-heading {
    display: none;
  }

  .mode-list {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .mode-option {
    min-width: 148px;
  }

  .creator-pane {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .monitor-pane {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .monitor-empty,
  .monitor-active,
  .result-view {
    min-height: 300px;
  }

  .result-view video {
    max-height: 640px;
  }

  .history-item {
    grid-template-columns: minmax(0, 1.3fr) minmax(110px, 0.8fr) 78px auto;
  }

  .history-item .history-cell:nth-of-type(2),
  .history-item .history-cell:nth-of-type(3) {
    display: none;
  }
}

@media (max-width: 620px) {
  .login-screen {
    padding: 13px;
  }

  .login-panel {
    padding: 25px 19px;
  }

  .topbar {
    min-height: 58px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 7px 11px;
  }

  .topbar .brand-lockup {
    gap: 8px;
  }

  .topbar .brand-lockup img {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
  }

  .topbar .brand-lockup strong {
    max-width: 210px;
    font-size: 12px;
  }

  .topbar .brand-lockup span {
    font-size: 8px;
  }

  .cloud-state {
    display: none;
  }

  .client-download-badge {
    width: 34px;
    min-height: 34px;
    justify-content: center;
    padding: 0;
  }

  .client-download-badge > span {
    display: none;
  }

  .workspace-session {
    width: 34px;
    padding: 0;
    justify-content: center;
  }

  .workspace-session span {
    display: none;
  }

  .resource-strip {
    top: 58px;
    grid-template-columns: minmax(135px, 1fr) minmax(105px, 0.9fr);
    gap: 11px;
    padding: 7px 11px;
  }

  .resource-item:nth-of-type(3) {
    display: none;
  }

  .mode-rail {
    padding-inline: 11px;
  }

  .mode-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .mode-option {
    min-width: 0;
    min-height: 64px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5px;
    padding: 7px 3px;
    text-align: center;
  }

  .mode-option .mode-icon {
    width: 28px;
    height: 28px;
  }

  .mode-option .mode-icon svg {
    width: 16px;
    height: 16px;
  }

  .mode-option > span:nth-child(2) {
    width: 100%;
  }

  .mode-option strong {
    font-size: 10px;
  }

  .mode-option small,
  .mode-option .mode-check {
    display: none;
  }

  .creator-header {
    min-height: 72px;
    padding: 14px;
  }

  .creator-header h1 {
    font-size: 17px;
  }

  .format-note {
    display: none;
  }

  .top-generate-button {
    min-width: 42px;
    padding-inline: 11px;
  }

  .top-generate-button span {
    display: none;
  }

  .form-section {
    padding: 18px 14px;
  }

  .project-grid,
  .editorial-grid,
  .package-grid,
  .visual-grid,
  .ppt-grid,
  .voice-grid,
  .advanced-content {
    grid-template-columns: 1fr;
  }

  .output-profile > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .output-profile strong {
    justify-content: center;
  }

  .textarea-field textarea {
    min-height: 138px;
  }

  .upload-slot {
    grid-template-columns: 40px minmax(0, 1fr) 26px;
    gap: 9px;
    padding-inline: 11px;
  }

  .upload-icon {
    width: 38px;
    height: 38px;
  }

  .media-preview {
    grid-template-columns: 1fr;
  }

  .media-preview video {
    width: 100%;
  }

  .media-facts > div:first-child {
    border-left: 0;
  }

  .toggle-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .advanced-section summary {
    padding-inline: 14px;
  }

  .advanced-content {
    padding: 0 14px 18px;
  }

  .submit-row {
    min-height: 70px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  }

  .submit-summary {
    display: none;
  }

  .generate-button {
    width: 100%;
  }

  .upload-progress {
    padding-inline: 14px;
  }

  .monitor-empty,
  .monitor-active,
  .result-view,
  .history-section {
    padding: 20px 14px;
  }

  .progress-display {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .progress-number strong {
    font-size: 37px;
  }

  .history-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 12px;
    padding: 11px 7px;
  }

  .history-primary {
    grid-column: 1;
  }

  .history-status {
    grid-column: 2;
    grid-row: 1;
  }

  .history-item .history-cell {
    display: none;
  }

  .history-action {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 1100px) {
  .page-content {
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
  }

  .mobile-workspace-nav {
    position: fixed;
    z-index: 45;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(56px + env(safe-area-inset-bottom));
    padding: 5px max(10px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(10px, env(safe-area-inset-right));
    border-top: 1px solid rgba(16, 44, 42, 0.2);
    background: rgba(16, 44, 42, 0.97);
    box-shadow: 0 -8px 24px rgba(16, 44, 42, 0.14);
    backdrop-filter: blur(12px);
  }

  .mobile-workspace-nav button {
    display: grid;
    min-width: 0;
    place-items: center;
    align-content: center;
    gap: 2px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.58);
    font-size: 9px;
    font-weight: 750;
  }

  .mobile-workspace-nav button svg {
    width: 18px;
    height: 18px;
  }

  .mobile-workspace-nav button.is-active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  .management-grid,
  .voice-workbench {
    grid-template-columns: 1fr;
  }

  .tools-dashboard {
    grid-template-columns: 1fr;
  }

  .toast-region {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 840px) {
  .management-page {
    min-height: calc(100vh - 60px);
    padding: 18px 14px 36px;
  }

  .management-hero {
    min-height: 62px;
    margin-bottom: 12px;
  }

  .management-hero h1 {
    font-size: 23px;
  }

  .management-card {
    padding: 14px;
  }

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

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

  .voice-compose-grid {
    grid-template-columns: 1fr;
  }

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

  .production-flow > svg {
    display: none;
  }

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

@media (max-width: 620px) {
  .creator-actions {
    gap: 6px;
  }

  .production-presets {
    padding: 12px 14px;
  }

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

  .production-preset {
    min-height: 58px;
    grid-template-columns: 24px minmax(0, 1fr);
    padding-inline: 7px;
  }

  .production-preset small {
    white-space: normal;
  }

  .draft-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 12px;
  }

  .preflight-panel {
    margin: 12px 14px 0;
  }

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

  .preflight-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .preflight-footer .button {
    width: 100%;
  }

  .top-tool-button {
    width: 36px;
    min-width: 36px;
    padding: 0;
  }

  .top-tool-button span {
    display: none;
  }

  .template-reuse-row,
  .asset-card-grid,
  .voice-card-grid {
    grid-template-columns: 1fr;
  }

  .task-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .task-search {
    width: 100%;
  }

  .runtime-grid,
  .capability-list,
  .quick-tool-grid,
  .workspace-metrics,
  .production-flow {
    grid-template-columns: 1fr;
  }

  .production-flow > div {
    min-height: 90px;
  }

  .template-reuse-row .button {
    width: 100%;
  }

  .management-hero .button span {
    display: none;
  }

  .management-hero .button {
    width: 39px;
    min-width: 39px;
    padding: 0;
  }

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

  .delivery-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-top: 7px;
    border-top: 1px solid var(--border);
  }

  .artifact-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .artifact-row > div:last-child {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .task-overview > div {
    min-height: 70px;
    padding: 11px;
  }

  .task-overview strong {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
