/* AutoClipper – Oberfläche */

/* ------------------------------------------------------------------ Schriften (selbst gehostet, OFL) */
@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Azeret Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/azeret-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Azeret Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/azeret-mono-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------ Tokens */
:root {
  --sans: "Archivo Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Azeret Mono Variable", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r-1: 4px;
  --r-2: 6px;
  --r-3: 8px;
  --zeile: 56px;
  --dauer: 160ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Monitore bleiben in beiden Designs dunkel */
  --monitor: #08090b;
  --monitor-rand: #262a31;
  --umd-grund: #0b0c0e;
  --umd-text: #eceae4;
  --umd-text-2: #a9a7a0;
  --umd-band: #1c1f24;
  --fb-1: #5d5d5a;
  --fb-2: #67623a;
  --fb-3: #39605f;
  --fb-4: #3a5d3c;
  --fb-5: #5c3c5b;
  --fb-6: #5f3a37;
  --fb-7: #393c62;
  --fb-schwarz: #121315;
}

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17181b;
  --flaeche: #1d1e22;
  --flaeche-2: #232428;
  --flaeche-3: #2b2c31;
  --linie: #313237;
  --linie-stark: #43454b;
  --text: #eceae4;
  --text-2: #b4b2ab;
  --text-3: #9b9993;
  --wahl-grund: #eceae4;
  --wahl-text: #17181b;
  --tally: #e5332a;
  --auf-tally: #17181b;
  --gruen: #2db45a;
  --amber: #f0a500;
  --fokus: #eceae4;
  --auswahl: #44464d;
  --spur-raster: #2a2b30;
  --spur-signal: #55575d;
  --spur-signal-stark: #aaa9a5;
  --spur-heat: #75767b;
  --spur-band: rgb(236 234 228 / 0.035);
  --spur-band-hover: rgb(236 234 228 / 0.1);
  --schatten: 0 8px 24px rgb(0 0 0 / 0.45);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f2ef;
  --flaeche: #ffffff;
  --flaeche-2: #f8f7f4;
  --flaeche-3: #ebe9e4;
  --linie: #dad8d2;
  --linie-stark: #c3c0b8;
  --text: #141518;
  --text-2: #4a4c51;
  --text-3: #66686d;
  --wahl-grund: #141518;
  --wahl-text: #ffffff;
  --tally: #c8221a;
  --auf-tally: #ffffff;
  --gruen: #1b7a3b;
  --amber: #8f5c00;
  --fokus: #141518;
  --auswahl: #d6d4ce;
  --spur-raster: #e4e2dc;
  --spur-signal: #b9bcc2;
  --spur-signal-stark: #3d4048;
  --spur-heat: #8e9198;
  --spur-band: rgb(20 21 24 / 0.035);
  --spur-band-hover: rgb(20 21 24 / 0.09);
  --schatten: 0 8px 24px rgb(20 21 24 / 0.12);
}

/* ------------------------------------------------------------------ Grundlagen */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--linie-stark) var(--bg);
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  font-optical-sizing: auto;
  font-variant-numeric: tabular-nums;
  font-kerning: normal;
  caret-color: var(--text);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--auswahl);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--linie-stark);
  border: 3px solid var(--bg);
  border-radius: 6px;
}

:focus-visible {
  outline: 2px solid var(--fokus);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h2,
h3 {
  text-wrap: balance;
}

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums slashed-zero;
  font-feature-settings: "tnum" 1, "zero" 1;
  letter-spacing: 0;
}

.leise {
  color: var(--text-3);
}

