/* Letzte Cleaning Prüfung: 23.09.2026 */
/* Letztes Cleaning: 27.08.2026 */

/*
 * Gemeinsame Oberflächenschicht der Contentfactory.
 *
 * Diese Datei wird bewusst zuletzt geladen. Sie vereinheitlicht nur Bausteine,
 * die in mehreren Kundenansichten vorkommen: Farben, Fokus, Eingabefelder,
 * Aktionsleisten, Karten, Listen, Dialoge und Statusanzeigen. Werkzeuglayouts
 * und fachliche Sonderfälle bleiben in ihren jeweiligen Stylesheets.
 */

:root {
  color-scheme: dark;
  --cf-bg: #08090d;
  --cf-bg-elevated: #0c0e14;
  --cf-surface: #11131a;
  --cf-surface-hover: #171a23;
  --cf-surface-active: #1b1e28;
  --cf-border: #262a35;
  --cf-border-strong: #363c4a;
  --cf-text: #f4f6fb;
  --cf-text-soft: #c7ccd7;
  --cf-muted: #9199aa;
  --cf-dim: #697286;
  --cf-accent: #ff304f;
  --cf-accent-hover: #ff4763;
  --cf-success: #52d69a;
  --cf-warning: #f2b84b;
  --cf-danger: #ff5b72;
  --cf-radius-small: 5px;
  --cf-radius-control: 7px;
  --cf-radius-surface: 10px;
  --cf-shadow-dialog: 0 28px 90px rgba(0, 0, 0, .68);
  --cf-focus-ring: 0 0 0 3px rgba(255, 48, 79, .2);
}

body {
  background: var(--cf-bg);
  color: var(--cf-text);
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(255, 48, 79, .34);
  color: #fff;
}

:where(.factory-shell, .factory-workspace, .generic-tool-modal) {
  scrollbar-color: #404757 transparent;
  scrollbar-width: thin;
}

:where(
  button,
  a,
  input,
  textarea,
  select,
  [role="button"],
  [tabindex]:not([tabindex="-1"])
):focus-visible {
  outline: 2px solid var(--cf-accent);
  outline-offset: 2px;
}

:where(button, a, input, textarea, select) {
  -webkit-tap-highlight-color: transparent;
}

:where(button, [role="button"]) {
  touch-action: manipulation;
}

/* Jede bedienbare Fläche kündigt sich auch am Mauszeiger an. Zahlreiche
 * Werkzeugansichten werden dynamisch eingefügt; diese zentrale Regel deckt
 * deshalb sowohl Standard- als auch Spezialtools ab. */
:where(
  button:not(:disabled),
  a[href],
  [role="button"]:not([aria-disabled="true"]),
  [tabindex]:not([tabindex="-1"]),
  label:has(input[type="file"]),
  label:has(input[type="checkbox"]),
  label:has(input[type="radio"])
) {
  cursor: pointer;
}

:where(button:disabled, [role="button"][aria-disabled="true"]) {
  cursor: not-allowed;
}

/* Grundrahmen und Navigation */

.factory-shell {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 76% -10%, rgba(255, 48, 79, .045), transparent 28rem),
    var(--cf-bg);
}

.factory-sidebar {
  border-right-color: var(--cf-border);
  background: rgba(9, 10, 15, .97);
}

