@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-var-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-var-latin.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-var-latin.woff2") format("woff2");
}

:root {
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --bg: #0e1110;
  --panel: #161a19;
  --panel-soft: #1d2321;
  --ink: #edefeb;
  --muted: #8f9893;
  --line: #272e2b;
  --line-strong: #37403c;
  --teal: #2cc2ad;
  --teal-deep: #0e8273;
  --teal-bright: #4fd8c5;
  --teal-soft: rgba(44, 194, 173, 0.12);
  --coral: #ff7757;
  --amber: #e9b357;
  --black: #0a0c0b;
  /* Elevation-System: 1 = Karte, 2 = Panel/schwebend, 3 = Modal/Overlay */
  --shadow-1: 0 6px 18px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 18px 50px rgba(0, 0, 0, 0.4);
  --shadow-3: 0 26px 70px rgba(0, 0, 0, 0.55);
  --shadow: var(--shadow-2);
  --shadow-raise: var(--shadow-3);
  /* Radius-Skala: 4 (Badges) / 6 (Inputs klein) / 8 (Buttons) / 12 (Karten) / 16 (Modals) / 999 (Pills) */
  /* Typo-Skala: 10 (Mono-Badges) 11 12 13 (Body-Sekundär) 14 (Body) 15 17 (Panel-Titel) 20 24 (Views) */
  --sidebar-collapsed: 68px;
  --sidebar-expanded: 236px;
  --header-height: 64px;
}

* {
  box-sizing: border-box;
}

/* hidden-Attribut gewinnt immer – auch gegen display:flex/grid von Komponenten-Klassen
   (sonst erscheinen Elemente wie der Basis-Video-Chip trotz hidden). */
[hidden] {
  display: none !important;
}

html {
  scrollbar-color: #2e3733 var(--bg);
  /* Native Controls (Selects, Datepicker, Scrollbars) im dunklen Schema rendern */
  color-scheme: dark;
}

/* Sichtbarer Tastatur-Fokus auf allen interaktiven Elementen */
:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 2px;
  border-radius: 6px;
}
/* Kein Fokusring bei reiner Maus-Interaktion (Buttons/Links) */
:focus:not(:focus-visible) {
  outline: none;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-feature-settings: "tnum" 1;
}

h1,
h2,
h3,
.mega-title,
.ws-title,
.nav-label,
.pool-title,
.bubble-name,
.brand-mark {
  font-family: var(--font-display);
}

::selection {
  background: rgba(44, 194, 173, 0.32);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #2e3733;
  border-radius: 999px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: #3c4741;
}

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

button {
  cursor: pointer;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 6px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h2,
h3 {
  letter-spacing: -0.015em;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ================================================================== login */

.login-screen {
  position: fixed;
  inset: 0;
  overflow: hidden auto;
  background:
    radial-gradient(900px 600px at 18% 12%, rgba(17, 117, 106, 0.22) 0%, transparent 60%),
    radial-gradient(1000px 700px at 85% 90%, rgba(216, 85, 53, 0.16) 0%, transparent 60%),
    radial-gradient(1200px 700px at 70% -10%, #1e2b29 0%, #121514 55%, #0c0d0c 100%);
  color: #f4f3ef;
}
/* Cinematische Vignette */
.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 45%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
  z-index: 0;
}
/* Feines Film-Grain (SVG-Rauschen, sehr dezent) */
.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}

.login-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: glowDrift 14s ease-in-out infinite alternate;
  pointer-events: none;
}

.glow-a {
  width: 520px;
  height: 520px;
  left: -140px;
  top: 12%;
  background: rgba(17, 117, 106, 0.5);
}

.glow-b {
  width: 460px;
  height: 460px;
  right: -120px;
  bottom: -10%;
  background: rgba(216, 85, 53, 0.38);
  animation-delay: -7s;
}

@keyframes glowDrift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(60px, -40px, 0) scale(1.15);
  }
}

.login-grid-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 35%, black 30%, transparent 75%);
  pointer-events: none;
}

.login-center {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 48px 20px 64px;
  text-align: center;
}

.mega-title {
  display: grid;
  gap: 4px;
  font-size: clamp(40px, 7.2vw, 88px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.title-line {
  display: block;
  white-space: nowrap;
}

.mega-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px) scale(1.06);
  filter: blur(12px);
  animation: letterIn 0.85s cubic-bezier(0.2, 0.7, 0.15, 1) forwards;
  animation-delay: calc(var(--i) * 42ms + 150ms);
}

@keyframes letterIn {
  60% {
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.title-line-accent .mega-letter {
  background: linear-gradient(100deg, #4fd8c5 10%, #e8fffb 45%, #4fd8c5 60%, #d8a548 95%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation:
    letterIn 0.85s cubic-bezier(0.2, 0.7, 0.15, 1) forwards,
    shimmer 5.5s linear 2.2s infinite;
  animation-delay: calc(var(--i) * 42ms + 150ms), 2.2s;
}

@keyframes shimmer {
  from {
    background-position: 0% 0;
  }
  to {
    background-position: -220% 0;
  }
}

.login-tagline {
  color: rgba(244, 243, 239, 0.55);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.9s ease 1.5s forwards;
}

.login-stage {
  width: min(640px, 100%);
}

.pool-block {
  display: grid;
  justify-items: center;
  gap: 6px;
  opacity: 0;
  animation: fadeUp 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 1.7s forwards;
}

.pool-block.now {
  animation-delay: 0s;
}

.pool-title {
  margin-top: 26px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #4fd8c5;
}

.pool-hint {
  color: rgba(244, 243, 239, 0.5);
  font-size: 13px;
}

.bubble-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 30px 40px;
  margin-top: 26px;
  padding: 10px 0 20px;
}

.pool-bubble {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f4f3ef;
  animation: bubbleFloat 5.5s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -1.7s);
}

.pool-bubble:nth-child(even) {
  margin-top: 26px;
  animation-duration: 6.5s;
}

.pool-bubble:nth-child(3n) {
  animation-duration: 4.8s;
}

@keyframes bubbleFloat {
  from {
    transform: translateY(-7px);
  }
  to {
    transform: translateY(9px);
  }
}

.bubble-avatar {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.32), transparent 46%),
    var(--avatar-color, var(--teal));
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow:
    0 0 34px -6px var(--avatar-color, var(--teal)),
    0 18px 44px rgba(0, 0, 0, 0.42);
  transition: transform 180ms cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 180ms ease, border-color 180ms ease;
  animation: bubbleFloat 6s ease-in-out calc(var(--i, 0) * 0.4s) infinite;
}

@keyframes bubbleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: reduce) {
  .bubble-avatar { animation: none; }
}

.pool-bubble:hover .bubble-avatar,
.pool-bubble:focus-visible .bubble-avatar {
  animation-play-state: paused;
  transform: scale(1.12);
  border-color: #4fd8c5;
  box-shadow:
    0 0 0 7px rgba(79, 216, 197, 0.14),
    0 0 40px -4px var(--avatar-color, var(--teal)),
    0 22px 54px rgba(0, 0, 0, 0.5);
}

.bubble-avatar.big {
  width: 64px;
  height: 64px;
  font-size: 20px;
  animation: none;
}

.bubble-name {
  font-size: 14px;
  font-weight: 800;
}

