:root {
  --bg: #f4f6f4;
  --surface: #ffffff;
  --surface-soft: #eef4f1;
  --ink: #17201e;
  --muted: #65736f;
  --line: #d9e2de;
  --line-strong: #b9c8c3;
  --teal: #0f8b7c;
  --teal-dark: #08695d;
  --teal-soft: #dff4ee;
  --amber: #d9901f;
  --amber-soft: #fff2d8;
  --red: #cf4b3f;
  --red-soft: #ffe4df;
  --green: #21895a;
  --green-soft: #dff5e9;
  --charcoal: #222927;
  --shadow: 0 18px 48px rgba(28, 40, 36, 0.1);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-forgot-button { align-self: center; margin-top: 2px; }
.auth-consent-line { display: flex !important; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.45; }
.auth-consent-line input { width: auto !important; margin-top: 3px; }
.auth-consent-line a, .auth-legal-links a { color: var(--accent, #087c72); }
.auth-legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; margin-top: 16px; font-size: 12px; }
.account-security-actions { display: grid; gap: 18px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border, #dfe5e2); }
.account-security-form { display: grid; gap: 10px; }
.account-security-form h4, .account-data-actions h4 { margin: 0; }
.account-security-form label { display: grid; gap: 6px; }
.account-security-form input { width: 100%; box-sizing: border-box; }
.account-data-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.account-data-actions h4 { flex-basis: 100%; }
.sidebar-legal-entry { text-decoration: none; }
.wallet-button-label { font-size: 0.72rem !important; font-weight: 760; }
.account-legal-section { display: grid; gap: 14px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border, #dfe5e2); }
.account-legal-section h4, .account-legal-section p { margin: 0; }
.account-legal-section p { margin-top: 5px; color: var(--muted, #65736f); line-height: 1.55; }
.account-legal-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.account-legal-links a { display: flex; align-items: center; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line, #d9e2de); border-radius: 8px; color: var(--teal-dark, #08695d); background: var(--surface-soft, #eef4f1); font-weight: 700; text-decoration: none; }
.account-legal-links a:hover { border-color: var(--teal, #0f8b7c); background: var(--teal-soft, #dff4ee); }
#forgotPasswordDialog form, #deleteAccountDialog form { display: grid; gap: 14px; }
#forgotPasswordDialog label, #deleteAccountDialog label { display: grid; gap: 6px; }
#forgotPasswordDialog input, #deleteAccountDialog input { width: 100%; box-sizing: border-box; }

@media (max-width: 560px) {
  .account-legal-links { grid-template-columns: 1fr; }
  .wallet-button-label { display: none; }
}

/* Progressive create workspace v3 — one provider control, one current action. */
.quick-start > .quick-copy {
  order: 0;
}

.quick-start > .creation-path-switch {
  order: 1;
}

.quick-start > .create-method-section {
  order: 2;
}

.quick-start > .create-step-rail,
.quick-start > .manual-step-rail {
  order: 3;
}

.quick-start > .create-model-controls {
  order: 4;
}

.quick-start > .quick-action {
  order: 5;
}

.quick-start > .quick-steps {
  order: 6;
}

.create-model-controls {
  display: grid;
  grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #d9e3ea;
  border-radius: 14px;
  background: #fff;
}

.create-model-controls[hidden],
.create-model-controls .compact-choice-field[hidden] {
  display: none !important;
}

.create-model-controls-heading {
  display: grid;
  gap: 3px;
}

.create-model-controls-heading > span {
  color: #087f75;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.create-model-controls-heading > strong {
  color: #17233a;
  font-size: 0.94rem;
  font-weight: 850;
}

.create-model-controls-heading > small {
  color: #718096;
  font-size: 0.7rem;
  line-height: 1.45;
}

.create-model-controls .quick-model-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.create-step-rail[hidden],
.storyboard-panel[hidden],
.create-review-summary[hidden],
.generation-method-dialog [hidden] {
  display: none !important;
}

.create-method-compact {
  padding: 14px 16px;
  border: 1px solid #d9e3ea;
  border-radius: 14px;
  background: #f8fafc;
}

.create-method-compact > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.create-method-compact > div > span {
  flex: 0 0 auto;
  color: #56677b;
  font-size: 0.86rem;
  font-weight: 800;
}

.create-method-trigger {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 24px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  gap: 11px;
  padding: 8px 12px;
  border: 1px solid #b8cbc9;
  border-radius: 12px;
  color: #15283e;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.create-method-trigger:hover:not(:disabled) {
  border-color: #19978b;
  box-shadow: 0 5px 16px rgb(15 118 110 / 10%);
}

.create-method-trigger:focus-visible {
  outline: 3px solid rgb(23 152 141 / 20%);
  outline-offset: 2px;
}

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

.create-method-trigger strong {
  overflow: hidden;
  font-size: 0.95rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-method-trigger small {
  overflow: hidden;
  color: #6b788a;
  font-size: 0.78rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-method-trigger .generation-method-icon {
  width: 36px;
  height: 36px;
}

.create-method-chevron {
  color: #617186;
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
}

.generation-method-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  color: #18283d;
  background: #fff;
  box-shadow: 0 28px 80px rgb(3 18 38 / 28%);
}

.generation-method-dialog::backdrop {
  background: rgb(3 18 38 / 52%);
  backdrop-filter: blur(3px);
}

.generation-method-dialog-shell {
  display: grid;
  max-height: inherit;
}

.generation-method-dialog header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid #e3e9ef;
}

.generation-method-dialog header > div {
  display: grid;
  gap: 4px;
}

.generation-method-dialog header span {
  color: #07877c;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.generation-method-dialog h2 {
  margin: 0;
  font-size: 1.35rem;
}

.generation-method-dialog p {
  margin: 2px 0 0;
  color: #68778a;
  font-size: 0.9rem;
}

.generation-method-dialog-menu {
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 20px 26px 26px;
  overflow-y: auto;
}

.generation-method-dialog-menu .generation-method-card {
  min-height: 92px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-rows: 1fr;
  align-items: center;
  padding: 15px 16px;
}

.generation-method-dialog-menu .generation-method-icon {
  grid-row: 1;
}

.generation-method-dialog-menu .generation-method-state {
  grid-column: 3;
  align-self: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef7f5;
  white-space: nowrap;
}

.quick-action .url-row {
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 0.8fr) 210px;
}

.create-execution-summary {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 0.8fr;
  min-height: 52px;
  overflow: hidden;
  border: 1px solid #d6e0e8;
  border-radius: 12px;
  background: #f8fafc;
}

.create-execution-summary > div {
  display: grid;
  align-content: center;
  min-width: 0;
  gap: 2px;
  padding: 8px 10px;
  border-right: 1px solid #e1e8ee;
}

.create-execution-summary > div:last-child {
  border-right: 0;
}

.create-execution-summary span {
  color: #718096;
  font-size: 0.68rem;
  font-weight: 760;
}

.create-execution-summary strong {
  overflow: hidden;
  color: #203147;
  font-size: 0.76rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-execution-summary > div:nth-child(2) strong {
  color: #087f75;
}

.primary-create-estimate,
.generation-cost-hint {
  display: none;
}

.quick-config-summary {
  grid-template-columns: minmax(190px, 1.35fr) repeat(2, minmax(105px, 0.78fr)) auto;
}

.quick-config-summary > div:nth-of-type(4),
.quick-config-summary > div:nth-of-type(5) {
  display: none;
}

body[data-creation-path="manual"] .simple-clip-settings,
body[data-creation-path="manual"] .create-advanced-settings,
body[data-creation-path="manual"] .create-review-summary,
body[data-creation-path="manual"] .setup-grid {
  display: none !important;
}

body[data-creation-path="manual"][data-manual-step="1"] .setup-grid,
body[data-creation-path="manual"][data-manual-step="2"] .setup-grid {
  display: grid !important;
}

body[data-creation-path="manual"][data-manual-step="1"] .setup-grid .reviewer-picker {
  display: none;
}

body[data-creation-path="manual"][data-manual-step="2"] .setup-grid .product-context {
  display: none;
}

body[data-creation-path="manual"][data-manual-step="2"] .setup-grid .reviewer-picker {
  grid-column: 1 / -1;
}

body[data-creation-path="manual"]:not([data-manual-step="1"]) .product-truth-sheet {
  display: none !important;
}

@media (max-width: 1180px) {
  .quick-action .url-row {
    grid-template-columns: minmax(0, 1fr) 210px;
  }

  .create-execution-summary {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 720px) {
  .create-method-compact > div {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .quick-action .url-row {
    grid-template-columns: 1fr;
  }

  .create-execution-summary {
    grid-column: auto;
    grid-row: auto;
  }

  .generation-method-dialog header,
  .generation-method-dialog-menu {
    padding-right: 18px;
    padding-left: 18px;
  }

  .generation-method-dialog-menu .generation-method-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .generation-method-dialog-menu .generation-method-state {
    grid-column: 2;
    justify-self: start;
  }
}

/* Mockup visual QA repairs v115. */
.member-menu {
  display: flex;
  grid-template-columns: none;
}

.creation-path-card > span:not(.creation-path-icon) {
  width: auto;
  min-width: 0;
}

.creation-path-card strong {
  display: block;
  margin: 0;
  white-space: nowrap;
}

.quick-action .primary-create-action {
  min-width: 0;
}

.quick-action .primary-create-action > span {
  display: none;
}

body[data-creation-path="manual"][data-manual-step="1"] .manual-studio-panel {
  display: none !important;
}

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

.creation-path-card,
.creation-path-card.active,
.creation-path-card:not(.active) {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  justify-content: center;
}

/* v119 final cascade lock. */
.sidebar .brand-mark,
.auth-brand .brand-mark {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sidebar .brand-mark svg,
.auth-brand .brand-mark svg {
  width: 46px;
  height: 46px;
  fill: initial;
}

.creation-entry-panel {
  display: grid;
}

.creation-entry-panel .create-method-compact > div {
  display: grid;
  max-width: none;
}

.generation-method-segmented .generation-method-card,
.generation-method-segmented .generation-method-card.active,
.generation-method-segmented .generation-method-card:not(.active) {
  display: flex !important;
}

.generation-method-segmented .generation-method-card[hidden] {
  display: none !important;
}

.manual-step-footer {
  display: flex;
}

.manual-step-footer[hidden] {
  display: none !important;
}

.jobs-library-view {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 8px;
}

.active-job-actions {
  display: flex;
  min-width: 220px;
  flex-wrap: nowrap;
  gap: 8px;
}

.active-job-actions > * {
  min-width: 104px;
  flex: 1 1 0;
  min-height: 38px;
  white-space: nowrap;
}

.settings-view {
  width: min(100%, 1160px);
  margin-inline: auto;
  padding-inline: 8px;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.admin-theme-toggle {
  min-height: 40px;
  border-radius: 9px;
  font-size: 0.76rem;
}

html[data-theme="dark"] .admin-view {
  color: #edf4fb;
  background: #0b1119;
}

html[data-theme="dark"] .admin-header {
  background: rgba(11, 17, 25, 0.94);
}

html[data-theme="dark"] :where(
  .admin-generation-methods,
  .admin-cloud-models,
  .admin-metric,
  .admin-members,
  .admin-diamonds,
  .admin-diamond-config > section,
  .admin-generation-method-row,
  .admin-feature-group,
  .admin-feature-row,
  .admin-method-help,
  .admin-cost-row,
  .admin-package-row,
  .admin-table-wrap,
  .admin-model-table-wrap
) {
  border-color: #29374a !important;
  color: #edf4fb;
  background: #111a25 !important;
  box-shadow: none;
}

html[data-theme="dark"] :where(
  .admin-heading h1,
  .admin-toolbar h2,
  .admin-diamond-config h3,
  .admin-generation-method-copy strong,
  .admin-feature-row strong,
  .admin-member-cell strong,
  .admin-metric strong
) {
  color: #edf4fb !important;
}

html[data-theme="dark"] :where(
  .admin-heading p,
  .admin-toolbar > div > span,
  .admin-method-help,
  .admin-generation-method-copy span,
  .admin-feature-row span,
  .admin-member-cell span,
  .admin-metric span,
  .admin-status,
  .admin-empty
) {
  color: #9ba9b8 !important;
}

.sidebar .brand-mark img,
.auth-brand .brand-mark img {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.generation-method-segmented .generation-method-card.active small,
html[data-theme="dark"] .generation-method-segmented .generation-method-card.active small {
  color: #fff !important;
  opacity: 1;
  font-weight: 700;
}

html[data-theme="dark"] :where(
  .admin-table th,
  .admin-model-table th
) {
  border-color: #29374a !important;
  color: #b8c5d4 !important;
  background: #131d29 !important;
}

html[data-theme="dark"] :where(
  .admin-table td,
  .admin-model-table td
) {
  border-color: #29374a !important;
  color: #e4edf6 !important;
  background: #111a25 !important;
}

@media (min-width: 1280px) {
  .app-shell.jobs-mode,
  .app-shell.settings-mode {
    grid-template-columns: 268px minmax(0, 1fr);
  }

  .app-shell.jobs-mode .sidebar,
  .app-shell.settings-mode .sidebar {
    width: 268px;
  }
}

@media (max-width: 1279px) and (min-width: 901px) {
  .app-shell.jobs-mode,
  .app-shell.settings-mode {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .app-shell.jobs-mode .sidebar,
  .app-shell.settings-mode .sidebar {
    width: 224px;
  }
}

@media (max-width: 760px) {
  .active-job-actions {
    min-width: 0;
    flex-wrap: wrap;
  }

  .admin-header-actions {
    flex-wrap: wrap;
  }

  .admin-theme-toggle span {
    display: none;
  }
}

.admin-funnel-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
}

.admin-funnel-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 132px;
  padding: 11px;
  border: 1px solid #e4e7ec;
  border-radius: 9px;
  background: #fff;
}

.admin-funnel-step > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #05756f;
  font-size: 0.7rem;
  font-weight: 850;
}

.admin-funnel-step > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.admin-funnel-step strong,
.admin-funnel-step small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-funnel-step small,
.admin-funnel-step em {
  color: #667085;
  font-size: 0.68rem;
  font-style: normal;
}

.admin-funnel-step b {
  color: #101828;
  font-size: 1rem;
}

.admin-funnel-step em {
  grid-column: 2 / -1;
}

html[data-theme="dark"] .admin-funnel-step {
  border-color: #344054;
  color: #e9eef5;
  background: #111c29;
}

html[data-theme="dark"] .admin-funnel-step b {
  color: #fff;
}

/* P2 reusable brand, export, team and localization settings. */
.saas-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.saas-settings-grid .account-detail-card {
  align-content: start;
}

.saas-settings-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.saas-settings-form label:not(.auth-consent-line) {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 0.76rem;
  font-weight: 750;
}

.saas-settings-form input:not([type="checkbox"]),
.saas-settings-form select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  color: #101828;
  background: #fff;
}

.saas-inline-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.saas-inline-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.saas-record-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.saas-record-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e4e7ec;
  border-radius: 9px;
  color: #101828;
  background: #fff;
  text-align: left;
}

.saas-record-item > div {
  display: grid;
  min-width: 0;
  gap: 2px;
  flex: 1;
}

.saas-record-item small {
  overflow: hidden;
  color: #667085;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saas-workspace-select {
  cursor: pointer;
}

.saas-workspace-select:hover,
.saas-workspace-select.selected {
  border-color: #05756f;
  background: #f1faf8;
}

.saas-color-swatch {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 1px solid rgba(16, 24, 40, 0.16);
  border-radius: 50%;
  background: var(--swatch, #05756f);
}

.saas-status-chip {
  padding: 3px 7px;
  border-radius: 999px;
  color: #475467;
  background: #f2f4f7;
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.saas-status-chip[data-tone="success"] {
  color: #05603a;
  background: #dcfae6;
}

.saas-empty-copy,
.saas-settings-form output {
  margin: 0;
  color: #667085;
  font-size: 0.76rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.social-publish-fields {
  display: grid;
  gap: 10px;
}

.social-publish-fields label {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 0.76rem;
  font-weight: 750;
}

.social-publish-fields select,
.social-publish-fields textarea,
.social-publish-fields input {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  color: #101828;
  background: #fff;
  font: inherit;
}

html[data-theme="dark"] .saas-settings-form label:not(.auth-consent-line),
html[data-theme="dark"] .saas-record-item {
  color: #e9eef5;
}

html[data-theme="dark"] .saas-settings-form input:not([type="checkbox"]),
html[data-theme="dark"] .saas-settings-form select,
html[data-theme="dark"] .saas-record-item {
  border-color: #344054;
  background: #111c29;
}

@media (max-width: 900px) {
  .saas-settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .saas-inline-fields,
  .saas-inline-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .saas-record-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

/* Model selection belongs to the job-level creation setup, before Step 1. */
.creation-entry-panel > .create-model-controls {
  margin: 0;
  padding: 15px 0 0;
  border: 0;
  border-top: 1px solid var(--sq-mock-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.creation-entry-panel > .create-model-controls .create-model-controls-heading > span {
  display: none;
}

.simple-clip-settings .quick-config-summary {
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(120px, 0.55fr)) auto;
}

.simple-clip-settings .quick-config-summary > div:nth-of-type(2),
.simple-clip-settings .quick-config-summary > div:nth-of-type(3) {
  display: grid;
}

/* v121 dark-theme contrast lock. */
html[data-theme="dark"] :where(
  .creation-entry-label,
  .create-method-compact > div > span,
  .compact-choice-field > span,
  .product-upload-shortcut strong,
  .sidebar-workflow-nav > header span,
  .account-detail-list dd
) {
  color: #dce7f2 !important;
}

html[data-theme="dark"] :where(
  .account-detail-list > div,
  .inspector-context-card[open] > summary,
  .inspector-accordion[open] > summary
) {
  border-color: #29374a !important;
}

html[data-theme="dark"] :where(
  .inspector .inspector-card,
  .inspector .inspector-card:not(:first-child),
  .inspector-product-preview,
  .inspector-fact-list,
  .product-upload-shortcut
) {
  border-color: #34445a !important;
  color: #edf4fb !important;
  background: #111a25 !important;
}

html[data-theme="dark"] :where(
  .inspector-product-preview strong,
  .inspector-fact-list dd
) {
  color: #edf4fb !important;
}

html[data-theme="dark"] .compact-choice-group button {
  border-color: #34445a !important;
  color: #dce7f2 !important;
  background: #0e1722 !important;
}

html[data-theme="dark"] .compact-choice-group button:is(.active, [aria-checked="true"]) {
  border-color: #2c716c !important;
  color: #70e1d7 !important;
  background: #15312f !important;
}

.sidebar-step-menu button.active {
  color: #076f6b !important;
  background: #e9f8f6 !important;
}

.sidebar-step-menu button.active span {
  color: inherit !important;
}

/* Workflow entry, manual navigation, shell repairs, and theme v119. */
.brand-mark,
.sidebar .brand-mark,
.auth-brand .brand-mark {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-mark svg,
.sidebar .brand-mark svg,
.auth-brand .brand-mark svg {
  width: 46px;
  height: 46px;
  overflow: visible;
}

.brand-ribbon-top {
  fill: #079f98;
}

.brand-ribbon-bottom {
  fill: #13b9ad;
}

.brand-ribbon-core {
  fill: #fff;
}

.theme-toggle-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--sq-mock-line);
  border-radius: 7px;
  color: #344054;
  background: #fff;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.theme-toggle-button svg {
  width: 17px;
  height: 17px;
}

.theme-icon-moon {
  fill: currentColor;
}

.theme-icon-sun {
  display: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.creation-entry-panel {
  display: grid;
  min-width: 0;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--sq-mock-line);
  border-radius: var(--sq-mock-radius);
  background: #fff;
}

.creation-entry-panel .workspace-control-heading {
  margin: 0 0 2px;
  padding: 0;
}

.creation-entry-label,
.create-method-compact > div > span {
  color: #344054;
  font-size: 0.8rem;
  font-weight: 820;
}

.creation-entry-panel .creation-path-switch {
  margin: 0;
}

.creation-entry-panel .create-method-compact {
  margin: 2px 0 0;
  padding: 13px 0 0;
  border: 0;
  border-top: 1px solid var(--sq-mock-line);
  background: transparent;
}

.creation-entry-panel .create-method-compact > div {
  display: grid;
  max-width: none;
  gap: 9px;
}

.generation-method-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #cbd6df;
  border-radius: 7px;
  background: #fff;
}

.generation-method-segmented .generation-method-card,
.generation-method-segmented .generation-method-card:not(.active) {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 12px;
  border: 0;
  border-radius: 0;
  color: #26364f;
  background: #fff;
  text-align: left;
}

.generation-method-segmented .generation-method-card + .generation-method-card {
  border-left: 1px solid #cbd6df;
}

.generation-method-segmented .generation-method-card > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.generation-method-segmented .generation-method-card strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generation-method-segmented .generation-method-card small {
  overflow: hidden;
  color: #718096;
  font-size: 0.65rem !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generation-method-segmented .generation-method-state {
  display: none;
}

.generation-method-segmented .generation-method-icon {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border-radius: 50%;
  color: #087f7a;
  background: #e7f5f3;
  font-size: 0.69rem;
  font-weight: 900;
}

.generation-method-segmented .generation-method-card.active {
  color: #fff;
  background: linear-gradient(90deg, #079c96, #078b86);
}

.generation-method-segmented .generation-method-card.active small {
  color: rgba(255, 255, 255, 0.82);
}

.generation-method-segmented .generation-method-card.active .generation-method-icon {
  color: #06736e;
  background: #fff;
}

.truth-confirm-control {
  display: none !important;
}

.manual-step-footer {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #c9ded9;
  border-radius: 9px;
  background: #f7fbfa;
}

.manual-step-footer[hidden] {
  display: none !important;
}

.manual-step-footer > div {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.manual-step-footer > div > span {
  overflow: hidden;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-step-footer .primary-button {
  min-width: 190px;
}

@media (min-width: 1280px) {
  .app-shell.jobs-mode,
  .app-shell.settings-mode {
    grid-template-columns: 268px minmax(0, 1fr);
  }

  .app-shell.jobs-mode .sidebar,
  .app-shell.settings-mode .sidebar {
    width: 268px;
  }
}

.jobs-library-view {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: 8px;
}

.active-job-center,
.media-library-section {
  border-color: var(--sq-mock-line);
  border-radius: 10px;
  background: #fff;
}

.active-job-center-head {
  align-items: flex-start;
  gap: 18px;
}

.job-center-toolbar {
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.active-job-cover {
  position: relative;
}

.active-job-cover::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #087f7a;
  content: attr(data-fallback);
  font-size: 1rem;
  font-weight: 880;
}

.active-job-cover img {
  position: relative;
  z-index: 1;
}

.active-job-actions {
  display: flex;
  min-width: 220px;
  flex-wrap: nowrap;
  gap: 8px;
}

.active-job-actions > * {
  min-width: 104px;
  flex: 1 1 0;
  min-height: 38px;
  white-space: nowrap;
}

.settings-view {
  width: min(100%, 1160px);
  margin-inline: auto;
  padding-inline: 8px;
}

@media (max-width: 1279px) and (min-width: 901px) {
  .app-shell.jobs-mode,
  .app-shell.settings-mode {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .app-shell.jobs-mode .sidebar,
  .app-shell.settings-mode .sidebar {
    width: 224px;
  }
}

@media (max-width: 760px) {
  .generation-method-segmented {
    grid-template-columns: minmax(0, 1fr);
  }

  .generation-method-segmented .generation-method-card + .generation-method-card {
    border-top: 1px solid #cbd6df;
    border-left: 0;
  }

  .manual-step-footer,
  .manual-step-footer > div {
    align-items: stretch;
    flex-direction: column;
  }

  .manual-step-footer .primary-button,
  .manual-step-footer .ghost-button {
    width: 100%;
  }

  .manual-step-footer > div > span {
    white-space: normal;
  }

  .active-job-actions {
    min-width: 0;
    flex-wrap: wrap;
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1119;
  --surface: #111a25;
  --surface-soft: #172231;
  --ink: #edf4fb;
  --muted: #9ba9b8;
  --line: #29374a;
  --line-strong: #3b4b60;
  --sq-mock-ink: #edf4fb;
  --sq-mock-muted: #9ba9b8;
  --sq-mock-line: #29374a;
  --sq-mock-canvas: #0b1119;
  --sq-mock-soft: #131d29;
  --sq-border: #29374a;
  --sq-muted: #9ba9b8;
}

html[data-theme="dark"] body:not(.needs-auth),
html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .workspace {
  color: #edf4fb;
  background: #0b1119;
}

html[data-theme="dark"] :where(
  .sidebar,
  .topbar,
  .inspector,
  .panel,
  .creation-entry-panel,
  .quick-start.panel,
  .create-model-controls,
  .product-upload-shortcut,
  .manual-studio-panel,
  .simple-clip-settings,
  .reviewer-chooser,
  .product-truth-sheet,
  .create-review-summary,
  .active-job-center,
  .media-library-section,
  .active-job-row,
  .media-library-card,
  .settings-default-provider,
  .settings-tab-panel,
  .account-detail-card,
  .account-connection-card,
  .wallet-shell,
  .admin-dialog-shell
) {
  border-color: #29374a !important;
  color: #edf4fb;
  background: #111a25 !important;
  box-shadow: none;
}

html[data-theme="dark"] .topbar {
  background: rgba(17, 26, 37, 0.98) !important;
}

html[data-theme="dark"] :where(
  h1,
  h2,
  h3,
  h4,
  .topbar h1,
  .sidebar .brand strong,
  .workspace-control-heading strong,
  .quick-action > label,
  .create-model-controls-heading > strong,
  .account-hero-copy h3,
  .account-detail-card > header h3,
  .account-connection-head h3,
  .active-job-title-row h4,
  .media-library-card h3,
  .inspector-card strong,
  .inspector-fact-list dd
) {
  color: #edf4fb !important;
}

html[data-theme="dark"] :where(
  p,
  small,
  .workspace-control-heading span,
  .create-model-controls-heading > small,
  .manual-step-footer > div > span,
  .active-job-main > p,
  .active-job-meta,
  .jobs-library-header p,
  .settings-view-header p,
  .account-detail-card > header p,
  .account-connection-head p,
  .account-detail-list dt,
  .inspector-fact-list dt
) {
  color: #9ba9b8 !important;
}

html[data-theme="dark"] :where(input, textarea, select) {
  border-color: #34445a !important;
  color: #edf4fb !important;
  background-color: #0e1722 !important;
}

html[data-theme="dark"] :where(
  .creation-path-switch,
  .generation-method-segmented,
  .compact-choice-group button,
  .wallet-balance-button,
  #adminBtn,
  .theme-toggle-button,
  .ghost-button,
  .icon-button,
  .account-plan-summary > span,
  .account-plan-summary > strong
) {
  border-color: #34445a;
  color: #dce7f2;
  background: #0e1722;
}

html[data-theme="dark"] .creation-path-card:not(.active),
html[data-theme="dark"] .generation-method-segmented .generation-method-card:not(.active) {
  color: #dce7f2;
  background: #0e1722;
}

html[data-theme="dark"] .creation-path-card.active,
html[data-theme="dark"] .generation-method-segmented .generation-method-card.active {
  color: #fff;
  background: linear-gradient(90deg, #079c96, #078b86);
}

html[data-theme="dark"] .sidebar .nav-item:not(.active) {
  color: #c2cedb;
}

html[data-theme="dark"] .sidebar .nav-item:hover,
html[data-theme="dark"] .sidebar .nav-item.active,
html[data-theme="dark"] .sidebar-step-menu button.active {
  color: #68ddd2 !important;
  background: #142b31 !important;
}

html[data-theme="dark"] .sidebar .sidebar-step-menu button strong {
  border-color: #405066;
  color: #bdc9d7;
  background: #111a25;
}

html[data-theme="dark"] .sidebar .sidebar-step-menu button.active strong,
html[data-theme="dark"] .sidebar .sidebar-step-menu button.done strong {
  color: #071417;
  background: #55d8cc;
}

html[data-theme="dark"] :where(
  .jobs-library-tabs,
  .account-tabs,
  .jobs-library-scope,
  .manual-step-footer,
  .quick-action .url-row > .create-execution-summary,
  .account-hero
) {
  border-color: #29374a;
  background: #131d29 !important;
}

html[data-theme="dark"] :where(
  .jobs-library-tab.active,
  .account-tabs button.active,
  .job-center-filter.active,
  .jobs-library-filter.active,
  .jobs-library-scope-button.active
) {
  border-color: #2c716c;
  color: #70e1d7;
  background: #15312f;
}

html[data-theme="dark"] .theme-icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-icon-sun {
  display: block;
}

html[data-theme="dark"] .primary-button {
  color: #fff;
}

/* SceneQuence approved mockup alignment v115.
   Three clear regions: workflow rail, focused canvas, contextual inspector. */
:root {
  --sq-mock-teal: #07958f;
  --sq-mock-teal-dark: #067c77;
  --sq-mock-teal-soft: #edf8f7;
  --sq-mock-ink: #12223a;
  --sq-mock-muted: #68758a;
  --sq-mock-line: #d9e2ea;
  --sq-mock-canvas: #ffffff;
  --sq-mock-soft: #f7fafb;
  --sq-mock-radius: 8px;
}

body:not(.needs-auth) {
  color: var(--sq-mock-ink);
  background: var(--sq-mock-canvas);
}

@media (min-width: 1181px) {
  .app-shell {
    grid-template-columns: 268px minmax(720px, 1fr) 356px;
    background: #fff;
  }

  .sidebar {
    width: 268px;
  }
}

.sidebar {
  padding: 20px 10px 18px;
  border-right: 1px solid var(--sq-mock-line);
  color: var(--sq-mock-ink);
  background: #fff;
}

.sidebar .brand {
  min-height: 68px;
  gap: 12px;
  padding: 0 17px 18px;
  border-bottom: 0;
}

.sidebar .brand-mark {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-radius: 11px;
  background: linear-gradient(145deg, #08aaa0, #087d79);
  box-shadow: 0 7px 16px rgba(7, 149, 143, 0.18);
}

.sidebar .brand-mark svg {
  width: 25px;
  height: 25px;
  fill: #fff;
}

.sidebar .brand strong {
  color: var(--sq-mock-ink);
  font-size: 1.06rem;
  line-height: 1.1;
}

.sidebar .brand small {
  color: var(--sq-mock-teal);
  font-size: 0.76rem;
  font-weight: 720;
  letter-spacing: 0.02em;
}

.sidebar .nav-list {
  gap: 6px;
  padding: 5px 0 14px;
  border-bottom: 1px solid var(--sq-mock-line);
}

.sidebar .nav-item,
.sidebar .nav-item:not(.active) {
  min-height: 52px;
  gap: 13px;
  padding: 12px 17px;
  border: 0;
  border-radius: 7px;
  color: #26364f;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 680;
}

.sidebar .nav-item::before {
  top: 0;
  bottom: 0;
  left: -10px;
  width: 3px;
  border-radius: 0;
}

.sidebar .nav-item:hover {
  color: var(--sq-mock-teal-dark);
  background: #f3f8f8;
}

.sidebar .nav-item.active {
  color: var(--sq-mock-teal-dark);
  background: linear-gradient(90deg, #edf8f7 0%, #f7fbfb 100%);
}

.sidebar .nav-item.active::before {
  background: var(--sq-mock-teal);
}

.sidebar .nav-icon {
  width: 23px !important;
  height: 23px;
  flex-basis: 23px;
}

.sidebar .nav-icon svg {
  width: 21px;
  height: 21px;
}

.sidebar-workflow-nav {
  margin-top: 17px;
  padding: 0 14px 14px;
  overflow: visible;
  border: 0;
}

.sidebar-workflow-nav > header {
  margin-bottom: 8px;
  padding: 0;
}

.sidebar-workflow-nav > header span {
  color: #26364f;
  font-size: 0.74rem;
  font-weight: 800;
}

.sidebar-workflow-nav > header strong {
  color: var(--sq-mock-teal-dark);
  background: #eaf7f5;
}

.sidebar .sidebar-step-menu,
.sidebar .create-step-rail,
.sidebar .manual-step-rail {
  gap: 0;
  margin: 0;
  padding: 0;
}

.sidebar .sidebar-step-menu button {
  position: relative;
  min-height: 54px;
  gap: 12px;
  padding: 6px 7px;
  border: 0;
  border-radius: 7px;
  color: #526078;
  background: transparent;
  font-size: 0.81rem;
}

.sidebar .sidebar-step-menu button:not(:last-child)::after {
  top: 36px;
  left: 20px;
  height: 24px;
  background: #cfd9e2;
}

.sidebar .sidebar-step-menu button strong {
  z-index: 1;
  width: 31px;
  height: 31px;
  flex-basis: 31px;
  border: 1px solid #cbd6df;
  color: #455268;
  background: #fff;
  font-size: 0.78rem;
}

.sidebar .sidebar-step-menu button span {
  color: inherit;
  font-size: 0.83rem;
  font-weight: 670;
}

.sidebar .sidebar-step-menu button.active {
  color: var(--sq-mock-teal-dark);
  background: #eef8f7;
}

.sidebar .sidebar-step-menu button.active strong,
.sidebar .sidebar-step-menu button.done strong {
  border-color: var(--sq-mock-teal);
  color: #fff;
  background: var(--sq-mock-teal);
  box-shadow: 0 0 0 3px rgba(7, 149, 143, 0.08);
}

.sidebar .sidebar-step-menu button.done {
  color: #4b596e;
}

.sidebar-account-nav {
  margin-top: auto;
  padding: 14px 0 0;
  border-top: 1px solid var(--sq-mock-line);
}

.workspace {
  gap: 18px;
  padding: 0 26px 36px;
  background: #fff;
}

.topbar {
  min-height: 90px;
  margin: 0 -26px 2px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--sq-mock-line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: none;
}

.topbar h1 {
  color: var(--sq-mock-ink);
  font-size: 1.62rem;
  font-weight: 820;
  letter-spacing: -0.025em;
}

.topbar .eyebrow,
.topbar .topbar-secondary,
.topbar > .topbar-actions > .status-pill {
  display: none;
}

.member-menu {
  min-height: 48px;
  gap: 10px;
  padding: 5px 7px 5px 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.member-avatar {
  width: 38px;
  height: 38px;
  background: #e9efee;
  color: var(--sq-mock-teal-dark);
}

.member-menu > div strong {
  color: var(--sq-mock-ink);
  font-size: 0.83rem;
}

.member-menu > div small {
  color: var(--sq-mock-muted);
}

.wallet-balance-button {
  order: -1;
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid var(--sq-mock-line);
  border-radius: 7px;
  color: #314057;
  background: #fff;
}

.wallet-balance-button span {
  color: var(--sq-mock-teal);
}

#adminBtn {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--sq-mock-teal);
  border-radius: 6px;
  color: var(--sq-mock-teal-dark);
  background: #fff;
}

#logoutBtn {
  padding-left: 14px;
  border-left: 1px solid var(--sq-mock-line);
  color: #536178;
}

.quick-start.panel {
  border: 1px solid var(--sq-mock-line);
  border-radius: var(--sq-mock-radius);
  background: #fff;
  box-shadow: none;
}

.quick-start {
  display: grid;
  gap: 0;
  padding: 0 18px 20px;
  overflow: visible;
}

.quick-start > .quick-copy {
  display: none;
}

.workspace-control-heading {
  order: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 8px;
}

.workspace-control-heading strong {
  color: var(--sq-mock-ink);
  font-size: 0.92rem;
  font-weight: 800;
}

.workspace-control-heading span {
  color: #7b8799;
  font-size: 0.7rem;
}

.quick-start > .creation-path-switch {
  order: 1;
}

.creation-path-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #cbd6df;
  border-radius: 7px;
  background: #fff;
}

.creation-path-card,
.creation-path-card:not(.active) {
  display: flex;
  min-height: 40px;
  justify-content: center;
  padding: 7px 14px;
  border: 0;
  border-radius: 0;
  color: #26364f;
  background: #fff;
}

.creation-path-card + .creation-path-card {
  border-left: 1px solid #cbd6df;
}

.creation-path-card.active {
  color: #fff;
  background: linear-gradient(90deg, #079c96, #078b86);
  box-shadow: none;
}

.creation-path-card .creation-path-icon,
.creation-path-card small {
  display: none;
}

.creation-path-card strong {
  font-size: 0.86rem;
  font-weight: 760;
}

.quick-start > .create-method-section {
  order: 2;
}

.create-method-compact {
  display: grid;
  gap: 7px;
  padding: 20px 0 16px;
  border: 0;
  border-bottom: 1px solid var(--sq-mock-line);
  border-radius: 0;
  background: transparent;
}

.create-method-compact > div {
  display: grid;
  max-width: 520px;
  gap: 8px;
}

.create-method-compact > div > span {
  color: #26364f;
  font-size: 0.86rem;
  font-weight: 800;
}

.create-method-trigger {
  grid-template-columns: 32px minmax(0, 1fr) 22px;
  min-height: 48px;
  padding: 7px 12px;
  border-color: #cbd6df;
  border-radius: 7px;
  background: #fff;
}

.create-method-trigger:hover {
  border-color: var(--sq-mock-teal);
  box-shadow: 0 0 0 3px rgba(7, 149, 143, 0.07);
}

.create-method-trigger .generation-method-icon {
  width: 26px;
  height: 26px;
  border: 0;
  background: #f2f6f6;
  color: var(--sq-mock-teal-dark);
}

.create-method-trigger strong {
  color: var(--sq-mock-ink);
  font-size: 0.82rem;
}

.create-method-trigger small {
  color: #798598;
  font-size: 0.64rem;
}

.quick-start > .quick-action {
  order: 3;
}

.quick-action {
  gap: 10px;
  padding: 20px 0 12px;
}

.quick-action > label[for="productUrlInput"] {
  color: var(--sq-mock-ink);
  font-size: 1.06rem;
  font-weight: 820;
}

.quick-action > label[for="productUrlInput"]::before {
  margin-right: 5px;
  content: "1.";
}

.quick-action .url-row {
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
}

.quick-action .url-row > #productUrlInput {
  grid-column: 1;
  grid-row: 1;
}

.quick-action .url-row > .primary-create-action {
  grid-column: 2;
  grid-row: 1;
}

.quick-action .url-row input {
  min-height: 46px;
  border-color: #cbd6df;
  border-radius: 7px;
  font-size: 0.82rem;
}

.quick-action .url-row input:focus {
  border-color: var(--sq-mock-teal);
  box-shadow: 0 0 0 3px rgba(7, 149, 143, 0.08);
}

.primary-create-action .primary-button,
.primary-create-action .import-product-button {
  min-height: 46px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 780;
}

.primary-create-action > span {
  color: #798598;
  font-size: 0.65rem;
  font-weight: 620;
}

.product-upload-shortcut {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  min-height: 70px;
  gap: 10px;
  margin-top: 4px;
  padding: 12px 16px;
  border: 1px dashed #bdcad5;
  border-radius: 7px;
  color: #536178;
  background: #fff;
  cursor: pointer;
}

.product-upload-shortcut:hover {
  border-color: var(--sq-mock-teal);
  background: #f9fcfc;
}

.product-upload-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #cbd6df;
  border-radius: 50%;
  color: var(--sq-mock-teal-dark);
  font-size: 1rem;
}

.product-upload-shortcut > span:last-child {
  display: grid;
  gap: 2px;
}

.product-upload-shortcut strong {
  color: #34435a;
  font-size: 0.75rem;
}

.product-upload-shortcut small {
  color: #667085;
  font-size: 0.64rem;
  line-height: 1.4;
}

.auto-mode-hint {
  color: #7d899b;
  font-size: 0.66rem;
}

.quick-action .url-row > .create-execution-summary {
  display: none;
}

.quick-start > .create-model-controls {
  order: 4;
}

.create-model-controls {
  grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr);
  gap: 15px;
  margin-top: 8px;
  padding: 15px 0 4px;
  border: 0;
  border-top: 1px solid var(--sq-mock-line);
  border-radius: 0;
  background: #fff;
}

.create-model-controls-heading > span {
  display: none;
}

.create-model-controls-heading > strong {
  color: var(--sq-mock-ink);
  font-size: 0.84rem;
}

.create-model-controls-heading > small {
  color: #7c8899;
  font-size: 0.65rem;
}

.create-model-controls .quick-model-controls {
  gap: 11px;
}

.compact-choice-field > span {
  color: #536178;
  font-size: 0.67rem;
  font-weight: 760;
}

.compact-choice-group {
  gap: 7px;
}

.compact-choice-group button {
  min-height: 42px;
  padding: 7px 10px;
  border-color: #d2dce5;
  border-radius: 7px;
  color: #3f4d63;
  background: #fff;
  font-size: 0.68rem;
}

.compact-choice-group button.active,
.compact-choice-group button[aria-checked="true"] {
  border-color: var(--sq-mock-teal);
  color: var(--sq-mock-teal-dark);
  background: #f3fbfa;
  box-shadow: inset 0 0 0 1px var(--sq-mock-teal);
}

.quick-start > .quick-steps {
  display: none;
}

.manual-studio-panel {
  margin-top: 11px;
  padding: 12px 14px;
  border-color: #dbe4eb;
  border-radius: 7px;
  background: #f8fbfb;
}

.manual-studio-heading {
  align-items: center;
}

.manual-studio-heading h3 {
  color: var(--sq-mock-ink);
  font-size: 0.9rem;
}

.simple-clip-settings {
  gap: 14px;
  margin-top: 12px;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--sq-mock-line);
  border-radius: 0;
  background: #fff;
}

.simple-settings-heading h3 {
  color: var(--sq-mock-ink);
  font-size: 1.05rem;
}

.video-style-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.video-style-card {
  min-height: 132px;
  overflow: hidden;
  border-color: #d3dde5;
  border-radius: 8px;
  background: #fff;
}

.video-style-card:hover {
  border-color: #9bbfbc;
  box-shadow: 0 4px 12px rgba(17, 39, 58, 0.05);
}

.video-style-card.active {
  border-color: var(--sq-mock-teal);
  background: #f7fcfb;
  box-shadow: inset 0 0 0 1px var(--sq-mock-teal);
}

.video-style-card-visual {
  min-height: 70px;
  color: var(--sq-mock-teal-dark);
  background: #f5f9f9;
}

.video-style-card-copy strong {
  color: var(--sq-mock-ink);
  font-size: 0.75rem;
}

.video-style-card-copy small {
  color: #7b8799;
  font-size: 0.62rem;
}

.quick-config-summary {
  border-color: #d5e0e7;
  border-radius: 7px;
  background: #f9fbfc;
}

.setup-grid,
.reviewer-picker,
.product-truth-sheet,
.create-review-summary,
.flow-extension-panel {
  border-radius: 7px;
}

.reviewer-picker {
  background: #fbfcfd;
}

.storyboard-panel {
  border-color: var(--sq-mock-line);
  border-radius: var(--sq-mock-radius);
  box-shadow: none;
}

.inspector {
  position: sticky;
  top: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: 100vh;
  padding: 17px 18px;
  overflow-y: auto;
  border-left: 1px solid var(--sq-mock-line);
  background: #fbfcfd;
}

.inspector-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 2px 5px;
}

.inspector-titlebar > div {
  display: grid;
  gap: 2px;
}

.inspector-titlebar strong {
  color: var(--sq-mock-ink);
  font-size: 0.88rem;
  font-weight: 820;
}

.inspector-titlebar span:not(.status-dot) {
  color: #7a8799;
  font-size: 0.63rem;
}

.inspector .inspector-card,
.inspector .inspector-card:not(:first-child) {
  display: block !important;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--sq-mock-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

.inspector-context-card > summary,
.inspector-accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 43px;
  gap: 10px;
  padding: 10px 12px;
  color: var(--sq-mock-ink);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.inspector-context-card > summary::-webkit-details-marker,
.inspector-accordion > summary::-webkit-details-marker {
  display: none;
}

.inspector-context-card[open] > summary,
.inspector-accordion[open] > summary {
  border-bottom: 1px solid #e5ebf0;
}

.inspector-context-card > summary > span:last-child,
.inspector-accordion > summary > span:last-child {
  color: #8490a1;
  font-size: 0.68rem;
}

.inspector-product-preview {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 12px;
  padding: 9px;
  border: 1px dashed #c8d3dd;
  border-radius: 6px;
  background: #fbfcfd;
}

.inspector-product-preview:has(img[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.inspector-product-preview img {
  width: 42px;
  height: 52px;
  border-radius: 5px;
  object-fit: cover;
}

.inspector-product-preview > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.inspector-product-preview strong {
  overflow: hidden;
  color: #34435a;
  font-size: 0.7rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-product-preview small {
  overflow: hidden;
  color: #8490a1;
  font-size: 0.61rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-fact-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 12px 13px;
}

.inspector-fact-list > div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: baseline;
  gap: 9px;
}

.inspector-fact-list dt {
  color: #7c8899;
  font-size: 0.64rem;
}

.inspector-fact-list dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #34435a;
  font-size: 0.67rem;
  font-weight: 720;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-result-card {
  padding: 12px !important;
}

.inspector-result-card .section-head.compact {
  margin-bottom: 8px;
}

.inspector-result-card .section-head.compact > span:first-child {
  font-size: 0.76rem;
}

.inspector-result-card .setting-row {
  min-height: 30px;
  font-size: 0.65rem;
}

.inspector-result-card .scene-image-grid:empty,
.inspector-result-card .render-output[hidden] {
  display: none;
}

.inspector-accordion > .qc-list,
.inspector-accordion > .queue-list {
  padding: 10px 12px 12px;
}

.inspector-accordion.policy-card {
  display: none !important;
}

.inspector-account-card {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 9px;
  padding: 10px 12px !important;
}

.inspector-account-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--sq-mock-teal-dark);
  background: #eaf4f3;
  font-size: 0.74rem;
  font-weight: 820;
}

.inspector-account-card > div:nth-child(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.inspector-account-card strong {
  overflow: hidden;
  color: var(--sq-mock-ink);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-account-card small {
  overflow: hidden;
  color: #8490a1;
  font-size: 0.59rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-account-card .icon-button {
  min-width: 28px;
  width: 28px;
  height: 28px;
  color: var(--sq-mock-teal-dark);
}

.generation-method-dialog-shell {
  border-radius: 10px;
}

.generation-method-card {
  border-radius: 7px;
}

@media (max-width: 1450px) and (min-width: 1181px) {
  .app-shell {
    grid-template-columns: 232px minmax(650px, 1fr) 320px;
  }

  .sidebar {
    width: 232px;
  }

  .workspace {
    padding-inline: 20px;
  }

  .topbar {
    margin-inline: -20px;
    padding-inline: 20px;
  }

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

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .sidebar {
    width: 224px;
  }

  .inspector {
    position: static;
    grid-column: 2;
    max-height: none;
    border-top: 1px solid var(--sq-mock-line);
    border-left: 0;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 166px;
  }

  .sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--sq-mock-line);
  }

  .sidebar .brand strong {
    color: var(--sq-mock-ink);
  }

  .sidebar .brand small {
    color: var(--sq-mock-teal);
  }

  .inspector {
    grid-column: 1;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding-inline: 12px;
  }

  .topbar {
    min-height: 66px;
    margin-inline: -12px;
    padding-inline: 14px;
  }

  .topbar h1 {
    font-size: 1.18rem;
  }

  .member-menu > div,
  #adminBtn,
  #logoutBtn {
    display: none;
  }

  .quick-start {
    padding-inline: 12px;
  }

  .workspace-control-heading span {
    display: none;
  }

  .quick-action .url-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-action .url-row > #productUrlInput,
  .quick-action .url-row > .primary-create-action {
    grid-column: 1;
  }

  .quick-action .url-row > #productUrlInput {
    grid-row: 1;
  }

  .quick-action .url-row > .primary-create-action {
    grid-row: 2;
  }

  .create-model-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .create-model-controls .quick-model-controls,
  .video-style-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .inspector {
    padding: 14px 12px;
  }
}

/* Workflow sidebar and account information architecture v111. */
.app-shell {
  grid-template-columns: 252px minmax(680px, 1fr) 318px;
}

.sidebar {
  width: 252px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-account-nav {
  display: grid;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-workflow-nav {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-workflow-nav[hidden],
.account-tab-panel[hidden],
.account-tabs button[hidden] {
  display: none !important;
}

.sidebar-workflow-nav > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-workflow-nav > header span {
  color: rgba(225, 235, 248, 0.62);
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0.06em;
}

.sidebar-workflow-nav > header strong {
  padding: 3px 7px;
  border: 1px solid rgba(94, 222, 209, 0.25);
  border-radius: 6px;
  color: #65e1d5;
  background: rgba(20, 164, 155, 0.12);
  font-size: 0.64rem;
  font-weight: 820;
}

.sidebar .sidebar-step-menu,
.sidebar .create-step-rail,
.sidebar .manual-step-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.sidebar .sidebar-step-menu button {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 40px;
  gap: 9px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(231, 239, 249, 0.68);
  background: transparent;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 680;
  text-align: left;
  cursor: pointer;
}

.sidebar .sidebar-step-menu button:not(:last-child)::after {
  position: absolute;
  top: 34px;
  bottom: -9px;
  left: 21px;
  width: 1px;
  background: rgba(255, 255, 255, 0.13);
  content: "";
}

.sidebar .sidebar-step-menu button strong {
  position: relative;
  z-index: 1;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: rgba(237, 243, 250, 0.72);
  background: #0b2a4c;
  font-size: 0.69rem;
  font-weight: 820;
}

.sidebar .sidebar-step-menu button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar .sidebar-step-menu button:hover:not(:disabled) {
  border-color: rgba(101, 225, 213, 0.16);
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

.sidebar .sidebar-step-menu button.active {
  border-color: rgba(101, 225, 213, 0.2);
  color: #7ce9de;
  background: rgba(20, 164, 155, 0.16);
}

.sidebar .sidebar-step-menu button.active strong,
.sidebar .sidebar-step-menu button.done strong {
  border-color: #32caba;
  color: #062844;
  background: #5ee0d3;
}

.sidebar .sidebar-step-menu button.done {
  color: rgba(231, 246, 243, 0.82);
}

.sidebar .sidebar-step-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

body[data-creation-path="manual"][data-manual-step="2"] .simple-clip-settings {
  display: grid !important;
}

body[data-creation-path="manual"][data-manual-step="2"] .setup-grid {
  display: grid !important;
}

.account-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #dce5ec;
  border-radius: 12px;
  background: #f5f8fa;
}

.account-tabs button {
  min-height: 40px;
  flex: 1 1 0;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #667085;
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 780;
  cursor: pointer;
}

.account-tabs button:hover {
  color: #16324f;
  background: rgba(255, 255, 255, 0.7);
}

.account-tabs button.active {
  border-color: #b8ddd7;
  color: #087467;
  background: #fff;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
}

.account-tab-panel {
  display: grid;
  min-width: 0;
}

.account-details-grid.account-single-panel {
  grid-template-columns: minmax(0, 1fr);
}

.account-diamonds-card {
  border-color: #cbe6e1;
}

.account-diamonds-card .account-card-action {
  width: fit-content;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 166px;
  }

  .sidebar {
    width: 100%;
    max-height: 166px;
    padding: 9px 12px 8px;
    overflow: hidden;
  }

  .sidebar .brand {
    padding-bottom: 7px;
  }

  .sidebar .nav-list {
    padding-right: 112px;
  }

  .sidebar-account-nav {
    position: absolute;
    top: 48px;
    right: 12px;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .sidebar-account-nav .nav-item {
    min-height: 36px;
  }

  .sidebar-workflow-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin-top: 7px;
    padding: 7px 0 0;
    overflow: hidden;
    border-bottom: 0;
  }

  .sidebar-workflow-nav > header {
    display: grid;
    min-width: max-content;
  }

  .sidebar .sidebar-step-menu,
  .sidebar .create-step-rail,
  .sidebar .manual-step-rail {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .sidebar .sidebar-step-menu button {
    width: auto;
    min-width: max-content;
    min-height: 36px;
    grid-template-columns: 24px auto;
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .sidebar .sidebar-step-menu button strong {
    width: 22px;
    height: 22px;
    font-size: 0.62rem;
  }

  .sidebar .sidebar-step-menu button::after {
    display: none;
  }

  .topbar {
    top: 166px;
  }

  .account-tabs {
    overflow-x: auto;
  }

  .account-tabs button {
    min-width: max-content;
  }
}

/* Guided creation path and model access controls */
body {
  font-size: 16px;
}

small,
.muted,
.section-kicker,
.admin-method-help,
.generation-method-state,
.status-pill {
  font-size: 0.875rem !important;
  line-height: 1.45;
}

button,
input,
textarea,
select,
table {
  font-size: 0.9375rem;
}

.creation-path-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.creation-path-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  min-height: 92px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
}

.creation-path-card:hover,
.creation-path-card.active {
  border-color: var(--teal);
  background: linear-gradient(135deg, #ffffff, #effaf7);
  box-shadow: 0 10px 26px rgba(15, 139, 124, 0.1);
}

.creation-path-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 1.25rem;
  font-weight: 900;
}

.creation-path-card strong,
.creation-path-card small {
  display: block;
}

.creation-path-card strong {
  margin-bottom: 4px;
  font-size: 1rem;
}

.creation-path-card small {
  color: var(--muted);
}

.manual-step-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfa;
}

.manual-step-rail[hidden] {
  display: none;
}

.create-step-rail[hidden] {
  display: none;
}

.manual-step-rail button {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.manual-step-rail button strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
}

.manual-step-rail button.active {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.manual-step-rail button.active strong,
.manual-step-rail button.done strong {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.manual-studio-panel {
  margin: 18px 0;
  padding: 20px;
  border: 1px solid #b8ddd6;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff, #f3fbf9);
}

.manual-studio-panel[hidden] {
  display: none;
}

.manual-studio-heading,
.manual-studio-action {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.manual-studio-heading h3 {
  margin: 4px 0 6px;
  font-size: 1.25rem;
}

.manual-studio-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.manual-studio-heading > div > span {
  color: var(--teal-dark);
  font-weight: 800;
}

.manual-compatibility-badge,
.admin-model-rate {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-weight: 800;
}

.manual-compatibility-badge[data-tone="warn"] {
  color: #8a5a12;
  background: var(--amber-soft);
}

.manual-image-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.manual-image-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(28, 40, 36, 0.08);
  cursor: pointer;
}

.manual-image-card.selected {
  border-color: var(--teal);
}

.manual-image-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.manual-image-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  object-fit: cover;
  background: #edf2f0;
}

.manual-image-check {
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: transparent;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.manual-image-card.selected .manual-image-check {
  color: #fff;
  background: var(--teal);
}

.manual-image-card strong,
.manual-image-card small {
  display: block;
}

.manual-image-card small {
  margin-top: 3px;
  color: var(--muted);
}

.manual-finishing-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.manual-finishing-controls label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.manual-overlay-option {
  display: grid;
  align-content: start;
  gap: 10px;
}

.manual-overlay-toggle {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  min-height: 68px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--sq-v2-surface-soft, #f7f9fa);
  cursor: pointer;
}

.manual-overlay-toggle > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.manual-overlay-toggle strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.manual-overlay-toggle small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.4;
}

.manual-overlay-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.manual-overlay-toggle > i {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5df;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  transition: background 160ms ease;
}

.manual-overlay-toggle > i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
  content: "";
  transition: transform 160ms ease;
}

.manual-overlay-toggle:has(input:checked) {
  background: #edf9f6;
}

.manual-overlay-toggle input:checked + i {
  background: var(--teal);
}

.manual-overlay-toggle input:checked + i::after {
  transform: translateX(18px);
}

.manual-overlay-toggle:has(input:focus-visible) {
  outline: 3px solid rgba(0, 143, 128, 0.16);
  outline-offset: 2px;
}

#manualOverlayStyleField[hidden] {
  display: none !important;
}

.manual-finishing-controls select {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.manual-text-preview {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.manual-text-preview[hidden] {
  display: none;
}

.manual-text-preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.manual-text-preview-heading h4 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 0.96rem;
}

.manual-text-preview-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.manual-text-preview-list {
  display: grid;
  gap: 8px;
}

.manual-text-preview-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) minmax(0, 0.72fr);
  align-items: start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--sq-v2-surface-soft, #f7f9fa);
}

.manual-text-preview-scene {
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 850;
}

.manual-text-preview-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.manual-text-preview-item small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.manual-text-preview-item strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.45;
}

.manual-text-preview-item strong.is-empty,
.manual-text-preview-empty {
  color: var(--muted);
  font-style: italic;
  font-weight: 600;
}

html[data-theme="dark"] .manual-text-preview {
  background: rgba(15, 27, 38, 0.72);
}

html[data-theme="dark"] .manual-text-preview-item {
  background: #142331;
}

html[data-theme="dark"] .manual-overlay-toggle {
  background: #142331;
}

html[data-theme="dark"] .manual-overlay-toggle:has(input:checked) {
  background: #123a35;
}

@media (max-width: 720px) {
  .manual-text-preview-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .manual-text-preview-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
}

.manual-studio-action {
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.manual-studio-action > span {
  color: var(--muted);
}

.admin-cloud-models {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.admin-cloud-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-cloud-resolution-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 10px;
}

.admin-cloud-resolution-heading h3 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 1rem;
}

.admin-cloud-resolution-heading span {
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-model-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.admin-model-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.admin-model-table th,
.admin-model-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.admin-model-table th:first-child,
.admin-model-table td:first-child {
  text-align: left;
}

.admin-model-group th {
  color: var(--teal-dark);
  background: #f1faf7;
  font-size: 0.875rem;
}

.admin-model-cost {
  width: 92px;
  min-height: 40px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.admin-model-check {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 34px;
}

.admin-model-check span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.admin-model-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
}

.admin-provider-status {
  display: inline-flex;
  max-width: 220px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.admin-provider-status.ready {
  color: #087467;
  background: #e9f8f3;
}

.admin-provider-status.locked {
  color: #9a4c31;
  background: #fff0e9;
}

.admin-resolution-table {
  min-width: 660px;
}

html[data-theme="dark"] .admin-cloud-resolution-heading h3 {
  color: #edf4fb;
}

html[data-theme="dark"] .admin-cloud-resolution-heading span {
  color: #9ba9b8;
}

html[data-theme="dark"] .admin-provider-status.ready {
  color: #8ce4d3;
  background: #143b36;
}

html[data-theme="dark"] .admin-provider-status.locked {
  color: #ffc0a8;
  background: #48291f;
}

@media (max-width: 900px) {
  .creation-path-switch,
  .manual-finishing-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .manual-step-rail {
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    overflow-x: auto;
  }

  .manual-step-rail button {
    flex-direction: column;
    align-items: flex-start;
  }

  .manual-studio-heading,
  .manual-studio-action {
    flex-direction: column;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

a {
  color: var(--teal-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-shell {
  display: grid;
  grid-template-columns: 256px minmax(720px, 1fr) 360px;
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

.sidebar,
.inspector {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  box-shadow: var(--shadow);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), #2e423d);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
}

.nav-item span {
  width: 18px;
  color: var(--teal);
  text-align: center;
}

.nav-item.active,
.nav-item:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-soft);
}

.sidebar-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 12px;
}

.section-head.compact {
  margin-bottom: 0;
}

.section-head h2 {
  margin: 2px 0 0;
  font-size: 1rem;
  line-height: 1.15;
}

.section-head > div {
  min-width: 0;
}

.section-kicker,
.eyebrow {
  margin: 0;
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-list,
.queue-list,
.qc-list {
  display: grid;
  gap: 8px;
}

.project-item {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 52px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
}

.project-item span,
.project-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-item span {
  font-size: 0.88rem;
  font-weight: 800;
}

.project-item small {
  color: var(--muted);
  font-size: 0.74rem;
}

.project-item.active {
  border-color: rgba(15, 139, 124, 0.36);
  background: var(--teal-soft);
}

.avatar-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.avatar-card.selected {
  border-color: rgba(15, 139, 124, 0.42);
}

.avatar-card strong,
.avatar-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-card strong {
  font-size: 0.84rem;
}

.avatar-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.avatar-face {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--charcoal);
  font-size: 0.74rem;
  font-weight: 900;
}

.avatar-face.alt {
  background: var(--amber);
}

.workspace {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  margin-bottom: 14px;
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: clamp(1.6rem, 2.2vw, 2.15rem);
  line-height: 1.12;
}

.topbar-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill,
.format-chip,
.mini-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.pass,
.mini-score {
  color: var(--green);
  border-color: rgba(33, 137, 90, 0.28);
  background: var(--green-soft);
}

.status-pill.warn {
  color: #8a5d00;
  border-color: rgba(217, 144, 31, 0.38);
  background: var(--amber-soft);
}

.status-pill.fail {
  color: var(--red);
  border-color: rgba(207, 75, 63, 0.28);
  background: var(--red-soft);
}

.status-pill.busy {
  color: var(--teal-dark);
  border-color: rgba(15, 139, 124, 0.26);
  background: var(--teal-soft);
}

.primary-button,
.ghost-button,
.text-button,
.icon-button {
  min-height: 36px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 850;
}

.primary-button {
  border: 1px solid var(--teal-dark);
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 8px 18px rgba(15, 139, 124, 0.18);
}

.primary-button:hover {
  background: var(--teal-dark);
}

.primary-button.full {
  width: 100%;
}

.ghost-button.full {
  width: 100%;
}

.ghost-button {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--surface);
}

.ghost-button:hover,
.text-button:hover,
.icon-button:hover {
  border-color: rgba(15, 139, 124, 0.38);
  background: var(--surface-soft);
}

.text-button {
  border: 1px solid transparent;
  color: var(--teal-dark);
  background: transparent;
}

.icon-button {
  width: 32px;
  min-width: 32px;
  padding: 0;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.primary-button,
.ghost-button,
.text-button {
  padding: 0 13px;
}

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

.metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric span,
.metric strong {
  display: block;
}

.metric span {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 750;
  text-transform: uppercase;
}

.metric strong {
  margin-top: 5px;
  overflow: hidden;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr) minmax(280px, 0.7fr);
  gap: 14px;
  align-items: start;
}

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

.brief-panel,
.storyboard-panel,
.preview-panel,
.inspector-card {
  padding: 14px;
}

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

.link-import {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(15, 139, 124, 0.26);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fcfa, var(--teal-soft));
}

.link-import label {
  display: block;
  margin-bottom: 6px;
  color: var(--teal-dark);
  font-size: 0.73rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.url-row input {
  grid-column: 1 / -1;
}

.url-row button {
  width: 100%;
}

.link-status {
  min-height: 32px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.4;
}

.link-status.pass {
  color: var(--green);
  border-color: rgba(33, 137, 90, 0.28);
  background: var(--green-soft);
}

.link-status.warn {
  color: #8a5d00;
  border-color: rgba(217, 144, 31, 0.38);
  background: var(--amber-soft);
}

.link-status.fail {
  color: var(--red);
  border-color: rgba(207, 75, 63, 0.28);
  background: var(--red-soft);
}

.work-status {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(15, 139, 124, 0.28);
  border-radius: 8px;
  background: #f8fcfa;
}

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

.work-status-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.work-status-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-status-head span:last-child {
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.work-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(15, 139, 124, 0.22);
  border-top-color: var(--teal);
  border-radius: 999px;
}

.work-status.busy .work-spinner {
  animation: spin 780ms linear infinite;
}

.work-status.pass {
  color: var(--green);
  border-color: rgba(33, 137, 90, 0.3);
  background: var(--green-soft);
}

.work-status.pass .work-spinner {
  border-color: var(--green);
  background: var(--green);
}

.work-status.pass .work-status-head span:last-child {
  color: var(--green);
}

.work-status.fail {
  color: var(--red);
  border-color: rgba(207, 75, 63, 0.3);
  background: var(--red-soft);
}

.work-status.fail .work-spinner {
  border-color: var(--red);
  background: var(--red);
}

.work-status.fail .work-status-head span:last-child {
  color: var(--red);
}

.work-status-detail {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.42;
}

.work-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.work-progress-meta strong {
  color: var(--teal-dark);
  font-size: 0.78rem;
}

.work-status.pass .work-progress-meta strong {
  color: var(--green);
}

.work-status.fail .work-progress-meta strong {
  color: var(--red);
}

.work-progress {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--teal-soft);
}

.work-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 280ms ease;
}

.work-status.pass .work-progress span {
  background: var(--green);
}

.work-status.fail .work-progress span {
  background: var(--red);
}

.work-status-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.work-status-actions[hidden] {
  display: none;
}

.work-status-actions .primary-button,
.work-status-actions .ghost-button {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.78rem;
}

.work-status.fail .work-status-actions .primary-button {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.work-status.fail .work-status-actions .primary-button:hover {
  filter: brightness(0.94);
}

[data-theme="dark"] .work-status.fail .work-status-actions .ghost-button {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(127, 29, 29, 0.18);
  color: #fecaca;
}

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

.brief-form label,
.scene-card label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
}

.brief-form .wide {
  grid-column: 1 / -1;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfcfb;
  font-size: 0.88rem;
  font-weight: 650;
  outline: none;
}

input,
select {
  min-height: 38px;
  padding: 8px 10px;
}

textarea {
  resize: vertical;
  min-height: 76px;
  padding: 9px 10px;
  line-height: 1.45;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 139, 124, 0.13);
}

.toggle-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.switch-line {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  color: var(--ink) !important;
  font-size: 0.84rem !important;
  text-transform: none !important;
}

.switch-line input {
  width: 17px;
  height: 17px;
  min-height: 17px;
  accent-color: var(--teal);
}

.media-uploader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfcfb;
}

.media-uploader strong,
.media-uploader span {
  display: block;
}

.media-uploader strong {
  font-size: 0.84rem;
}

.media-uploader span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.upload-box {
  display: grid !important;
  place-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  color: var(--teal-dark) !important;
  background: var(--teal-soft);
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  text-transform: none !important;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.media-thumbs {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.media-empty {
  display: grid;
  place-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.media-thumb {
  min-width: 0;
  margin: 0;
}

.media-thumb img,
.media-thumb video {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.media-thumb figcaption {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button-row {
  margin-top: 12px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segmented button {
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 850;
}

.segmented button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 2px 7px rgba(28, 40, 36, 0.08);
}

.storyboard-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-right: 3px;
}

.scene-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.scene-head,
.scene-foot {
  display: grid;
  gap: 8px;
}

.scene-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.scene-index {
  display: block;
  margin-bottom: 5px;
  color: var(--teal-dark);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.scene-title-input {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 0.92rem;
  font-weight: 900;
}

.scene-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.scene-actions button {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--teal-dark);
  background: var(--surface);
  font-size: 0.76rem;
  font-weight: 850;
}

.duration-input {
  display: inline-grid !important;
  grid-template-columns: 18px 54px;
  align-items: center;
  gap: 0 !important;
  min-width: 72px !important;
  color: var(--muted) !important;
  text-transform: none !important;
}

.duration-input span {
  display: grid;
  place-items: center;
  height: 34px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: var(--surface-soft);
  font-size: 0.7rem;
}

.duration-input input {
  min-height: 34px;
  border-radius: 0 8px 8px 0;
}

.scene-foot {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.preview-panel {
  display: grid;
  gap: 10px;
}

.phone-preview {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  overflow: hidden;
  border: 8px solid #151b19;
  border-radius: 30px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(12, 18, 17, 0.18), rgba(12, 18, 17, 0.78)),
    radial-gradient(circle at 52% 31%, rgba(255, 255, 255, 0.28), transparent 25%),
    linear-gradient(145deg, #0f8b7c, #252b2a 54%, #d9901f);
  box-shadow: 0 22px 48px rgba(28, 40, 36, 0.2);
}

.preview-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto auto auto;
  gap: 10px;
  align-content: end;
  padding: 42px 44px 74px 24px;
}

.product-orbit {
  display: grid;
  place-items: center;
  align-self: center;
  min-height: 170px;
}

.product-box {
  display: grid;
  place-items: center;
  width: 138px;
  aspect-ratio: 0.72;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  color: #13201c;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(238, 244, 241, 0.96)),
    linear-gradient(90deg, transparent 48%, rgba(15, 139, 124, 0.16) 49% 51%, transparent 52%);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.28);
  font-size: 1.2rem;
  font-weight: 950;
  text-align: center;
  overflow-wrap: anywhere;
}

.preview-content h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.08;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.34);
}

.preview-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  font-weight: 750;
}

.caption-strip {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(14, 18, 18, 0.58);
  font-size: 0.72rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.safe-zone {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.23);
}

.safe-zone.top {
  inset: 0 0 auto;
  height: 50px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.28);
}

.safe-zone.right {
  inset: 0 0 0 auto;
  width: 42px;
  border-left: 1px dashed rgba(255, 255, 255, 0.28);
}

.safe-zone.bottom {
  inset: auto 0 0;
  height: 68px;
  border-top: 1px dashed rgba(255, 255, 255, 0.28);
}

.tiktok-ui {
  position: absolute;
  right: 12px;
  bottom: 92px;
  z-index: 3;
  display: grid;
  gap: 13px;
}

.tiktok-ui span {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.preview-note {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--amber-soft);
}

.preview-note strong {
  font-size: 0.82rem;
}

.preview-note span {
  color: #6d5323;
  font-size: 0.78rem;
  line-height: 1.45;
}

.inspector {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.inspector-card {
  display: grid;
  gap: 10px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.setting-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.setting-row strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--muted);
}

.status-dot.ready {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(33, 137, 90, 0.12);
}

.qc-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.qc-item strong,
.qc-item p,
.qc-item small {
  display: block;
  min-width: 0;
}

.qc-item strong {
  font-size: 0.84rem;
}

.qc-item p {
  margin: 4px 0 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.42;
}

.qc-item small {
  color: #7f8a86;
  font-size: 0.68rem;
  line-height: 1.35;
}

.qc-item > span {
  align-self: start;
  min-width: 42px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.qc-item.pass {
  border-color: rgba(33, 137, 90, 0.26);
}

.qc-item.pass > span {
  color: var(--green);
  background: var(--green-soft);
}

.qc-item.warn {
  border-color: rgba(217, 144, 31, 0.35);
}

.qc-item.warn > span {
  color: #8a5d00;
  background: var(--amber-soft);
}

.qc-item.fail {
  border-color: rgba(207, 75, 63, 0.32);
}

.qc-item.fail > span {
  color: var(--red);
  background: var(--red-soft);
}

.queue-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.queue-item span {
  color: var(--teal-dark);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.queue-item strong,
.queue-item em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item strong {
  font-size: 0.84rem;
}

.queue-item small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.queue-item em {
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.queue-item.blocked {
  border-color: rgba(207, 75, 63, 0.32);
  background: var(--red-soft);
}

.queue-item.ready,
.queue-item.queued,
.queue-item.planned {
  border-color: rgba(33, 137, 90, 0.28);
  background: var(--green-soft);
}

.policy-card a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 750;
}

.policy-card a:last-child {
  border-bottom: 0;
}

.render-output {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(33, 137, 90, 0.28);
  border-radius: 8px;
  background: var(--green-soft);
}

.render-output[hidden] {
  display: none;
}

.render-output strong {
  font-size: 0.84rem;
}

.render-output video {
  width: 100%;
  max-height: 360px;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(33, 137, 90, 0.24);
  border-radius: 8px;
  background: #111816;
  object-fit: contain;
}

.render-output-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.render-output-actions .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  text-decoration: none;
}

.render-output-actions span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
}

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

.scene-image-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 52px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.74rem;
  font-weight: 800;
}

.scene-image-thumb {
  min-width: 0;
  margin: 0;
}

.scene-image-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111816;
}

.scene-image-thumb figcaption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  text-align: center;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 180px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
}

.empty-state.small {
  min-height: 86px;
  padding: 12px;
}

.empty-state strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.empty-state span {
  font-size: 0.78rem;
  line-height: 1.35;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  transform: translate(-50%, 18px);
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 14px;
  border: 1px solid #1f2937;
  border-radius: 8px;
  color: #ffffff;
  background: #344054;
  box-shadow: var(--shadow);
  font-size: 0.86rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease;
}

.toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.is-busy button {
  transition: opacity 160ms ease;
}

@media (max-width: 1720px) {
  .app-shell {
    grid-template-columns: 236px minmax(660px, 1fr) 330px;
    gap: 14px;
    padding: 14px;
  }

  .studio-grid {
    grid-template-columns: minmax(340px, 1fr) minmax(390px, 1.1fr);
  }

  .preview-panel {
    grid-column: 1 / -1;
  }

  .phone-preview {
    width: 240px;
  }
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .inspector {
    grid-column: 2;
    position: static;
    max-height: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .policy-card {
    grid-column: 1 / -1;
  }

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

  .storyboard-list {
    max-height: none;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: flex;
    flex-direction: column;
    padding: 10px;
  }

  .workspace {
    order: 1;
  }

  .sidebar {
    order: 2;
  }

  .inspector {
    order: 3;
  }

  .sidebar,
  .inspector {
    position: static;
    height: auto;
    max-height: none;
    margin-bottom: 12px;
  }

  .sidebar {
    padding: 12px;
  }

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

  .topbar {
    display: grid;
    gap: 12px;
  }

  .topbar-actions {
    align-items: stretch;
  }

  .topbar-actions > * {
    flex: 1 1 140px;
  }

  .metrics-row,
  .brief-form,
  .inspector {
    grid-template-columns: 1fr;
  }

  .scene-head,
  .scene-foot {
    grid-template-columns: 1fr;
  }

  .scene-actions {
    justify-content: space-between;
  }

  .button-row > * {
    flex: 1 1 170px;
  }

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

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

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

  .phone-preview {
    width: min(100%, 280px);
  }
}

@media (max-width: 520px) {
  .nav-list,
  .project-list {
    grid-template-columns: 1fr;
  }

  .metrics-row {
    gap: 8px;
  }

  .metric {
    padding: 10px;
  }

  .brief-panel,
  .storyboard-panel,
  .preview-panel,
  .inspector-card {
    padding: 12px;
  }

  .topbar h1 {
    font-size: 1.42rem;
  }

  .primary-button,
  .ghost-button,
  .text-button {
    width: 100%;
  }
}

/* Character library */
.reviewer-picker-head > div:first-child {
  display: grid;
  gap: 3px;
}

.reviewer-picker-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.reviewer-picker-actions small {
  color: #667085;
  font-size: 0.72rem;
  font-weight: 760;
  white-space: nowrap;
}

.reviewer-picker-actions .ghost-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 0.76rem;
}

.reviewer-picker-actions .ghost-button:disabled {
  border-color: #e4e7ec;
  color: #98a2b3;
  background: #f9fafb;
  cursor: not-allowed;
}

.reviewer-option-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.reviewer-option-title em {
  flex: 0 0 auto;
  color: #98a2b3;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
}

.reviewer-option.active .reviewer-option-title em {
  color: #118a7a;
}

.reviewer-editor-status {
  margin-top: 10px;
  color: #667085;
  font-size: 0.72rem;
  font-weight: 740;
}

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

.reviewer-editor-grid .wide {
  grid-column: 1 / -1;
}

.reviewer-details input:disabled,
.reviewer-details textarea:disabled {
  color: #475467;
  background: #f9fafb;
  cursor: default;
  opacity: 1;
}

.reviewer-image-upload {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 70px;
  align-content: center;
  padding: 12px;
  border: 1px dashed #b8c1cc;
  border-radius: 8px;
  background: #f9fafb;
  cursor: pointer;
}

.reviewer-image-upload:hover {
  border-color: #7f9c92;
  background: #f5faf8;
}

.reviewer-image-upload:focus-within {
  border-color: var(--teal);
  outline: 3px solid rgba(15, 139, 124, 0.13);
  outline-offset: 2px;
}

.reviewer-image-upload input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none;
  appearance: none;
}

.reviewer-image-upload span {
  color: #667085;
  font-size: 0.72rem;
  font-weight: 650;
}

.reviewer-image-upload .reviewer-image-upload-title {
  color: #344054;
  font-size: 0.82rem;
  font-weight: 800;
}

.reviewer-image-upload span.is-success {
  color: #067647;
}

.reviewer-image-upload span.is-error {
  color: #b42318;
}

.reviewer-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.reviewer-editor-actions .reviewer-save-button {
  width: auto;
  min-width: 126px;
  margin-top: 0;
}

.danger-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #f0b4ae;
  border-radius: 8px;
  color: #b42318;
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 820;
  cursor: pointer;
}

.danger-button:hover {
  background: #fff4f2;
}

@media (max-width: 820px) {
  .reviewer-picker-head,
  .reviewer-picker-actions {
    align-items: stretch;
  }

  .reviewer-picker-head {
    flex-direction: column;
  }

  .reviewer-picker-actions {
    justify-content: space-between;
  }

  .reviewer-editor-grid {
    grid-template-columns: 1fr;
  }

  .reviewer-editor-grid .wide {
    grid-column: auto;
  }
}

/* Simple flow overrides */
.app-shell {
  grid-template-columns: minmax(0, 1fr) 340px;
  max-width: 1480px;
  margin: 0 auto;
}

.sidebar {
  display: none;
}

.topbar {
  margin-bottom: 12px;
}

.topbar-secondary {
  display: none;
}

.quick-start {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(380px, 1.15fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 12px;
  padding: 16px;
}

.quick-copy h2 {
  margin: 4px 0 8px;
  font-size: 1.35rem;
  line-height: 1.18;
}

.quick-copy p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.55;
}

.quick-action {
  display: grid;
  gap: 8px;
}

.quick-action > label {
  color: var(--teal-dark);
  font-size: 0.73rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quick-action .url-row {
  grid-template-columns: minmax(0, 0.72fr) minmax(160px, 0.6fr);
}

.quick-action .url-row input {
  grid-column: 1 / -1;
  min-height: 44px;
  font-size: 0.96rem;
}

.quick-settings {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 0.58fr);
  gap: 8px;
}

.quick-settings label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.quick-settings input,
.quick-settings select {
  min-height: 38px;
}

.primary-button.large {
  min-height: 44px;
  font-size: 0.94rem;
}

.quick-steps {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.quick-steps div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.quick-steps div.active {
  border-color: rgba(15, 139, 124, 0.46);
  background: var(--teal-soft);
}

.quick-steps div.done {
  border-color: rgba(33, 137, 90, 0.34);
  background: var(--green-soft);
}

.quick-steps div.fail {
  border-color: rgba(207, 75, 63, 0.36);
  background: var(--red-soft);
}

.quick-steps strong {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--charcoal);
  font-size: 0.74rem;
}

.quick-steps div.active strong {
  background: var(--teal);
}

.quick-steps div.done strong {
  background: var(--green);
}

.quick-steps div.fail strong {
  background: var(--red);
}

.quick-steps span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.studio-grid {
  grid-template-columns: minmax(300px, 0.76fr) minmax(420px, 1.24fr);
}

.preview-panel {
  grid-column: 1 / -1;
}

.advanced-fields {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.advanced-fields > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 0.86rem;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.advanced-fields > summary::-webkit-details-marker {
  display: none;
}

.advanced-fields > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--surface);
  font-weight: 950;
}

.advanced-fields[open] > summary {
  margin-bottom: 10px;
}

.advanced-fields[open] > summary::after {
  content: "-";
}

.brief-panel {
  box-shadow: none;
}

.brief-panel .section-head {
  margin-bottom: 8px;
}

.brief-panel .button-row {
  align-items: stretch;
}

.inspector {
  top: 14px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
    max-width: 1040px;
  }

  .inspector {
    grid-column: auto;
    position: static;
    max-height: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-start {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .app-shell {
    display: grid;
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .workspace,
  .inspector {
    order: initial;
  }

  .quick-start {
    padding: 12px;
  }

  .quick-action .url-row,
  .quick-settings,
  .quick-steps,
  .metrics-row,
  .brief-form,
  .inspector {
    grid-template-columns: 1fr;
  }

  .quick-steps span {
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .quick-copy h2 {
    font-size: 1.18rem;
  }
}

/* Operator UX refresh */
:root {
  --bg: #f5f7f6;
  --surface-soft: #f3f6f4;
  --line: #dce5e1;
  --line-strong: #b8c9c3;
  --teal: #0d8275;
  --teal-dark: #075f56;
  --shadow: 0 1px 2px rgba(30, 42, 38, 0.05);
}

body {
  background:
    linear-gradient(180deg, #ffffff 0, #f5f7f6 210px),
    var(--bg);
}

.app-shell {
  width: min(100%, 1500px);
  max-width: 1500px;
  grid-template-columns: minmax(0, 1fr) 328px;
  gap: 16px;
  padding: 14px;
}

.workspace {
  display: grid;
  gap: 12px;
}

.topbar {
  align-items: end;
  margin-bottom: 0;
  padding: 2px 2px 0;
}

.eyebrow {
  margin: 0;
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.topbar h1 {
  margin-top: 3px;
  font-size: 1.42rem;
  line-height: 1.18;
}

.panel,
.metric {
  box-shadow: var(--shadow);
}

.quick-start {
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 0;
  padding: 14px;
}

.quick-copy {
  min-width: 0;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}

.quick-copy h2 {
  margin: 4px 0 6px;
  font-size: 1.08rem;
  line-height: 1.24;
}

.quick-copy p {
  color: #5f6b67;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.45;
}

.quick-action {
  align-content: start;
}

.quick-action .url-row {
  grid-template-columns: minmax(0, 1fr) 112px 148px;
  gap: 8px;
}

.quick-action .url-row input {
  grid-column: auto;
  min-height: 40px;
}

.quick-action .url-row button {
  width: auto;
}

.primary-button.large {
  min-height: 40px;
}

.quick-settings {
  grid-template-columns: 156px minmax(0, 1fr);
}

.quick-settings input,
.quick-settings select {
  min-height: 36px;
}

.link-status,
.work-status {
  padding: 8px 10px;
}

.imported-product-preview[hidden] {
  display: none;
}

.imported-product-preview {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 88px;
  padding: 8px;
  border: 1px solid rgba(15, 139, 124, 0.22);
  border-radius: 8px;
  background: #f7fbfa;
}

.imported-product-preview img,
.imported-product-missing {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.imported-product-preview img {
  display: block;
  object-fit: cover;
}

.imported-product-preview strong,
.imported-product-preview span,
.imported-product-preview small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.imported-product-preview strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
}

.imported-product-preview span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.imported-product-preview small {
  margin-top: 6px;
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 850;
}

.imported-product-missing {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.imported-product-preview.no-image {
  border-color: rgba(217, 144, 31, 0.32);
  background: var(--amber-soft);
}

.work-progress {
  height: 8px;
}

.quick-steps {
  gap: 6px;
}

.quick-steps div {
  min-height: 36px;
  padding: 7px 8px;
  background: #f8faf9;
}

.quick-steps strong {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
}

.quick-steps span {
  font-size: 0.78rem;
}

.metrics-row {
  gap: 8px;
  margin: 0;
}

.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 12px;
}

.metric span {
  font-size: 0.68rem;
}

.metric strong {
  margin-top: 0;
  font-size: 0.96rem;
  text-align: right;
}

.studio-grid {
  grid-template-columns: minmax(282px, 340px) minmax(0, 1fr);
  gap: 12px;
}

.brief-panel {
  grid-column: 1;
}

.storyboard-panel {
  grid-column: 2;
  grid-row: span 2;
}

.preview-panel {
  grid-column: 1;
}

.brief-panel,
.storyboard-panel,
.preview-panel,
.inspector-card {
  padding: 12px;
}

.section-head {
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 2px 0 0;
  font-size: 1rem;
  line-height: 1.2;
}

.product-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8faf9;
}

.product-summary-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.product-summary-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal-dark), #2d3532);
  font-size: 0.82rem;
  font-weight: 950;
}

.product-summary-main div {
  min-width: 0;
}

.product-summary-main strong,
.product-summary-main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-summary-main strong {
  font-size: 0.92rem;
}

.product-summary-main small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}

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

.product-summary dl > div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.product-summary dl > div.wide {
  grid-column: 1 / -1;
}

.product-summary dt,
.product-summary dd {
  min-width: 0;
}

.product-summary dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.product-summary dd {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.32;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-summary .wide dd {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.advanced-fields {
  border-top: 0;
  padding-top: 0;
}

.advanced-fields > summary {
  min-height: 36px;
  padding: 0 9px;
  font-size: 0.8rem;
}

.brief-form {
  gap: 8px;
}

.storyboard-list {
  max-height: calc(100vh - 238px);
  gap: 8px;
}

.scene-card {
  gap: 8px;
  padding: 10px;
  background: #fdfefd;
}

.scene-title-input,
.duration-input span,
.duration-input input,
.scene-actions button {
  min-height: 32px;
}

.scene-actions {
  align-items: start;
}

.scene-foot {
  gap: 8px;
}

.preview-panel {
  align-content: start;
}

.phone-preview {
  width: min(100%, 220px);
  border-width: 6px;
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(28, 40, 36, 0.16);
}

.preview-content {
  gap: 7px;
  padding: 34px 36px 62px 18px;
}

.product-orbit {
  min-height: 122px;
}

.product-box {
  width: 104px;
  font-size: 0.95rem;
}

.preview-content h3 {
  font-size: 1rem;
  line-height: 1.12;
}

.preview-content p,
.caption-strip {
  font-size: 0.68rem;
}

.preview-note {
  padding: 9px;
}

.inspector {
  top: 14px;
  gap: 12px;
}

.inspector-card {
  gap: 9px;
}

.setting-row {
  min-height: 30px;
  padding-bottom: 7px;
}

.qc-item,
.queue-item {
  padding: 9px;
  background: #fdfefd;
}

.policy-card a {
  padding: 6px 0;
  font-size: 0.76rem;
}

@media (max-width: 1260px) {
  .app-shell {
    grid-template-columns: 1fr;
    max-width: 1100px;
  }

  .inspector {
    position: static;
    max-height: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .policy-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .quick-start,
  .studio-grid {
    grid-template-columns: 1fr;
  }

  .quick-copy {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .storyboard-panel,
  .preview-panel,
  .brief-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .storyboard-list {
    max-height: none;
  }

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

@media (max-width: 640px) {
  .app-shell {
    padding: 10px;
  }

  .topbar {
    display: grid;
    gap: 8px;
  }

  .quick-action .url-row,
  .quick-settings {
    grid-template-columns: 1fr;
  }

  .quick-action .url-row button {
    width: 100%;
  }

  .quick-steps,
  .metrics-row,
  .product-summary dl,
  .scene-head,
  .scene-foot {
    grid-template-columns: 1fr;
  }

  .quick-steps span,
  .product-summary-main strong,
  .product-summary-main small,
  .product-summary dd {
    white-space: normal;
  }

  .metric {
    min-height: 44px;
  }

  .phone-preview {
    width: min(100%, 250px);
  }
}

/* Minimal workflow refresh */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --teal: #0f9488;
  --teal-dark: #0f766e;
  --teal-soft: #e8f7f4;
  --green-soft: #edf8f3;
  --amber-soft: #fff8e8;
  --red-soft: #fff0ee;
  --shadow: none;
}

body {
  background: var(--bg);
}

.app-shell {
  width: min(100%, 1360px);
  max-width: 1360px;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  padding: 16px;
}

.workspace {
  gap: 12px;
}

.topbar {
  min-height: 42px;
  padding: 0;
}

.eyebrow {
  display: none;
}

.topbar h1 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 850;
}

.topbar-actions {
  gap: 8px;
}

.status-pill {
  min-height: 30px;
  border-radius: 8px;
  padding: 5px 10px;
}

.panel,
.metric {
  border-color: var(--line);
  box-shadow: none;
}

.quick-start {
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border-radius: 8px;
}

.quick-copy {
  display: grid;
  align-content: start;
  gap: 6px;
  padding-right: 18px;
}

.quick-copy h2 {
  margin: 0;
  font-size: 1.02rem;
}

.quick-copy p {
  font-size: 0.8rem;
  line-height: 1.45;
}

.quick-action {
  gap: 10px;
}

.quick-action .url-row {
  grid-template-columns: minmax(0, 1fr) 96px 132px;
}

.quick-action .url-row input,
.primary-button.large {
  min-height: 38px;
}

.quick-settings {
  grid-template-columns: 150px minmax(0, 1fr);
}

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

.primary-actions .primary-button,
.primary-actions .ghost-button {
  width: 100%;
  min-height: 40px;
}

.work-status {
  border-color: #cfe7e2;
  background: #f4fbf9;
}

.work-status-head strong {
  font-size: 0.84rem;
}

.work-progress {
  height: 6px;
}

.quick-steps {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 2px;
}

.quick-steps div {
  min-height: 34px;
  padding: 7px 8px;
  border-color: var(--line);
  background: #fff;
}

.quick-steps strong {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  background: #111827;
}

.quick-steps span {
  font-size: 0.75rem;
}

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

.metric {
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
}

.metric span {
  color: var(--muted);
  font-size: 0.65rem;
}

.metric strong {
  font-size: 0.9rem;
}

.studio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.storyboard-panel {
  grid-column: 1;
  grid-row: auto;
  order: 1;
}

.brief-panel {
  grid-column: 1;
  order: 2;
}

.preview-panel {
  display: none;
}

.section-head {
  margin-bottom: 10px;
}

.section-kicker {
  color: var(--teal-dark);
  font-size: 0.68rem;
}

.section-head h2 {
  font-size: 0.96rem;
}

.storyboard-list {
  max-height: none;
  gap: 8px;
  padding-right: 0;
}

.scene-card {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  border-color: var(--line);
  background: #fff;
}

.scene-head {
  grid-template-columns: minmax(0, 1fr) auto;
}

.scene-index {
  margin-bottom: 4px;
  font-size: 0.66rem;
}

.scene-title-input,
.scene-actions button,
.duration-input span,
.duration-input input {
  min-height: 30px;
}

.scene-title-input {
  font-size: 0.88rem;
}

.scene-card label textarea {
  min-height: 58px;
}

.scene-foot {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.brief-panel .section-head {
  margin-bottom: 8px;
}

.product-summary {
  background: #fff;
}

.product-summary dl {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-summary dl > div.wide {
  grid-column: span 2;
}

.advanced-fields > summary {
  background: #fff;
}

.inspector {
  top: 16px;
  gap: 10px;
}

.inspector-card {
  padding: 12px;
  gap: 8px;
  border-radius: 8px;
}

.setting-row {
  min-height: 28px;
}

.scene-image-grid {
  margin-top: 2px;
}

.render-output {
  background: #f7fbfa;
}

.qc-item,
.queue-item {
  padding: 8px;
  background: #fff;
}

.policy-card {
  display: none;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
    max-width: 980px;
  }

  .inspector {
    position: static;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 10px;
  }

  .quick-start,
  .quick-action .url-row,
  .quick-settings,
  .primary-actions,
  .quick-steps,
  .metrics-row,
  .scene-head,
  .scene-foot,
  .inspector,
  .product-summary dl {
    grid-template-columns: 1fr;
  }

  .quick-copy {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quick-action .url-row button {
    width: 100%;
  }

  .imported-product-preview {
    grid-template-columns: 64px minmax(0, 1fr);
    min-height: 80px;
  }

  .imported-product-preview img,
  .imported-product-missing {
    width: 64px;
    height: 64px;
  }

  .product-summary dl > div.wide {
    grid-column: auto;
  }
}

/* Modern Minimal SaaS UI refresh */
:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --ink: #111827;
  --muted: #667085;
  --line: #e6e8ec;
  --line-strong: #d7dbe2;
  --teal: #008f80;
  --teal-dark: #08756b;
  --teal-soft: #e9f8f5;
  --green: #16834f;
  --green-soft: #edf8f1;
  --amber: #b7791f;
  --amber-soft: #fff8ea;
  --red: #c24135;
  --red-soft: #fff1ef;
  --charcoal: #111827;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 28px rgba(16, 24, 40, 0.04);
  --radius: 8px;
  --font: Geist, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: var(--bg);
}

.app-shell {
  width: min(100%, 1540px);
  max-width: 1540px;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 320px;
  gap: 18px;
  padding: 20px;
}

.sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  height: calc(100vh - 40px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: none;
}

.brand {
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 8px;
  background: #111827;
}

.brand-mark svg {
  width: 19px;
  height: 19px;
  fill: var(--teal);
}

.brand strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
}

.brand small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
}

.nav-list {
  gap: 5px;
}

.nav-item {
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #475467;
  font-size: 0.86rem;
  font-weight: 760;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 21px !important;
  height: 21px;
  color: currentColor !important;
}

.nav-icon svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.nav-item.active,
.nav-item:hover {
  color: var(--teal-dark);
  border-color: transparent;
  background: var(--surface-soft);
}

.sidebar-section {
  gap: 9px;
}

.sidebar-section .section-head span {
  color: #667085;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-item,
.avatar-card {
  border-color: transparent;
  background: var(--surface-soft);
}

.project-item.active,
.avatar-card.selected {
  border-color: rgba(0, 143, 128, 0.22);
  background: var(--teal-soft);
}

.avatar-face {
  background: #111827;
}

.avatar-face.alt {
  background: #5d6b98;
}

.workspace {
  display: grid;
  gap: 14px;
}

.topbar {
  min-height: 54px;
  align-items: center;
  margin: 0;
}

.topbar > div:first-child {
  display: grid;
}

.eyebrow {
  display: block;
  order: 2;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 650;
  line-height: 1.4;
  text-transform: none;
}

.topbar h1 {
  order: 1;
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 860;
  line-height: 1.16;
}

.status-pill {
  min-height: 32px;
  border-radius: 8px;
  background: var(--surface);
  color: #475467;
}

.panel,
.metric {
  border-color: var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: none;
}

.quick-start {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.quick-copy {
  display: none;
}

.quick-steps {
  order: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 14px 24px 12px;
  border-bottom: 1px solid var(--line);
}

.quick-steps div {
  position: relative;
  min-height: 42px;
  padding: 0 18px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.quick-steps div:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 42px;
  right: 16px;
  height: 1px;
  background: var(--line);
}

.quick-steps strong {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid var(--line);
  color: #344054;
  background: var(--surface-soft);
  font-size: 0.84rem;
}

.quick-steps div.active strong,
.quick-steps div.done strong {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.quick-steps div.fail strong {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.quick-steps span {
  color: #344054;
  font-size: 0.85rem;
  font-weight: 760;
  white-space: normal;
}

.quick-action {
  order: 2;
  display: grid;
  gap: 10px;
  padding: 18px 24px;
}

.quick-action > label,
.quick-settings label,
.brief-form label,
.scene-card label {
  color: #475467;
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.02em;
  text-transform: none;
}

.quick-action .url-row {
  grid-template-columns: minmax(0, 1fr) 112px 140px;
  gap: 10px;
}

.quick-action .url-row input,
.quick-action .url-row button,
.primary-button.large {
  min-height: 44px;
}

input,
textarea,
select {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 620;
}

input::placeholder,
textarea::placeholder {
  color: #98a2b3;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(0, 143, 128, 0.68);
  box-shadow: 0 0 0 3px rgba(0, 143, 128, 0.12);
}

.primary-button,
.ghost-button,
.text-button,
.icon-button {
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 790;
}

.primary-button {
  border-color: var(--teal-dark);
  background: var(--teal);
  box-shadow: none;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.ghost-button {
  border-color: var(--line-strong);
  background: #fff;
  color: #344054;
}

.ghost-button:hover,
.text-button:hover,
.icon-button:hover {
  border-color: #b9c3cf;
  background: var(--surface-soft);
}

.quick-settings {
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 10px;
}

.quick-settings input,
.quick-settings select {
  min-height: 40px;
}

.link-status {
  min-height: 36px;
  padding: 9px 11px;
  border-color: var(--line);
  background: var(--surface-soft);
  color: #475467;
}

.link-status.pass {
  display: none;
}

.imported-product-preview {
  grid-template-columns: 62px minmax(0, 1fr);
  min-height: 78px;
  padding: 10px;
  border-color: var(--line);
  background: var(--surface);
}

.imported-product-preview img,
.imported-product-missing {
  width: 62px;
  height: 62px;
}

.reviewer-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.reviewer-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reviewer-picker-head span {
  color: #667085;
  font-size: 0.7rem;
  font-weight: 820;
}

.reviewer-picker-head strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
}

.reviewer-picker-body {
  display: grid;
  grid-template-columns: minmax(160px, 0.95fr) minmax(150px, 1fr);
  gap: 10px;
  align-items: stretch;
}

.reviewer-preview-frame {
  display: grid;
  position: relative;
  place-items: center;
  aspect-ratio: 4 / 5;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8faf9;
}

.reviewer-preview-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: var(--portrait-x, 50%) var(--portrait-position-y, 20%);
  transform: scale(var(--portrait-scale, 1));
  transform-origin: var(--portrait-x, 50%) var(--portrait-y, 20%);
}

.reviewer-preview-fallback {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 16px;
  background: #111827;
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
}

.reviewer-options {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  max-height: 340px;
  gap: 7px;
  overflow: auto;
  padding-right: 2px;
}

.reviewer-option {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: #344054;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.reviewer-option.active {
  border-color: #84c7bc;
  background: #ecfaf7;
  color: #087467;
}

.reviewer-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 7px;
  background: #111827;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 850;
}

.reviewer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--portrait-x, 50%) var(--portrait-position-y, 24%);
  transform: scale(var(--portrait-scale, 1));
  transform-origin: var(--portrait-x, 50%) var(--portrait-y, 24%);
}

.reviewer-option.active .reviewer-avatar {
  background: #087467;
}

.reviewer-option-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reviewer-option-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reviewer-option-copy small {
  min-width: 0;
  overflow: hidden;
  color: #667085;
  font-size: 0.68rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reviewer-option.active .reviewer-option-copy small {
  color: #087467;
}

.reviewer-details {
  color: #475467;
  font-size: 0.78rem;
}

.reviewer-details summary {
  cursor: pointer;
  color: #087467;
  font-weight: 820;
}

.reviewer-details label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: #475467;
  font-size: 0.74rem;
  font-weight: 760;
}

.reviewer-details textarea,
.reviewer-details input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.reviewer-save-button {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
}

.primary-actions {
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 10px;
}

.primary-actions .primary-button,
.primary-actions .ghost-button {
  min-height: 42px;
}

.work-status {
  padding: 11px 12px;
  border-color: #cfe7e2;
  background: #f4fbf9;
}

.work-status.pass,
.work-status.fail {
  gap: 5px;
  padding: 8px 10px;
}

.work-status.pass .work-status-head,
.work-status.fail .work-status-head {
  gap: 8px;
}

.work-status.pass .work-status-detail,
.work-status.fail .work-status-detail {
  font-size: 0.72rem;
  line-height: 1.3;
}

.work-status.fail .work-progress-meta {
  font-size: 0.62rem;
}

.work-status.fail .work-progress {
  height: 4px;
}

.work-status.pass .work-progress-meta,
.work-status.pass .work-progress {
  display: none;
}

.metrics-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  padding: 13px 16px;
}

.metric span {
  color: #667085;
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0.03em;
}

.metric strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 1.14rem;
  font-weight: 850;
  text-align: left;
}

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

.storyboard-panel {
  order: 1;
}

.brief-panel {
  order: 2;
}

.preview-panel {
  display: none;
}

.brief-panel,
.storyboard-panel,
.inspector-card {
  padding: 18px;
}

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

.section-kicker {
  color: #667085;
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0.04em;
}

.section-head h2 {
  color: var(--ink);
  font-size: 1.03rem;
  font-weight: 820;
}

.storyboard-list {
  display: grid;
  gap: 0;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.storyboard-list .empty-state {
  border: 0;
  border-radius: 10px;
  background: var(--surface-soft);
}

.scene-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px 14px;
  padding: 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.scene-card:last-child {
  border-bottom: 0;
}

.scene-media-slot {
  grid-row: 1 / 5;
  display: grid;
  place-items: center;
  width: 112px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: #475467;
  font-size: 0.9rem;
  font-weight: 850;
}

.scene-media-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scene-card > label,
.scene-foot {
  grid-column: 2;
}

.scene-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.scene-index {
  margin-bottom: 5px;
  color: #667085;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.scene-title-input {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.96rem;
  font-weight: 850;
}

.scene-title-input:focus {
  box-shadow: none;
}

.scene-actions {
  gap: 8px;
}

.duration-input {
  grid-template-columns: 22px 56px;
}

.duration-input span,
.duration-input input,
.scene-actions button {
  min-height: 34px;
}

.scene-card textarea {
  min-height: 54px;
}

.scene-card label textarea,
.scene-foot input {
  background: var(--surface-soft);
}

.scene-foot {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.product-summary {
  padding: 14px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.product-summary-avatar {
  background: #111827;
}

.advanced-fields > summary {
  border-color: var(--line);
  background: #fff;
}

.inspector {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.inspector-card {
  gap: 10px;
}

.setting-row {
  min-height: 34px;
}

.qc-item,
.queue-item {
  border-color: var(--line);
  background: #fff;
}

.scene-image-empty {
  min-height: 68px;
  background: var(--surface-soft);
}

.render-output {
  border-color: #cfe7e2;
  background: #f4fbf9;
}

.policy-card {
  display: none;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    max-width: 1120px;
  }

  .inspector {
    grid-column: 2;
    position: static;
    max-height: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    max-width: 900px;
    padding: 14px;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .inspector {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 10px;
  }

  .topbar {
    align-items: start;
  }

  .quick-action .url-row,
  .quick-settings,
  .quick-steps,
  .metrics-row,
  .primary-actions,
  .scene-card,
  .scene-head,
  .scene-foot,
  .product-summary dl {
    grid-template-columns: 1fr;
  }

  .quick-steps {
    gap: 10px;
    padding: 16px;
  }

  .quick-steps div:not(:last-child)::after {
    display: none;
  }

  .quick-action {
    padding: 16px;
  }

  .quick-action .url-row button {
    width: 100%;
  }

  .scene-media-slot {
    grid-row: auto;
    width: 100%;
    max-width: 180px;
  }

  .scene-card > label,
  .scene-foot {
    grid-column: auto;
  }

  .scene-actions {
    justify-content: space-between;
  }

  .product-summary dl > div.wide {
    grid-column: auto;
  }
}

/* Simplified operator UI: keep the production path visible and hide internal details. */
.nav-item:not(.active),
.sidebar-section:nth-of-type(2),
.sidebar-section:first-of-type .project-list {
  display: none;
}

.sidebar-section:first-of-type {
  margin-top: auto;
}

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

.metrics-row .metric:nth-child(3) {
  display: none;
}

.inspector .inspector-card:first-child .setting-row,
.inspector .inspector-card:nth-of-type(2),
.inspector .inspector-card:nth-of-type(3),
.scene-advanced-field {
  display: none !important;
}

#runQcTopBtn,
#runQcBtn {
  display: none !important;
}

.qc-item small {
  display: none;
}

.qc-item p {
  margin-bottom: 0;
}

.scene-foot {
  grid-template-columns: 1fr;
}

@media (max-width: 980px) {
  .sidebar-section:first-of-type {
    margin-top: 0;
  }
}

@media (max-width: 720px) {
  .metrics-row {
    grid-template-columns: 1fr;
  }

  .reviewer-picker-body {
    grid-template-columns: 1fr;
  }

  .reviewer-preview-frame {
    min-height: 0;
  }

  .reviewer-preview-frame img {
    min-height: 0;
  }

  .reviewer-options {
    grid-template-columns: 1fr;
    max-height: 280px;
  }
}

/* UI polish layer: primary operator path first, internal details later. */
:root {
  --bg: #f6f7f8;
  --surface-soft: #f7f8fa;
  --line: #e5e7eb;
  --line-strong: #d0d5dd;
  --teal: #118a7a;
  --teal-dark: #0b6f63;
  --shadow: none;
  --radius: 10px;
}

body {
  background: var(--bg);
}

.app-shell {
  grid-template-columns: minmax(0, 1fr) 312px;
  width: min(100%, 1360px);
  margin: 0 auto;
  gap: 16px;
  padding: 18px;
}

.sidebar {
  display: none !important;
}

.workspace {
  display: grid;
  gap: 14px;
}

.topbar {
  min-height: 44px;
  margin-bottom: 0;
}

.eyebrow {
  display: none;
}

.topbar h1 {
  margin: 0;
  font-size: 1.42rem;
  font-weight: 840;
  letter-spacing: 0;
}

.topbar-actions {
  justify-content: end;
}

.status-pill {
  min-height: 32px;
  border-radius: 8px;
  background: #fff;
}

.quick-start {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
}

.quick-copy {
  display: none;
}

.quick-steps {
  order: 1;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.quick-steps div {
  min-height: 36px;
}

.quick-steps strong {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.quick-steps span {
  font-size: 0.82rem;
}

.quick-action {
  order: 2;
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
}

.quick-action > label,
.quick-settings label {
  color: #475467;
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: none;
}

.quick-action .url-row {
  grid-template-columns: minmax(0, 1fr) 112px 150px;
  gap: 10px;
}

.quick-action .url-row input,
.quick-action .url-row button,
.primary-button.large {
  min-height: 44px;
}

.quick-settings {
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 10px;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.68fr) minmax(420px, 1fr);
  gap: 14px;
  align-items: start;
}

.product-context {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.link-status {
  min-height: 44px;
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 0.8rem;
}

.imported-product-preview {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  min-height: 92px;
  padding: 10px;
  border-radius: 12px;
}

.imported-product-preview img,
.imported-product-missing {
  width: 72px;
  height: 72px;
  border-radius: 9px;
}

.reviewer-picker {
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
}

.reviewer-picker.is-empty {
  border-color: #d0d5dd;
  background: #fff;
}

.reviewer-picker.selection-error {
  border-color: #f97066;
  box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.12);
}

.reviewer-picker-head span {
  font-size: 0.76rem;
  letter-spacing: 0;
  text-transform: none;
}

.reviewer-picker-head strong {
  font-size: 0.98rem;
}

.reviewer-picker-body {
  grid-template-columns: minmax(220px, 0.95fr) minmax(170px, 0.75fr);
  gap: 12px;
}

.reviewer-preview-frame {
  border-radius: 12px;
}

.reviewer-select-empty {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 18px;
  color: #667085;
  text-align: center;
}

.reviewer-select-empty strong {
  color: #101828;
  font-size: 0.94rem;
  font-weight: 850;
}

.reviewer-select-empty span {
  max-width: 190px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.reviewer-options {
  max-height: 318px;
  gap: 8px;
}

.reviewer-option {
  min-height: 52px;
  border-radius: 9px;
  background: #fff;
}

.reviewer-option.active {
  border-color: rgba(17, 138, 122, 0.5);
  background: #eefaf7;
}

.primary-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 10px;
}

.primary-actions .primary-button,
.primary-actions .ghost-button {
  min-height: 44px;
  width: 100%;
}

.metrics-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.metric {
  min-height: 58px;
  padding: 12px 14px;
  border-radius: 12px;
}

.metric span {
  letter-spacing: 0;
  text-transform: none;
}

.metric strong {
  font-size: 1.06rem;
}

.brief-panel {
  display: none;
}

.studio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.storyboard-panel {
  order: 1;
  padding: 18px;
  border-radius: 12px;
}

.storyboard-list {
  border-radius: 12px;
}

.scene-card {
  grid-template-columns: 112px minmax(0, 1fr);
  padding: 16px;
}

.scene-card.has-scene-image {
  grid-template-columns: 142px minmax(0, 1fr);
}

.scene-media-slot {
  width: 112px;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  background: #f3f5f7;
}

.scene-media-slot.has-image {
  width: 142px;
  aspect-ratio: 9 / 16;
}

.scene-media-slot img {
  object-fit: cover;
  background: #f3f5f7;
}

.inspector {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.inspector-card {
  padding: 16px;
  border-radius: 12px;
}

.inspector .inspector-card:not(:first-child) {
  display: none !important;
}

.scene-image-grid {
  gap: 10px;
}

.render-output,
.scene-image-empty {
  border-radius: 10px;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
    max-width: 980px;
  }

  .inspector {
    grid-column: auto;
    position: static;
    max-height: none;
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 12px;
  }

  .topbar {
    align-items: start;
  }

  .topbar-actions {
    width: 100%;
    justify-content: start;
  }

  .quick-steps {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
  }

  .quick-steps div {
    min-height: 34px;
    padding: 0;
  }

  .quick-steps div:not(:last-child)::after {
    display: none;
  }

  .quick-action {
    padding: 14px;
  }

  .quick-action .url-row,
  .quick-settings,
  .setup-grid,
  .reviewer-picker-body,
  .primary-actions,
  .metrics-row,
  .scene-card,
  .scene-head,
  .scene-foot {
    grid-template-columns: 1fr;
  }

  .reviewer-options {
    max-height: 280px;
  }

  .storyboard-panel,
  .inspector-card {
    padding: 14px;
  }

  .scene-media-slot {
    grid-row: auto;
    width: 100%;
    max-width: 220px;
  }

  .scene-media-slot.has-image {
    width: 100%;
    max-width: 220px;
  }

  .scene-card > label,
  .scene-foot {
    grid-column: auto;
  }
}

.work-status.warn {
  color: #8a5d00;
  border-color: rgba(217, 144, 31, 0.36);
  background: var(--amber-soft);
}

.work-status.warn .work-spinner {
  border-color: #d9901f;
  background: #d9901f;
}

.work-status.warn .work-status-head span:last-child,
.work-status.warn .work-progress-meta strong {
  color: #8a5d00;
}

.work-status.warn .work-progress span {
  background: #d9901f;
}

.imported-product-preview {
  align-items: start;
}

.imported-product-preview.readiness-ready {
  border-color: rgba(33, 137, 90, 0.22);
  background: #f7fbfa;
}

.imported-product-preview.readiness-warn {
  border-color: rgba(217, 144, 31, 0.34);
  background: #fff9ec;
}

.imported-product-preview.readiness-blocked {
  border-color: rgba(207, 75, 63, 0.28);
  background: #fff5f3;
}

.imported-product-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.imported-product-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.imported-product-title-row strong {
  min-width: 0;
  flex: 1;
}

.readiness-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.readiness-chip.ready {
  color: var(--green);
  background: var(--green-soft);
}

.readiness-chip.warn {
  color: #8a5d00;
  background: rgba(217, 144, 31, 0.14);
}

.readiness-chip.blocked {
  color: var(--red);
  background: var(--red-soft);
}

.product-readiness-alert {
  display: grid;
  gap: 4px;
  margin-top: 7px;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.35;
}

.product-readiness-alert.warn {
  color: #7a5200;
  background: rgba(217, 144, 31, 0.13);
}

.product-readiness-alert.blocked {
  color: var(--red);
  background: rgba(207, 75, 63, 0.1);
}

.product-readiness-alert strong,
.product-readiness-alert span {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

/* Scene review workflow */
.scene-review-summary {
  color: #344054;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.render-queue-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #f8fafb;
}

.render-queue-inline[hidden] {
  display: none;
}

.render-queue-inline .queue-item {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}

.render-queue-inline .queue-item > span,
.render-queue-inline .queue-item > em {
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
}

.render-queue-inline .queue-item > em {
  justify-self: end;
  color: #667085;
}

.render-queue-inline .queue-item > strong,
.render-queue-inline .queue-item > small {
  grid-column: 1 / -1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.render-queue-inline .queue-item > strong {
  color: #101828;
  font-size: 0.78rem;
}

.render-queue-inline .queue-item > small {
  color: #667085;
  font-size: 0.68rem;
}

.render-queue-inline .queue-item.rendering {
  border-color: rgba(17, 138, 122, 0.44);
  background: #f0faf7;
}

.render-queue-inline .queue-item.rendering > em,
.render-queue-inline .queue-item.ready > em {
  color: #087f6f;
}

.render-queue-inline .queue-item.failed {
  border-color: rgba(207, 75, 63, 0.34);
  background: #fff5f3;
}

.render-queue-inline .queue-item.failed > em {
  color: #b42318;
}

.scene-media-slot {
  position: relative;
  overflow: hidden;
}

.scene-status-badge {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 7px;
  color: #344054;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
}

.scene-card.status-rendering {
  border-color: rgba(17, 138, 122, 0.48);
  box-shadow: inset 3px 0 0 #118a7a;
}

.scene-card.status-failed {
  border-color: rgba(207, 75, 63, 0.38);
  box-shadow: inset 3px 0 0 #cf4b3f;
}

.scene-card.is-locked {
  border-color: #cad5d1;
  background: #f8fbfa;
}

.scene-card.is-locked .scene-status-badge {
  color: #087f6f;
  background: #ecf8f5;
}

.scene-card input:disabled,
.scene-card textarea:disabled {
  color: #475467;
  opacity: 1;
  cursor: not-allowed;
}

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

.scene-actions button {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.scene-actions > .duration-input {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 48px !important;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  color: #475467 !important;
  background: #f9fafb;
  font-size: 0.76rem;
  font-weight: 800;
}

.scene-actions .scene-lock-button {
  color: #087f6f;
  border-color: #b7d8d1;
  background: #f3faf8;
}

.primary-actions {
  position: relative;
  z-index: 1;
  margin-top: 2px;
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
}

@media (max-width: 820px) {
  .render-queue-inline {
    grid-template-columns: 1fr;
  }

  .scene-review-summary {
    white-space: normal;
  }

  .scene-actions {
    justify-content: flex-start;
  }

  .scene-actions button {
    flex: 1 1 120px;
  }
}

.product-truth-sheet {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
}

.product-truth-sheet[hidden] {
  display: none;
}

.product-truth-sheet.needs-attention {
  border-color: #f97066;
  box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.1);
}

.product-truth-grid .truth-field-needs-attention {
  border-color: #e49a17;
  background: #fffbeb;
  box-shadow: 0 0 0 3px rgba(228, 154, 23, 0.12);
}

body[data-theme="dark"] .product-truth-grid .truth-field-needs-attention {
  border-color: #d6a139;
  background: rgba(228, 154, 23, 0.09);
  box-shadow: 0 0 0 3px rgba(228, 154, 23, 0.12);
}

.product-truth-sheet.is-confirmed {
  border-color: rgba(17, 138, 122, 0.38);
  background: #f7fbfa;
}

.product-truth-head,
.product-truth-head > div,
.truth-confirm-control {
  display: flex;
  align-items: center;
}

.product-truth-head {
  justify-content: space-between;
  gap: 12px;
}

.product-truth-head > div {
  gap: 8px;
}

.product-truth-head strong {
  color: #101828;
  font-size: 0.86rem;
}

.product-truth-head #productTruthStatus {
  color: #9a6700;
  font-size: 0.72rem;
  font-weight: 850;
}

.product-truth-head #productTruthStatus.confirmed {
  color: #087f6f;
}

.product-truth-evidence {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #d9e5e3;
  border-radius: 16px;
  background: #f8fbfa;
}

.product-truth-evidence-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.product-truth-evidence-head > div {
  display: grid;
  gap: 3px;
}

.product-truth-evidence-head strong {
  color: #172522;
  font-size: 0.98rem;
}

.product-truth-evidence-head small {
  color: #667570;
  font-size: 0.86rem;
  line-height: 1.45;
}

#productTruthEvidenceStatus {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf1f0;
  color: #55635f;
  font-size: 0.78rem;
  font-weight: 750;
}

#productTruthEvidenceStatus[data-tone="ai"] {
  background: #dcf5ef;
  color: #087461;
}

.product-truth-evidence-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.product-truth-fact {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e2e9e7;
  border-radius: 12px;
  background: #fff;
}

.product-truth-fact[data-safe="false"] {
  border-color: #eadfca;
  background: #fffaf1;
}

.product-truth-fact-value {
  display: block;
  color: #1b2926;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.45;
}

.product-truth-fact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 6px;
  color: #697773;
  font-size: 0.74rem;
  line-height: 1.35;
}

.product-truth-evidence-warnings {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  color: #785c26;
  font-size: 0.8rem;
}

.product-truth-evidence-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: #687670;
  font-size: 0.86rem;
}

@media (max-width: 720px) {
  .product-truth-evidence-head {
    align-items: stretch;
    flex-direction: column;
  }

  #productTruthEvidenceStatus {
    align-self: flex-start;
  }

  .product-truth-evidence-list {
    grid-template-columns: 1fr;
  }
}

.truth-confirm-control {
  gap: 7px;
  min-height: 34px;
  color: #344054;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.truth-confirm-control input {
  width: 16px;
  height: 16px;
  accent-color: #118a7a;
}

.product-truth-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.65fr 1fr 1.8fr;
  gap: 8px;
}

.product-truth-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #667085;
  font-size: 0.7rem;
  font-weight: 750;
}

.product-truth-grid input,
.product-truth-grid textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  color: #101828;
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.35;
  resize: vertical;
}

.scene-card.has-scene-video {
  grid-template-columns: 142px minmax(0, 1fr);
}

.scene-media-slot video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #101828;
}

.scene-card.status-video_ready {
  border-color: rgba(17, 138, 122, 0.4);
}

.render-job-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(217, 144, 31, 0.34);
  border-radius: 10px;
  color: #7a5200;
  background: #fff9ec;
  font-size: 0.76rem;
  font-weight: 750;
}

.render-job-notice[hidden],
.render-job-notice button[hidden] {
  display: none;
}

.render-job-notice button {
  flex: 0 0 auto;
  min-height: 34px;
}

.render-queue-inline .queue-item.interrupted {
  border-color: rgba(217, 144, 31, 0.34);
  background: #fff9ec;
}

@media (max-width: 820px) {
  .product-truth-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-truth-grid {
    grid-template-columns: 1fr;
  }

  .scene-card.has-scene-video {
    grid-template-columns: 1fr;
  }

  .render-job-notice {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Member access */
body.auth-loading .app-shell {
  visibility: hidden;
}

body.needs-auth {
  background: #f4f6f4;
}

body.needs-auth .app-shell {
  display: none;
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-gate[hidden] {
  display: none;
}

.auth-panel {
  display: grid;
  gap: 22px;
  width: min(100%, 420px);
  padding: 30px;
  border: 1px solid #dfe5e2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(28, 40, 36, 0.08);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-brand .brand-mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.auth-brand strong {
  color: #17201e;
  font-size: 0.98rem;
}

.auth-heading {
  display: grid;
  gap: 7px;
}

.auth-heading h1,
.auth-heading p {
  margin: 0;
}

.google-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  color: #101828;
  background: #fff;
  font-size: 0.84rem;
  font-weight: 780;
  text-decoration: none;
}

.google-login-button:hover {
  border-color: #98a2b3;
  background: #f9fafb;
}

.google-login-button span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #e4e7ec;
  border-radius: 50%;
  color: #4285f4;
  font-size: 0.76rem;
  font-weight: 850;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #667085;
  font-size: 0.7rem;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: #e4e7ec;
  content: "";
}

.auth-heading h1 {
  color: #101828;
  font-size: 1.55rem;
  line-height: 1.25;
}

.auth-heading p {
  color: #667085;
  font-size: 0.86rem;
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f6f8f7;
}

.auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: #667085;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 800;
}

.auth-tabs button.active {
  color: #101828;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form[hidden] {
  display: none;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 0.76rem;
  font-weight: 750;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  color: #101828;
  background: #fff;
  font-size: 0.88rem;
}

.auth-form input:focus {
  border-color: #118a7a;
  outline: 3px solid rgba(17, 138, 122, 0.12);
}

.auth-form .primary-button {
  width: 100%;
  min-height: 44px;
  margin-top: 2px;
}

.auth-message {
  min-height: 20px;
  color: #b42318;
  font-size: 0.76rem;
  line-height: 1.4;
}

.member-menu {
  display: grid;
  grid-template-columns: 32px minmax(0, auto) auto auto auto auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-left: 10px;
  border-left: 1px solid #e4e7ec;
}

.member-menu[hidden] {
  display: none;
}

.member-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #087f6f;
  background: #e5f5f1;
  font-size: 0.78rem;
  font-weight: 900;
}

.member-menu > div {
  display: grid;
  min-width: 0;
}

.member-menu strong,
.member-menu small {
  overflow: hidden;
  max-width: 130px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-menu strong {
  color: #101828;
  font-size: 0.76rem;
}

.member-menu small {
  color: #667085;
  font-size: 0.66rem;
}

.member-menu .text-button {
  min-height: 32px;
  padding: 0 8px;
  color: #667085;
  font-size: 0.7rem;
}

.member-menu .text-button[hidden] {
  display: none;
}

.wallet-balance-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #cbd8d4;
  border-radius: 7px;
  color: #087f6f;
  background: #f4fbf9;
  font-size: 0.72rem;
}

.wallet-balance-button span {
  font-size: 0.66rem;
}

.wallet-balance-button strong {
  max-width: none;
  color: inherit;
  font-size: 0.74rem;
}

.notification-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  color: #475467;
  background: #fff;
}

.notification-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.notification-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #d92d20;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 14px;
}

.notification-dialog {
  width: min(520px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 32px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(16, 24, 40, 0.28);
}

.notification-dialog::backdrop { background: rgba(16, 24, 40, 0.48); }
.notification-shell { display: grid; max-height: inherit; background: #fff; }
.notification-header,
.notification-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notification-header { padding: 22px 24px 16px; border-bottom: 1px solid #eaecf0; }
.notification-header h2 { margin: 2px 0 0; font-size: 1.25rem; }
.notification-toolbar { padding: 10px 20px; background: #f9fafb; }
.notification-toolbar p { margin: 0; color: #667085; font-size: 0.78rem; }
.notification-list { overflow: auto; display: grid; max-height: 520px; }
.notification-item { display: grid; grid-template-columns: 10px 1fr; gap: 10px; padding: 16px 20px; border-bottom: 1px solid #f2f4f7; color: inherit; text-decoration: none; }
.notification-item:hover { background: #f8fbfa; }
.notification-item.is-unread { background: #effaf7; }
.notification-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: transparent; }
.notification-item.is-unread .notification-dot { background: #0e9384; }
.notification-item > span:last-child { display: grid; gap: 4px; min-width: 0; }
.notification-item strong { color: #101828; font-size: 0.86rem; }
.notification-item small { color: #475467; font-size: 0.76rem; line-height: 1.5; }
.notification-item time { color: #98a2b3; font-size: 0.66rem; }
.notification-empty { padding: 44px 24px; color: #667085; text-align: center; }

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 0 2px;
  color: #667085;
  font-size: 0.76rem;
}

.admin-audit-table code { color: #087f6f; font-size: 0.72rem; }
.admin-audit-table summary { cursor: pointer; color: #087f6f; white-space: nowrap; }
.admin-audit-table pre {
  overflow: auto;
  max-width: 420px;
  max-height: 220px;
  padding: 10px;
  border-radius: 8px;
  background: #f2f4f7;
  font-size: 0.68rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.media-library-load-older { justify-self: center; margin: 4px auto 16px; }

html[data-theme="dark"] .notification-shell,
html[data-theme="dark"] .notification-button { color: #d0d5dd; background: #182230; }
html[data-theme="dark"] .notification-header,
html[data-theme="dark"] .notification-item { border-color: #344054; }
html[data-theme="dark"] .notification-toolbar { background: #101828; }
html[data-theme="dark"] .notification-item.is-unread { background: #13352f; }
html[data-theme="dark"] .notification-item strong { color: #f9fafb; }
html[data-theme="dark"] .notification-item small { color: #d0d5dd; }

.generation-cost-hint {
  min-height: 18px;
  color: #667085;
  font-size: 0.7rem;
  text-align: right;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.workspace[hidden],
.inspector[hidden],
.admin-view[hidden] {
  display: none !important;
}

.app-shell.admin-mode {
  grid-template-columns: minmax(0, 1fr);
}

.admin-view {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.admin-header,
.admin-heading,
.admin-toolbar,
.admin-filters,
.admin-dialog-head,
.admin-dialog-actions {
  display: flex;
  align-items: center;
}

.admin-header {
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
}

.admin-heading {
  gap: 12px;
  min-width: 0;
}

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

.admin-heading h1,
.admin-toolbar h2,
.admin-dialog-head h2 {
  margin: 0;
  color: #101828;
  letter-spacing: 0;
}

.admin-heading h1 {
  font-size: 1.38rem;
}

.admin-heading p,
.admin-dialog-head p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 0.76rem;
}

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

.admin-metric {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 14px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}

.admin-metric span {
  color: #667085;
  font-size: 0.72rem;
  font-weight: 750;
}

.admin-metric strong {
  color: #101828;
  font-size: 1.28rem;
}

.admin-members {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}

.admin-diamonds {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}

.admin-topup-filter select {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  color: #101828;
  background: #fff;
  font-size: 0.78rem;
}

.admin-diamond-config {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 0;
  border-bottom: 1px solid #e4e7ec;
}

.admin-diamond-config > section {
  min-width: 0;
  padding: 16px;
}

.admin-diamond-config > section + section {
  border-left: 1px solid #e4e7ec;
}

.admin-diamond-config h3 {
  margin: 0 0 12px;
  color: #101828;
  font-size: 0.84rem;
}

.admin-cost-list,
.admin-package-list {
  display: grid;
  gap: 8px;
}

.admin-cost-row,
.admin-package-row {
  display: grid;
  align-items: center;
  gap: 8px;
}

.admin-cost-row {
  grid-template-columns: minmax(0, 1fr) 86px auto 72px;
}

.admin-package-row {
  grid-template-columns: minmax(100px, 1fr) 82px 82px auto 72px;
}

.admin-cost-row label,
.admin-package-row label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #667085;
  font-size: 0.66rem;
  font-weight: 750;
}

.admin-cost-row input[type="number"],
.admin-package-row input[type="text"],
.admin-package-row input[type="number"] {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  color: #101828;
  background: #fff;
  font-size: 0.74rem;
}

.admin-enabled-control {
  display: inline-flex !important;
  grid-auto-flow: column;
  align-items: center;
  justify-content: start;
  gap: 5px !important;
  color: #475467 !important;
  white-space: nowrap;
}

.admin-enabled-control input {
  accent-color: #118a7a;
}

.admin-cost-row button,
.admin-package-row button {
  min-height: 34px;
  padding: 0 9px;
  font-size: 0.68rem;
}

.admin-topup-table {
  min-width: 760px;
}

.admin-topup-actions {
  display: flex;
  gap: 6px;
}

.admin-topup-actions button {
  min-height: 32px;
  padding: 0 9px;
  font-size: 0.68rem;
  white-space: nowrap;
}

.admin-topup-actions .reject {
  color: #b42318;
}

.wallet-dialog {
  width: min(100% - 32px, 560px);
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(16, 24, 40, 0.18);
}

.wallet-dialog::backdrop {
  background: rgba(16, 24, 40, 0.38);
}

.wallet-shell {
  display: grid;
  gap: 14px;
  max-height: inherit;
  padding: 20px;
  overflow-y: auto;
}

.wallet-header,
.wallet-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wallet-header h2,
.wallet-section-head h3 {
  margin: 0;
  color: #101828;
}

.wallet-header h2 {
  font-size: 1.08rem;
}

.wallet-section-head h3 {
  font-size: 0.82rem;
}

.wallet-balance-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid #cfe1dc;
  border-radius: 8px;
  color: #475467;
  background: #f4fbf9;
  font-size: 0.76rem;
  font-weight: 750;
}

.wallet-balance-panel strong {
  color: #087f6f;
  font-size: 1.5rem;
}

.wallet-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f6f8f7;
}

.wallet-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: #667085;
  background: transparent;
  font-size: 0.76rem;
  font-weight: 800;
}

.wallet-tabs button.active {
  color: #101828;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}

.wallet-panel {
  display: grid;
  gap: 12px;
}

.wallet-panel[hidden] {
  display: none;
}

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

.wallet-cost-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  color: #475467;
  font-size: 0.7rem;
}

.wallet-cost-item strong {
  color: #087f6f;
  white-space: nowrap;
}

.wallet-transaction-list,
.wallet-topup-request-list {
  display: grid;
  border-top: 1px solid #eef0f2;
}

.wallet-transaction,
.wallet-topup-request {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef0f2;
}

.wallet-transaction strong,
.wallet-topup-request strong {
  color: #101828;
  font-size: 0.74rem;
}

.wallet-transaction span,
.wallet-topup-request span,
.wallet-transaction time,
.wallet-topup-request time {
  color: #667085;
  font-size: 0.68rem;
}

.wallet-transaction .amount,
.wallet-topup-request .status {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  font-size: 0.76rem;
  font-weight: 850;
}

.wallet-transaction .amount.positive,
.wallet-topup-request .status.approved {
  color: #087f6f;
}

.wallet-transaction .amount.negative,
.wallet-topup-request .status.rejected {
  color: #b42318;
}

.wallet-topup-request .status.pending {
  color: #9a6700;
}

.wallet-payment-instructions {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #d9901f;
  color: #7a5200;
  background: #fff9ec;
  font-size: 0.72rem;
  line-height: 1.5;
}

.wallet-topup-form {
  display: grid;
  gap: 12px;
}

.wallet-package-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.wallet-package-option {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 88px;
  padding: 12px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  color: #475467;
  background: #fff;
  cursor: pointer;
}

.wallet-package-option:has(input:checked) {
  border-color: #118a7a;
  background: #f1faf7;
  box-shadow: 0 0 0 2px rgba(17, 138, 122, 0.1);
}

.wallet-package-option input {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: #118a7a;
}

.wallet-package-option strong {
  color: #101828;
  font-size: 0.78rem;
}

.wallet-package-option span {
  color: #087f6f;
  font-size: 1rem;
  font-weight: 900;
}

.wallet-package-option small {
  color: #667085;
  font-size: 0.68rem;
}

.wallet-topup-form > label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 0.72rem;
  font-weight: 750;
}

.wallet-topup-form > label[hidden] {
  display: none;
}

.wallet-topup-form > label input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
}

.wallet-topup-form .primary-button {
  min-height: 42px;
}

.wallet-message,
.wallet-empty {
  min-height: 18px;
  color: #667085;
  font-size: 0.72rem;
}

.wallet-message.error {
  color: #b42318;
}

.wallet-empty {
  padding: 18px 0;
  text-align: center;
}

.admin-toolbar {
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 14px 16px;
  border-bottom: 1px solid #e4e7ec;
}

.admin-toolbar h2 {
  font-size: 1rem;
}

.admin-toolbar > div > span {
  display: block;
  margin-top: 3px;
  color: #667085;
  font-size: 0.72rem;
}

.admin-filters {
  gap: 8px;
}

.admin-filters input,
.admin-filters select,
.admin-form-grid input,
.admin-form-grid select {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  color: #101828;
  background: #fff;
  font-size: 0.78rem;
}

.admin-filters input {
  width: 240px;
}

.admin-filters select {
  width: 130px;
}

.admin-filters input:focus,
.admin-filters select:focus,
.admin-form-grid input:focus,
.admin-form-grid select:focus {
  border-color: #118a7a;
  outline: 3px solid rgba(17, 138, 122, 0.12);
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  color: #344054;
  font-size: 0.76rem;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef0f2;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  position: relative;
  color: #667085;
  background: #f8faf9;
  font-size: 0.68rem;
  font-weight: 800;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-member-cell {
  display: grid;
  gap: 2px;
  max-width: 260px;
}

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

.admin-member-cell strong {
  color: #101828;
  font-size: 0.78rem;
}

.admin-member-cell span {
  color: #667085;
  font-size: 0.7rem;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 7px;
  border-radius: 6px;
  color: #475467;
  background: #f2f4f7;
  font-size: 0.66rem;
  font-weight: 850;
  white-space: nowrap;
}

.admin-badge.admin,
.admin-badge.active {
  color: #087f6f;
  background: #e9f7f3;
}

.admin-badge.suspended {
  color: #b42318;
  background: #fff0ee;
}

.admin-edit-button {
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

.admin-empty,
.admin-status {
  color: #667085;
  font-size: 0.74rem;
}

.admin-empty {
  padding: 34px 16px;
  text-align: center;
}

.admin-status {
  min-height: 18px;
  padding: 0 16px 12px;
}

.admin-status.error {
  color: #b42318;
}

.admin-dialog {
  width: min(100% - 32px, 500px);
  padding: 0;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(16, 24, 40, 0.18);
}

.admin-dialog::backdrop {
  background: rgba(16, 24, 40, 0.38);
}

.admin-member-form {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.admin-dialog-head {
  justify-content: space-between;
  gap: 16px;
}

.admin-dialog-head h2 {
  font-size: 1.08rem;
}

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

.admin-form-grid label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 0.72rem;
  font-weight: 760;
}

.admin-form-grid .wide {
  grid-column: 1 / -1;
}

.admin-form-grid input,
.admin-form-grid select {
  width: 100%;
}

.admin-form-grid select:disabled {
  color: #98a2b3;
  background: #f2f4f7;
}

.admin-dialog-actions {
  justify-content: flex-end;
  gap: 8px;
}

.admin-dialog-actions button {
  min-height: 40px;
  min-width: 92px;
}

@media (max-width: 820px) {
  .auth-gate {
    align-items: start;
    padding: 16px;
  }

  .auth-panel {
    margin-top: 24px;
    padding: 22px;
  }

  .member-menu {
    width: 100%;
    grid-template-columns: 32px minmax(0, 1fr) auto auto auto;
    padding: 10px 0 0;
    border-top: 1px solid #e4e7ec;
    border-left: 0;
  }

  .member-menu strong,
  .member-menu small {
    max-width: none;
  }

  .admin-header,
  .admin-toolbar {
    align-items: flex-start;
  }

  .admin-toolbar {
    flex-direction: column;
  }

  .admin-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .admin-filters {
    width: 100%;
  }

  .admin-filters label:first-child {
    flex: 1;
  }

  .admin-filters input {
    width: 100%;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-form-grid .wide {
    grid-column: auto;
  }

  .admin-diamond-config {
    grid-template-columns: 1fr;
  }

  .admin-diamond-config > section + section {
    border-top: 1px solid #e4e7ec;
    border-left: 0;
  }

  .admin-package-row {
    grid-template-columns: minmax(100px, 1fr) 78px 78px auto 68px;
  }
}

@media (max-width: 520px) {
  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .admin-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-filters select {
    width: 100%;
  }

  .member-menu {
    grid-template-columns: 32px minmax(0, 1fr) auto auto;
  }

  .member-menu #adminBtn {
    grid-column: 3;
  }

  .member-menu #logoutBtn {
    grid-column: 4;
  }

  .wallet-balance-button {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .admin-cost-row,
  .admin-package-row {
    grid-template-columns: 1fr 1fr;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef0f2;
  }

  .admin-cost-row > span,
  .admin-package-row label:first-child {
    grid-column: 1 / -1;
  }

  .wallet-package-list,
  .wallet-cost-list {
    grid-template-columns: 1fr;
  }
}

/* One-click workflow */
.quick-action .url-row {
  grid-template-columns: minmax(240px, 1fr) auto minmax(190px, auto);
}

#autoReviewBtn {
  padding-inline: 18px;
  white-space: nowrap;
}

.advanced-workflow {
  border-top: 1px solid #eaecf0;
  padding-top: 7px;
}

.advanced-workflow > summary {
  width: max-content;
  color: #667085;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 720;
  list-style-position: outside;
}

.advanced-workflow[open] > summary {
  color: #344054;
}

.advanced-workflow .primary-actions {
  margin-top: 9px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.generation-cost-hint {
  min-height: 18px;
  color: #667085;
  font-size: 0.75rem;
}

.quick-settings {
  grid-template-columns: minmax(170px, 0.46fr) minmax(145px, 0.34fr) minmax(220px, 1fr);
}

.quick-settings .openrouter-video-model-field {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid #d8e5e1;
  border-radius: 8px;
  background: #f8fbfa;
}

.openrouter-video-model-field[hidden] {
  display: none;
}

.openrouter-video-model-hint {
  color: #667085;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.45;
  text-transform: none;
}

.flow-extension-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e5e1;
  border-radius: 8px;
  background: #f8fbfa;
}

.flow-extension-panel[hidden],
.flow-extension-lock[hidden],
.cloud-flow-notice[hidden],
.flow-pairing-output[hidden] {
  display: none;
}

.flow-extension-lock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  background: #fff;
}

.flow-extension-lock > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.flow-extension-lock strong {
  color: #344054;
  font-size: 0.78rem;
}

.flow-extension-lock span {
  color: #667085;
  font-size: 0.7rem;
  line-height: 1.45;
}

.cloud-flow-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #b7ded4;
  border-radius: 9px;
  background: #eefaf6;
}

.cloud-flow-notice > div {
  display: grid;
  gap: 3px;
}

.cloud-flow-notice strong {
  color: #086d60;
  font-size: 0.84rem;
}

.cloud-flow-notice span {
  color: #526b66;
  font-size: 0.74rem;
  line-height: 1.45;
}

.cloud-flow-notice .cloud-flow-experimental {
  flex: none;
  padding: 5px 8px;
  border-radius: 999px;
  background: #d8f3eb;
  color: #087f6f;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.flow-extension-panel.is-cloud-flow .flow-extension-lock,
.flow-extension-panel.is-cloud-flow .flow-extension-head,
.flow-extension-panel.is-cloud-flow .flow-extension-actions,
.flow-extension-panel.is-cloud-flow .flow-pairing-output,
.flow-extension-panel.is-cloud-flow .flow-extension-help {
  display: none;
}

.google-connect-link {
  flex: none;
  color: #087f6f;
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
}

.flow-extension-panel.is-locked .flow-extension-head,
.flow-extension-panel.is-locked .flow-extension-actions {
  opacity: 0.48;
}

.flow-extension-actions a[aria-disabled="true"] {
  cursor: not-allowed;
  pointer-events: none;
}

.flow-extension-head,
.flow-extension-actions,
.flow-token-row {
  display: flex;
  align-items: center;
}

.flow-extension-head {
  justify-content: space-between;
  gap: 16px;
}

.flow-extension-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.flow-extension-head > .flow-model-controls {
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 10px;
}

.flow-extension-head strong {
  color: #101828;
  font-size: 0.85rem;
}

.flow-extension-head span {
  color: #667085;
  font-size: 0.72rem;
  font-weight: 720;
}

.flow-extension-head span[data-tone="ready"] {
  color: #087f6f;
}

.flow-extension-head span[data-tone="error"] {
  color: #b42318;
}

.flow-extension-head span[data-tone="locked"] {
  color: #667085;
}

.flow-extension-head label,
.flow-pairing-output label {
  display: grid;
  gap: 5px;
  color: #667085;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.flow-extension-head select {
  width: 190px;
  min-height: 36px;
}

.flow-extension-actions {
  gap: 8px;
}

.flow-extension-actions button,
.flow-extension-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}

.flow-extension-actions [hidden] {
  display: none;
}

.flow-pairing-output {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
}

.flow-pairing-output input {
  min-height: 36px;
  background: #fff;
}

.flow-manual-pairing-help {
  grid-column: 1 / -1;
  margin: 0;
  color: #667085;
  font-size: 0.7rem;
  line-height: 1.55;
}

.flow-token-row {
  gap: 6px;
}

.flow-token-row input {
  flex: 1;
}

.flow-token-row button {
  min-height: 36px;
  white-space: nowrap;
}

.flow-extension-help {
  margin: 0;
  color: #667085;
  font-size: 0.7rem;
  line-height: 1.5;
}

.flow-extension-help code {
  color: #344054;
  font-size: 0.68rem;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .quick-action .url-row {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  }

  .quick-action .url-row input {
    grid-column: 1 / -1;
  }

  #autoReviewBtn {
    padding-inline: 10px;
  }

  .quick-settings,
  .flow-pairing-output {
    grid-template-columns: 1fr;
  }

  .flow-extension-head {
    align-items: stretch;
    flex-direction: column;
  }

  .flow-extension-lock {
    align-items: flex-start;
    flex-direction: column;
  }

  .flow-extension-head select {
    width: 100%;
  }

  .flow-extension-head > .flow-model-controls {
    grid-template-columns: 1fr;
  }
}

/* Account workspace, compact generation choices, and admin feature gates. */
.nav-item[hidden],
.video-style-card[hidden],
.creation-path-card[hidden],
.compact-choice-group[hidden],
.scene-count-choice button[hidden],
.account-connection-card[hidden],
#createMethodTrigger[hidden],
#videoStyleControl[hidden],
#videoStyleEmpty[hidden] {
  display: none !important;
}

.settings-view {
  width: min(100%, 940px);
  gap: 16px;
}

.account-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #bfe3da;
  border-radius: 999px;
  color: #087467;
  background: #f1fbf8;
  font-size: 0.76rem;
  font-weight: 820;
}

.account-status-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #19a886;
  content: "";
}

.account-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid #dce5ec;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff 0%, #f3fbf9 100%);
  box-shadow: 0 8px 26px rgba(16, 24, 40, 0.045);
}

.account-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  color: #087467;
  background: #dff5ef;
  font-size: 1.2rem;
  font-weight: 900;
}

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

.account-hero-copy h3,
.account-hero-copy p {
  margin: 0;
}

.account-hero-copy h3 {
  color: #17233a;
  font-size: 1.08rem;
  font-weight: 860;
}

.account-hero-copy p {
  margin-top: 3px;
  overflow: hidden;
  color: #667085;
  font-size: 0.82rem;
  text-overflow: ellipsis;
}

.account-plan-summary {
  display: flex;
  align-items: center;
  gap: 9px;
}

.account-plan-summary > span,
.account-plan-summary > strong {
  padding: 7px 10px;
  border: 1px solid #d7e1e9;
  border-radius: 9px;
  background: #fff;
  color: #344054;
  font-size: 0.78rem;
  font-weight: 820;
}

.account-plan-summary > strong {
  color: #087467;
}

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

.account-detail-card,
.account-connection-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #dce5ec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(16, 24, 40, 0.04);
}

.account-detail-card > header h3,
.account-detail-card > header p,
.account-connection-head h3,
.account-connection-head p {
  margin: 0;
}

.account-detail-card > header h3,
.account-connection-head h3 {
  color: #17233a;
  font-size: 0.96rem;
  font-weight: 850;
}

.account-detail-card > header p,
.account-connection-head p {
  margin-top: 4px;
  color: #667085;
  font-size: 0.76rem;
  line-height: 1.5;
}

.account-detail-list {
  display: grid;
  margin: 16px 0 0;
}

.account-detail-list > div {
  display: grid;
  grid-template-columns: minmax(105px, 0.75fr) minmax(0, 1.25fr);
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid #edf1f4;
}

.account-detail-list dt,
.account-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.79rem;
}

.account-detail-list dt {
  color: #7a8798;
  font-weight: 680;
}

.account-detail-list dd {
  color: #25344a;
  font-weight: 800;
}

.account-ready {
  color: #087467 !important;
}

.account-card-action {
  width: 100%;
  margin-top: 12px;
}

.account-connection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.account-connection-card .flow-extension-head,
.account-connection-card .flow-extension-actions {
  padding-inline: 0;
}

.compact-choice-field {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.compact-choice-field > span {
  color: #475467;
  font-size: 0.77rem;
  font-weight: 800;
}

.compact-choice-field > small {
  color: #738096;
  font-size: 0.72rem;
  font-weight: 650;
}

.compact-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.compact-choice-group button {
  min-height: 34px;
  max-width: 100%;
  padding: 7px 11px;
  overflow: hidden;
  border: 1px solid #ccd6e0;
  border-radius: 9px;
  color: #455468;
  background: #fff;
  font: inherit;
  font-size: 0.73rem;
  font-weight: 760;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.compact-choice-group button:hover {
  border-color: #8fc6bd;
  color: #087467;
}

.compact-choice-group button.active {
  border-color: #159487;
  color: #087467;
  background: #edf9f6;
  box-shadow: 0 0 0 2px rgba(21, 148, 135, 0.1);
}

.compact-choice-group button:focus-visible {
  outline: 3px solid rgba(21, 148, 135, 0.18);
  outline-offset: 2px;
}

.compact-choice-group button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.create-model-controls .quick-model-controls:has(#quickResolutionField:not([hidden])) {
  grid-template-columns: repeat(4, minmax(145px, 1fr));
}

.duration-choice-group button,
.resolution-choice-group button {
  display: inline-flex;
  min-width: 0;
  flex: 1 1 72px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  white-space: nowrap;
}

.duration-choice-group button strong,
.duration-choice-group button small,
.resolution-choice-group button strong,
.resolution-choice-group button small {
  display: block;
}

.duration-choice-group button strong,
.resolution-choice-group button strong {
  color: inherit;
  font-size: 0.76rem;
}

.duration-choice-group button small,
.resolution-choice-group button small {
  color: #738096;
  font-size: 0.64rem;
  font-weight: 650;
}

.duration-choice-group button:disabled small,
.resolution-choice-group button:disabled small {
  color: inherit;
}

html[data-theme="dark"] .duration-choice-group button small,
html[data-theme="dark"] .resolution-choice-group button small {
  color: #b8c5d5;
}

.scene-count-choice button {
  display: inline-flex;
  min-width: 64px;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.scene-count-choice button strong {
  font-size: 0.9rem;
}

.scene-count-choice button small {
  font-size: 0.66rem;
}

.admin-member-features {
  margin-top: 0;
}

.admin-feature-groups {
  display: grid;
  gap: 0;
  padding: 0 22px 10px;
}

.admin-feature-group {
  padding: 18px 0;
  border-top: 1px solid #e5ebf0;
}

.admin-feature-group > header strong,
.admin-feature-group > header span,
.admin-feature-row > div {
  display: block;
}

.admin-feature-group > header strong {
  color: #17273c;
  font-size: 0.96rem;
}

.admin-feature-group > header span {
  margin-top: 3px;
  color: #6c7a8d;
  font-size: 0.8rem;
}

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

.admin-feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid #dde5ec;
  border-radius: 11px;
  background: #f9fbfc;
}

.admin-feature-row > div strong,
.admin-feature-row > div span {
  display: block;
}

.admin-feature-row > div strong {
  color: #25364c;
  font-size: 0.84rem;
}

.admin-feature-row > div span {
  margin-top: 3px;
  color: #6b7a8e;
  font-size: 0.73rem;
  line-height: 1.4;
}

.admin-feature-row .admin-method-toggle > span:first-child {
  min-width: 30px;
  font-size: 0.74rem;
  text-align: right;
}

@media (max-width: 800px) {
  .account-details-grid,
  .admin-feature-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .account-plan-summary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .account-hero,
  .account-detail-card,
  .account-connection-card {
    padding: 16px;
    border-radius: 13px;
  }

  .account-hero {
    align-items: start;
  }

  .account-plan-summary {
    flex-wrap: wrap;
  }

  .account-detail-list > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .account-connection-head,
  .account-connection-card .flow-extension-head,
  .account-connection-card .flow-extension-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-connection-card .flow-extension-actions > * {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .compact-choice-group button {
    flex: 1 1 112px;
  }

  .scene-count-choice button {
    flex-basis: 68px;
  }
}

/* Admin workspace repair and My Work primary tabs */
.admin-view {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 22px 24px 34px;
  gap: 18px;
}

.admin-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 68px;
  padding: 10px 0;
  background: rgba(244, 247, 251, 0.94);
  backdrop-filter: blur(12px);
}

.admin-heading {
  gap: 14px;
}

.admin-heading h1 {
  font-size: 1.55rem;
  font-weight: 880;
  letter-spacing: -0.025em;
}

.admin-heading p {
  font-size: 0.8rem;
}

.admin-back-button,
.admin-refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.76rem;
  white-space: nowrap !important;
}

.admin-back-button span,
.admin-refresh-button span {
  font-size: 1rem;
  line-height: 1;
}

.admin-metrics {
  gap: 12px;
}

.admin-metric {
  min-height: 86px;
  padding: 16px;
  border-color: var(--sq-border);
  border-radius: 11px;
  box-shadow: 0 3px 14px rgba(16, 24, 40, 0.035);
}

.admin-metric span {
  font-size: 0.76rem;
}

.admin-metric strong {
  font-size: 1.48rem;
  font-variant-numeric: tabular-nums;
}

.admin-members,
.admin-diamonds {
  border-color: var(--sq-border);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(16, 24, 40, 0.035);
}

.admin-toolbar {
  min-height: 74px;
  padding: 16px 18px;
}

.admin-toolbar h2 {
  font-size: 1.06rem;
}

.admin-toolbar > div > span,
.admin-status,
.admin-empty {
  font-size: 0.76rem;
}

.admin-filters input,
.admin-filters select,
.admin-topup-filter select {
  min-height: 40px;
  font-size: 0.8rem;
}

.admin-diamond-config {
  grid-template-columns: minmax(300px, 0.7fr) minmax(620px, 1.3fr);
}

.admin-diamond-config > section {
  padding: 18px;
}

.admin-diamond-config h3 {
  font-size: 0.9rem;
}

.admin-cost-row,
.admin-package-row {
  gap: 10px;
}

.admin-cost-row label,
.admin-package-row label {
  font-size: 0.7rem;
}

.admin-cost-row input[type="number"],
.admin-package-row input[type="text"],
.admin-package-row input[type="number"] {
  min-height: 40px;
  font-size: 0.78rem;
}

.admin-cost-row button,
.admin-package-row button {
  min-height: 38px;
  font-size: 0.72rem;
}

.admin-table {
  font-size: 0.79rem;
}

.admin-table th,
.admin-table td {
  padding: 13px 16px;
}

.admin-table th {
  font-size: 0.71rem;
}

.admin-member-cell strong {
  font-size: 0.81rem;
}

.admin-member-cell span {
  font-size: 0.72rem;
}

.jobs-library-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 520px);
  padding: 4px;
  border: 1px solid var(--sq-border);
  border-radius: 11px;
  background: #e9eff5;
}

.jobs-library-tab {
  min-height: 42px;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  color: #617087;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 820;
  cursor: pointer;
}

.jobs-library-tab:hover {
  color: #344054;
}

.jobs-library-tab.active {
  color: var(--sq-teal-dark);
  background: #fff;
  box-shadow: 0 2px 7px rgba(16, 24, 40, 0.1);
}

.jobs-library-panel[hidden] {
  display: none !important;
}

@media (max-width: 1200px) {
  .admin-diamond-config {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-diamond-config > section + section {
    border-top: 1px solid #e4e7ec;
    border-left: 0;
  }
}

@media (max-width: 900px) {
  .app-shell.admin-mode {
    padding-top: 0;
  }

  .admin-view {
    padding: 14px 14px 26px;
  }

  .admin-header {
    min-height: 62px;
    padding-top: 4px;
  }
}

@media (max-width: 520px) {
  .admin-view {
    gap: 12px;
    padding: 10px 10px 22px;
  }

  .admin-header {
    align-items: flex-start;
    gap: 10px;
  }

  .admin-heading {
    align-items: flex-start;
    flex: 1;
    gap: 9px;
  }

  .admin-heading h1 {
    font-size: 1.22rem;
  }

  .admin-heading p,
  .admin-heading .section-kicker {
    display: none;
  }

  .admin-back-button,
  .admin-refresh-button {
    flex: none;
    width: auto;
    min-height: 38px;
    padding-inline: 10px;
  }

  .admin-back-button {
    font-size: 0;
  }

  .admin-back-button span {
    font-size: 1rem;
  }

  .admin-refresh-button {
    padding-inline: 10px;
    font-size: 0.7rem;
  }

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

  .admin-metric {
    min-height: 74px;
    padding: 12px;
  }

  .admin-metric strong {
    font-size: 1.25rem;
  }

  .admin-toolbar,
  .admin-diamond-config > section {
    padding: 14px;
  }

  .jobs-library-tabs {
    width: 100%;
  }

  .jobs-library-tab {
    min-height: 40px;
    padding-inline: 10px;
    font-size: 0.73rem;
  }
}

/* 2026 workflow clarity: one primary creation action, progressive review, and active jobs. */
.quick-action .url-row {
  grid-template-columns: minmax(0, 1fr) 132px minmax(210px, 238px);
  align-items: stretch;
}

.import-product-button {
  min-height: 48px;
  padding-inline: 12px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  color: #087467;
  background: #fff;
  font-size: 0.76rem;
  font-weight: 820;
}

.import-product-button:hover:not(:disabled) {
  border-color: #8fc7bc;
  background: #f4fbf9;
}

.primary-create-action {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.primary-create-action .primary-button {
  width: 100%;
  min-height: 48px;
  padding-inline: 16px;
  white-space: nowrap;
}

.primary-create-action > span {
  color: #667085;
  font-size: 0.62rem;
  font-weight: 680;
  line-height: 1.35;
  text-align: center;
}

.manual-review-create-button {
  min-width: 200px;
  min-height: 40px;
  border-color: #9bcfc5;
  color: #087467;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 820;
}

.manual-review-create-button:hover:not(:disabled) {
  border-color: #118a7a;
  background: #edf9f6;
}

.product-truth-sheet {
  display: block;
  padding: 0;
  overflow: hidden;
}

.product-truth-summary,
.create-review-summary > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 11px 13px;
  cursor: pointer;
  list-style: none;
}

.product-truth-summary::-webkit-details-marker,
.create-review-summary > summary::-webkit-details-marker {
  display: none;
}

.product-truth-summary > span:first-child,
.create-review-summary > summary > span:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.product-truth-summary strong,
.create-review-summary > summary strong {
  color: #17233a;
  font-size: 0.8rem;
  font-weight: 840;
}

.product-truth-summary small,
.create-review-summary > summary small {
  color: #667085;
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.4;
}

.product-truth-summary::after,
.create-review-summary > summary::after {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-left: 2px;
  border-right: 2px solid #667085;
  border-bottom: 2px solid #667085;
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.product-truth-sheet[open] > .product-truth-summary::after,
.create-review-summary[open] > summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.product-truth-summary #productTruthStatus {
  order: 2;
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #9a6700;
  background: #fff4d8;
  font-size: 0.64rem;
  font-weight: 850;
}

.product-truth-summary #productTruthStatus.confirmed {
  color: #087467;
  background: #e6f7f3;
}

.product-truth-body {
  display: grid;
  gap: 10px;
  padding: 0 13px 13px;
  border-top: 1px solid #e4e7ec;
}

.product-truth-body .product-truth-head {
  padding-top: 10px;
}

.product-truth-body .product-truth-head > span {
  color: #667085;
  font-size: 0.7rem;
  line-height: 1.45;
}

.create-review-summary {
  overflow: hidden;
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  background: #fbfcfe;
}

.create-review-summary > summary > span:last-of-type {
  order: 2;
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #667085;
  background: #edf1f5;
  font-size: 0.64rem;
  font-weight: 830;
}

.create-review-summary > summary > span[data-tone="ready"] {
  color: #087467;
  background: #e6f7f3;
}

.create-review-summary > summary > span[data-tone="warn"] {
  color: #9a6700;
  background: #fff4d8;
}

.create-review-summary > summary > span[data-tone="error"] {
  color: #b42318;
  background: #fff0ee;
}

.create-review-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 13px 8px;
  border-top: 1px solid #e4e7ec;
}

.create-review-summary-grid > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}

.create-review-summary-grid span {
  color: #667085;
  font-size: 0.63rem;
  font-weight: 720;
}

.create-review-summary-grid strong {
  color: #25324a;
  font-size: 0.72rem;
  line-height: 1.4;
}

.create-qc-issue-list {
  display: grid;
  gap: 7px;
  padding: 0 13px 13px;
}

.create-qc-issue-list > p {
  margin: 0;
  color: #667085;
  font-size: 0.7rem;
  line-height: 1.5;
}

.create-qc-issue {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-left: 3px solid #f0b04f;
  border-radius: 7px;
  background: #fff9ec;
}

.create-qc-issue[data-tone="fail"] {
  border-left-color: #f97066;
  background: #fff5f4;
}

.create-qc-issue strong {
  color: #344054;
  font-size: 0.7rem;
}

.create-qc-issue span {
  color: #667085;
  font-size: 0.66rem;
  line-height: 1.4;
}

.active-job-center,
.media-library-section {
  display: grid;
  min-width: 0;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--sq-border);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(16, 24, 40, 0.035);
}

.active-job-center-head,
.media-library-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 16px;
}

.active-job-center-head h3,
.media-library-section-head h3 {
  margin: 0;
  color: #17233a;
  font-size: 0.96rem;
  font-weight: 850;
}

.active-job-center-head p,
.media-library-section-head p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 0.7rem;
}

.job-center-filters {
  display: flex;
  min-width: 0;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.job-center-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: max-content;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  color: #667085;
  background: #fff;
  font-size: 0.67rem;
  font-weight: 790;
  cursor: pointer;
}

.job-center-filter span {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  min-height: 21px;
  padding-inline: 5px;
  border-radius: 999px;
  color: #667085;
  background: #edf1f5;
  font-size: 0.59rem;
  font-variant-numeric: tabular-nums;
}

.job-center-filter.active {
  border-color: #9bcfc5;
  color: #087467;
  background: #edf9f6;
}

.job-center-filter.active span {
  color: #087467;
  background: #d9f2ec;
}

.active-jobs-list {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.active-job-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  min-width: 0;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid #e1e7ee;
  border-radius: 10px;
  background: #fbfcfe;
}

.active-job-row[data-job-status="attention"] {
  border-left: 3px solid #f0b04f;
}

.active-job-row[data-job-status="active"] {
  border-left: 3px solid var(--sq-teal);
}

.active-job-main {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.active-job-title-row,
.active-job-meta,
.active-job-actions {
  display: flex;
  align-items: center;
}

.active-job-title-row {
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
}

.active-job-title-row h4 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #17233a;
  font-size: 0.8rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-status-chip {
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #667085;
  background: #edf1f5;
  font-size: 0.58rem;
  font-weight: 850;
}

.job-status-chip[data-tone="active"] {
  color: #087467;
  background: #e6f7f3;
}

.job-status-chip[data-tone="attention"] {
  color: #b54708;
  background: #fff1df;
}

.job-status-chip[data-tone="completed"] {
  color: #175cd3;
  background: #eaf2ff;
}

.active-job-main > p {
  margin: 0;
  overflow: hidden;
  color: #667085;
  font-size: 0.68rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.active-job-meta {
  flex-wrap: wrap;
  gap: 5px 12px;
  color: #526079;
  font-size: 0.63rem;
  font-weight: 700;
}

.active-job-meta time {
  color: #8a96a8;
  font-weight: 650;
}

.active-job-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4eaf0;
}

.active-job-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--sq-teal);
  transition: width 220ms ease;
}

.active-job-actions {
  align-self: center;
  justify-content: flex-end;
  gap: 6px;
}

.active-job-actions a,
.active-job-actions button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.66rem;
  white-space: nowrap;
}

.job-cancel-button {
  color: #b42318;
}

.active-jobs-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 28px 16px;
  border: 1px dashed #cbd6df;
  border-radius: 10px;
  color: #667085;
  text-align: center;
}

.active-jobs-empty strong {
  color: #344054;
  font-size: 0.8rem;
}

.active-jobs-empty span {
  font-size: 0.68rem;
}

.active-job-skeleton {
  height: 94px;
  border-radius: 10px;
  background: linear-gradient(100deg, #edf1f4 20%, #f8fafb 36%, #edf1f4 52%);
  background-size: 200% 100%;
  animation: media-library-loading 1.25s linear infinite;
}

.media-library-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.media-library-pagination[hidden] {
  display: none;
}

.media-library-pagination button {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.68rem;
}

.media-library-pagination span {
  color: #667085;
  font-size: 0.68rem;
  font-weight: 750;
}

@media (max-width: 900px) {
  .quick-action .url-row {
    grid-template-columns: minmax(0, 1fr) 126px minmax(200px, 230px);
  }

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

  .active-job-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .quick-action .url-row {
    grid-template-columns: minmax(0, 1fr) 116px;
  }

  .quick-action .url-row input,
  .primary-create-action {
    grid-column: 1 / -1;
  }

  .primary-create-action {
    margin-top: 2px;
  }

  .import-product-button {
    grid-column: 1 / -1;
  }

  .create-review-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-truth-summary,
  .create-review-summary > summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .product-truth-summary > span:first-child,
  .create-review-summary > summary > span:first-child {
    flex: 1 1 190px;
  }

  .product-truth-summary #productTruthStatus,
  .create-review-summary > summary > span:last-of-type {
    margin-left: 0;
  }

  .active-job-center,
  .media-library-section {
    padding: 13px;
    border-radius: 11px;
  }

  .active-job-center-head,
  .media-library-section-head {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .job-center-filters {
    width: 100%;
  }

  .active-job-title-row {
    align-items: flex-start;
  }

  .active-job-main > p {
    -webkit-line-clamp: 3;
  }

  .active-job-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .active-job-actions > * {
    justify-content: center;
  }

  .reviewer-primary-action .manual-review-create-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .active-job-progress > span,
  .product-truth-summary::after,
  .create-review-summary > summary::after {
    transition: none;
  }
}

/* Batch Studio: unattended, multi-product Cloud Flow queue. */
.app-shell.batch-mode {
  grid-template-columns: 224px minmax(0, 1fr);
}

.app-shell.batch-mode .workspace > :not(.topbar):not(.batch-studio-view) {
  display: none !important;
}

.app-shell.batch-mode > .inspector {
  display: none !important;
}

.batch-studio-view[hidden] {
  display: none !important;
}

.batch-studio-view {
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 30px clamp(22px, 3vw, 48px) 56px;
}

.batch-studio-header,
.batch-section-heading,
.batch-queue-panel > header,
.batch-form-footer,
.batch-job-card > header,
.batch-job-summary,
.batch-job-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.batch-studio-header {
  margin-bottom: 24px;
}

.batch-studio-header h2 {
  margin: 4px 0 5px;
  color: var(--ink, #13213a);
  font-size: clamp(1.55rem, 2vw, 2.05rem);
}

.batch-studio-header p,
.batch-section-heading p,
.batch-field-help {
  margin: 0;
  color: var(--muted, #718096);
}

.batch-server-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 9px 14px;
  color: #087a70;
  background: #e7f7f3;
  font-weight: 800;
}

.batch-studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .75fr);
  align-items: start;
  gap: 24px;
}

.batch-form,
.batch-queue-panel {
  border-radius: 22px;
  background: var(--surface, #fff);
  box-shadow: 0 14px 36px rgba(24, 39, 75, .07);
}

.batch-form {
  overflow: hidden;
}

.batch-form-section {
  padding: 24px 26px;
  background: #fff;
}

.batch-form-section + .batch-form-section {
  border-top: 1px solid #edf1f5;
}

.batch-section-heading {
  margin-bottom: 18px;
}

.batch-section-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.batch-section-heading > div > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #0a978c;
  font-weight: 900;
}

.batch-section-heading h3,
.batch-queue-panel h3 {
  margin: 0 0 2px;
  color: var(--ink, #13213a);
  font-size: 1.08rem;
}

.batch-section-heading > strong {
  color: #0a8f85;
}

#batchProductUrls {
  width: 100%;
  min-height: 176px;
  resize: vertical;
  border: 1px solid #dbe3eb;
  border-radius: 14px;
  padding: 15px 16px;
  background: #f8fafb;
  color: var(--ink, #13213a);
  line-height: 1.65;
}

#batchProductUrls:focus {
  border-color: #159e93;
  outline: 3px solid rgba(21, 158, 147, .13);
}

.batch-field-help {
  margin-top: 9px;
  font-size: .86rem;
}

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

.batch-settings-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 240px));
}

.batch-settings-grid label {
  display: grid;
  gap: 7px;
  color: #44536a;
  font-size: .88rem;
  font-weight: 750;
}

.batch-settings-grid select,
.batch-settings-grid input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbe3eb;
  border-radius: 12px;
  padding: 0 12px;
  background: #f8fafb;
  color: var(--ink, #13213a);
  font: inherit;
}

.batch-safety-note {
  display: flex;
  gap: 8px 14px;
  margin-top: 16px;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f0f8f6;
  color: #55716d;
  font-size: .88rem;
}

.batch-safety-note strong {
  color: #087a70;
}

.batch-form-footer {
  padding: 18px 26px;
  background: #f8fafb;
}

.batch-form-footer > div {
  display: grid;
  gap: 2px;
  color: #718096;
  font-size: .85rem;
}

.batch-form-footer strong {
  color: var(--ink, #13213a);
  font-size: 1.08rem;
}

.batch-form-status {
  min-height: 0;
  margin: 0;
  padding: 0 26px;
  color: #66758a;
}

.batch-form-status:not(:empty) {
  padding-top: 12px;
  padding-bottom: 18px;
}

.batch-form-status[data-tone="error"] { color: #bd3b32; }
.batch-form-status[data-tone="success"] { color: #087a70; }

.batch-queue-panel {
  position: sticky;
  top: 96px;
  padding: 20px;
}

.batch-queue-panel > header span {
  color: #0a8f85;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.batch-queue-empty {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  border-radius: 14px;
  padding: 34px 20px;
  text-align: center;
  background: #f7f9fb;
  color: #7b8799;
}

.batch-queue-empty strong { color: #344157; }
.batch-queue-list { display: grid; gap: 14px; margin-top: 16px; }

.batch-job-card {
  border-radius: 15px;
  padding: 16px;
  background: #f7f9fb;
}

.batch-job-card > header strong,
.batch-job-card > header span { display: block; }
.batch-job-card > header span { color: #6d7b90; font-size: .8rem; }
.batch-job-card > header em { color: #087a70; font-style: normal; font-weight: 900; }
.batch-job-card > p { margin: 10px 0; color: #68768a; font-size: .86rem; }

.batch-job-progress {
  height: 7px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8e6;
}

.batch-job-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0c9b90;
  transition: width .25s ease;
}

.batch-job-summary {
  justify-content: flex-start;
  color: #6b778c;
  font-size: .78rem;
}

.batch-item-list {
  display: grid;
  gap: 7px;
  max-height: 340px;
  margin: 14px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.batch-item-list li {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border-radius: 10px;
  padding: 9px;
  background: #fff;
}

.batch-item-list li > span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #e8eeef;
  color: #526174;
  font-size: .76rem;
  font-weight: 850;
}

.batch-item-list strong,
.batch-item-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-item-list strong { color: #334158; font-size: .8rem; }
.batch-item-list small { color: #bd3b32; font-size: .7rem; }
.batch-item-list em { color: #748196; font-size: .72rem; font-style: normal; }
.batch-item-list .status-completed em { color: #087a70; }
.batch-item-list .status-failed em,
.batch-item-list .status-needs_attention em { color: #bd3b32; }
.batch-job-card > footer { justify-content: flex-end; margin-top: 14px; }

html[data-theme="dark"] .batch-form,
html[data-theme="dark"] .batch-queue-panel,
html[data-theme="dark"] .batch-form-section {
  background: #111c29;
}

html[data-theme="dark"] .batch-form-section + .batch-form-section { border-color: #28374a; }
html[data-theme="dark"] #batchProductUrls,
html[data-theme="dark"] .batch-settings-grid select,
html[data-theme="dark"] .batch-settings-grid input,
html[data-theme="dark"] .batch-form-footer,
html[data-theme="dark"] .batch-queue-empty,
html[data-theme="dark"] .batch-job-card { background: #162333; border-color: #304156; }
html[data-theme="dark"] .batch-item-list li { background: #1c2a3b; }
html[data-theme="dark"] .batch-safety-note { background: #15312f; }

@media (max-width: 1100px) {
  .batch-studio-layout { grid-template-columns: 1fr; }
  .batch-queue-panel { position: static; }
}

@media (max-width: 720px) {
  .batch-studio-view { padding: 20px 14px 40px; }
  .batch-studio-header { align-items: flex-start; }
  .batch-settings-grid,
  .batch-settings-grid.compact { grid-template-columns: 1fr; }
  .batch-form-section { padding: 20px 18px; }
  .batch-safety-note { display: grid; }
}

/* Create workspace · simple, complete flow */
.quick-config-summary[hidden],
.quick-customization[hidden] {
  display: none !important;
}

.quick-start {
  overflow: visible;
}

.quick-copy {
  padding: 22px 24px 4px;
}

.quick-copy h2 {
  font-size: 1.32rem;
}

.quick-copy p {
  font-size: 0.82rem;
}

.quick-action {
  gap: 12px;
  padding: 16px 24px 22px;
}

.quick-action > label[for="productUrlInput"] {
  color: #344054;
  font-size: 0.76rem;
  font-weight: 820;
}

.quick-action .url-row {
  grid-template-columns: minmax(0, 1fr) 148px 190px;
}

.quick-action .url-row input,
.quick-action .url-row button,
.primary-button.large {
  min-height: 48px;
  border-radius: 10px;
}

.auto-mode-hint {
  margin-top: -4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #667085;
  font-size: 0.72rem;
}

.simple-clip-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 4px;
  padding: 18px;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  background: #fff;
}

.simple-settings-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 2px;
}

.simple-settings-heading > div {
  display: grid;
  gap: 2px;
}

.simple-settings-heading span {
  color: #078f8a;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.simple-settings-heading h3 {
  margin: 0;
  color: #17233a;
  font-size: 1rem;
  font-weight: 860;
}

.simple-settings-heading small {
  color: #667085;
  font-size: 0.7rem;
}

.simple-clip-settings .video-style-field,
.simple-clip-settings .quick-customization {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.simple-clip-settings .video-style-field > legend {
  margin-bottom: 7px;
  color: #344054;
  font-size: 0.75rem;
  font-weight: 820;
}

.video-style-select-field {
  display: grid;
  grid-template-columns: minmax(210px, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 8px 14px;
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  background: #fbfcfe;
}

.video-style-select-field > select {
  grid-column: 1;
}

.video-style-description {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-content: center;
  padding-left: 14px;
  border-left: 1px solid #e4e7ec;
}

.quick-customization {
  display: grid;
  gap: 12px;
}

.quick-customization .quick-settings,
.advanced-aux-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-settings label,
.advanced-aux-settings label,
.montage-options label,
.hand-closeup-options label {
  gap: 7px;
  color: #344054;
  font-size: 0.75rem;
  font-weight: 820;
}

.quick-settings select,
.advanced-aux-settings input,
.advanced-aux-settings select,
.montage-options select,
.hand-closeup-options select {
  min-height: 44px;
  border-color: #cfd8e6;
  border-radius: 9px;
  background: #fff;
  color: #17233a;
  font-size: 0.8rem;
}

.montage-options,
.hand-closeup-options {
  margin: 0;
  padding: 12px;
  border: 1px solid #d7ece8;
  border-radius: 10px;
  background: #f5fbfa;
}

.create-advanced-settings {
  border-top: 1px solid #e4e7ec;
}

.create-advanced-settings > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
  padding: 10px 2px;
  color: #344054;
  font-size: 0.76rem;
  font-weight: 820;
  cursor: pointer;
  list-style: none;
}

.create-advanced-settings > summary::-webkit-details-marker {
  display: none;
}

.create-advanced-settings > summary::after {
  content: "+";
  flex: 0 0 auto;
  color: #078f8a;
  font-size: 1.05rem;
}

.create-advanced-settings[open] > summary::after {
  content: "−";
}

.create-advanced-settings > summary small {
  min-width: 0;
  margin-left: auto;
  color: #667085;
  font-size: 0.68rem;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.create-advanced-settings > summary small[data-tone="ready"] {
  color: #087467;
}

.create-advanced-settings > summary small[data-tone="error"],
.create-advanced-settings > summary small[data-tone="locked"] {
  color: #b54708;
}

.create-advanced-body {
  display: grid;
  gap: 12px;
  padding: 4px 0 2px;
}

.flow-extension-panel,
.advanced-workflow {
  margin: 0;
}

.simple-clip-settings:not(.has-imported-product) .product-context {
  display: none;
}

.setup-grid {
  gap: 10px;
}

.reviewer-picker {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.reviewer-chooser {
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  background: #fbfcfe;
}

.reviewer-chooser > summary {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.reviewer-chooser > summary::-webkit-details-marker {
  display: none;
}

.reviewer-chooser > summary span {
  color: #344054;
  font-size: 0.73rem;
  font-weight: 820;
}

.reviewer-chooser > summary strong {
  min-width: 0;
  color: #17233a;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reviewer-chooser > summary small {
  color: #087467;
  font-size: 0.7rem;
  font-weight: 820;
}

.reviewer-chooser.needs-selection {
  border-color: #f0b56b;
  background: #fffbf5;
}

.reviewer-chooser-content {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
  border-top: 1px solid #e4e7ec;
}

.reviewer-picker-head {
  justify-content: flex-end;
  padding-top: 10px;
}

.reviewer-primary-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #cce8e2;
  border-radius: 10px;
  background: #f5fbfa;
}

.reviewer-primary-action > div {
  display: grid;
  gap: 3px;
}

.reviewer-primary-action strong {
  color: #17233a;
  font-size: 0.78rem;
}

.reviewer-primary-action span {
  color: #667085;
  font-size: 0.68rem;
}

.reviewer-primary-action .primary-button {
  min-width: 180px;
}

.reviewer-picker.is-action-only > .reviewer-chooser {
  display: none;
}

.quick-steps {
  order: 4;
  margin: 0 24px 22px;
  padding: 12px 0 0;
  border-top: 1px solid #e4e7ec;
  border-bottom: 0;
  background: transparent;
}

.quick-steps div {
  min-height: 30px;
}

.quick-steps strong {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  font-size: 0.65rem;
}

.quick-steps span {
  font-size: 0.68rem;
}

@media (max-width: 700px) {
  .quick-copy {
    padding: 18px 14px 3px;
  }

  .quick-action {
    padding: 12px 14px 16px;
  }

  .quick-action .url-row {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }

  .quick-action .url-row input {
    grid-column: 1 / -1;
  }

  .simple-clip-settings {
    gap: 12px;
    padding: 14px;
  }

  .simple-settings-heading {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }

  .video-style-select-field {
    grid-template-columns: 1fr;
  }

  .video-style-select-field > select,
  .video-style-description {
    grid-column: 1;
    grid-row: auto;
  }

  .video-style-description {
    padding: 8px 0 0;
    border-top: 1px solid #e4e7ec;
    border-left: 0;
  }

  .quick-customization .quick-settings,
  .advanced-aux-settings {
    grid-template-columns: 1fr;
  }

  .reviewer-chooser > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .reviewer-chooser > summary strong {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .reviewer-primary-action {
    align-items: stretch;
    flex-direction: column;
  }

  .reviewer-primary-action .primary-button {
    width: 100%;
    min-width: 0;
  }

  .create-advanced-settings > summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .create-advanced-settings > summary small {
    width: calc(100% - 26px);
    margin-left: 0;
  }

  .quick-steps {
    margin: 0 14px 16px;
    padding: 10px 0 0;
  }
}

/* Friendly one-click UX: make prerequisites and the final action unambiguous. */
.reviewer-primary-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid #e4e7ec;
}

.reviewer-primary-action > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reviewer-primary-action strong {
  color: #101828;
  font-size: 0.82rem;
}

.reviewer-primary-action span {
  color: #667085;
  font-size: 0.72rem;
  line-height: 1.45;
}

.reviewer-primary-action span[data-ready="true"] {
  color: #087f6f;
  font-weight: 760;
}

.reviewer-primary-action .primary-button {
  flex: 0 0 auto;
  min-width: 190px;
}

.reviewer-picker.is-action-only > :not(.reviewer-primary-action) {
  display: none;
}

.reviewer-picker.is-action-only .reviewer-primary-action {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

#autoReviewBtn:disabled,
#autoReviewBottomBtn:disabled {
  border-color: #d0d5dd;
  color: #667085;
  background: #eaecf0;
  cursor: not-allowed;
  opacity: 1;
}

@media (max-width: 700px) {
  .topbar {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
  }

  .topbar > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar h1 {
    overflow: hidden;
    font-size: 1.04rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    width: auto !important;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .topbar-actions > * {
    flex: 0 0 auto !important;
  }

  .topbar .status-pill,
  .member-menu .member-avatar,
  .member-menu > div {
    display: none;
  }

  .member-menu {
    display: flex;
    width: auto;
    grid-template-columns: none;
    gap: 5px;
    padding: 0;
    border: 0;
  }

  .member-menu[hidden] {
    display: none;
  }

  .member-menu #logoutBtn,
  .wallet-balance-button {
    grid-column: auto;
    justify-self: auto;
  }

  .member-menu #logoutBtn {
    padding-inline: 5px;
    font-size: 0.66rem;
  }

  .wallet-balance-button {
    min-width: 46px;
  }

  .quick-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px;
    padding: 10px 12px;
  }

  .quick-steps div {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 54px;
    text-align: center;
  }

  .quick-steps strong {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .quick-steps span {
    overflow: hidden;
    width: 100%;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .reviewer-primary-action {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .reviewer-primary-action .primary-button {
    width: 100%;
    min-width: 0;
  }

  .metrics-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  .metric {
    min-height: 64px;
    padding: 10px 8px;
  }

  .metric span {
    font-size: 0.62rem;
  }

  .metric strong {
    font-size: 0.82rem;
  }
}

.reviewer-recommendation-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #cce8e2;
  border-radius: 8px;
  background: #f1fbf8;
  color: #176c61;
  font-size: 0.7rem;
  font-weight: 760;
  line-height: 1.45;
}

.reviewer-recommendation-bar span {
  min-width: 0;
}

.reviewer-toggle-button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(17, 138, 122, 0.34);
  border-radius: 7px;
  background: #fff;
  color: #087467;
  font: inherit;
  font-weight: 830;
  cursor: pointer;
}

.reviewer-toggle-button[hidden] {
  display: none;
}

.reviewer-option-title em.is-recommended {
  border-color: rgba(17, 138, 122, 0.28);
  background: #dff6f0;
  color: #087467;
}

@media (max-width: 700px) {
  .reviewer-recommendation-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .reviewer-toggle-button {
    width: 100%;
  }
}

/* Product Montage mode */
.video-style-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
}

.video-style-field > legend {
  margin-bottom: 7px;
  color: #475467;
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.02em;
}

.video-style-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.video-style-options label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.video-style-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.video-style-options label > span {
  display: grid;
  gap: 3px;
  min-height: 68px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.video-style-options label:hover > span {
  border-color: #aebfbb;
  background: #fbfdfc;
}

.video-style-options input:checked + span {
  border-color: rgba(17, 138, 122, 0.64);
  background: #f0faf7;
  box-shadow: inset 3px 0 0 var(--teal);
}

.video-style-options input:focus-visible + span {
  outline: 3px solid rgba(0, 143, 128, 0.16);
  outline-offset: 2px;
}

.video-style-options input:disabled + span {
  cursor: wait;
  opacity: 0.58;
}

.video-style-options strong {
  color: #101828;
  font-size: 0.84rem;
  font-weight: 850;
}

.video-style-options small {
  color: #667085;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.45;
}

.montage-options {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid #cce8e2;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0faf7, #f8fbfa);
}

.montage-options[hidden] {
  display: none;
}

.hand-closeup-options {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #d9d3f5;
  border-radius: 10px;
  color: #51458d;
  background: linear-gradient(135deg, #f7f5ff, #fbfaff);
}

.hand-closeup-options[hidden] {
  display: none;
}

.reviewer-picker[hidden],
.advanced-workflow[hidden] {
  display: none;
}

#renderTopBtn[hidden],
#renderPlanBtn[hidden],
#generateImagesBtn[hidden],
#renderDraftBtn[hidden] {
  display: none;
}

.hand-closeup-options > div {
  display: grid;
  gap: 3px;
}

.hand-presenter-control {
  display: grid;
  gap: 5px;
  color: #51458d;
  font-size: 0.7rem;
  font-weight: 850;
}

.hand-presenter-control select {
  min-height: 40px;
  border-color: #c9c1ed;
  color: #43377f;
  background: #fff;
}

.hand-presenter-hint {
  display: block;
  grid-column: 1 / -1;
  padding-top: 9px;
  border-top: 1px solid #d9d3f5;
}

.hand-closeup-options strong {
  color: #43377f;
  font-size: 0.88rem;
  font-weight: 900;
}

.hand-closeup-options span,
.hand-closeup-options small {
  font-size: 0.72rem;
  font-weight: 680;
  line-height: 1.45;
}

.montage-options label {
  display: grid;
  gap: 5px;
  color: #38635d;
  font-size: 0.7rem;
  font-weight: 830;
}

.montage-options select {
  min-height: 40px;
  border-color: #b9dcd4;
}

.montage-output-spec {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  padding: 8px 12px;
  border-left: 1px solid #cce8e2;
}

.montage-output-spec strong {
  color: #087467;
  font-size: 0.9rem;
  font-weight: 900;
}

.montage-output-spec span {
  color: #52736e;
  font-size: 0.72rem;
  font-weight: 680;
  line-height: 1.45;
}

#quickDurationField.is-forced select,
#briefDurationField.is-forced select,
body[data-video-style="product-montage"] #generationProviderSelect,
body[data-video-style="hand-closeup-affiliate"] #generationProviderSelect,
body[data-video-style="warehouse-affiliate"] #generationProviderSelect {
  border-color: #cce8e2;
  color: #176c61;
  background: #f1fbf8;
  opacity: 1;
  cursor: not-allowed;
}

.reviewer-requirement-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #7a5200;
  background: #fff4d8;
  font-size: 0.63rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  vertical-align: middle;
}

.reviewer-picker.is-optional {
  border-style: dashed;
  border-color: #b8d8d1;
  background: #fbfdfc;
}

.reviewer-picker.is-optional .reviewer-requirement-badge {
  color: #087467;
  background: #dff6f0;
}

.storyboard-list.is-montage {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 0;
  background: var(--line);
}

.storyboard-list.is-hand-closeup .scene-card {
  border-color: #ddd7f5;
  background: linear-gradient(180deg, #fff, #fcfbff);
}

.storyboard-list.is-hand-closeup .montage-shot-meta span {
  color: #51458d;
  background: #f0edff;
}

.storyboard-list.is-montage .empty-state {
  grid-column: 1 / -1;
}

.storyboard-list.is-montage .scene-card {
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 9px 11px;
  min-width: 0;
  padding: 12px;
  border: 0;
}

.storyboard-list.is-montage .scene-card.has-scene-image,
.storyboard-list.is-montage .scene-card.has-scene-video {
  grid-template-columns: 88px minmax(0, 1fr);
}

.storyboard-list.is-montage .scene-media-slot,
.storyboard-list.is-montage .scene-media-slot.has-image {
  width: 78px;
  border-radius: 8px;
}

.storyboard-list.is-montage .scene-card.has-scene-image .scene-media-slot,
.storyboard-list.is-montage .scene-card.has-scene-video .scene-media-slot {
  width: 88px;
}

.storyboard-list.is-montage .scene-head {
  grid-template-columns: 1fr;
  gap: 8px;
}

.storyboard-list.is-montage .scene-actions {
  justify-content: flex-start;
}

.storyboard-list.is-montage .scene-actions button {
  min-height: 30px;
  padding-inline: 8px;
  font-size: 0.68rem;
}

.storyboard-list.is-montage .duration-input {
  min-height: 30px;
  font-size: 0.7rem;
}

.montage-shot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 2px 0 5px;
}

.montage-shot-meta span {
  display: inline-flex;
  padding: 3px 6px;
  border-radius: 999px;
  color: #087467;
  background: #e8f7f3;
  font-size: 0.6rem;
  font-weight: 850;
  text-transform: capitalize;
}

.montage-shot-direction {
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  color: #667085;
  font-size: 0.65rem;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storyboard-list.is-montage .scene-title-input {
  font-size: 0.86rem;
}

.storyboard-list.is-montage .scene-card > label textarea {
  min-height: 48px;
  font-size: 0.72rem;
}

@media (max-width: 900px) {
  .storyboard-list.is-montage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .video-style-options,
  .montage-options,
  .hand-closeup-options {
    grid-template-columns: 1fr;
  }

  .hand-presenter-hint {
    grid-column: auto;
    border-top: 1px solid #d9d3f5;
  }

  .montage-output-spec {
    padding: 8px 0 0;
    border-top: 1px solid #cce8e2;
    border-left: 0;
  }

  .storyboard-list.is-montage .scene-card,
  .storyboard-list.is-montage .scene-card.has-scene-image,
  .storyboard-list.is-montage .scene-card.has-scene-video {
    grid-template-columns: 1fr;
  }

  .storyboard-list.is-montage .scene-media-slot,
  .storyboard-list.is-montage .scene-media-slot.has-image,
  .storyboard-list.is-montage .scene-card.has-scene-image .scene-media-slot,
  .storyboard-list.is-montage .scene-card.has-scene-video .scene-media-slot {
    width: 100%;
    max-width: 180px;
  }
}

/* SceneQuence workspace shell — clear navigation, focused creation flow, persistent output. */
:root {
  --sq-navy: #0b274a;
  --sq-navy-deep: #071d38;
  --sq-canvas: #f4f7fb;
  --sq-teal: #05756f;
  --sq-teal-dark: #05756f;
  --sq-teal-soft: #e8f8f5;
  --sq-border: #e1e7ef;
  --sq-muted: #667085;
}

body:not(.needs-auth) {
  background: var(--sq-canvas);
}

.app-shell {
  display: grid;
  grid-template-columns: 224px minmax(680px, 1fr) 318px;
  align-items: start;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  gap: 0;
  background: var(--sq-canvas);
}

.app-shell.admin-mode {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex !important;
  flex-direction: column;
  align-self: start;
  width: 224px;
  height: 100vh;
  min-height: 100vh;
  padding: 24px 14px 16px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, var(--sq-navy) 0%, var(--sq-navy-deep) 100%);
  box-shadow: none;
  color: #fff;
}

.app-shell.admin-mode .sidebar {
  display: none !important;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 24px;
  border: 0;
}

.sidebar .brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.sidebar .brand-mark svg {
  width: 20px;
  height: 20px;
  fill: var(--sq-teal);
}

.sidebar .brand strong {
  color: #fff;
  font-size: 0.98rem;
  font-weight: 850;
}

.sidebar .brand small {
  margin-top: 2px;
  color: rgba(224, 235, 249, 0.68);
  font-size: 0.66rem;
  font-weight: 650;
}

.sidebar .nav-list {
  display: grid;
  gap: 5px;
}

.sidebar .nav-item,
.sidebar .nav-item:not(.active) {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 43px;
  gap: 11px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(232, 240, 250, 0.73);
  font-size: 0.82rem;
  font-weight: 720;
  text-align: left;
}

.sidebar .nav-item::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -14px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: transparent;
  content: "";
}

.sidebar .nav-item:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar .nav-item.active {
  border-color: rgba(69, 211, 198, 0.15);
  background: rgba(20, 164, 155, 0.2);
  color: #65e1d5;
}

.sidebar .nav-item.active::before {
  background: #40d3c5;
}

.sidebar .nav-icon {
  display: grid;
  place-items: center;
  width: 20px !important;
  height: 20px;
  flex: 0 0 20px;
  color: currentColor !important;
}

.sidebar .nav-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.sidebar-flow-card {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin-top: auto;
  padding: 13px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-flow-card > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sidebar-flow-card strong {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.sidebar-flow-card small {
  overflow: hidden;
  color: rgba(224, 235, 249, 0.68);
  font-size: 0.64rem;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.sidebar-flow-card small[data-tone="success"],
.sidebar-flow-card small[data-tone="ready"],
.sidebar-flow-card small[data-tone="pass"] {
  color: #74e6ba;
}

.sidebar-flow-card small[data-tone="error"],
.sidebar-flow-card small[data-tone="fail"] {
  color: #ffaaa4;
}

.sidebar-flow-dot {
  width: 8px;
  height: 8px;
  margin-top: 3px;
  border-radius: 999px;
  background: #8292a9;
  box-shadow: 0 0 0 3px rgba(130, 146, 169, 0.15);
}

.sidebar-flow-dot[data-tone="success"],
.sidebar-flow-dot[data-tone="ready"],
.sidebar-flow-dot[data-tone="pass"] {
  background: #4fd49d;
  box-shadow: 0 0 0 3px rgba(79, 212, 157, 0.16);
}

.sidebar-flow-dot[data-tone="error"],
.sidebar-flow-dot[data-tone="fail"] {
  background: #ff756e;
  box-shadow: 0 0 0 3px rgba(255, 117, 110, 0.16);
}

.workspace {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 16px;
  padding: 0 20px 30px;
  background: var(--sq-canvas);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  margin: 0 -20px 2px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--sq-border);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  margin: 0;
  color: #17233a;
  font-size: 1.28rem;
  font-weight: 850;
  letter-spacing: -0.015em;
}

.topbar .eyebrow,
.topbar .topbar-secondary,
.topbar > .topbar-actions > .status-pill {
  display: none;
}

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

.member-menu {
  border-color: var(--sq-border);
  border-radius: 9px;
  background: #fff;
}

.quick-start.panel,
.storyboard-panel,
.inspector-card {
  border: 1px solid var(--sq-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.035);
}

.quick-start {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.quick-steps {
  order: 1;
  padding: 14px 20px;
  border-bottom: 1px solid var(--sq-border);
  background: #fbfcfe;
}

.quick-steps div {
  min-height: 34px;
}

.quick-steps strong {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-color: #cfd8e6;
  color: #76849a;
  background: #fff;
}

.quick-steps div.active strong,
.quick-steps div.done strong {
  border-color: var(--sq-teal);
  color: #fff;
  background: var(--sq-teal);
}

.quick-steps span {
  color: #7a8799;
  font-size: 0.75rem;
  font-weight: 730;
}

.quick-steps div.active span,
.quick-steps div.done span {
  color: #25324a;
}

.quick-copy {
  order: 2;
  display: block;
  padding: 18px 20px 4px;
}

.quick-copy .section-kicker {
  display: none;
}

.quick-copy h2 {
  margin: 0 0 4px;
  color: #17233a;
  font-size: 1.08rem;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.quick-copy p {
  margin: 0;
  color: var(--sq-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.quick-action {
  order: 3;
  display: grid;
  gap: 13px;
  padding: 14px 20px 20px;
}

.quick-action .url-row {
  grid-template-columns: minmax(0, 1fr) 112px 158px;
  gap: 9px;
}

.quick-action .url-row input,
.quick-action .url-row button,
.primary-button.large {
  min-height: 44px;
  border-radius: 8px;
}

.primary-button {
  border-color: var(--sq-teal);
  background: var(--sq-teal);
}

.primary-button:hover:not(:disabled) {
  border-color: var(--sq-teal-dark);
  background: var(--sq-teal-dark);
}

.video-style-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.video-style-options label > span {
  min-height: 76px;
  border-radius: 9px;
}

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

.flow-extension-panel,
.product-truth-sheet,
.reviewer-picker,
.advanced-workflow {
  border-radius: 10px;
}

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

.product-context {
  display: grid;
  gap: 9px;
}

.reviewer-picker {
  padding: 14px;
  border-color: var(--sq-border);
  background: #fbfcfe;
}

.reviewer-picker-body {
  display: block;
}

.reviewer-preview-frame {
  display: none;
}

.reviewer-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  max-height: none;
  padding: 0;
  overflow: visible;
}

.reviewer-option {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 0;
  padding: 6px;
  border-color: #dfe5ed;
  border-radius: 9px;
  background: #fff;
  text-align: left;
}

.reviewer-option:hover {
  border-color: #a9bbb9;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
}

.reviewer-option.active {
  border-color: var(--sq-teal);
  background: var(--sq-teal-soft);
  box-shadow: 0 0 0 2px rgba(7, 143, 138, 0.1);
}

.reviewer-avatar {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: 7px;
  background: #e9eef4;
}

.reviewer-option-copy {
  gap: 4px;
  padding: 1px 2px 3px;
}

.reviewer-option-title {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.reviewer-option-name {
  font-size: 0.73rem;
  font-weight: 820;
}

.reviewer-option-title em {
  flex: 0 0 auto;
  padding: 2px 4px;
  font-size: 0.48rem;
}

.reviewer-option-copy small {
  display: -webkit-box;
  min-height: 2.6em;
  overflow: hidden;
  font-size: 0.6rem;
  line-height: 1.3;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.reviewer-primary-action {
  margin-top: 2px;
}

.metrics-row,
.preview-panel,
.brief-panel {
  display: none !important;
}

.studio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.storyboard-panel {
  scroll-margin-top: 82px;
  padding: 18px;
}

.storyboard-panel .section-kicker {
  color: var(--sq-teal-dark);
}

.inspector {
  position: sticky;
  top: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  max-height: 100vh;
  padding: 18px 16px;
  overflow: auto;
  background: #eef3f8;
}

.app-shell.admin-mode .inspector {
  display: none !important;
}

.inspector-card {
  padding: 16px;
}

.inspector .inspector-card:not(:first-child) {
  display: none !important;
}

.inspector-card .section-head.compact {
  margin-bottom: 12px;
}

.inspector-card .section-head.compact > span:first-child {
  color: #17233a;
  font-size: 0.94rem;
  font-weight: 850;
}

.inspector-stop-button {
  width: 100%;
  min-height: 38px;
  justify-content: center;
  margin: 0 0 12px;
  border-radius: 8px;
}

.setting-row {
  min-height: 34px;
}

.scene-image-grid {
  margin-top: 10px;
}

.render-output video {
  border-radius: 9px;
  background: #101828;
}

.render-output-actions .ghost-button {
  justify-content: center;
  width: 100%;
  min-height: 39px;
  border-color: var(--sq-teal);
  color: #fff;
  background: var(--sq-teal);
}

.quick-start,
.reviewer-picker,
.flow-extension-panel,
.product-truth-sheet {
  scroll-margin-top: 82px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(7, 143, 138, 0.22);
  outline-offset: 2px;
}

@media (max-width: 1279px) {
  .app-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .sidebar {
    width: 210px;
  }

  .inspector {
    position: static;
    grid-column: 2;
    max-height: none;
    padding-top: 0;
  }

  .inspector-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding-top: 112px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 9px 12px;
    overflow: visible;
  }

  .sidebar .brand {
    padding: 0 4px 9px;
  }

  .sidebar .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .sidebar .brand small,
  .sidebar-flow-card {
    display: none;
  }

  .sidebar .nav-list {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .sidebar .nav-item,
  .sidebar .nav-item:not(.active) {
    width: auto;
    min-width: max-content;
    min-height: 36px;
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  .sidebar .nav-item::before {
    display: none;
  }

  .workspace {
    grid-column: 1;
    padding: 0 12px 18px;
  }

  .topbar {
    top: 112px;
    margin: 0 -12px 0;
    padding-inline: 12px;
  }

  .inspector {
    grid-column: 1;
    padding: 0 12px 18px;
  }

  .quick-start,
  .reviewer-picker,
  .flow-extension-panel,
  .product-truth-sheet,
  .storyboard-panel {
    scroll-margin-top: 184px;
  }

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

@media (max-width: 700px) {
  .sidebar .nav-icon {
    display: none;
  }

  .topbar {
    top: 112px;
    min-height: 56px;
  }

  .topbar h1 {
    font-size: 1.02rem;
  }

  .quick-copy {
    padding: 16px 14px 3px;
  }

  .quick-action {
    padding: 12px 14px 16px;
  }

  .quick-action .url-row {
    grid-template-columns: 1fr 1fr;
  }

  .quick-action .url-row input {
    grid-column: 1 / -1;
  }

  .video-style-options,
  .quick-settings,
  .reviewer-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    padding: 10px 8px;
  }

  .quick-steps div {
    min-height: 50px;
  }

  .quick-steps span {
    font-size: 0.62rem;
  }

  .reviewer-picker-head,
  .reviewer-primary-action {
    align-items: stretch;
    flex-direction: column;
  }

  .reviewer-picker-actions {
    justify-content: space-between;
  }

  .storyboard-panel,
  .inspector-card {
    padding: 14px;
  }
}

@media (max-width: 420px) {
  .sidebar .nav-item,
  .sidebar .nav-item:not(.active) {
    padding-inline: 8px;
  }

  .member-menu #logoutBtn {
    display: inline-flex;
    padding-inline: 3px;
    font-size: 0.62rem;
  }

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

  .video-style-options {
    grid-template-columns: 1fr;
  }
}

/* Finished media library and final overflow hardening */
.app-shell.jobs-mode {
  grid-template-columns: 224px minmax(0, 1fr);
}

.app-shell.jobs-mode .workspace > :not(.topbar):not(.jobs-library-view),
.app-shell.jobs-mode > .inspector {
  display: none !important;
}

.jobs-library-view[hidden] {
  display: none !important;
}

.jobs-library-view {
  display: grid;
  min-width: 0;
  gap: 18px;
  padding: 8px 0 28px;
}

.jobs-library-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-width: 0;
  gap: 20px;
  padding: 18px 2px 4px;
}

.jobs-library-header > div {
  min-width: 0;
}

.jobs-library-header h2 {
  margin: 4px 0 4px;
  color: #17233a;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 880;
  letter-spacing: -0.025em;
}

.jobs-library-header p {
  max-width: 620px;
  margin: 0;
  color: var(--sq-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.jobs-library-header > .primary-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding-inline: 18px;
}

.jobs-library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sq-border);
}

.jobs-library-filters {
  display: flex;
  min-width: 0;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.jobs-library-scope {
  display: inline-flex;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--sq-border);
  border-radius: 10px;
  background: #edf2f6;
}

.jobs-library-scope-button {
  min-height: 34px;
  padding: 7px 18px;
  border: 0;
  border-radius: 7px;
  color: #617087;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.jobs-library-scope-button.active {
  color: var(--sq-teal-dark);
  background: #fff;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.1);
}

.jobs-library-filter {
  min-width: max-content;
  min-height: 36px;
  padding: 7px 15px;
  border: 1px solid var(--sq-border);
  border-radius: 999px;
  color: #58677e;
  background: #fff;
  font-size: 0.76rem;
  font-weight: 780;
}

.jobs-library-filter:hover,
.jobs-library-filter.active {
  border-color: rgba(7, 143, 138, 0.3);
  color: var(--sq-teal-dark);
  background: var(--sq-teal-soft);
}

.jobs-library-refresh {
  flex: 0 0 auto;
  min-height: 36px;
}

.jobs-library-status {
  min-height: 1.3em;
  margin: -7px 2px -4px;
  color: #718096;
  font-size: 0.72rem;
  font-weight: 700;
}

.media-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  align-items: start;
  min-width: 0;
  gap: 16px;
}

.media-library-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--sq-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.045);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.media-library-card:hover {
  border-color: #bdcbd6;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.09);
  transform: translateY(-2px);
}

.media-library-card.is-previewing {
  border-color: rgba(7, 143, 138, 0.46);
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.13);
  transform: none;
}

.media-library-card.is-trashed .media-library-preview {
  filter: saturate(0.72);
  opacity: 0.82;
}

.media-library-preview {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  min-width: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--sq-border);
  background: #e8eef3;
}

.media-library-preview img,
.media-library-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111827;
}

.media-library-card.is-previewing .media-library-preview {
  aspect-ratio: 9 / 16;
  background: #0b1220;
}

.media-library-card.is-previewing .media-library-preview img,
.media-library-card.is-previewing .media-library-preview video {
  object-fit: contain;
}

.media-library-preview-trigger {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 16px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.03), rgba(11, 18, 32, 0.46));
  cursor: pointer;
}

.media-library-preview-trigger span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding-left: 2px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: #123b38;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 5px 18px rgba(16, 24, 40, 0.22);
  font-size: 0.95rem;
}

.media-library-preview-trigger strong {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.68);
  font-size: 0.65rem;
}

.media-library-preview-trigger:hover,
.media-library-preview-trigger:focus-visible {
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.08), rgba(11, 18, 32, 0.58));
}

.media-library-preview-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: #fff;
  background: rgba(11, 18, 32, 0.72);
  font-size: 0.64rem;
  font-weight: 800;
  cursor: pointer;
}

.media-library-card-body {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 13px;
}

.media-library-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 8px;
}

.media-library-card-heading time {
  min-width: 0;
  overflow: hidden;
  color: #8a96a8;
  font-size: 0.62rem;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.media-library-type {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: #5a6472;
  background: #edf1f5;
  font-size: 0.58rem;
  font-weight: 850;
}

.media-library-type[data-media-type="video"] {
  color: var(--sq-teal-dark);
  background: var(--sq-teal-soft);
}

.media-library-card h3 {
  min-width: 0;
  margin: 1px 0 0;
  overflow: hidden;
  color: #17233a;
  font-size: 0.86rem;
  font-weight: 830;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-library-card p {
  min-width: 0;
  margin: 0;
  color: var(--sq-muted);
  font-size: 0.67rem;
  line-height: 1.4;
}

.media-library-actions {
  display: grid;
  gap: 7px;
  margin-top: 4px;
}

.media-library-actions.is-active {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.media-library-actions.is-trash {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-library-actions a,
.media-library-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  font-size: 0.69rem;
  text-align: center;
  text-decoration: none;
}

.media-trash-button {
  min-width: 48px;
  border: 1px solid #f1b7b7;
  border-radius: 8px;
  color: #b42318;
  background: #fff7f6;
  font-weight: 820;
  cursor: pointer;
}

.media-trash-button:hover {
  border-color: #e88989;
  background: #fff0ee;
}

.media-delete-forever-button {
  border-radius: 8px;
  font-weight: 820;
}

.media-trash-retention {
  color: #b54708 !important;
  font-weight: 760;
}

.media-retention-notice {
  margin: 2px 0 0 !important;
  padding: 7px 9px;
  border-radius: 8px;
  color: #8a4b08 !important;
  background: #fff6e5;
  font-size: 0.64rem !important;
  font-weight: 760;
  line-height: 1.45 !important;
}

.media-retention-notice[data-urgent="true"],
.media-retention-notice.is-expired {
  color: #b42318 !important;
  background: #fff0ee;
}

.media-retention-notice small {
  color: inherit;
  font-size: 0.58rem;
  font-weight: 650;
}

body[data-theme="dark"] .media-retention-notice {
  color: #ffd68a !important;
  background: rgba(181, 112, 8, 0.2);
}

body[data-theme="dark"] .media-retention-notice[data-urgent="true"],
body[data-theme="dark"] .media-retention-notice.is-expired {
  color: #ffb4ab !important;
  background: rgba(180, 35, 24, 0.22);
}

.media-library-skeleton {
  aspect-ratio: 4 / 6.45;
  border: 1px solid var(--sq-border);
  border-radius: 12px;
  background: linear-gradient(100deg, #edf1f4 20%, #f8fafb 36%, #edf1f4 52%);
  background-size: 200% 100%;
  animation: media-library-loading 1.25s linear infinite;
}

@keyframes media-library-loading {
  to { background-position-x: -200%; }
}

.jobs-library-empty {
  display: grid;
  justify-items: center;
  min-height: 340px;
  align-content: center;
  gap: 9px;
  padding: 44px 20px;
  border: 1px dashed #cbd6df;
  border-radius: 12px;
  color: var(--sq-muted);
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.jobs-library-empty[hidden] {
  display: none !important;
}

.jobs-library-empty strong {
  color: #243149;
  font-size: 0.95rem;
}

.jobs-library-empty > span:not(.jobs-library-empty-icon) {
  max-width: 420px;
  font-size: 0.75rem;
  line-height: 1.5;
}

.jobs-library-empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 3px;
  border-radius: 14px;
  color: var(--sq-teal);
  background: var(--sq-teal-soft);
}

.jobs-library-empty-icon svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.jobs-library-empty .primary-button {
  min-height: 40px;
  margin-top: 7px;
}

.app-shell button,
.app-shell a,
.app-shell input,
.app-shell select,
.app-shell textarea,
.app-shell label,
.app-shell fieldset,
.app-shell details {
  min-width: 0;
  max-width: 100%;
}

.app-shell button,
.app-shell .primary-button,
.app-shell .ghost-button,
.app-shell .text-button,
.app-shell .danger-button {
  overflow-wrap: anywhere;
  line-height: 1.35;
  white-space: normal;
}

.sidebar .nav-item,
.jobs-library-filter {
  overflow-wrap: normal;
  white-space: nowrap;
}

.video-style-options label > span {
  height: auto;
  min-height: 82px;
  overflow: hidden;
}

.video-style-options strong,
.video-style-options small,
.quick-settings label,
.flow-extension-panel,
.flow-extension-panel label,
.reviewer-option-copy,
.reviewer-option-name {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.reviewer-option-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.reviewer-option-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-extension-head > .flow-model-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 430px);
}

.flow-extension-head select {
  width: 100%;
}

.flow-extension-actions {
  flex-wrap: wrap;
}

.flow-extension-actions button,
.flow-extension-actions a {
  min-height: 40px;
  padding: 8px 12px;
  text-align: center;
}

@media (min-width: 701px) {
  .quick-action .url-row {
    grid-template-columns: minmax(0, 1fr) 112px 178px;
  }
}

@media (max-width: 1279px) {
  .app-shell.jobs-mode {
    grid-template-columns: 210px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .app-shell.jobs-mode {
    grid-template-columns: 1fr;
  }

  .media-library-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }
}

@media (max-width: 700px) {
  .jobs-library-view {
    gap: 14px;
    padding-top: 2px;
  }

  .jobs-library-header {
    align-items: stretch;
    flex-direction: column;
    gap: 13px;
    padding-top: 12px;
  }

  .jobs-library-header > .primary-button {
    width: 100%;
  }

  .jobs-library-toolbar {
    align-items: stretch;
  }

  .flow-extension-head {
    align-items: stretch;
    flex-direction: column;
  }

  .flow-extension-head > .flow-model-controls {
    width: 100%;
  }

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

  .flow-extension-actions #revokeFlowTokenBtn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .jobs-library-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .jobs-library-filters,
  .jobs-library-refresh {
    width: 100%;
  }

  .quick-settings,
  .flow-extension-head > .flow-model-controls,
  .flow-extension-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-extension-actions #revokeFlowTokenBtn {
    grid-column: auto;
  }

  #autoReviewBtn {
    padding-inline: 6px;
    font-size: 0.73rem;
  }

  .media-library-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .media-library-preview {
    aspect-ratio: 4 / 4.6;
  }

  .jobs-library-filter {
    padding-inline: 12px;
  }

  .jobs-library-refresh {
    padding-inline: 10px;
  }
}

/* Auto / Manual workflow and scalable video-style picker. */
.auto-mode-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: -5px 0 0;
  color: #667085;
  font-size: 0.71rem;
  font-weight: 650;
  line-height: 1.45;
}

.auto-mode-hint::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  background: #98a2b3;
  content: "";
}

.auto-mode-hint[data-ready="true"] {
  color: #087f6f;
}

.auto-mode-hint[data-ready="true"]::before {
  background: #12a594;
  box-shadow: 0 0 0 4px rgba(18, 165, 148, 0.12);
}

.video-style-select-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.video-style-select-field {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  color: #475467;
  font-size: 0.7rem;
  font-weight: 780;
}

.video-style-select-field:focus-within {
  border-color: rgba(17, 138, 122, 0.68);
  box-shadow: 0 0 0 3px rgba(17, 138, 122, 0.12);
}

.video-style-select-field select {
  width: 100%;
  min-height: 42px;
  border-color: #b8c4c1;
  background-color: #fbfdfc;
  color: #101828;
  font-weight: 760;
}

.video-style-description {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid #cce8e2;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0faf7, #f8fbfa);
}

.video-style-description strong {
  color: #087467;
  font-size: 0.8rem;
  font-weight: 850;
}

.video-style-description span {
  color: #52605d;
  font-size: 0.7rem;
  font-weight: 630;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (min-width: 701px) {
  .quick-action .url-row {
    grid-template-columns: minmax(0, 1fr) 142px 210px;
  }
}

@media (max-width: 700px) {
  .video-style-select-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .video-style-description {
    min-height: 64px;
  }

  .quick-action .url-row {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
  }

  .quick-action .url-row input {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .quick-action .url-row button {
    min-height: 48px;
    padding-inline: 7px;
    font-size: 0.72rem;
  }

  .auto-mode-hint {
    align-items: flex-start;
  }
}

/* Keep the Auto path compact; reveal Manual controls only on demand. */
.video-style-select-layout {
  grid-template-columns: minmax(0, 1fr);
}

.video-style-select-field {
  padding: 10px 12px 9px;
}

.video-style-description {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.video-style-description strong {
  color: #087467;
  font-size: 0.7rem;
}

.video-style-description span {
  color: #667085;
  font-size: 0.68rem;
}

.quick-config-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border: 1px solid #cce8e2;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0faf7, #f8fbfa);
}

.quick-config-summary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quick-config-summary span {
  color: #667085;
  font-size: 0.65rem;
  font-weight: 760;
}

.quick-config-summary strong {
  color: #087467;
  font-size: 0.76rem;
  font-weight: 820;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.quick-customize-toggle {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid #9bcfc5;
  border-radius: 8px;
  background: #fff;
  color: #087467;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.quick-customize-toggle:hover {
  border-color: #118a7a;
  background: #f4fbf9;
}

.quick-customize-toggle[aria-expanded="true"] {
  background: #e8f8f5;
}

.quick-customization {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fbfcfe;
}

.quick-customization[hidden] {
  display: none;
}

.quick-customization .quick-settings {
  margin: 0;
}

.hand-closeup-options {
  grid-template-columns: minmax(0, 1fr);
}

.hand-presenter-hint {
  grid-column: auto;
}

@media (max-width: 700px) {
  .quick-config-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-customize-toggle {
    width: 100%;
  }

  .video-style-description {
    min-height: 0;
    flex-direction: column;
  }

  .jobs-library-scope {
    width: 100%;
  }

  .jobs-library-scope-button {
    flex: 1 1 50%;
  }

  .media-library-actions.is-active {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-library-actions.is-active .media-trash-button {
    grid-column: 1 / -1;
  }
}

/* Final create-page cascade: workflow follows the form instead of leading it. */
.quick-start > .quick-steps {
  order: 4;
  margin: 0 24px 22px;
  padding: 12px 0 0;
  border-top: 1px solid #e4e7ec;
  border-bottom: 0;
  background: transparent;
}

.quick-start > .quick-steps div {
  min-height: 30px;
}

.quick-start > .quick-steps strong {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  font-size: 0.65rem;
}

.quick-start > .quick-steps span {
  font-size: 0.68rem;
}

@media (max-width: 700px) {
  .quick-start > .quick-steps {
    margin: 0 14px 16px;
    padding: 10px 0 0;
  }
}

/* Dedicated Settings workspace — provider models and Flow Companion live here. */
.app-shell.settings-mode {
  grid-template-columns: 224px minmax(0, 1fr);
}

.app-shell.settings-mode .workspace > :not(.topbar):not(.settings-view),
.app-shell.settings-mode > .inspector {
  display: none !important;
}

.settings-view[hidden],
.settings-tab-panel[hidden] {
  display: none !important;
}

.settings-view {
  display: grid;
  width: min(100%, 980px);
  min-width: 0;
  gap: 18px;
  padding: 18px 0 36px;
}

.settings-view-header,
.settings-default-provider,
.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 24px;
}

.settings-view-header > div,
.settings-default-provider > div,
.settings-panel-header > div {
  min-width: 0;
}

.settings-view-header h2,
.settings-panel-header h3 {
  margin: 0;
  color: #17233a;
  font-weight: 860;
  letter-spacing: -0.025em;
}

.settings-view-header h2 {
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
}

.settings-panel-header h3 {
  font-size: 1.05rem;
}

.settings-view-header p,
.settings-panel-header p {
  margin: 5px 0 0;
  max-width: 680px;
  color: #667085;
  font-size: 0.82rem;
  line-height: 1.55;
}

.settings-save-state {
  flex: none;
  color: #087467;
  font-size: 0.74rem;
  font-weight: 800;
}

.settings-save-state::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 999px;
  background: #17a589;
  box-shadow: 0 0 0 4px #e6f7f3;
  vertical-align: 1px;
}

.settings-default-provider,
.settings-tab-panel {
  padding: 20px;
  border: 1px solid #dfe5ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(16, 24, 40, 0.045);
}

.settings-default-provider > div {
  display: grid;
  gap: 5px;
}

.settings-default-provider strong {
  color: #17233a;
  font-size: 0.9rem;
}

.settings-default-provider span {
  max-width: 590px;
  color: #667085;
  font-size: 0.76rem;
  line-height: 1.5;
}

.settings-default-provider label,
.settings-model-field,
.settings-flow-models label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: #344054;
  font-size: 0.74rem;
  font-weight: 780;
}

.settings-default-provider label {
  width: min(100%, 310px);
  flex: 0 0 310px;
}

.settings-default-provider select,
.settings-model-field select,
.settings-flow-models select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 9px 38px 9px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 9px;
  background-color: #fff;
  color: #17233a;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 720;
}

.settings-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 5px;
  border: 1px solid #dfe5ec;
  border-radius: 13px;
  background: #edf2f6;
}

.settings-tab {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 13px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #667085;
  text-align: left;
  cursor: pointer;
}

.settings-tab strong {
  font-size: 0.86rem;
  font-weight: 840;
}

.settings-tab span {
  font-size: 0.7rem;
  line-height: 1.35;
}

.settings-tab:hover {
  color: #087467;
  background: rgba(255, 255, 255, 0.7);
}

.settings-tab.active {
  border-color: #c9ded9;
  background: #fff;
  color: #087467;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.07);
}

.settings-tab:focus-visible {
  outline: 3px solid rgba(17, 138, 122, 0.2);
  outline-offset: 2px;
}

.settings-tab-panel {
  display: grid;
  gap: 18px;
}

.settings-model-field {
  padding: 16px;
  border: 1px solid #d9e7e3;
  border-radius: 11px;
  background: #f7fbfa;
}

.settings-model-field small,
.settings-flow-models small {
  color: #667085;
  font-size: 0.71rem;
  font-weight: 620;
  line-height: 1.5;
}

.settings-flow-panel {
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
}

.settings-flow-models {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-flow-models label {
  padding: 16px;
  border: 1px solid #d9e7e3;
  border-radius: 11px;
  background: #f7fbfa;
}

.settings-flow-divider {
  height: 1px;
  background: #e4e7ec;
}

.settings-flow-panel .flow-extension-head {
  padding-top: 2px;
}

.settings-flow-panel .flow-extension-head strong {
  font-size: 0.94rem;
}

.settings-flow-panel .flow-extension-actions {
  gap: 10px;
}

.settings-flow-panel .flow-extension-help {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid #e4e7ec;
}

.quick-customization .quick-settings {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 1279px) {
  .app-shell.settings-mode {
    grid-template-columns: 210px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .app-shell.settings-mode {
    grid-template-columns: 1fr;
  }

  .settings-view {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .settings-view {
    gap: 14px;
    padding: 10px 0 24px;
  }

  .settings-view-header,
  .settings-default-provider,
  .settings-panel-header {
    align-items: stretch;
    flex-direction: column;
    gap: 13px;
  }

  .settings-save-state {
    align-self: flex-start;
  }

  .settings-default-provider,
  .settings-tab-panel {
    padding: 15px;
    border-radius: 11px;
  }

  .settings-default-provider label {
    width: 100%;
    flex-basis: auto;
  }

  .settings-tabs,
  .settings-flow-models {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-tab {
    padding: 12px;
  }

  .settings-flow-panel .flow-extension-lock,
  .settings-flow-panel .flow-extension-head,
  .settings-flow-panel .flow-extension-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-flow-panel .flow-extension-actions > *,
  .settings-flow-panel .google-connect-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* Readability and creation-CTA hierarchy audit */
html {
  font-size: 17px;
}

.section-kicker,
.sidebar .brand small,
.member-menu small {
  font-size: 0.72rem;
}

.member-menu .text-button,
.wallet-balance-button,
.quick-action > label[for="productUrlInput"],
.simple-settings-heading small,
.create-advanced-settings > summary small,
.product-truth-summary small,
.create-review-summary > summary small,
.generation-cost-hint,
.reviewer-chooser > summary small,
.settings-tab span,
.settings-model-field small,
.settings-flow-models small {
  font-size: 0.75rem;
}

.primary-create-action .primary-button {
  min-height: 52px;
  font-size: 0.84rem;
  font-weight: 850;
}

.primary-create-action > span {
  font-size: 0.72rem;
  line-height: 1.4;
}

.import-product-button {
  min-height: 52px;
  padding-inline: 14px;
  font-size: 0.76rem;
  line-height: 1.3;
}

.import-product-button span {
  color: #7b8797;
  font-size: 0.69rem;
  font-weight: 700;
}

.auto-mode-hint,
.video-style-select-field,
.video-style-description,
.video-style-description strong,
.video-style-description span,
.reviewer-primary-action span {
  font-size: 0.76rem;
}

.reviewer-primary-action {
  gap: 18px;
  margin: 4px 0 6px;
  padding: 15px 16px;
  border: 1px solid #b9ddd6;
  border-radius: 11px;
  background: #f1faf7;
  box-shadow: 0 5px 16px rgba(7, 143, 138, 0.06);
}

.reviewer-primary-action[hidden] {
  display: none !important;
}

.reviewer-primary-action strong {
  font-size: 0.9rem;
}

.manual-review-create-button {
  min-width: 220px;
  min-height: 46px;
  padding: 9px 16px;
  border-color: var(--sq-teal);
  color: #fff;
  background: var(--sq-teal);
  font-size: 0.79rem;
  font-weight: 840;
}

.manual-review-create-button:hover:not(:disabled) {
  border-color: var(--sq-teal-dark);
  color: #fff;
  background: var(--sq-teal-dark);
}

.job-center-filter,
.active-job-main > p,
.active-job-meta,
.active-job-actions a,
.active-job-actions button,
.active-jobs-empty span,
.media-library-card p,
.media-library-actions a,
.media-library-actions button,
.wallet-cost-item,
.wallet-transaction time,
.wallet-topup-request time,
.wallet-package-option small {
  font-size: 0.74rem;
}

.job-center-filter span,
.job-status-chip,
.media-library-card-heading time,
.media-library-type,
.media-library-preview-trigger strong,
.media-library-preview-close {
  font-size: 0.7rem;
}

.admin-table th {
  font-size: 0.75rem;
}

@media (min-width: 701px) {
  .quick-action .url-row {
    grid-template-columns: minmax(0, 1fr) 210px 176px;
  }
}

@media (max-width: 700px) {
  .primary-create-action,
  .import-product-button {
    width: 100%;
  }

  .reviewer-primary-action {
    align-items: stretch;
    flex-direction: column;
  }

  .manual-review-create-button {
    width: 100%;
    min-width: 0;
  }
}

/* Admin is a full-canvas view. Keep this after the jobs/settings shell rules so
   the route we came from cannot leave Admin trapped in the sidebar column. */
.app-shell.admin-mode,
.app-shell.admin-mode.jobs-mode,
.app-shell.admin-mode.settings-mode {
    grid-template-columns: minmax(0, 1fr);
}

/* Guided creation workflow and generation-method visibility (v151) */
.quick-start.panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px;
}

.quick-start > .quick-copy {
  order: 0;
  margin: 0;
  padding: 0;
}

.quick-start > .quick-copy h2 {
  margin: 0;
  font-size: clamp(1.65rem, 2vw, 2rem);
  line-height: 1.2;
}

.quick-start > .quick-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.create-step-rail {
  order: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0 4px;
}

.create-step-rail > div {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #8a96a8;
  font-size: 0.96rem;
  font-weight: 700;
}

.create-step-rail > div:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 18px;
  left: 48px;
  right: 14px;
  height: 2px;
  background: #e1e8ef;
}

.create-step-rail strong {
  position: relative;
  z-index: 1;
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 2px solid #d7e0e9;
  border-radius: 50%;
  background: #fff;
  color: #8190a2;
  font-size: 0.92rem;
}

.create-step-rail .active,
.create-step-rail .done {
  color: #087f75;
}

.create-step-rail .active strong,
.create-step-rail .done strong {
  border-color: #209d91;
  background: #209d91;
  color: #fff;
}

.create-step-rail .done:not(:last-child)::after {
  background: #8dd2ca;
}

.create-method-section,
.settings-default-provider.provider-menu-section {
  display: grid;
  gap: 14px;
}

.quick-start > .create-method-section {
  order: 2;
}

.create-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.create-section-heading span {
  color: #087f75;
  font-size: 0.84rem;
  font-weight: 800;
}

.create-section-heading h3 {
  margin: 3px 0 0;
  color: #14243a;
  font-size: 1.14rem;
}

.create-section-heading small {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.generation-method-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 12px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid #d9e2ea;
  border-radius: 14px;
  background: #fff;
  color: #17273c;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.generation-method-card:hover:not(:disabled) {
  border-color: #80c7bf;
  box-shadow: 0 8px 22px rgb(16 70 75 / 8%);
  transform: translateY(-1px);
}

.generation-method-card.active {
  border-color: #17988d;
  background: #f0fbf9;
  box-shadow: 0 0 0 2px rgb(23 152 141 / 11%);
}

.generation-method-card:focus-visible {
  outline: 3px solid rgb(23 152 141 / 20%);
  outline-offset: 2px;
}

.generation-method-card:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.generation-method-card.is-globally-hidden {
  border-style: dashed;
  background: #f8fafc;
}

.generation-method-icon {
  display: grid;
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: #e9f8f5;
  color: #07877c;
  font-size: 1.05rem;
  font-weight: 900;
}

.generation-method-icon.google {
  background: #f2f5ff;
  color: #3367d6;
}

.generation-method-icon.cloud {
  background: #eaf7fb;
  color: #147d9c;
}

.generation-method-card > span:nth-child(2) {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.generation-method-card strong {
  font-size: 1rem;
  line-height: 1.35;
}

.generation-method-card small {
  color: #66758a;
  font-size: 0.88rem;
  line-height: 1.55;
}

.generation-method-state {
  grid-column: 2;
  align-self: end;
  color: #087f75;
  font-size: 0.78rem;
  font-weight: 800;
}

.generation-method-empty {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #efc9a1;
  border-radius: 12px;
  background: #fff8ef;
  color: #8b4b0d;
  font-size: 0.95rem;
}

.quick-action {
  display: grid;
  gap: 9px;
  padding-top: 20px;
  border-top: 1px solid #e5ebf0;
}

.quick-action > label {
  color: #33445a;
  font-size: 0.94rem;
  font-weight: 800;
}

.quick-action .url-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, auto);
  align-items: stretch;
  gap: 12px;
}

.quick-action .url-row input {
  min-height: 52px;
  font-size: 1rem;
}

.quick-action .primary-create-action {
  display: grid;
  gap: 5px;
  min-width: 210px;
}

.quick-action .primary-create-action button {
  min-height: 52px;
  font-size: 1rem;
}

.quick-action .primary-create-action span,
.primary-create-estimate,
.auto-mode-hint {
  color: #68778a;
  font-size: 0.84rem;
  line-height: 1.45;
}

.primary-create-estimate {
  margin: 0;
  text-align: right;
}

.simple-clip-settings:not(.has-imported-product) {
  display: none;
}

#jobSteps,
.quick-start + .metrics-row {
  display: none;
}

.settings-default-provider.provider-menu-section {
  align-items: stretch;
}

.settings-default-provider.provider-menu-section > div:first-child {
  max-width: none;
}

.settings-default-provider .generation-method-menu {
  grid-column: 1 / -1;
  width: 100%;
}

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

.admin-generation-methods {
  overflow: hidden;
  border: 1px solid #dfe6ed;
  border-radius: 16px;
  background: #fff;
}

.admin-generation-methods .admin-toolbar {
  border-bottom: 0;
}

.admin-method-help {
  margin: 0 22px 14px;
  padding: 12px 14px;
  border: 1px solid #dbe5ed;
  border-radius: 10px;
  background: #f8fafc;
  color: #586a7f;
  font-size: 0.92rem;
  line-height: 1.55;
}

.admin-generation-method-list {
  display: grid;
  padding: 0 22px 8px;
}

.admin-generation-method-row {
  display: grid;
  grid-template-columns: 42px minmax(260px, 1fr) minmax(140px, auto) minmax(180px, auto);
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid #e5ebf0;
}

.admin-generation-method-copy {
  display: grid;
  gap: 5px;
}

.admin-generation-method-copy strong {
  color: #17273c;
  font-size: 1rem;
}

.admin-generation-method-copy span {
  color: #65758a;
  font-size: 0.9rem;
  line-height: 1.5;
}

.admin-method-operational {
  justify-self: start;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-method-operational.ready {
  background: #e9f8f2;
  color: #13795b;
}

.admin-method-operational.unavailable {
  background: #fff3e6;
  color: #9a530d;
}

.admin-method-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #405268;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-method-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.admin-method-switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex: 0 0 46px;
  border-radius: 999px;
  background: #c8d2dd;
  transition: background 160ms ease;
}

.admin-method-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgb(15 39 66 / 22%);
  transition: transform 160ms ease;
}

.admin-method-toggle input:checked + .admin-method-switch {
  background: #16988c;
}

.admin-method-toggle input:checked + .admin-method-switch::after {
  transform: translateX(20px);
}

.admin-method-toggle input:focus-visible + .admin-method-switch {
  outline: 3px solid rgb(22 152 140 / 22%);
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  .generation-method-menu {
    grid-template-columns: 1fr;
  }

  .generation-method-card {
    min-height: 96px;
  }

  .admin-generation-method-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .admin-method-operational {
    grid-column: 2;
  }

  .admin-method-toggle {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 720px) {
  .quick-start.panel {
    gap: 18px;
    padding: 20px 16px;
  }

  .create-step-rail {
    overflow-x: auto;
    grid-template-columns: repeat(4, minmax(116px, 1fr));
    padding-bottom: 6px;
  }

  .create-step-rail > div:not(:last-child)::after {
    right: 8px;
  }

  .quick-action .url-row {
    grid-template-columns: 1fr;
  }

  .quick-action .primary-create-action {
    min-width: 0;
  }

  .primary-create-estimate {
    text-align: left;
  }

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

  .admin-generation-method-row {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px 12px;
  }

  .admin-method-operational,
  .admin-method-toggle {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
  }
}

/* Production workspace v2 — visual mode cards, scene board, cost summary and production grid. */
.sidebar {
  background: #071f3b;
}

.video-style-field {
  position: relative;
}

.video-style-select-layout {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.video-style-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.video-style-card {
  display: grid;
  grid-template-rows: 86px auto;
  min-height: 158px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d9e1ea;
  border-radius: 12px;
  color: #1d2939;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.video-style-card:hover {
  border-color: #9fc9c3;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

.video-style-card.active {
  border-color: var(--sq-teal);
  background: #f4fbf9;
  box-shadow: 0 0 0 2px rgba(7, 143, 138, 0.11);
}

.video-style-card-visual {
  display: grid;
  place-items: center;
  border-bottom: 1px solid #e6ebf1;
  color: #566577;
  background: #f7f9fb;
}

.video-style-card.active .video-style-card-visual {
  color: var(--sq-teal-dark);
  background: #ecf8f5;
}

.video-style-card-visual svg {
  width: 112px;
  height: 68px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.video-style-card-copy {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 12px 13px 13px;
}

.video-style-card-copy strong {
  color: #17233a;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.3;
}

.video-style-card.active .video-style-card-copy strong {
  color: var(--sq-teal-dark);
}

.video-style-card-copy small {
  color: #667085;
  font-size: 0.74rem;
  font-weight: 630;
  line-height: 1.42;
}

.quick-config-summary {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) repeat(4, minmax(105px, 0.78fr)) auto;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #cfd9e4;
  border-radius: 12px;
  background: #fff;
}

.quick-config-summary > div {
  align-content: center;
  gap: 5px;
  min-height: 72px;
  padding: 12px 14px;
  border-right: 1px solid #e3e9ef;
}

.quick-config-summary span {
  color: #728095;
  font-size: 0.71rem;
  font-weight: 740;
}

.quick-config-summary strong {
  display: -webkit-box;
  overflow: hidden;
  color: #17233a;
  font-size: 0.78rem;
  font-weight: 820;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quick-config-primary strong,
.quick-config-detail:nth-of-type(4) strong {
  color: var(--sq-teal-dark);
}

.quick-config-summary .quick-customize-toggle {
  align-self: center;
  min-width: 88px;
  min-height: 40px;
  margin: 0 12px;
}

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

.quick-model-controls label {
  display: grid;
  gap: 6px;
  color: #475467;
  font-size: 0.76rem;
  font-weight: 780;
}

.quick-model-controls select {
  min-height: 42px;
  border-color: #c8d2dc;
  background: #fff;
}

.quick-start > .quick-steps {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.product-truth-sheet {
  border-color: #b9dcd6;
  background: #f8fcfb;
}

.product-truth-summary {
  min-height: 58px;
}

.product-truth-summary strong {
  color: #123f3a;
  font-size: 0.84rem;
}

.storyboard-panel {
  padding: 0;
  overflow: hidden;
}

.storyboard-panel > .section-head {
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--sq-border);
}

.storyboard-list {
  display: grid;
  gap: 0;
}

.storyboard-list .scene-card,
.storyboard-list.is-montage .scene-card,
.storyboard-list.is-hand-closeup .scene-card,
.storyboard-list.is-montage .scene-card.has-scene-image,
.storyboard-list.is-montage .scene-card.has-scene-video {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  min-height: 260px;
  gap: 0;
  margin: 0;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid var(--sq-border);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.storyboard-list .scene-card:last-child {
  border-bottom: 0;
}

.storyboard-list.is-script-review .scene-card,
.storyboard-list.is-script-review.is-montage .scene-card,
.storyboard-list.is-script-review.is-hand-closeup .scene-card {
  grid-template-columns: 68px minmax(0, 1fr);
  min-height: 0;
}

.scene-review-index {
  display: grid;
  width: 54px;
  min-height: 74px;
  align-content: center;
  justify-items: center;
  align-self: start;
  gap: 2px;
  border: 1px solid #d9e1e8;
  border-radius: 10px;
  color: #344054;
  background: #f5f7f9;
}

.scene-review-index span {
  font-size: 1.1rem;
  font-weight: 850;
}

.scene-review-index small {
  color: #667085;
  font-size: 0.64rem;
  font-weight: 760;
}

html[data-theme="dark"] .scene-review-index {
  border-color: #34445a;
  color: #edf4fb;
  background: #172333;
}

html[data-theme="dark"] .scene-review-index small {
  color: #9ba9b8 !important;
}

.scene-review-actions {
  align-self: start;
}

.storyboard-list .scene-media-slot,
.storyboard-list.is-montage .scene-card .scene-media-slot,
.storyboard-list.is-montage .scene-card.has-scene-image .scene-media-slot,
.storyboard-list.is-montage .scene-card.has-scene-video .scene-media-slot {
  position: relative;
  width: 108px;
  min-height: 192px;
  align-self: start;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid #d9e1e8;
  border-radius: 10px;
  background: #eef2f5;
}

.storyboard-list .scene-media-slot > img,
.storyboard-list .scene-media-slot > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scene-status-badge {
  right: 7px;
  bottom: 7px;
  left: 7px;
  width: auto;
  max-width: calc(100% - 14px);
  padding: 5px 7px;
  border-radius: 7px;
  color: #344054;
  background: rgba(255, 255, 255, 0.93);
  font-size: 0.68rem;
  text-align: center;
}

.scene-workspace {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 12px;
  padding-left: 16px;
}

.scene-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  min-width: 0;
  gap: 16px;
}

.scene-head > div:first-child {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.scene-index {
  color: #667085;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scene-title-input {
  min-height: 38px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  color: #17233a;
  background: transparent;
  font-size: 1rem;
  font-weight: 850;
}

.scene-title-input:hover,
.scene-title-input:focus {
  border-bottom-color: #b9c7d4;
  box-shadow: none;
}

.scene-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.scene-actions button {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #d3dce5;
  border-radius: 8px;
  color: #2d3b50;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 780;
}

.scene-actions .scene-primary-action {
  min-width: 130px;
  border-color: var(--sq-teal);
  color: #fff;
  background: var(--sq-teal);
}

.scene-actions .scene-primary-action:hover:not(:disabled) {
  border-color: var(--sq-teal-dark);
  background: var(--sq-teal-dark);
}

.duration-input {
  min-width: 42px;
  color: #667085;
  font-size: 0.7rem;
  font-weight: 760;
}

.scene-board-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #dfe6ed;
}

.scene-board-tabs button {
  position: relative;
  min-height: 38px;
  padding: 8px 13px;
  border: 0;
  color: #667085;
  background: transparent;
  font-size: 0.74rem;
  font-weight: 760;
  cursor: pointer;
}

.scene-board-tabs button::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  content: "";
}

.scene-board-tabs button.active {
  color: var(--sq-teal-dark);
}

.scene-board-tabs button.active::after {
  background: var(--sq-teal);
}

.scene-board-panel {
  min-width: 0;
}

.scene-board-panel[hidden] {
  display: none !important;
}

.scene-board-panel label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #526174;
  font-size: 0.73rem;
  font-weight: 760;
}

.scene-board-panel textarea,
.scene-board-panel input {
  width: 100%;
  border-color: #d8e0e8;
  border-radius: 9px;
  color: #17233a;
  background: #fbfcfe;
  font-size: 0.86rem;
  line-height: 1.55;
}

.scene-board-video-panel {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.34fr);
  gap: 10px;
}

.scene-board-video-panel:not([hidden]) {
  display: grid;
}

.scene-camera-field input {
  min-height: 44px;
}

.scene-metadata-fields {
  border-top: 1px solid #edf0f3;
}

.scene-metadata-fields > summary {
  padding: 10px 0 0;
  color: #6f7d90;
  font-size: 0.72rem;
  font-weight: 740;
  cursor: pointer;
}

.scene-metadata-fields .scene-foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 10px;
}

.scene-metadata-fields label {
  display: grid;
  gap: 6px;
  color: #667085;
  font-size: 0.72rem;
  font-weight: 740;
}

.production-grid-panel {
  padding: 18px 20px 20px;
  border: 1px solid var(--sq-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.035);
}

.production-grid-panel[hidden] {
  display: none !important;
}

.production-grid-panel .section-head {
  align-items: end;
  margin-bottom: 14px;
}

.production-grid-panel .section-head p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 0.74rem;
}

.production-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 220px));
  align-items: start;
  justify-content: center;
  gap: 14px;
}

.production-scene-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce3ea;
  border-radius: 11px;
  background: #fff;
}

.production-scene-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 9px 11px;
  border-bottom: 1px solid #e2e8ee;
}

.production-scene-card > header span,
.production-scene-card > header strong {
  font-size: 0.7rem;
  font-weight: 820;
}

.production-scene-card > header span {
  color: #344054;
}

.production-scene-card > header strong {
  color: #667085;
}

.production-scene-card.status-ready > header strong,
.production-scene-card.status-video_ready > header strong {
  color: var(--sq-teal-dark);
}

.production-scene-card.status-failed > header strong {
  color: #b42318;
}

.production-scene-media {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-bottom: 1px solid #e2e8ee;
  background: #eef2f5;
}

.scene-generation-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 18px;
  color: #075f55;
  text-align: center;
  background: rgba(238, 250, 247, 0.9);
  backdrop-filter: blur(4px);
}

.scene-generation-overlay.is-video {
  color: #4f46a5;
  background: rgba(243, 241, 255, 0.91);
}

.scene-generation-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid rgba(15, 139, 124, 0.2);
  border-top-color: #0f8b7c;
  border-radius: 999px;
  animation: spin 780ms linear infinite;
}

.scene-generation-overlay.is-video .scene-generation-spinner {
  border-color: rgba(99, 91, 190, 0.2);
  border-top-color: #635bbe;
}

.scene-generation-overlay strong {
  font-size: 0.82rem;
  font-weight: 900;
}

.scene-generation-overlay small {
  color: currentColor;
  font-size: 0.68rem;
  font-weight: 760;
  opacity: 0.78;
}

html[data-theme="dark"] .scene-generation-overlay {
  color: #6ee7d5;
  background: rgba(11, 30, 34, 0.91);
}

html[data-theme="dark"] .scene-generation-overlay.is-video {
  color: #c4bfff;
  background: rgba(26, 24, 51, 0.92);
}

@media (prefers-reduced-motion: reduce) {
  .scene-generation-spinner {
    animation: none;
  }
}

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

.production-grid-placeholder {
  display: grid;
  place-content: center;
  justify-items: center;
  width: 100%;
  height: 100%;
  gap: 7px;
  color: #7b8797;
}

.production-grid-placeholder span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #c8d2dc;
  border-radius: 10px;
  background: #fff;
  font-size: 0.86rem;
  font-weight: 820;
}

.production-grid-placeholder small {
  font-size: 0.68rem;
  font-weight: 700;
}

.production-scene-copy {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.production-scene-copy h3 {
  margin: 0;
  overflow: hidden;
  color: #17233a;
  font-size: 0.82rem;
  font-weight: 830;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-scene-copy p {
  display: -webkit-box;
  min-height: 2.8em;
  margin: 0;
  overflow: hidden;
  color: #667085;
  font-size: 0.72rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.production-scene-copy dl {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid #edf0f3;
}

.production-scene-copy dl div {
  display: flex;
  justify-content: space-between;
  min-width: 0;
  gap: 8px;
}

.production-scene-copy dt,
.production-scene-copy dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #7b8797;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-scene-copy dd {
  color: #344054;
  font-weight: 760;
}

.production-scene-copy dl .production-video-model-row {
  align-items: flex-start;
}

.production-scene-copy .production-video-model-row dd {
  overflow: visible;
  white-space: normal;
}

.production-model-trace {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 3px 5px;
  text-align: right;
}

.production-model-trace > span {
  color: #7b8797;
  font-size: 0.61rem;
  font-weight: 720;
}

.production-model-trace strong {
  color: #344054;
  font-size: 0.66rem;
  font-weight: 800;
}

.production-model-trace em,
.production-model-trace small {
  padding: 2px 5px;
  border-radius: 999px;
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}

.production-model-trace em {
  color: #6941c6;
  background: #f2edff;
}

.production-model-trace small {
  color: #087467;
  background: #e9f7f5;
}

.production-model-trace.is-missing strong {
  color: #b54708;
}

html[data-theme="dark"] .production-model-trace > span {
  color: #8fa0b5;
}

html[data-theme="dark"] .production-model-trace strong {
  color: #dce7f2;
}

html[data-theme="dark"] .production-model-trace em {
  color: #cbb6ff;
  background: #322657;
}

html[data-theme="dark"] .production-model-trace small {
  color: #70e1d7;
  background: #213c3a;
}

html[data-theme="dark"] .production-model-trace.is-missing strong {
  color: #fdbb74;
}

.production-scene-copy > button {
  min-height: 38px;
  border: 1px solid #9ecfc7;
  border-radius: 8px;
  color: var(--sq-teal-dark);
  background: #f6fbfa;
  font-size: 0.72rem;
  font-weight: 820;
  cursor: pointer;
}

.job-center-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 12px;
}

.job-center-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(290px, 34vw);
}

.job-center-search svg {
  position: absolute;
  left: 11px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #7b8797;
  stroke-width: 1.8;
  stroke-linecap: round;
  pointer-events: none;
}

.job-center-search input {
  width: 100%;
  min-height: 38px;
  padding: 7px 11px 7px 36px;
  border: 1px solid #d3dce5;
  border-radius: 8px;
  font-size: 0.76rem;
}

.active-job-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 13px;
  padding: 13px 14px;
}

.active-job-cover {
  display: grid;
  place-items: center;
  width: 58px;
  height: 72px;
  overflow: hidden;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  color: #637083;
  background: #eef2f5;
  font-size: 1rem;
  font-weight: 850;
}

.active-job-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.active-job-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.active-job-title-row h4 {
  display: -webkit-box;
  max-width: 760px;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.active-job-main > p {
  margin-top: 4px;
  color: #667085;
}

.job-technical-details {
  margin-top: 7px;
}

.job-technical-details summary {
  width: fit-content;
  color: #78869a;
  font-size: 0.68rem;
  font-weight: 720;
  cursor: pointer;
}

.job-technical-details code {
  display: block;
  max-height: 96px;
  margin-top: 7px;
  padding: 9px 10px;
  overflow: auto;
  border-radius: 7px;
  color: #5d6878;
  background: #f4f6f8;
  font-size: 0.66rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.active-job-actions {
  min-width: 138px;
}

.active-job-actions button {
  width: 100%;
}

.job-production-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 225px;
  min-width: 0;
  gap: 14px;
  padding: 16px;
  border: 1px solid #cfd9e3;
  border-radius: 12px;
  background: #fff;
}

.job-production-panel[hidden] {
  display: none !important;
}

.job-production-head,
.production-stage-rail {
  grid-column: 1 / -1;
}

.job-production-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 2px;
}

.job-production-head > div {
  min-width: 0;
}

.job-production-head > div > span {
  color: var(--sq-teal-dark);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.job-production-head h3 {
  max-width: 900px;
  margin: 4px 0;
  overflow: hidden;
  color: #17233a;
  font-size: 1rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-production-head p {
  margin: 0;
  color: #667085;
  font-size: 0.73rem;
}

.production-stage-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #dce3ea;
  border-radius: 9px;
  background: #f5f7f9;
}

.production-stage-rail span {
  position: relative;
  padding: 9px 12px;
  color: #7b8797;
  font-size: 0.7rem;
  font-weight: 760;
  text-align: center;
}

.production-stage-rail span + span {
  border-left: 1px solid #dce3ea;
}

.production-stage-rail span.done {
  color: var(--sq-teal-dark);
  background: #edf8f5;
}

.production-stage-rail span.active {
  color: #fff;
  background: var(--sq-teal);
}

.job-production-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: start;
  gap: 12px;
}

.job-production-scene {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce3ea;
  border-radius: 10px;
  background: #fff;
}

.job-production-scene > header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid #e3e8ee;
}

.job-production-scene > header span,
.job-production-scene > header strong {
  font-size: 0.68rem;
  font-weight: 800;
}

.job-production-scene > header strong {
  color: #667085;
}

.job-production-scene.is-complete > header strong {
  color: var(--sq-teal-dark);
}

.job-production-scene.is-generating > header strong {
  color: #1570a6;
}

.job-production-media {
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #eef2f5;
}

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

.job-production-placeholder {
  display: grid;
  place-content: center;
  justify-items: center;
  width: 100%;
  height: 100%;
  gap: 6px;
  color: #7b8797;
}

.job-production-placeholder span {
  font-size: 1rem;
  font-weight: 850;
}

.job-production-scene-body {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.job-production-scene-body h4 {
  margin: 0;
  overflow: hidden;
  color: #17233a;
  font-size: 0.77rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-production-scene-body p {
  display: -webkit-box;
  min-height: 2.7em;
  margin: 0;
  overflow: hidden;
  color: #667085;
  font-size: 0.68rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.job-production-scene-body > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 7px;
  border-top: 1px solid #edf0f3;
  color: #738095;
  font-size: 0.64rem;
  font-weight: 720;
}

.job-production-summary {
  align-self: stretch;
  padding: 14px;
  border: 1px solid #dce3ea;
  border-radius: 10px;
  background: #f8fafb;
}

.job-production-summary > strong {
  color: #17233a;
  font-size: 0.82rem;
  font-weight: 850;
}

.job-production-summary dl {
  display: grid;
  gap: 10px;
  margin: 13px 0 0;
}

.job-production-summary dl div {
  display: grid;
  gap: 3px;
  padding-bottom: 9px;
  border-bottom: 1px solid #e3e8ed;
}

.job-production-summary dt,
.job-production-summary dd {
  margin: 0;
  font-size: 0.69rem;
}

.job-production-summary dt {
  color: #7b8797;
}

.job-production-summary dd {
  color: #27364b;
  font-weight: 780;
}

.scene-image-empty {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 13px;
  border: 1px solid #d8e3e5;
  border-radius: 10px;
  color: #475467;
  background: #f8fbfb;
  text-align: left;
}

.inspector-readiness-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inspector-readiness-head > span {
  color: #17233a;
  font-size: 0.78rem;
  font-weight: 850;
}

.inspector-readiness-head > strong {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--sq-teal-dark);
  background: #e7f5f2;
  font-size: 0.64rem;
  font-weight: 820;
}

.inspector-readiness-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inspector-readiness-list li {
  position: relative;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-height: 43px;
}

.inspector-readiness-list li:not(:last-child)::after {
  position: absolute;
  top: 24px;
  bottom: 1px;
  left: 11px;
  width: 1px;
  background: #d6dee6;
  content: "";
}

.inspector-readiness-list li > span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid #cbd5df;
  border-radius: 50%;
  color: #7b8797;
  background: #fff;
  font-size: 0.62rem;
  font-weight: 850;
}

.inspector-readiness-list li.done > span {
  border-color: #9dd3c9;
  color: #fff;
  background: var(--sq-teal);
}

.inspector-readiness-list li.active > span {
  border-color: var(--sq-teal);
  color: var(--sq-teal-dark);
  box-shadow: 0 0 0 3px rgba(7, 143, 138, 0.1);
}

.inspector-readiness-list li > div {
  display: grid;
  gap: 1px;
}

.inspector-readiness-list strong {
  color: #344054;
  font-size: 0.7rem;
  font-weight: 820;
}

.inspector-readiness-list small {
  color: #7b8797;
  font-size: 0.63rem;
  line-height: 1.35;
}

.inspector-readiness-models {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid #dfe6ec;
}

.inspector-readiness-models > span {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
}

.inspector-readiness-models small {
  color: #7b8797;
  font-size: 0.62rem;
  font-weight: 720;
}

.inspector-readiness-models strong {
  overflow: hidden;
  color: #344054;
  font-size: 0.66rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1320px) {
  .video-style-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-config-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-config-summary .quick-customize-toggle {
    width: calc(100% - 24px);
    margin-block: 10px;
  }
}

@media (max-width: 900px) {
  .job-center-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .job-center-search {
    width: 100%;
  }

  .active-job-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .active-job-cover {
    width: 50px;
    height: 64px;
  }

  .active-job-actions {
    display: flex;
    grid-column: 2;
    min-width: 0;
  }

  .active-job-actions button {
    width: auto;
  }

  .job-production-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .job-production-head,
  .production-stage-rail {
    grid-column: 1;
  }
}

@media (max-width: 700px) {
  .video-style-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .video-style-card {
    grid-template-columns: 110px minmax(0, 1fr);
    grid-template-rows: auto;
    min-height: 108px;
  }

  .video-style-card-visual {
    border-right: 1px solid #e6ebf1;
    border-bottom: 0;
  }

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

  .quick-config-summary > div {
    min-height: 64px;
    border-bottom: 1px solid #e3e9ef;
  }

  .quick-config-summary .quick-config-primary,
  .quick-config-summary .quick-customize-toggle {
    grid-column: 1 / -1;
  }

  .quick-model-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-start > .quick-steps {
    grid-template-columns: repeat(5, minmax(72px, 1fr));
    overflow-x: auto;
  }

  .storyboard-list .scene-card,
  .storyboard-list.is-montage .scene-card,
  .storyboard-list.is-hand-closeup .scene-card,
  .storyboard-list.is-montage .scene-card.has-scene-image,
  .storyboard-list.is-montage .scene-card.has-scene-video {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 15px;
  }

  .storyboard-list.is-script-review .scene-card,
  .storyboard-list.is-script-review.is-montage .scene-card,
  .storyboard-list.is-script-review.is-hand-closeup .scene-card {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px;
  }

  .storyboard-list.is-script-review .scene-workspace {
    padding-left: 0;
  }

  .scene-review-index {
    width: 44px;
    min-height: 64px;
  }

  .storyboard-list .scene-media-slot,
  .storyboard-list.is-montage .scene-card .scene-media-slot,
  .storyboard-list.is-montage .scene-card.has-scene-image .scene-media-slot,
  .storyboard-list.is-montage .scene-card.has-scene-video .scene-media-slot {
    width: min(100%, 180px);
    justify-self: center;
  }

  .scene-workspace {
    padding-left: 0;
  }

  .scene-head {
    flex-direction: column;
  }

  .scene-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .scene-actions .scene-primary-action {
    flex: 1 1 100%;
  }

  .scene-board-tabs {
    overflow-x: auto;
  }

  .scene-board-video-panel:not([hidden]),
  .scene-metadata-fields .scene-foot {
    grid-template-columns: minmax(0, 1fr);
  }

  .production-grid {
    grid-template-columns: repeat(2, minmax(0, 220px));
    justify-content: center;
  }

  .active-job-row {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 10px;
  }

  .active-job-cover {
    width: 44px;
    height: 58px;
  }

  .active-job-title-row {
    align-items: flex-start;
    flex-direction: column-reverse;
    gap: 5px;
  }

  .active-job-meta {
    flex-wrap: wrap;
  }

  .active-job-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }

  .active-job-actions button {
    flex: 1 1 130px;
  }

  .job-production-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 460px) {
  .production-grid {
    grid-template-columns: minmax(0, 220px);
    justify-content: center;
  }
}

/* Keep progressive-create layout overrides last in the cascade. */
.quick-start > .quick-copy {
  order: 0;
}

.quick-start > .creation-path-switch {
  order: 1;
}

.quick-start > .create-method-section {
  order: 2;
}

.quick-start > .create-step-rail,
.quick-start > .manual-step-rail {
  order: 3;
}

.quick-start > .create-model-controls {
  order: 4;
}

.quick-start > .quick-action {
  order: 5;
}

.quick-start > .quick-steps {
  order: 6;
}

.generation-method-dialog-menu {
  grid-template-columns: 1fr;
}

.primary-create-action[hidden],
#autoReviewBtn[hidden],
#manualStagePrimaryBtn[hidden],
.manual-studio-panel[hidden],
.manual-step-rail[hidden],
.manual-image-selection[hidden],
.manual-finishing-controls[hidden],
.reviewer-primary-action[hidden] {
  display: none !important;
}

.quick-action .url-row {
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 0.8fr) 210px;
}

.quick-config-summary {
  grid-template-columns: minmax(190px, 1.35fr) repeat(2, minmax(105px, 0.78fr)) auto;
}

@media (max-width: 1180px) {
  .quick-action .url-row {
    grid-template-columns: minmax(0, 1fr) 210px;
  }

  .create-execution-summary {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 720px) {
  .create-model-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .create-model-controls .quick-model-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-action .url-row {
    grid-template-columns: 1fr;
  }

  .create-execution-summary {
    grid-column: auto;
    grid-row: auto;
  }
}

/* Workflow sidebar final cascade lock v111. */
@media (min-width: 901px) {
  .app-shell {
    grid-template-columns: 252px minmax(680px, 1fr) 318px;
  }

  .sidebar {
    width: 252px;
    overflow-x: hidden;
    overflow-y: auto;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 166px;
  }

  .sidebar {
    width: 100%;
    max-height: 166px;
    padding: 9px 12px 8px;
    overflow: hidden;
  }

  .sidebar .brand {
    padding-bottom: 7px;
  }

  .sidebar .nav-list {
    padding-right: 112px;
  }

  .sidebar-account-nav {
    position: absolute;
    top: 48px;
    right: 12px;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .sidebar-workflow-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin-top: 7px;
    padding: 7px 0 0;
    overflow: hidden;
    border-bottom: 0;
  }

  .sidebar .sidebar-step-menu,
  .sidebar .create-step-rail,
  .sidebar .manual-step-rail {
    display: flex;
    gap: 5px;
    overflow-x: auto;
  }

  .sidebar .sidebar-step-menu button {
    width: auto;
    min-width: max-content;
  }

  .topbar {
    top: 166px;
  }
}

/* Creation summary clarity lock v114. */
.quick-action .url-row {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 250px);
}

.quick-action .url-row > #productUrlInput {
  grid-column: 1;
  grid-row: 1;
}

.quick-action .url-row > .primary-create-action {
  grid-column: 2;
  grid-row: 1;
}

.quick-action .url-row > .create-execution-summary {
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: minmax(0, 1.5fr) minmax(170px, 0.8fr) minmax(135px, 0.65fr);
  min-height: 76px;
  overflow: visible;
  border-color: #cbd8e2;
  background: #f8fafc;
}

.create-execution-summary > div {
  min-height: 74px;
  gap: 4px;
  padding: 11px 14px;
}

.create-execution-summary span {
  color: #607087;
  font-size: 0.76rem;
}

.create-execution-summary strong {
  display: block;
  overflow: visible;
  color: #172b45;
  font-size: 0.88rem;
  line-height: 1.4;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.primary-create-action .primary-button,
.primary-create-action .import-product-button {
  border-color: #078f8a;
  background: #078f8a;
  color: #fff;
  opacity: 1;
}

.primary-create-action .primary-button:hover:not(:disabled),
.primary-create-action .import-product-button:hover:not(:disabled) {
  border-color: #067a76;
  background: #067a76;
  color: #fff;
}

.primary-create-action .primary-button:disabled,
.primary-create-action .import-product-button:disabled {
  border-color: #cbd5df;
  background: #e8edf2;
  color: #5a6878;
  opacity: 1;
}

.primary-create-action > span {
  color: #516174;
  font-size: 0.76rem;
  font-weight: 720;
}

@media (max-width: 720px) {
  .quick-action .url-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-action .url-row > #productUrlInput,
  .quick-action .url-row > .primary-create-action,
  .quick-action .url-row > .create-execution-summary {
    grid-column: 1;
  }

  .quick-action .url-row > #productUrlInput {
    grid-row: 1;
  }

  .quick-action .url-row > .primary-create-action {
    grid-row: 2;
  }

  .quick-action .url-row > .create-execution-summary {
    grid-row: 3;
    grid-template-columns: minmax(0, 1fr);
  }

  .create-execution-summary > div {
    min-height: 64px;
    border-right: 0;
    border-bottom: 1px solid #e1e8ee;
  }

  .create-execution-summary > div:last-child {
    border-bottom: 0;
  }
}

/* Approved mockup final cascade lock v115. */
@media (min-width: 1181px) {
  .app-shell {
    grid-template-columns: 268px minmax(720px, 1fr) 356px;
    background: #fff;
  }

  .sidebar {
    width: 268px;
  }
}

.sidebar {
  padding: 20px 10px 18px;
  border-right: 1px solid var(--sq-mock-line);
  color: var(--sq-mock-ink);
  background: #fff;
}

.sidebar .brand {
  min-height: 68px;
  gap: 12px;
  padding: 0 17px 18px;
}

.sidebar .brand-mark {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-radius: 11px;
  background: linear-gradient(145deg, #08aaa0, #087d79);
  box-shadow: 0 7px 16px rgba(7, 149, 143, 0.18);
}

.sidebar .brand-mark svg {
  width: 25px;
  height: 25px;
  fill: #fff;
}

.sidebar .brand strong {
  color: var(--sq-mock-ink);
  font-size: 1.06rem;
}

.sidebar .brand small {
  color: var(--sq-mock-teal);
  font-size: 0.76rem;
}

.sidebar .nav-list {
  gap: 6px;
  padding: 5px 0 14px;
  border-bottom: 1px solid var(--sq-mock-line);
}

.sidebar .nav-item,
.sidebar .nav-item:not(.active) {
  min-height: 52px;
  gap: 13px;
  padding: 12px 17px;
  border: 0;
  border-radius: 7px;
  color: #26364f;
  background: transparent;
  font-size: 0.9rem;
}

.sidebar .nav-item::before {
  top: 0;
  bottom: 0;
  left: -10px;
  width: 3px;
}

.sidebar .nav-item:hover {
  color: var(--sq-mock-teal-dark);
  background: #f3f8f8;
}

.sidebar .nav-item.active {
  color: var(--sq-mock-teal-dark);
  background: linear-gradient(90deg, #edf8f7, #f7fbfb);
}

.sidebar .nav-item.active::before {
  background: var(--sq-mock-teal);
}

.sidebar-workflow-nav {
  margin-top: 17px;
  padding: 0 14px 14px;
  border: 0;
}

.sidebar-workflow-nav > header span {
  color: #26364f;
}

.sidebar-workflow-nav > header strong {
  color: var(--sq-mock-teal-dark);
  background: #eaf7f5;
}

.sidebar .sidebar-step-menu,
.sidebar .create-step-rail,
.sidebar .manual-step-rail {
  gap: 0;
  margin: 0;
  padding: 0;
}

.sidebar .sidebar-step-menu button {
  min-height: 54px;
  gap: 12px;
  padding: 6px 7px;
  border: 0;
  border-radius: 7px;
  color: #526078;
  background: transparent;
}

.sidebar .sidebar-step-menu button:not(:last-child)::after {
  top: 36px;
  left: 20px;
  height: 24px;
  background: #cfd9e2;
}

.sidebar .sidebar-step-menu button strong {
  width: 31px;
  height: 31px;
  flex-basis: 31px;
  border-color: #cbd6df;
  color: #455268;
  background: #fff;
}

.sidebar .sidebar-step-menu button span {
  font-size: 0.83rem;
}

.sidebar .sidebar-step-menu button.active {
  color: var(--sq-mock-teal-dark);
  background: #eef8f7;
}

.sidebar .sidebar-step-menu button.active strong,
.sidebar .sidebar-step-menu button.done strong {
  border-color: var(--sq-mock-teal);
  color: #fff;
  background: var(--sq-mock-teal);
}

.sidebar .sidebar-step-menu button.done {
  color: #4b596e;
}

.sidebar-account-nav {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--sq-mock-line);
}

.workspace {
  gap: 18px;
  padding: 0 26px 36px;
  background: #fff;
}

.topbar {
  min-height: 90px;
  margin: 0 -26px 2px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--sq-mock-line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: none;
}

.topbar h1 {
  color: var(--sq-mock-ink);
  font-size: 1.62rem;
}

.member-menu {
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wallet-balance-button {
  order: -1;
  min-height: 42px;
  border: 1px solid var(--sq-mock-line);
  border-radius: 7px;
  color: #314057;
  background: #fff;
}

#adminBtn {
  min-height: 34px;
  border: 1px solid var(--sq-mock-teal);
  border-radius: 6px;
  color: var(--sq-mock-teal-dark);
  background: #fff;
}

.quick-start.panel {
  padding: 0 18px 20px;
  border: 1px solid var(--sq-mock-line);
  border-radius: var(--sq-mock-radius);
  background: #fff;
  box-shadow: none;
}

.quick-start > .quick-copy {
  display: none;
}

.workspace-control-heading {
  order: 0;
}

.quick-start > .creation-path-switch {
  order: 1;
}

.quick-start > .create-method-section {
  order: 2;
}

.quick-start > .quick-action {
  order: 3;
}

.quick-start > .create-model-controls {
  order: 4;
}

.quick-start > .quick-steps {
  display: none;
  order: 5;
}

.creation-path-switch {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #cbd6df;
  border-radius: 7px;
  background: #fff;
}

.creation-path-card,
.creation-path-card:not(.active) {
  min-height: 40px;
  justify-content: center;
  padding: 7px 14px;
  border: 0;
  border-radius: 0;
  color: #26364f;
  background: #fff;
}

.creation-path-card + .creation-path-card {
  border-left: 1px solid #cbd6df;
}

.creation-path-card.active {
  color: #fff;
  background: linear-gradient(90deg, #079c96, #078b86);
}

.creation-path-card .creation-path-icon,
.creation-path-card small {
  display: none;
}

.create-method-compact {
  padding: 20px 0 16px;
  border: 0;
  border-bottom: 1px solid var(--sq-mock-line);
  border-radius: 0;
  background: transparent;
}

.create-method-compact > div {
  display: grid;
  max-width: 520px;
  gap: 8px;
}

.create-method-trigger {
  min-height: 48px;
  border-color: #cbd6df;
  border-radius: 7px;
}

.quick-action {
  padding: 20px 0 12px;
}

.quick-action > label[for="productUrlInput"] {
  color: var(--sq-mock-ink);
  font-size: 1.06rem;
}

.quick-action > label[for="productUrlInput"]::before {
  margin-right: 5px;
  content: "1.";
}

.quick-action .url-row {
  grid-template-columns: minmax(0, 1fr) 150px;
}

.quick-action .url-row > #productUrlInput {
  grid-column: 1;
  grid-row: 1;
}

.quick-action .url-row > .primary-create-action {
  grid-column: 2;
  grid-row: 1;
}

.quick-action .url-row > .create-execution-summary {
  display: none;
}

.create-model-controls {
  grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr);
  gap: 15px;
  margin-top: 8px;
  padding: 15px 0 4px;
  border: 0;
  border-top: 1px solid var(--sq-mock-line);
  border-radius: 0;
  background: #fff;
}

.create-model-controls .quick-model-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.simple-clip-settings {
  margin-top: 12px;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--sq-mock-line);
  border-radius: 0;
  background: #fff;
}

.video-style-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.video-style-card {
  min-height: 132px;
  border-radius: 8px;
}

.storyboard-panel {
  border-radius: var(--sq-mock-radius);
  box-shadow: none;
}

.inspector {
  gap: 10px;
  padding: 17px 18px;
  border-left: 1px solid var(--sq-mock-line);
  background: #fbfcfd;
}

.inspector .inspector-card,
.inspector .inspector-card:not(:first-child) {
  display: block !important;
  padding: 0;
  border: 1px solid var(--sq-mock-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

.inspector .inspector-account-card {
  display: grid !important;
  padding: 10px 12px;
}

.inspector .policy-card {
  display: none !important;
}

@media (max-width: 1450px) and (min-width: 1181px) {
  .app-shell {
    grid-template-columns: 232px minmax(650px, 1fr) 320px;
  }

  .sidebar {
    width: 232px;
  }

  .workspace {
    padding-inline: 20px;
  }

  .topbar {
    margin-inline: -20px;
    padding-inline: 20px;
  }

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

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .sidebar {
    width: 224px;
  }

  .inspector {
    position: static;
    grid-column: 2;
    max-height: none;
    border-top: 1px solid var(--sq-mock-line);
    border-left: 0;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--sq-mock-line);
  }

  .inspector {
    grid-column: 1;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding-inline: 12px;
  }

  .topbar {
    min-height: 66px;
    margin-inline: -12px;
    padding-inline: 14px;
  }

  .topbar h1 {
    font-size: 1.18rem;
  }

  .quick-start.panel {
    padding-inline: 12px;
  }

  .quick-action .url-row,
  .create-model-controls,
  .create-model-controls .quick-model-controls,
  .video-style-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-action .url-row > #productUrlInput,
  .quick-action .url-row > .primary-create-action {
    grid-column: 1;
  }

  .quick-action .url-row > #productUrlInput {
    grid-row: 1;
  }

  .quick-action .url-row > .primary-create-action {
    grid-row: 2;
  }
}

/* Approved mockup QA cascade lock v115. */
.member-menu {
  display: flex;
  grid-template-columns: none;
}

.creation-path-card > span:not(.creation-path-icon) {
  width: auto;
  min-width: 0;
}

.creation-path-card strong {
  display: block;
  margin: 0;
  white-space: nowrap;
}

.quick-action .primary-create-action {
  min-width: 0;
}

.quick-action .primary-create-action > span {
  display: none;
}

body[data-creation-path="manual"][data-manual-step="1"] .manual-studio-panel {
  display: none !important;
}

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

.creation-path-card,
.creation-path-card.active,
.creation-path-card:not(.active) {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  justify-content: center;
}

/* v121 production cascade lock. */
html[data-theme="dark"] :where(
  .creation-entry-label,
  .create-method-compact > div > span,
  .compact-choice-field > span,
  .product-upload-shortcut strong,
  .sidebar-workflow-nav > header span,
  .account-detail-list dd
) {
  color: #dce7f2 !important;
}

html[data-theme="dark"] :where(
  .account-detail-list > div,
  .inspector-context-card[open] > summary,
  .inspector-accordion[open] > summary
) {
  border-color: #29374a !important;
}

html[data-theme="dark"] :where(
  .inspector .inspector-card,
  .inspector .inspector-card:not(:first-child),
  .inspector-product-preview,
  .inspector-fact-list,
  .product-upload-shortcut
) {
  border-color: #34445a !important;
  color: #edf4fb !important;
  background: #111a25 !important;
}

html[data-theme="dark"] :where(
  .inspector-product-preview strong,
  .inspector-fact-list dd
) {
  color: #edf4fb !important;
}

html[data-theme="dark"] .compact-choice-group button {
  border-color: #34445a !important;
  color: #dce7f2 !important;
  background: #0e1722 !important;
}

html[data-theme="dark"] .compact-choice-group button:is(.active, [aria-checked="true"]) {
  border-color: #2c716c !important;
  color: #70e1d7 !important;
  background: #15312f !important;
}

.sidebar .brand-mark,
.auth-brand .brand-mark {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sidebar .brand-mark svg,
.auth-brand .brand-mark svg {
  width: 46px;
  height: 46px;
  fill: initial;
}

.creation-entry-panel,
.creation-entry-panel .create-method-compact > div {
  display: grid;
  max-width: none;
}

.generation-method-segmented {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.generation-method-segmented .generation-method-card,
.generation-method-segmented .generation-method-card.active,
.generation-method-segmented .generation-method-card:not(.active) {
  display: flex !important;
}

.generation-method-segmented .generation-method-card[hidden] {
  display: none !important;
}

.manual-step-footer {
  display: flex;
}

.manual-step-footer[hidden] {
  display: none !important;
}

.jobs-library-view {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 8px;
}

.active-job-actions {
  display: flex;
  min-width: 220px;
  flex-wrap: nowrap;
  gap: 8px;
}

.active-job-actions > * {
  min-width: 104px;
  flex: 1 1 0;
  min-height: 38px;
  white-space: nowrap;
}

.settings-view {
  width: min(100%, 1160px);
  margin-inline: auto;
  padding-inline: 8px;
}

@media (min-width: 1280px) {
  .app-shell.jobs-mode,
  .app-shell.settings-mode {
    grid-template-columns: 268px minmax(0, 1fr);
  }

  .app-shell.jobs-mode .sidebar,
  .app-shell.settings-mode .sidebar {
    width: 268px;
  }
}

@media (max-width: 1279px) and (min-width: 901px) {
  .app-shell.jobs-mode,
  .app-shell.settings-mode {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .app-shell.jobs-mode .sidebar,
  .app-shell.settings-mode .sidebar {
    width: 224px;
  }
}

@media (max-width: 760px) {
  .active-job-actions {
    min-width: 0;
    flex-wrap: wrap;
  }
}

/* Workflow order, compact model controls, and character manager v195. */
.pre-product-video-style {
  display: grid;
  gap: 14px;
  padding: 18px 0 4px;
  border-top: 1px solid var(--sq-mock-line, #dce5ec);
}

.pre-product-video-style-heading {
  display: grid;
  grid-template-columns: minmax(150px, 0.22fr) minmax(240px, 0.38fr) minmax(280px, 1fr);
  align-items: baseline;
  gap: 14px;
}

.pre-product-video-style-heading > span {
  color: var(--sq-mock-ink, #17233a);
  font-size: 1rem;
  font-weight: 850;
}

.pre-product-video-style-heading > strong {
  color: var(--sq-mock-ink, #17233a);
  font-size: 1.02rem;
}

.pre-product-video-style-heading > small {
  color: #667085;
  font-size: 0.82rem !important;
}

.pre-product-video-style-heading > small[hidden] {
  display: none !important;
}

.pre-product-video-style-heading:has(> small[hidden]) {
  grid-template-columns: minmax(150px, 0.3fr) minmax(240px, 1fr);
}

.pre-product-video-style .video-style-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.pre-product-video-style .video-style-field > legend,
.pre-product-video-style .video-style-select-layout {
  display: none;
}

.pre-product-video-style .video-style-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.pre-product-video-style .video-style-card {
  min-height: 116px;
}

.pre-product-video-style .video-style-auto-card .video-style-card-visual {
  display: grid;
  place-items: center;
  color: var(--sq-teal, #078f8a);
  font-size: 1.8rem;
  font-weight: 900;
}

.duration-choice-group button {
  min-height: 48px;
  padding: 10px 14px;
}

.duration-choice-group button strong {
  font-size: 1rem;
  white-space: nowrap;
}

#quickVideoDurationHint,
#quickResolutionHint {
  display: none !important;
}

.reviewer-picker-body {
  display: grid !important;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr) !important;
  align-items: start;
  gap: 18px;
  min-width: 0;
}

.reviewer-preview-frame {
  display: grid !important;
  place-items: center;
  width: 100%;
  max-width: 360px;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 4 / 5;
  align-self: start;
  overflow: hidden;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  background: #eef4f8;
}

.reviewer-preview-frame .reviewer-portrait-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reviewer-options {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start;
  gap: 8px;
  min-width: 0;
  max-height: 450px;
  padding-right: 6px;
  overflow: auto;
  overscroll-behavior: contain;
}

.reviewer-option {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 78px;
  padding: 11px 14px;
  overflow: hidden;
}

.reviewer-option .reviewer-option-copy,
.reviewer-option .reviewer-option-title,
.reviewer-option .reviewer-option-name {
  min-width: 0;
}

.reviewer-option .reviewer-option-copy small {
  min-height: 0;
  font-size: 0.7rem;
  line-height: 1.4;
  -webkit-line-clamp: 2;
}

.account-character-manager {
  display: grid;
  gap: 18px;
}

.account-character-manager-head,
.account-character-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.account-character-manager-head h3,
.account-character-manager-head p {
  margin: 0;
}

.account-character-manager-head p {
  margin-top: 4px;
  color: #667085;
}

.account-character-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
  min-height: 560px;
}

.account-character-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  background: #eef4f8;
}

.account-character-preview > .reviewer-portrait-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-character-preview-copy {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 10px;
  color: #fff;
  background: rgba(16, 24, 40, 0.76);
  backdrop-filter: blur(8px);
}

.account-character-preview-copy span {
  font-size: 0.78rem;
}

.account-character-empty {
  display: grid;
  gap: 6px;
  padding: 24px;
  color: #667085;
  text-align: center;
}

.account-character-empty strong {
  color: #344054;
}

.account-character-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}

.account-character-list-head {
  padding: 2px 0 8px;
  border-bottom: 1px solid #e4e7ec;
}

.account-character-list-head small {
  color: #667085;
}

.account-character-list {
  display: grid;
  align-content: start;
  gap: 9px;
  max-height: 620px;
  padding-right: 4px;
  overflow: auto;
}

.account-character-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 94px;
  padding: 14px 16px;
  border: 1px solid #d9e2ec;
  border-radius: 11px;
  color: #17233a;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.account-character-row:hover,
.account-character-row.active {
  border-color: var(--sq-teal, #078f8a);
}

.account-character-row.active {
  background: var(--sq-teal-soft, #eefaf8);
  box-shadow: 0 0 0 2px rgba(7, 143, 138, 0.1);
}

.account-character-row-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.account-character-row-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: #667085;
  font-size: 0.76rem !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.account-character-row > em {
  padding: 4px 7px;
  border-radius: 999px;
  color: #087467;
  background: #e8f7f4;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
}

.account-character-list-empty {
  display: grid;
  gap: 5px;
  padding: 28px 20px;
  border: 1px dashed #cfd8e3;
  border-radius: 11px;
  color: #667085;
  text-align: center;
}

.account-character-list-empty strong {
  color: #344054;
}

.account-character-editor-host .reviewer-details {
  margin: 0;
}

html[data-theme="dark"] .pre-product-video-style-heading > :is(span, strong),
html[data-theme="dark"] .account-character-manager-head h3,
html[data-theme="dark"] .account-character-list-head strong,
html[data-theme="dark"] .account-character-row,
html[data-theme="dark"] .account-character-empty strong,
html[data-theme="dark"] .account-character-list-empty strong {
  color: #edf4fb;
}

html[data-theme="dark"] :is(.reviewer-preview-frame, .account-character-preview) {
  border-color: #34445a;
  background: #0e1722;
}

html[data-theme="dark"] .account-character-row {
  border-color: #34445a;
  background: #111c29;
}

html[data-theme="dark"] .account-character-row.active {
  border-color: #2c716c;
  background: #15312f;
}

html[data-theme="dark"] .reviewer-chooser {
  border-color: #34445a;
  background: #111c29;
}

html[data-theme="dark"] .reviewer-chooser > summary :is(span, strong) {
  color: #edf4fb;
}

html[data-theme="dark"] .reviewer-chooser > summary small {
  color: #7edbd1;
}

html[data-theme="dark"] .reviewer-chooser-content {
  border-top-color: #34445a;
}

html[data-theme="dark"] .reviewer-option {
  border-color: #34445a;
  color: #edf4fb;
  background: #111c29;
}

html[data-theme="dark"] .reviewer-option:hover {
  border-color: #52716f;
}

html[data-theme="dark"] .reviewer-option.active {
  border-color: #4ab5aa;
  color: #edf4fb;
  background: #15312f;
}

html[data-theme="dark"] .reviewer-option :is(.reviewer-option-name, small) {
  color: inherit;
}

html[data-theme="dark"] .toast {
  border-color: #3b5c59;
  color: #edf4fb;
  background: rgba(17, 28, 41, 0.98);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

@media (max-width: 1450px) {
  .pre-product-video-style .video-style-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .pre-product-video-style-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .pre-product-video-style-heading:has(> small[hidden]) {
    grid-template-columns: minmax(0, 1fr);
  }

  .pre-product-video-style .video-style-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reviewer-picker-body,
  .account-character-workspace {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .reviewer-preview-frame,
  .account-character-preview {
    width: min(100%, 320px);
    min-height: 0;
    margin-inline: auto;
  }

  .reviewer-options {
    width: 100%;
    max-height: 420px;
  }

  .account-character-list {
    max-height: none;
  }
}

@media (max-width: 560px) {
  html,
  body,
  .app-shell {
    max-width: 100%;
    overflow-x: clip;
  }

  .app-shell,
  .app-shell.jobs-mode,
  .app-shell.settings-mode {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .workspace,
  .topbar,
  .topbar-actions,
  .creation-entry-panel,
  .quick-start,
  .manual-studio-panel,
  .simple-clip-settings,
  .reviewer-picker,
  .reviewer-chooser,
  .settings-view {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    overflow: hidden;
  }

  .topbar-actions {
    justify-content: flex-end;
    overflow: hidden;
  }

  .topbar .member-menu,
  .topbar #adminBtn {
    display: none !important;
  }

  .inspector {
    display: none !important;
  }

  .pre-product-video-style .video-style-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .pre-product-video-style .video-style-card {
    min-height: 92px;
  }

  .account-character-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-character-row > em {
    grid-column: 1;
    width: fit-content;
  }
}

/* Organized model controls v140. */
.creation-entry-panel > .create-model-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding-top: 18px;
}

.create-model-controls-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 4px 18px;
}

.create-model-controls-heading > strong {
  grid-column: 1;
  color: var(--sq-mock-ink);
  font-size: 0.98rem;
  line-height: 1.3;
}

.create-model-controls-heading > small {
  grid-column: 2;
  color: #738096;
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: right;
}

.create-model-controls .quick-model-controls,
.create-model-controls .quick-model-controls:has(#quickResolutionField:not([hidden])) {
  display: grid;
  grid-template-columns: minmax(190px, 1.05fr) minmax(270px, 1.35fr) minmax(170px, 0.85fr) minmax(190px, 0.95fr);
  align-items: stretch;
  gap: 12px;
}

.create-model-controls .compact-choice-field {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  gap: 11px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  background: #fbfcfd;
}

.create-model-controls .compact-choice-field > span {
  padding-bottom: 10px;
  border-bottom: 1px solid #e4eaf0;
  color: #344054;
  font-size: 0.78rem;
  font-weight: 820;
  line-height: 1.25;
}

.create-model-controls .compact-choice-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
}

.create-model-controls .compact-choice-group > button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 9px 10px;
  overflow: visible;
  border-radius: 8px;
  font-size: 0.73rem;
  line-height: 1.3;
  text-overflow: clip;
  white-space: normal;
}

.create-model-controls .compact-choice-group > button:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

#quickVideoModelButtons > button:first-child {
  grid-column: 1 / -1;
}

#quickVideoModelButtons > button[data-compact-value="veo-3.1-lite-lower-priority"] {
  grid-column: 1 / -1;
}

.create-model-controls :is(.duration-choice-group, .resolution-choice-group) button {
  min-height: 48px;
  flex: none;
}

html[data-theme="dark"] .create-model-controls .compact-choice-field {
  border-color: #34445a;
  background: #0e1722;
}

html[data-theme="dark"] .create-model-controls .compact-choice-field > span {
  border-bottom-color: #29374a;
  color: #dce7f2 !important;
}

@media (max-width: 1380px) {
  .create-model-controls .quick-model-controls,
  .create-model-controls .quick-model-controls:has(#quickResolutionField:not([hidden])) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .create-model-controls-heading {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .create-model-controls-heading > small {
    grid-column: 1;
    text-align: left;
  }

  .create-model-controls .quick-model-controls,
  .create-model-controls .quick-model-controls:has(#quickResolutionField:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 340px) {
  .create-model-controls .compact-choice-group {
    grid-template-columns: minmax(0, 1fr);
  }

  .create-model-controls .compact-choice-group > button,
  #quickVideoModelButtons > button:first-child,
  #quickVideoModelButtons > button[data-compact-value="veo-3.1-lite-lower-priority"] {
    grid-column: 1;
  }
}

/* Sticky manual production feedback v141. */
.manual-step-footer {
  position: sticky;
  z-index: 24;
  bottom: 12px;
  box-shadow: 0 12px 30px rgba(28, 40, 36, 0.12);
}

.manual-step-footer-default[hidden],
.manual-footer-progress[hidden],
.manual-footer-progress-actions[hidden] {
  display: none !important;
}

.manual-footer-progress {
  display: grid !important;
  min-width: 0;
  flex: 1 1 auto;
  grid-template-columns: auto minmax(180px, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
}

.manual-footer-progress > .work-spinner {
  width: 18px;
  height: 18px;
}

.manual-step-footer[data-work-tone="busy"] .manual-footer-progress > .work-spinner {
  animation: spin 780ms linear infinite;
}

.manual-footer-progress-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.manual-footer-progress-copy > strong {
  overflow: hidden;
  color: #17233a;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-footer-progress-copy > small {
  overflow: hidden;
  color: #667085;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-footer-progress-track {
  position: relative;
  display: block;
  width: 100%;
  height: 5px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #dff4ee;
}

.manual-footer-progress-track > i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: #0f8b7c;
  transition: width 280ms ease;
}

#manualFooterElapsed,
#manualFooterProgressPercent {
  color: #087467;
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.manual-footer-progress-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.manual-footer-progress-actions > button {
  min-width: 0;
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.72rem;
}

.manual-step-footer[data-work-tone="fail"],
.manual-step-footer[data-work-tone="warn"] {
  border-color: #f0b8b1;
  background: #fff7f5;
}

.manual-step-footer[data-work-tone="fail"] .manual-footer-progress-track,
.manual-step-footer[data-work-tone="warn"] .manual-footer-progress-track {
  background: #fde2de;
}

.manual-step-footer[data-work-tone="fail"] .manual-footer-progress-track > i,
.manual-step-footer[data-work-tone="warn"] .manual-footer-progress-track > i {
  background: #c94135;
}

.manual-step-footer[data-work-tone="fail"] :is(#manualFooterElapsed, #manualFooterProgressPercent),
.manual-step-footer[data-work-tone="warn"] :is(#manualFooterElapsed, #manualFooterProgressPercent) {
  color: #b9352b;
}

.work-retry-dialog {
  width: min(92vw, 520px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #d7e0e8;
  border-radius: 14px;
  color: #17233a;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.work-retry-dialog::backdrop {
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(2px);
}

.work-retry-dialog > form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 22px;
}

.work-retry-dialog-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #087467;
  background: #e8f7f4;
  font-size: 1.2rem;
  font-weight: 900;
}

.work-retry-dialog h2 {
  margin: 0 0 6px;
  font-size: 1.04rem;
}

.work-retry-dialog p {
  margin: 0;
  color: #667085;
  font-size: 0.82rem;
  line-height: 1.55;
}

.work-retry-dialog-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

html[data-theme="dark"] .manual-step-footer {
  border-color: #34445a;
  background: #111c29;
}

html[data-theme="dark"] .manual-footer-progress-copy > strong {
  color: #edf4fb;
}

html[data-theme="dark"] .manual-footer-progress-copy > small {
  color: #9ba9b8;
}

html[data-theme="dark"] .manual-step-footer[data-work-tone="fail"],
html[data-theme="dark"] .manual-step-footer[data-work-tone="warn"] {
  border-color: #6f3b3a;
  background: #26191d;
}

html[data-theme="dark"] .work-retry-dialog {
  border-color: #34445a;
  color: #edf4fb;
  background: #111c29;
}

html[data-theme="dark"] .work-retry-dialog p {
  color: #9ba9b8;
}

@media (max-width: 760px) {
  .manual-step-footer {
    bottom: 8px;
    flex-wrap: wrap;
    padding: 12px;
  }

  .manual-footer-progress {
    flex-basis: 100%;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .manual-footer-progress > .work-spinner {
    grid-row: 1;
  }

  .manual-footer-progress-copy {
    grid-column: 2;
  }

  #manualFooterElapsed {
    display: none;
  }

  #manualFooterProgressPercent {
    grid-column: 3;
    grid-row: 1;
  }

  .manual-footer-progress-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .manual-footer-progress-actions > button {
    flex: 1 1 0;
  }

  .work-retry-dialog > form {
    padding: 18px;
  }
}

/* SceneQuence minimal workspace v206.
   Accepted V2 direction: quiet surfaces, clear type hierarchy, contextual inspector. */
:root {
  --sq-v2-surface-soft: #f8fafc;
  --sq-v2-surface-muted: #f2f4f7;
  --sq-v2-text-muted: #667085;
  --sq-v2-text-subtle: #98a2b3;
  --sq-v2-selected: #eaf7f5;
  --sq-v2-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.08);
  --sq-v2-shadow-panel: 0 8px 24px rgba(16, 24, 40, 0.04);
}

.app-shell,
.inspector,
.workspace {
  transition:
    grid-template-columns 220ms ease,
    width 220ms ease,
    padding 220ms ease;
}

/* Main setup surface: hierarchy comes from space and tone instead of boxes. */
.creation-entry-panel {
  gap: 24px !important;
  padding: 26px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: var(--sq-v2-shadow-panel) !important;
}

.creation-entry-panel .workspace-control-heading {
  align-items: flex-start;
  flex-direction: row;
  justify-content: space-between;
  gap: 16px;
}

.creation-entry-panel .workspace-control-heading > div {
  display: grid;
  gap: 5px;
}

.creation-entry-panel .workspace-control-heading > div > strong {
  color: var(--sq-mock-ink, #17233a);
  font-size: 1.22rem;
  font-weight: 850;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.creation-entry-panel .workspace-control-heading > div > span {
  color: var(--sq-v2-text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.clear-project-button {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 5px 14px 5px 6px;
  border: 1px solid #dbe5e7;
  border-radius: 999px;
  color: #344054;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.clear-project-button > span:last-child {
  color: #344054;
  font-size: 0.78rem;
}

.clear-project-button:hover {
  border-color: #abd7d2;
  color: #087467;
  background: #f7fcfb;
  box-shadow: 0 4px 12px rgba(7, 143, 138, 0.1);
  transform: translateY(-1px);
}

.clear-project-button:focus-visible {
  outline: 3px solid rgba(7, 143, 138, 0.18);
  outline-offset: 2px;
}

.clear-project-button:active {
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  transform: translateY(0);
}

.clear-project-button-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 999px;
  color: #087467;
  background: #e9f7f5;
}

.clear-project-button-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.clear-project-dialog-icon {
  color: #b9352b;
  background: #fff0ed;
}

.session-timeout-dialog-icon {
  color: #9a6700;
  background: #fff6d8;
}

#sessionTimeoutCountdown {
  color: #9a6700;
  font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] .clear-project-button {
  border-color: #34445a;
  color: #dce7f2;
  background: #182331;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .clear-project-button:hover {
  border-color: #397e77;
  color: #70e1d7;
  background: #15312f;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .clear-project-button-icon {
  color: #70e1d7;
  background: #213c3a;
}

html[data-theme="dark"] .clear-project-dialog-icon {
  color: #ffb5ad;
  background: #3a2020;
}

html[data-theme="dark"] .session-timeout-dialog-icon {
  color: #f4cd68;
  background: #3b321b;
}

html[data-theme="dark"] #sessionTimeoutCountdown {
  color: #f4cd68;
}

.creation-entry-label,
.create-method-compact > div > span,
.pre-product-video-style-heading > span,
.create-model-controls-heading > strong {
  color: var(--sq-mock-ink, #17233a);
  font-weight: 820;
}

.creation-entry-label,
.create-method-compact > div > span {
  font-size: 0.9rem;
}

.pre-product-video-style,
.creation-entry-panel > .create-model-controls,
.creation-entry-panel .create-method-compact {
  margin: 0 !important;
  padding: 20px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--sq-v2-surface-soft) !important;
}

.pre-product-video-style-heading {
  grid-template-columns: minmax(150px, 0.3fr) minmax(240px, 0.5fr) minmax(280px, 1fr);
}

.pre-product-video-style-heading > span,
.create-model-controls-heading > strong {
  font-size: 1.05rem;
  line-height: 1.35;
}

.pre-product-video-style-heading > strong {
  color: #344054;
  font-size: 0.88rem;
  font-weight: 700;
}

.pre-product-video-style-heading > small,
.create-model-controls-heading > small,
.video-style-card-copy small,
.generation-method-card small,
.creation-entry-panel small {
  color: var(--sq-v2-text-muted) !important;
}

.create-model-controls-heading > small {
  font-size: 0.75rem;
  line-height: 1.5;
}

/* iOS-style segmented Auto / Manual control. */
.creation-entry-panel .creation-path-switch {
  width: min(100%, 540px);
  max-width: 540px;
  justify-self: start;
  gap: 4px !important;
  padding: 4px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--sq-v2-surface-muted) !important;
  box-shadow: none !important;
}

.creation-entry-panel .creation-path-card,
.creation-entry-panel .creation-path-card:not(.active) {
  min-height: 42px;
  border: 0 !important;
  border-radius: 9px !important;
  color: #475467 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.creation-entry-panel .creation-path-card + .creation-path-card {
  border-left: 0 !important;
}

.creation-entry-panel .creation-path-card.active {
  color: #087467 !important;
  background: #fff !important;
  box-shadow: var(--sq-v2-shadow-sm) !important;
}

.creation-entry-panel .creation-path-card strong {
  font-size: 0.88rem;
  font-weight: 800;
}

/* Provider, format, and model selections use soft surfaces rather than hard outlines. */
.generation-method-segmented {
  gap: 9px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.generation-method-segmented .generation-method-card,
.generation-method-segmented .generation-method-card:not(.active) {
  min-height: 64px;
  justify-content: flex-start;
  padding: 11px 14px;
  border: 0 !important;
  border-radius: 11px !important;
  color: #344054 !important;
  background: #fff !important;
  box-shadow: var(--sq-v2-shadow-sm);
}

.generation-method-segmented .generation-method-card + .generation-method-card {
  border-left: 0 !important;
}

.generation-method-segmented .generation-method-card.active {
  color: #087467 !important;
  background: var(--sq-v2-selected) !important;
  box-shadow: 0 0 0 1px rgba(7, 143, 138, 0.12), var(--sq-v2-shadow-sm) !important;
}

.generation-method-segmented .generation-method-card.active small {
  color: #4f6f6c !important;
}

.pre-product-video-style .video-style-cards {
  gap: 12px;
}

.pre-product-video-style .video-style-card {
  position: relative;
  min-height: 112px;
  padding: 16px;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  color: #475467;
  background: #fff !important;
  box-shadow: var(--sq-v2-shadow-sm);
}

.pre-product-video-style .video-style-card:hover {
  border-color: transparent !important;
  background: #f3f7f9 !important;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.07);
}

.pre-product-video-style .video-style-card.active {
  border-color: transparent !important;
  color: #087467;
  background: var(--sq-v2-selected) !important;
  box-shadow: 0 0 0 1px rgba(7, 143, 138, 0.14), var(--sq-v2-shadow-sm) !important;
}

.pre-product-video-style .video-style-card.active::after {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #078f8a;
  content: "✓";
  font-size: 0.68rem;
  font-weight: 900;
}

.pre-product-video-style .video-style-card-visual {
  color: #667085;
}

.pre-product-video-style .video-style-card.active .video-style-card-visual {
  color: #078f8a;
}

.create-model-controls .quick-model-controls,
.create-model-controls .quick-model-controls:has(#quickResolutionField:not([hidden])) {
  gap: 14px;
}

.create-model-controls .compact-choice-field {
  gap: 12px;
  padding: 15px;
  border: 0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: var(--sq-v2-shadow-sm);
}

.create-model-controls .compact-choice-field > span {
  padding-bottom: 0;
  border-bottom: 0 !important;
  color: #344054;
  font-size: 0.8rem;
  font-weight: 800;
}

.create-model-controls .compact-choice-group > button,
.compact-choice-group button {
  position: relative;
  border: 0 !important;
  border-radius: 9px !important;
  color: #475467 !important;
  background: var(--sq-v2-surface-soft) !important;
  box-shadow: none !important;
}

.create-model-controls .compact-choice-group > button:hover:not(:disabled),
.compact-choice-group button:hover:not(:disabled) {
  color: #087467 !important;
  background: #f0f7f6 !important;
}

.create-model-controls .compact-choice-group > button:is(.active, [aria-checked="true"]),
.compact-choice-group button:is(.active, [aria-checked="true"]) {
  padding-right: 30px;
  border: 0 !important;
  color: #087467 !important;
  background: var(--sq-v2-selected) !important;
  box-shadow: var(--sq-v2-shadow-sm) !important;
}

.create-model-controls .compact-choice-group > button:is(.active, [aria-checked="true"])::after {
  position: absolute;
  top: 9px;
  right: 9px;
  color: #078f8a;
  content: "✓";
  font-size: 0.72rem;
  font-weight: 900;
}

.manual-studio-panel,
.storyboard-panel,
.production-grid-panel {
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--sq-v2-surface-soft) !important;
  box-shadow: none !important;
}

/* Contextual inspector: quiet cards, persistent collapse control. */
.inspector {
  position: sticky;
  isolation: isolate;
  gap: 12px;
  padding: 18px 16px;
  border-left: 1px solid #eaecf0;
  background: var(--sq-v2-surface-soft);
}

.inspector-titlebar {
  position: relative;
  min-height: 42px;
  padding: 2px 0 4px 46px;
}

.inspector-toggle-button {
  position: absolute;
  z-index: 3;
  top: 1px;
  left: 0;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #475467;
  background: #fff;
  box-shadow: var(--sq-v2-shadow-sm);
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, transform 220ms ease;
}

.inspector-toggle-button:hover {
  color: #087467;
  background: #eef8f7;
}

.inspector-toggle-button:focus-visible {
  outline: 3px solid rgba(7, 143, 138, 0.2);
  outline-offset: 2px;
}

.inspector-toggle-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 220ms ease;
}

.inspector .inspector-card,
.inspector .inspector-card:not(:first-child) {
  border: 0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: var(--sq-v2-shadow-sm) !important;
}

.inspector-context-card[open] > summary,
.inspector-accordion[open] > summary {
  border-bottom: 0 !important;
}

.inspector-context-card > summary,
.inspector-accordion > summary {
  padding: 12px 14px 8px;
  font-size: 0.78rem;
}

.inspector-product-preview {
  margin: 8px 12px 12px;
  padding: 10px;
  border: 0 !important;
  border-radius: 9px;
  background: var(--sq-v2-surface-soft) !important;
}

.inspector-fact-list {
  gap: 9px;
  padding: 0 14px 14px;
}

.inspector-fact-list dt {
  color: var(--sq-v2-text-muted);
}

.app-shell.inspector-collapsed .inspector {
  width: 52px;
  min-width: 52px;
  gap: 0;
  padding: 14px 8px;
  overflow: hidden;
}

.app-shell.inspector-collapsed .inspector > :not(.inspector-titlebar) {
  display: none !important;
}

.app-shell.inspector-collapsed .inspector-titlebar {
  min-height: 38px;
  padding: 0;
}

.app-shell.inspector-collapsed .inspector-titlebar > div,
.app-shell.inspector-collapsed .inspector-titlebar > .status-dot {
  display: none;
}

.app-shell.inspector-collapsed .inspector-toggle-button {
  position: static;
  margin: 0 auto;
}

.app-shell.inspector-collapsed .inspector-toggle-button svg {
  transform: rotate(180deg);
}

@media (min-width: 1181px) {
  .app-shell:not(.jobs-mode):not(.settings-mode):not(.batch-mode) {
    grid-template-columns: 252px minmax(680px, 1fr) 318px;
  }

  .app-shell.inspector-collapsed:not(.jobs-mode):not(.settings-mode):not(.batch-mode) {
    grid-template-columns: 252px minmax(680px, 1fr) 52px;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .app-shell.inspector-collapsed .inspector {
    grid-column: 2;
    width: 52px;
    max-height: 58px;
    justify-self: end;
    border-top: 0;
  }
}

@media (max-width: 900px) and (min-width: 561px) {
  .app-shell.inspector-collapsed .inspector {
    width: 52px;
    max-height: 58px;
    justify-self: end;
    border-top: 0;
  }
}

/* The main footer action communicates readiness without looking clickable. */
#manualStepFooterBtn:disabled,
#manualStagePrimaryBtn:disabled {
  border-color: transparent !important;
  color: #475467 !important;
  background: #d0d5dd !important;
  box-shadow: none !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
}

#manualStepFooterBtn:not(:disabled) {
  color: #fff;
  background: #07958f;
  box-shadow: 0 5px 14px rgba(7, 149, 143, 0.18);
}

.manual-step-footer {
  border: 0 !important;
  border-radius: 14px;
  background: var(--sq-v2-surface-soft);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.1);
}

/* Dark mode keeps the same hierarchy without restoring hard outlines. */
html[data-theme="dark"] {
  --sq-v2-surface-soft: #0e1722;
  --sq-v2-surface-muted: #182331;
  --sq-v2-text-muted: #98a6b7;
  --sq-v2-text-subtle: #758397;
  --sq-v2-selected: #15312f;
  --sq-v2-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
  --sq-v2-shadow-panel: 0 8px 24px rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .creation-entry-panel {
  background: #111c29 !important;
}

html[data-theme="dark"] :is(
  .creation-entry-panel .workspace-control-heading strong,
  .creation-entry-label,
  .create-method-compact > div > span,
  .pre-product-video-style-heading > span,
  .create-model-controls-heading > strong,
  .create-model-controls .compact-choice-field > span
) {
  color: #edf4fb !important;
}

html[data-theme="dark"] .pre-product-video-style-heading > strong {
  color: #c9d5e2;
}

html[data-theme="dark"] .creation-entry-panel .creation-path-card.active {
  color: #70e1d7 !important;
  background: #263445 !important;
}

html[data-theme="dark"] :is(
  .generation-method-segmented .generation-method-card,
  .generation-method-segmented .generation-method-card:not(.active),
  .pre-product-video-style .video-style-card,
  .create-model-controls .compact-choice-field,
  .inspector .inspector-card,
  .inspector .inspector-card:not(:first-child),
  .inspector-toggle-button
) {
  color: #dce7f2 !important;
  background: #111c29 !important;
}

html[data-theme="dark"] :is(
  .generation-method-segmented .generation-method-card.active,
  .pre-product-video-style .video-style-card.active,
  .create-model-controls .compact-choice-group > button:is(.active, [aria-checked="true"])
) {
  color: #70e1d7 !important;
  background: #15312f !important;
}

html[data-theme="dark"] .pre-product-video-style .video-style-card-copy strong {
  color: #edf4fb !important;
}

html[data-theme="dark"] .pre-product-video-style .video-style-card.active .video-style-card-copy strong {
  color: #70e1d7 !important;
}

html[data-theme="dark"] .pre-product-video-style .video-style-card-visual {
  border-bottom-color: transparent;
  color: #aebdcd !important;
  background: #182331 !important;
}

html[data-theme="dark"] .pre-product-video-style .video-style-card.active .video-style-card-visual {
  color: #70e1d7 !important;
  background: #15312f !important;
}

html[data-theme="dark"] .create-model-controls .compact-choice-group > button {
  color: #c9d5e2 !important;
  background: #182331 !important;
}

/* Model and output settings arranged as two model columns plus one compact output column v150. */
.creation-entry-panel > .create-model-controls {
  gap: 16px;
}

.create-model-controls-heading {
  display: block;
}

.create-model-controls-heading > strong {
  color: var(--sq-mock-ink, #17233a);
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.35;
}

.create-model-controls .quick-model-controls,
.create-model-controls .quick-model-controls:has(#quickResolutionField:not([hidden])) {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(250px, 1fr) minmax(340px, 1.16fr);
  align-items: stretch;
  gap: 14px;
}

.create-model-controls .quick-model-controls > .compact-choice-field,
.create-model-controls .compact-output-settings > .compact-choice-field {
  min-width: 0;
}

.create-model-controls .compact-output-settings {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, auto));
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.create-model-controls .compact-output-settings:not(:has(.compact-choice-field:not([hidden]))) {
  display: none;
}

.create-model-controls :is(#quickImageModelButtons, #quickVideoModelButtons) {
  grid-template-columns: minmax(0, 1fr);
}

.create-model-controls :is(#quickImageModelButtons, #quickVideoModelButtons) > button,
.create-model-controls :is(#quickImageModelButtons, #quickVideoModelButtons) > button:first-child,
.create-model-controls :is(#quickImageModelButtons, #quickVideoModelButtons) > button:last-child:nth-child(odd),
.create-model-controls #quickVideoModelButtons > button[data-compact-value="veo-3.1-lite-lower-priority"] {
  grid-column: 1;
  min-height: 46px;
}

.create-model-controls :is(.duration-choice-group, .resolution-choice-group) {
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
}

.create-model-controls :is(.duration-choice-group, .resolution-choice-group) > button,
.create-model-controls :is(.duration-choice-group, .resolution-choice-group) > button:last-child:nth-child(odd) {
  grid-column: auto;
  min-height: 46px;
}

@media (max-width: 1280px) {
  .create-model-controls .quick-model-controls,
  .create-model-controls .quick-model-controls:has(#quickResolutionField:not([hidden])) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .create-model-controls .compact-output-settings {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }
}

@media (max-width: 720px) {
  .create-model-controls .quick-model-controls,
  .create-model-controls .quick-model-controls:has(#quickResolutionField:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .create-model-controls .compact-output-settings {
    grid-column: 1;
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Compact preflight controls approved in the v152 mockup. */
.creation-entry-panel > .pre-product-video-style {
  gap: 9px;
  padding: 13px 0 15px !important;
  border-top: 1px solid var(--sq-mock-line, #dce5ec);
  background: transparent !important;
}

.pre-product-video-style-heading {
  display: block;
}

.pre-product-video-style-heading > strong {
  color: var(--sq-mock-ink, #17233a);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.35;
}

.pre-product-video-style .video-style-cards {
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(145px, 0.78fr);
  gap: 9px;
}

.pre-product-video-style .video-style-cards:has(.video-style-auto-card:not([hidden])) {
  grid-template-columns:
    minmax(125px, 0.78fr)
    minmax(180px, 1.15fr)
    minmax(155px, 1fr)
    minmax(155px, 1fr)
    minmax(125px, 0.78fr);
}

.pre-product-video-style .video-style-card {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 8px 34px 8px 16px;
  border: 1px solid #dfe6ec !important;
  border-radius: 9px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.pre-product-video-style .video-style-card:hover {
  border-color: #b8d8d3 !important;
  background: #f5faf9 !important;
  box-shadow: none !important;
}

.pre-product-video-style .video-style-card.active {
  border-color: #9bcfc7 !important;
  background: var(--sq-v2-selected, #e9f7f5) !important;
  box-shadow: none !important;
}

.pre-product-video-style .video-style-card-visual {
  display: none !important;
}

.pre-product-video-style .video-style-card-visual svg {
  width: 24px;
  height: 17px;
}

.pre-product-video-style .video-style-card-copy {
  min-width: 0;
}

.pre-product-video-style .video-style-card-copy strong {
  display: block;
  overflow: hidden;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pre-product-video-style .video-style-card-copy small {
  display: none;
}

.pre-product-video-style .video-style-card.active::after {
  top: 50%;
  right: 10px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  font-size: 0.62rem;
}

.creation-entry-panel > .create-model-controls {
  gap: 10px;
  margin-top: 0;
  padding: 15px 0 3px !important;
  border-top: 1px solid var(--sq-mock-line, #dce5ec);
  background: transparent !important;
}

.create-model-controls-heading > strong {
  font-size: 1rem;
}

.create-model-controls .quick-model-controls,
.create-model-controls .quick-model-controls:has(#quickResolutionField:not([hidden])) {
  grid-template-columns: minmax(190px, 0.92fr) minmax(260px, 1.18fr) minmax(310px, 1.1fr);
  align-items: start;
  gap: 0;
}

.create-model-controls .compact-choice-field {
  gap: 6px;
  padding: 0 17px 0 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.create-model-controls .quick-model-controls > .compact-choice-field:nth-child(2) {
  padding: 0 17px;
  border-left: 1px solid var(--sq-mock-line, #dce5ec) !important;
}

.create-model-controls .compact-output-settings {
  gap: 12px;
  padding-left: 17px;
  border-left: 1px solid var(--sq-mock-line, #dce5ec);
}

.create-model-controls .compact-output-settings > .compact-choice-field {
  padding: 0;
}

.create-model-controls .compact-output-settings > .compact-choice-field + .compact-choice-field {
  padding-top: 11px;
  border-top: 1px solid var(--sq-mock-line, #dce5ec) !important;
}

.create-model-controls .compact-choice-field > span {
  color: #344054;
  font-size: 0.76rem;
  font-weight: 820;
  line-height: 1.25;
}

.create-model-controls .compact-choice-group {
  gap: 5px;
}

.create-model-controls :is(#quickImageModelButtons, #quickVideoModelButtons) > button,
.create-model-controls :is(#quickImageModelButtons, #quickVideoModelButtons) > button:first-child,
.create-model-controls :is(#quickImageModelButtons, #quickVideoModelButtons) > button:last-child:nth-child(odd),
.create-model-controls #quickVideoModelButtons > button[data-compact-value="veo-3.1-lite-lower-priority"] {
  min-height: 36px;
  padding: 5px 30px 5px 9px;
  border-radius: 7px !important;
  font-size: 0.68rem;
  line-height: 1.2;
}

.create-model-controls :is(.duration-choice-group, .resolution-choice-group) {
  gap: 6px;
}

.create-model-controls :is(.duration-choice-group, .resolution-choice-group) > button,
.create-model-controls :is(.duration-choice-group, .resolution-choice-group) > button:last-child:nth-child(odd) {
  min-height: 38px;
  padding: 6px 24px 6px 8px;
  border-radius: 7px !important;
}

.create-model-controls .compact-choice-group > button:is(.active, [aria-checked="true"])::after {
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
}

html[data-theme="dark"] .pre-product-video-style .video-style-card {
  border-color: #34445a !important;
  background: #182331 !important;
}

html[data-theme="dark"] .create-model-controls .quick-model-controls > .compact-choice-field:nth-child(2),
html[data-theme="dark"] .create-model-controls .compact-output-settings,
html[data-theme="dark"] .create-model-controls .compact-output-settings > .compact-choice-field + .compact-choice-field {
  border-color: #34445a !important;
}

@media (max-width: 1100px) {
  .create-model-controls .quick-model-controls,
  .create-model-controls .quick-model-controls:has(#quickResolutionField:not([hidden])) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 0;
  }

  .create-model-controls .compact-output-settings {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px 0 0;
    border-top: 1px solid var(--sq-mock-line, #dce5ec);
    border-left: 0;
  }

  .create-model-controls .compact-output-settings > .compact-choice-field + .compact-choice-field {
    padding: 0 0 0 17px;
    border-top: 0 !important;
    border-left: 1px solid var(--sq-mock-line, #dce5ec) !important;
  }
}

@media (max-width: 720px) {
  .creation-entry-panel > .pre-product-video-style,
  .creation-entry-panel > .create-model-controls {
    padding: 14px 0 !important;
  }

  .pre-product-video-style .video-style-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .pre-product-video-style .video-style-card {
    min-height: 48px;
  }

  .create-model-controls .quick-model-controls,
  .create-model-controls .quick-model-controls:has(#quickResolutionField:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 13px;
  }

  .create-model-controls .quick-model-controls > .compact-choice-field,
  .create-model-controls .quick-model-controls > .compact-choice-field:nth-child(2),
  .create-model-controls .compact-output-settings {
    padding: 0;
    border: 0 !important;
  }

  .create-model-controls .quick-model-controls > .compact-choice-field + .compact-choice-field,
  .create-model-controls .compact-output-settings {
    padding-top: 13px;
    border-top: 1px solid var(--sq-mock-line, #dce5ec) !important;
  }

  .create-model-controls .compact-output-settings {
    grid-column: 1;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .create-model-controls .compact-output-settings > .compact-choice-field + .compact-choice-field {
    padding: 11px 0 0;
    border-top: 1px solid var(--sq-mock-line, #dce5ec) !important;
    border-left: 0 !important;
  }
}

html[data-theme="dark"] .inspector {
  border-left-color: #29374a;
  background: #0e1722;
}

html[data-theme="dark"] .inspector-product-preview {
  background: #0e1722 !important;
}

html[data-theme="dark"] #manualStepFooterBtn:disabled,
html[data-theme="dark"] #manualStagePrimaryBtn:disabled {
  color: #98a6b7 !important;
  background: #344054 !important;
}

@media (max-width: 720px) {
  .creation-entry-panel {
    gap: 18px !important;
    padding: 18px 14px !important;
  }

  .creation-entry-panel .workspace-control-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .clear-project-button {
    align-self: flex-start;
  }

  .clear-project-button .clear-project-button-icon {
    display: grid;
  }

  .clear-project-button > span:last-child {
    display: inline;
  }

  .creation-entry-panel > *,
  .creation-entry-panel .create-method-compact > div,
  .creation-entry-panel .generation-method-segmented,
  .creation-entry-panel .video-style-field,
  .creation-entry-panel .video-style-cards,
  .creation-entry-panel .quick-model-controls {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .creation-entry-panel .creation-path-switch {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .creation-entry-panel .creation-path-card {
    width: auto !important;
    min-width: 0 !important;
  }

  .creation-entry-panel .generation-method-segmented,
  .creation-entry-panel .video-style-cards,
  .creation-entry-panel .quick-model-controls {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .pre-product-video-style,
  .creation-entry-panel > .create-model-controls,
  .creation-entry-panel .create-method-compact {
    padding: 16px !important;
  }

  .manual-step-footer {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
  }

  .manual-step-footer > * {
    min-width: 0;
    max-width: 100%;
  }

  .creation-entry-panel > .pre-product-video-style,
  .creation-entry-panel > .create-model-controls {
    padding: 14px 0 !important;
  }

  .creation-entry-panel .pre-product-video-style .video-style-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell,
  .inspector,
  .workspace,
  .inspector-toggle-button,
  .inspector-toggle-button svg {
    transition: none !important;
  }
}

/* Production balance + visual Text Overlay picker v160. */
.production-grid-panel {
  padding: 22px 24px 28px !important;
}

.production-grid-panel .section-head {
  max-width: 1100px;
  margin: 0 auto 18px;
}

.production-grid {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  grid-template-columns: repeat(auto-fit, minmax(310px, 340px));
  justify-content: center;
  gap: 22px;
}

.production-scene-card {
  width: 100%;
  border-color: #e3e8ee;
  border-radius: 15px;
  box-shadow: 0 7px 22px rgba(16, 24, 40, 0.07);
}

.production-scene-card > header {
  min-height: 46px;
  padding: 11px 15px;
}

.production-scene-card > header span,
.production-scene-card > header strong {
  font-size: 0.76rem;
}

.production-scene-copy {
  gap: 10px;
  padding: 15px 16px 16px;
}

.production-scene-copy h3 {
  font-size: 0.92rem;
}

.production-scene-copy p {
  font-size: 0.76rem;
}

.production-scene-copy > button {
  min-height: 42px;
  font-size: 0.76rem;
}

.workspace:has(#manualStepFooter:not([hidden])) {
  padding-bottom: 118px;
}

.manual-overlay-option {
  grid-column: 1 / -1;
  padding: 14px;
  border-radius: 14px;
  background: var(--sq-v2-surface-soft, #f7f9fa);
}

.manual-overlay-style-field {
  display: grid;
  gap: 11px;
  padding-top: 4px;
}

.manual-overlay-style-field[hidden] {
  display: none !important;
}

.manual-overlay-style-field > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.manual-overlay-style-field > header > div {
  display: grid;
  gap: 2px;
}

.manual-overlay-style-field > header strong {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.manual-overlay-style-field > header small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
}

.manual-overlay-style-field > header > span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #087467;
  background: #e8f7f4;
  font-size: 0.62rem;
  font-weight: 820;
}

.manual-overlay-template-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 9px;
}

.manual-overlay-template-card {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #344054;
  text-align: left;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.07);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.manual-overlay-template-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.1);
}

.manual-overlay-template-card.active,
.manual-overlay-template-card[aria-checked="true"] {
  border-color: #07958f;
  box-shadow: 0 0 0 3px rgba(7, 149, 143, 0.11);
}

.manual-overlay-template-card:focus-visible {
  outline: 3px solid rgba(7, 149, 143, 0.2);
  outline-offset: 2px;
}

.manual-overlay-template-card > strong,
.manual-overlay-template-card > small {
  padding-inline: 3px;
}

.manual-overlay-template-card > strong {
  overflow: hidden;
  font-size: 0.7rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-overlay-template-card > small {
  color: #7b8797;
  font-size: 0.6rem;
  font-weight: 650;
}

.manual-overlay-mini-preview {
  position: relative;
  display: grid;
  min-height: 74px;
  overflow: hidden;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #f8eadf, #f4f8f7 54%, #e8ddd2);
}

.manual-overlay-mini-preview::before,
.manual-overlay-mini-preview::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.manual-overlay-mini-preview::before {
  top: -13px;
  right: -9px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.5);
}

.manual-overlay-mini-preview::after {
  bottom: -15px;
  left: -12px;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.4);
}

.manual-overlay-mini-preview > i {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 14px);
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 3px 8px rgba(16, 24, 40, 0.13);
}

.overlay-preview-auto {
  background: linear-gradient(145deg, #dff8f4, #fef2d6 52%, #f8dce9);
}

.overlay-preview-auto > i {
  color: #fff;
  background: linear-gradient(90deg, #07958f, #ec6f92);
}

.overlay-preview-playful {
  background: linear-gradient(145deg, #ffe9f3, #fff2bc 52%, #dff8f4);
}

.overlay-preview-playful > i {
  border: 2px solid #ff6f9f;
  color: #5a294c;
  background: #fff9fc;
}

.overlay-preview-clean > i {
  border-left: 4px solid #07958f;
  border-radius: 5px 999px 999px 5px;
  color: #17233a;
  background: rgba(255, 255, 255, 0.94);
}

.overlay-preview-beauty {
  background: linear-gradient(145deg, #fff0ec, #f8e7f4 50%, #fff8ee);
}

.overlay-preview-beauty > i {
  border: 1px solid #e896aa;
  color: #713b53;
  background: rgba(255, 249, 250, 0.95);
}

.overlay-preview-utility {
  background: linear-gradient(145deg, #e8f8ed, #f7f4dc 58%, #dcf3ee);
}

.overlay-preview-utility > i {
  border-radius: 5px;
  color: #fff;
  background: #268d64;
}

.overlay-preview-premium {
  background: linear-gradient(145deg, #111821, #28241d 58%, #0d1117);
}

.overlay-preview-premium > i {
  border: 1px solid #d7b55c;
  color: #fff4ce;
  background: rgba(16, 18, 23, 0.92);
}

html[data-theme="dark"] .production-scene-card {
  border-color: #2d3c50;
  background: #111c29;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .production-scene-card > header {
  border-bottom-color: #2b3a4d;
}

html[data-theme="dark"] .production-scene-card > header span,
html[data-theme="dark"] .production-scene-copy h3,
html[data-theme="dark"] .production-scene-copy dd {
  color: #edf4fb;
}

html[data-theme="dark"] .production-scene-copy p,
html[data-theme="dark"] .production-scene-copy dt,
html[data-theme="dark"] .production-scene-card > header strong {
  color: #9eacbc;
}

html[data-theme="dark"] .production-scene-copy dl {
  border-top-color: #2b3a4d;
}

html[data-theme="dark"] .production-scene-copy > button {
  border-color: #347d75;
  color: #70e1d7;
  background: #142b2b;
}

html[data-theme="dark"] .manual-overlay-option {
  background: #142331;
}

html[data-theme="dark"] .manual-overlay-template-card {
  color: #dce7f2;
  background: #111c29;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .manual-overlay-template-card > small {
  color: #98a6b7;
}

html[data-theme="dark"] .manual-overlay-style-field > header strong {
  color: #edf4fb;
}

@media (max-width: 900px) {
  .production-grid-panel {
    padding: 18px 16px 24px !important;
  }

  .production-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 330px));
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .workspace:has(#manualStepFooter:not([hidden])) {
    padding-bottom: 170px;
  }

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

  .manual-overlay-template-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Auto completion output: keep the merged MP4 in the current workflow (v161). */
.production-render-output {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(240px, 0.48fr);
  align-items: center;
  gap: 28px;
  width: min(100%, 840px);
  margin: 28px auto 4px;
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(145deg, #edf9f6 0%, #f8fbfa 100%);
  box-shadow: 0 14px 36px rgba(15, 139, 124, 0.09);
}

.production-render-output[hidden] {
  display: none !important;
}

.production-render-output-copy {
  display: grid;
  align-content: center;
  gap: 10px;
}

.production-render-output-copy > span {
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.production-render-output-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.production-render-output-copy p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.55;
}

.production-render-output-copy .primary-button {
  width: fit-content;
  min-width: 180px;
  text-decoration: none;
}

.production-render-output video {
  width: min(100%, 280px);
  max-height: 498px;
  justify-self: center;
  aspect-ratio: 9 / 16;
  border-radius: 15px;
  background: #0d151c;
  object-fit: contain;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

html[data-theme="dark"] .production-render-output {
  background: linear-gradient(145deg, #132723 0%, #111c23 100%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

@media (max-width: 760px) {
  .production-render-output {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .production-render-output-copy {
    order: 2;
  }
}
/* Account-aware localization controls and long-copy safeguards. */
.auth-locale-switcher {
  display: inline-flex;
  justify-self: end;
  gap: 2px;
  padding: 3px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #f9fafb;
}

.auth-locale-switcher button {
  min-width: 58px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  color: #475467;
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.auth-locale-switcher button.active {
  color: #fff;
  background: #087c72;
}

html[data-theme="dark"] .auth-locale-switcher {
  border-color: #475467;
  background: #182230;
}

html[data-theme="dark"] .auth-locale-switcher button:not(.active) {
  color: #d0d5dd;
}

html[lang="en"] :is(button, label, p, span, small, strong, h1, h2, h3, h4, td, th, summary, option) {
  overflow-wrap: anywhere;
}

html[lang="en"] :is(.nav-item, .text-button, .ghost-button, .primary-button, .danger-button) {
  white-space: normal;
}

.auth-consent-line a {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

:is(#importUrlBtn, #manualStepFooterBtn):disabled {
  border-color: #c5cbd3 !important;
  color: #475467 !important;
  background: #e4e7ec !important;
}

:is(#importUrlBtn, #manualStepFooterBtn):not(:disabled) {
  border-color: #08756c !important;
  background: #08756c !important;
}

.jobs-library-tab:not(.active),
.jobs-library-status,
button[data-library-scope="trash"],
#batchProductCount,
.batch-form-footer span,
.batch-queue-panel > header span,
.batch-queue-empty span,
.account-detail-list dt {
  color: #475467 !important;
}

@media (max-width: 720px) {
  .auth-locale-switcher {
    justify-self: stretch;
    justify-content: center;
  }

html[lang="en"] .topbar-actions,
  html[lang="en"] .member-menu {
    min-width: 0;
    flex-wrap: wrap;
  }

  html[lang="en"] .member-menu :is(button, .wallet-balance-button) {
    min-width: 0;
  }

  html[lang="en"] .topbar {
    align-items: flex-start !important;
  }

  html[lang="en"] .topbar h1 {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    line-height: 1.25;
  }

  html[lang="en"] :is(.create-method-trigger strong, .create-method-trigger small, .pre-product-video-style .video-style-card-copy strong) {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
  }

  html[lang="en"] .pre-product-video-style .video-style-card {
    min-height: 62px;
    height: auto;
  }
}

/* P2 workspace tenancy and team controls. */
.workspace-switcher {
  display: grid;
  grid-template-columns: minmax(150px, 220px) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.workspace-switcher[hidden] {
  display: none;
}

.workspace-switcher select {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 34px 0 10px;
  color: var(--ink);
  background: var(--surface);
}

.workspace-switcher small {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  text-transform: capitalize;
}

.workspace-member-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.workspace-member-panel[hidden] {
  display: none;
}

.workspace-member-panel header,
.workspace-member-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.workspace-member-actions select {
  width: auto;
  min-width: 92px;
}

.workspace-readonly :where(#newProjectBtn, #renderTopBtn, #runQcTopBtn, #navBatchBtn) {
  opacity: .55;
  pointer-events: none;
}

@media (max-width: 760px) {
  .workspace-switcher {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* Account dropdown navigation v175. */
.topbar,
.topbar-actions,
.member-menu {
  overflow: visible;
}

.member-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.member-menu[hidden] {
  display: none;
}

.member-menu > .account-menu {
  position: relative;
  display: block;
  min-width: 0;
}

.account-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 8px 5px 5px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.account-menu-trigger:hover,
.account-menu-trigger:focus-visible,
.account-menu-trigger[aria-expanded="true"] {
  border-color: var(--line-strong);
  background: var(--surface-muted);
  outline: 0;
}

.member-menu .account-menu-identity {
  display: grid;
  min-width: 0;
}

.member-menu .account-menu-identity strong,
.member-menu .account-menu-identity small {
  overflow: hidden;
  max-width: 148px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-chevron {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 160ms ease;
}

.account-menu.is-open .account-menu-chevron {
  transform: rotate(180deg);
}

.account-dropdown {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 232px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16);
}

.account-dropdown[hidden] {
  display: none !important;
}

.account-dropdown .account-dropdown-item,
.account-dropdown #adminBtn.account-dropdown-item,
.account-dropdown #logoutBtn.account-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.account-dropdown .account-dropdown-item[hidden],
.account-dropdown #adminBtn.account-dropdown-item[hidden] {
  display: none !important;
}

.account-dropdown .account-dropdown-item:hover,
.account-dropdown .account-dropdown-item:focus-visible {
  color: var(--teal-dark);
  background: var(--teal-soft);
  outline: 0;
}

.account-dropdown .account-dropdown-item svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.account-dropdown-divider {
  height: 1px;
  margin: 6px 4px;
  background: var(--line);
}

.account-dropdown #logoutBtn.account-dropdown-signout {
  color: var(--danger, #b42318);
}

.account-dropdown #logoutBtn.account-dropdown-signout:hover,
.account-dropdown #logoutBtn.account-dropdown-signout:focus-visible {
  color: var(--danger, #b42318);
  background: rgba(180, 35, 24, 0.08);
}

html[data-theme="dark"] .account-menu-trigger:hover,
html[data-theme="dark"] .account-menu-trigger:focus-visible,
html[data-theme="dark"] .account-menu-trigger[aria-expanded="true"],
html[data-theme="dark"] .account-dropdown {
  border-color: #34445a;
  color: #edf4fb;
  background: #101a27;
}

html[data-theme="dark"] .account-dropdown .account-dropdown-item {
  color: #edf4fb;
}

html[data-theme="dark"] .account-dropdown .account-dropdown-item:hover,
html[data-theme="dark"] .account-dropdown .account-dropdown-item:focus-visible {
  color: #8ce2d6;
  background: rgba(38, 191, 170, 0.13);
}

@media (max-width: 760px) {
  .topbar .member-menu {
    display: flex !important;
    gap: 5px;
  }

  .topbar .member-menu[hidden] {
    display: none !important;
  }

  .topbar-actions {
    gap: 6px;
    overflow: visible !important;
  }

  .member-menu .wallet-button-label,
  .member-menu .account-menu-identity {
    display: none !important;
  }

  .topbar .member-menu .member-avatar {
    display: grid !important;
  }

  .account-menu-trigger {
    gap: 4px;
    min-height: 40px;
    padding: 4px 6px 4px 4px;
  }

  .account-dropdown {
    width: min(232px, calc(100vw - 24px));
  }

  .account-dropdown #adminBtn.account-dropdown-item:not([hidden]),
  .account-dropdown #logoutBtn.account-dropdown-item {
    display: flex !important;
  }
}

/* Auto-mode optional Text Overlay v175. */
.quick-action .url-row > .auto-create-action {
  grid-column: 2;
  grid-row: 1;
}

.auto-create-action {
  display: grid;
  gap: 7px;
  align-self: start;
}

.auto-create-action[hidden] {
  display: none !important;
}

.auto-text-overlay-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: var(--surface-muted);
  cursor: pointer;
}

.auto-text-overlay-option:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.auto-text-overlay-option input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.auto-text-overlay-option span {
  display: grid;
  min-width: 0;
}

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

.auto-text-overlay-option strong {
  font-size: 0.76rem;
}

.auto-text-overlay-option small {
  color: var(--muted);
  font-size: 0.66rem;
}

.auto-create-action #autoReviewBtn {
  width: 100%;
  min-height: 46px;
}

html[data-theme="dark"] .auto-text-overlay-option {
  border-color: #34445a;
  color: #edf4fb;
  background: #101a27;
}

html[data-theme="dark"] .auto-text-overlay-option:has(input:checked) {
  border-color: #30bfa9;
  background: rgba(38, 191, 170, 0.13);
}

@media (max-width: 720px) {
  .quick-action .url-row > .auto-create-action {
    grid-column: 1;
    grid-row: 2;
  }
}

/* Unified Thai/English typography system v177.
   This final cascade intentionally normalizes the many historical component
   weights without changing spacing, colors, or application layout. */
:root {
  --font: var(--sq-font-sans);
  --type-display: clamp(1.72rem, 2.4vw, 2.08rem);
  --type-page-title: clamp(1.46rem, 2vw, 1.76rem);
  --type-section-title: 1.18rem;
  --type-card-title: 1rem;
  --type-body: 0.94rem;
  --type-detail: 0.83rem;
  --type-label: 0.76rem;
}

html {
  font-size: 17px;
  font-synthesis: none;
}

body {
  font-family: var(--font);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: 1.58;
  letter-spacing: 0;
}

button,
input,
select,
textarea,
dialog {
  font-family: var(--font);
}

h1,
h2 {
  font-weight: 700;
  letter-spacing: -0.015em;
}

h3,
h4,
h5,
h6,
strong,
b {
  font-weight: 600;
}

p {
  line-height: 1.62;
}

small {
  font-size: var(--type-detail);
  line-height: 1.5;
}

label {
  font-weight: 500;
}

:is(input, select, textarea) {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
}

:is(
  button,
  .primary-button,
  .secondary-button,
  .ghost-button,
  .danger-button,
  .text-button,
  .nav-item,
  .account-dropdown-item,
  .jobs-library-tab,
  .settings-tab
) {
  font-weight: 600;
}

:is(.sidebar .brand strong, .auth-brand > strong) {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-heading h1 {
  font-size: 1.72rem;
  font-weight: 700;
  line-height: 1.28;
}

.auth-heading p {
  font-size: 0.94rem;
  line-height: 1.62;
}

.auth-form > label:not(.auth-consent-line) {
  font-size: 0.82rem;
  font-weight: 600;
}

:is(.auth-tabs button, .google-login-button, .auth-form button) {
  font-size: 0.88rem;
  font-weight: 600;
}

.auth-legal-links,
.auth-consent-line {
  font-size: 0.76rem;
  font-weight: 400;
}

.topbar h1,
.jobs-library-header h2,
.batch-studio-header h2,
.settings-view-header h2,
.admin-heading h1 {
  font-size: var(--type-page-title);
  font-weight: 700;
  line-height: 1.28;
}

.quick-start > .quick-copy h2 {
  font-size: var(--type-display);
  font-weight: 700;
  line-height: 1.22;
}

:is(
  .quick-start > .quick-copy p,
  .jobs-library-header p,
  .batch-studio-header p,
  .settings-view-header p,
  .admin-heading p,
  .account-hero-copy p
) {
  font-size: var(--type-body);
  font-weight: 400;
  line-height: 1.62;
}

:is(
  .section-head h2,
  .create-section-heading h3,
  .manual-studio-heading h3,
  .simple-settings-heading h3,
  .settings-panel-header h3,
  .active-job-center-head h3,
  .media-library-section-head h3,
  .job-production-head h3,
  .admin-toolbar h2,
  .wallet-section-head h3
) {
  font-size: var(--type-section-title);
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: -0.008em;
}

:is(.wallet-header h2, .notification-header h2) {
  font-size: 1.38rem;
  font-weight: 700;
  line-height: 1.3;
}

:is(
  .media-library-card h3,
  .account-hero-copy h3,
  .account-detail-card > header h3,
  .account-connection-head h3,
  .production-scene-copy h3,
  .active-job-title-row h4,
  .inspector-titlebar strong
) {
  font-size: var(--type-card-title);
  font-weight: 600;
  line-height: 1.42;
}

:is(
  .section-kicker,
  .eyebrow,
  .workspace-control-heading span,
  .create-model-controls-heading > span,
  .manual-studio-heading > div > span,
  .batch-section-heading > span
) {
  font-size: var(--type-label);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.045em;
}

:is(
  .jobs-library-status,
  .active-job-meta,
  .media-library-card p,
  .account-detail-card > header p,
  .account-connection-head p,
  .inspector-fact-list dt,
  .setting-row > span,
  .admin-method-help,
  .admin-status,
  .wallet-payment-instructions,
  .notification-toolbar p
) {
  font-size: var(--type-detail);
  font-weight: 400;
  line-height: 1.55;
}

:is(.admin-table, .admin-model-table) th {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

:is(.admin-table, .admin-model-table) td {
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.5;
}

:is(
  .status-pill,
  .mini-score,
  .notification-badge,
  .workspace-switcher small,
  .admin-model-rate
) {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .topbar h1,
  .jobs-library-header h2,
  .batch-studio-header h2,
  .settings-view-header h2,
  .admin-heading h1 {
    font-size: 1.34rem;
    line-height: 1.32;
  }

  .quick-start > .quick-copy h2 {
    font-size: 1.52rem;
  }

  :is(
    .section-head h2,
    .create-section-heading h3,
    .manual-studio-heading h3,
    .simple-settings-heading h3,
    .settings-panel-header h3,
    .active-job-center-head h3,
    .media-library-section-head h3,
    .job-production-head h3,
    .admin-toolbar h2
  ) {
    font-size: 1.08rem;
  }
}
