.smart-tool-workbench {
  display: grid;
  grid-template-columns: minmax(320px, .92fr) minmax(420px, 1.08fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .09);
}

.smart-tool-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  background: rgba(248, 250, 252, .76);
}

.smart-tool-panel-head,
.smart-tool-result-head,
.smart-tool-actions,
.smart-tool-cost-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.smart-tool-panel-head {
  align-items: flex-start;
}

.smart-tool-panel-head h3,
.smart-tool-result-head h3 {
  margin: 0;
  color: #172033;
  font-size: 18px;
}

.smart-tool-panel-head p,
.smart-tool-result-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.smart-tool-segments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  background: #e9eef5;
}

.smart-tool-segments label {
  position: relative;
  min-width: 0;
}

.smart-tool-segments input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.smart-tool-segments span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
  cursor: pointer;
}

.smart-tool-segments input:checked + span {
  background: #fff;
  color: #172033;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .1);
}

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

.smart-tool-upload {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  min-height: 210px;
  padding: 14px;
  overflow: hidden;
  border: 1px dashed #94a3b8;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.smart-tool-upload:hover,
.smart-tool-upload:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
  transform: translateY(-1px);
}

.smart-tool-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.smart-tool-upload-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: #2563eb;
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
}

.smart-tool-upload strong {
  color: #172033;
  font-size: 14px;
}

.smart-tool-upload small {
  max-width: 210px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.smart-tool-preview {
  position: absolute;
  inset: 0;
  display: none;
  background: #0f172a;
}

.smart-tool-preview.is-visible {
  display: grid;
  place-items: center;
}

.smart-tool-preview img,
.smart-tool-preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.smart-tool-preview audio {
  width: calc(100% - 24px);
}

.smart-tool-preview-name {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  overflow: hidden;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.smart-tool-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.smart-tool-field.full {
  grid-column: 1 / -1;
}

.smart-tool-field > span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.smart-tool-field select,
.smart-tool-field textarea,
.smart-tool-field input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  font: inherit;
  outline: none;
}

.smart-tool-field textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.6;
}

.smart-tool-field select:focus,
.smart-tool-field textarea:focus,
.smart-tool-field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.smart-tool-model-warning {
  grid-column: 1 / -1;
  margin: 0;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.55;
}

.smart-tool-cost-row {
  padding: 11px 12px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #eff6ff;
  color: #475569;
  font-size: 12px;
}

.smart-tool-cost-row strong {
  color: #1e3a8a;
  font-size: 14px;
}

.smart-tool-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.smart-tool-actions button,
.smart-tool-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #e2e8f0;
  color: #172033;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.smart-tool-actions .primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .2);
}

[data-smart-tool="try-on"] .smart-tool-actions .primary {
  background: linear-gradient(135deg, #db2777, #f97316);
  box-shadow: 0 10px 22px rgba(219, 39, 119, .18);
}

[data-smart-tool="try-on"] {
  --tryon-pink: #db2777;
  --tryon-orange: #f97316;
  --tryon-ink: #3b172f;
  background: linear-gradient(145deg, rgba(255, 247, 250, .94), rgba(255, 255, 255, .86));
}

[data-smart-tool="try-on"] .smart-tool-panel {
  background: rgba(255, 252, 253, .86);
  border-color: rgba(219, 39, 119, .12);
}

[data-smart-tool="try-on"] .smart-tool-panel-head h3,
[data-smart-tool="try-on"] .smart-tool-result-head h3 {
  color: var(--tryon-ink);
  letter-spacing: 0;
}

.tryon-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
  color: var(--tryon-pink);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tryon-kicker span {
  font-size: 14px;
}

.tryon-ready-badge,
.tryon-result-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #fbcfe8;
  border-radius: 999px;
  background: #fff1f7;
  color: #9d174d;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.tryon-ready-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .12);
}

.tryon-result-state.is-complete {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.tryon-agent-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr) 32px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: 7px;
  border: 1px solid #fce7f3;
  border-radius: 13px;
  background: rgba(255, 241, 247, .66);
}

.tryon-agent-rail span {
  display: grid;
  grid-template-columns: 25px 1fr;
  align-items: center;
  column-gap: 7px;
  min-width: 0;
  padding: 7px 8px;
  color: #9f7890;
}

.tryon-agent-rail span b {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #fce7f3;
  color: #be185d;
  font-size: 11px;
}

