:root {
  --ink: #111a18;
  --muted: #65736f;
  --line: #dbe4df;
  --paper: #eef3f1;
  --panel: #ffffff;
  --green: #16a06d;
  --green-dark: #063f31;
  --blue: #2563eb;
  --blue-soft: #eaf2ff;
  --cyan: #0ea5b7;
  --cyan-soft: #e8f8fb;
  --gold: #d7a23a;
  --gold-soft: #fff5d9;
  --coral: #dc5d45;
  --coral-soft: #fff0ec;
  --navy: #071714;
  --navy-2: #0f2924;
  --shadow: 0 18px 46px rgba(9, 31, 26, 0.12);
  --shadow-soft: 0 10px 28px rgba(9, 31, 26, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% -10%, rgba(22, 160, 109, 0.18), transparent 34vw),
    radial-gradient(circle at 86% 4%, rgba(14, 165, 183, 0.14), transparent 30vw),
    linear-gradient(180deg, #eaf2ef 0, var(--paper) 420px, #f8faf7 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(8, 44, 36, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 44, 36, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 520px);
}

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

.app-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 40px;
}

.brand-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  min-width: 0;
}

.settings-toggle {
  margin-left: auto;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-bar strong,
.brand-bar span {
  display: block;
}

.brand-bar strong {
  font-size: 20px;
}

.brand-bar span {
  color: var(--muted);
  margin-top: 4px;
}

.brand-title {
  min-width: 0;
}

.brand-title strong,
.brand-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-site {
  margin-left: auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(25, 115, 77, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--green-dark);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.brand-info-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(25, 115, 77, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdf8 0%, #f0f6ed 100%);
  padding: 12px;
}

.brand-info-card strong {
  color: var(--green-dark);
  font-size: 15px;
}

.brand-info-card span,
.brand-info-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.brand-info-card a {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.brand-service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.brand-service-tags span {
  border: 1px solid rgba(25, 115, 77, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 850;
}

.auth-brand-card {
  margin-top: 8px;
}

.admin-only {
  display: none !important;
}

body.auth-admin .admin-only {
  display: inline-flex !important;
}

body.auth-anonymous main > :not(.brand-bar):not(.auth-panel):not(.cat-watch-strip),
body.auth-pending main > :not(.brand-bar):not(.review-panel),
body.auth-service-pending main > :not(.brand-bar):not(.review-panel) {
  display: none !important;
}

body.auth-active .auth-panel,
body.auth-active .cat-watch-strip,
body.auth-pending .cat-watch-strip,
body.auth-service-pending .cat-watch-strip,
body.auth-active .review-panel,
body.auth-service-pending .auth-panel {
  display: none !important;
}

.account-chip {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 6px 8px 6px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.account-chip button {
  border: 0;
  border-radius: 999px;
  background: #eef3ed;
  color: var(--green-dark);
  padding: 7px 10px;
  font-weight: 850;
  cursor: pointer;
}

.auth-panel,
.review-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.58fr);
  gap: 18px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 20px;
}

.review-panel {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
  max-width: none;
}

.review-brand-card {
  align-self: stretch;
}

.workspace-brand-card {
  grid-column: 1 / -1;
  grid-template-columns: minmax(160px, 0.5fr) minmax(0, 1fr) auto;
  align-items: center;
}

.workspace-brand-card p {
  margin: 0;
}

.auth-copy p,
.review-panel p {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
}

.auth-copy h1,
.review-panel h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.auth-copy span,
.review-panel span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-form {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcf8;
}

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

.auth-tabs button,
.auth-form > button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 42px;
  font-weight: 900;
  cursor: pointer;
}

.auth-tabs button.active,
.auth-form > button {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.auth-form > button:disabled {
  cursor: progress;
  opacity: 0.68;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.auth-form span {
  display: block;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-form span.auth-status-error {
  border-color: #efb0aa;
  background: #fff4f2;
  color: #c6281d;
  font-weight: 850;
}

.auth-form span.auth-status-success {
  border-color: #bad7c6;
  background: #f0f7f2;
  color: var(--green);
  font-weight: 850;
}

.auth-form span.auth-status-loading {
  border-color: var(--line);
  background: #f4f7f1;
  color: var(--muted);
  font-weight: 850;
}

.auth-form input[aria-invalid="true"] {
  border-color: #c6281d;
  box-shadow: 0 0 0 3px rgba(198, 40, 29, 0.12);
}

.workspace-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.68fr);
  gap: 12px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 12px;
}

.workspace-copy {
  display: grid;
  gap: 8px;
  align-content: center;
}

.workspace-copy p {
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.workspace-copy h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.workspace-copy span {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.55;
}

.workspace-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: stretch;
}

.workspace-metrics article {
  display: grid;
  gap: 6px;
  align-content: center;
  min-height: 78px;
  border: 1px solid rgba(218, 226, 216, 0.92);
  border-radius: 8px;
  background: #f7faf4;
  padding: 14px;
}

.workspace-metrics article.quota-unlimited-card {
  border-color: rgba(27, 163, 105, 0.55);
  background: linear-gradient(135deg, #e5f7ed 0%, #f7fff9 100%);
  box-shadow: inset 0 0 0 2px rgba(27, 163, 105, 0.12);
}

.workspace-metrics strong {
  color: var(--green-dark);
  font-size: 20px;
  line-height: 1.2;
}

.workspace-metrics article.quota-unlimited-card strong {
  color: #00784a;
  font-size: 24px;
}

.workspace-metrics article.quota-unlimited-card span {
  color: #076642;
}

.workspace-metrics span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.product-task-tabs {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 248, 244, 0.96);
  padding: 10px;
  margin-bottom: 10px;
}

.product-task-tab {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid rgba(194, 214, 207, 0.9);
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  overflow: hidden;
  padding: 0 10px 8px;
  position: relative;
  cursor: pointer;
  text-align: left;
}

.product-task-tab .task-number {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #eef4f1;
  color: var(--green-dark);
  font-weight: 950;
}

.product-task-tab small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-task-tab .task-progress {
  position: absolute;
  right: 10px;
  bottom: 6px;
  left: 10px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(18, 154, 110, 0.12);
  opacity: 0;
}

.product-task-tab .task-progress b {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-dark), var(--green));
}

.product-task-tab.active {
  border-color: var(--green);
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  box-shadow: 0 12px 24px rgba(6, 63, 49, 0.16);
}

.product-task-tab.active .task-number {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.product-task-tab.active small {
  color: rgba(255, 255, 255, 0.86);
}

.product-task-tab.status-running,
.product-task-tab.status-confirmed,
.product-task-tab.status-assets,
.product-task-tab.status-done {
  border-color: rgba(24, 160, 111, 0.4);
}

.product-task-tab.status-running:not(.active),
.product-task-tab.status-confirmed:not(.active),
.product-task-tab.status-assets:not(.active),
.product-task-tab.status-done:not(.active) {
  background: #edf8f1;
}

.product-task-tab.status-running .task-progress,
.product-task-tab.status-confirmed .task-progress,
.product-task-tab.status-assets .task-progress,
.product-task-tab.status-done .task-progress,
.product-task-tab.status-failed .task-progress {
  opacity: 1;
}

.product-task-tab.status-running .task-progress b {
  width: 42%;
  background: linear-gradient(90deg, transparent, #13c98b, transparent);
  animation: productTaskProgress 1.12s linear infinite;
}

.product-task-tab.status-failed:not(.active) {
  border-color: rgba(195, 69, 42, 0.42);
  background: #fff1ec;
}

.product-task-tab.status-failed.active {
  border-color: rgba(195, 69, 42, 0.7);
  background: linear-gradient(135deg, #8f2619, #e05b45);
  box-shadow: 0 12px 24px rgba(195, 69, 42, 0.16);
}

.product-task-tab.status-failed .task-progress {
  background: rgba(195, 69, 42, 0.14);
}

.product-task-tab.status-failed .task-progress b {
  background: linear-gradient(90deg, #b93223, #f06a52);
}

.product-task-tab.active .task-progress {
  background: rgba(255, 255, 255, 0.18);
}

.product-task-tab.active .task-progress b {
  background: rgba(255, 255, 255, 0.86);
}

.product-task-tab.active.status-running .task-progress b {
  background: linear-gradient(90deg, transparent, #fff, transparent);
}

.product-task-tab.status-failed.active .task-progress b {
  background: linear-gradient(90deg, #ffb4a4, #fff2ee);
}

.product-task-tab.busy-locked {
  opacity: 0.56;
  cursor: not-allowed;
}

@keyframes productTaskProgress {
  from {
    transform: translateX(-130%);
  }

  to {
    transform: translateX(240%);
  }
}

.workflow-steps {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 248, 244, 0.94);
  backdrop-filter: blur(10px);
  padding: 10px;
  margin-bottom: 14px;
}

.step-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(218, 226, 216, 0.95);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.step-chip.active {
  border-color: var(--green);
  background: #e7f1e7;
  color: var(--green-dark);
}

.step-chip.done {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.hero {
  margin-bottom: 14px;
}

.hero p,
.result-header p {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

.task-panel,
.result-panel,
.settings-panel,
.reference-panel,
.script-panel,
.prompt-panel,
.compliance-panel,
.video-panel,
.history-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.settings-panel {
  padding: 18px;
  margin: -26px 0 28px;
}

.api-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 12px 14px;
  margin: -12px 0 24px;
}

.api-overview strong {
  color: var(--green-dark);
  margin-right: 4px;
}

.api-overview span {
  border: 1px solid rgba(218, 226, 216, 0.86);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 850;
}

.clear-current-task-btn {
  margin-left: auto;
  border: 1px solid rgba(214, 82, 62, 0.28);
  border-radius: 8px;
  background: #fff8f5;
  color: #b64230;
  padding: 7px 14px;
  min-height: 34px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(132, 64, 42, 0.08);
}

.clear-current-task-btn:hover:not(:disabled) {
  border-color: rgba(214, 82, 62, 0.48);
  background: #fff1eb;
  color: #963527;
}

.clear-current-task-btn:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  box-shadow: none;
}

@media (max-width: 760px) {
  .clear-current-task-btn {
    margin-left: 0;
    width: 100%;
  }
}

.settings-header,
.settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.settings-header strong,
.settings-header span {
  display: block;
}

.settings-header span,
.settings-actions span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.settings-header button,
.settings-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.settings-actions button {
  border-color: var(--green);
  background: #e7f1e7;
  color: var(--green-dark);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 12px;
  margin: 16px 0 14px;
}

.settings-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.settings-grid input,
.settings-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  color: var(--ink);
  padding: 12px;
  outline: none;
}

.task-panel {
  padding: 18px;
}

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

.business-controls label {
  display: grid;
  grid-template-rows: auto 46px;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.business-controls select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
  font-weight: 850;
}

.product-input {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  color: var(--ink);
  padding: 16px;
  resize: vertical;
  outline: none;
  font-weight: 650;
  line-height: 1.5;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 122, 84, 0.12);
}

.action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.action-row button,
.step-confirm-button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  padding: 0 18px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.result-header > div {
  min-width: 0;
}

#confirmBtn {
  min-width: 168px;
}

.step-confirm-button:disabled {
  background: #c5cec7;
  cursor: not-allowed;
}

.step-confirm-button.confirmed {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
}

.action-row span {
  color: var(--muted);
  font-size: 14px;
}

.result-panel {
  margin-top: 14px;
  padding: 18px;
}

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

.result-header > div,
.reference-header > div,
.script-header > div {
  min-width: 0;
}

.result-header h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.script-panel {
  margin-top: 14px;
  padding: 18px;
}

.prompt-panel,
.compliance-panel,
.video-panel {
  margin-top: 14px;
  padding: 18px;
}

.history-panel {
  margin-top: 14px;
  padding: 18px;
}

.reference-panel {
  margin-top: 14px;
  padding: 18px;
}

.reference-header p {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 850;
}

.reference-header h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.reference-header span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.reference-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  text-align: right;
  flex-wrap: wrap;
  min-width: 0;
}

.reference-actions button {
  min-height: 40px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: #fff7df;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.reference-actions button:disabled {
  border-color: var(--line);
  background: #f1f1ed;
  color: var(--muted);
  cursor: not-allowed;
}

.reference-actions button.confirmed {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.image-settings-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 16px;
  margin-bottom: 16px;
}

.asset-workbench {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  min-width: 0;
}

.asset-card {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  display: grid;
  gap: 14px;
  grid-template-rows: auto;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 16px;
}

.asset-card > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.asset-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: flex-start;
  min-height: 0;
  min-width: 0;
}

.asset-card-head > div:first-child {
  min-width: 0;
}

.asset-card-head strong,
.asset-card-head span {
  display: block;
}

.asset-card-head strong {
  color: var(--green-dark);
  font-size: 18px;
}

.asset-card-head span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.asset-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  justify-content: flex-end;
  align-items: flex-start;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  justify-self: end;
}

