:root {
  color-scheme: dark;
  --stage: #0a0a0c;
  --stage-soft: #0e0e11;
  --surface: #141418;
  --surface-raised: #19191e;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f2eee8;
  --muted: #9b989d;
  --quiet: #9b989d;
  --accent: #d7a56d;
  --accent-strong: #edbc84;
  --accent-ink: #20160d;
  --wine: #6e2c3a;
  --paper: #f2eee8;
  --danger: #ef8f88;
  --rail-width: 70px;
  --display: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="contrast"] {
  color-scheme: light;
  --stage: #f7f7f5;
  --stage-soft: #ffffff;
  --surface: #ffffff;
  --surface-raised: #f2f2f0;
  --line: rgba(15, 15, 18, 0.12);
  --line-strong: rgba(15, 15, 18, 0.22);
  --text: #171719;
  --muted: #67676d;
  --quiet: #5f5f65;
  --accent: #e20015;
  --accent-strong: #f0182c;
  --accent-ink: #ffffff;
  --wine: #8f2636;
  --paper: #ffffff;
  --danger: #b00010;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: var(--stage);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--stage);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  transition: background-color 500ms var(--ease), color 500ms var(--ease);
}

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

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

button {
  color: inherit;
}

svg {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 86px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

.tool-rail {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: var(--rail-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--stage) 88%, transparent);
  backdrop-filter: blur(18px);
}

.monogram {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--text);
}

.monogram svg {
  width: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-nav {
  display: grid;
  gap: 9px;
  margin-top: 70px;
}

.rail-button {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--quiet);
  cursor: pointer;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.rail-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-button:hover,
.rail-button.is-active {
  background: var(--surface-raised);
  color: var(--text);
}

.rail-button:hover {
  transform: translateY(-1px);
}

.rail-button::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 54px;
  top: 50%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  opacity: 0;
  transform: translate(4px, -50%);
  pointer-events: none;
  transition: 160ms ease;
}

.rail-button:hover::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.rail-help {
  margin-top: auto;
}

.studio-header {
  position: absolute;
  z-index: 10;
  top: 0;
  right: 0;
  left: var(--rail-width);
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 64px);
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 11px;
  letter-spacing: 0.21em;
}

.wordmark small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.3em;
}

.brand-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 13px 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  font-size: 12px;
  letter-spacing: 0.015em;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.brand-trigger:hover {
  border-color: var(--line-strong);
  background: var(--surface-raised);
}

.brand-trigger svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.brand-swatch {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--stage) 72%, transparent);
}

main {
  margin-left: var(--rail-width);
}

.creator-stage {
  position: relative;
  min-height: min(920px, 100svh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 132px 6vw 84px;
  background:
    linear-gradient(to bottom, transparent 76%, var(--stage)),
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 4%, transparent), transparent 39%);
}

.stage-light {
  position: absolute;
  top: 28%;
  left: 50%;
  width: min(980px, 92vw);
  height: 430px;
  border: 1px solid color-mix(in srgb, var(--accent) 9%, transparent);
  border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--accent) 5%, transparent), transparent 66%);
  filter: blur(1px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.stage-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: stage-in 900ms var(--ease) both;
}

.stage-kicker,
.section-kicker,
.dialog-kicker {
  margin: 0 0 17px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(46px, 6.3vw, 86px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.stage-intro {
  max-width: 580px;
  margin: 24px auto 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.5;
}

.conversation-shell {
  position: relative;
  z-index: 2;
  width: min(800px, 100%);
  margin-top: 46px;
  animation: stage-in 900ms 120ms var(--ease) both;
}

.partner-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 80%, transparent);
}

.conversation {
  max-height: 260px;
  margin-bottom: 10px;
  overflow-y: auto;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  scrollbar-width: thin;
}

.message {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 11px;
  padding: 10px 0;
}

.message + .message {
  border-top: 1px solid var(--line);
}

.message-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--display);
  font-size: 12px;
}

.message[data-role="user"] .message-mark {
  color: var(--muted);
}

.message p {
  margin: 1px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.58;
  white-space: pre-wrap;
}

.message.is-thinking p {
  color: var(--accent);
  animation: thinking-pulse 1.2s ease-in-out infinite;
}

.prompt-form {
  position: relative;
  padding: 19px 18px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.34),
    0 0 0 1px color-mix(in srgb, var(--accent) 4%, transparent),
    0 0 80px color-mix(in srgb, var(--accent) 5%, transparent);
  backdrop-filter: blur(24px);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.prompt-form:focus-within {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line-strong));
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.4),
    0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent),
    0 0 100px color-mix(in srgb, var(--accent) 7%, transparent);
}

.prompt-form textarea {
  width: 100%;
  min-height: 66px;
  max-height: 180px;
  resize: none;
  padding: 0 2px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.42;
}