.bubble-role {
  color: rgba(244, 243, 239, 0.48);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pool-empty {
  color: rgba(244, 243, 239, 0.55);
  font-size: 14px;
  padding: 22px 0;
}

.login-card {
  width: min(460px, 100%);
  margin-top: 18px;
  padding: 26px 26px 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(18, 21, 20, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(22px);
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 1.75s forwards;
  text-align: left;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card.now {
  animation-delay: 0.05s;
}

.login-card h2 {
  font-size: 20px;
}

.login-hint {
  margin-top: 4px;
  color: rgba(244, 243, 239, 0.55);
  font-size: 13px;
}

.pool-back {
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(244, 243, 239, 0.55);
  font-size: 13px;
  font-weight: 700;
  transition: color 140ms ease;
}

.pool-back:hover {
  color: #4fd8c5;
}

.login-selected {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.login-selected strong {
  display: block;
  font-size: 17px;
}

.login-selected span {
  color: rgba(244, 243, 239, 0.5);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.login-form label {
  color: rgba(244, 243, 239, 0.6);
}

.login-form input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f4f3ef;
}

.login-form input:focus {
  border-color: #4fd8c5;
  box-shadow: 0 0 0 3px rgba(79, 216, 197, 0.16);
}

/* ================================================================== avatars */

.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.28), transparent 48%),
    var(--avatar-color, var(--teal));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.avatar-md {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.avatar-lg {
  width: 58px;
  height: 58px;
  font-size: 20px;
}

/* ================================================================== workspace shell */

.workspace {
  min-height: 100vh;
}

.ws-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-height);
  padding: 0 20px 0 16px;
  background: rgba(10, 12, 11, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  color: #f4f3ef;
}

.ws-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ws-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: #fff;
  box-shadow: 0 6px 18px rgba(44, 194, 173, 0.25);
}

.ws-logo svg {
  width: 21px;
  height: 21px;
}

.ws-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ws-title b {
  color: var(--teal-bright);
  font-weight: 800;
}

.ws-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ws-profile-info {
  display: grid;
  justify-items: end;
  line-height: 1.15;
}

.ws-profile-info strong {
  font-size: 14px;
}

.ws-profile-info span {
  color: rgba(244, 243, 239, 0.55);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: transparent;
  color: #f4f3ef;
  transition: border-color 150ms ease, background 150ms ease;
}

.icon-button:hover {
  border-color: var(--teal-bright);
  background: rgba(79, 216, 197, 0.1);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

/* sidebar */

.ws-sidebar {
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: var(--sidebar-collapsed);
  padding: 16px 10px;
  background: #121615;
  border-right: 1px solid var(--line);
  overflow: hidden;
  transition: width 240ms cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 240ms ease;
}

.ws-sidebar:hover,
.ws-sidebar:focus-within {
  width: var(--sidebar-expanded);
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--muted);
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease;
}

.nav-item:hover {
  background: var(--panel-soft);
  color: var(--ink);
}

.nav-item.active {
  background: var(--teal-soft);
  color: var(--teal-bright);
  box-shadow: inset 2px 0 0 var(--teal);
}

.nav-icon {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
}

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

.nav-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 180ms ease 40ms, transform 180ms ease 40ms;
}

.ws-sidebar:hover .nav-label,
.ws-sidebar:focus-within .nav-label {
  opacity: 1;
  transform: translateX(0);
}

.nav-item.nav-help {
  margin-top: auto;
}

/* Hilfe / Tutorial */

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  align-items: start;
  max-width: 1100px;
}

.help-card.wide {
  grid-column: 1 / -1;
}

.help-card .panel-heading h3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.help-card .panel-heading svg {
  width: 18px;
  height: 18px;
  color: var(--teal-bright);
}

.help-list {
  margin: 0;
  padding: 14px 18px 16px 34px;
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.help-list b {
  color: var(--ink);
}

/* Inline-Icons im Fließtext (Hilfe-Listen, Versions-Metazeile) klein halten –
   SVGs ohne Größenregel würden sonst auf Containerbreite aufblähen. */
.help-list svg,
.job-item span svg {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
}

.help-list code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal-bright);
  background: var(--panel-soft);
  padding: 1px 6px;
  border-radius: 6px;
}

.help-list li::marker {
  color: var(--teal);
}

.help-list.numbered li::marker {
  font-family: var(--font-mono);
  font-weight: 700;
}

/* main */

.ws-main {
  padding: calc(var(--header-height) + 26px) 28px 48px calc(var(--sidebar-collapsed) + 28px);
  max-width: 1560px;
}

.view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

/* Kosten-Erklärbox in der Budget-Übersicht */
.cost-explainer {
  margin-bottom: 18px;
  display: grid;
  gap: 10px;
}
.cost-explainer p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.cost-explainer p b { color: var(--ink); }
.byteplus-live {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.byteplus-live b {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal-bright);
  word-break: break-all;
}

.view-heading h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.view-heading p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.heading-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-block {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.breadcrumb b {
  color: var(--line-strong);
  font-weight: 400;
}

.breadcrumb a:hover {
  color: var(--teal-bright);
}

.breadcrumb span {
  color: var(--ink);
}

/* ================================================================== panels & forms */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h3 {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Icons in Panel-Überschriften klein & dezent halten (z. B. Timeline / Schnitt) */
.panel-heading h3 svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--muted);
}

.section-count {
  color: var(--muted);
  font-size: 13px;
}

.empty-panel {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 28px;
  color: var(--muted);
  font-size: 14px;
}

.empty-panel a {
  color: var(--teal-bright);
  font-weight: 700;
}

.empty-panel .modal-icon {
  color: var(--coral);
}

.form-panel {
  max-width: 620px;
}

.stacked-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 10px;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line);
}

.inline-form:first-child {
  border-top: 0;
}

label,
fieldset {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 0;
  padding: 0;
  margin: 0;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #121615;
  color: var(--ink);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #5d6660;
}

select,
input {
  min-height: 42px;
  padding: 0 12px;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%238f9893' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

textarea {
  min-height: 110px;
  padding: 12px;
  line-height: 1.45;
  resize: vertical;
  text-transform: none;
  letter-spacing: 0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(44, 194, 173, 0.16);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
}

.range-line {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 8px;
  align-items: center;
}

input[type="range"] {
  padding: 0;
  min-height: auto;
  border: 0;
  background: transparent;
  accent-color: var(--teal);
}

output {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel-soft);
}

.segmented-control {
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 8px;
}

.segmented-control legend {
  grid-column: 1 / -1;
  padding: 0;
}

.segmented-control label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #121615;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  transition: border-color 140ms ease, background 140ms ease;
}

.segmented-control label:hover {
  border-color: var(--teal);
}

.segmented-control label:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.segmented-control input {
  width: auto;
  min-height: auto;
  margin: 0 7px 0 0;
  accent-color: var(--teal);
}

.primary-button,
.secondary-button {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 800;
  transition: filter 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Dunklere Teals → weiße Schrift erreicht ausreichenden Kontrast (~4.3:1) */
  background: linear-gradient(135deg, var(--teal-deep), #0b6357);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(14, 130, 115, 0.28);
}

.primary-button:hover {
  filter: brightness(1.12);
  box-shadow: 0 10px 30px rgba(44, 194, 173, 0.32);
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button.as-link {
  text-decoration: none;
}

.secondary-button {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.secondary-button:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.primary-button.mini,
.secondary-button.mini {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
}

/* Inline-Icons in Text-Buttons einheitlich klein halten (sonst rendern SVGs
   ohne width/height in ihrer natürlichen Größe und sprengen den Button). */
.primary-button svg,
.secondary-button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Global deaktivierter Zustand: klar erkennbar, nicht klickbar */
.primary-button:disabled,
.secondary-button:disabled,
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
  transform: none;
}

a.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.secondary-button.icon-only {
  padding: 0;
  width: 32px;
}

.secondary-button.icon-only svg {
  width: 16px;
  height: 16px;
}

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

.pool-actions .secondary-button.mini {
  min-height: 28px;
  font-size: 11px;
}

.pool-actions .icon-only {
  width: 28px;
}

.secondary-button.danger-outline {
  color: var(--coral);
}

.secondary-button.danger-outline:hover {
  border-color: var(--coral);
  background: rgba(255, 119, 87, 0.1);
}

.primary-button.danger {
  background: linear-gradient(135deg, #f26a45, #c74a2c);
  box-shadow: 0 8px 24px rgba(255, 119, 87, 0.22);
}

.heading-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.form-error {
  min-height: 18px;
  color: var(--coral);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

.form-success {
  min-height: 18px;
  color: var(--teal-bright);
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  line-height: 1.5;
}

.empty-list {
  padding: 16px 18px;
  color: var(--muted);
  font-size: 13px;
}

/* ================================================================== cards */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ---------------- Poster-Wall: Projekte als Filmposter ---------------- */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.poster-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-1);
  transition: transform 200ms cubic-bezier(0.2, 0.7, 0.2, 1), border-color 200ms ease, box-shadow 200ms ease;
}
.poster-card:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
  box-shadow: var(--shadow-3);
}
.poster-art {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--panel-soft);
  overflow: hidden;
}
.poster-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.poster-card:hover .poster-art img {
  transform: scale(1.05);
}
.poster-monogram {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.22);
}
.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 12, 11, 0.78) 0%, rgba(10, 12, 11, 0.12) 42%, transparent 70%);
  pointer-events: none;
}
.poster-status {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 24px;
  padding: 0 10px;
  font-size: 11px;
  background: rgba(10, 12, 11, 0.6);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.poster-body {
  display: grid;
  gap: 8px;
  padding: 14px 16px 16px;
}
.poster-title {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.01em;
}
.poster-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .poster-card,
  .poster-art img {
    transition: none;
  }
  .poster-card:hover {
    transform: none;
  }
  .poster-card:hover .poster-art img {
    transform: none;
  }
}