.asset-actions button {
  max-width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.asset-actions button:first-child {
  border-color: var(--coral);
  background: #fff0ec;
}

.asset-actions button.confirmed {
  border-color: var(--green);
  background: #e7f1e7;
  color: var(--green-dark);
}

.asset-actions button:disabled {
  border-color: var(--line);
  background: #f1f1ed;
  color: var(--muted);
  cursor: not-allowed;
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-height: 118px;
  align-items: start;
}

.persona-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.persona-grid select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 24px 10px 10px;
  outline: none;
  font-size: 15px;
  font-weight: 850;
  white-space: nowrap;
}

.asset-cost-control {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(160px, 0.8fr) minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  min-height: 68px;
  border: 1px solid rgba(218, 226, 216, 0.9);
  border-radius: 8px;
  background: #f7faf4;
  padding: 10px 12px;
  box-sizing: border-box;
}

.asset-cost-control label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-weight: 850;
}

.asset-cost-control select,
.asset-cost-static {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
}

.asset-cost-static {
  display: flex;
  align-items: center;
}

.model-cost-control {
  grid-template-columns: minmax(170px, 1fr) minmax(230px, 1fr);
  align-items: end;
}

.model-cost-control > #modelCountHint {
  grid-column: 1 / -1;
}

.model-count-control {
  align-self: stretch;
}

.model-count-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(48px, 1fr));
  gap: 6px;
  min-height: 36px;
}

.model-count-buttons button {
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.model-count-buttons button.active {
  border-color: rgba(3, 118, 86, 0.72);
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 87, 64, 0.14);
}

.model-count-buttons button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.model-count-buttons button:focus-visible {
  outline: 3px solid rgba(49, 113, 255, 0.25);
  outline-offset: 2px;
}

.asset-cost-control > span {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.product-view-manual-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.product-view-manual-options[hidden] {
  display: none;
}

.product-view-manual-options label {
  display: inline-flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(9, 63, 49, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.product-view-manual-options input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

@media (max-width: 760px) {
  .asset-cost-control {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.generated-preview {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed #bbc7be;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.generated-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--generated-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0;
}

.generated-preview.has-image::before {
  opacity: 1;
}

.generated-preview.choice-preview {
  display: block;
  padding: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  align-self: start;
}

.generated-preview > span {
  position: relative;
  z-index: 1;
  padding: 16px;
}

.choice-grid {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

#modelPreview .choice-grid,
#productPreview .choice-grid {
  align-items: stretch;
}

#modelPreview .choice-tile,
#productPreview .choice-tile {
  height: 100%;
}

.asset-progress {
  border: 1px solid rgba(218, 226, 216, 0.86);
  border-radius: 8px;
  background: #f2f6ef;
  padding: 10px 12px;
  margin-bottom: 12px;
  min-height: 58px;
  box-sizing: border-box;
}

.asset-progress-spacer {
  visibility: hidden;
  pointer-events: none;
}

.asset-progress-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.asset-progress-topline strong {
  color: var(--green-dark);
  font-size: 13px;
}

.asset-progress-topline span {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}

.asset-progress-track {
  height: 10px;
  border: 1px solid rgba(18, 85, 58, 0.14);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.asset-progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-dark), var(--gold));
  transition: width 0.35s ease;
}

.choice-tile {
  position: relative;
  display: grid;
  grid-template-rows: auto 30px 48px;
  gap: 8px;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 12px;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  align-content: stretch;
  overflow: hidden;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.asset-card .choice-tile {
  min-height: 0;
}

.asset-card .choice-tile {
  height: 100%;
}

.asset-card .choice-preview {
  width: 100%;
  overflow: hidden;
}

.choice-tile:disabled {
  cursor: not-allowed;
}

.choice-tile.readonly {
  cursor: default;
}

.choice-tile:not(.readonly):not(.placeholder):hover {
  border-color: #2f7f62;
  box-shadow: 0 12px 24px rgba(19, 74, 55, 0.12);
  transform: translateY(-2px);
}

.choice-tile-wrap {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.choice-tile-wrap .choice-tile {
  width: 100%;
  min-height: 100%;
}

.choice-download-btn {
  min-height: 34px;
  border: 1px solid rgba(13, 84, 55, 0.28);
  border-radius: 8px;
  background: #f6fbf7;
  color: var(--green-dark);
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}

.choice-download-btn:hover {
  background: #e8f3ea;
}

.choice-tile.placeholder {
  border-style: dashed;
  background: #fff;
  color: var(--muted);
}

.choice-tile.selected {
  border-color: #1677ff;
  background: #eef6ff;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.14), 0 16px 28px rgba(22, 119, 255, 0.16);
  transform: translateY(-2px);
}

.choice-selected-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #1677ff;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.choice-image {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: auto;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  box-sizing: border-box;
  border-radius: 6px;
  background: #fff;
  background-image: var(--choice-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.choice-tile.selected .choice-image {
  box-shadow: inset 0 0 0 3px rgba(22, 119, 255, 0.7);
}

.choice-image.empty {
  display: grid;
  place-items: center;
  border: 1px dashed #bbc7be;
  background: #fbfcf8;
}

.choice-image.empty::before {
  content: "";
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px dashed #bbc7be;
}

.choice-tile b {
  color: var(--green-dark);
  font-size: 14px;
  line-height: 1.2;
  align-self: end;
  display: grid;
  place-items: center;
  min-width: 0;
}

.choice-tile.selected b {
  color: #0b5cad;
}

.choice-tile small {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.25;
  align-self: start;
  display: -webkit-box;
  min-width: 0;
  min-height: 40px;
  max-width: 100%;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-align: center;
}

.choice-tile.failure-tile small {
  min-height: 0;
  -webkit-line-clamp: 1;
}

.choice-tile.failure-tile {
  border-color: rgba(234, 93, 74, 0.5);
  background: #fff9f6;
}

.choice-tile.failure-tile b,
.choice-tile.failure-tile small {
  color: var(--coral);
}

.asset-error-note {
  margin: 10px 0 0;
  color: var(--coral);
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.choice-tile.selected small {
  color: #0b5cad;
  font-weight: 900;
}

.image-upload-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  align-items: stretch;
  grid-auto-rows: auto;
}

.asset-card .image-upload-grid {
  grid-template-columns: repeat(4, minmax(82px, 1fr));
  justify-content: start;
  align-items: start;
  align-self: start;
  margin: 0;
  overflow: visible;
  padding-bottom: 0;
}

.asset-card .image-slot {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  min-height: 104px;
  height: 104px;
  max-height: 104px;
  aspect-ratio: 1 / 1;
  padding: 6px;
}

.asset-card details,
.asset-card summary,
.asset-card textarea,
.asset-card .asset-cost-control,
.asset-card .choice-grid,
.asset-card .generated-preview,
.asset-card .image-upload-grid,
.asset-card .asset-progress {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  clear: both;
}

.asset-card summary {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-slot {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 104px;
  aspect-ratio: 1 / 1;
  min-width: 0;
  border: 1px dashed #bbc7be;
  border-radius: 8px;
  background: #fbfcf8;
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  padding: 10px;
}

.image-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--preview-image);
  background-position: center;
  background-size: cover;
  opacity: 0;
}

.image-slot.has-image::before {
  opacity: 1;
}

.image-slot.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 33, 29, 0.02), rgba(23, 33, 29, 0.28));
}

.image-slot input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-slot span,
.image-slot small {
  position: relative;
  z-index: 1;
}

.image-slot span {
  max-width: 100%;
  color: var(--ink);
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}

.image-slot small {
  color: var(--muted);
  font-weight: 750;
}

.image-slot.has-image span,
.image-slot.has-image small {
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.image-slot.has-image span {
  display: none;
}

.image-slot.has-image small {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: calc(100% - 16px);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 92, 65, 0.88);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  text-shadow: none;
  transform: translateX(-50%);
}

.script-header p {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 850;
}

.script-header h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.script-header button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--coral);
  color: #fff;
  padding: 0 18px;
  font-weight: 850;
  cursor: pointer;
}

.script-header button:disabled {
  background: #d6cfca;
  cursor: not-allowed;
}

.script-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

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

.script-controls.direction-controls:has(.advanced-control) {
  grid-template-columns: minmax(0, 1fr);
}

.advanced-control {
  display: none !important;
}

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

.script-controls label {
  display: grid;
  grid-template-rows: auto 56px minmax(34px, auto);
  gap: 8px;
  align-content: start;
  color: var(--muted);
  font-weight: 800;
}

.script-controls input,
.script-controls select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  color: var(--ink);
  height: 56px;
  padding: 12px;
  outline: none;
  font: inherit;
  font-weight: 850;
}

.script-controls input:focus,
.script-controls select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 122, 78, 0.12);
}

.script-controls small {
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.direction-type-control {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}

.direction-type-control legend {
  padding: 0;
  color: var(--muted);
  font-weight: 850;
}

.direction-type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  align-items: center;
}

.script-controls .direction-type-option {
  display: inline-flex;
  grid-template-rows: none;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  color: var(--ink);
  padding: 5px 12px;
  font-weight: 900;
  line-height: 1.15;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.direction-type-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 1px;
  opacity: 0;
  pointer-events: none;
  padding: 0;
}

.direction-type-option:has(input:checked) {
  border-color: rgba(0, 108, 78, 0.72);
  background: #087a55;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 108, 78, 0.14);
}

.script-controls .direction-custom-type {
  display: inline-flex;
  grid-template-rows: none;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--muted);
  font-weight: 900;
}

.script-controls .direction-custom-type input {
  width: min(220px, 38vw);
  height: 32px;
  border-radius: 8px;
  padding: 5px 10px;
  background: #fff;
  font-weight: 850;
  line-height: 1.15;
}

.script-controls .direction-custom-type input:not(:placeholder-shown),
.script-controls .direction-custom-type input:focus {
  border-color: rgba(0, 108, 78, 0.72);
  box-shadow: 0 0 0 3px rgba(0, 108, 78, 0.1);
}

.storyboard-settings-panel,
.video-task-log {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 14px;
  margin-bottom: 14px;
}

.storyboard-settings-head,
.video-task-log-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.storyboard-settings-head strong,
.video-task-log-head strong {
  display: block;
  color: var(--green-dark);
  font-size: 16px;
}

.storyboard-settings-head span,
#storyboardSettingsStatus {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.storyboard-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.storyboard-settings-grid label {
  display: grid;
  grid-template-rows: 22px 46px minmax(34px, auto);
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.storyboard-settings-grid .storyboard-setting-wide {
  grid-column: span 3;
  grid-template-rows: 22px auto;
}

.storyboard-settings-grid input,
.storyboard-settings-grid select,
.storyboard-settings-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
  font: inherit;
  font-weight: 800;
  resize: vertical;
}

.storyboard-settings-grid input {
  height: 46px;
}

.storyboard-settings-grid select {
  height: 46px;
  appearance: auto;
}

.storyboard-settings-grid textarea {
  min-height: 82px;
  line-height: 1.5;
}

.storyboard-settings-grid input:focus,
.storyboard-settings-grid select:focus,
.storyboard-settings-grid textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 122, 78, 0.12);
}

.script-status {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.script-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 14px;
  align-items: stretch;
  min-width: 0;
}

.script-grid.direction-focused {
  grid-template-columns: minmax(0, min(980px, 100%));
  justify-content: center;
  align-items: start;
}

.script-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffefa 0%, #fbfcf8 100%);
  padding: 14px;
  min-height: 300px;
  height: 100%;
  box-shadow: 0 8px 22px rgba(23, 33, 29, 0.06);
  min-width: 0;
}

.script-card.empty {
  grid-column: 1 / -1;
  min-height: 0;
  padding: 18px 20px;
  gap: 10px;
}

.script-grid:has(.script-card.empty) {
  display: block;
}

.script-card.selected,
.prompt-card.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.script-grid.direction-focused .script-card.selected {
  height: auto;
}

.direction-drawer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 12px;
}

.direction-drawer summary {
  color: var(--green-dark);
  cursor: pointer;
  font-weight: 900;
}

.direction-drawer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.direction-mini-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(218, 226, 216, 0.88);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.direction-mini-card strong {
  color: var(--green-dark);
}

.direction-mini-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.direction-mini-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.direction-mini-card.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.direction-mini-card.active .direction-select-btn {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.direction-select-btn,
.prompt-select-btn,
.prompt-actions button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 850;
  cursor: pointer;
}

.script-card.selected .direction-select-btn,
.prompt-card.selected .prompt-select-btn {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.scene-image-box {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
  height: auto;
  aspect-ratio: 9 / 16;
  border: 1px dashed rgba(93, 126, 110, 0.42);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 850;
  overflow: hidden;
  box-sizing: border-box;
}

.script-grid.direction-focused .scene-image-box:not(.has-image) {
  aspect-ratio: auto;
  min-height: 220px;
}

.scene-image-box.has-image {
  border-style: solid;
  background: #f8faf7;
}

.scene-image-box.failed {
  border-color: rgba(234, 93, 74, 0.55);
  background: #fff9f6;
  color: var(--coral);
}

.scene-image-box img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
  height: 100%;
  max-height: none;
}