/* Zähler, Größen, Prozente, Datumsangaben: Archivo mit tabellarischen Ziffern (Azeret nur für Timecodes/Bänder) */
.zahl {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.nur-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprung {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--wahl-grund);
  color: var(--wahl-text);
  border-radius: var(--r-2);
  font-weight: 600;
}
.sprung:focus {
  top: 8px;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ------------------------------------------------------------------ Knöpfe */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--linie-stark);
  border-radius: var(--r-2);
  background: var(--flaeche-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 560;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dauer) var(--ease), border-color var(--dauer) var(--ease);
}
.knopf:hover {
  background: var(--flaeche-3);
  border-color: var(--text-3);
}
.knopf:disabled {
  opacity: 0.55;
  cursor: progress;
}
.knopf-leise {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.knopf-leise:hover {
  background: var(--flaeche-2);
  border-color: var(--linie);
  color: var(--text);
}
/* „Alle Sitzungen abmelden": dezent neben dem Abmelden-Knopf; auf schmalen Schirmen der Kurztext */
#logout-alle {
  color: var(--text-3);
  font-size: 12px;
  font-stretch: 85%;
  white-space: nowrap;
}
#logout-alle:hover {
  color: var(--text);
}
.nur-schmal {
  display: none;
}
.knopf-primaer {
  background: var(--wahl-grund);
  border-color: var(--wahl-grund);
  color: var(--wahl-text);
}
.knopf-primaer:hover {
  background: var(--text-2);
  border-color: var(--text-2);
}
.knopf-klein {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  gap: 6px;
}
.knopf-klein .icon {
  width: 15px;
  height: 15px;
}
.knopf-icon {
  width: 36px;
  padding: 0;
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.knopf-icon:hover {
  color: var(--text);
}
.knopf.ist-scharf {
  border-color: var(--amber);
  color: var(--amber);
}
.knopf.ist-kopiert {
  border-color: var(--gruen);
  color: var(--gruen);
}

/* ------------------------------------------------------------------ UMD-Chips und Tags */
.umd {
  display: inline-flex;
  align-items: stretch;
  height: 26px;
  border: 1px solid var(--linie-stark);
  border-radius: var(--r-1);
  overflow: hidden;
  font-stretch: 75%;
  font-size: 12px;
  font-weight: 620;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.umd-name,
.umd-wert {
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
}
.umd-name {
  background: var(--flaeche-3);
  color: var(--text-2);
}
.umd-wert {
  background: var(--flaeche);
  text-transform: none;
  letter-spacing: 0;
}

.umd-quelle {
  align-items: center;
  padding: 0 8px;
  background: var(--flaeche-3);
  color: var(--text-2);
}
.umd-quelle[data-quelle="leer"] {
  color: var(--text-3);
  background: transparent;
}
.umd-quelle[data-quelle="youtube"],
.umd-quelle[data-quelle="twitch"],
.umd-quelle[data-quelle="kick"],
.umd-quelle[data-quelle="lokal"],
.umd-quelle[data-quelle="web"] {
  color: var(--text);
  border-color: var(--text-3);
}
.umd-quelle[data-quelle="warnung"],
.umd-quelle[data-quelle="unbekannt"] {
  color: var(--amber);
  border-color: var(--amber);
  background: transparent;
}
.umd-klein {
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
}

.tally {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border: 1px solid currentColor;
  border-radius: var(--r-1);
  font-size: 11px;
  font-weight: 650;
  font-stretch: 75%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tally-laeuft {
  color: var(--tally);
}
.tally-wartet {
  color: var(--text-2);
  border-color: var(--linie-stark);
}
.tally-fertig {
  color: var(--gruen);
}
.tally-fehler {
  color: var(--amber);
}
.tally-abgebrochen {
  color: var(--text-3);
  border-color: var(--linie-stark);
}

.quelle-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-1);
  border: 1px solid currentColor;
  font-size: 11px;
  font-weight: 650;
  font-stretch: 75%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.quelle-tag.ist-ki {
  color: var(--gruen);
}
.quelle-tag.ist-heuristik {
  color: var(--amber);
}

/* ------------------------------------------------------------------ Kopfzeile */
.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid var(--linie);
  background: var(--bg);
}

.wortmarke {
  font-size: 19px;
  font-weight: 760;
  font-stretch: 125%;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
}

.kopf-leiste {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.ki-chip {
  position: relative;
  padding: 0;
  background: transparent;
  cursor: pointer;
  anchor-name: --ki;
}
.ki-chip[data-modus="ki"] .umd-wert {
  color: var(--gruen);
}
.ki-chip[data-modus="heuristik"] {
  border-color: var(--amber);
}
.ki-chip[data-modus="heuristik"] .umd-wert {
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.ki-chip .umd-wert {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-stretch: 100%;
  font-size: 12px;
  font-weight: 500;
}
.ki-chip[data-modus="heuristik"] .umd-wert {
  font-family: var(--sans);
  font-stretch: 75%;
  font-size: 12px;
  font-weight: 650;
}

.hinweis-pop {
  position: fixed;
  inset: auto;
  top: 58px;
  right: 16px;
  top: anchor(bottom);
  left: anchor(left);
  position-anchor: --ki;
  margin: 8px 0 0;
  width: min(340px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--linie-stark);
  border-radius: var(--r-3);
  background: var(--flaeche-3);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.kopf-wert {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.kopf-name {
  color: var(--text-3);
  font-size: 12px;
  font-stretch: 85%;
}
.kopf-wert .mono,
.kopf-wert .zahl {
  font-size: 13px;
}

/* ------------------------------------------------------------------ Einspielzeile */
.einspiel {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--linie);
  background: var(--flaeche);
}

.einspielzeile {
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--zeile);
  padding: 5px;
  border: 1px solid var(--linie-stark);
  border-radius: var(--r-3);
  background: var(--bg);
  overflow: hidden;
  transition: border-color var(--dauer) var(--ease);
}
.einspielzeile:focus-within {
  border-color: var(--text-2);
}
.einspielzeile.hat-fehler {
  border-color: var(--amber);
}
.einspielzeile .umd-quelle {
  margin-left: 6px;
  min-width: 76px;
  justify-content: center;
  flex: none;
}

#url {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  background: transparent;
  font-size: 15px;
  outline: none;
}
#url::placeholder {
  color: var(--text-3);
}

.take {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  min-width: 132px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r-2);
  background: var(--wahl-grund);
  color: var(--wahl-text);
  font-size: 15px;
  font-weight: 760;
  font-stretch: 112%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.take:hover {
  background: var(--text-2);
}
.take:focus-visible {
  outline-offset: 2px;
}
.take.schnitt,
.take.schnitt:hover {
  background: var(--tally);
  color: var(--auf-tally);
}
.take:disabled {
  cursor: progress;
}

.zeilenfehler {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 520;
}

.optionen {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 24px;
  margin-top: 14px;
}

.gruppe {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.gruppe legend {
  float: left;
  margin-right: 10px;
  padding: 0;
  color: var(--text-3);
  font-size: 12px;
  font-stretch: 85%;
  line-height: 32px;
}

.segmente {
  display: inline-flex;
  gap: 3px;
}
.segment {
  position: relative;
  display: inline-flex;
}
.segment input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.segment span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--linie);
  border-radius: var(--r-1);
  background: var(--bg);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 540;
  user-select: none;
}
.segment-zahl span {
  min-width: 32px;
  padding: 0 8px;
  font-size: 12px;
}
.segment:hover span {
  background: var(--flaeche-3);
  color: var(--text);
}
.segment:hover span {
  border-color: var(--linie-stark);
}
.segment input:checked + span {
  border-color: var(--text-2);
  background: var(--flaeche-3);
  color: var(--text);
  font-weight: 650;
  box-shadow: inset 0 -2px 0 var(--text);
}
.segment input:focus-visible + span {
  outline: 2px solid var(--fokus);
  outline-offset: 1px;
}