/* ---------------- Projekt-Hero: Keyart als Backdrop ---------------- */
.project-hero {
  position: relative;
  margin: -4px -4px 20px;
  padding: 18px 22px 22px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  isolation: isolate;
}
.project-hero-art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  filter: saturate(1.05);
  z-index: -2;
}
.project-hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(14, 17, 16, 0.94) 0%, rgba(14, 17, 16, 0.72) 45%, rgba(14, 17, 16, 0.55) 100%),
    linear-gradient(to top, rgba(14, 17, 16, 0.9) 0%, transparent 60%);
  backdrop-filter: blur(2px);
  z-index: -1;
}
.project-hero .view-heading {
  margin: 0;
}
.project-hero .view-heading h2 {
  font-size: 24px;
  letter-spacing: -0.015em;
}
.project-hero .breadcrumb {
  margin-bottom: 12px;
}

/* ---------------- Sanfter Seitenübergang ---------------- */
@keyframes viewFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.view-fade {
  animation: viewFade 180ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
  .view-fade { animation: none; }
}

.project-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 180ms cubic-bezier(0.2, 0.7, 0.2, 1), border-color 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--teal);
  box-shadow: var(--shadow-raise);
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-card-top strong {
  font-size: 15px;
}

.project-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(44, 194, 173, 0.35);
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-bright);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.muted {
  border-color: var(--line-strong);
  background: var(--panel-soft);
  color: var(--muted);
}

.status-pill.is-running {
  border-color: rgba(233, 179, 87, 0.4);
  background: rgba(233, 179, 87, 0.12);
  color: var(--amber);
}

.status-pill.is-running::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  animation: statusPulse 1.2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}

.status-pill.is-queued {
  border-color: var(--line-strong);
  background: var(--panel-soft);
  color: var(--muted);
}

.status-pill.is-failed {
  border-color: rgba(255, 119, 87, 0.4);
  background: rgba(255, 119, 87, 0.12);
  color: var(--coral);
}

/* project detail */

.project-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.6fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.scene-list {
  display: grid;
}

.scene-row {
  border-bottom: 1px solid var(--line);
}

.scene-row.dragging {
  opacity: 0.5;
}

.scene-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  cursor: pointer;
  transition: background 140ms ease;
}

.scene-item > div {
  flex: 1;
  min-width: 0;
}

.scene-item:hover {
  background: var(--panel-soft);
}

.drag-grip {
  display: grid;
  place-items: center;
  width: 22px;
  height: 30px;
  color: var(--muted);
  cursor: grab;
  opacity: 0.55;
  transition: opacity 130ms ease, color 130ms ease;
}

.drag-grip:hover {
  opacity: 1;
  color: var(--teal-bright);
}

.drag-grip:active {
  cursor: grabbing;
}

.drag-grip svg {
  width: 18px;
  height: 18px;
}

.card-grip {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(10, 12, 11, 0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  opacity: 0;
  z-index: 2;
}

.shot-card:hover .card-grip {
  opacity: 0.75;
}

.shot-card.dragging {
  opacity: 0.5;
}

/* Filmstreifen */

.film-strip {
  display: flex;
  gap: 8px;
  padding: 10px 18px 12px 74px;
  overflow-x: auto;
  position: relative;
  background:
    #0a0c0b
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1.5px, transparent 1.5px) 0 0 / 12px 6px repeat-x,
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1.5px, transparent 1.5px) 0 100% / 12px 6px repeat-x;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
/* Perforationsränder oben/unten (Filmstreifen-Optik) */
.film-strip::before,
.film-strip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: radial-gradient(circle at 6px center, #0a0c0b 2px, transparent 2.4px) 0 0 / 12px 6px repeat-x;
  pointer-events: none;
  z-index: 3;
}
.film-strip::before { top: 2px; }
.film-strip::after { bottom: 2px; }

.film-cell {
  position: relative;
  flex: 0 0 auto;
  width: 96px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #0c0e0d;
  transition: border-color 130ms ease, transform 130ms ease;
}

.film-cell:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.film-cell.has-fav {
  border-color: rgba(233, 179, 87, 0.6);
}

.film-cell img,
.film-cell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.film-cell-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.film-cell-label {
  position: absolute;
  bottom: 3px;
  left: 3px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(10, 12, 11, 0.75);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.film-cell-star {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  color: var(--amber);
}

/* Shot-Verschieben: Ziel-Szene leuchtet beim Darüberziehen */
.scene-row.shot-drop-target {
  outline: 2px dashed var(--teal);
  outline-offset: -2px;
  border-radius: 10px;
  background: var(--teal-soft);
}
.film-cell.dragging {
  opacity: 0.5;
}

.film-cell-star svg {
  width: 13px;
  height: 13px;
}

.scene-number {
  display: grid;
  place-items: center;
  width: 58px;
  height: 40px;
  border: 1px solid rgba(44, 194, 173, 0.4);
  border-radius: 8px;
  background: var(--black);
  color: var(--teal-bright);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.scene-item strong {
  display: block;
  font-size: 14px;
}

.scene-item div span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.scene-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.team-list {
  display: grid;
}

.team-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.team-item strong {
  display: block;
  font-size: 14px;
}

.team-item span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.team-item:last-child {
  border-bottom: 0;
}

/* shots & reference cards */

.shot-card {
  display: grid;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.2, 0.7, 0.2, 1), border-color 180ms ease, box-shadow 180ms ease;
}

.shot-card:hover {
  transform: translateY(-3px);
  border-color: var(--teal);
  box-shadow: var(--shadow-raise);
}

.shot-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    #0c0e0d;
  background-size: 36px 36px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
}

.shot-thumb img,
.shot-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shot-thumb-empty {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.shot-thumb-empty svg {
  width: 30px;
  height: 30px;
}

.shot-card-body {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
}

.shot-card-body strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.shot-card-body span {
  color: var(--muted);
  font-size: 12px;
}

/* ================================================================== references */

.ref-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.ref-card {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 22px 20px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 180ms cubic-bezier(0.2, 0.7, 0.2, 1), border-color 180ms ease, box-shadow 180ms ease;
}

.ref-card:hover {
  transform: translateY(-3px);
  border-color: var(--teal);
  box-shadow: var(--shadow-raise);
}

.ref-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--teal-bright);
  transition: background 160ms ease, color 160ms ease;
}

.ref-icon svg {
  width: 24px;
  height: 24px;
}

.ref-card strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.ref-hint {
  color: var(--muted);
  font-size: 12px;
}

.ref-card:hover .ref-icon {
  background: var(--teal);
  color: #fff;
}

.ref-stage-panel {
  overflow: hidden;
}

.ref-stage {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 72px 24px;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    #0c0e0d;
  background-size: 44px 44px;
}

.ref-stage-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 16px;
  background: rgba(22, 22, 22, 0.55);
  color: var(--teal-bright);
}

.ref-stage-icon svg {
  width: 30px;
  height: 30px;
}

.ref-stage strong {
  font-size: 17px;
  font-weight: 800;
}

.ref-stage p {
  max-width: 460px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.5;
}

.primary-button.as-link svg {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}

.at-input {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: stretch;
}

.at-input b {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: var(--panel-soft);
  color: var(--teal-bright);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
}

.at-input input {
  border-radius: 0 8px 8px 0;
  font-family: var(--font-mono);
}