.scene-generate-btn {
  margin-top: 0;
  min-height: 42px;
  border: 1px solid rgba(13, 84, 55, 0.28);
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  font-weight: 850;
  cursor: pointer;
}

.scene-generate-btn:disabled {
  background: #f1f1ed;
  color: var(--muted);
  cursor: not-allowed;
}

.scene-error {
  margin: 0;
  color: var(--coral);
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

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

.prompt-actions button:last-child {
  border-color: transparent;
  background: var(--coral);
  color: #fff;
}

.compliance-panel .prompt-actions button:last-child {
  background: var(--green-dark);
}

#generateComplianceBtn:not(:disabled) {
  border-color: transparent;
  background: var(--coral);
  color: #fff;
}

.prompt-actions button:disabled {
  border-color: var(--line);
  background: #f1f1ed;
  color: var(--muted);
  cursor: not-allowed;
}

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

.prompt-card {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 14px;
  box-shadow: none;
}

.prompt-card.empty {
  grid-column: 1 / -1;
  min-height: 120px;
}

.prompt-shot-list {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.prompt-shot {
  position: relative;
  border: 1px solid rgba(218, 226, 216, 0.78);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
}

.prompt-shot-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 8px;
  align-items: start;
}

.prompt-shot b {
  color: var(--green-dark);
  min-width: 0;
  line-height: 1.35;
}

.prompt-shot-delete {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(234, 93, 74, 0.42);
  border-radius: 50%;
  background: #fff6f3;
  color: var(--coral);
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}

.prompt-shot-delete:hover {
  border-color: var(--coral);
  background: var(--coral);
  color: #fff;
}

.prompt-shot p {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.prompt-subfield {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  border-top: 1px solid rgba(218, 226, 216, 0.72);
  padding-top: 8px;
}

.prompt-subfield.no-border {
  border-top: 0;
  margin-top: 4px;
  padding-top: 0;
}

.prompt-subfield b {
  color: var(--ink);
  font-size: 12px;
}

.prompt-subfield p {
  margin: 0;
  color: var(--muted);
}

.prompt-edit {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border: 1px solid rgba(218, 226, 216, 0.95);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  color: var(--muted);
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.prompt-edit.compact {
  min-height: 54px;
}

.prompt-edit.full {
  min-height: 130px;
}

.prompt-edit:focus {
  outline: 0;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(23, 122, 83, 0.11);
  color: var(--ink);
}

.asset-prompt-editor {
  min-width: 0;
  border: 1px solid rgba(218, 226, 216, 0.9);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 10px 12px;
}

.asset-prompt-editor summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 850;
}

.asset-prompt-editor .prompt-edit {
  margin-top: 10px;
}

.asset-prompt-editor small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.prompt-panel .script-controls,
.compliance-panel .script-controls,
.video-panel .script-controls {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 14px;
}

.prompt-panel .script-status,
.compliance-panel .script-status,
.video-panel .script-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f6ef;
  padding: 12px 14px;
}

.script-card-head {
  display: grid;
  gap: 7px;
  padding: 2px 2px 12px;
  border-bottom: 1px solid var(--line);
  min-height: 0;
  min-width: 0;
}

.script-card-head small {
  width: fit-content;
  border: 1px solid #f1c46d;
  border-radius: 999px;
  background: #fff7df;
  color: var(--coral);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.script-card strong,
.script-card b {
  color: var(--green-dark);
}

.script-card strong {
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.script-card span,
.script-card p,
.script-card li {
  color: var(--muted);
  line-height: 1.55;
}

.script-card p {
  margin: 0;
}

.direction-field {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(218, 226, 216, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  padding: 10px;
  min-height: 118px;
  height: 118px;
  min-width: 0;
  overflow: hidden;
}

.direction-field.compact {
  background: #f2f6ef;
  min-height: 90px;
  height: 90px;
}

.direction-field b {
  font-size: 13px;
}

.storyboard-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(13, 84, 55, 0.18);
  border-radius: 8px;
  background: #f5f8f2;
  padding: 10px;
  min-height: 0;
  height: auto;
  align-content: start;
  min-width: 0;
  overflow: visible;
}

.storyboard-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid rgba(218, 226, 216, 0.88);
  padding-bottom: 8px;
}

.storyboard-panel-head b {
  color: var(--green-dark);
  white-space: normal;
  overflow-wrap: anywhere;
}

.storyboard-panel-head span,
.storyboard-meta span,
.storyboard-shot small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.storyboard-meta {
  display: grid;
  gap: 5px;
}

.storyboard-shots {
  display: grid;
  gap: 7px;
}

.storyboard-shot {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(218, 226, 216, 0.9);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px;
  min-height: 0;
}

.storyboard-shot strong {
  font-size: 13px;
}

.storyboard-shot p {
  font-size: 12px;
  margin: 0;
}

.direction-details {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(218, 226, 216, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
  margin-top: auto;
}

.direction-details summary {
  cursor: pointer;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}

.direction-details:not([open]) {
  gap: 0;
}

.direction-details[open] summary {
  margin-bottom: 2px;
}

.prompt-field {
  background: #17211d;
  border-color: #17211d;
}

.prompt-field b,
.prompt-field p {
  color: #fff7df;
}

.prompt-field p {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.compliance-grid {
  display: grid;
  gap: 12px;
}

.compliance-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 16px;
}

.compliance-card.empty {
  min-height: 118px;
}

.compliance-card strong {
  color: var(--green-dark);
  font-size: 18px;
}

.compliance-card p,
.compliance-card li {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.compliance-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  border: 1px solid #f1c46d;
  border-radius: 999px;
  background: #fff7df;
  color: var(--coral);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.risk-badge.low {
  border-color: #b8d7bf;
  background: #eff8f0;
  color: var(--green-dark);
}

.risk-badge.high {
  border-color: #f0b1a2;
  background: #fff1ed;
  color: #bf3e28;
}

.risk-list,
.check-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.risk-list li,
.check-list li {
  border: 1px solid rgba(218, 226, 216, 0.78);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.risk-list b,
.check-list b {
  color: var(--ink);
}

.risk-list li.modify-needed {
  border-color: #f0b1a2;
  background: #fff9f6;
}

.risk-list li.risk-confirmed {
  border-color: rgba(31, 122, 84, 0.5);
  background: #f5faf4;
}

.risk-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.risk-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf5;
  color: var(--muted);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 850;
}

.risk-pill.must {
  border-color: #f0b1a2;
  background: #fff1ed;
  color: #bf3e28;
}

.risk-confirmed .risk-pill {
  border-color: rgba(31, 122, 84, 0.4);
  background: #e7f1e7;
  color: var(--green-dark);
}

.risk-edit {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.risk-edit label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.risk-edit select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 850;
}

.risk-edit textarea {
  min-height: 86px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
  font: inherit;
  line-height: 1.5;
}

.risk-edit textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: var(--blue);
}

.risk-confirm-btn {
  justify-self: start;
  min-height: 38px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: #e7f1e7;
  color: var(--green-dark);
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
}

.risk-confirmed .risk-confirm-btn {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.compliance-actions-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f6ef;
  padding: 12px;
}

.video-settings-panel {
  margin: 0 0 18px;
  box-shadow: none;
}

.shot-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.shot-pick {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 10px;
  cursor: pointer;
}

.shot-pick.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.shot-pick input {
  width: 18px;
  height: 18px;
}

.shot-pick strong {
  color: var(--green-dark);
  font-size: 14px;
}

.shot-pick span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.video-task-log {
  background: #fffefa;
}

.video-task-log-head button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 850;
  cursor: pointer;
}

.video-task-log-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.task-log-entry {
  border: 1px solid rgba(218, 226, 216, 0.88);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.task-log-entry > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.task-log-entry time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-log-entry strong {
  color: var(--green-dark);
  font-size: 13px;
}

.task-log-entry p,
.task-log-entry small {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.task-log-entry.error {
  border-color: rgba(234, 93, 74, 0.45);
  background: #fff8f5;
}

.task-log-entry.error strong {
  color: #bf3e28;
}

.task-log-entry.warn {
  border-color: rgba(241, 196, 109, 0.75);
  background: #fff9e8;
}

.video-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 14px;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 14px;
}

.history-card.empty {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
}

.history-card strong {
  display: block;
  color: var(--green-dark);
  font-size: 17px;
}

.history-card p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.history-card a,
.history-card button {
  min-height: 38px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: #e7f1e7;
  color: var(--green-dark);
  padding: 0 12px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.video-card.empty,
.script-card.empty,
.prompt-card.empty,
.compliance-card.empty,
.history-card.empty {
  background: linear-gradient(180deg, #fbfdf8 0%, #f4f8f2 100%);
}

.video-card.full-video-card {
  grid-column: 1 / -1;
}

.full-video-card .clip-candidates {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.video-card.empty {
  grid-column: 1 / -1;
  min-height: 118px;
}

.video-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.video-card-head strong {
  color: var(--green-dark);
}

.story-video-brief {
  display: grid;
  gap: 8px;
}

.story-video-brief div,
.video-reference-summary {
  border: 1px solid rgba(218, 226, 216, 0.78);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.story-video-brief b,
.video-reference-summary b {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.story-video-brief p,
.video-reference-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.storyboard-mini-shot-list {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(218, 226, 216, 0.78);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.storyboard-mini-shot-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.storyboard-mini-shot-list b {
  display: inline-block;
  margin-right: 6px;
  color: var(--green-dark);
}

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


.candidate-state-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.candidate-state-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.candidate-state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.clip-candidate.status-draft .candidate-state-pill {
  border-color: rgba(230, 181, 71, 0.62);
  background: #fff8e6;
  color: #93650f;
}

.clip-candidate.status-submitting .candidate-state-pill,
.clip-candidate.status-submitted .candidate-state-pill {
  border-color: rgba(31, 95, 211, 0.32);
  background: var(--blue-soft);
  color: var(--blue);
}

.clip-candidate.status-completed .candidate-state-pill {
  border-color: rgba(25, 115, 77, 0.35);
  background: #e7f1e7;
  color: var(--green-dark);
}

.clip-candidate.status-not-submitted {
  border-color: rgba(207, 90, 66, 0.5);
  background: #fff8f5;
}

.clip-candidate.status-not-submitted .candidate-state-pill,
.clip-candidate.status-failed .candidate-state-pill {
  border-color: rgba(207, 90, 66, 0.5);
  background: #fff1ed;
  color: #b8452e;
}

.clip-candidate {
  display: grid;
  gap: 8px;
  border: 1px dashed #b8c8b7;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.clip-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 220px);
  aspect-ratio: 9 / 16;
  margin-inline: auto;
  min-height: 120px;
  padding: 12px;
  border: 1px solid rgba(218, 226, 216, 0.78);
  border-radius: 8px;
  background: #f2f6ef;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.clip-preview.has-video {
  padding: 0;
  border-color: rgba(9, 63, 49, 0.16);
  background:
    var(--video-thumb) center / cover no-repeat,
    linear-gradient(180deg, #edf5f2, #dfeae5);
  cursor: pointer;
}

.clip-preview.has-video::before,
.history-video-thumb::before {
  content: none;
}

.clip-preview.has-video::after,
.history-video-thumb::after {
  content: none;
}

.clip-preview strong,
.clip-preview span {
  display: block;
  max-width: 100%;
}

.clip-preview span {
  font-size: 14px;
  line-height: 1.35;
}

.clip-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: 6px;
}

.clip-play-badge,
.history-video-thumb .video-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 0;
  height: 0;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid rgba(255, 255, 255, 0.96);
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.34));
  transform: translate(-40%, -50%);
  pointer-events: none;
}

.mini-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.mini-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 0.25s ease;
}

.clip-candidate p,
.video-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.candidate-submit-btn,
.candidate-retry-btn,
.candidate-download-btn {
  justify-self: start;
  min-height: 34px;
  border: 1px solid #e85b43;
  border-radius: 8px;
  background: #fff8f4;
  color: #bf3e28;
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}

.candidate-submit-btn {
  border-color: rgba(13, 84, 55, 0.36);
  background: #eff8f0;
  color: var(--green-dark);
}

.candidate-download-btn {
  border-color: rgba(13, 84, 55, 0.36);
  background: #f2f8f1;
  color: var(--green-dark);
}

.candidate-retry-btn:hover {
  background: #fff1ea;
}

.candidate-download-btn:hover {
  background: #e7f1e7;
}

.candidate-submit-btn:hover {
  background: #e7f1e7;
}

.video-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(11, 27, 23, 0.72);
}

.video-preview-modal.open {
  display: flex;
}

.video-preview-panel {
  position: relative;
  width: min(920px, 92vw);
  max-height: 88vh;
  border-radius: 8px;
  background: #0b1b17;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.video-preview-panel video {
  display: block;
  width: 100%;
  max-height: 88vh;
  background: #000;
}

.video-preview-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}

.script-card ol,
.script-card ul {
  margin: 0;
  padding-left: 18px;
}

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

.result-grid article {
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 16px;
}

#resultTitle[contenteditable="true"],
.result-grid li[contenteditable="true"] {
  border-radius: 6px;
  outline: none;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

#resultTitle[contenteditable="true"]:focus,
.result-grid li[contenteditable="true"]:focus {
  background: #eef6ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.14);
}

.result-grid li[contenteditable="true"] {
  padding: 2px 4px;
}

.result-grid strong,
.source-box strong {
  display: block;
  margin-bottom: 10px;
  color: var(--green-dark);
}

ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.source-box {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f6ef;
  padding: 14px 16px;
}

.progress-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-topline strong {
  margin-bottom: 0;
}

.progress-topline span {
  color: var(--green-dark);
  font-size: 18px;
  font-weight: 900;
}

.analysis-progress-track {
  height: 14px;
  border: 1px solid rgba(18, 85, 58, 0.18);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  margin: 12px 0 10px;
}

.analysis-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-dark), var(--gold));
  transition: width 0.35s ease;
}