.laenge {
  display: flex;
  align-items: center;
  gap: 6px;
}
.feld-klein input {
  width: 58px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--linie-stark);
  border-radius: var(--r-2);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  text-align: right;
}
.feld-klein input:focus {
  border-color: var(--text-2);
  outline: none;
}
.feld-klein input:focus-visible {
  outline: 2px solid var(--fokus);
  outline-offset: 1px;
}
.bis,
.einheit {
  color: var(--text-3);
}

.erweitert-knopf {
  height: 32px;
  min-height: 32px;
}
.erweitert-knopf .icon-pfeil {
  width: 15px;
  height: 15px;
  transition: transform var(--dauer) var(--ease);
}
.erweitert-knopf[aria-expanded="true"] {
  color: var(--text);
  background: var(--flaeche-2);
  border-color: var(--linie);
}
.erweitert-knopf[aria-expanded="true"] .icon-pfeil {
  transform: rotate(180deg);
}

.erweitert {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 260px)) auto;
  align-items: end;
  gap: 12px 20px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--linie);
}
.feld {
  display: grid;
  gap: 6px;
}
.feld-name {
  color: var(--text-3);
  font-size: 12px;
  font-stretch: 85%;
}
select,
.login input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--linie-stark);
  border-radius: var(--r-2);
  background: var(--bg);
  font-size: 13px;
}
select:focus,
.login input:focus {
  border-color: var(--text-2);
  outline: none;
}
select:focus-visible,
.login input:focus-visible {
  outline: 2px solid var(--fokus);
  outline-offset: 1px;
}
select option {
  background: var(--flaeche-2);
  color: var(--text);
}

.schalter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
}
.schalter input {
  appearance: none;
  position: relative;
  width: 32px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--linie-stark);
  border-radius: 9px;
  background: var(--flaeche-3);
  cursor: pointer;
  transition: background-color var(--dauer) var(--ease);
}
.schalter input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-3);
  transition: transform var(--dauer) var(--ease);
}
.schalter input:checked {
  background: var(--wahl-grund);
  border-color: var(--wahl-grund);
}
.schalter input:checked::after {
  background: var(--wahl-text);
  transform: translateX(14px);
}
.erweitert .schalter + .schalter {
  grid-column: 4;
}
.erweitert .schalter:first-of-type {
  grid-column: 4;
  grid-row: 1;
}

/* ------------------------------------------------------------------ Netzhinweis */
.netz {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 20px;
  border-bottom: 1px solid var(--linie);
  background: var(--flaeche-2);
  color: var(--amber);
  font-size: 13px;
}

/* ------------------------------------------------------------------ Arbeitsfläche */
.arbeit {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  align-items: start;
}

.ablauf {
  padding: 18px 16px 32px 20px;
  border-right: 1px solid var(--linie);
  min-height: calc(100vh - 200px);
}

.spalten-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.spalten-kopf h2 {
  font-size: 15px;
  font-weight: 680;
  font-stretch: 100%;
}
.spalten-kopf .mono {
  font-size: 12px;
}