.prompt-form textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
  opacity: 1;
}

.prompt-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}

.quiet-action,
.send-button {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.quiet-action {
  background: transparent;
  color: var(--muted);
}

.quiet-action:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.quiet-action svg,
.send-button svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prompt-spacer {
  flex: 1;
}

.input-hint {
  color: var(--quiet);
  font-size: 10px;
}

.send-button {
  margin-left: 3px;
  background: var(--accent);
  color: var(--accent-ink);
  transition: background 160ms ease, transform 160ms ease;
}

.send-button:hover {
  background: var(--accent-strong);
  transform: translateX(2px);
}

.send-button[disabled] {
  cursor: wait;
  opacity: 0.62;
}

.form-error {
  margin: 13px 0 0;
  color: var(--danger);
  font-size: 12px;
  text-align: center;
}

.scroll-cue {
  position: absolute;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--quiet);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.scroll-cue:hover {
  color: var(--text);
}

.scroll-cue svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  animation: cue 2.4s ease-in-out infinite;
}

.proof-section {
  position: relative;
  padding: 100px clamp(24px, 6vw, 92px) 126px;
  background: var(--stage);
}

.proof-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: clamp(24px, 6vw, 92px);
  left: clamp(24px, 6vw, 92px);
  height: 1px;
  background: var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  max-width: 1340px;
  margin: 0 auto 42px;
}

.section-heading h2 {
  max-width: 720px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 4.2vw, 57px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-note {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
}

.film-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 34px);
  max-width: 1340px;
  margin: 0 auto;
}

.film-card {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.film-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.film-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.002);
  transition: transform 800ms var(--ease), filter 400ms ease;
}

.film-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.24), transparent 45%);
  pointer-events: none;
}

.film-card:hover .film-frame video {
  transform: scale(1.025);
}

.play-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  background: rgba(10, 10, 12, 0.36);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -45%) scale(0.92);
  backdrop-filter: blur(10px);
  transition: 260ms var(--ease);
}

.film-card:hover .play-orbit,
.film-card:focus-visible .play-orbit {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.play-orbit svg {
  width: 24px;
  fill: currentColor;
}

.media-state {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.62);
  color: rgba(255, 255, 255, 0.84);
  font-size: 9px;
  letter-spacing: 0.06em;
  backdrop-filter: blur(10px);
}

.media-state.is-error {
  background: rgba(126, 24, 24, 0.82);
}

.film-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 2px 0;
}

.film-meta > span:first-child {
  display: grid;
  gap: 7px;
}