.ref-at,
.ref-name {
  color: var(--teal-bright);
}

.ref-mention-block {
  display: grid;
  gap: 8px;
}

.ref-mention-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ref-mention-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Quick-Link „Referenz anlegen" direkt am Shot – erspart den Weg zur Projektseite */
.ref-create-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--teal-bright);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 140ms ease, background 140ms ease;
}

.ref-create-link:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.ref-create-link svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.ref-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ref-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px 0 5px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--teal-bright);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  transition: border-color 140ms ease, background 140ms ease;
}

.ref-chip img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: #0c0e0d;
}

.ref-chip.no-image {
  padding-left: 12px;
  color: var(--muted);
  border-style: dashed;
}

.ref-chip:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}

/* Kategorie-Symbole unter dem Prompt */

.ref-cat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ref-cat-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--teal-bright);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.ref-cat-button svg {
  width: 21px;
  height: 21px;
}

.ref-cat-button:hover:not(:disabled) {
  border-color: var(--teal);
  transform: translateY(-1px);
}

.ref-cat-button.open {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.ref-cat-button.empty {
  opacity: 0.35;
  color: var(--muted);
  cursor: default;
}

.ref-cat-count {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.ref-cat-button.empty .ref-cat-count {
  background: var(--line-strong);
}

.ref-cat-dropdown {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #121615;
  max-height: 250px;
  overflow-y: auto;
}

.ref-dd-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 6px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ref-dd-title span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ref-dd-title svg {
  width: 15px;
  height: 15px;
  color: var(--teal-bright);
}

.ref-dd-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  padding: 0 4px;
  transition: color 120ms ease;
}

.ref-dd-close:hover {
  color: var(--ink);
}

.ref-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background 120ms ease;
}

.ref-dd-item:hover {
  background: var(--teal-soft);
}

.ref-dd-item img,
.ref-dd-thumb-empty {
  width: 44px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 6px;
  object-fit: cover;
  background: #0c0e0d;
}

.ref-dd-thumb-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.ref-dd-thumb-empty svg {
  width: 14px;
  height: 14px;
}

.ref-dd-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-bright);
}

.ref-dd-item.no-image .ref-dd-name {
  color: var(--muted);
}

.ref-dd-warn {
  margin-left: auto;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 11px;
}

.ref-dd-asset {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--teal-soft);
  color: var(--teal-bright);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Version wurde mit ModelArk-Asset generiert (echter Schauspieler / Virtual Character) */
.job-asset-flag {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--teal-soft);
  color: var(--teal-bright);
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.05em;
  vertical-align: 1px;
}

/* Seedance Asset-ID an der Referenz (Virtual Character / Real-Human-Asset) */
.seedance-asset-row {
  display: grid;
  gap: 6px;
  margin: 0 14px 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.seedance-asset-row label {
  font-size: 11px;
}
.seedance-asset-row .muted-inline {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--muted);
}
.seedance-asset-line {
  display: flex;
  gap: 8px;
}
.seedance-asset-line input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12px;
}
.seedance-asset-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* ================================================================== reference detail (pool + active ref) */

.ref-detail-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(380px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.pool-panel {
  margin-top: 18px;
}

.active-ref-zone {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  margin: 14px;
  border: 2px dashed var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    #0c0e0d;
  background-size: 40px 40px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.active-ref-zone.drag-over {
  border-color: var(--teal);
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(44, 194, 173, 0.18), inset 0 0 60px rgba(44, 194, 173, 0.12);
}

.active-ref-zone img {
  width: 100%;
  height: 100%;
  /* Referenzbilder immer vollständig zeigen (nicht beschneiden) – bei
     länglichen Formaten bleibt oben/unten bzw. seitlich Freiraum. */
  object-fit: contain;
  display: block;
}

.active-ref-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(14, 130, 115, 0.92);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.active-ref-badge.small {
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  font-size: 10px;
}

.active-ref-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.active-ref-empty strong {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
}

.active-ref-empty p {
  max-width: 340px;
  font-size: 12px;
  line-height: 1.5;
}

.active-ref-hint {
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.active-ref-hint b {
  color: var(--teal-bright);
  font-family: var(--font-mono);
  font-weight: 700;
}

.ref-pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  padding: 16px;
}

.pool-card {
  display: grid;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #121615;
  cursor: grab;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.pool-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.pool-card.dragging {
  opacity: 0.55;
}

.pool-card.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(44, 194, 173, 0.25);
}

.pool-card.pending {
  cursor: default;
}

.pool-card.pending:hover {
  border-color: var(--line);
  transform: none;
}

.pool-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0c0e0d;
  overflow: hidden;
}

.pool-thumb img,
.pool-thumb video {
  width: 100%;
  height: 100%;
  /* Referenzbilder vollständig zeigen – nicht beschneiden */
  object-fit: contain;
  display: block;
}

.pool-card-body {
  display: grid;
  gap: 6px;
  padding: 10px 12px 12px;
}

.pool-card-body strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.pool-card-body span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.pool-card-body .secondary-button.mini {
  min-height: 28px;
  font-size: 11px;
}

/* Rechte Spalte der Referenz-Ansicht: aktive @Referenz + neueste Generierung
   stapeln in EINEM Grid-Element (sonst rutscht das zweite Panel nach links). */
.ref-detail-side {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}

/* Neueste Generierung – direkt unter der aktiven @Referenz */
.latest-gen-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 160px;
  margin: 14px 14px 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  background: #0c0e0d;
}
.latest-gen-stage img,
.latest-gen-stage video {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  display: block;
}
.latest-gen-body {
  display: grid;
  gap: 7px;
  padding: 12px 14px 14px;
}
.latest-gen-prompt {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.latest-gen-meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}
.latest-gen-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.latest-gen-actions .secondary-button.mini,
.latest-gen-actions .primary-button.mini {
  min-height: 30px;
  font-size: 12px;
}

/* ---------------- Projekt-Archiv ---------------- */
.heading-with-icon {
  display: flex;
  align-items: center;
  gap: 9px;
}

.heading-with-icon svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--teal);
}

/* Sicherheitsnetz: Ein Inline-SVG ohne width/height wächst auf die volle
   Containerbreite – das ist in Überschriften schon mehrfach passiert. Icons in
   Überschriften richten sich daher immer nach der Textgröße. Spezifischere
   Regeln (z. B. .heading-with-icon svg) gewinnen weiterhin. */
h1 > svg,
h2 > svg,
h3 > svg,
h4 > svg {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  vertical-align: -0.16em;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.archive-card {
  display: grid;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #121615;
  transition: border-color 160ms ease, transform 160ms ease;
}

.archive-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.archive-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0c0e0d;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.archive-thumb img,
.archive-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.archive-thumb-empty {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.archive-kind {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  backdrop-filter: blur(4px);
}

.archive-kind svg {
  width: 15px;
  height: 15px;
}

.archive-card-body {
  display: grid;
  gap: 6px;
  padding: 11px 13px 13px;
}

.archive-card-body strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.archive-origin {
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
  width: fit-content;
}

.archive-origin:hover {
  text-decoration: underline;
}

.archive-origin.muted {
  color: var(--muted);
  font-weight: 500;
}

.archive-meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.archive-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.archive-actions .secondary-button.mini {
  min-height: 28px;
  font-size: 11px;
}

/* Aktionen unter einer Version im Shot-Panel (Prompt übernehmen + Archiv) */
.job-item-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 1100px) {
  .ref-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================================== shot workspace */

.shot-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(420px, 1.4fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

/* Sequenz-Player (Rohschnitt) */

.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-rows: auto 1fr auto auto auto;
  gap: 12px;
  padding: 18px 22px 24px;
  background: rgba(5, 7, 6, 0.94);
  backdrop-filter: blur(8px);
  animation: backdropIn 180ms ease;
}

.player-top {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #f4f3ef;
}

.player-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.player-title strong {
  font-size: 15px;
}

.player-title span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.player-counter {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.player-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: transparent;
  color: #f4f3ef;
  font-size: 24px;
  line-height: 1;
  transition: border-color 130ms ease, background 130ms ease;
}

.player-close:hover {
  border-color: var(--teal-bright);
  background: rgba(79, 216, 197, 0.1);
}

.player-stage {
  min-height: 0;
  display: grid;
  place-items: center;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.player-stage img,
.player-stage video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.player-caption {
  min-height: 0;
  text-align: center;
  color: rgba(244, 243, 239, 0.9);
  font-size: 15px;
  font-style: italic;
  padding: 0 40px;
}

.player-progress {
  display: flex;
  gap: 4px;
}

.player-seg {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 150ms ease;
}

.player-seg.done {
  background: rgba(79, 216, 197, 0.5);
}

.player-seg.current {
  background: var(--teal-bright);
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.player-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: transparent;
  color: #f4f3ef;
  transition: border-color 130ms ease, background 130ms ease, transform 130ms ease;
}

.player-btn:hover {
  border-color: var(--teal-bright);
  background: rgba(79, 216, 197, 0.12);
}

.player-btn:active {
  transform: scale(0.94);
}

.player-btn svg {
  width: 22px;
  height: 22px;
}

.player-btn.primary {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #23b8a1, var(--teal-deep));
  border-color: transparent;
  color: #fff;
}

.player-btn.primary svg {
  width: 26px;
  height: 26px;
}

/* Ausgangsbilder (Bild-zu-Bild) */

.input-refs-field {
  display: grid;
  gap: 8px;
}

.input-refs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.input-refs-row:empty {
  display: none;
}

.input-ref-thumb {
  position: relative;
  width: 72px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
}

.input-ref-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.input-ref-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 12, 11, 0.8);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.input-ref-remove:hover {
  background: var(--coral);
}

.input-picker .input-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
}

.input-pick-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  background: #0c0e0d;
  transition: border-color 130ms ease;
}