.jobliste {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.job {
  display: grid;
  grid-template-columns: 38px 64px minmax(0, 1fr);
  grid-template-areas:
    "band thumb text"
    "band schritte schritte"
    "band zeile zeile";
  gap: 6px 10px;
  width: 100%;
  padding: 10px 10px 10px 8px;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.job:hover {
  background: var(--flaeche);
  border-color: var(--linie);
}
.job[aria-current="true"] {
  background: var(--flaeche-2);
  border-color: var(--linie-stark);
}
.job-band {
  grid-area: band;
  padding-top: 2px;
  color: var(--text-3);
  font-size: 12px;
}
.job[aria-current="true"] .job-band {
  color: var(--text);
}
.job-thumb {
  grid-area: thumb;
  width: 64px;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-1);
  background: var(--monitor);
  border: 1px solid var(--linie);
  overflow: hidden;
}
.job-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.job-text {
  grid-area: text;
  display: grid;
  gap: 5px;
  min-width: 0;
}
.job-titel {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}
.job-proz {
  color: var(--tally);
}
.job .schritte {
  grid-area: schritte;
}
.job-zeile {
  grid-area: zeile;
  overflow: hidden;
  color: var(--text-3);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job.ist-laeuft .job-zeile {
  color: var(--text-2);
}
/* Sendeablauf: nur die Ursache, eine Zeile, am Ende sauber gekürzt (volle Meldung im Tooltip und in der Regie) */
.job-zeile.ist-fehlertext {
  color: var(--amber);
}

.ablauf-leer {
  padding: 12px 8px;
  color: var(--text-3);
  font-size: 13px;
}

/* 7-Segment-Fortschritt */
.schritte {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.schritt {
  position: relative;
  height: 4px;
  border-radius: 1px;
  background: var(--linie);
}
.schritt-name {
  display: none;
}
.schritt.ist-fertig {
  background: var(--text-3);
}
.job.ist-fertig .schritt,
.schritte .schritt.ist-fertig:only-child {
  background: color-mix(in srgb, var(--gruen) 70%, var(--bg));
}
.schritt.ist-aktuell {
  background: var(--tally);
}
.schritt.ist-fehler {
  background: var(--amber);
}
.schritt.ist-gestoppt {
  background: var(--text-2);
}

.schritte-gross {
  gap: 4px;
}
.schritte-gross .schritt {
  height: auto;
  padding-top: 12px;
  background: none;
  border-radius: 0;
}
.schritte-gross .schritt::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--linie);
}
.schritte-gross .schritt-name {
  display: block;
  color: var(--text-3);
  font-size: 11.5px;
  font-stretch: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.schritte-gross .schritt.ist-fertig::before {
  background: var(--text-3);
}
.schritte-gross .schritt.ist-aktuell::before {
  background: var(--tally);
}
.schritte-gross .schritt.ist-aktuell .schritt-name {
  color: var(--text);
  font-weight: 600;
}
.schritte-gross .schritt.ist-fehler::before {
  background: var(--amber);
}
.schritte-gross .schritt.ist-fehler .schritt-name {
  color: var(--amber);
}
.schritte-gross .schritt.ist-gestoppt::before {
  background: var(--text-2);
}

/* ------------------------------------------------------------------ Regie */
.regie {
  min-width: 0;
  padding: 18px 20px 40px;
  outline: none;
}
.regie-job {
  display: grid;
  gap: 16px;
}

.regie-kopf {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "zurueck zurueck"
    "titel aktionen"
    "meta aktionen";
  gap: 6px 20px;
  align-items: start;
}
.regie-kopf .zurueck {
  grid-area: zurueck;
  justify-self: start;
  margin: -4px 0 4px -8px;
}
.regie-titelzeile {
  grid-area: titel;
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.regie-titelzeile .band {
  color: var(--text-3);
  font-size: 14px;
}
.regie-titelzeile h2 {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 22px;
  font-weight: 680;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.regie-meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--text-2);
  font-size: 13px;
}
.regie-aktionen {
  grid-area: aktionen;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.regie-meldung {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--amber);
  border-radius: var(--r-2);
  color: var(--amber);
  font-size: 13px;
}

.lauf {
  display: grid;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--linie);
  border-radius: var(--r-3);
  background: var(--flaeche);
}
.lauf-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}
.lauf-zeile .tally {
  align-self: center;
}
.lauf-schritt {
  font-size: 17px;
  font-weight: 640;
}
.lauf-proz {
  color: var(--tally);
  font-size: 17px;
  font-weight: 500;
}
.lauf-eta {
  color: var(--text-2);
}
.lauf-fehler {
  display: flex;
  gap: 12px;
  color: var(--text);
}
.lauf-fehler > .icon {
  margin-top: 2px;
  color: var(--amber);
}
.lauf-fehler-titel {
  margin-bottom: 4px;
  color: var(--amber);
  font-weight: 640;
}
.lauf-fehler-text p {
  max-width: 75ch;
  overflow-wrap: anywhere; /* Umbruch statt Abschneiden: in der Regie bleibt Ursache und Ausweg vollständig sichtbar */
  white-space: normal;
}
.lauf-fehler-ursache,
.lauf-fehler-ausweg {
  color: var(--text-2);
}

/* Signalspur */
.spur-box {
  padding: 12px 16px 14px;
  border: 1px solid var(--linie);
  border-radius: var(--r-3);
  background: var(--flaeche);
}
.spur-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 10px;
}
.spur-kopf h3 {
  font-size: 13px;
  font-weight: 650;
}
.spur-legende {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  color: var(--text-3);
  font-size: 12px;
}
.lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lg::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 1px;
}
.lg-signal::before {
  background: var(--spur-signal-stark);
}
.lg-heat::before {
  background: var(--spur-heat);
}
.lg-clip::before {
  background: var(--flaeche-3);
  border: 1px solid var(--linie-stark);
}
.spur {
  display: block;
  width: 100%;
  height: 156px;
}
.spur.trifft {
  cursor: pointer;
}