.film-meta small {
  color: var(--accent);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.film-meta strong {
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 400;
  letter-spacing: -0.015em;
}

.open-mark {
  color: var(--muted);
  font-size: 18px;
  transition: transform 180ms ease, color 180ms ease;
}

.film-card:hover .open-mark {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.studio-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 30px;
  margin: 0 clamp(24px, 6vw, 92px);
  padding: 30px 0 34px;
  border-top: 1px solid var(--line);
}

.studio-footer p {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
}

.studio-footer span {
  color: var(--quiet);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* KI- und Beta-Hinweis: muss lesbar sein, nicht dekorativ weggedimmt. Die
   Transparenzpflicht laeuft ins Leere, wenn der Hinweis nicht wahrgenommen wird
   (docs/legal/ki-kennzeichnung-und-beta.md). Deshalb bricht der Footer hier auf
   eine eigene Zeile um, statt den Satz in die Fusszeile zu quetschen. */
.studio-footer {
  flex-wrap: wrap;
}

.studio-footer p.studio-ai-notice {
  flex-basis: 100%;
  order: 3;
  margin: 14px 0 0;
  max-width: 68ch;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.6;
  color: var(--quiet);
}

.studio-footer p.studio-ai-notice strong {
  color: var(--text);
  letter-spacing: 0.04em;
}

.studio-footer p.studio-legal-links {
  flex-basis: 100%;
  order: 4;
  margin: 8px 0 0;
  font-family: inherit;
  font-size: 12px;
}

.studio-footer p.studio-legal-links a {
  color: var(--quiet);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.studio-footer p.studio-legal-links a:hover,
.studio-footer p.studio-legal-links a:focus-visible {
  color: var(--text);
}

/* Rechtsseiten: ruhig, lesbar, gleiche Markenwelt wie das Studio. Offene Stellen
   sind absichtlich auffaellig (.legal-todo) - eine Datenschutzerklaerung mit
   unsichtbaren Luecken ist gefaehrlicher als eine mit sichtbaren. */
.legal-page {
  max-width: 72ch;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) clamp(24px, 6vw, 48px) 96px;
  color: var(--text);
  line-height: 1.7;
}

.legal-kicker {
  margin: 0 0 8px;
  color: var(--quiet);
  font-size: 10px;
  letter-spacing: 0.22em;
}

.legal-page h1 {
  font-family: var(--display);
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.1;
  margin: 0 0 20px;
}

.legal-page h2 {
  font-family: var(--display);
  font-size: 22px;
  margin: 40px 0 10px;
}

.legal-lead {
  color: var(--quiet);
  font-size: 15px;
  margin: 0 0 8px;
}

.legal-page p,
.legal-page li {
  font-size: 15px;
}

.legal-page ul {
  padding-left: 20px;
}

.legal-page li {
  margin-bottom: 8px;
}

.legal-todo {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  background: rgba(214, 168, 106, 0.16);
  border: 1px dashed rgba(214, 168, 106, 0.55);
  color: #d6a86a;
  font-size: 13px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 8px;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}

.legal-table th,
.legal-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 12px 9px 0;
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  color: var(--quiet);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-back {
  margin-top: 52px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.legal-page a {
  color: var(--quiet);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-page a:hover,
.legal-page a:focus-visible {
  color: var(--text);
}

dialog {
  color: var(--text);
}

dialog::backdrop {
  background: rgba(3, 3, 5, 0.74);
  backdrop-filter: blur(9px);
}

.brand-dialog {
  width: min(590px, calc(100vw - 32px));
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  margin: auto;
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
}

.brand-dialog[open],
.film-dialog[open] {
  animation: dialog-in 280ms var(--ease) both;
}

.dialog-bar,
.film-dialog-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.dialog-bar h2,
.film-dialog-bar h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.dialog-close,
.film-dialog-bar button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.brand-intro {
  max-width: 470px;
  margin: 16px 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

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

.theme-card {
  display: grid;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.theme-card.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.theme-card > span:last-child {
  display: grid;
  gap: 4px;
  padding: 0 2px 3px;
}

.theme-card strong {
  font-size: 13px;
  font-weight: 550;
}

.theme-card small {
  color: var(--muted);
  font-size: 10px;
}

.theme-preview {
  position: relative;
  height: 94px;
  display: block;
  overflow: hidden;
  border-radius: 9px;
}

.studio-preview {
  background: #0a0a0c;
}

.studio-preview i:first-child {
  position: absolute;
  top: 23px;
  left: 50%;
  width: 56%;
  height: 6px;
  border-radius: 4px;
  background: #efeae3;
  transform: translateX(-50%);
}

.studio-preview i:nth-child(2) {
  position: absolute;
  top: 40px;
  left: 50%;
  width: 68%;
  height: 26px;
  border: 1px solid rgba(215, 165, 109, 0.4);
  border-radius: 8px;
  background: #151519;
  transform: translateX(-50%);
}

.studio-preview i:nth-child(3) {
  position: absolute;
  right: 19px;
  bottom: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d7a56d;
}

.contrast-preview {
  background: #fff;
}

.contrast-preview i:first-child {
  position: absolute;
  top: 13px;
  left: 13px;
  display: grid;
  place-items: center;
  width: 43px;
  height: 20px;
  border-radius: 50%;
  background: #e20015;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 7px;
  font-style: normal;
  font-weight: 700;
}

.contrast-preview i:nth-child(2) {
  position: absolute;
  top: 44px;
  left: 13px;
  width: 68%;
  height: 8px;
  border-radius: 4px;
  background: #171719;
}

.contrast-preview i:nth-child(3) {
  position: absolute;
  top: 61px;
  left: 13px;
  width: 48%;
  height: 5px;
  border-radius: 4px;
  background: #bbb;
}

.upload-zone {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 17px;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-raised) 60%, transparent);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--accent);
}

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

.upload-visual {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface);
  background-position: center;
  background-size: cover;
  color: var(--accent);
}

.upload-visual.has-image svg {
  display: none;
}

.upload-visual svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-zone > span:last-child {
  display: grid;
  gap: 4px;
}

.upload-zone strong {
  font-size: 12px;
  font-weight: 550;
}

.upload-zone small,
.brand-footnote {
  color: var(--muted);
  font-size: 10px;
}

.brand-footnote {
  margin: 13px 0 0;
  text-align: center;
}

.film-dialog {
  width: min(1180px, calc(100vw - 38px));
  max-height: calc(100svh - 36px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: #09090b;
  color: #f2eee8;
  box-shadow: 0 45px 120px rgba(0, 0, 0, 0.72);
}

.film-dialog-bar {
  align-items: center;
  padding: 15px 18px;
}

.film-dialog-bar p {
  margin: 0 0 3px;
  color: #d7a56d;
  font-size: 8px;
  letter-spacing: 0.2em;
}

.film-dialog-bar h2 {
  font-size: 22px;
}

.film-dialog video {
  width: 100%;
  max-height: calc(100svh - 120px);
  display: block;
  background: #000;
}

@keyframes stage-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes thinking-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@keyframes cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes journey-current {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--wine) 18%, transparent); }
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--wine) 8%, transparent); }
}