.factory-topbar {
  border-bottom-color: var(--cf-border);
  background: rgba(8, 9, 13, .9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

:where(.factory-nav a, .factory-sidebar-tool, .factory-sidebar-control) {
  border-radius: var(--cf-radius-control);
  transition:
    color .16s ease,
    background-color .16s ease,
    border-color .16s ease;
}

:where(.factory-nav a, .factory-sidebar-tool, .factory-sidebar-control):hover {
  background: var(--cf-surface-hover);
}

:where(.factory-nav a, .factory-sidebar-tool, .factory-sidebar-control).active {
  background: linear-gradient(90deg, rgba(255, 48, 79, .14), rgba(255, 48, 79, .035));
  box-shadow: inset 2px 0 var(--cf-accent);
}

.factory-language-switch,
.factory-top-actions > button,
.factory-sidebar-toggle {
  border-color: var(--cf-border-strong);
  background: var(--cf-surface);
}

/* Der Schalter sitzt mit seinem Mittelpunkt auf der 76px hohen Kopfzeilen-
   kante. So bilden Trennlinie und Pfeil in beiden Sidebar-Zuständen eine Achse. */
.factory-sidebar-toggle,
body.factory-sidebar-collapsed .factory-sidebar-toggle {
  top: calc(76px - 13px);
}

.factory-language-switch button[aria-pressed="true"] {
  background: var(--cf-accent);
  color: #fff;
}

/* Startseite und Werkzeugauswahl */

.factory-hero {
  border-bottom-color: var(--cf-border);
}

.factory-overview {
  gap: 0;
  border-color: var(--cf-border);
  border-radius: var(--cf-radius-surface);
  background: var(--cf-border);
}

.factory-overview article {
  border-right: 1px solid var(--cf-border);
  background: var(--cf-bg-elevated);
}

.factory-overview article:last-child {
  border-right: 0;
}

.factory-tools {
  gap: 22px;
}

.factory-tool-button {
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.factory-tool-row {
  border-radius: var(--cf-radius-control);
}

.factory-tool-row:hover {
  background: var(--cf-surface-hover);
  transform: translateX(2px);
}

.factory-tool-row-icon,
.tool-icon,
.tool-page-icon {
  border-radius: var(--cf-radius-surface);
}

.factory-message {
  border-color: rgba(255, 91, 114, .4);
  border-radius: var(--cf-radius-control);
  background: rgba(255, 91, 114, .08);
}

.factory-loading {
  color: var(--cf-muted);
}

/* Gemeinsame Seitenstruktur der Werkzeuge */

body.factory-page-active .workspace-panel {
  background: var(--cf-bg);
}

body.factory-page-active .workspace-header {
  border-bottom-color: var(--cf-border);
  background: rgba(8, 9, 13, .92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
}

.workspace-header h2 {
  color: var(--cf-text);
  letter-spacing: -.02em;
}

.workspace-kicker,
.section-kicker,
.tool-page-hero > span,
.tool-history-head > span {
  color: var(--cf-accent);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.workspace-close,
.generic-tool-modal-head button,
.video-production-close,
.thumbnail-production-close,
.transcription-production-close,
.dubbing-production-close,
.shorts-production-close {
  border: 1px solid var(--cf-border-strong);
  border-radius: var(--cf-radius-control);
  background: var(--cf-surface);
  color: var(--cf-text-soft);
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

.workspace-close:hover,
.generic-tool-modal-head button:hover,
.video-production-close:hover,
.thumbnail-production-close:hover,
.transcription-production-close:hover,
.dubbing-production-close:hover,
.shorts-production-close:hover {
  border-color: var(--cf-accent);
  background: rgba(255, 48, 79, .1);
  color: #fff;
}

.tool-page-hero {
  border-color: var(--cf-border);
  border-radius: var(--cf-radius-surface);
  background: linear-gradient(105deg, rgba(255, 48, 79, .065), transparent 48%), var(--cf-bg-elevated);
  box-shadow: none;
}

.tool-page-stats article,
.workspace-intro-card,
.workspace-profile-note {
  border-color: var(--cf-border);
  border-radius: var(--cf-radius-surface);
  background: var(--cf-surface);
  box-shadow: none;
}

.tool-page-stats article {
  transition: border-color .16s ease, background-color .16s ease;
}

.tool-page-stats article:hover {
  border-color: var(--cf-border-strong);
  background: var(--cf-surface-hover);
}

.tool-history-head {
  border-bottom-color: var(--cf-border);
}

.tool-history-row {
  border-color: var(--cf-border);
  border-radius: var(--cf-radius-control);
  background: var(--cf-bg-elevated);
  box-shadow: none;
  transition:
    border-color .16s ease,
    background-color .16s ease,
    transform .16s ease;
}

.tool-history-row:hover,
.tool-history-row:focus-visible {
  border-color: var(--cf-border-strong);
  background: var(--cf-surface-hover);
  transform: translateY(-1px);
}

.tool-history-pagination button {
  border-color: var(--cf-border-strong);
  border-radius: var(--cf-radius-small);
  background: var(--cf-surface);
}

/* Eingaben und Auswahlfelder */

.workspace-field input:not([type="checkbox"]):not([type="radio"]),
.workspace-field textarea,
.workspace-field select,
.cc-input,
.cc-textarea,
.cc-select,
.result-next-step select,
.generic-tool-modal-content input:not([type="checkbox"]):not([type="radio"]),
.generic-tool-modal-content textarea,
.generic-tool-modal-content select {
  box-sizing: border-box;
  border: 1px solid var(--cf-border-strong);
  border-radius: var(--cf-radius-control);
  background: #0d1016;
  color: var(--cf-text);
  box-shadow: none;
  transition:
    border-color .16s ease,
    background-color .16s ease,
    box-shadow .16s ease;
}

.workspace-field input:not([type="checkbox"]):not([type="radio"]):hover:not(:disabled),
.workspace-field textarea:hover:not(:disabled),
.workspace-field select:hover:not(:disabled),
.cc-input:hover:not(:disabled),
.cc-textarea:hover:not(:disabled),
.cc-select:hover:not(:disabled),
.result-next-step select:hover:not(:disabled),
.generic-tool-modal-content input:not([type="checkbox"]):not([type="radio"]):hover:not(:disabled),
.generic-tool-modal-content textarea:hover:not(:disabled),
.generic-tool-modal-content select:hover:not(:disabled) {
  border-color: #4a5263;
  background: #10131a;
}

.workspace-field input:not([type="checkbox"]):not([type="radio"]):focus,
.workspace-field textarea:focus,
.workspace-field select:focus,
.cc-input:focus,
.cc-textarea:focus,
.cc-select:focus,
.result-next-step select:focus,
.generic-tool-modal-content input:not([type="checkbox"]):not([type="radio"]):focus,
.generic-tool-modal-content textarea:focus,
.generic-tool-modal-content select:focus {
  border-color: var(--cf-accent);
  background: #11141b;
  outline: 0;
  box-shadow: var(--cf-focus-ring);
}

:where(input, textarea)::placeholder {
  color: #626b7d;
  opacity: 1;
}

:where(input, textarea, select):disabled {
  cursor: not-allowed;
  opacity: .58;
}

.workspace-field label:not(.workspace-check) {
  color: var(--cf-text-soft);
}

.workspace-field small,
.workspace-intro,
.cc-muted {
  color: var(--cf-muted);
}

.workspace-group-grid,
.workspace-group[data-open] .workspace-group-grid {
  border-color: var(--cf-border);
  border-radius: var(--cf-radius-surface);
  background: var(--cf-bg-elevated);
}

.workspace-choice-grid span {
  border-color: var(--cf-border-strong);
  border-radius: var(--cf-radius-control);
  background: var(--cf-surface);
}

.workspace-choice-grid label:hover span {
  border-color: #596174;
  background: var(--cf-surface-hover);
  transform: none;
}

.workspace-choice-grid input:checked + span {
  border-color: var(--cf-accent);
  background: rgba(255, 48, 79, .12);
}

/* Schaltflächen und Aktionsleisten */

.cc-button,
.wizard-secondary,
.wizard-primary,
.workspace-run,
.finished-copy,
.result-download,
.processing-cancel {
  border-radius: var(--cf-radius-control);
  transition:
    color .16s ease,
    border-color .16s ease,
    background-color .16s ease,
    box-shadow .16s ease,
    transform .16s ease;
}

.cc-button:not(.primary),
.wizard-secondary,
.finished-copy:not(.primary),
.processing-cancel:not(.primary) {
  border-color: var(--cf-border-strong);
  background: var(--cf-surface);
  color: var(--cf-text-soft);
}

.cc-button:not(.primary):hover:not(:disabled),
.wizard-secondary:hover:not(:disabled),
.finished-copy:not(.primary):hover:not(:disabled),
.processing-cancel:not(.primary):hover:not(:disabled) {
  border-color: #596174;
  background: var(--cf-surface-hover);
  color: #fff;
}

.cc-button.primary,
.wizard-primary,
.workspace-run,
.result-download.primary {
  border-color: var(--cf-accent);
  background: var(--cf-accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 48, 79, .17);
}

.cc-button.primary:hover:not(:disabled),
.wizard-primary:hover:not(:disabled),
.workspace-run:hover:not(:disabled),
.result-download.primary:hover:not(:disabled) {
  border-color: var(--cf-accent-hover);
  background: var(--cf-accent-hover);
  box-shadow: 0 10px 28px rgba(255, 48, 79, .24);
  transform: translateY(-1px);
}

.cc-button:active:not(:disabled),
.wizard-secondary:active:not(:disabled),
.wizard-primary:active:not(:disabled),
.workspace-run:active:not(:disabled),
.finished-copy:active:not(:disabled),
.result-download:active:not(:disabled) {
  transform: translateY(0);
}

.workspace-actions {
  border-top-color: var(--cf-border);
  background: rgba(11, 13, 19, .94);
  box-shadow: 0 -12px 28px rgba(0, 0, 0, .16);
}

/* Karten, Kennzahlen, Tabellen und Status */

.cc-card,
.cc-metric,
.cc-row {
  border-color: var(--cf-border);
  border-radius: var(--cf-radius-surface);
  background: var(--cf-surface);
  box-shadow: none;
}

.cc-row {
  transition: border-color .16s ease, background-color .16s ease;
}

.cc-row:hover {
  border-color: var(--cf-border-strong);
  background: var(--cf-surface-hover);
}

.cc-metric small,
.cc-row small {
  color: var(--cf-muted);
}

.cc-shell table,
.workspace-result table,
.result-finished table {
  width: 100%;
  border-collapse: collapse;
  border-color: var(--cf-border);
  background: var(--cf-bg-elevated);
}

.cc-shell th,
.workspace-result th,
.result-finished th {
  border-color: var(--cf-border);
  background: var(--cf-surface);
  color: var(--cf-muted);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cc-shell td,
.workspace-result td,
.result-finished td {
  border-color: var(--cf-border);
  color: var(--cf-text-soft);
}

.cc-empty,
.cc-loading,
.workspace-empty,
.factory-empty,
.tool-history-empty {
  border: 1px dashed var(--cf-border-strong);
  border-radius: var(--cf-radius-surface);
  background: rgba(17, 19, 26, .52);
  color: var(--cf-muted);
}

.processing-steps li,
.finished-preview,
.finished-summary,
.result-next-step,
.script-document,
.result-actionbar {
  border-color: var(--cf-border);
  border-radius: var(--cf-radius-surface);
  background: var(--cf-surface);
  box-shadow: none;
}

.processing-progress,
.cc-progress {
  background: #252a35;
}

.processing-progress span,
.cc-progress span {
  background: linear-gradient(90deg, #dd1739, var(--cf-accent));
}

.result-success-line {
  border-color: rgba(82, 214, 154, .26);
  background: rgba(82, 214, 154, .055);
}

/*
 * Einzelne Arbeitsbereiche verwenden historisch eigene Klassennamen. Die
 * folgenden Gruppen gleichen nur deren Oberflächen und Bedienzustände an;
 * Raster, Inhalte und fachliche Farbcodes bleiben unangetastet.
 */

.generate-prompt,
.generate-draft,
.generate-refine,
.generate-keywords-box,
.generate-tags,
.generate-thumbnails,
.generate-empty,
.generate-outline,
.asset-library-hero,
.asset-library-total,
.asset-library-card,
.asset-library-no-results,
.analytics-actions,
.analytics-top-content,
.analytics-breakdown,
.analytics-privacy-note,
.shorts-actions,
.shorts-result-grid article,
.factory-upgrade-ad,
.factory-upgrade-pricing,
.factory-upgrade-credit-box,
.factory-upgrade-plan,
.factory-upgrade-topup,
.factory-account-menu,
.credit-purchase-balance,
.credit-purchase-pack {
  border-color: var(--cf-border);
  border-radius: var(--cf-radius-surface);
  box-shadow: none;
}

.generate-draft,
.asset-library-card,
.analytics-actions article,
.factory-upgrade-plan,
.factory-upgrade-topup,
.credit-purchase-pack {
  transition:
    border-color .16s ease,
    background-color .16s ease,
    transform .16s ease;
}

.generate-draft:hover,
.asset-library-card:hover,
.analytics-actions article:hover,
.factory-upgrade-plan:hover,
.factory-upgrade-topup:hover,
.credit-purchase-pack:hover {
  border-color: var(--cf-border-strong);
  transform: translateY(-1px);
}

.generate-refine input,
.generate-field input,
.generate-field textarea,
.asset-library-search input,
.factory-credit-promo-form input {
  box-sizing: border-box;
  border: 1px solid var(--cf-border-strong);
  border-radius: var(--cf-radius-control);
  background: #0d1016;
  color: var(--cf-text);
  box-shadow: none;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.generate-refine input:focus,
.generate-field input:focus,
.generate-field textarea:focus,
.asset-library-search input:focus,
.factory-credit-promo-form input:focus {
  border-color: var(--cf-accent);
  background: #11141b;
  outline: 0;
  box-shadow: var(--cf-focus-ring);
}

.asset-library-filters button,
.generate-refine-button,
.generate-thumbnail > button,
.factory-upgrade-submit,
.factory-upgrade-topup button,
.credit-purchase-pack button,
.factory-credit-payment,
.factory-credit-submit,
.factory-credit-promo-form button {
  border-radius: var(--cf-radius-control);
}

.factory-account-menu {
  background: rgba(17, 19, 26, .98);
  box-shadow: 0 22px 64px rgba(0, 0, 0, .56);
}

.factory-account-menu button,
.factory-account-menu a {
  border-radius: var(--cf-radius-control);
}

/* Alle Produktionsdialoge teilen denselben ruhigen Rahmen. */

.generic-tool-modal,
.video-production-modal,
.thumbnail-production-modal,
.transcription-production-modal,
.dubbing-production-modal,
.shorts-production-modal {
  background: rgba(2, 3, 7, .86);
  backdrop-filter: blur(16px) saturate(.72);
}

.generic-tool-modal-dialog,
.video-production-dialog,
.thumbnail-production-dialog,
.transcription-production-dialog,
.dubbing-production-dialog,
.shorts-production-dialog {
  border: 1px solid var(--cf-border-strong);
  border-radius: 12px;
  background: var(--cf-bg-elevated);
  box-shadow: var(--cf-shadow-dialog);
}

.generic-tool-modal-head,
.video-production-dialog > header,
.thumbnail-production-dialog > header,
.transcription-production-dialog > header,
.dubbing-production-dialog > header,
.shorts-production-dialog > header {
  border-bottom-color: var(--cf-border);
  background: rgba(17, 19, 26, .92);
}

.generic-tool-modal-content,
.video-production-body,
.thumbnail-production-body,
.transcription-production-body,
.dubbing-production-body,
.shorts-production-body {
  background: var(--cf-bg-elevated);
}

/* Thumbnail-Erstellung im Stil des Creator Coach.
 *
 * Der allgemeine Produktionsdialog ist fuer mehrstufige Werkzeuge gedacht.
 * Beim Thumbnail-Maker besteht der Einstieg jedoch nur aus einer zentralen
 * Frage mit Optionen. Die aeussere Huelle bleibt transparent; Chat und
 * Einstellungen tragen ihre eigenen klar abgegrenzten Flaechen. */
.thumbnail-production-modal {
  place-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 16px;
}

.thumbnail-production-dialog {
  width: min(900px, calc(100vw - 32px));
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding: 22px 24px 20px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  box-shadow: none;
}

.thumbnail-production-dialog > header {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
}

.thumbnail-production-dialog > header small {
  display: none;
}

.thumbnail-production-dialog > header h2 {
  margin: 0;
  color: #f6f8fc;
  font: 700 30px/1.18 'Space Grotesk', system-ui, sans-serif;
  letter-spacing: -.03em;
}

.thumbnail-production-body {
  overflow: visible;
  padding: 8px 0 0;
  background: transparent;
}

.thumbnail-production-body > .workspace-intro-card {
  display: block;
  max-width: 620px;
  margin: 0 auto 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.thumbnail-production-body > .workspace-intro-card > .tool-icon,
.thumbnail-production-body > .workspace-intro-card strong {
  display: none;
}

.thumbnail-production-body > .workspace-intro-card .workspace-intro {
  max-width: 520px;
  margin: 0 auto;
  color: #8a93a7;
  font: 400 13px/1.55 'DM Sans', system-ui, sans-serif;
  text-align: center;
}

.thumbnail-production-body > .workspace-form,
.thumbnail-production-body > #workspace-result {
  width: 100%;
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
}

@media (max-width: 900px) {
  .factory-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .factory-overview article:nth-child(2) {
    border-right: 0;
  }

  .factory-overview article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--cf-border);
  }

  .tool-page-stats,
  .cc-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .factory-topbar {
    padding-inline: 16px;
  }

  .factory-content {
    padding-inline: 18px;
  }

  .factory-overview,
  .tool-page-stats,
  .cc-metrics,
  .cc-form-grid {
    grid-template-columns: 1fr;
  }

  .factory-overview article {
    border-right: 0;
    border-bottom: 1px solid var(--cf-border);
  }

  .factory-overview article:last-child {
    border-bottom: 0;
  }

  .workspace-group-grid {
    padding: 16px;
  }

  .workspace-actions {
    box-shadow: 0 -8px 22px rgba(0, 0, 0, .2);
  }

  .generic-tool-modal-dialog,
  .video-production-dialog,
  .thumbnail-production-dialog,
  .transcription-production-dialog,
  .dubbing-production-dialog,
  .shorts-production-dialog {
    border-radius: var(--cf-radius-surface);
  }

  .thumbnail-production-modal {
    padding: 32px 12px 24px;
  }

  .thumbnail-production-dialog {
    width: 100%;
    min-height: 0;
    padding: 24px 18px 26px;
    border-radius: 16px;
  }

  .thumbnail-production-dialog > header {
    padding: 0 44px;
  }

  .thumbnail-production-dialog > header h2 {
    font-size: 24px;
  }

  .thumbnail-production-body > .workspace-intro-card {
    margin-bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Creator-Studio-Kampagne
 *
 * Das Bild ist die visuelle Bühne; die kleinen Statusflächen erklären nur,
 * was confacAI daraus macht. Die CTA startet den vorhandenen Video-Workflow,
 * deshalb bleibt der Hero trotz Kampagnencharakter ein Arbeitsbereich.
 */

.factory-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(350px, .76fr) minmax(580px, 1.24fr);
  align-items: center;
  gap: clamp(38px, 5vw, 86px);
  min-height: clamp(500px, 43vw, 650px);
  padding: clamp(42px, 5vw, 74px) 0 clamp(54px, 6vw, 86px);
  overflow: visible;
  background:
    radial-gradient(circle at 84% 42%, rgba(255, 37, 75, .14), transparent 30%),
    radial-gradient(circle at 61% 24%, rgba(84, 66, 255, .08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, .012), transparent 74%);
  border-bottom: 1px solid var(--cf-border);
}

.factory-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 12%;
  right: 3%;
  width: min(51vw, 760px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 67, 97, .08);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 48, 79, .018), 0 0 0 140px rgba(255, 48, 79, .012);
  pointer-events: none;
}

.factory-hero .hero-copy {
  position: relative;
  z-index: 3;
  max-width: 650px;
}

.factory-hero .hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #ff4563;
  font: 800 11px/1 'Space Grotesk', sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.factory-hero .hero-copy .eyebrow i {
  font-size: 17px;
}

.factory-hero .hero-copy h1 {
  max-width: 720px;
  margin: 18px 0 20px;
  color: #f8f8fb;
  font: 700 clamp(46px, 4.6vw, 76px)/.96 'Space Grotesk', sans-serif;
  letter-spacing: -.06em;
  text-wrap: balance;
}

.factory-hero .hero-copy h1 em {
  display: inline-block;
  margin-top: 7px;
  background: linear-gradient(100deg, #ff3658 5%, #ff6680 48%, #fff 120%);
  background-clip: text;
  color: transparent;
  font-style: normal;
  -webkit-background-clip: text;
  -webkit-text-stroke: 0;
}

.factory-hero .hero-copy p {
  max-width: 580px;
  margin: 0;
  color: #a8adba;
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  margin-top: 30px;
}

.hero-primary-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 48px;
  padding: 0 19px;
  border-radius: 10px;
  font: 700 13px/1 'DM Sans', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.hero-primary-action {
  overflow: hidden;
  border: 1px solid #ff4766;
  background: linear-gradient(135deg, #ff3154, #e50d39);
  color: #fff;
  box-shadow: 0 15px 34px rgba(232, 17, 59, .24);
}

.hero-primary-action::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -45%;
  width: 32%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .3), transparent);
  transform: skewX(-18deg);
  transition: left .55s ease;
}

.hero-primary-action:hover::before {
  left: 120%;
}

.hero-primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(232, 17, 59, .34);
}

.hero-primary-action > * {
  position: relative;
  z-index: 1;
}

.hero-primary-action i {
  font-size: 16px;
}

.hero-primary-action:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.hero-proof {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #858b99;
}

.hero-proof i {
  color: #ff4563;
  font-size: 14px;
}

.hero-proof strong {
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
}

.hero-showcase {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  min-width: 0;
  margin: 0 -3% 0 auto;
}

.hero-showcase::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -9% -4% -12% 8%;
  border-radius: 50%;
  background: conic-gradient(from 215deg, transparent 0 32%, rgba(255, 35, 71, .17) 41%, transparent 52% 78%, rgba(91, 70, 255, .12) 86%, transparent);
  filter: blur(32px);
  animation: hero-aura 14s linear infinite;
  pointer-events: none;
}

.hero-visual {
  position: relative;
  width: 84%;
  aspect-ratio: 3 / 2;
  margin: 0 5% 0 auto;
  overflow: visible;
  filter: drop-shadow(0 34px 52px rgba(0, 0, 0, .52));
}

.hero-visual picture,
.hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-visual img {
  object-fit: cover;
  object-position: 52% 50%;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 8%, #000 91%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 8%, #000 91%, transparent 100%);
  mask-composite: intersect;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .8s ease;
}

.hero-showcase:hover .hero-visual img {
  transform: translateY(-3px);
  filter: saturate(1.1) contrast(1.04) brightness(1.035);
}

@keyframes hero-aura {
  to { transform: rotate(360deg); }
}

@media (max-width: 1280px) {
  .factory-hero {
    grid-template-columns: minmax(320px, .82fr) minmax(470px, 1.18fr);
    gap: 34px;
  }

  .hero-showcase {
    width: 96%;
    margin-right: 0;
  }

  .hero-proof {
    gap: 10px 17px;
  }
}

@media (max-width: 960px) {
  .factory-hero {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: 0;
  }

  .factory-hero .hero-copy {
    max-width: 720px;
  }

  .hero-showcase {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    transform: none;
  }

  .hero-visual {
    width: 100%;
    margin: 0;
  }
}

@media (max-width: 700px) {
  .factory-hero {
    padding: 34px 0 50px;
    overflow: clip;
  }

  .factory-hero .hero-copy h1 {
    font-size: clamp(39px, 12vw, 56px);
  }

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

  .hero-primary-action {
    flex: 1 1 190px;
  }

  /* Die drei Vorteile bleiben auch auf dem Telefon in einer Zeile und
     brechen nur bei Platzmangel um. Untereinander sahen sie wie eine
     Aufzaehlung aus, nicht wie drei kurze Belege (Handy-Befund 07.09.2026). */
  .hero-proof {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 18px;
  }

  .hero-showcase {
    width: 100%;
    max-width: 100%;
    padding-top: 6px;
  }

  .hero-visual {
    aspect-ratio: 4 / 3;
  }

  .hero-visual img {
    object-position: 62% 50%;
    -webkit-mask-image:
      linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, #000 5%, #000 94%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, #000 5%, #000 94%, transparent 100%);
    mask-composite: intersect;
  }

}

@media (max-width: 600px) {
  .factory-hero .hero-copy {
    min-width: 0;
  }

  .factory-hero .hero-copy p {
    overflow-wrap: anywhere;
  }

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

  .hero-primary-action {
    width: 100%;
  }
}

/* Video generation uses the same focused composer language as the thumbnail
   maker: the overlay provides context, while the prompt itself is the only
   visible surface. Settings open below the composer so they never cover it. */
body.factory-page-active #workspace-body[data-tool="video-generator"] .video-production-modal {
  place-items: center;
  padding: 20px 16px;
  overflow: auto;
}

body.factory-page-active #workspace-body[data-tool="video-generator"] .video-production-dialog {
  width: min(900px, calc(100vw - 32px));
  max-height: none;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.factory-page-active #workspace-body[data-tool="video-generator"] .video-production-dialog > header {
  display: none;
}

body.factory-page-active #workspace-body[data-tool="video-generator"] .video-production-body {
  overflow: visible;
  padding: 0;
  background: transparent;
}