/* Monitorwand */
.monitorwand {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.monitorwand > li {
  min-width: 0;
}
.monitor {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 1px solid var(--monitor-rand);
  border-radius: var(--r-2);
  background: var(--monitor);
  color: var(--umd-text);
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--dauer) var(--ease);
}
.monitor:hover,
.monitor.ist-hover {
  border-color: var(--text-2);
}
.monitor.ist-gewaehlt {
  border-color: var(--tally);
  box-shadow: 0 0 0 1px var(--tally);
}
.monitor-bild {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 9 / 16;
  background: var(--monitor);
}
.monitor-bild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.monitor-ecke {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
}
.monitor-ecke .umd-buffer {
  max-width: 100%;
  background: var(--umd-grund);
}
.monitor-ecke > span:not(.umd-buffer) {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 3px;
  background: var(--umd-grund);
  color: var(--umd-text);
  font-size: 11px;
}
.umd-leiste {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding-right: 8px;
  border-top: 1px solid var(--monitor-rand);
  background: var(--umd-grund);
  font-size: 12px;
}
.umd-band {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 7px;
  background: var(--umd-band);
  color: var(--umd-text);
  font-size: 11px;
}
.monitor.ist-gewaehlt .umd-band {
  background: #e5332a;
  color: #0e0f12;
}
.umd-titel {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-stretch: 72%;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.umd-titel.leise {
  color: var(--umd-text-2);
  font-weight: 450;
}
.umd-tc {
  color: var(--umd-text-2);
  font-size: 11px;
}
.monitor-frei {
  cursor: default;
}
.frei-text {
  color: #8f8d87;
  font-size: 12px;
  font-stretch: 75%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Kein Signal */
.kein-signal {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  border: 1px solid var(--monitor-rand);
  border-radius: var(--r-3);
  background: var(--monitor);
  overflow: hidden;
}
.farbbalken {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr 18%;
  opacity: 0.55;
}
.fb-oben,
.fb-unten {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.fb-unten {
  grid-template-columns: 5fr 5fr 5fr 6fr 7fr;
}
.b1 { background: var(--fb-1); }
.b2 { background: var(--fb-2); }
.b3 { background: var(--fb-3); }
.b4 { background: var(--fb-4); }
.b5 { background: var(--fb-5); }
.b6 { background: var(--fb-6); }
.b7 { background: var(--fb-7); }
.u1 { background: var(--fb-7); }
.u2 { background: var(--fb-schwarz); }
.u3 { background: var(--fb-5); }
.u4 { background: var(--fb-schwarz); }
.u5 { background: var(--fb-3); }
.ks-text {
  position: relative;
  display: grid;
  gap: 8px;
  max-width: min(460px, calc(100% - 32px));
  padding: 16px 20px;
  border-radius: var(--r-2);
  background: var(--umd-grund);
  color: var(--umd-text);
  text-align: center;
}
.ks-titel {
  font-size: 15px;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ks-zeile {
  color: var(--umd-text-2);
  font-size: 13px;
  line-height: 1.5;
}
.regie > div > .kein-signal {
  min-height: min(62vh, 560px);
}

/* Protokoll */
.protokoll {
  border-top: 1px solid var(--linie);
  padding-top: 10px;
}
.protokoll summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}
.protokoll summary::-webkit-details-marker {
  display: none;
}
.protokoll summary:hover {
  color: var(--text);
}
.protokoll pre {
  max-height: 280px;
  margin: 8px 0 0;
  padding: 12px 14px;
  overflow: auto;
  border: 1px solid var(--linie);
  border-radius: var(--r-2);
  background: var(--flaeche);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ Programm-Ansicht */
.programm {
  display: grid;
  gap: 14px;
}
.programm-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.programm-kopf .zurueck {
  margin-left: -8px;
}
.programm-umd {
  border-color: var(--tally);
}
.programm-umd .umd-name {
  background: var(--tally);
  color: var(--auf-tally);
  font-weight: 700;
}
.programm-umd .umd-wert {
  font-size: 12px;
}
.programm-koerper {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.player {
  border: 1px solid var(--monitor-rand);
  border-radius: var(--r-2);
  background: var(--monitor);
  overflow: hidden;
}
.player video {
  display: block;
  height: min(calc(100vh - 150px), 760px);
  min-height: 420px;
  aspect-ratio: 9 / 16;
  width: auto;
  max-width: 100%;
  background: var(--monitor);
}
.programm-details {
  display: grid;
  gap: 20px;
  min-width: 0;
  max-width: 640px;
}
.programm-details h2 {
  font-size: 24px;
  font-weight: 680;
  line-height: 1.2;
  letter-spacing: -0.01em;
  outline: none;
}
.messwerte {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--linie);
  border-radius: var(--r-2);
  overflow: hidden;
}
.messwert {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-right: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
  background: var(--flaeche);
}
.messwert:nth-child(3n) {
  border-right: 0;
}
.messwert:nth-last-child(-n + 3) {
  border-bottom: 0;
}
.messwert dt {
  color: var(--text-3);
  font-size: 11.5px;
  font-stretch: 85%;
}
.messwert dd {
  margin: 0;
  font-size: 15px;
}
.score-zahl {
  font-size: 18px;
  font-weight: 600;
}
.p-veroeffentlichen {
  display: grid;
  gap: 8px;
}
.p-aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.p-aktionen .knopf {
  min-height: 40px;
}
.p-abschnitt {
  display: grid;
  gap: 6px;
}
.p-abschnitt-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
}
.p-abschnitt h3 {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 560;
  font-stretch: 85%;
}
.p-abschnitt p {
  max-width: 68ch;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}
.p-hook {
  font-size: 17px !important;
  font-weight: 620;
  line-height: 1.35 !important;
}
.p-text {
  white-space: pre-wrap;
}
.p-tags {
  color: var(--text-2) !important;
}

/* ------------------------------------------------------------------ Buffer-Versand */
.buffer {
  display: grid;
  gap: 14px;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--linie);
  border-radius: var(--r-3);
  background: var(--flaeche);
}
.buffer-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
}
.buffer-kopf h3 {
  font-size: 14px;
  font-weight: 650;
}
.buffer-aus-text {
  max-width: 62ch;
  color: var(--text-2);
  font-size: 13px;
}
.buffer.ist-aus .buffer-felder {
  opacity: 0.5;
}
.buffer-form {
  display: grid;
  gap: 12px;
}
.buffer-felder {
  display: grid;
  gap: 16px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.buffer-kanalliste {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.buffer-kanal {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.buffer-kanal input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.buffer-kanal-innen {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px 0 8px;
  border: 1px solid var(--linie);
  border-radius: var(--r-2);
  background: var(--bg);
}
.buffer-kanal:hover .buffer-kanal-innen {
  border-color: var(--linie-stark);
}
.buffer-kanal input:checked + .buffer-kanal-innen {
  border-color: var(--text);
  box-shadow: inset 0 0 0 1px var(--text);
}
.buffer-kanal input:focus-visible + .buffer-kanal-innen {
  outline: 2px solid var(--fokus);
  outline-offset: 2px;
}
.buffer-kanal-name {
  font-weight: 560;
}
.buffer-leer {
  color: var(--text-2);
  font-size: 13px;
}
.buffer-modi {
  flex-wrap: wrap;
}
.buffer-zeit input {
  width: min(260px, 100%);
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--linie-stark);
  border-radius: var(--r-2);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.buffer-zeit input:focus {
  border-color: var(--text-2);
  outline: none;
}
.buffer-zeit input:focus-visible {
  outline: 2px solid var(--fokus);
  outline-offset: 1px;
}
.buffer-text-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.buffer-zaehler {
  color: var(--text-3);
  font-size: 12px;
}
.buffer-zaehler.ist-zuviel {
  color: var(--amber);
}
.buffer textarea {
  width: 100%;
  min-height: 112px;
  padding: 10px 12px;
  border: 1px solid var(--linie-stark);
  border-radius: var(--r-2);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
}
.buffer textarea:focus {
  border-color: var(--text-2);
  outline: none;
}
.buffer textarea:focus-visible {
  outline: 2px solid var(--fokus);
  outline-offset: 1px;
}
.buffer-hinweise {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--amber);
  font-size: 12.5px;
}
.buffer-hinweise:empty {
  display: none;
}
.buffer-hinweise li {
  display: flex;
  gap: 6px;
}
.buffer-hinweise .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}
.buffer-ki {
  display: grid;
  gap: 2px;
}
.buffer-hilfe {
  max-width: 62ch;
  padding-left: 42px;
  color: var(--text-3);
  font-size: 12.5px;
}
.buffer-senden {
  display: grid;
  justify-items: start;
  gap: 10px;
}
.buffer-senden .knopf-primaer {
  min-height: 40px;
}
.buffer-rueckfrage {
  display: grid;
  gap: 8px;
  max-width: 62ch;
  font-size: 13px;
}
.buffer-rueckfrage > p {
  color: var(--amber);
  font-weight: 560;
}
.buffer-rueckfrage-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.buffer-meldung {
  max-width: 62ch;
  color: var(--amber);
  font-size: 13px;
  font-weight: 520;
}
.buffer-meldung[data-art="ok"] {
  color: var(--gruen);
}
.buffer-meldung[data-art="hinweis"] {
  color: var(--text-2);
}
.buffer-posts {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--linie);
}
.buffer-post {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--linie);
  font-size: 13px;
}
.buffer-post:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.buffer-post-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.buffer-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--text);
}
.buffer-post-fehler {
  color: var(--amber);
}
.umd-buffer {
  flex: none;
  max-width: 45%;
  overflow: hidden;
  padding: 0 6px;
  border: 1px solid #3b4049;
  border-radius: 3px;
  color: var(--umd-text-2);
  font-size: 10.5px;
  font-stretch: 72%;
  font-weight: 600;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.umd-buffer.ist-sent {
  border-color: #2db45a;
  color: #2db45a;
}
.umd-buffer.ist-error,
.umd-buffer.ist-needs_approval {
  border-color: #f0a500;
  color: #f0a500;
}
.umd-buffer.ist-sending {
  border-color: #e5332a;
  color: #e5332a;
}
.regie-meldung .knopf {
  margin-left: auto;
}

/* ------------------------------------------------------------------ Aufräumen: Auswahl, Löschen, Speicher */
.segment-auto span {
  min-width: 52px;
  font-weight: 600;
}
.optionen-hinweis {
  order: 10;
  flex-basis: 100%;
  margin: -4px 0 0;
  color: var(--text-3);
  font-size: 12px;
}
.speicher {
  margin: -6px 0 12px;
  color: var(--text-3);
  font-size: 12px;
}
.speicher .mono {
  color: var(--text-2);
}
.spalten-kopf #ablauf-auswaehlen {
  margin-left: auto;
}
.spalten-kopf #ablauf-anzahl {
  margin-left: auto;
}
.spalten-kopf #ablauf-anzahl + #ablauf-auswaehlen:not([hidden]) {
  margin-left: 0;
}
.knopf.ist-an,
#ablauf-auswaehlen[aria-pressed="true"] {
  border-color: var(--text-2);
  background: var(--flaeche-2);
  color: var(--text);
}
.knopf-warnung {
  border-color: var(--amber);
  background: transparent;
  color: var(--amber);
}
.knopf-warnung:hover {
  border-color: var(--amber);
  background: var(--flaeche-2);
}
.knopf-warnung:disabled {
  border-color: var(--linie-stark);
  color: var(--text-3);
  cursor: not-allowed;
}