.tryon-agent-rail span strong {
  overflow: hidden;
  color: #6b3856;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tryon-agent-rail span small {
  overflow: hidden;
  color: #b18ca1;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tryon-agent-rail span.is-active strong,
.tryon-agent-rail span.is-ready strong {
  color: var(--tryon-ink);
}

.tryon-agent-rail span.is-active b {
  background: linear-gradient(135deg, var(--tryon-pink), var(--tryon-orange));
  color: #fff;
}

.tryon-agent-rail span.is-ready b {
  background: #dcfce7;
  color: #15803d;
}

.tryon-agent-rail i {
  display: block;
  height: 1px;
  background: #f9a8d4;
}

.tryon-upload {
  min-height: 236px;
  padding-top: 28px;
  border-color: #f9a8d4;
  background: linear-gradient(180deg, #fff, #fff8fb);
}

.tryon-upload:hover,
.tryon-upload:focus-within,
.tryon-upload.has-file {
  border-color: var(--tryon-pink);
  box-shadow: 0 0 0 4px rgba(219, 39, 119, .1), 0 12px 26px rgba(219, 39, 119, .08);
}

.tryon-upload-step {
  position: absolute;
  top: 11px;
  left: 13px;
  color: #be185d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.tryon-upload .smart-tool-upload-icon {
  border-color: #fbcfe8;
  background: #fff1f7;
  color: var(--tryon-pink);
}

.tryon-file-check {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tryon-file-check.is-ready {
  background: #f0fdf4;
  color: #15803d;
}

.tryon-file-check.is-warning {
  background: #fff7ed;
  color: #c2410c;
}

[data-smart-tool="try-on"] .smart-tool-field > span small {
  color: #b18ca1;
  font-size: 10px;
  font-weight: 700;
}

.tryon-preserve-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tryon-preserve-options label {
  position: relative;
}

.tryon-preserve-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tryon-preserve-options span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 8px;
  border: 1px solid #fbcfe8;
  border-radius: 9px;
  background: #fff;
  color: #9d174d;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.tryon-preserve-options input:checked + span {
  border-color: #f472b6;
  background: #fff1f7;
  color: #831843;
}

.tryon-preserve-options input:focus-visible + span {
  outline: 3px solid rgba(219, 39, 119, .18);
  outline-offset: 2px;
}

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

.tryon-quality-checks span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid #fce7f3;
  border-radius: 8px;
  background: #fff8fb;
  color: #9d174d;
  font-size: 10px;
  font-weight: 800;
}

.tryon-quality-checks i {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fce7f3;
  color: #db2777;
  font-size: 10px;
  font-style: normal;
}

[data-smart-tool="try-on"] .smart-tool-result {
  min-height: 390px;
  border-color: #fbcfe8;
  background: radial-gradient(circle at 50% 35%, #fff1f7, #fff 60%);
}

[data-smart-tool="try-on"] .smart-tool-result.is-complete {
  background: #3b172f;
}

.tryon-result-orb {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid #fbcfe8;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff1f7, #ffedd5);
  color: #db2777;
  font-size: 28px;
  box-shadow: 0 10px 24px rgba(219, 39, 119, .12);
}

[data-smart-tool="try-on"] .smart-tool-result-empty {
  color: #9f7890;
}

[data-smart-tool="try-on"] .smart-tool-result-empty strong {
  color: #6b3856;
}

[data-smart-tool="try-on"] .smart-tool-result-empty small {
  color: #b18ca1;
}

[data-smart-tool="face-swap"] .smart-tool-actions .primary {
  background: #0891b2;
  box-shadow: 0 10px 22px rgba(8, 145, 178, .18);
}

.digital-human-workbench {
  background: rgba(255, 255, 255, .82);
}

.digital-human-workbench > .smart-tool-panel:first-child {
  gap: 16px;
}

.digital-human-section-title,
.digital-human-section-title > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.digital-human-section-title > div {
  justify-content: flex-start;
  min-width: 0;
}

.digital-human-section-title strong {
  color: #172033;
  font-size: 13px;
}

.digital-human-section-title span {
  color: #94a3b8;
  font-size: 11px;
}

.digital-human-section-title button {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 11px;
}

.digital-human-presets {
  display: grid;
  gap: 9px;
}

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

.digital-human-preset-list button {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 56px;
  padding: 8px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.digital-human-preset-list button:hover,
.digital-human-preset-list button:focus-visible {
  border-color: #93c5fd;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.digital-human-preset-list button.is-active {
  border-color: #60a5fa;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .08);
}

.digital-human-preset-list strong {
  overflow: hidden;
  color: #172033;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-human-preset-list span {
  overflow: hidden;
  color: #64748b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-human-upload-card {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.digital-human-upload-card .smart-tool-upload {
  min-height: 190px;
}

.digital-human-upload-card .smart-tool-upload.is-dragging {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.digital-human-file-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 30px;
  visibility: hidden;
}

.digital-human-upload-card.has-file .digital-human-file-actions {
  visibility: visible;
}

.digital-human-file-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #dbe3ec;
  border-radius: 7px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.digital-human-file-actions button:last-child {
  border-color: transparent;
  background: transparent;
  color: #b91c1c;
}

.digital-human-duration-hint {
  color: #64748b !important;
  font-size: 10px !important;
  font-weight: 650 !important;
}

.digital-human-duration-hint.is-warning {
  color: #b45309 !important;
}

.digital-human-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.digital-human-consent input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #2563eb;
  flex: 0 0 auto;
}

.digital-human-consent span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.digital-human-consent strong {
  color: #172033;
  font-size: 12px;
}

.digital-human-consent small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
}

.digital-human-agent-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr) 18px minmax(0, 1fr) 18px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
}

.digital-human-agent-rail span {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  min-height: 58px;
  padding: 8px 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.digital-human-agent-rail span b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
}

.digital-human-agent-rail span small {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 750;
}

.digital-human-agent-rail span.is-active,
.digital-human-agent-rail span.is-ready {
  color: #172033;
}

.digital-human-agent-rail span.is-ready b {
  background: #dcfce7;
  color: #166534;
}

.digital-human-agent-rail i {
  display: block;
  align-self: center;
  height: 1px;
  background: #cbd5e1;
}

.digital-human-mode-note {
  margin-top: -4px;
  padding: 9px 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
}

.digital-human-file-check {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  max-width: calc(100% - 16px);
  overflow: hidden;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .72);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-human-file-check.is-ready {
  background: rgba(22, 101, 52, .86);
}

.digital-human-file-check.is-warning {
  background: rgba(180, 83, 9, .9);
}

.digital-human-guardrails {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
}