@media (max-width: 820px) {
  :root { --rail-width: 58px; }
  .tool-rail { padding-top: 14px; }
  .monogram { width: 36px; height: 36px; }
  .rail-nav { margin-top: 48px; }
  .rail-button { width: 38px; height: 38px; }
  .studio-header { height: 68px; padding-inline: 18px; }
  .wordmark small { display: none; }
  .brand-trigger span:nth-child(2) { display: none; }
  .creator-stage { min-height: 860px; padding: 112px 24px 82px; }
  .stage-intro { max-width: 430px; }
  .conversation-shell { margin-top: 35px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
  .film-grid { grid-template-columns: 1fr; gap: 46px; }
  .proof-section { padding-top: 76px; }
  .studio-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media (max-width: 560px) {
  html {
    scroll-padding-bottom: calc(64px + max(12px, env(safe-area-inset-bottom)));
  }

  :root { --rail-width: 0px; }
  .tool-rail {
    inset: auto 12px 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto;
    height: 52px;
    flex-direction: row;
    justify-content: center;
    gap: 4px;
    padding: 5px 7px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  }
  .monogram, .rail-help { display: none; }
  .rail-nav { display: flex; margin: 0; gap: 3px; }
  .rail-button::after { display: none; }
  .studio-header { left: 0; }
  .creator-stage { min-height: 820px; padding-inline: 18px; }
  .creator-stage:has(.project-canvas:not([hidden])) {
    padding-bottom: calc(98px + max(12px, env(safe-area-inset-bottom)));
  }
  h1 { font-size: clamp(43px, 13vw, 62px); }
  .stage-intro { font-size: 17px; }
  .conversation-shell { margin-top: 30px; }
  .prompt-form { padding: 16px 14px 11px; border-radius: 18px; }
  .prompt-form textarea { min-height: 86px; font-size: 19px; }
  .input-hint { display: none; }
  .scroll-cue { display: none; }
  .proof-section { padding-inline: 18px; padding-bottom: 100px; }
  .proof-section::before { right: 18px; left: 18px; }
  .section-heading h2 { font-size: 36px; }
  .film-meta strong { font-size: 22px; }
  .studio-footer { margin-inline: 18px; padding-bottom: 92px; }
  .brand-dialog { padding: 22px 18px; }
  .theme-choice { grid-template-columns: 1fr; }
}

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

/* Produktgedächtnis: leise Zusatzschicht, die die bestehende Bühne nicht verschiebt. */
.studio-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.persistence-status {
  max-width: 210px;
  overflow: hidden;
  color: var(--quiet);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.persistence-status::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--quiet);
  content: "";
}

.persistence-status[data-state="saved"]::before { background: var(--accent); }
.persistence-status[data-state="saving"]::before { background: var(--accent); animation: thinking-pulse 1s infinite; }
.persistence-status[data-state="error"]::before { background: var(--danger); }

.account-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 5px 13px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  cursor: pointer;
}

.account-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--display);
  font-size: 13px;
}

.account-trigger > span:last-child { font-size: 10px; }

.product-dialog {
  width: min(620px, calc(100vw - 30px));
  max-height: calc(100svh - 32px);
  padding: 30px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: #111114;
  color: #f2eee8;
  box-shadow: 0 45px 120px rgba(0, 0, 0, 0.75);
}

.product-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
}

.product-dialog[open] { animation: dialog-in 420ms var(--ease); }

.product-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.product-dialog-head p {
  margin: 0 0 12px;
  color: #d7a56d;
  font-size: 8px;
  letter-spacing: 0.28em;
}

.product-dialog-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.product-dialog-head > button {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: transparent;
  color: #aaa6ac;
  font-size: 21px;
  cursor: pointer;
}

.product-dialog-intro {
  max-width: 470px;
  margin: 28px 0;
  color: #9b989d;
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.55;
}