.auswahl-leiste {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--linie);
  border-radius: var(--r-3);
  background: var(--flaeche);
}
.schnellwahl {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  background: var(--bg);
}
.auswahl-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.auswahl-zahl {
  color: var(--text-2);
  font-size: 13px;
}
.auswahl-zahl .mono {
  color: var(--text);
}
.auswahl-meldung,
.p-loeschen {
  display: grid;
  gap: 8px;
  font-size: 13px;
}
.auswahl-meldung.ist-rueckfrage > p:first-child,
.p-loeschen.ist-rueckfrage > p:first-child,
.kopf-rueckfrage > p {
  color: var(--amber);
  font-weight: 560;
}
.auswahl-meldung {
  padding-top: 10px;
  border-top: 1px solid var(--linie);
}
.kopf-rueckfrage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 16px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--linie);
  background: var(--flaeche);
  font-size: 13px;
}
.regie-meldung .rueckfrage-knoepfe {
  margin-left: auto;
}
.auswahl-meldung .ist-fehler {
  color: var(--amber);
}
.rueckfrage-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.uebersprungen {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
}

/* Job-Auswahl im Sendeablauf */
.jobliste > li.mit-auswahl {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
}
.job-check {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: 4px;
  cursor: pointer;
}
.job-check input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.job-check-box {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--linie-stark);
  border-radius: var(--r-1);
  background: var(--bg);
  color: transparent;
}
.job-check-box .icon {
  width: 14px;
  height: 14px;
}
.job-check input:checked + .job-check-box {
  border-color: var(--wahl-grund);
  background: var(--wahl-grund);
  color: var(--wahl-text);
}
.job-check input:focus-visible + .job-check-box {
  outline: 2px solid var(--fokus);
  outline-offset: 2px;
}
.job-check.ist-gesperrt {
  cursor: not-allowed;
  opacity: 0.4;
}
.job-check.ist-gesperrt input {
  cursor: not-allowed;
}
.jobliste > li.ist-markiert .job {
  border-color: var(--linie-stark);
  background: var(--flaeche);
}
.job-groesse {
  margin-left: auto;
}