.source-box span {
  display: block;
  color: var(--muted);
  line-height: 1.5;
}

#analysisProgressText {
  display: inline;
  color: var(--green-dark);
  font-size: 18px;
  font-weight: 900;
}

/* Modern product shell overrides */
.app-shell {
  width: min(1180px, calc(100% - 32px));
  padding: 18px 0 42px;
}

.brand-bar {
  position: sticky;
  top: 12px;
  z-index: 30;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(7, 23, 20, 0.96), rgba(15, 41, 36, 0.94));
  box-shadow: 0 18px 50px rgba(7, 23, 20, 0.18);
  color: #eefbf5;
  padding: 12px;
  backdrop-filter: blur(16px);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-color: rgba(255, 255, 255, 0.18);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 160, 109, 0.18);
}

.brand-bar strong {
  font-size: 18px;
  color: #fff;
}

.brand-bar span {
  color: rgba(234, 251, 245, 0.72);
  font-size: 12px;
}

.brand-site,
.account-chip {
  border-color: rgba(22, 160, 109, 0.36);
  background: rgba(255, 255, 255, 0.08);
  color: #c9f7e7;
}

.account-chip button {
  background: rgba(22, 160, 109, 0.16);
  color: #e7fff5;
}

.auth-panel,
.review-panel,
.workspace-panel,
.task-panel,
.result-panel,
.reference-panel,
.script-panel,
.prompt-panel,
.compliance-panel,
.video-panel,
.history-panel {
  border-color: rgba(9, 63, 49, 0.1);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.auth-panel,
.review-panel {
  overflow: hidden;
  min-height: 520px;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(7, 23, 20, 0.96), rgba(10, 54, 45, 0.9) 48%, #ffffff 48.2%);
}

.auth-copy,
.review-copy {
  padding: 32px;
}

.auth-copy p,
.review-panel p,
.workspace-copy p,
.hero p,
.result-header p,
.reference-header p,
.script-header p {
  letter-spacing: 0;
  text-transform: none;
}

.auth-copy p,
.review-copy p {
  color: #8be7c4;
}

.auth-copy h1,
.review-panel h2 {
  max-width: 720px;
  color: #fff;
  font-size: clamp(34px, 4.6vw, 58px);
}

.auth-copy span,
.review-copy span {
  max-width: 620px;
  color: rgba(239, 255, 248, 0.74);
}

.auth-form {
  align-self: center;
  margin: 24px 24px 24px 0;
  border-color: rgba(9, 63, 49, 0.12);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 56px rgba(7, 23, 20, 0.15);
}

.auth-tabs {
  padding: 4px;
  border: 1px solid rgba(9, 63, 49, 0.08);
  border-radius: 8px;
  background: #eef4f1;
}

.auth-tabs button {
  border-color: transparent;
  background: transparent;
}

.auth-tabs button.active,
.auth-form > button,
.action-row button,
.step-confirm-button,
.script-header button,
.prompt-actions button:last-child {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  box-shadow: 0 12px 24px rgba(6, 63, 49, 0.18);
}

.auth-form input,
.business-controls select,
.script-controls input,
.script-controls select,
.storyboard-settings-grid input,
.storyboard-settings-grid select,
.storyboard-settings-grid textarea,
textarea {
  border-color: rgba(9, 63, 49, 0.14);
  background: #fbfdfc;
}

.brand-info-card {
  border-color: rgba(22, 160, 109, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(232, 248, 251, 0.84));
  box-shadow: inset 3px 0 0 rgba(22, 160, 109, 0.72);
}

.auth-brand-card,
.review-brand-card {
  max-width: 620px;
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: inset 3px 0 0 rgba(215, 162, 58, 0.9);
}

.auth-brand-card strong,
.auth-brand-card a,
.review-brand-card strong,
.review-brand-card a {
  color: #ffffff;
}

.auth-brand-card span,
.auth-brand-card p,
.review-brand-card span,
.review-brand-card p {
  color: rgba(239, 255, 248, 0.74);
}

.auth-brand-card .brand-service-tags span,
.review-brand-card .brand-service-tags span {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #e8fff7;
}

.workspace-panel {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.56fr);
  gap: 14px;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(7, 23, 20, 0.98), rgba(8, 54, 44, 0.94) 43%, rgba(255, 255, 255, 0.96) 43.2%);
}

.workspace-copy {
  min-height: 178px;
  padding: 10px 12px;
}

.workspace-copy p {
  color: #8be7c4;
}

.workspace-copy h1 {
  max-width: 680px;
  color: #fff;
  font-size: clamp(32px, 3.8vw, 50px);
}

.workspace-copy span {
  color: rgba(239, 255, 248, 0.76);
}

.workspace-metrics {
  gap: 8px;
}