.digital-human-guardrails legend {
  padding: 0 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.digital-human-guardrails label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.digital-human-guardrails input {
  width: 14px;
  height: 14px;
  accent-color: #2563eb;
  flex: 0 0 auto;
}

.digital-human-readiness {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.digital-human-readiness div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.digital-human-readiness div.is-ready {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.digital-human-readiness strong {
  color: #172033;
  font-size: 12px;
}

.digital-human-readiness span {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-human-quality {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.digital-human-quality span {
  display: grid;
  place-items: center;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.digital-human-progress {
  display: grid;
  gap: 7px;
}

.digital-human-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 11px;
}

.digital-human-progress strong {
  color: #172033;
  font-size: 11px;
}

.digital-human-progress > i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.digital-human-progress > i b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #10b981;
  transition: width .22s ease;
}

.digital-human-brief {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border-left: 3px solid #2563eb;
  background: #f8fafc;
}

.digital-human-brief > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.digital-human-brief span,
.digital-human-brief p {
  color: #64748b;
  font-size: 11px;
}

.digital-human-brief strong {
  overflow: hidden;
  color: #172033;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-human-brief p {
  margin: 0;
  line-height: 1.5;
}

.digital-human-workbench .smart-tool-actions .primary {
  flex: 1 1 220px;
}

.face-swap-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
}

.face-swap-flow span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.face-swap-flow span + span {
  border-left: 1px solid #e2e8f0;
}

.face-swap-flow b {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 10px;
}

.face-swap-upload {
  min-height: 230px;
  padding-top: 36px;
}

.face-swap-upload-step {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
}

.face-swap-file-check {
  min-height: 18px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 750;
}

.face-swap-file-check.is-ready { color: #047857; }
.face-swap-file-check.is-warning { color: #b45309; }

.face-swap-model-hint {
  grid-column: 1 / -1;
  margin: -5px 0 0;
  color: #64748b;
  font-size: 10px;
  line-height: 1.5;
}

.face-swap-strategy-field,
.face-swap-preserve-field {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.face-swap-strategy-field legend,
.face-swap-preserve-field legend {
  margin-bottom: 7px;
  padding: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.face-swap-strategies {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.face-swap-strategies label { position: relative; min-width: 0; }

.face-swap-strategies input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.face-swap-strategies span {
  display: grid;
  gap: 3px;
  min-height: 72px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.face-swap-strategies strong { color: #172033; font-size: 12px; }
.face-swap-strategies small { color: #64748b; font-size: 10px; line-height: 1.45; }

.face-swap-strategies input:checked + span {
  border-color: #0891b2;
  background: #ecfeff;
  box-shadow: 0 0 0 2px rgba(8, 145, 178, .11);
}

.face-swap-strength-field > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.face-swap-strength-field output { color: #0e7490; }

.face-swap-strength-field input[type="range"] {
  min-height: 42px;
  padding: 0;
  border: 0;
  box-shadow: none;
  accent-color: #0891b2;
}

.face-swap-preserve-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.face-swap-preserve-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #dbe3ec;
  border-radius: 7px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.face-swap-preserve-options input { accent-color: #0891b2; }

.face-swap-readiness {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #dbe3ec;
}

.face-swap-readiness > div {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 10px;
  background: #fff;
}

.face-swap-readiness span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}

.face-swap-readiness b { color: #475569; font-size: 11px; }
.face-swap-readiness small { overflow: hidden; color: #94a3b8; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.face-swap-readiness .is-ready span { background: #10b981; }
.face-swap-readiness .is-ready small { color: #047857; }

.face-swap-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
  color: #78350f;
  font-size: 11px;
  line-height: 1.55;
  cursor: pointer;
}

.face-swap-consent input { flex: 0 0 auto; margin-top: 2px; accent-color: #0891b2; }
.smart-tool-actions [data-face-download][hidden] { display: none; }

.video-prompt-workbench {
  display: grid;
  grid-template-columns: minmax(360px, .92fr) minmax(420px, 1.08fr);
  gap: 16px;
}

.video-prompt-agent-rail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: max-content 1fr max-content 1fr max-content 1fr max-content;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}

.video-prompt-agent-rail span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.video-prompt-agent-rail span b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  font-size: 11px;
}

.video-prompt-agent-rail span.is-active { color: #172033; }
.video-prompt-agent-rail span.is-active b { border-color: #172033; background: #172033; color: #fff; }
.video-prompt-agent-rail span.is-complete { color: #047857; }
.video-prompt-agent-rail span.is-complete b { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.video-prompt-agent-rail i { height: 1px; background: #dbe3ec; }

.video-prompt-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 8px;
  background: #f8fafc;
}

.video-prompt-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.video-prompt-panel-head h3 {
  margin: 0;
  color: #172033;
  font-size: 18px;
}

.video-prompt-panel-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.video-prompt-upload-button {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.video-prompt-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.video-prompt-preview {
  display: grid;
  place-items: center;
  min-height: 300px;
  overflow: hidden;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #111827;
}

.video-prompt-preview video {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
}

.video-prompt-empty,
.video-prompt-result-empty {
  display: grid;
  gap: 9px;
  justify-items: center;
  padding: 28px;
  color: #cbd5e1;
  text-align: center;
}

.video-prompt-empty span,
.video-prompt-result-empty span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #64748b;
  border-radius: 8px;
  font-size: 26px;
}

.video-prompt-meta {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.video-prompt-mode-grid label { position: relative; min-width: 0; }
.video-prompt-mode-grid input { position: absolute; opacity: 0; pointer-events: none; }
.video-prompt-mode-grid span {
  display: grid;
  gap: 3px;
  min-height: 68px;
  padding: 10px;
  border: 1px solid #dbe3ec;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}
.video-prompt-mode-grid strong { color: #334155; font-size: 12px; }
.video-prompt-mode-grid small { color: #94a3b8; font-size: 10px; line-height: 1.4; }
.video-prompt-mode-grid input:checked + span { border-color: #0369a1; background: #f0f9ff; box-shadow: 0 0 0 2px rgba(3, 105, 161, .08); }
.video-prompt-mode-grid input:checked + span strong { color: #075985; }

.video-prompt-principle {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px;
  padding: 10px 11px;
  border-left: 3px solid #0284c7;
  background: #f0f9ff;
  color: #475569;
  font-size: 11px;
  line-height: 1.55;
}
.video-prompt-principle strong { color: #075985; }

.video-prompt-score-group { display: flex; align-items: center; gap: 8px; }
.video-prompt-score {
  display: grid;
  justify-items: center;
  min-width: 58px;
  padding: 6px 8px;
  border: 1px solid #bae6fd;
  border-radius: 7px;
  background: #f0f9ff;
}
.video-prompt-score strong { color: #075985; font-size: 18px; line-height: 1; }
.video-prompt-score span { margin-top: 2px; color: #64748b; font-size: 9px; }

.video-prompt-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #dbe3ec;
}
.video-prompt-tabs button {
  min-height: 38px;
  padding: 0 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.video-prompt-tabs button.is-active { border-bottom-color: #0369a1; color: #075985; }

.video-prompt-result {
  min-height: 520px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.video-prompt-result-empty {
  min-height: 520px;
  color: #94a3b8;
}

.video-prompt-result-empty small { color: #94a3b8; font-size: 11px; }

.video-prompt-result-empty span {
  border-color: #cbd5e1;
}

.video-prompt-view {
  min-height: 520px;
  padding: 16px;
}

.video-prompt-view label { display: grid; gap: 7px; }
.video-prompt-view label > span { color: #475569; font-size: 11px; font-weight: 850; }
.video-prompt-view textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 7px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-size: 12px;
  line-height: 1.65;
  outline: none;
  resize: vertical;
}
.video-prompt-view > label > textarea { min-height: 260px; }
.video-prompt-view textarea:focus { border-color: #0284c7; box-shadow: 0 0 0 3px rgba(2, 132, 199, .09); }

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

.video-prompt-timeline { display: grid; }
.video-prompt-timeline article {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #e2e8f0;
}
.video-prompt-timeline article:last-child { border-bottom: 0; }
.video-prompt-timeline article > span { color: #0369a1; font-size: 11px; font-weight: 850; }
.video-prompt-timeline article strong { color: #172033; font-size: 12px; }
.video-prompt-timeline article p { display: flex; gap: 7px; margin: 6px 0 0; color: #64748b; font-size: 11px; line-height: 1.55; }
.video-prompt-timeline article p b { flex: 0 0 30px; color: #334155; font-size: 10px; }
.video-prompt-blank { margin: 0; padding: 24px; color: #94a3b8; text-align: center; }

.video-prompt-evidence-grid,
.video-prompt-quality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.video-prompt-quality-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
.video-prompt-evidence-grid section,
.video-prompt-quality-grid section { min-width: 0; }
.video-prompt-evidence-grid strong,
.video-prompt-quality-grid strong,
.video-prompt-model-notes strong { color: #334155; font-size: 11px; }
.video-prompt-evidence-grid ul,
.video-prompt-quality-grid ul,
.video-prompt-model-notes ul { margin: 8px 0 0; padding-left: 17px; color: #64748b; font-size: 10px; line-height: 1.6; }
.video-prompt-evidence-grid li + li,
.video-prompt-quality-grid li + li,
.video-prompt-model-notes li + li { margin-top: 5px; }
.video-prompt-evidence-grid li.is-empty,
.video-prompt-quality-grid li.is-empty,
.video-prompt-model-notes li.is-empty { color: #94a3b8; }

.video-prompt-parameters {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr);
  gap: 8px 12px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.video-prompt-parameters dt { color: #94a3b8; font-size: 10px; }
.video-prompt-parameters dd { margin: 0; color: #334155; font-size: 10px; }
.video-prompt-model-notes { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e2e8f0; }

.video-prompt-quality-head { display: flex; align-items: center; justify-content: space-between; color: #334155; font-size: 12px; }
.video-prompt-quality-head span { color: #075985; font-weight: 850; }
.video-prompt-quality-track { height: 8px; margin-top: 10px; overflow: hidden; border-radius: 4px; background: #e2e8f0; }
.video-prompt-quality-track i { display: block; width: 0; height: 100%; background: #0284c7; transition: width .25s ease; }

.video-prompt-refine { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.video-prompt-refine > span { margin-right: 3px; color: #64748b; font-size: 10px; font-weight: 850; }
.video-prompt-refine button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}
.video-prompt-refine button:hover { border-color: #0284c7; color: #075985; }

.video-prompt-frame-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  background: #f0f9ff;
  color: #0369a1;
  font-size: 11px;
  font-weight: 800;
}

.video-prompt-workbench .smart-tool-actions .primary {
  background: #0369a1;
  box-shadow: 0 8px 18px rgba(3, 105, 161, .18);
}

.viral-video-workbench {
  display: grid;
  grid-template-columns: minmax(340px, .86fr) minmax(480px, 1.14fr);
  gap: 16px;
}

.viral-agent-rail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: max-content 1fr max-content 1fr max-content 1fr max-content;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
}

.viral-agent-rail span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.viral-agent-rail span b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  font-size: 11px;
}

.viral-agent-rail span.is-active {
  color: #172033;
}

.viral-agent-rail span.is-active b {
  border-color: #172033;
  background: #172033;
  color: #fff;
}

.viral-agent-rail span.is-complete {
  color: #0f766e;
}

.viral-agent-rail span.is-complete b {
  border-color: #0f766e;
  background: #f0fdfa;
  color: #0f766e;
}

.viral-agent-rail i {
  height: 1px;
  background: #cbd5e1;
}

.viral-video-source,
.viral-video-output {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}

.viral-video-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.viral-video-head h3 {
  margin: 0;
  color: #172033;
  font-size: 18px;
}

.viral-video-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.viral-video-upload {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.viral-video-upload:hover,
.viral-video-upload:focus-within {
  border-color: #e11d48;
  box-shadow: 0 0 0 4px rgba(225, 29, 72, .09);
}

.viral-video-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.viral-video-preview {
  display: grid;
  place-items: center;
  min-height: 300px;
  overflow: hidden;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #111827;
}

.viral-video-preview video {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
}

.viral-video-empty {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 28px;
  color: #cbd5e1;
  text-align: center;
}

.viral-video-empty > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #64748b;
  border-radius: 8px;
  font-size: 25px;
}

.viral-video-empty small {
  color: #94a3b8;
  font-size: 12px;
}

.viral-video-meta {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viral-video-principle {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border-left: 3px solid #0f766e;
  background: #f0fdfa;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
}

.viral-video-principle strong {
  flex: 0 0 auto;
  color: #0f766e;
}

.viral-video-workbench .smart-tool-actions .primary,
.viral-replicate-bar .primary {
  background: #172033;
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 32, 51, .18);
}

.viral-score {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: #64748b;
}

.viral-score-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.viral-confidence {
  display: grid;
  gap: 2px;
  padding-right: 12px;
  border-right: 1px solid #e2e8f0;
  text-align: right;
}

.viral-confidence span {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
}

.viral-confidence strong {
  color: #0f766e;
  font-size: 15px;
}

.viral-score strong {
  color: #e11d48;
  font-size: 30px;
  line-height: 1;
}

.viral-score span {
  font-size: 12px;
  font-weight: 800;
}

.viral-result-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f1f5f9;
}

.viral-result-tabs button {
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.viral-result-tabs button.is-active {
  background: #fff;
  color: #172033;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
}

.viral-result-shell {
  min-height: 438px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.viral-result-shell > .viral-video-empty {
  min-height: 438px;
  color: #94a3b8;
}

.viral-result-view {
  min-height: 438px;
  padding: 16px;
}

.viral-result-view[hidden] {
  display: none;
}

.viral-verdict {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-left: 3px solid #e11d48;
  background: #fff1f2;
  color: #881337;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
}

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

.viral-metric-grid > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.viral-metric-grid span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.viral-metric-grid strong {
  color: #172033;
  font-size: 16px;
}

.viral-metric-grid i {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: #e2e8f0;
}

.viral-metric-grid i::after {
  display: block;
  width: var(--metric-value, 0%);
  height: 100%;
  background: #e11d48;
  content: "";
}

.viral-evidence-grid,
.viral-strategy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.viral-evidence-grid section,
.viral-strategy-grid section {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.viral-evidence-grid section:nth-child(1) {
  border-top: 3px solid #0f766e;
}

.viral-evidence-grid section:nth-child(2) {
  border-top: 3px solid #2563eb;
}

.viral-evidence-grid section:nth-child(3) {
  border-top: 3px solid #d97706;
}

.viral-evidence-grid h4,
.viral-strategy-grid h4 {
  margin: 0 0 7px;
  color: #172033;
  font-size: 12px;
}

.viral-evidence-grid ul,
.viral-strategy-grid ul,
.viral-quality-gate ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.viral-evidence-grid li,
.viral-strategy-grid li {
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
}

.viral-evidence-grid li::before,
.viral-strategy-grid li::before {
  margin-right: 5px;
  color: #94a3b8;
  content: "•";
}

.viral-timeline {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.viral-timeline > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #e2e8f0;
}

.viral-timeline time {
  color: #e11d48;
  font-size: 12px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.viral-timeline strong {
  color: #172033;
  font-size: 13px;
}

.viral-timeline p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

.viral-strategy-summary {
  padding: 13px 14px;
  border-left: 3px solid #2563eb;
  background: #eff6ff;
}

.viral-strategy-summary strong {
  color: #1e3a8a;
  font-size: 14px;
}

.viral-strategy-summary p {
  margin: 5px 0 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.6;
}

.viral-hook-bank {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.viral-hook-bank button {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  text-align: left;
  cursor: pointer;
}

.viral-hook-bank button:hover,
.viral-hook-bank button.is-selected {
  border-color: #e11d48;
  background: #fff1f2;
}

.viral-hook-bank span {
  color: #e11d48;
  font-size: 10px;
  font-weight: 900;
}

.viral-hook-bank strong {
  font-size: 12px;
  line-height: 1.5;
}

.viral-hook-bank small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
}

.viral-strategy-grid section:nth-child(1) {
  border-top: 3px solid #0f766e;
}

.viral-strategy-grid section:nth-child(2) {
  border-top: 3px solid #2563eb;
}

.viral-strategy-grid section:nth-child(3) {
  border-top: 3px solid #dc2626;
}

.viral-result-view > textarea,
.viral-negative-field textarea {
  display: block;
  width: 100%;
  min-height: 406px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #172033;
  font: inherit;
  font-size: 14px;
  line-height: 1.72;
  outline: none;
  resize: vertical;
}

.viral-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.viral-editor-head span {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.viral-editor-head button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.viral-negative-field {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.viral-negative-field span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.viral-negative-field textarea {
  min-height: 88px;
}

[data-viral-view="prompt"] > textarea {
  min-height: 260px;
}

.viral-quality-gate {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.viral-quality-gate[hidden],
.viral-refine-bar[hidden] {
  display: none;
}

.viral-quality-gate > div {
  display: grid;
  align-content: center;
  gap: 3px;
}

.viral-quality-gate > div span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.viral-quality-gate > div strong {
  color: #172033;
  font-size: 18px;
}

.viral-quality-gate ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.viral-quality-gate li {
  color: #475569;
  font-size: 11px;
  line-height: 1.45;
}

.viral-quality-gate li::before {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-right: 5px;
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  content: "!";
}

.viral-quality-gate li.is-pass::before {
  background: #0f766e;
  content: "✓";
}

.viral-quality-gate li.is-warning::before {
  background: #d97706;
}

.viral-refine-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.viral-refine-bar > span {
  margin-right: 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.viral-refine-bar button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.viral-refine-bar button:hover {
  border-color: #2563eb;
  color: #1d4ed8;
}

.viral-refine-bar button:disabled {
  opacity: .55;
  cursor: wait;
}

.viral-replicate-bar {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 90px 90px auto;
  align-items: end;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
}

.viral-replicate-bar[hidden] {
  display: none;
}

.viral-replicate-bar label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.viral-replicate-bar label > span {
  color: #475569;
  font-size: 11px;
  font-weight: 850;
}

.viral-replicate-bar select {
  width: 100%;
  min-height: 40px;
  padding: 0 9px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-size: 12px;
}

.viral-replicate-bar button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.viral-generated-result {
  min-height: 260px;
}

.video-cleaner-workbench {
  display: grid;
  grid-template-columns: minmax(420px, 1.18fr) minmax(320px, .82fr);
  gap: 16px;
}

.video-cleaner-agent-rail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
}

.video-cleaner-agent-rail span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.video-cleaner-agent-rail b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #f8fafc;
  font-size: 11px;
}

.video-cleaner-agent-rail i {
  height: 1px;
  background: #e2e8f0;
}

.video-cleaner-agent-rail span.is-active { color: #0f766e; }
.video-cleaner-agent-rail span.is-active b { border-color: #14b8a6; background: #ccfbf1; color: #115e59; }
.video-cleaner-agent-rail span.is-complete { color: #334155; }
.video-cleaner-agent-rail span.is-complete b { border-color: #0f766e; background: #0f766e; color: #fff; }

.video-cleaner-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 8px;
  background: #f8fafc;
}

.video-cleaner-panel-head,
.video-cleaner-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.video-cleaner-panel-head h3 {
  margin: 0;
  color: #172033;
  font-size: 18px;
}

.video-cleaner-panel-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.video-cleaner-upload-button {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.video-cleaner-upload-button:hover { border-color: #0f766e; color: #0f766e; }

.video-cleaner-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.video-cleaner-editor,
.video-cleaner-result {
  display: grid;
  place-items: center;
  min-height: 360px;
  overflow: hidden;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #111827;
}

.video-cleaner-empty {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 28px;
  color: #cbd5e1;
  text-align: center;
}

.video-cleaner-empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #64748b;
  border-radius: 8px;
  font-size: 25px;
}

.video-cleaner-empty small {
  color: #94a3b8;
}

.video-cleaner-source-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
}

.video-cleaner-source-meta[hidden] { display: none; }

.video-cleaner-source-meta span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
}

.video-cleaner-source-meta span + span { border-left: 1px solid #e2e8f0; }
.video-cleaner-source-meta small { color: #94a3b8; font-size: 10px; font-weight: 750; }
.video-cleaner-source-meta strong { overflow: hidden; color: #334155; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.video-cleaner-stage {
  position: relative;
  width: 100%;
  max-height: 620px;
  background: #000;
  touch-action: none;
}

.video-cleaner-stage[hidden] {
  display: none;
}

.video-cleaner-stage video,
.video-cleaner-result video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-cleaner-overlay {
  position: absolute;
  inset: 0;
  cursor: crosshair;
  touch-action: none;
}

.video-cleaner-region {
  position: absolute;
  min-width: 18px;
  min-height: 18px;
  border: 2px solid #22d3ee;
  background: rgba(8, 145, 178, .22);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .45);
  cursor: move;
}

.video-cleaner-region.is-watermark { border-color: #f59e0b; background: rgba(245, 158, 11, .2); }
.video-cleaner-region.is-watermark > span { background: #b45309; }
.video-cleaner-region.is-active { box-shadow: 0 0 0 3px rgba(34, 211, 238, .3); }

.video-cleaner-region.is-highlighted {
  animation: video-cleaner-highlight .7s ease;
}

@keyframes video-cleaner-highlight {
  50% { box-shadow: 0 0 0 5px rgba(34, 211, 238, .42); }
}

.video-cleaner-region > span {
  position: absolute;
  top: 3px;
  left: 4px;
  padding: 2px 5px;
  background: #0e7490;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  pointer-events: none;
}

.video-cleaner-region > button {
  position: absolute;
  top: -12px;
  right: -12px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.video-cleaner-region > i {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 3px;
  background: #0891b2;
  cursor: nwse-resize;
}

.video-cleaner-playback,
.video-cleaner-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.video-cleaner-playback button {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #0f766e;
  font-size: 14px;
  cursor: pointer;
}

.video-cleaner-playback input {
  flex: 1 1 180px;
  accent-color: #0f766e;
}

.video-cleaner-playback output {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.video-cleaner-toolbar > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.video-cleaner-toolbar button {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.video-cleaner-toolbar button:hover {
  border-color: #0891b2;
  color: #0e7490;
}

.video-cleaner-region-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.video-cleaner-region-head > div { display: grid; gap: 3px; }
.video-cleaner-region-head strong { color: #334155; font-size: 13px; }
.video-cleaner-region-head span { color: #94a3b8; font-size: 11px; }
.video-cleaner-region-head > b { color: #0f766e; font-size: 12px; }

.video-cleaner-region-list {
  display: grid;
  gap: 8px;
}

.video-cleaner-region-empty {
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}

.video-cleaner-coordinate-card {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
}

.video-cleaner-coordinate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.video-cleaner-coordinate-head strong {
  color: #334155;
  font-size: 13px;
}

.video-cleaner-coordinate-head span {
  overflow: hidden;
  color: #94a3b8;
  font-size: 11px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-cleaner-coordinate-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.video-cleaner-coordinate-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.video-cleaner-coordinate-grid label > span {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}

.video-cleaner-coordinate-grid input {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.video-cleaner-coordinate-grid input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
}

.video-cleaner-coordinate-grid input:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .1);
}

.video-cleaner-coordinate-card > button {
  min-height: 36px;
  border: 1px solid #99f6e4;
  border-radius: 7px;
  background: #f0fdfa;
  color: #0f766e;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.video-cleaner-coordinate-card > button:disabled {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.video-cleaner-region-task {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
}

.video-cleaner-region-task.is-active { border-color: #5eead4; box-shadow: 0 0 0 2px rgba(20, 184, 166, .1); }

.video-cleaner-region-task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.video-cleaner-region-task-head > button:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #334155;
  cursor: pointer;
}

.video-cleaner-region-task-head b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; background: #ccfbf1; color: #115e59; font-size: 10px; }
.video-cleaner-region-task-head strong { font-size: 12px; }
.video-cleaner-region-task-head span { overflow: hidden; color: #94a3b8; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.video-cleaner-region-task-head > button:last-child { width: 26px; height: 26px; padding: 0; border: 0; background: transparent; color: #b91c1c; font-size: 18px; cursor: pointer; }

.video-cleaner-region-task-fields,
.video-cleaner-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.video-cleaner-region-task-fields label,
.video-cleaner-settings label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.video-cleaner-region-task-fields label > span,
.video-cleaner-settings label > span { color: #64748b; font-size: 10px; font-weight: 800; }

.video-cleaner-region-task-fields select,
.video-cleaner-region-task-fields input,
.video-cleaner-settings select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.video-cleaner-region-task-fields input:disabled { background: #f1f5f9; color: #94a3b8; }
.video-cleaner-region-task-fields select:focus,
.video-cleaner-region-task-fields input:focus,
.video-cleaner-settings select:focus { border-color: #14b8a6; box-shadow: 0 0 0 3px rgba(20, 184, 166, .1); }

.video-cleaner-toolbar .danger {
  margin-left: auto;
  color: #b91c1c;
}

.video-cleaner-result {
  min-height: 300px;
  color: #94a3b8;
  text-align: center;
}

.video-cleaner-result.is-complete {
  border-style: solid;
}

.video-cleaner-score {
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
}

.video-cleaner-score strong { color: #0f766e; font-size: 18px; line-height: 1; }
.video-cleaner-score span { color: #94a3b8; font-size: 9px; }

.video-cleaner-gate {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-left: 3px solid #94a3b8;
  border-radius: 7px;
  background: #fff;
}

.video-cleaner-gate.is-ready { border-left-color: #10b981; }
.video-cleaner-gate.has-warning { border-left-color: #f59e0b; }
.video-cleaner-gate > div { display: flex; align-items: center; gap: 8px; color: #334155; font-size: 12px; }
.video-cleaner-gate > div span { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.video-cleaner-gate.is-ready > div span { background: #10b981; }
.video-cleaner-gate.has-warning > div span { background: #f59e0b; }
.video-cleaner-gate ul { display: grid; gap: 5px; margin: 0; padding-left: 17px; color: #64748b; font-size: 11px; line-height: 1.45; }

.video-cleaner-settings { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.video-cleaner-summary {
  align-items: center;
  padding: 11px 12px;
  border: 1px solid #ccfbf1;
  border-radius: 8px;
  background: #f0fdfa;
  color: #475569;
  font-size: 12px;
}

.video-cleaner-summary strong {
  color: #115e59;
  font-size: 12px;
}

.smart-tool-actions .primary:disabled {
  background: #cbd5e1;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
}

.smart-tool-status {
  min-height: 22px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.smart-tool-status.is-error {
  color: #b91c1c;
  font-weight: 750;
}

.smart-tool-status.is-success {
  color: #047857;
  font-weight: 750;
}

.smart-tool-result {
  display: grid;
  place-items: center;
  min-height: 360px;
  overflow: hidden;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: #94a3b8;
  text-align: center;
}

.smart-tool-result.is-complete {
  border-style: solid;
  background: #0f172a;
}

.smart-tool-result img,
.smart-tool-result video {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.smart-tool-result-empty {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 24px;
}

.smart-tool-result-empty span {
  font-size: 32px;
}

.sales-script-workbench {
  display: grid;
  grid-template-columns: minmax(340px, .9fr) minmax(460px, 1.1fr);
  gap: 16px;
}

.sales-agent-rail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 8px;
  background: #fff;
}

.sales-agent-rail span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.sales-agent-rail span b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
}

.sales-agent-rail span.is-active {
  color: #172033;
}

.sales-agent-rail span.is-active b {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.sales-agent-rail i {
  height: 1px;
  background: #cbd5e1;
}

.sales-script-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 8px;
  background: #f8fafc;
}

.sales-script-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sales-script-head h3 {
  margin: 0;
  color: #172033;
  font-size: 18px;
}

.sales-script-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.sales-product-upload {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
  overflow: hidden;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.sales-product-upload:hover,
.sales-product-upload:focus-within {
  border-color: #c2410c;
  box-shadow: 0 0 0 4px rgba(194, 65, 12, .09);
}

.sales-product-upload > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.sales-product-upload > img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: contain;
  background: #f1f5f9;
}

.sales-product-empty {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 28px;
  color: #475569;
  text-align: center;
}

.sales-product-empty > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #c2410c;
  font-size: 26px;
}

.sales-product-empty strong {
  color: #172033;
  font-size: 14px;
}

.sales-product-empty small {
  color: #64748b;
  font-size: 12px;
}

.sales-product-replace {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(15, 23, 42, .82);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.sales-script-workbench .smart-tool-actions .primary {
  background: #172033;
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 32, 51, .18);
}

.sales-script-count {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 11px;
  font-weight: 800;
}

.sales-agent-insight {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
}

.sales-agent-insight > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border-left: 1px solid #e2e8f0;
}

.sales-agent-insight > div:first-child {
  border-left: 0;
}

.sales-agent-insight span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.sales-agent-insight strong {
  overflow: hidden;
  color: #172033;
  font-size: 12px;
  line-height: 1.55;
  text-overflow: ellipsis;
}

.sales-result-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #eef2f7;
}

.sales-result-tabs button {
  min-height: 38px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.sales-result-tabs button.is-active {
  background: #fff;
  color: #172033;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
}

.sales-script-result {
  min-height: 548px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.sales-script-result-empty {
  display: grid;
  min-height: 548px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 28px;
  color: #64748b;
  text-align: center;
}

.sales-script-result-empty > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #c2410c;
  font-size: 18px;
  font-weight: 900;
}

.sales-script-result-empty strong {
  color: #172033;
  font-size: 14px;
}

.sales-script-result-empty small {
  max-width: 320px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.6;
}

.sales-script-result textarea {
  display: block;
  width: 100%;
  min-height: 548px;
  padding: 18px;
  border: 0;
  background: #fff;
  color: #172033;
  font: inherit;
  font-size: 14px;
  line-height: 1.75;
  outline: none;
  resize: vertical;
}

.sales-script-result-actions {
  justify-content: flex-end;
}

.sales-refine-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.sales-refine-bar > span {
  margin-right: 2px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.sales-refine-bar button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.sales-refine-bar button:hover,
.sales-refine-bar button:focus-visible {
  border-color: #0f766e;
  color: #0f766e;
}

.sales-refine-bar button:disabled {
  opacity: .55;
  cursor: wait;
}

.sales-video-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 8px;
  background: #f8fafc;
}

.sales-video-step {
  display: inline-block;
  margin-bottom: 6px;
  color: #c2410c;
  font-size: 11px;
  font-weight: 900;
}

.sales-video-chain {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(420px, 1.28fr);
  gap: 14px;
}

.sales-video-controls {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.sales-video-result {
  min-height: 320px;
  border-style: solid;
}

.sales-video-result video {
  max-height: 520px;
}

.sales-product-empty[hidden],
.sales-product-upload > img[hidden],
.sales-product-replace[hidden],
.sales-script-count[hidden],
.sales-script-result-empty[hidden],
.sales-script-result textarea[hidden],
.sales-script-result-actions[hidden],
.sales-agent-insight[hidden],
.sales-result-tabs[hidden],
.sales-refine-bar[hidden],
.sales-video-panel[hidden] {
  display: none;
}

@media (max-width: 920px) {
  .smart-tool-workbench,
  .video-prompt-workbench,
  .video-cleaner-workbench,
  .viral-video-workbench,
  .sales-script-workbench {
    grid-template-columns: 1fr;
  }

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

  .viral-evidence-grid,
  .viral-strategy-grid {
    grid-template-columns: 1fr;
  }

  .viral-replicate-bar {
    grid-template-columns: minmax(160px, 1fr) 90px 90px;
  }

  .viral-replicate-bar button {
    grid-column: 1 / -1;
  }

  .sales-video-chain {
    grid-template-columns: 1fr;
  }

  .sales-agent-insight {
    grid-template-columns: 1fr;
  }

  .sales-agent-insight > div,
  .sales-agent-insight > div:first-child {
    border-top: 1px solid #e2e8f0;
    border-left: 0;
  }

  .sales-agent-insight > div:first-child {
    border-top: 0;
  }

  .digital-human-agent-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .digital-human-agent-rail i {
    display: none;
  }

  .digital-human-readiness,
  .digital-human-quality,
  .digital-human-guardrails {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .tryon-agent-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tryon-agent-rail i {
    display: none;
  }
}

@media (max-width: 620px) {
  .smart-tool-workbench,
  .smart-tool-panel {
    padding: 12px;
  }

  .smart-tool-upload-grid,
  .smart-tool-fields {
    grid-template-columns: 1fr;
  }

  .smart-tool-field.full,
  .smart-tool-model-warning,
  .digital-human-guardrails {
    grid-column: auto;
  }

  .smart-tool-upload {
    min-height: 170px;
  }

  .tryon-upload {
    min-height: 205px;
  }

  .tryon-agent-rail,
  .tryon-preserve-options,
  .tryon-quality-checks {
    grid-template-columns: 1fr;
  }

  .tryon-agent-rail span {
    grid-template-columns: 27px 1fr;
  }

  .tryon-agent-rail span + span {
    border-top: 1px solid #fce7f3;
  }

  .digital-human-agent-rail,
  .digital-human-readiness,
  .digital-human-quality,
  .digital-human-guardrails {
    grid-template-columns: 1fr;
  }

  .digital-human-section-title > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .digital-human-brief > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .digital-human-brief strong {
    max-width: 100%;
  }

  .face-swap-flow,
  .face-swap-strategies,
  .face-swap-preserve-options {
    grid-template-columns: 1fr;
  }

  .face-swap-flow span + span {
    border-top: 1px solid #e2e8f0;
    border-left: 0;
  }

  .face-swap-strategy-field,
  .face-swap-preserve-field,
  .face-swap-model-hint {
    grid-column: auto;
  }

  .face-swap-readiness small {
    max-width: 130px;
  }

  .video-cleaner-panel {
    padding: 12px;
  }

  .video-prompt-panel {
    padding: 12px;
  }

  .video-prompt-agent-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 9px;
  }

  .video-prompt-agent-rail i { display: none; }
  .video-prompt-agent-rail span {
    display: grid;
    justify-items: center;
    gap: 4px;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal;
  }

  .video-prompt-mode-grid,
  .video-prompt-evidence-grid,
  .video-prompt-quality-grid,
  .video-prompt-prompt-grid {
    grid-template-columns: 1fr;
  }

  .video-prompt-mode-grid span { min-height: 58px; }

  .viral-video-source,
  .viral-video-output {
    padding: 12px;
  }

  .viral-video-head {
    align-items: stretch;
    flex-direction: column;
  }

  .viral-agent-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
  }

  .viral-agent-rail i {
    display: none;
  }

  .viral-agent-rail span {
    display: grid;
    justify-items: center;
    gap: 4px;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal;
  }

  .viral-score-group {
    justify-content: space-between;
  }

  .viral-video-upload {
    width: 100%;
  }

  .viral-video-preview {
    min-height: 220px;
  }

  .viral-result-tabs button {
    min-width: 0;
    padding: 0 5px;
  }

  .viral-metric-grid,
  .viral-replicate-bar,
  .viral-hook-bank,
  .viral-quality-gate,
  .viral-quality-gate ul {
    grid-template-columns: 1fr;
  }

  .viral-replicate-bar button {
    grid-column: auto;
  }

  .video-prompt-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .video-prompt-upload-button {
    width: 100%;
  }

  .video-prompt-preview {
    min-height: 220px;
  }

  .video-prompt-result,
  .video-prompt-result-empty,
  .video-prompt-view {
    min-height: 360px;
  }

  .video-prompt-tabs button { padding: 0 4px; font-size: 10px; }
  .video-prompt-view { padding: 12px; }
  .video-prompt-view > label > textarea { min-height: 230px; }
  .video-prompt-timeline article { grid-template-columns: 64px minmax(0, 1fr); gap: 9px; }
  .video-prompt-parameters { grid-template-columns: max-content minmax(0, 1fr); }
  .video-prompt-score-group { justify-content: space-between; }

  .video-cleaner-editor,
  .video-cleaner-result {
    min-height: 240px;
  }

  .video-cleaner-agent-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 8px;
  }

  .video-cleaner-agent-rail i { display: none; }

  .video-cleaner-agent-rail span {
    display: grid;
    justify-items: center;
    gap: 4px;
    min-width: 0;
    text-align: center;
  }

  .video-cleaner-source-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-cleaner-source-meta span:nth-child(3) { border-left: 0; border-top: 1px solid #e2e8f0; }
  .video-cleaner-source-meta span:nth-child(4) { border-top: 1px solid #e2e8f0; }

  .video-cleaner-settings { grid-template-columns: 1fr; }

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

  .video-cleaner-region-task-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .video-cleaner-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .video-cleaner-upload-button {
    width: 100%;
  }

  .video-cleaner-toolbar .danger {
    margin-left: 0;
  }

  .sales-script-panel {
    padding: 12px;
  }

  .sales-agent-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 8px;
  }

  .sales-agent-rail i {
    display: none;
  }

  .sales-agent-rail span {
    justify-content: center;
    font-size: 0;
  }

  .sales-agent-rail span b {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .sales-product-upload {
    min-height: 220px;
  }

  .sales-product-upload > img {
    height: 260px;
  }

  .sales-script-result,
  .sales-script-result-empty,
  .sales-script-result textarea {
    min-height: 420px;
  }

  .sales-script-result-actions {
    justify-content: stretch;
  }

  .sales-script-result-actions button {
    flex: 1 1 120px;
  }

  .sales-video-panel {
    padding: 12px;
  }

  .sales-video-chain {
    grid-template-columns: 1fr;
  }

  .sales-video-result {
    min-height: 280px;
  }
}