/* Monitorwand im Auswahlmodus */
.behalten-leiste {
  margin-bottom: 14px;
}
.monitorwand > li[data-index] {
  display: grid;
  gap: 6px;
  align-content: start;
}
.behalten-schalter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--linie-stark);
  border-radius: var(--r-2);
  background: var(--flaeche);
  color: var(--text);
  font-size: 13px;
  font-weight: 560;
  cursor: pointer;
}
.behalten-schalter:hover {
  border-color: var(--text-3);
}
.behalten-schalter[aria-pressed="true"] {
  border-color: var(--amber);
  background: var(--flaeche-3);
  color: var(--amber);
}
.monitorwand > li.ist-weg .monitor {
  outline: 2px dashed var(--amber);
  outline-offset: 3px;
}

/* Programm: Clip löschen, Meldungen */
.programm-kopf-rechts {
  display: flex;
  align-items: center;
  gap: 8px;
}
.regie-meldung[data-art="ok"] {
  border-color: var(--gruen);
  color: var(--gruen);
}

/* ------------------------------------------------------------------ Kein Bild: gedämpfte Balken */
.mini-balken {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  width: 100%;
  height: 100%;
  opacity: 0.5;
}
.lauf-fehler-text {
  display: grid;
  gap: 8px;
}
.lauf-fehler-text .rueckfrage-knoepfe {
  margin-top: 4px;
}

/* Login: Weltelement */
.login-balken {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  height: 6px;
  border-radius: 2px;
  overflow: hidden;
  opacity: 0.6;
}
.login-uhr {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text-3);
  font-size: 12px;
}
.login-uhr .mono {
  color: var(--text-2);
  font-size: 13px;
}