.auth-form label {
  display: block;
  margin-bottom: 8px;
  color: #858188;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-form > div { display: flex; gap: 8px; }
.auth-form input {
  min-width: 0;
  flex: 1;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  outline: none;
  background: #19191e;
  color: #f2eee8;
}
.auth-form input:focus { border-color: #d7a56d; }
.auth-form button,
.secondary-product-action,
.new-project-action {
  padding: 13px 17px;
  border: 0;
  border-radius: 12px;
  background: #d7a56d;
  color: #20160d;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.auth-form button:disabled { cursor: wait; opacity: 0.6; }
.auth-feedback { min-height: 18px; margin: 13px 0 0; color: #aaa6ac; font-size: 11px; line-height: 1.5; }

.auth-scope-note {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #858188;
  font-size: 10px;
  line-height: 1.55;
}

.signed-in-panel { margin-top: 28px; }
.signed-in-panel p { color: #aaa6ac; font-size: 12px; }
.signed-in-panel strong { color: #f2eee8; }
.text-product-action { margin-left: 14px; border: 0; background: transparent; color: #8f8b91; font-size: 10px; cursor: pointer; }

.offer-preparation {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.offer-preparation span { display: grid; gap: 3px; }
.offer-preparation strong { font-size: 11px; }
.offer-preparation small { color: #77737a; font-size: 9px; }
.offer-preparation button { align-self: center; padding: 8px 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 99px; background: transparent; color: #77737a; font-size: 9px; }
.offer-preparation button:not(:disabled) { border-color: #d7a56d; color: #d7a56d; cursor: pointer; }

.new-project-action { width: 100%; margin: 28px 0 18px; text-align: left; }
.new-project-action span { margin-right: 8px; font-size: 16px; }
.project-list { display: grid; gap: 8px; }
.project-entry {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: #17171b;
  text-align: left;
  cursor: pointer;
}
.project-entry:hover { border-color: rgba(215, 165, 109, 0.5); }
.project-entry strong { font-family: var(--display); font-size: 18px; font-weight: 400; }
.project-entry small, .project-empty { color: #858188; font-size: 9px; }
.project-empty { padding: 30px 5px; text-align: center; }

/* Tür 1: meine Projekte + Fassungs-Historie */
.project-row {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: #17171b;
}
.project-row-head { display: grid; gap: 4px; }
.project-row-title {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 400;
  color: #f2eee8;
}
.project-row-meta {
  margin: 0;
  color: #858188;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.project-row-actions { display: flex; gap: 8px; }
.project-open,
.project-versions-toggle {
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}
.project-open { border: 0; background: #d7a56d; color: #20160d; }
.project-versions-toggle {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #c9c5cc;
}
.project-versions-toggle:hover { border-color: rgba(215, 165, 109, 0.5); color: #d7a56d; }
.project-versions {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.version-label { color: #c9c5cc; font-size: 11px; }
.version-rollback {
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  background: transparent;
  color: #8f8b91;
  font-size: 9px;
  cursor: pointer;
}
.version-rollback:hover { border-color: #d7a56d; color: #d7a56d; }

@media (max-width: 820px) {
  .persistence-status { display: none; }
  .account-trigger > span:last-child { display: none; }
  .account-trigger { padding-right: 6px; }
}

@media (max-width: 560px) {
  .studio-header-actions { gap: 6px; }
  .brand-trigger { width: 40px; padding: 0; justify-content: center; }
  .brand-trigger svg { display: none; }
  .product-dialog { padding: 24px 18px; border-radius: 18px; }
  .auth-form > div { flex-direction: column; }
  .auth-form button { min-height: 45px; }
}

/* Wirkungsweg: Material wird sichtbar zu Verständnis und Szenen. */
.dictation-hint {
  margin: 10px 8px 0;
  padding: 11px 13px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

[data-dictation-trigger].is-recording {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  animation: dictation-pulse 1.6s ease-in-out infinite;
}

@keyframes dictation-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent);
  }
  50% {
    box-shadow: 0 0 0 6px transparent;
  }
}

.material-panel {
  margin-top: 12px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-raised) 92%, transparent), var(--surface)),
    var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  animation: stage-in 360ms var(--ease) both;
}

.material-panel-head,
.canvas-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.material-panel-head p {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.material-panel-head h2,
.canvas-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.material-panel-head > button {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}

.material-intro {
  max-width: 620px;
  margin: 15px 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

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

.material-entry,
.material-file {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--stage-soft) 70%, transparent);
}

.material-entry {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.material-entry:first-child {
  grid-column: 1 / -1;
}

.material-entry label,
.source-card label,
.scene-feedback-form label,
.decision-card > label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.material-entry > div {
  display: flex;
  gap: 8px;
}

.material-entry input,
.material-entry textarea,
.source-card input,
.source-card select,
.scene-feedback-form input,
.scene-feedback-form textarea,
.decision-card textarea,
.decision-card input,
.decision-card select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
}

.material-entry input,
.source-card input,
.source-card select,
.scene-feedback-form input,
.decision-card input,
.decision-card select {
  min-height: 42px;
  padding: 0 12px;
}

.material-entry textarea,
.scene-feedback-form textarea,
.decision-card textarea {
  resize: vertical;
  padding: 11px 12px;
  line-height: 1.5;
}

.material-entry input:focus,
.material-entry textarea:focus,
.source-card input:focus,
.source-card select:focus,
.scene-feedback-form input:focus,
.scene-feedback-form textarea:focus,
.decision-card textarea:focus,
.decision-card input:focus,
.decision-card select:focus {
  border-color: color-mix(in srgb, var(--accent) 68%, var(--line));
}

.material-entry button,
.scene-feedback-form > button,
.release-checklist button,
.preview-heading button,
.preview-actions a,
.decision-actions button:last-child {
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.material-entry > button {
  align-self: flex-start;
}

.material-entry small {
  color: var(--quiet);
  font-size: 9px;
  line-height: 1.45;
}

.material-file {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  border-style: dashed;
  cursor: pointer;
}

.material-file:hover {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
}

.material-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.material-file-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  font-size: 20px;
}

.material-file > span:last-child {
  display: grid;
  gap: 4px;
}

.material-file strong {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 400;
}

.material-file small {
  color: var(--quiet);
  font-size: 9px;
  line-height: 1.45;
}

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

.source-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 32px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--stage) 54%, transparent);
}

.source-card img,
.source-card-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: color-mix(in srgb, var(--wine) 28%, var(--surface));
  color: var(--accent);
  font-family: var(--display);
  object-fit: cover;
}

.source-card > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

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

.source-card strong {
  font-size: 11px;
  font-weight: 600;
}

.source-card small {
  color: var(--muted);
  font-size: 9px;
}

.source-card label {
  display: grid;
  gap: 6px;
  margin-top: 5px;
}

.source-material-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 4px;
}

.source-card select {
  min-height: 38px;
  padding: 0 9px;
  font-size: 11px;
}

.source-material-save {
  justify-self: start;
  min-height: 36px;
  margin-top: 4px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text);
  font-size: 10px;
  cursor: pointer;
}

.source-material-save:disabled {
  cursor: default;
  opacity: 0.62;
}

.source-remove {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--quiet);
  font-size: 18px;
  cursor: pointer;
}

.source-remove:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.project-canvas {
  position: relative;
  z-index: 2;
  width: min(1180px, 100%);
  margin-top: clamp(58px, 8vw, 104px);
  padding-bottom: 32px;
  animation: stage-in 620ms var(--ease) both;
}

.project-canvas:not([hidden]) ~ .scroll-cue {
  display: none;
}

.material-thread {
  display: grid;
  grid-template-columns: repeat(6, max-content minmax(18px, 1fr)) max-content;
  align-items: center;
  gap: 13px;
  width: min(1120px, 100%);
  margin: 0 auto 26px;
  overflow-x: auto;
  padding: 8px 2px 12px;
  scrollbar-width: thin;
}

.material-thread span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.material-thread span i {
  width: 7px;
  height: 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 72%, transparent);
  border-radius: 50%;
  background: var(--stage);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 8%, transparent);
}

.material-thread [data-status="completed"] {
  color: color-mix(in srgb, var(--accent) 78%, var(--text));
}

.material-thread [data-status="completed"] i {
  background: var(--accent);
}

.material-thread [data-status="current"] {
  color: var(--text);
}

.material-thread [data-status="current"] i {
  border-color: color-mix(in srgb, var(--wine) 75%, var(--accent));
  background: var(--wine);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--wine) 20%, transparent);
  animation: journey-current 1.8s ease-in-out infinite;
}

.material-thread [data-status="upcoming"] {
  opacity: 0.52;
}

.material-thread b {
  height: 1px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 22%, transparent),
    color-mix(in srgb, var(--accent) 76%, var(--wine)),
    color-mix(in srgb, var(--wine) 58%, transparent)
  );
}