.input-pick-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.input-pick-check {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 130ms ease, transform 130ms ease;
}

.input-pick-card.chosen {
  border-color: var(--teal);
}

.input-pick-card.chosen .input-pick-check {
  opacity: 1;
  transform: scale(1);
}

/* Character-Sheet-Vorlage: visueller Kachel-Picker */

.sheet-template-field {
  display: grid;
  gap: 7px;
}

.field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sheet-template-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.sheet-tpl-card {
  display: grid;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #121615;
  text-align: center;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.sheet-tpl-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.sheet-tpl-card.selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(44, 194, 173, 0.25);
}

.sheet-tpl-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #0c0e0d;
}

.sheet-tpl-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sheet-tpl-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.sheet-tpl-card.selected .sheet-tpl-label {
  color: var(--teal-bright);
}

.sheet-schema {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--panel-soft);
}

.sheet-schema-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sheet-panels {
  display: flex;
  gap: 6px;
}

.sheet-panel {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #0c0e0d;
  color: var(--teal-bright);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

/* Audio-Umschalter (Ton-Ebene) */

.audio-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #121615;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

/* Edit-Modus: gewählte Version läuft als Basis-Video (Video 1) mit */
.base-video-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(44, 194, 173, 0.45);
  border-radius: 8px;
  background: var(--teal-soft);
}
.base-video-icon svg {
  width: 16px;
  height: 16px;
  color: var(--teal-bright);
  display: block;
}
.base-video-thumb {
  flex: 0 0 auto;
  width: 74px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #0c0e0d;
  border: 1px solid var(--line-strong);
}
.base-video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Live-Manifest: was in welcher Reihenfolge an Seedance geht */
.media-manifest {
  display: grid;
  gap: 6px;
}
.media-manifest-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.media-manifest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mm-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel-soft);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
}
.mm-chip svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: var(--muted);
}
.mm-chip.video {
  border-color: rgba(44, 194, 173, 0.45);
  color: var(--teal-bright);
}
.mm-chip.video svg {
  color: var(--teal-bright);
}
.mm-chip.warn {
  border-color: rgba(233, 179, 87, 0.5);
  color: var(--amber);
  font-family: inherit;
}
.base-video-text {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}
.base-video-text b {
  color: var(--teal-bright);
}
.base-video-template {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--teal-bright);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 130ms ease;
}
.base-video-template:hover {
  border-color: var(--teal);
}

.base-video-clear {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}
.base-video-clear:hover {
  color: var(--coral);
  background: rgba(255, 119, 87, 0.12);
}

/* Live-Kostenschätzung im Generierungs-Formular */
.cost-estimate {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(44, 194, 173, 0.06);
}
.cost-estimate-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cost-estimate b {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--teal-bright);
}
.cost-estimate-note {
  color: var(--muted);
  font-size: 11px;
}

.audio-toggle-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.audio-toggle-text b {
  font-weight: 700;
}

.audio-note {
  color: var(--muted);
  font-weight: 500;
}

.audio-toggle input {
  width: auto;
  min-height: auto;
  margin: 0;
  accent-color: var(--teal);
  transform: scale(1.2);
}

/* Projekt-Style-Referenz (Konsistenz) */

.style-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(233, 179, 87, 0.35);
  border-radius: 12px;
  background: rgba(233, 179, 87, 0.08);
  max-width: 1100px;
}

.style-banner > div {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.style-banner strong {
  font-size: 14px;
  color: var(--amber);
}

.style-banner span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.style-thumb {
  flex: 0 0 auto;
  width: 64px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #0c0e0d;
}

.style-thumb img,
.style-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.secondary-button.style-active {
  border-color: rgba(233, 179, 87, 0.6);
  color: var(--amber);
  background: rgba(233, 179, 87, 0.1);
}

.style-hint {
  color: var(--amber);
  font-size: 12px;
  line-height: 1.4;
}

.style-hint b {
  font-family: var(--font-mono);
}

/* Story-Ebene (Treatment / Drehbuch / Dialog) */

.story-panel {
  margin-bottom: 18px;
  max-width: 1100px;
}

.story-editor {
  display: grid;
  gap: 10px;
  padding: 14px 18px 16px;
}

.story-editor textarea {
  min-height: 90px;
  line-height: 1.55;
}

.story-editor textarea[readonly] {
  opacity: 0.85;
  cursor: default;
}

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

.story-saved {
  color: var(--teal-bright);
  font-size: 12px;
  font-weight: 700;
}

/* Kommentare / Feedback */

.comment-panel {
  margin-top: 18px;
  max-width: 820px;
}

.comment-thread {
  display: grid;
  gap: 4px;
  padding: 8px;
  max-height: 340px;
  overflow-y: auto;
}

.comment {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: start;
  padding: 10px 10px;
  border-radius: 8px;
  transition: background 130ms ease;
}

.comment:hover {
  background: var(--panel-soft);
}

.comment-body {
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.comment-meta strong {
  font-size: 13px;
}

.comment-meta span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.comment-body p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  word-break: break-word;
}

.comment-delete {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  opacity: 0;
  transition: opacity 130ms ease, color 130ms ease, background 130ms ease;
}

.comment:hover .comment-delete {
  opacity: 1;
}

.comment-delete:hover {
  color: var(--coral);
  background: rgba(255, 119, 87, 0.1);
}

.comment-delete svg {
  width: 15px;
  height: 15px;
}

.comment-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
}

.generation-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.preview-panel {
  overflow: hidden;
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  margin: 12px 14px;
  border-radius: 12px;
  background:
    radial-gradient(120% 120% at 50% 0%, #14181a 0%, #07090a 100%);
  overflow: hidden;
  border: 1px solid #000;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 60px rgba(0, 0, 0, 0.7),
    0 8px 24px rgba(0, 0, 0, 0.5);
}
/* Regie-Monitor: dezente Vignette über dem Bild */
.preview-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
  z-index: 2;
}

.preview-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.empty-stage,
.render-stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    #0c0e0d;
  background-size: 44px 44px;
}

.render-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(44, 194, 173, 0.16);
  transform: translateX(-100%);
  animation: scan 2.4s linear infinite;
}

@keyframes scan {
  to {
    transform: translateX(100%);
  }
}

.empty-stage span,
.render-stage span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(10, 12, 11, 0.6);
  font-weight: 800;
}