/* ------------------------------------------------------------------ Login */
.login-seite {
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.login {
  display: grid;
  gap: 28px;
  width: min(380px, 100%);
}
.login-wortmarke {
  font-size: 30px;
}
.login-kopf {
  display: grid;
  gap: 8px;
}
.login .feld-name {
  font-size: 13px;
  color: var(--text-2);
}
.login-zeile-text {
  color: var(--text-2);
}
.login-form {
  display: grid;
  gap: 8px;
}
.login-zeile {
  display: flex;
  gap: 8px;
}
.login-zeile input {
  flex: 1;
  min-width: 0;
  height: 44px;
  font-size: 15px;
}
.login-zeile .knopf {
  min-height: 44px;
}

/* ------------------------------------------------------------------ Responsiv */
.nur-mobil {
  display: none !important;
}

@media (max-width: 1100px) {
  .arbeit {
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  }
  .erweitert {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .erweitert .schalter,
  .erweitert .schalter:first-of-type,
  .erweitert .schalter + .schalter {
    grid-column: auto;
    grid-row: auto;
  }
  .regie-kopf {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "zurueck" "titel" "meta" "aktionen";
  }
  .regie-aktionen {
    justify-content: flex-start;
  }
  .programm-koerper {
    grid-template-columns: minmax(0, 1fr);
  }
  .player {
    justify-self: center;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }
  .nur-mobil {
    display: inline-flex !important;
  }
  .nur-breit {
    display: none;
  }
  .nur-schmal {
    display: inline;
  }
  #logout-alle {
    padding: 0 6px;
    font-size: 11px;
  }
  .kopf {
    padding: 0 12px 0 16px;
    gap: 8px;
  }
  .wortmarke {
    font-size: 17px;
  }
  .kopf-leiste {
    gap: 4px;
  }
  .uhr-box,
  #warteschlange-box {
    display: none;
  }
  .ki-chip .umd-name {
    display: none;
  }
  .ki-chip .umd-wert {
    max-width: 120px;
  }
  .knopf-icon {
    width: 44px;
    height: 44px;
  }
  .knopf {
    min-height: 44px;
  }
  .knopf-klein {
    min-height: 40px;
  }

  .einspiel {
    padding: 12px 16px;
  }
  .einspielzeile {
    flex-wrap: wrap;
    height: auto;
  }
  .einspielzeile {
    padding: 6px;
  }
  .einspielzeile .umd-quelle {
    margin: 4px 0 0 4px;
  }
  #url {
    flex-basis: 100%;
    height: 48px;
    padding: 0 8px;
    font-size: 16px;
  }
  .take {
    width: 100%;
    height: 48px;
  }
  .optionen {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 16px;
    align-items: start;
  }
  .optionen .gruppe:first-child,
  .erweitert-knopf {
    grid-column: 1 / -1;
  }
  .erweitert-knopf {
    justify-self: start;
  }
  .gruppe {
    flex-wrap: wrap;
    width: 100%;
  }
  .gruppe legend {
    float: none;
    width: 100%;
    margin: 0 0 4px;
    line-height: 1.4;
  }
  .segmente {
    width: 100%;
  }
  .segment {
    flex: 1;
  }
  .segment span {
    width: 100%;
    height: 42px;
  }
  .segmente-clips {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }
  .feld-klein input {
    width: 60px;
    height: 48px;
  }
  .erweitert-knopf {
    height: 44px;
  }
  .erweitert {
    grid-template-columns: minmax(0, 1fr);
  }
  select {
    height: 44px;
    font-size: 16px;
  }
  .schalter {
    min-height: 44px;
  }

  .arbeit {
    grid-template-columns: minmax(0, 1fr);
  }
  .ablauf {
    padding: 16px 12px 32px;
    border-right: 0;
    min-height: 0;
  }
  .job {
    grid-template-columns: 34px 72px minmax(0, 1fr);
    padding: 12px 8px;
  }
  .job-thumb {
    width: 72px;
  }
  .regie {
    padding: 12px 16px 40px;
  }
  body[data-mobil="liste"] .regie {
    display: none;
  }
  body[data-mobil="regie"] .ablauf,
  body[data-mobil="regie"] .einspiel {
    display: none;
  }
  body.ist-leer .regie {
    display: block;
  }
  body.ist-leer .ablauf {
    display: none;
  }
  .regie > div > .kein-signal {
    min-height: 360px;
  }
  .regie-titelzeile h2 {
    font-size: 19px;
  }
  .spur-box {
    padding: 10px 12px 12px;
  }
  .spur {
    height: 140px;
  }
  .monitorwand {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* Programm als Vollbild-Ansicht */
  .programm-offen {
    overflow: hidden;
  }
  .programm-offen #r-programm {
    position: fixed;
    inset: 0;
    z-index: 40;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg);
    padding: max(8px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  }
  .programm-koerper {
    gap: 18px;
  }
  .player {
    justify-self: stretch;
  }
  .player video {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: 68vh;
    margin: 0 auto;
  }
  .programm-details h2 {
    font-size: 20px;
  }
  .messwerte {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .messwert {
    padding: 8px 10px;
  }
  .p-aktionen {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .p-aktionen .knopf-primaer {
    grid-column: 1 / -1;
  }
  .p-aktionen .knopf {
    min-height: 48px;
  }
  .segmente-clips {
    grid-template-columns: repeat(6, 1fr);
  }
  .segmente-clips .segment-auto {
    grid-column: span 2;
  }
  .optionen-hinweis {
    order: 0;
    grid-column: 1 / -1;
    margin: -6px 0 0;
  }
  .kopf-rueckfrage {
    justify-content: flex-start;
    padding: 10px 16px;
  }
  .chip,
  .auswahl-leiste .knopf {
    min-height: 44px;
  }
  .auswahl-zeile > .knopf,
  .auswahl-zeile .rueckfrage-knoepfe {
    width: 100%;
  }
  .auswahl-zeile .rueckfrage-knoepfe {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .programm-kopf {
    flex-wrap: wrap;
  }
  .buffer {
    padding: 14px 12px;
  }
  .buffer-modi {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .buffer-modi .segment:first-child {
    grid-column: 1 / -1;
  }
  .buffer-kanal-innen,
  .buffer-zeit input {
    min-height: 44px;
    height: 44px;
  }
  .buffer-zeit input {
    width: 100%;
    font-size: 16px;
  }
  .buffer textarea {
    font-size: 16px;
  }
  .buffer-hilfe {
    padding-left: 0;
  }
  .buffer-senden,
  .buffer-senden .knopf-primaer {
    width: 100%;
  }
  .buffer-senden .knopf-primaer {
    min-height: 48px;
  }
  .buffer-link {
    min-height: 44px;
  }
  .regie-meldung {
    flex-wrap: wrap;
  }
}

@media (max-width: 420px) {
  .messwerte {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .messwert:nth-child(3n) {
    border-right: 1px solid var(--linie);
  }
  .messwert:nth-child(2n) {
    border-right: 0;
  }
  .messwert:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--linie);
  }
  .messwert:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}