.understanding-card,
.effect-mirror,
.effect-snapshot,
.scene-workspace,
.local-preview,
.decision-card,
.release-checklist,
.render-state,
.film-preview,
.delivery-state {
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.understanding-card {
  border-radius: 24px 24px 5px 5px;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.26);
}

.effect-snapshot,
.effect-mirror,
.scene-workspace,
.local-preview,
.decision-card,
.release-checklist,
.render-state,
.film-preview,
.delivery-state {
  margin-top: 10px;
  border-radius: 5px;
}

.effect-mirror {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
  overflow: hidden;
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 54%),
    color-mix(in srgb, var(--surface) 88%, transparent);
}

.effect-mirror[hidden] {
  display: none;
}

.effect-mirror-mark {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  min-height: 100%;
}

.effect-mirror-mark i {
  border-left: 1px solid color-mix(in srgb, var(--accent) 66%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--wine) 28%, transparent);
  transform: skewY(-12deg);
}

.effect-mirror-copy {
  max-width: 760px;
}

.effect-mirror-copy h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(25px, 3.2vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.effect-mirror-statement {
  margin: 22px 0 0;
  color: var(--paper);
  font-size: clamp(15px, 1.8vw, 20px);
  line-height: 1.55;
}

.effect-mirror blockquote {
  margin: 18px 0 0;
  padding-left: 16px;
  border-left: 1px solid color-mix(in srgb, var(--accent) 54%, var(--line));
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.effect-mirror-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.effect-mirror-actions button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper);
  background: color-mix(in srgb, var(--stage) 72%, transparent);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.effect-mirror-actions button:first-child {
  border-color: color-mix(in srgb, var(--accent) 64%, var(--line));
  background: color-mix(in srgb, var(--accent) 18%, var(--stage));
}

.effect-mirror-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.effect-mirror-feedback {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.decision-card {
  border-radius: 5px;
}

.canvas-heading {
  align-items: flex-end;
}

.canvas-heading.compact {
  align-items: flex-start;
}

.canvas-heading .section-kicker {
  margin-bottom: 10px;
}

.canvas-heading > p {
  max-width: 340px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: right;
}

.understanding-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 30px;
}

.understanding-grid article {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--stage-soft) 66%, transparent);
}