/* Fehlerhafte Generierung: Badge + lesbarer Fehlertext */
.error-stage {
  padding: 22px;
}
.error-stage span {
  color: var(--coral);
  border-color: rgba(255, 119, 87, 0.45);
  background: rgba(255, 119, 87, 0.12);
}
.error-stage span svg {
  width: 15px;
  height: 15px;
  margin-right: 7px;
}
.error-stage p {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  max-width: 540px;
  color: #ecd9d1;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  white-space: pre-wrap;
}

.render-stage span svg {
  width: 15px;
  height: 15px;
  margin-right: 7px;
  animation: uploadNudge 1.1s ease-in-out infinite;
}

@keyframes uploadNudge {
  0%, 100% { transform: translateY(1px); }
  50% { transform: translateY(-2px); }
}

.preview-meta {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.7fr;
}

.preview-meta div {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.preview-meta div:last-child {
  border-right: 0;
}

.preview-meta span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preview-meta strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.progress-track {
  height: 8px;
  background: #1a201e;
  border-top: 1px solid var(--line);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal-bright));
  transition: width 220ms ease;
}

.job-list {
  display: grid;
  max-height: 640px;
  overflow-y: auto;
}

.job-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease;
}

.job-item-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 5px;
}

.job-item-thumb-wrap {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.job-item-thumb {
  width: 84px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #0c0e0d;
  border: 1px solid var(--line-strong);
}

.job-item-res {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.job-item-thumb video,
.job-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.job-item-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.job-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.fav-star {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  transition: color 130ms ease, background 130ms ease, transform 130ms ease;
}

.fav-star svg {
  width: 17px;
  height: 17px;
}

.fav-star:hover {
  color: var(--amber);
  background: rgba(233, 179, 87, 0.12);
  transform: scale(1.1);
}

.fav-star.active {
  color: var(--amber);
}

.job-item.favorite {
  box-shadow: inset -3px 0 0 var(--amber);
}

.job-item .reuse-button {
  justify-self: start;
  min-height: 26px;
  padding: 0 10px;
  font-size: 11px;
}

.job-item.selected.favorite {
  box-shadow: inset 3px 0 0 var(--teal), inset -3px 0 0 var(--amber);
}

.fav-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(233, 179, 87, 0.92);
  color: #201a0c;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.fav-badge svg {
  width: 11px;
  height: 11px;
}

.job-item span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.job-item:hover,
.job-item.selected {
  background: var(--panel-soft);
}

.job-item.selected {
  box-shadow: inset 3px 0 0 var(--teal);
}

.job-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.mini-progress {
  height: 5px;
  background: #1a201e;
  border-radius: 999px;
  overflow: hidden;
}

.mini-progress b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal-bright));
}

/* ================================================================== members & budgets */

.member-table {
  width: 100%;
  border-collapse: collapse;
}

.member-table th {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
}

.member-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: middle;
}

/* Größere Avatare in der Members-Tabelle */
.member-table td .avatar-sm {
  width: 38px;
  height: 38px;
  font-size: 14px;
}
.member-table td .meta-block strong {
  font-size: 15px;
}

.member-table tr:last-child td {
  border-bottom: 0;
}

.member-table tbody tr {
  transition: background 140ms ease;
}

.member-table tbody tr:hover {
  background: var(--panel-soft);
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.role-admin {
  background: rgba(255, 119, 87, 0.14);
  color: var(--coral);
}

.role-director {
  background: var(--teal-soft);
  color: var(--teal-bright);
}

.role-artist {
  background: rgba(233, 179, 87, 0.14);
  color: var(--amber);
}

.role-visitor {
  background: var(--panel-soft);
  color: var(--muted);
}

.project-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 2px 4px 2px 0;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-soft);
  font-size: 12px;
  font-weight: 700;
  transition: border-color 140ms ease, color 140ms ease;
}

.project-chip:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
}

.row-actions {
  text-align: right;
  white-space: nowrap;
}

.budget-cell {
  white-space: nowrap;
}

.spent-over {
  color: var(--coral);
  font-weight: 700;
}

.budget-cell input {
  display: inline-block;
  width: 130px;
  margin-right: 6px;
}

/* ================================================================== modal */

/* Großansicht (Lightbox): Bild/Video zentriert, so groß wie möglich */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  overflow: hidden; /* nichts darf je aus dem Viewport laufen */
  background: rgba(6, 8, 7, 0.93);
  backdrop-filter: blur(6px);
  animation: backdropIn 160ms ease;
}
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lightbox-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.lightbox-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.lightbox-tools .secondary-button.mini.icon-only {
  width: 32px;
  min-height: 32px;
  font-size: 18px;
  line-height: 1;
}
.lightbox-figure {
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Flexbox statt Grid: nur hier löst max-height:100% zuverlässig gegen die
   Containerhöhe auf (in einer auto-Grid-Zeile wird die Prozentangabe ignoriert
   und das Bild läuft in Originalgröße aus dem Bild). Die vh-Angabe ist der
   zweite Riegel, falls die Höhe doch mal unbestimmt ist. */
.lightbox-figure img,
.lightbox-figure video {
  max-width: 100%;
  max-height: min(100%, calc(100dvh - 80px));
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

/* Anfassbare Vorschaubilder */
.is-zoomable {
  cursor: zoom-in;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 7, 6, 0.65);
  backdrop-filter: blur(5px);
  animation: backdropIn 180ms ease;
}

@keyframes backdropIn {
  from {
    opacity: 0;
  }
}

.modal-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(420px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 30px 28px 24px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--panel);
  text-align: center;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
  animation: modalIn 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* Der große Editor bringt sein eigenes internes Scrolling mit */
.modal-card.big-editor {
  overflow: hidden;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
}

.modal-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 119, 87, 0.13);
  color: var(--coral);
}

.modal-icon svg {
  width: 24px;
  height: 24px;
}

.modal-card h3 {
  font-size: 17px;
}

.modal-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.modal-card .primary-button {
  margin-top: 8px;
  min-width: 140px;
}

/* Kursiver Hinweis unter dem Prompt: was automatisch ergänzt wird */
.prompt-auto-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.45;
}

/* Prompt-Feld: „Groß"-Button in der Kopfzeile */
.prompt-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.prompt-expand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.prompt-expand:hover {
  color: var(--teal);
  border-color: var(--teal);
}
.prompt-expand svg {
  width: 13px;
  height: 13px;
}

/* Prompt mit Live-Highlight: Overlay hinter dem Textarea rendert @Referenzen farbig.
   Beide Ebenen müssen pixelgenau dieselbe Box/Schrift haben. */
.prompt-hl-wrap {
  position: relative;
}
.prompt-hl-wrap textarea,
.prompt-hl {
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  padding: 12px;
  border-width: 1px;
  border-style: solid;
  border-radius: 8px;
  box-sizing: border-box;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
}
.prompt-hl {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  border-color: transparent;
  background: #121615;
  color: var(--ink);
}
.prompt-hl-wrap textarea {
  position: relative;
  z-index: 1;
  display: block; /* inline-block hätte eine Grundlinien-Lücke -> Overlay-Versatz */
  width: 100%;
  min-height: 110px;
  background: transparent;
  color: transparent;
  caret-color: var(--ink);
  border-color: var(--line-strong);
  /* Kein internes Scrollen: das Feld wächst mit dem Inhalt (JS-Autosize).
     Eine Scrollbar würde die Umbruchbreite gegenüber dem Overlay verschieben
     und Auswahl/Text optisch versetzen. */
  overflow: hidden;
  resize: none;
}
/* aufgelöste Referenz = Grünton, unbekannte @Erwähnung = Amber-Hinweis */
.prompt-hl .mention-live {
  color: var(--teal-bright);
  font-weight: 700;
}
.prompt-hl .mention-unknown {
  color: var(--amber);
}

/* Großer, zentrierter Prompt-Editor */
.modal-card.big-editor {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-items: stretch;
  gap: 0;
  padding: 0;
  text-align: left;
  width: min(920px, 94vw);
  height: min(78vh, 760px);
  overflow: hidden;
}
.big-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.big-editor-head h3 {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.big-editor-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s;
}
.big-editor-close:hover {
  color: var(--ink);
}
.big-editor-text {
  flex: 1;
  width: 100%;
  resize: none;
  border: none;
  outline: none;
  background: var(--panel);
  color: var(--ink);
  padding: 20px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
}
.big-editor-text::placeholder {
  color: var(--muted);
}
.big-editor-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}
.big-editor-hint {
  font-size: 12px;
  color: var(--muted);
}
.big-editor-count {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}
.big-editor-actions {
  display: flex;
  gap: 8px;
}