body.factory-page-active #workspace-body[data-tool="video-generator"] .video-production-inner,
body.factory-page-active #workspace-body[data-tool="video-generator"] .cc-video-generator-shell.is-video-production {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 900px !important;
  margin: 0 auto !important;
}

body.factory-page-active #workspace-body[data-tool="video-generator"] .cc-video-generator-shell.is-video-production .video-generator-intro {
  margin: 0 0 14px;
  padding: 0 16px;
}

body.factory-page-active #workspace-body[data-tool="video-generator"] .cc-video-generator-shell.is-video-production .video-generator-intro h3 {
  font-size: 25px;
}

body.factory-page-active #workspace-body[data-tool="video-generator"] .video-generator-form.is-chat-composer,
body.factory-page-active #workspace-body[data-tool="video-generator"] .video-generator-form.is-chat-composer.is-config-open {
  position: relative;
  display: block;
  min-height: 320px !important;
  padding: 0 !important;
  border: 1px solid #3b4558;
  border-radius: 18px !important;
  background: rgba(12, 15, 23, .94);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .3);
}

body.factory-page-active #workspace-body[data-tool="video-generator"] .is-chat-composer .video-generator-prompt textarea,
body.factory-page-active #workspace-body[data-tool="video-generator"] .is-chat-composer:has(.video-chat-frame-dock:not([hidden])) .video-generator-prompt textarea {
  box-sizing: border-box;
  width: 100%;
  height: 318px !important;
  min-height: 318px !important;
  max-height: 318px;
  padding: 22px 62px 78px 22px !important;
  border: 0 !important;
  border-radius: 18px;
  resize: none;
}