.understanding-grid article:last-child {
  border-color: color-mix(in srgb, var(--wine) 42%, var(--line));
  background: color-mix(in srgb, var(--wine) 9%, var(--stage-soft));
}

.understanding-grid article > span {
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.understanding-grid article:last-child > span {
  color: color-mix(in srgb, var(--wine) 48%, var(--paper));
}

.understanding-grid ul {
  display: grid;
  gap: 8px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.understanding-grid li {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.understanding-grid li::before {
  content: "—";
  margin-right: 6px;
  color: var(--quiet);
}

.effect-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.effect-grid > div {
  min-width: 0;
  padding: 17px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.effect-grid dt {
  margin-bottom: 8px;
  color: var(--quiet);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.effect-grid dd {
  margin: 0;
  color: var(--text);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.45;
}

.scene-sequence {
  display: grid;
  grid-auto-columns: minmax(265px, 0.7fr);
  grid-auto-flow: column;
  gap: 10px;
  margin-top: 28px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.scene-card {
  position: relative;
  min-width: 0;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--wine) 12%, transparent), transparent 32%),
    color-mix(in srgb, var(--stage-soft) 75%, transparent);
  text-align: left;
  scroll-snap-align: start;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.scene-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  transform: translateY(-2px);
}

.scene-card.is-selected {
  border-color: var(--accent);
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--accent) 14%, transparent), transparent 38%),
    color-mix(in srgb, var(--stage-soft) 80%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent);
}

.scene-card-number {
  margin-bottom: 25px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scene-card small {
  margin-bottom: 6px;
  color: var(--quiet);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scene-card strong {
  margin-bottom: 20px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.3;
}

.scene-card p {
  margin: auto 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.scene-feedback-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 14px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 4%, var(--stage-soft));
}

.scene-feedback-form > div {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.scene-feedback-form > div span {
  color: var(--accent);
  font-family: var(--display);
  font-size: 20px;
}

.scene-feedback-form textarea {
  grid-row: span 3;
}

.scene-feedback-form > button {
  justify-self: start;
}

.release-checklist form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.scope-summary {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 7px 18px;
  margin-top: 24px;
  padding: 17px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 5%, var(--stage-soft));
}

.scope-summary span {
  grid-row: span 2;
  align-self: center;
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scope-summary strong {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 400;
}

.scope-summary small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.release-checklist fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.release-checklist legend {
  padding: 0 6px;
  color: var(--quiet);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.release-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.release-checklist input {
  margin-top: 2px;
  accent-color: var(--accent);
}

.release-checklist p,
.decision-authority-note {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.release-checklist button {
  justify-self: start;
}

.render-state {
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--wine) 9%, transparent), transparent 58%),
    color-mix(in srgb, var(--surface) 90%, transparent);
}

.render-state .canvas-heading > strong {
  color: var(--accent);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 400;
}

.render-state progress {
  width: 100%;
  height: 5px;
  display: block;
  margin-top: 28px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--stage-soft);
  color: var(--accent);
  appearance: none;
}

.render-state progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--stage-soft);
}

.render-state progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--wine));
  transition: width 420ms var(--ease);
}

.render-state > p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.render-state .render-error {
  color: var(--danger);
}

.render-state > button,
.delivery-state a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line));
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.film-preview {
  background:
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 34%),
    #09090b;
}

.film-preview > p,
.delivery-state > p {
  max-width: 700px;
  margin: 19px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.delivery-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.delivery-state .delivery-files a {
  margin-top: 0;
  background: transparent;
  color: var(--text);
}

.preview-play-status:empty {
  display: none;
}

.film-preview video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  margin-top: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #000;
  object-fit: contain;
}

.delivery-state {
  border-radius: 5px 5px 24px 24px;
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background:
    linear-gradient(118deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 62%),
    color-mix(in srgb, var(--surface) 92%, transparent);
}

.delivery-state a {
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
}

.local-preview {
  background:
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--wine) 18%, transparent), transparent 34%),
    color-mix(in srgb, var(--surface) 90%, transparent);
}