.label-with-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-dot {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: color 130ms ease, transform 130ms ease;
}

.info-dot svg {
  width: 15px;
  height: 15px;
}

.info-dot:hover {
  color: var(--teal-bright);
  transform: scale(1.15);
}

.modal-icon.info {
  background: var(--teal-soft);
  color: var(--teal-bright);
}

.modal-card.info-modal {
  width: min(540px, 100%);
}

.info-body {
  display: grid;
  gap: 10px;
  text-align: left;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.info-body b {
  color: var(--ink);
}

.info-body ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.info-body li::marker {
  color: var(--teal);
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.modal-actions .primary-button {
  margin-top: 0;
  min-width: 0;
}

.modal-card.form-modal {
  justify-items: stretch;
  text-align: left;
}

.modal-message {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.modal-form {
  padding: 6px 0 0;
}

.modal-form .modal-actions {
  justify-content: flex-end;
}

/* ================================================================== responsive */

@media (max-width: 1240px) {
  .shot-workspace {
    grid-template-columns: minmax(300px, 1fr) minmax(380px, 1.4fr);
  }

  .shot-workspace aside {
    grid-column: 1 / -1;
  }

  .project-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .ws-main {
    padding: calc(var(--header-height) + 20px) 16px 40px calc(var(--sidebar-collapsed) + 14px);
  }

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

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

  .ws-profile-info {
    display: none;
  }

  .ws-title {
    font-size: 14px;
  }

  .member-table th:nth-child(3),
  .member-table td:nth-child(3) {
    display: none;
  }
}

/* ============================ Timeline / Schnitt ============================ */
.timeline-panel {
  margin-top: 18px;
}
.timeline-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tl-status {
  font-size: 12px;
  color: var(--amber);
  min-width: 0;
  white-space: nowrap;
}
.secondary-button.mini.is-locked {
  opacity: 0.6;
}
.timeline-head-actions button[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.timeline-loading {
  padding: 22px;
  color: var(--muted);
  font-size: 13px;
}
.timeline-body {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 0;
}
.timeline-library {
  border-right: 1px solid var(--line);
  padding: 14px 14px 16px;
  min-width: 0;
}
.timeline-track-col {
  padding: 14px 16px 18px;
  min-width: 0;
}
.tl-sub {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.tl-sub span {
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

/* Bibliothek */
.tl-lib-scroll {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}
.tl-lib-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.tl-lib-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 7px;
}
.tl-lib-head strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-lib-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--teal);
  flex-shrink: 0;
}
.tl-lib-gens {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tl-gen {
  position: relative;
  width: 84px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: var(--black);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.tl-gen:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}
.tl-gen.is-fav {
  border-color: var(--amber);
}
.tl-gen-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--panel-soft);
}
.tl-gen-thumb video,
.tl-gen-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tl-gen-star {
  position: absolute;
  top: 4px;
  left: 4px;
  color: var(--amber);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}
.tl-gen-star svg {
  width: 13px;
  height: 13px;
}
.tl-gen-type {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.66);
  color: var(--ink);
}
.tl-gen-add {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: var(--black);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s;
}
.tl-gen:hover .tl-gen-add {
  opacity: 1;
}

/* Schnitt-Spur */
.timeline-track {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 96px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.timeline-track.tl-drop-active {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.tl-track-empty {
  margin: auto;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}
.tl-clip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  cursor: grab;
}
.tl-clip.dragging {
  opacity: 0.5;
  border-color: var(--teal);
}
.tl-clip-idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.tl-clip-thumb {
  position: relative;
  width: 96px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: var(--black);
  flex-shrink: 0;
}
.tl-clip-thumb video,
.tl-clip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tl-clip-badge {
  position: absolute;
  bottom: 3px;
  left: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.66);
  color: var(--ink);
}
.tl-clip-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tl-clip-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--teal);
}
.tl-clip-meta strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-trim {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
  flex-wrap: wrap;
}
.tl-trim label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}
.tl-trim input {
  width: 58px;
  padding: 3px 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--black);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
}
.tl-len {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal-bright);
}
.tl-clip-remove {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.tl-clip-remove:hover {
  color: var(--coral);
  border-color: var(--coral);
}
.tl-clip-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.tl-clip-split {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.15s, border-color 0.15s;
}
.tl-clip-split:hover {
  color: var(--teal);
  border-color: var(--teal);
}
.tl-clip-split svg {
  width: 15px;
  height: 15px;
}

/* Ziehbare Trim-/Dauer-Leiste */
.tl-bar {
  margin: 4px 0 2px;
}
.tl-bar-track {
  position: relative;
  height: 8px;
  margin: 8px 9px 6px;
  background: var(--black);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.tl-bar-range {
  position: absolute;
  top: -1px;
  bottom: -1px;
  background: var(--teal-soft);
  border-top: 1px solid var(--teal);
  border-bottom: 1px solid var(--teal);
  border-radius: 999px;
  pointer-events: none;
}
.tl-h {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 18px;
  transform: translate(-50%, -50%);
  background: var(--teal);
  border: 1px solid var(--teal-bright);
  border-radius: 4px;
  cursor: ew-resize;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  touch-action: none;
  z-index: 2;
}
.tl-h:hover {
  background: var(--teal-bright);
}
.tl-clip.tl-handle-active {
  cursor: ew-resize;
}
.tl-clip.tl-handle-active .tl-h {
  background: var(--teal-bright);
}

@media (max-width: 860px) {
  .timeline-body {
    grid-template-columns: 1fr;
  }
  .timeline-library {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .tl-lib-scroll {
    max-height: 240px;
  }
}

/* ==================================================================
   Phase 3 – Motion & Micro-Interactions
   ================================================================== */

/* Schlanker Ladebalken beim Seitenwechsel */
#navProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 200;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal-bright));
  box-shadow: 0 0 10px var(--teal);
  opacity: 0;
  pointer-events: none;
}
#navProgress.active {
  width: 80%;
  opacity: 1;
  transition: width 700ms cubic-bezier(0.1, 0.7, 0.1, 1), opacity 120ms ease;
}
#navProgress.done {
  width: 100%;
  opacity: 0;
  transition: width 180ms ease, opacity 260ms ease 140ms;
}

/* Shimmer auf laufenden Fortschrittsbalken */
.mini-progress b {
  position: relative;
  overflow: hidden;
}
.mini-progress b::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-100%);
  animation: barShimmer 1.4s ease-in-out infinite;
}

@keyframes barShimmer {
  to { transform: translateX(100%); }
}

/* Karten-Eintritt (Poster-Wall, Grids) – gestaffelt */
@keyframes cardRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.poster-grid .poster-card {
  animation: cardRise 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--stagger, 0) * 45ms);
}

/* Einheitlicher Press-State */
.primary-button:active,
.secondary-button:active,
.poster-card:active,
.pool-bubble:active {
  transform: translateY(1px) scale(0.985);
}

/* Aufleuchten, wenn eine Generierung fertig wird */
@keyframes finishPulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 216, 197, 0); }
  30% { box-shadow: 0 0 0 3px rgba(79, 216, 197, 0.5); }
  100% { box-shadow: 0 0 0 0 rgba(79, 216, 197, 0); }
}
.just-finished {
  animation: finishPulse 1.5s ease-out 1;
  border-color: var(--teal) !important;
}

/* Empty-States mit mehr Herz */
.empty-panel {
  justify-items: center;
  text-align: center;
  padding: 48px 28px;
  gap: 12px;
}
.empty-panel h2 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
}
.empty-panel .empty-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-bright);
  margin-bottom: 4px;
}
.empty-panel .empty-icon svg {
  width: 28px;
  height: 28px;
}