.workspace-metrics article {
  border-color: rgba(9, 63, 49, 0.1);
  background: linear-gradient(180deg, #ffffff, #f4faf7);
}

.workspace-metrics strong {
  color: var(--green-dark);
  font-size: 18px;
}

.workspace-brand-card {
  grid-column: 1 / -1;
  border-color: rgba(14, 165, 183, 0.2);
  background: linear-gradient(90deg, #f7fbfa, #eef9fb);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.workflow-steps {
  top: 86px;
  display: flex;
  overflow-x: auto;
  border-color: rgba(9, 63, 49, 0.1);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  scrollbar-width: thin;
}

.step-chip {
  flex: 1 0 136px;
  border-color: rgba(9, 63, 49, 0.1);
  background: #f8fbfa;
}

.step-chip.active {
  border-color: rgba(22, 160, 109, 0.36);
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
}

.step-chip.done {
  border-color: rgba(37, 99, 235, 0.24);
  background: var(--blue-soft);
}

.api-overview {
  margin: 0 0 14px;
  border-color: rgba(14, 165, 183, 0.18);
  background: rgba(232, 248, 251, 0.72);
}

.api-overview span {
  border-color: rgba(14, 165, 183, 0.16);
}

.hero {
  display: grid;
  gap: 6px;
  margin: 10px 0 12px;
}

.hero h1 {
  font-size: clamp(24px, 3vw, 34px);
}

.task-panel {
  display: grid;
  gap: 14px;
}

.product-input textarea {
  min-height: 128px;
}

.business-controls {
  margin-top: 0;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.action-row {
  margin-top: 0;
  border-top: 1px solid rgba(9, 63, 49, 0.08);
  padding-top: 14px;
}

.result-grid article,
.asset-card,
.script-card,
.prompt-card,
.compliance-card,
.video-card,
.history-card,
.storyboard-settings-panel,
.video-task-log {
  border-color: rgba(9, 63, 49, 0.1);
  background: linear-gradient(180deg, #ffffff, #f8fbfa);
}

.result-grid article {
  min-height: 150px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.asset-card {
  box-shadow: none;
}

.asset-card-head strong,
.result-grid strong,
.source-box strong,
.storyboard-settings-head strong,
.script-card strong,
.script-card b,
.history-card strong,
.video-card-head strong {
  color: var(--green-dark);
}

.reference-panel {
  border-top: 3px solid var(--gold);
}

.script-panel {
  border-top: 3px solid var(--coral);
}

.video-panel {
  border-top: 3px solid var(--cyan);
}

.history-panel {
  border-top: 3px solid var(--green);
}

.reference-header p {
  color: #a36f12;
}

.script-header p {
  color: var(--coral);
}

.reference-actions button {
  border-color: rgba(215, 162, 58, 0.42);
  background: var(--gold-soft);
}

.script-header button,
.prompt-actions button:last-child {
  background: linear-gradient(135deg, #9b3527, var(--coral));
}

.prompt-panel .script-controls,
.compliance-panel .script-controls,
.video-panel .script-controls,
.prompt-panel .script-status,
.compliance-panel .script-status,
.video-panel .script-status,
.source-box,
.asset-cost-control {
  border-color: rgba(9, 63, 49, 0.1);
  background: #f5faf8;
}

.choice-tile,
.image-slot,
.clip-candidate,
.story-video-brief div,
.video-reference-summary,
.storyboard-mini-shot-list {
  border-color: rgba(9, 63, 49, 0.12);
  background: #ffffff;
}

.choice-tile:not(.readonly):not(.placeholder):hover,
.user-action-hover {
  box-shadow: 0 16px 30px rgba(9, 63, 49, 0.14);
}

.analysis-progress-track span,
.asset-progress-bar,
.mini-progress span {
  background: linear-gradient(90deg, var(--green-dark), var(--cyan), var(--gold));
}

button,
a,
.choice-tile,
.image-slot,
.step-chip {
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

button:not(:disabled):hover,
a:hover {
  transform: translateY(-1px);
}

@media (max-width: 1800px) {
  .asset-card .image-upload-grid {
    grid-template-columns: repeat(4, minmax(82px, 1fr));
  }

  .asset-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 1280px) {
  .product-task-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .asset-card .image-upload-grid {
    grid-template-columns: repeat(4, minmax(76px, 1fr));
  }

  .asset-card .image-slot {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    min-height: 78px;
    height: 96px;
    max-height: 96px;
  }
}

@media (max-width: 900px) {
  .brand-bar {
    top: 8px;
  }

  .auth-panel,
  .review-panel,
  .workspace-panel {
    background: linear-gradient(180deg, rgba(7, 23, 20, 0.96), rgba(10, 54, 45, 0.92) 46%, rgba(255, 255, 255, 0.96) 46.2%);
  }

  .auth-form {
    margin: 0 20px 20px;
  }

  .review-brand-card {
    margin: 0 20px 20px;
  }

  .workspace-copy {
    min-height: 148px;
  }

  .workflow-steps {
    top: 78px;
  }

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

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

  .auth-panel,
  .review-panel {
    grid-template-columns: 1fr;
  }

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

  .workflow-steps,
  .business-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-upload-grid,
  .asset-card .image-upload-grid {
    grid-template-columns: repeat(4, minmax(68px, 1fr));
  }

  .asset-card .image-slot {
    width: 82px;
    min-width: 82px;
    max-width: 82px;
    min-height: 82px;
    height: 82px;
    max-height: 82px;
  }

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

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

  #modelPreview .choice-grid,
  #productPreview .choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .asset-workbench {
    grid-template-columns: 1fr;
  }

  .asset-card {
    grid-template-rows: auto;
  }

  .asset-card-head,
  .persona-grid {
    min-height: 0;
  }

  .asset-card-head {
    grid-template-columns: 1fr;
  }

  .asset-actions {
    justify-self: stretch;
  }

  .asset-actions button {
    width: 100%;
  }

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

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

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

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

  .video-grid,
  .clip-candidates {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .product-task-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
  }

  .product-task-tab {
    flex: 0 0 116px;
    scroll-snap-align: start;
  }

  .app-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 18px;
  }

  .brand-bar {
    position: relative;
    top: 0;
    margin-bottom: 14px;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

  .brand-title {
    flex: 1 1 calc(100% - 58px);
  }

  .brand-title strong {
    font-size: 18px;
  }

  .brand-title span {
    white-space: normal;
    line-height: 1.35;
  }

  .brand-site {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .account-chip {
    order: 4;
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .auth-panel,
  .review-panel,
  .workspace-panel {
    min-height: 0;
    background: rgba(255, 255, 255, 0.94);
  }

  .auth-copy,
  .review-copy {
    padding: 20px;
    background: linear-gradient(135deg, rgba(7, 23, 20, 0.96), rgba(10, 54, 45, 0.92));
  }

  .auth-form {
    margin: 0;
    box-shadow: none;
  }

  .auth-brand-card,
  .review-brand-card {
    margin-top: 16px;
  }

  .review-brand-card {
    margin: 0;
  }

  .workspace-panel {
    padding: 0;
  }

  .workspace-copy {
    min-height: 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(7, 23, 20, 0.96), rgba(10, 54, 45, 0.92));
  }

  .workspace-metrics,
  .workspace-brand-card {
    margin: 0 14px;
  }

  .workspace-brand-card {
    margin-bottom: 14px;
  }

  .workflow-steps {
    position: static;
    display: grid;
    overflow: visible;
  }

  .action-row,
  .result-header,
  .reference-header,
  .script-header,
  .settings-header,
  .settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .prompt-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .reference-actions {
    align-items: stretch;
    flex-direction: column;
    text-align: left;
  }

  .result-grid,
  .persona-grid,
  .script-controls,
  .storyboard-settings-grid,
  .settings-grid,
  .workspace-metrics,
  .business-controls,
  .workflow-steps {
    grid-template-columns: 1fr;
  }

  .workspace-panel {
    padding: 18px;
  }

  .auth-panel,
  .review-panel {
    padding: 20px;
  }

  .history-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .asset-card .image-slot {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: 72px;
    max-height: none;
  }

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

  #modelPreview .choice-grid,
  #productPreview .choice-grid {
    grid-template-columns: 1fr;
  }

  .asset-card-head,
  .asset-actions {
    align-items: stretch;
  }

  .script-controls.direction-controls,
  .script-controls.preset-controls {
    grid-template-columns: 1fr;
  }

  .task-panel,
  .result-panel,
  .reference-panel,
  .script-panel,
  .prompt-panel,
  .compliance-panel,
  .video-panel,
  .history-panel {
    padding: 14px;
  }

  .hero h1,
  .workspace-copy h1,
  .auth-copy h1,
  .review-panel h2 {
    font-size: 28px;
  }

  .workflow-steps {
    gap: 6px;
    padding: 8px;
  }

  .step-chip {
    min-height: 34px;
    font-size: 12px;
  }
}

/* G pass final responsive polish */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.auth-panel,
.review-panel,
.workspace-panel {
  background: linear-gradient(135deg, rgba(7, 23, 20, 0.97), rgba(10, 54, 45, 0.93));
}

.workspace-copy h1,
.auth-copy h1,
.review-copy h2 {
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .auth-panel,
  .review-panel,
  .workspace-panel {
    background: rgba(255, 255, 255, 0.94);
  }
}

/* Commercial web UI polish */
:root {
  --ink: #111817;
  --muted: #64706d;
  --line: #d8e2dc;
  --paper: #f4f7f6;
  --panel: #ffffff;
  --green: #18a06f;
  --green-dark: #073b30;
  --blue: #2f6df6;
  --blue-soft: #edf4ff;
  --cyan: #16b7c8;
  --cyan-soft: #e8f8fb;
  --gold: #d6a037;
  --gold-soft: #fff7df;
  --coral: #d85a45;
  --coral-soft: #fff2ee;
  --shadow: 0 18px 42px rgba(12, 36, 32, 0.11);
  --shadow-soft: 0 10px 28px rgba(12, 36, 32, 0.075);
}

body {
  background:
    linear-gradient(180deg, rgba(9, 30, 27, 0.045) 0, rgba(244, 247, 246, 0) 340px),
    linear-gradient(120deg, #eef5f3 0%, #f8faf7 52%, #eef7fa 100%);
}

body::before {
  background-image:
    linear-gradient(rgba(7, 59, 48, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 109, 246, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent 620px);
}

.app-shell {
  width: min(1400px, calc(100% - 32px));
}

.brand-bar {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(8, 22, 20, 0.98), rgba(8, 50, 42, 0.95) 58%, rgba(9, 69, 76, 0.94));
  box-shadow: 0 18px 42px rgba(5, 24, 21, 0.22);
}

.brand-site,
.account-chip {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-panel,
.review-panel {
  min-height: min(620px, calc(100vh - 126px));
  background:
    linear-gradient(135deg, rgba(8, 22, 20, 0.98), rgba(9, 59, 48, 0.94) 46%, rgba(255, 255, 255, 0.98) 46.2%);
}

.auth-copy,
.review-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 100%;
}

.auth-copy h1,
.review-panel h2 {
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.04;
}

.auth-copy span,
.review-copy span {
  line-height: 1.62;
}

.auth-form {
  width: min(100%, 520px);
  justify-self: end;
}

.brand-info-card,
.workspace-brand-card,
.brand-footer {
  border-color: rgba(22, 183, 200, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 248, 251, 0.86));
  box-shadow: inset 3px 0 0 rgba(22, 183, 200, 0.82), var(--shadow-soft);
}

.auth-brand-card,
.review-brand-card {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.085);
  box-shadow: inset 3px 0 0 rgba(22, 183, 200, 0.9);
}

.auth-brand-card strong,
.auth-brand-card a,
.review-brand-card strong,
.review-brand-card a {
  color: #f3fff8;
}

.auth-brand-card span,
.auth-brand-card p,
.review-brand-card span,
.review-brand-card p {
  color: rgba(238, 251, 245, 0.76);
}

.auth-brand-card .brand-service-tags span,
.review-brand-card .brand-service-tags span {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #effff8;
}

.workspace-panel {
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.7fr);
  gap: 16px;
  background:
    linear-gradient(135deg, rgba(8, 22, 20, 0.98), rgba(9, 58, 48, 0.94) 42%, rgba(255, 255, 255, 0.98) 42.2%);
}

.workspace-copy {
  min-height: 156px;
}

.workspace-metrics {
  align-self: center;
}

.workspace-metrics article {
  min-height: 70px;
  background: linear-gradient(180deg, #ffffff, #f3fbf8);
}

.workspace-brand-card {
  display: grid;
  grid-template-columns: minmax(120px, 0.25fr) minmax(0, 1fr) auto;
  gap: 10px;
  box-shadow: inset 3px 0 0 rgba(214, 160, 55, 0.88);
}

.workflow-steps,
.api-overview,
.task-panel,
.result-panel,
.reference-panel,
.script-panel,
.prompt-panel,
.compliance-panel,
.video-panel,
.history-panel {
  box-shadow: var(--shadow-soft);
}

.workflow-steps {
  top: 88px;
  padding: 8px;
}

.step-chip {
  min-height: 38px;
  flex-basis: 132px;
}

.hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.hero::after {
  content: "Aijixi UGC Studio";
  justify-self: end;
  border: 1px solid rgba(22, 183, 200, 0.2);
  border-radius: 999px;
  background: rgba(232, 248, 251, 0.72);
  color: #0f6b75;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
}

.asset-workbench {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.asset-actions button {
  transform: none;
}

.image-upload-grid,
.asset-card .image-upload-grid {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.asset-card .image-slot {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.choice-image.empty,
.image-slot,
.scene-image-box:not(.has-image),
.clip-preview {
  background:
    linear-gradient(135deg, rgba(7, 59, 48, 0.035), rgba(22, 183, 200, 0.045)),
    linear-gradient(90deg, rgba(7, 59, 48, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(7, 59, 48, 0.055) 1px, transparent 1px),
    #fbfdfb;
  background-size: auto, 24px 24px, 24px 24px, auto;
}

.script-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.script-card {
  min-height: 0;
  height: auto;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.script-grid.direction-focused {
  grid-template-columns: minmax(0, min(920px, 100%));
}

.scene-image-box:not(.has-image) {
  aspect-ratio: auto;
  min-height: 196px;
}

.script-grid.direction-focused .scene-image-box:not(.has-image) {
  min-height: 240px;
}

.scene-image-box span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(7, 59, 48, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  padding: 0 12px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}

.storyboard-panel {
  background: linear-gradient(180deg, #f8fbfa, #eef8f8);
}

.storyboard-shot {
  grid-template-columns: minmax(90px, 0.28fr) minmax(0, 1fr);
  align-items: start;
}

.storyboard-shot small {
  grid-column: 1 / -1;
}

.video-grid,
.full-video-card .clip-candidates {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.brand-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  border: 1px solid rgba(22, 183, 200, 0.18);
  border-radius: 8px;
  padding: 12px 14px;
}

.brand-footer strong,
.brand-footer span {
  display: block;
}

.brand-footer strong {
  color: var(--green-dark);
}

.brand-footer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.brand-footer a {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .app-shell {
    width: min(100% - 24px, 1400px);
  }

  .auth-panel,
  .review-panel,
  .workspace-panel {
    background: linear-gradient(180deg, rgba(8, 22, 20, 0.98), rgba(9, 58, 48, 0.94) 42%, rgba(255, 255, 255, 0.98) 42.2%);
  }

  .auth-form {
    justify-self: stretch;
    width: auto;
  }

  .workspace-panel,
  .asset-workbench,
  .workspace-brand-card,
  .brand-footer {
    grid-template-columns: 1fr;
  }

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

  .hero::after {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 16px, 1400px);
    padding-top: 10px;
  }

  .brand-bar {
    padding: 10px;
  }

  .auth-panel,
  .review-panel,
  .workspace-panel {
    padding: 0;
    background: #fff;
  }

  .auth-copy,
  .review-copy,
  .workspace-copy {
    padding: 16px;
  }

  .auth-brand-card,
  .review-brand-card {
    background: rgba(255, 255, 255, 0.1);
  }

  .auth-form,
  .workspace-metrics,
  .workspace-brand-card {
    margin: 0;
  }

  .task-panel,
  .result-panel,
  .reference-panel,
  .script-panel,
  .prompt-panel,
  .compliance-panel,
  .video-panel,
  .history-panel {
    padding: 12px;
  }

  .workflow-steps {
    gap: 6px;
    padding: 6px;
  }

  .scene-image-box:not(.has-image),
  .script-grid.direction-focused .scene-image-box:not(.has-image) {
    min-height: 156px;
  }

  .storyboard-shot {
    grid-template-columns: 1fr;
  }

  .brand-footer {
    padding: 12px;
  }
}

/* UGC history and asset workflow refinements */

/* Aijixi brand refresh */
:root {
  --ink: #f7f7f2;
  --muted: #9ea39c;
  --line: rgba(255, 255, 255, 0.14);
  --paper: #050505;
  --panel: #111210;
  --green: #9cff39;
  --green-dark: #d8ff2f;
  --blue: #ffffff;
  --blue-soft: rgba(255, 255, 255, 0.08);
  --cyan: #dfff00;
  --cyan-soft: rgba(156, 255, 57, 0.13);
  --gold: #efff3a;
  --gold-soft: rgba(239, 255, 58, 0.14);
  --coral: #fffb7a;
  --coral-soft: rgba(255, 251, 122, 0.12);
  --navy: #050505;
  --navy-2: #111210;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 14px 38px rgba(0, 0, 0, 0.24);
}

html,
body {
  background: #050505;
}

body {
  background:
    linear-gradient(180deg, #050505 0%, #0a0b09 46%, #050505 100%);
  color: var(--ink);
}

body::before {
  background-image:
    linear-gradient(rgba(156, 255, 57, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 720px);
}

.app-shell {
  width: min(1360px, calc(100% - 32px));
}

.brand-bar,
.workflow-steps,
.api-overview {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 8, 8, 0.92);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.brand-bar {
  min-height: 76px;
  border-radius: 8px;
  padding: 12px 16px;
}

.brand-mark {
  width: 86px;
  height: 58px;
  border-color: rgba(156, 255, 57, 0.34);
  background: #000;
}

.brand-mark img {
  object-fit: contain;
}

.brand-bar strong,
.brand-title strong {
  color: #fff;
  font-weight: 950;
}

.brand-bar span,
.brand-title span,
.api-overview span {
  color: rgba(255, 255, 255, 0.66);
}

.brand-site,
.account-chip,
.account-chip button,
.clear-current-task-btn {
  border-color: rgba(156, 255, 57, 0.36);
  background: rgba(156, 255, 57, 0.11);
  color: #efffd8;
}

.auth-panel,
.review-panel,
.workspace-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fbfbf7 0%, #f3f4ef 58%, #e9ebe4 100%);
  box-shadow: var(--shadow);
  color: #070707;
}

.auth-panel,
.review-panel {
  overflow: hidden;
}

.auth-copy,
.review-copy,
.workspace-copy {
  position: relative;
  color: #070707;
}

.auth-copy::before,
.workspace-copy::before {
  content: "✦";
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #9cff39;
  color: #050505;
  font-size: 18px;
  font-weight: 950;
}

.auth-copy p,
.review-copy p,
.workspace-copy p,
.hero p,
.result-header p,
.script-header p,
.panel-eyebrow {
  color: #3d3f38;
  font-weight: 950;
  letter-spacing: 0;
}

.auth-copy h1,
.review-panel h2,
.workspace-copy h1,
.hero h1 {
  color: #050505;
  font-weight: 950;
}

.auth-copy span,
.review-copy span,
.workspace-copy span {
  color: #41443d;
}

.auth-form,
.brand-info-card,
.workspace-brand-card,
.brand-footer,
.task-panel,
.result-panel,
.reference-panel,
.script-panel,
.prompt-panel,
.compliance-panel,
.video-panel,
.history-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #111210;
  color: #f7f7f2;
  box-shadow: var(--shadow-soft);
}

.auth-form {
  background: #050505;
}

.auth-form label,
.task-panel label,
.business-controls label,
.settings-panel label,
.result-panel,
.reference-panel,
.script-panel,
.prompt-panel,
.compliance-panel,
.video-panel,
.history-panel {
  color: rgba(247, 247, 242, 0.78);
}

.auth-tabs {
  background: rgba(255, 255, 255, 0.08);
}

.auth-tabs button.active,
button,
.action-row button,
.asset-actions button,
.script-actions button,
.prompt-card button,
.video-card button,
.history-card button,
.step-chip.active {
  border-color: #9cff39;
  background: #9cff39;
  color: #050505;
  font-weight: 950;
}

button:hover,
.action-row button:hover,
.asset-actions button:hover,
.script-actions button:hover,
.prompt-card button:hover,
.video-card button:hover,
.history-card button:hover {
  background: #dfff00;
  color: #050505;
}

button.secondary,
.auth-tabs button:not(.active),
.step-chip {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.78);
}

input,
textarea,
select {
  border-color: rgba(255, 255, 255, 0.16);
  background: #050505;
  color: #f7f7f2;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #9cff39;
  box-shadow: 0 0 0 3px rgba(156, 255, 57, 0.18);
  outline: none;
}

.brand-info-card,
.workspace-brand-card,
.brand-footer {
  box-shadow: inset 4px 0 0 #9cff39, var(--shadow-soft);
}

.brand-info-card strong,
.brand-info-card a,
.brand-footer strong,
.brand-footer a {
  color: #dfff00;
}

.brand-info-card span,
.brand-info-card p,
.brand-footer span {
  color: rgba(247, 247, 242, 0.68);
}

.brand-service-tags span {
  border-color: rgba(156, 255, 57, 0.34);
  background: rgba(156, 255, 57, 0.12);
  color: #ecffd9;
}

.workspace-metrics article,
.result-grid article,
.asset-card,
.script-card,
.prompt-card,
.compliance-card,
.video-card,
.history-card,
.storyboard-shot {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #171815;
  color: #f7f7f2;
}

.workspace-metrics article strong,
.result-grid strong,
.asset-card strong,
.script-card strong,
.prompt-card strong,
.video-card strong,
.history-card strong {
  color: #ffffff;
}

.hero {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #f7f7f2;
  color: #050505;
  box-shadow: var(--shadow-soft);
}

.hero::after {
  border-color: #9cff39;
  background: #9cff39;
  color: #050505;
}

.choice-image.empty,
.image-slot,
.scene-image-box:not(.has-image),
.clip-preview {
  border-color: rgba(156, 255, 57, 0.22);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    #0b0c0a;
  background-size: 24px 24px, 24px 24px, auto;
}

.scene-image-box span {
  border-color: rgba(156, 255, 57, 0.26);
  background: rgba(156, 255, 57, 0.12);
  color: #eaffd4;
}

.progress-track,
.analysis-progress {
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar,
.analysis-progress-bar {
  background: linear-gradient(90deg, #9cff39, #efff3a);
}

.brand-footer {
  background: #9cff39;
  color: #050505;
}

.brand-footer strong,
.brand-footer span,
.brand-footer a,
.brand-footer .brand-service-tags span {
  color: #050505;
}

.brand-footer .brand-service-tags span {
  border-color: rgba(5, 5, 5, 0.16);
  background: rgba(5, 5, 5, 0.08);
}

@media (max-width: 620px) {
  .brand-bar,
  .auth-panel,
  .review-panel,
  .workspace-panel,
  .task-panel,
  .result-panel,
  .reference-panel,
  .script-panel,
  .prompt-panel,
  .compliance-panel,
  .video-panel,
  .history-panel,
  .brand-footer {
    border-radius: 8px;
  }

  .auth-panel,
  .review-panel,
  .workspace-panel {
    background: #f7f7f2;
  }
}

/* Aijixi design pass 2: calmer product UI */
:root {
  --aijixi-bg: #070807;
  --aijixi-ink: #f6f6ef;
  --aijixi-soft: #c9ccc2;
  --aijixi-card: #111210;
  --aijixi-paper: #f4f5ee;
  --aijixi-paper-2: #e9ebe3;
  --aijixi-line: rgba(255, 255, 255, 0.13);
  --aijixi-accent: #a8ff3e;
  --aijixi-accent-2: #edff46;
  --aijixi-dark-line: rgba(5, 5, 5, 0.12);
}

body {
  background: var(--aijixi-bg);
}

body::before {
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.app-shell {
  width: min(1220px, calc(100% - 32px));
  padding-top: 18px;
}

.brand-bar {
  min-height: 64px;
  padding: 10px 14px;
  border-color: var(--aijixi-line);
  background: rgba(9, 10, 9, 0.94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.brand-mark {
  width: 74px;
  height: 46px;
  border: 0;
  background: transparent;
}

.brand-title strong {
  font-size: 18px;
  line-height: 1.1;
}

.brand-title span {
  margin-top: 3px;
  font-size: 12px;
  color: rgba(246, 246, 239, 0.62);
}

.brand-site,
.account-chip {
  min-height: 32px;
  border-color: rgba(168, 255, 62, 0.3);
  background: rgba(168, 255, 62, 0.08);
  color: #eaffd0;
}

.auth-panel,
.review-panel {
  min-height: min(560px, calc(100vh - 116px));
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
  padding: clamp(18px, 3vw, 34px);
  border-color: var(--aijixi-line);
  background: linear-gradient(180deg, var(--aijixi-paper), var(--aijixi-paper-2));
}

.auth-copy,
.review-copy {
  align-content: center;
  gap: 14px;
}

.auth-copy::before,
.workspace-copy::before {
  display: none;
}

.auth-copy p,
.review-copy p,
.workspace-copy p,
.hero p {
  width: max-content;
  max-width: 100%;
  margin: 0;
  border: 1px solid var(--aijixi-dark-line);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.06);
  color: #11120f;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.auth-copy h1,
.review-panel h2 {
  max-width: 650px;
  margin: 0;
  color: #050505;
  font-size: clamp(32px, 4.2vw, 46px);
  line-height: 1.03;
  letter-spacing: 0;
}

.auth-copy span,
.review-copy span {
  max-width: 620px;
  color: #4d5149;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.72;
}

.auth-form {
  align-self: center;
  width: 100%;
  max-width: 420px;
  padding: 20px;
  border-color: rgba(255, 255, 255, 0.14);
  background: #090a09;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.26);
}

.auth-tabs {
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-tabs button {
  min-height: 42px;
  border-radius: 7px;
}

.auth-form input {
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.12);
  background: #f7f7f2;
  color: #070807;
}

.auth-form > button {
  min-height: 46px;
  border-radius: 7px;
}

.brand-info-card {
  max-width: 600px;
  margin-top: 14px;
  padding: 14px;
  border-color: rgba(168, 255, 62, 0.24);
  background: #111210;
  box-shadow: inset 3px 0 0 var(--aijixi-accent), 0 18px 38px rgba(0, 0, 0, 0.18);
}

.brand-info-card strong {
  color: var(--aijixi-accent-2);
}

.brand-info-card span,
.brand-info-card p {
  color: rgba(246, 246, 239, 0.74);
}

.brand-service-tags span {
  min-height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.workspace-panel {
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.7fr);
  gap: 16px;
  padding: 18px;
  border-color: var(--aijixi-line);
  background: #10110f;
  color: var(--aijixi-ink);
}

.workspace-copy h1 {
  color: #fff;
  font-size: clamp(30px, 3.6vw, 48px);
}

.workspace-copy p {
  border-color: rgba(168, 255, 62, 0.32);
  background: rgba(168, 255, 62, 0.1);
  color: #eaffd0;
}

.workspace-copy span {
  color: rgba(246, 246, 239, 0.68);
}

.workspace-metrics article,
.workspace-brand-card,
.task-panel,
.result-panel,
.reference-panel,
.script-panel,
.prompt-panel,
.compliance-panel,
.video-panel,
.history-panel {
  border-color: rgba(255, 255, 255, 0.1);
  background: #121310;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.workflow-steps,
.api-overview {
  position: sticky;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(12, 13, 11, 0.92);
  backdrop-filter: blur(14px);
}

.step-chip {
  min-height: 34px;
  flex-basis: 118px;
  border-radius: 7px;
}

.hero {
  padding: 18px;
  border-color: rgba(5, 5, 5, 0.12);
  background: var(--aijixi-paper);
  color: #050505;
}

.hero h1 {
  max-width: 780px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.06;
}

.hero::after {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: #050505;
  color: var(--aijixi-accent);
}

button,
.action-row button,
.asset-actions button,
.script-actions button,
.prompt-card button,
.video-card button,
.history-card button,
.step-chip.active {
  border: 1px solid rgba(168, 255, 62, 0.58);
  background: var(--aijixi-accent);
  color: #050505;
  border-radius: 7px;
}

button:hover,
.action-row button:hover,
.asset-actions button:hover,
.script-actions button:hover,
.prompt-card button:hover,
.video-card button:hover,
.history-card button:hover {
  background: var(--aijixi-accent-2);
}

.script-card,
.prompt-card,
.video-card,
.history-card,
.result-grid article,
.asset-card,
.storyboard-shot {
  border-color: rgba(255, 255, 255, 0.1);
  background: #171815;
}

.brand-footer {
  border: 0;
  background: var(--aijixi-accent);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 18px, 1220px);
  }

  .auth-panel,
  .review-panel,
  .workspace-panel {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .auth-copy h1,
  .review-panel h2 {
    font-size: clamp(31px, 11vw, 44px);
  }

  .auth-form {
    max-width: none;
  }

  .brand-site {
    display: none;
  }
}

.cat-watch-strip {
  --cat-look-x: 0px;
  --cat-look-y: 0px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 34px);
  min-height: 238px;
  margin: -14px auto 0;
  padding: 24px 12px 18px;
  overflow: hidden;
  pointer-events: none;
}

.watch-cat {
  --cat-size: 86px;
  --cat-fill: #f4f1e8;
  --cat-body: var(--cat-fill);
  --cat-mask: #050505;
  --cat-detail: rgba(17, 18, 16, 0.16);
  --cat-eye: #ffd95f;
  --cat-ear-inner: #ffa27f;
  --cat-collar: #ff7468;
  --cat-stroke: #050505;
  --cat-turn: 0deg;
  position: relative;
  width: calc(var(--cat-size) * 1.08);
  height: calc(var(--cat-size) * 1.46);
  transform: translateY(var(--cat-y, 0));
  filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.42));
  transition: transform 220ms ease;
}

.cat-small { --cat-size: 62px; }
.cat-medium { --cat-size: 80px; }
.cat-large { --cat-size: 106px; }
.cat-tall { --cat-size: 94px; width: calc(var(--cat-size) * 0.9); }

.cat-tuxedo { --cat-fill: #050505; --cat-body: #050505; --cat-mask: #050505; --cat-detail: #f8f6ee; }
.cat-ginger { --cat-fill: #f3b764; --cat-body: #e99d42; --cat-mask: #b96924; --cat-detail: rgba(95, 42, 10, 0.26); }
.cat-gray { --cat-fill: #bec2b8; --cat-body: #9fa49a; --cat-mask: #6f756d; --cat-detail: rgba(31, 35, 31, 0.22); }
.cat-lime { --cat-fill: #dfff8a; --cat-body: #c7f95d; --cat-mask: #111210; --cat-detail: rgba(17, 18, 16, 0.18); }
.cat-calico { --cat-fill: #f2e8d3; --cat-body: #f2e8d3; --cat-mask: #111210; --cat-detail: #3f352b; }
.cat-white { --cat-fill: #f6f5ec; --cat-body: #eeeeE5; --cat-mask: #050505; --cat-detail: rgba(17, 18, 16, 0.1); }
.cat-siamese { --cat-fill: #d9c8aa; --cat-body: #eadcc4; --cat-mask: #5a4639; --cat-detail: #5a4639; }

.cat-body {
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 5%;
  height: 50%;
  border: 3px solid var(--cat-stroke);
  border-radius: 48% 48% 30% 30%;
  background: var(--cat-body);
}

.cat-body::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 2%;
  height: 10%;
  border: 3px solid var(--cat-stroke);
  border-top: 0;
  border-radius: 0 0 999px 999px;
  background: var(--cat-collar);
}

.cat-body::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 16%;
  width: 2px;
  height: 34%;
  border-radius: 999px;
  background: var(--cat-stroke);
  box-shadow: -12px 8px 0 -1px var(--cat-stroke), 12px 8px 0 -1px var(--cat-stroke);
  transform: translateX(-50%);
}

.cat-head {
  position: absolute;
  left: 2%;
  right: 2%;
  top: 0;
  height: 58%;
  border: 3px solid var(--cat-stroke);
  border-radius: 48% 48% 44% 44%;
  background: var(--cat-fill);
  z-index: 3;
  transform: rotate(var(--cat-turn));
  transform-origin: 50% 78%;
  transition: transform 90ms ease-out var(--cat-delay, 0ms);
}

.cat-head::before {
  content: "";
  position: absolute;
  inset: -1% -1% 31%;
  border-radius: 50% 50% 44% 44%;
  background:
    radial-gradient(circle at 36% 76%, transparent 0 21%, var(--cat-mask) 22% 52%, transparent 53%),
    radial-gradient(circle at 64% 76%, transparent 0 21%, var(--cat-mask) 22% 52%, transparent 53%),
    var(--cat-mask);
  z-index: 0;
}

.cat-head::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 7%;
  height: 43%;
  border-radius: 48% 48% 54% 54%;
  background: #f8f6ee;
  z-index: 1;
}

.cat-tail {
  position: absolute;
  right: -7%;
  bottom: 13%;
  width: 34%;
  height: 56%;
  border: 3px solid var(--cat-stroke);
  border-left: 0;
  border-radius: 0 999px 999px 0;
  transform: rotate(15deg);
  transform-origin: 0 100%;
}

.cat-tail::after {
  content: "";
  position: absolute;
  right: -12%;
  top: -5%;
  width: 62%;
  height: 32%;
  border: 3px solid var(--cat-stroke);
  border-radius: 999px;
  background: var(--cat-body);
}

.cat-ear {
  position: absolute;
  top: -40%;
  width: 34%;
  height: 54%;
  border: 3px solid var(--cat-stroke);
  background: var(--cat-mask);
  transform-origin: 50% 100%;
  z-index: -1;
}

.cat-ear::after {
  content: "";
  position: absolute;
  inset: 18% 22% 18%;
  border-radius: inherit;
  background: var(--cat-ear-inner);
}

.cat-ear.left { left: 9%; border-radius: 82% 20% 48% 18%; transform: rotate(-20deg); }
.cat-ear.right { right: 9%; border-radius: 20% 82% 18% 48%; transform: rotate(20deg); }

.cat-eye {
  position: absolute;
  top: 39%;
  width: 22%;
  height: 25%;
  border: 2px solid var(--cat-stroke);
  border-radius: 999px;
  background: var(--cat-eye);
  overflow: hidden;
  z-index: 4;
}

.cat-eye.left { left: 23%; }
.cat-eye.right { right: 23%; }

.cat-eye::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68%;
  height: 78%;
  border-radius: 999px;
  background: #050505;
  transform: translate(calc(-50% + var(--cat-look-x) * 0.62), calc(-50% + var(--cat-look-y) * 0.56));
  transition: transform 55ms linear var(--cat-delay, 0ms);
  z-index: 1;
}

.cat-eye::before {
  content: "";
  position: absolute;
  left: 30%;
  top: 17%;
  width: 28%;
  height: 28%;
  border-radius: 999px;
  background: #fff;
  z-index: 2;
  transform: translate(calc(var(--cat-look-x) * 0.26), calc(var(--cat-look-y) * 0.22));
  transition: transform 55ms linear var(--cat-delay, 0ms);
}

.cat-nose {
  position: absolute;
  left: 50%;
  top: 68%;
  width: 10%;
  height: 7%;
  border-radius: 999px 999px 70% 70%;
  background: #ff8d86;
  transform: translateX(-50%);
  z-index: 5;
}

.cat-nose::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 12px;
  background: var(--cat-stroke);
  transform: translateX(-50%);
}

.cat-whisker {
  position: absolute;
  top: 71%;
  width: 26%;
  height: 2px;
  background: #f6f0df;
  z-index: 5;
}

.cat-whisker.left { left: 4%; box-shadow: 0 -8px 0 #f6f0df; transform: rotate(7deg); }
.cat-whisker.right { right: 4%; box-shadow: 0 -8px 0 #f6f0df; transform: rotate(-7deg); }

.cat-belly {
  position: absolute;
  left: 26%;
  right: 26%;
  bottom: 14%;
  height: 54%;
  border: 2px solid rgba(17, 18, 16, 0.08);
  border-radius: 999px 999px 40% 40%;
  background: color-mix(in srgb, var(--cat-fill) 72%, #ffffff 28%);
}

.cat-paw {
  position: absolute;
  bottom: -2%;
  width: 34%;
  height: 22%;
  border: 3px solid var(--cat-stroke);
  border-radius: 999px 999px 46% 46%;
  background: var(--cat-fill);
}

.cat-paw.left { left: 8%; }
.cat-paw.right { right: 8%; }

.cat-stripe { position: absolute; left: 18%; width: 64%; height: 6%; border-radius: 999px; background: var(--cat-detail); }
.cat-stripe.one { top: 25%; }
.cat-stripe.two { top: 39%; }
.cat-mark { position: absolute; left: 50%; top: 6%; width: 22%; height: 22%; border-radius: 0 0 999px 999px; background: var(--cat-detail); transform: translateX(-50%); z-index: 2; }
.cat-mask { position: absolute; left: 22%; right: 22%; top: 24%; height: 42%; border-radius: 48% 48% 58% 58%; background: var(--cat-detail); z-index: 2; }
.cat-patch { position: absolute; left: 12%; top: 10%; width: 34%; height: 30%; border-radius: 50% 40% 54% 46%; background: #d58b43; z-index: 2; }
.cat-calico .cat-body .cat-patch { left: 54%; top: 18%; width: 28%; height: 32%; background: #302722; }

.cat-tuxedo .cat-head::after { left: 16%; right: 16%; bottom: 4%; height: 45%; }
.cat-tuxedo .cat-belly,
.cat-tuxedo .cat-paw { background: #f8f6ee; }
.cat-white .cat-head::before { clip-path: polygon(0 0, 45% 0, 52% 70%, 100% 0, 100% 38%, 72% 65%, 28% 65%, 0 38%); }
.cat-ginger .cat-head::before,
.cat-gray .cat-head::before { opacity: 0.48; }
.cat-lime .cat-head::before { opacity: 0.18; }
.cat-siamese .cat-tail::after,
.cat-siamese .cat-ear,
.cat-siamese .cat-paw { background: #5a4639; }
.cat-siamese .cat-head::after { background: #f3ead8; }
.cat-tall .cat-body { left: 22%; right: 22%; height: 54%; border-radius: 46% 46% 30% 30%; }
.watch-cat:nth-child(2n) .cat-head { border-radius: 44% 52% 44% 48%; }
.watch-cat:nth-child(3n) .cat-tail { left: -7%; right: auto; border-right: 0; border-left: 3px solid var(--cat-stroke); border-radius: 999px 0 0 999px; transform: rotate(-14deg); }
.watch-cat:nth-child(3n) .cat-tail::after { left: -12%; right: auto; }

@media (hover: none), (pointer: coarse), (max-width: 760px) {
  .cat-watch-strip {
    display: none !important;
  }
}
.reference-header {
  align-items: stretch;
}

.reference-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: end;
  justify-items: end;
  align-self: stretch;
  min-width: min(420px, 100%);
  text-align: right;
}

.reference-actions span {
  order: 1;
  max-width: 420px;
  line-height: 1.45;
}

.reference-actions:empty {
  display: none;
}

.step-footer-actions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(9, 63, 49, 0.1);
}

.analysis-footer-actions {
  margin-top: 16px;
}

.reference-footer-actions #imageUploadStatus {
  flex: 1 1 260px;
  max-width: min(560px, 100%);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  text-align: right;
  overflow-wrap: anywhere;
}

#confirmAssetsBtn {
  order: 2;
  justify-self: end;
  align-self: end;
  min-width: 168px;
  max-width: 100%;
}

#confirmAssetsBtn:not(:disabled):hover {
  filter: brightness(1.02);
}

#confirmAssetsBtn:disabled {
  opacity: 0.76;
}

#confirmAssetsBtn.confirmed {
  color: #fff;
}

#uploadModelImageBtn {
  border-color: rgba(47, 109, 246, 0.32);
  background: var(--blue-soft);
  color: var(--blue);
  min-width: 132px;
}

#uploadModelImageBtn:disabled {
  border-color: rgba(47, 109, 246, 0.22);
  background: #f4f8ff;
  color: #64789f;
}

.product-view-manual-options label {
  flex: 1 1 150px;
  justify-content: center;
}

.analysis-trends {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 12px;
  margin-top: 12px;
}

.analysis-trends article {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid rgba(9, 63, 49, 0.1);
  border-radius: 8px;
  background: #f8fbfa;
  padding: 14px;
}

.analysis-trends strong {
  color: var(--green-dark);
  font-size: 14px;
}

.analysis-trends ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.45;
}

.analysis-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analysis-tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(47, 109, 246, 0.22);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(9, 63, 49, 0.1);
  border-radius: 8px;
  background: #f8fbfa;
  padding: 10px;
}

.history-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.history-tabs button,
.history-clear-type {
  min-height: 36px;
  border: 1px solid rgba(9, 63, 49, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}

.history-tabs button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 999px;
  background: #edf4f1;
  color: var(--muted);
  font-size: 12px;
}

.history-tabs button.active {
  border-color: rgba(24, 160, 111, 0.34);
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  box-shadow: 0 10px 22px rgba(7, 59, 48, 0.16);
}

.history-tabs button.active span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.history-clear-type {
  border-color: rgba(216, 90, 69, 0.3);
  background: var(--coral-soft);
  color: #aa3a2c;
}

.history-clear-type:disabled {
  border-color: var(--line);
  background: #f1f4f2;
  color: var(--muted);
  cursor: not-allowed;
}

.history-card {
  grid-template-columns: 104px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.history-thumb {
  position: relative;
  display: block;
  width: 104px;
  aspect-ratio: 9 / 16;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(9, 63, 49, 0.12);
  border-radius: 8px;
  background:
    var(--history-thumb) center / cover no-repeat,
    #eef5f2;
  cursor: pointer;
}

.history-card button.history-thumb {
  display: block;
  min-height: 0;
  padding: 0;
  border-color: rgba(9, 63, 49, 0.12);
  background:
    var(--history-thumb) center / cover no-repeat,
    #eef5f2;
}

.history-video-thumb video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-thumb.empty {
  display: grid;
  place-items: center;
  background: #eef5f2;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.history-card-main {
  display: grid;
  gap: 6px;
  align-content: center;
  min-width: 0;
}

.history-card-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.history-card-title span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(22, 183, 200, 0.22);
  border-radius: 999px;
  background: var(--cyan-soft);
  color: #0f6b75;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
}

.history-card-title strong {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.history-card-main p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.5;
}

.history-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: center;
  justify-content: flex-end;
  min-width: 188px;
}

.history-card-actions button,
.history-card button.history-thumb {
  transform: none;
}

.history-card-actions button {
  min-height: 36px;
}

.history-card-actions button:last-child {
  border-color: rgba(216, 90, 69, 0.28);
  background: #fff5f2;
  color: #a53828;
}

.history-card-actions button:disabled {
  border-color: var(--line);
  background: #f2f4f2;
  color: var(--muted);
  cursor: not-allowed;
}

.scene-download-btn {
  min-height: 42px;
  border: 1px solid rgba(22, 183, 200, 0.28);
  border-radius: 8px;
  background: var(--cyan-soft);
  color: #0f6b75;
  font-weight: 900;
  cursor: pointer;
}

.video-preview-modal {
  padding: 24px;
  overflow: auto;
}

.video-preview-panel {
  display: grid;
  width: min(720px, 92vw, calc((100vh - 56px) * 9 / 16));
  width: min(720px, 92vw, calc((100dvh - 56px) * 9 / 16));
  max-width: 720px;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  aspect-ratio: 9 / 16;
  place-self: center;
}

.video-preview-panel video {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

@media (max-width: 760px) {
  .history-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .history-thumb {
    width: 86px;
  }

  .history-card button.history-thumb {
    min-height: 0;
  }

  .history-card-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .history-card-actions button {
    flex: 1 1 130px;
    justify-content: center;
  }
}

@media (max-width: 620px) {
  .reference-actions {
    justify-items: stretch;
    min-width: 0;
    text-align: left;
  }

  #confirmBtn,
  #confirmAssetsBtn,
  #confirmComplianceBtn {
    width: 100%;
    justify-self: stretch;
  }

  .step-footer-actions {
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
  }

  .reference-footer-actions #imageUploadStatus {
    flex-basis: auto;
    max-width: 100%;
    text-align: left;
  }

  .analysis-trends {
    grid-template-columns: 1fr;
  }

  .video-preview-panel {
    width: min(94vw, calc((100vh - 40px) * 9 / 16));
    width: min(94vw, calc((100dvh - 40px) * 9 / 16));
    max-width: 420px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
  }

  .history-tabs {
    grid-template-columns: 1fr;
  }

  .video-preview-modal {
    padding: 14px;
  }
}

/* High-contrast dark workbench theme */
body.auth-active {
  --ink: #f7f4e8;
  --muted: #b9beb3;
  --line: rgba(247, 244, 232, 0.15);
  --panel: #171813;
  --green: #9cff2e;
  --green-dark: #182a0d;
  --gold: #f0c64a;
  --gold-soft: rgba(240, 198, 74, 0.13);
  --cyan: #72d9cf;
  --cyan-soft: rgba(114, 217, 207, 0.13);
  --shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.38);
  background:
    radial-gradient(circle at 12% 0%, rgba(240, 198, 74, 0.1), transparent 34vw),
    radial-gradient(circle at 92% 12%, rgba(156, 255, 46, 0.08), transparent 32vw),
    linear-gradient(180deg, #060704 0%, #0b0c09 46%, #11120e 100%);
  color: var(--ink);
}

body.auth-active::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.86), transparent 680px);
}

body.auth-active .brand-bar,
body.auth-active .workspace-panel,
body.auth-active .task-panel,
body.auth-active .result-panel,
body.auth-active .reference-panel,
body.auth-active .script-panel,
body.auth-active .prompt-panel,
body.auth-active .compliance-panel,
body.auth-active .video-panel,
body.auth-active .history-panel {
  border-color: rgba(247, 244, 232, 0.14);
  background:
    linear-gradient(180deg, rgba(38, 39, 34, 0.96), rgba(18, 19, 15, 0.98)),
    #171813;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  color: var(--ink);
}

body.auth-active .workspace-panel {
  background:
    linear-gradient(135deg, rgba(18, 19, 15, 0.99), rgba(31, 32, 27, 0.96) 52%, rgba(240, 198, 74, 0.13) 100%);
}

body.auth-active .reference-panel {
  border-top-color: var(--gold);
}

body.auth-active .script-panel {
  border-top-color: #f5a55b;
}

body.auth-active .video-panel,
body.auth-active .history-panel {
  border-top-color: var(--green);
}

body.auth-active .hero h1,
body.auth-active .reference-header h2,
body.auth-active .script-header h2,
body.auth-active .asset-card-head strong,
body.auth-active .storyboard-settings-head strong,
body.auth-active .video-card-head strong,
body.auth-active .result-grid strong,
body.auth-active .source-box strong,
body.auth-active .history-card strong,
body.auth-active .script-card strong,
body.auth-active .script-card b,
body.auth-active .prompt-card strong,
body.auth-active .choice-tile b,
body.auth-active .clip-preview strong {
  color: #fffdf3;
}

body.auth-active .hero p,
body.auth-active .workspace-copy span,
body.auth-active .reference-header span,
body.auth-active .script-header span,
body.auth-active .asset-card-head span,
body.auth-active .choice-tile small,
body.auth-active .clip-candidate p,
body.auth-active .video-card p,
body.auth-active .history-card-main p,
body.auth-active .candidate-state-row small,
body.auth-active .script-status,
body.auth-active .source-box p,
body.auth-active .storyboard-settings-head span,
body.auth-active #imageUploadStatus {
  color: var(--muted);
}

body.auth-active .reference-header p,
body.auth-active .script-header p {
  color: var(--gold);
}

body.auth-active .business-controls label,
body.auth-active .persona-grid label,
body.auth-active .asset-cost-control label,
body.auth-active .storyboard-settings-grid label,
body.auth-active .script-controls label,
body.auth-active .model-count-control,
body.auth-active .product-input,
body.auth-active .settings-grid label {
  color: #f6f2df;
}

body.auth-active select,
body.auth-active input[type="text"],
body.auth-active input[type="email"],
body.auth-active input[type="password"],
body.auth-active input[type="number"],
body.auth-active textarea,
body.auth-active .asset-cost-static {
  border-color: rgba(247, 244, 232, 0.18);
  background:
    linear-gradient(180deg, #34362f, #242620);
  color: #fffdf3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.auth-active select {
  color-scheme: dark;
}

body.auth-active select option {
  background: #242620;
  color: #fffdf3;
}

body.auth-active textarea::placeholder,
body.auth-active input::placeholder {
  color: rgba(247, 244, 232, 0.52);
}

body.auth-active textarea:focus,
body.auth-active input:focus,
body.auth-active select:focus {
  border-color: rgba(156, 255, 46, 0.88);
  box-shadow: 0 0 0 3px rgba(156, 255, 46, 0.22);
}

body.auth-active .product-task-tabs,
body.auth-active .workflow-steps,
body.auth-active .api-overview,
body.auth-active .prompt-panel .script-controls,
body.auth-active .compliance-panel .script-controls,
body.auth-active .video-panel .script-controls,
body.auth-active .prompt-panel .script-status,
body.auth-active .compliance-panel .script-status,
body.auth-active .video-panel .script-status,
body.auth-active .source-box,
body.auth-active .asset-cost-control,
body.auth-active .storyboard-settings-panel,
body.auth-active .video-task-log {
  border-color: rgba(247, 244, 232, 0.14);
  background:
    linear-gradient(180deg, #2b2d27, #1d1f1a);
  color: var(--ink);
}

body.auth-active .product-task-tab,
body.auth-active .step-chip,
body.auth-active .result-grid article,
body.auth-active .asset-card,
body.auth-active .script-card,
body.auth-active .prompt-card,
body.auth-active .compliance-card,
body.auth-active .video-card,
body.auth-active .history-card,
body.auth-active .clip-candidate,
body.auth-active .story-video-brief div,
body.auth-active .video-reference-summary,
body.auth-active .storyboard-mini-shot-list {
  border-color: rgba(247, 244, 232, 0.13);
  background:
    linear-gradient(180deg, #20221d, #171813);
  color: var(--ink);
}

body.auth-active .product-task-tab {
  min-height: 50px;
  padding-bottom: 10px;
  color: #fffdf3;
}

body.auth-active .product-task-tab .task-number {
  background: rgba(240, 198, 74, 0.12);
  color: var(--gold);
}

body.auth-active .product-task-tab small {
  color: var(--muted);
}

body.auth-active .product-task-tab.active,
body.auth-active .step-chip.active {
  border-color: rgba(240, 198, 74, 0.9);
  background: linear-gradient(135deg, #ffe476, #f0c64a);
  color: #11170a;
  box-shadow: 0 14px 28px rgba(240, 198, 74, 0.18);
}

body.auth-active .product-task-tab.active .task-number,
body.auth-active .step-chip.active {
  color: #11170a;
}

body.auth-active .product-task-tab.active small {
  color: rgba(17, 23, 10, 0.72);
}

body.auth-active .product-task-tab.status-running:not(.active),
body.auth-active .product-task-tab.status-confirmed:not(.active),
body.auth-active .product-task-tab.status-assets:not(.active),
body.auth-active .product-task-tab.status-done:not(.active),
body.auth-active .step-chip.done {
  border-color: rgba(240, 198, 74, 0.28);
  background: linear-gradient(180deg, #302d1f, #211f17);
}

body.auth-active .asset-actions button,
body.auth-active .reference-actions button,
body.auth-active .script-header button,
body.auth-active .prompt-actions button,
body.auth-active .candidate-submit-btn,
body.auth-active .candidate-download-btn,
body.auth-active .choice-download-btn,
body.auth-active .scene-download-btn,
body.auth-active .history-card-actions button {
  border-color: rgba(156, 255, 46, 0.48);
  background: linear-gradient(135deg, #baff37, #6ee72a);
  color: #101508;
  box-shadow: 0 10px 22px rgba(92, 215, 42, 0.16);
}

body.auth-active .action-row button,
body.auth-active .step-confirm-button,
body.auth-active .auth-form > button {
  border-color: rgba(156, 255, 46, 0.66);
  background: linear-gradient(135deg, #c8ff38, #78ed26);
  color: #101508;
  box-shadow: 0 12px 28px rgba(92, 215, 42, 0.2);
}

body.auth-active button:disabled,
body.auth-active .reference-actions button:disabled,
body.auth-active .asset-actions button:disabled,
body.auth-active .step-confirm-button:disabled,
body.auth-active .history-card-actions button:disabled {
  border-color: rgba(247, 244, 232, 0.14);
  background: linear-gradient(180deg, #383a33, #292b25);
  color: #b9beb3;
  box-shadow: none;
  opacity: 1;
}

body.auth-active .asset-actions button:first-child,
body.auth-active .candidate-retry-btn,
body.auth-active .history-card-actions button:last-child {
  border-color: rgba(240, 198, 74, 0.5);
  background: linear-gradient(180deg, rgba(240, 198, 74, 0.22), rgba(240, 198, 74, 0.1));
  color: #ffe58c;
}

body.auth-active .image-slot,
body.auth-active .choice-tile {
  border-color: rgba(247, 244, 232, 0.16);
  background:
    linear-gradient(180deg, #242620, #181a15);
  color: #fffdf3;
}

body.auth-active .image-slot {
  border-style: dashed;
  border-color: rgba(156, 255, 46, 0.34);
}

body.auth-active .image-slot span,
body.auth-active .image-slot small {
  color: #f6f2df;
}

body.auth-active .choice-tile.placeholder {
  background:
    linear-gradient(180deg, #242620, #181a15);
  color: var(--muted);
}

body.auth-active .choice-image,
body.auth-active .choice-image.empty,
body.auth-active .clip-preview,
body.auth-active .history-thumb.empty {
  border-color: rgba(247, 244, 232, 0.13);
  background-color: #090a07;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--muted);
}

body.auth-active .choice-image.empty::before {
  border-color: rgba(247, 244, 232, 0.68);
}

body.auth-active .choice-tile.selected {
  border-color: rgba(240, 198, 74, 0.72);
  background:
    linear-gradient(180deg, rgba(240, 198, 74, 0.22), rgba(35, 30, 17, 0.98));
  box-shadow: 0 0 0 3px rgba(240, 198, 74, 0.14), 0 18px 32px rgba(0, 0, 0, 0.32);
}

body.auth-active .choice-tile.selected b,
body.auth-active .choice-tile.selected small {
  color: #ffe58c;
}

body.auth-active .choice-selected-badge,
body.auth-active .candidate-state-pill {
  border-color: rgba(240, 198, 74, 0.42);
  background: rgba(240, 198, 74, 0.14);
  color: #ffe58c;
}

body.auth-active .model-count-buttons button,
body.auth-active .product-view-manual-options label {
  border-color: rgba(247, 244, 232, 0.15);
  background: linear-gradient(180deg, #34362f, #242620);
  color: #f8f4e6;
}

body.auth-active .model-count-buttons button.active {
  border-color: rgba(156, 255, 46, 0.78);
  background: linear-gradient(135deg, #c8ff38, #78ed26);
  color: #101508;
  box-shadow: 0 12px 22px rgba(92, 215, 42, 0.2);
}

body.auth-active .asset-cost-control > span,
body.auth-active #modelCountHint,
body.auth-active #productViewEstimateText {
  color: #ffe58c;
}

body.auth-active .mini-progress {
  border-color: rgba(247, 244, 232, 0.16);
  background: #2f312a;
}

body.auth-active .mini-progress span,
body.auth-active .analysis-progress-track span,
body.auth-active .asset-progress-bar {
  background: linear-gradient(90deg, #f0c64a, #ffe476, #8eea37);
}

body.auth-active .clip-candidate.status-not-submitted,
body.auth-active .clip-candidate.status-failed,
body.auth-active .choice-tile.failure-tile {
  border-color: rgba(255, 129, 96, 0.45);
  background: linear-gradient(180deg, rgba(99, 40, 28, 0.5), rgba(31, 18, 13, 0.98));
}

body.auth-active .clip-candidate.status-not-submitted .candidate-state-pill,
body.auth-active .clip-candidate.status-failed .candidate-state-pill,
body.auth-active .choice-tile.failure-tile b,
body.auth-active .choice-tile.failure-tile small,
body.auth-active .asset-error-note {
  color: #ffad98;
}

body.auth-active .clip-candidate.status-draft .candidate-state-pill {
  border-color: rgba(240, 198, 74, 0.5);
  background: rgba(240, 198, 74, 0.14);
  color: #ffe58c;
}

body.auth-active .clip-candidate.status-submitting .candidate-state-pill,
body.auth-active .clip-candidate.status-submitted .candidate-state-pill {
  border-color: rgba(156, 255, 46, 0.42);
  background: rgba(156, 255, 46, 0.14);
  color: #d7ff73;
}

body.auth-active .clip-candidate.status-completed .candidate-state-pill {
  border-color: rgba(156, 255, 46, 0.58);
  background: rgba(156, 255, 46, 0.18);
  color: #dcff89;
}