body.factory-page-active #workspace-body[data-tool="video-generator"] .is-chat-composer .video-chat-actions {
  position: absolute;
  z-index: 6;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0;
}

body.factory-page-active #workspace-body[data-tool="video-generator"] .is-chat-composer .video-chat-frame-dock {
  min-width: 0;
  padding: 0;
}

body.factory-page-active #workspace-body[data-tool="video-generator"] .is-chat-composer .video-chat-frame-tile {
  width: 104px;
  height: 38px;
}

body.factory-page-active #workspace-body[data-tool="video-generator"] .is-chat-composer .video-config-trigger {
  justify-self: start;
  max-width: 100%;
}

body.factory-page-active #workspace-body[data-tool="video-generator"] .is-chat-composer .video-config-popover {
  right: 12px;
  top: calc(100% + 10px);
  bottom: auto;
  left: 12px;
  width: auto;
  max-height: min(580px, calc(100vh - 230px));
  transform-origin: top center;
}

body.factory-page-active #workspace-body[data-tool="video-generator"] .video-generator-result:empty {
  display: none;
}

@media (max-width: 700px) {
  body.factory-page-active #workspace-body[data-tool="video-generator"] .video-production-dialog {
    width: min(100%, calc(100vw - 16px));
  }

  body.factory-page-active #workspace-body[data-tool="video-generator"] .video-generator-form.is-chat-composer,
  body.factory-page-active #workspace-body[data-tool="video-generator"] .video-generator-form.is-chat-composer.is-config-open {
    min-height: 280px !important;
  }

  body.factory-page-active #workspace-body[data-tool="video-generator"] .is-chat-composer .video-config-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    max-height: min(520px, calc(100dvh - 120px));
  }

  /* Auf dem Telefon brechen die Parameter-Chips auf mehrere Zeilen um. Die
     unten UEBER das Textfeld gepinnte Bedienleiste wuchs dadurch nach oben
     und verdeckte den ganzen Prompt - die Chatbox war praktisch unsichtbar
     (02.09.2026). Deshalb liegt die Leiste hier im normalen Fluss UNTER dem
     Textfeld, und das Textfeld braucht keinen Platzhalter-Innenabstand mehr. */
  body.factory-page-active #workspace-body[data-tool="video-generator"] .is-chat-composer .video-generator-prompt textarea,
  body.factory-page-active #workspace-body[data-tool="video-generator"] .is-chat-composer:has(.video-chat-frame-dock:not([hidden])) .video-generator-prompt textarea {
    height: 160px !important;
    min-height: 160px !important;
    max-height: 260px;
    padding: 18px 56px 14px 16px !important;
  }

  body.factory-page-active #workspace-body[data-tool="video-generator"] .is-chat-composer .video-chat-actions {
    position: static;
    grid-template-columns: minmax(0, 1fr) auto;
    padding-top: 6px;
  }

  body.factory-page-active #workspace-body[data-tool="video-generator"] .is-chat-composer .video-chat-actions > [data-video-rebuild-start] {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  body.factory-page-active #workspace-body[data-tool="video-generator"] .is-chat-composer .video-chat-frame-dock {
    display: none;
  }
}