.preview-heading button {
  min-width: 142px;
}

.preview-frame {
  position: relative;
  min-height: 360px;
  display: grid;
  align-content: center;
  justify-items: center;
  margin-top: 28px;
  overflow: hidden;
  padding: clamp(30px, 7vw, 90px);
  border: 1px solid color-mix(in srgb, var(--accent) 23%, var(--line));
  border-radius: 4px;
  background:
    linear-gradient(120deg, rgba(8, 8, 10, 0.97), rgba(18, 16, 18, 0.96)),
    var(--stage);
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.42);
  text-align: center;
}

.preview-frame::before,
.preview-frame::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.preview-frame::before {
  inset: -40% 20% auto;
  height: 74%;
  border: 1px solid color-mix(in srgb, var(--accent) 11%, transparent);
  border-radius: 50%;
  filter: blur(1px);
}

.preview-frame::after {
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(to top, color-mix(in srgb, var(--wine) 12%, transparent), transparent);
}

.preview-number,
.preview-frame p,
.preview-frame > span {
  position: relative;
  z-index: 1;
}

.preview-number {
  margin-bottom: 26px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.preview-frame p {
  max-width: 790px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(29px, 4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.preview-frame > span {
  max-width: 600px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.preview-progress {
  position: absolute;
  z-index: 1;
  right: 22px;
  bottom: 20px;
  left: 22px;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.preview-progress i {
  width: 0;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--wine) 64%, var(--accent)));
  transition-property: width;
  transition-timing-function: linear;
}

.decision-card {
  border-color: color-mix(in srgb, var(--wine) 48%, var(--line));
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--wine) 9%, transparent), transparent 55%),
    color-mix(in srgb, var(--surface) 90%, transparent);
}

.decision-card .canvas-heading > span {
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--wine) 50%, var(--line));
  border-radius: 999px;
  color: color-mix(in srgb, var(--wine) 44%, var(--paper));
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.decision-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 28px 0 20px;
}

.decision-card dl > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.decision-card dt {
  margin-bottom: 7px;
  color: var(--quiet);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.decision-card dd {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.decision-card > label {
  display: block;
  margin: 13px 0 7px;
}

.decision-feedback {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.decision-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.decision-actions button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.decision-actions button:disabled {
  cursor: default;
  opacity: 0.46;
}

@media (max-width: 920px) {
  .understanding-grid,
  .effect-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-card dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .creator-stage:has(.project-canvas:not([hidden])) {
    justify-content: flex-start;
    padding-bottom: 110px;
  }

  .project-canvas {
    margin-top: 64px;
  }

  .material-entry-grid {
    grid-template-columns: 1fr;
  }

  .material-entry:first-child {
    grid-column: auto;
  }

  .scene-feedback-form {
    grid-template-columns: 1fr;
  }

  .scene-feedback-form textarea {
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .creator-stage {
    overflow: visible;
  }

  .material-panel {
    padding: 18px 14px;
    border-radius: 16px;
  }

  .material-panel-head h2,
  .canvas-heading h2 {
    font-size: 29px;
  }

  .material-entry > div,
  .canvas-heading,
  .decision-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .material-entry > div {
    display: grid;
  }

  .source-card {
    grid-template-columns: 42px minmax(0, 1fr) 30px;
  }

  .source-card img,
  .source-card-mark {
    width: 42px;
    height: 42px;
  }

  .source-material-choices {
    grid-template-columns: 1fr;
  }

  .project-canvas {
    margin-top: 52px;
  }

  .material-thread {
    position: sticky;
    z-index: 30;
    top: 8px;
    width: 100%;
    gap: 8px;
    padding: 12px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: color-mix(in srgb, var(--stage) 94%, transparent);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
    scroll-snap-type: x proximity;
  }

  .material-thread span {
    gap: 5px;
    font-size: 7px;
    letter-spacing: 0.1em;
    scroll-snap-align: start;
  }

  .understanding-card,
  .effect-snapshot,
  .scene-workspace,
  .local-preview,
  .decision-card,
  .release-checklist,
  .render-state,
  .film-preview,
  .delivery-state {
    padding: 22px 16px;
  }

  .scope-summary {
    grid-template-columns: 1fr;
  }

  .scope-summary span {
    grid-row: auto;
  }

  .film-preview video {
    margin-top: 18px;
    border-radius: 4px;
  }

  .preview-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .canvas-heading > p {
    max-width: none;
    text-align: left;
  }

  .understanding-grid,
  .effect-grid {
    grid-template-columns: 1fr;
  }

  .scene-sequence {
    grid-auto-columns: 82vw;
  }

  .preview-frame {
    min-height: 400px;
    padding: 54px 20px;
  }

  .preview-frame p {
    font-size: 31px;
  }

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