@media (prefers-reduced-motion: reduce) {
  #navProgress { display: none; }
  .mini-progress b::after,
  .poster-grid .poster-card { animation: none; }
  .primary-button:active,
  .secondary-button:active,
  .poster-card:active,
  .pool-bubble:active { transform: none; }
  .just-finished { animation: none; }
}

/* ==================================================================
   Pro-Timeline: horizontale Cut-Timeline (volle Breite)
   ================================================================== */

/* Auf breiten Screens bricht die Timeline aus der Content-Maxbreite aus */
@media (min-width: 1700px) {
  .timeline-panel {
    width: calc(100vw - var(--sidebar-collapsed) - 56px);
  }
}

.tl-pro {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 16px 16px;
}

/* Vorschau-Monitor: zeigt den Frame an der Playhead-Position */
.tl-preview-wrap {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.tl-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Keine feste Höhe: der Monitor nimmt die Form (das Seitenverhältnis)
     des aktuellen Clips an – nichts wird beschnitten. */
  min-height: 120px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    #0c0e0d;
  background-size: 40px 40px;
}
.tl-preview video,
.tl-preview img {
  /* Breite/Höhe folgen dem Original-Seitenverhältnis; nur Obergrenzen begrenzen
     die Größe. width/height:auto verhindert das AR-Brechen bei zwei Max-Grenzen. */
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: clamp(150px, 24vw, 300px);
  object-fit: contain;
  display: block;
}
.tl-preview-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 0 16px;
  text-align: center;
}
.tl-preview-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 13px;
  border-top: 1px solid var(--line-strong);
  background: var(--panel-soft);
}

/* Transport: Play/Pause direkt im Monitor */
.tl-transport {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--black);
  color: var(--teal-bright);
  cursor: pointer;
  transition: border-color 130ms ease, background 130ms ease;
}
.tl-transport:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.tl-transport svg {
  width: 14px;
  height: 14px;
}

.tl-preview {
  cursor: pointer;
}
.tl-preview-wrap:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
  outline: none;
}
.tl-preview-info {
  flex: 1;
  min-width: 0;
}
.tl-preview-info {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-preview-tc {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal-bright);
}

/* Bibliothek als horizontale Ablage über der Spur */
.tl-bin {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.tl-bin .tl-lib-shot {
  flex: 0 0 auto;
  min-width: 120px;
}

/* Werkzeugleiste */
.tl-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.tl-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tl-zoom {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
}
.tl-zoom-btn {
  min-width: 34px;
  padding: 5px 10px;
  background: var(--panel-soft);
  border: none;
  border-right: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.tl-zoom-btn:last-child { border-right: none; }
.tl-zoom-btn:hover { background: var(--teal-soft); color: var(--teal-bright); }
.tl-tc {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal-bright);
  background: var(--black);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 5px 10px;
  min-width: 118px;
  text-align: center;
}

/* Bühne + scrollbare Leinwand */
.tl-stage {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--black);
  outline: none;
}
.tl-stage:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.tl-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}
.tl-canvas {
  position: relative;
  min-height: 128px;
}

/* Zeit-Lineal */
.tl-ruler {
  position: relative;
  height: 28px;
  border-bottom: 1px solid var(--line);
  cursor: col-resize;
}
.tl-tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 7px;
  background: var(--line-strong);
}
.tl-tick.major {
  height: 12px;
  background: var(--muted);
}
.tl-tick.major i {
  position: absolute;
  bottom: 13px;
  left: 3px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

/* Clip-Spur */
.tl-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 14px 60px 16px 40px;
  min-height: 100px;
}
.tl-row.tl-drop-active {
  background: var(--teal-soft);
}
.tl-block {
  position: relative;
  flex: 0 0 auto;
  height: 68px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  cursor: grab;
  background: var(--panel-soft);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.tl-block.is-video { border-top: 2px solid var(--teal); }
.tl-block.is-image { border-top: 2px solid var(--amber); }
.tl-block.selected {
  border-color: var(--teal-bright);
  box-shadow: 0 0 0 2px var(--teal-soft), 0 4px 14px rgba(0, 0, 0, 0.5);
}
.tl-block.dragging { opacity: 0.55; }
.tl-block.trimming { cursor: ew-resize; }
.tl-block-thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.85;
}
.tl-block-label {
  position: absolute;
  left: 5px;
  bottom: 4px;
  right: 5px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  overflow: hidden;
  white-space: nowrap;
}
.tl-block-label i { font-style: normal; color: var(--teal-bright); }

/* Trim-Kanten */
.tl-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 9px;
  cursor: ew-resize;
  z-index: 3;
  background: linear-gradient(to bottom, transparent 20%, rgba(255, 255, 255, 0.55) 20%, rgba(255, 255, 255, 0.55) 80%, transparent 80%);
  background-size: 2px 100%;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: opacity 120ms ease;
  touch-action: none;
}
.tl-edge.left { left: 0; }
.tl-edge.right { right: 0; }
.tl-block:hover .tl-edge,
.tl-block.selected .tl-edge { opacity: 1; }

/* Playhead */
.tl-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--coral);
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(255, 119, 87, 0.6);
}
.tl-playhead-cap {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--coral);
}

/* Inspector-Zeile */
.tl-inspector {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  font-size: 13px;
}
.tl-insp-hint { color: var(--muted); font-size: 12px; }
.tl-insp-tag { font-family: var(--font-mono); font-size: 10px; color: var(--teal); }
.tl-insp-name { font-size: 13px; }
.tl-inspector label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.tl-inspector input {
  width: 64px;
  padding: 4px 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--black);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
}

/* ---------------- Foto-Look-Modal ---------------- */
.modal-card.photolook-modal {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-items: stretch;
  gap: 0;
  padding: 0;
  text-align: left;
  width: min(520px, 94vw);
  overflow: hidden;
}
.photolook-body {
  padding: 16px 20px;
  display: grid;
  gap: 14px;
  /* Der Erklärteil kann lang werden – Kopf und Fußzeile bleiben sichtbar.
     overflow-x explizit hidden, sonst erzwingt overflow-y:auto eine
     zweite (leere) Scrollleiste am unteren Rand. */
  max-height: calc(100dvh - 220px);
  overflow: hidden auto;
}
.pl-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pl-preset {
  flex: 1 1 auto;
  min-width: 100px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.pl-preset:hover { border-color: var(--teal); }
.pl-preset.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-bright);
}
.pl-slider {
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.pl-slider span { display: flex; justify-content: space-between; color: var(--muted); }
.pl-slider b { color: var(--teal-bright); font-family: var(--font-mono); }
.pl-slider input[type="range"] { width: 100%; accent-color: var(--teal); }
.pl-hint {
  margin: 0;
  font-size: 12px;
  color: var(--amber);
}
.pl-scale {
  display: flex;
  justify-content: space-between;
  margin-top: -2px;
  color: var(--muted);
  font-size: 11px;
  opacity: 0.8;
}
.pl-breakdown {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.pl-breakdown-title {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.pl-row {
  display: grid;
  grid-template-columns: 1fr 90px auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.pl-row-name {
  display: grid;
  gap: 2px;
}
.pl-row-name em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  opacity: 0.85;
}
.pl-row-bar {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.pl-row-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--teal);
  transition: width 120ms ease;
}
.pl-row-val {
  min-width: 52px;
  text-align: right;
  color: var(--teal-bright);
  font-family: var(--font-mono);
  font-size: 12px;
}
.pl-verdict {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.pl-tech {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
}
.pl-tech > summary {
  cursor: pointer;
  color: var(--muted);
  list-style: none;
}
.pl-tech > summary::-webkit-details-marker { display: none; }
.pl-tech > summary::before {
  content: "▸ ";
  color: var(--teal);
}
.pl-tech[open] > summary::before { content: "▾ "; }
.pl-tech p { margin: 10px 0 6px; color: var(--muted); }
.pl-tech code {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--teal-bright);
  font-family: var(--font-mono);
  font-size: 11.5px;
  overflow-x: auto;
  white-space: pre;
}
.pl-tech ul {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.5;
}
.pl-tech li code {
  display: inline;
  padding: 1px 4px;
  white-space: normal;
}
.pl-tech li b { color: var(--ink); font-family: var(--font-mono); font-weight: 600; }