/* Kindflächen folgen der Dialogrundung, auch bei overflow:visible nach Aufklappen.
   Kein Clipping des Dialogs: Dropdowns und wachsende Formulare bleiben nutzbar. */
:is(.generic-tool-modal-dialog,.video-production-dialog,.thumbnail-production-dialog,.transcription-production-dialog,.dubbing-production-dialog,.shorts-production-dialog)>:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}
:is(.generic-tool-modal-dialog,.video-production-dialog,.thumbnail-production-dialog,.transcription-production-dialog,.dubbing-production-dialog,.shorts-production-dialog)>:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}
.generic-tool-modal-content>.speech-detail{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}

/* Tablet und Telefon: Der Thumbnail- und Social-Post-Dialog braucht einen
   sichtbaren Rand der Überlagerung. Dort kann man die Produktion wie bei den
   anderen Werkzeugen durch einen Klick in den Hintergrund verlassen. */
@media (max-width:1024px){
  .thumbnail-production-modal{display:block;overflow-x:hidden;overflow-y:auto;padding:12px 16px}
  .thumbnail-production-dialog{width:min(900px,100%);min-height:0;max-height:none;margin:0 auto}
  .social-poster-production-modal.thumbnail-production-modal{padding:12px 16px}
  .social-poster-production-modal .thumbnail-production-dialog{width:min(900px,100%);min-height:0;max-height:none;margin:0 auto}
  body.factory-page-active #workspace-body[data-tool="video-generator"] .video-production-modal{display:block;padding:12px 16px;overflow-x:hidden;overflow-y:auto}
  body.factory-page-active #workspace-body[data-tool="video-generator"] .video-production-dialog{width:min(900px,100%);min-height:0;max-height:none;margin:0 auto}
}
