/* ============================================================
   tiktok-scout — Helio Design System (Baseport-Look)
   Light-Mode Default, Dark-Mode via [data-theme="dark"]
   ============================================================ */

/* --- 1. Design-Tokens -------------------------------------- */
:root {
  --hf-primary: #1e3a5f;
  --hf-primary-dark: #142841;
  --hf-primary-light: #dbeafe;
  --hf-accent: #2563eb;
  --hf-accent-light: #eff6ff;
  --hf-success: #16a34a;
  --hf-success-light: #dcfce7;
  /* A4-Fix (Pauls Review 18.08.): --hf-success ist zu hell für weißen Text auf voller
     Fläche (3,30:1, unter WCAG AA 4,5:1) — eigener, dunklerer Token NUR für Knopf-
     Flächen (Chips/Pills bleiben bei --hf-success — Text-auf-Tint, anderer Fall).
     #15803d gegen #fff = 5,01:1. */
  --hf-success-btn: #15803d;
  --hf-warning: #f59e0b;
  /* Gleiches Muster wie --hf-success-btn (Review 19.08.): #f59e0b trägt weißen Text
     nur mit 2,15:1 — dunklerer Ton NUR für volle Flächen. #b45309 gegen #fff = 5,0:1. */
  --hf-warning-btn: #b45309;
  --hf-warning-light: #fef3c7;
  --hf-danger: #dc2626;
  --hf-danger-light: #fef2f2;
  --hf-sidebar: #f4f4f5;
  --hf-sidebar-active: rgba(30, 58, 95, 0.08);
  --hf-border: #e5e7eb;
  --hf-text: #0f172a;
  --hf-text-muted: #4b5563;
  --hf-background: #ffffff;
  --hf-card: #ffffff;
  --hf-radius: 0.5rem;
  --hf-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
  --hf-focus-ring: rgba(30, 58, 95, 0.4);
}

[data-theme="dark"] {
  --hf-primary: #6b8fc7;
  --hf-primary-dark: #1e3a5f;
  --hf-primary-light: rgba(30, 58, 95, 0.2);
  --hf-accent: #60a5fa;
  --hf-accent-light: rgba(30, 58, 138, 0.2);
  --hf-success: #16a34a;
  --hf-success-light: #14532d;
  /* Gleicher Fall wie im Hellmodus: --hf-success + weißer Text bleibt 3,30:1 (die
     Klassisch-Palette färbt Dark Mode nicht um) — derselbe dunklere Ton, keine
     Verschlechterung gegenüber dem (bereits unzureichenden) Ist-Zustand. */
  --hf-success-btn: #15803d;
  --hf-warning: #f59e0b;
  /* Dunkle Card-Schrift auf dem hellen Warnton trägt 7,7:1 — kein dunklerer Ton nötig. */
  --hf-warning-btn: var(--hf-warning);
  --hf-warning-light: #451a03;
  --hf-danger: #ef4444;
  --hf-danger-light: #2d1515;
  --hf-sidebar: #18181b;
  --hf-sidebar-active: rgba(255, 255, 255, 0.08);
  --hf-border: #27272a;
  --hf-text: #f1f5f9;
  --hf-text-muted: #cbd5e1;
  --hf-background: #0a0a0b;
  --hf-card: #18181b;
  --hf-shadow: 0 1px 2px rgba(255, 255, 255, 0.04), 0 1px 3px rgba(255, 255, 255, 0.06);
  --hf-focus-ring: rgba(96, 165, 250, 0.7);
}

/* --- 2. Reset / Base ---------------------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--hf-background);
  color: var(--hf-text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--hf-focus-ring); outline-offset: 2px; }

/* --- 3. App-Shell / Sidebar ----------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 224px; flex: 0 0 224px;
  background: var(--hf-sidebar); border-right: 1px solid var(--hf-border);
  display: flex; flex-direction: column;
  padding: 18px 14px; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
  font-weight: 700; font-size: 16px; color: var(--hf-primary);
  padding: 4px 10px 18px;
  display: flex; align-items: center; gap: 9px;
}
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a {
  padding: 9px 12px; border-radius: var(--hf-radius); text-decoration: none;
  color: var(--hf-text-muted); font-weight: 500; font-size: 14px;
}
.sidebar nav a:hover { background: var(--hf-sidebar-active); color: var(--hf-text); }
.sidebar nav a.active {
  background: var(--hf-sidebar-active); color: var(--hf-primary); font-weight: 600;
}
.nav-group {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--hf-text-muted); opacity: 0.6; padding: 12px 12px 4px;
}
.nav-group:first-child { padding-top: 2px; }
.sidebar-foot { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

.btn-scan {
  width: 100%; border: 0; cursor: pointer; padding: 10px 14px; border-radius: var(--hf-radius);
  background: var(--hf-primary); color: var(--wb-on-fill); font-weight: 600; font-size: 14px;
}
.btn-scan:hover { background: var(--hf-primary-dark); }
.btn-scan:disabled { opacity: .6; cursor: default; }

.theme-toggle {
  width: 100%; border: 1px solid var(--hf-border); background: var(--hf-card);
  color: var(--hf-text); cursor: pointer; padding: 8px 12px; border-radius: var(--hf-radius);
  font-size: 14px; font-weight: 700;
}
.theme-toggle:hover { color: var(--hf-primary); }

.main-wrap { flex: 1; min-width: 0; }
.topbar-mobile { display: none; }

/* --- 3b. Kopfleiste + Konto-Menü (09.09.) ------------------------ */
/* Farbwerte ausschließlich aus Tokens. Die tragende Paarung ist überall
   --hf-card (Fläche) + --hf-text (Schrift) — dieselbe, auf der schon jede .card
   steht; als Hover-Fläche --hf-primary-light, das in jedem Design die helle
   (bzw. im Dunkelmodus die dunkle) Tönung von Primary ist. Damit kann keine
   Design-Variante hier Weiß auf Weiß erzeugen, ohne dass gleichzeitig alle
   Karten der Oberfläche unlesbar wären. */
/* Eigene Stapelebene, und zwar über der des Inhalts: das Menü klappt über `main`
   auf. Ohne diese Zeile lag es im Werkbank-Design HINTER dem Inhalt und war zwar
   sichtbar, aber nicht anklickbar — dort setzt `.main-wrap` ein eigenes
   Stapelfeld (`isolation: isolate`), in dem `main` auf z-index 1 steht. */
.kopfleiste {
  display: flex; justify-content: flex-end; align-items: center;
  gap: 8px; padding: 12px 20px 0; max-width: 1100px; margin: 0 auto;
  position: relative; z-index: 30;
}
.konto { position: relative; }
/* --- B5a: Glocke und Meldungen -----------------------------------
   Der Zaehler ist ein GEFUELLTER Chip und nimmt deshalb `--hf-text` auf
   `--hf-background`, nicht `--hf-accent`: gemessen ueber alle sechs Designs x beide
   Themes traegt `--hf-accent` auf `--hf-background` nur 3,66:1 in 3 von 12
   Kombinationen, `--hf-text`/`--hf-background` traegt ueberall (Lehre 19.09.,
   `gefuellter-chip-braucht-kontrastnachweis`). Keine rohen Farbwerte. */
.glocke {
  position: relative; display: grid; place-items: center; flex: none;
  width: 32px; height: 32px;
  border: 1px solid var(--hf-border); border-radius: 999px;
  background: var(--hf-card); color: var(--hf-text);
  text-decoration: none; cursor: pointer;
}
.glocke:hover { border-color: var(--hf-text); color: var(--hf-text); }
.glocke-zahl {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 999px;
  background: var(--hf-text); color: var(--hf-background);
  font-size: 11px; font-weight: 700; line-height: 17px; text-align: center;
}
/* Der Ausfall-Chip. Er nimmt KEINE neue Farbpaarung auf, sondern dieselbe wie die
   Ausfall-Tafel auf dem Meldungs-Bildschirm (`--hf-text` auf `--hf-danger-light` mit
   `--hf-danger` als Kante): eine gefuellte Flaeche in einer neuen Paarung braeuchte
   ihren eigenen Nachweis ueber alle 12 Design-x-Theme-Kombinationen (Lehre 19.09.).
   Unterscheidbar ist der Zustand ohnehin schon am Zeichen und am Aria-Label — die
   Farbe traegt hier nicht die Aussage. */
.glocke-zahl.glocke-stoerung {
  background: var(--hf-danger-light); color: var(--hf-text);
  border: 1px solid var(--hf-danger); line-height: 15px;
}
.meldung-liste { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.meldung {
  display: flex; align-items: flex-start; gap: 11px; width: 100%; text-align: left;
  padding: 12px 14px; border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius); background: var(--hf-card); color: var(--hf-text);
  font: inherit; cursor: pointer;
}
.meldung:hover { border-color: var(--hf-text); }
/* Der Punkt ist der einzige Unterschied zwischen gelesen und ungelesen — gefuellt in
   der Tinte der Oberflaeche, leer mit ihrer Kante. Kein zweiter Traeger (keine
   Schriftstaerke, keine Flaeche): zwei Traeger fuer eine Aussage laufen auseinander. */
.meldung .punkt {
  flex: none; width: 9px; height: 9px; margin-top: 5px; border-radius: 999px;
  background: var(--hf-text);
}
.meldung.gelesen .punkt { background: none; border: 1px solid var(--hf-border); }
.meldung.gelesen b, .meldung.gelesen small { color: var(--hf-text-muted); }
.meldung .k { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.meldung .k b { font-size: 14px; font-weight: 700; }
.meldung .k small { font-size: 13px; color: var(--hf-text-muted); }
.meldung .wann { flex: none; font-size: 12px; color: var(--hf-text-muted); }
.meldung-fuss { display: flex; justify-content: flex-start; }
.meldung-leer { color: var(--hf-text-muted); font-size: 14px; }
.meldung-defekt {
  display: flex; flex-direction: column; gap: 5px;
  padding: 13px 15px; border-radius: var(--hf-radius);
  border: 1px solid var(--hf-danger); background: var(--hf-danger-light);
  color: var(--hf-text); font-size: 14px;
}
.konto-knopf {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--hf-border); background: var(--hf-card); color: var(--hf-text);
  border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer;
  font: inherit; font-size: 13px; max-width: 260px;
}
.konto-knopf:hover { border-color: var(--hf-text); }
.konto-avatar {
  width: 26px; height: 26px; flex: none; border-radius: 999px;
  border: 1px solid var(--hf-border); background: var(--hf-primary-light);
  color: var(--hf-text); object-fit: cover;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.konto-knopf-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Vorschau auf der Konto-Seite: dieselbe Fläche, nur größer — keine eigenen Farben. */
.konto-avatar-gross { width: 64px; height: 64px; font-size: 22px; }
.konto-pfeil { color: var(--hf-text-muted); font-size: 11px; }
.konto-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  min-width: 280px; padding: 6px;
  background: var(--hf-card); color: var(--hf-text);
  border: 1px solid var(--hf-border); border-radius: var(--hf-radius);
  box-shadow: var(--hf-shadow);
}
.konto-kopf { padding: 8px 12px 6px; }
.konto-kopf-mail { font-weight: 600; font-size: 13px; overflow-wrap: anywhere; }
.konto-kopf-sub { color: var(--hf-text-muted); font-size: 12px; }
.konto-eintrag {
  display: block; width: 100%; text-align: left; text-decoration: none;
  padding: 9px 12px; border: 0; border-radius: var(--hf-radius);
  background: none; color: var(--hf-text); font: inherit; font-size: 14px; cursor: pointer;
}
.konto-eintrag:hover { background: var(--hf-primary-light); }
.konto-trenner { height: 1px; background: var(--hf-border); margin: 6px 0; }
.konto-feld { padding: 6px 12px 8px; }
.konto-feld-titel {
  display: block; margin-bottom: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--hf-text-muted);
}
.konto-select {
  width: 100%; background: var(--hf-card); color: var(--hf-text);
  border: 1px solid var(--hf-border); border-radius: var(--hf-radius);
  padding: 8px 10px; font: inherit; font-size: 14px;
}

/* 1100 statt 780 px (Jan 2026-08-19: „wir haben so viel Platz“) — Filterleiste in
   einer Zeile, Karten nutzen das Fenster; Handy-Breakpoints unten unverändert. */
main { max-width: 1100px; margin: 0 auto; padding: 28px 20px 80px; }
.page-head h1 { margin: 4px 0 4px; font-size: 22px; font-weight: 700; }
.sub { color: var(--hf-text-muted); margin: 0 0 14px; font-size: 14px; }

.flash { max-width: 1100px; margin: 16px auto 0; padding: 0 20px; }
.flash div {
  background: var(--hf-success-light); border: 1px solid var(--hf-success);
  color: var(--hf-success); padding: 9px 13px; border-radius: var(--hf-radius);
  margin-bottom: 6px; font-size: 14px;
}
.empty { text-align: center; color: var(--hf-text-muted); padding: 40px 10px; }

/* Besuchs-Banner (T051): „Neu seit letztem Besuch"-Zusammenfassung */
.besuch-banner {
  max-width: 1060px; margin: 16px auto 0; padding: 9px 13px;
  display: flex; align-items: baseline; gap: 10px;
  background: var(--hf-card); border: 1px solid var(--hf-primary);
  color: var(--hf-text); border-radius: var(--hf-radius); font-size: 14px;
}
.besuch-banner a { color: var(--hf-primary); text-decoration: none; }
.besuch-banner a:hover { text-decoration: underline; }
.besuch-offen { color: var(--hf-text-muted); }
.besuch-weg {
  margin-left: auto; border: none; background: none; cursor: pointer;
  color: var(--hf-text-muted); font-size: 14px; padding: 0 2px;
}
.besuch-weg:hover { color: var(--hf-text); }
@media (max-width: 800px) { .besuch-banner { margin: 12px 16px 0; } }

/* --- 4. Cards (Feed / Kommentare) ------------------------------ */
.card {
  display: flex; flex-direction: column;
  background: var(--hf-card); border: 1px solid var(--hf-border); border-radius: var(--hf-radius);
  box-shadow: var(--hf-shadow);
  padding: 16px; margin-bottom: 16px;
}
/* Kein Abdunkeln nicht-gepushter Karten mehr (Jan 2026-08-19): die 72 % lagen auf der
   GANZEN Karte und färbten auch die Ink-Buttons grau — sah aus wie ein zweiter
   Button-Stil. Die Stärke zeigt die Fit-Pille, gepusht bleibt der grüne Rand. */
.card.is-pushed { border-color: var(--hf-success); }

/* --- 4a. Kopfzeile: Thumbnail + Kanal + Titel ------------------- */
.card-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.thumb { position: relative; flex: none; }
.thumb img, .thumb-ph {
  width: 80px; height: 80px; object-fit: cover; border-radius: calc(var(--hf-radius) - 2px);
  background: var(--hf-sidebar-active); display: block;
}
.thumb-ph { display: grid; place-items: center; font-size: 28px; }
.head-info { min-width: 0; flex: 1; }
.handle-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
/* Kanalname/Quelle hervorgehoben wie ein Knopf statt reiner Text (André-Feedback
   Runde 3, 18.08.). */
.handle {
  font-weight: 700; font-size: 13px; color: var(--hf-accent); background: var(--hf-accent-light);
  border: 1px solid var(--hf-accent); border-radius: 999px; padding: 2px 10px;
}
.pill.pill-score { color: var(--hf-primary); border-color: var(--hf-primary); font-weight: 700; }
.hook { font-size: 17px; line-height: 1.35; margin: 0; font-weight: 600; }

/* --- 4b. Badge-Zeile: alle Pills auf einer Höhe ----------------- */
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.pill {
  font-size: 12px; color: var(--hf-text-muted); background: var(--hf-sidebar-active);
  border: 1px solid var(--hf-border);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap; line-height: 1.5;
}
.pill.ok { color: var(--hf-success); background: var(--hf-success-light); border-color: var(--hf-success); }
.pill.muted { color: var(--hf-text-muted); }
.pill.accent { color: var(--hf-accent); background: var(--hf-accent-light); border-color: var(--hf-accent); }
a.pill-link {
  text-decoration: none; cursor: pointer;
}
a.pill-link:hover { color: var(--hf-accent); border-color: var(--hf-accent); }
.script { margin: 0 0 10px; padding-left: 18px; color: var(--hf-text); }
.script li { margin: 2px 0; }
.details { margin: 0 0 10px; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; }
.details dt { color: var(--hf-text-muted); font-size: 13px; white-space: nowrap; }
.details dd { margin: 0; font-size: 14px; }
.fitscore { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 12px; }
.fit {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: var(--hf-sidebar-active); color: var(--hf-text-muted); border: 1px solid var(--hf-border);
}
.fit.s0 { color: var(--hf-danger); border-color: var(--hf-danger); }     /* 0–33  schwach */
.fit.s1 { color: var(--hf-warning); border-color: var(--hf-warning); }   /* 34–67 mittel */
.fit.s2 { color: var(--hf-success); border-color: var(--hf-success); }   /* 68–100 stark */

.sep { border: 0; border-top: 1px solid var(--hf-border); margin: 4px 0; }

/* Evidence-Score / Compliance-Ampel -> Helio-Semantikfarben (Badges in der .meta-Zeile) */
.pill.evA, .pill.evB { color: var(--hf-success); border-color: var(--hf-success); background: var(--hf-success-light); font-weight: 700; }
.pill.evC { color: var(--hf-warning); border-color: var(--hf-warning); background: var(--hf-warning-light); font-weight: 700; }
.pill.evD, .pill.evE { color: var(--hf-danger); border-color: var(--hf-danger); background: var(--hf-danger-light); font-weight: 700; }
.pill.amp-gruen { color: var(--hf-success); border-color: var(--hf-success); background: var(--hf-success-light); font-weight: 700; }
.pill.amp-gelb { color: var(--hf-warning); border-color: var(--hf-warning); background: var(--hf-warning-light); font-weight: 700; }
.pill.amp-rot { color: var(--hf-danger); border-color: var(--hf-danger); background: var(--hf-danger-light); font-weight: 700; }

.variant {
  background: var(--hf-sidebar-active); border: 1px solid var(--hf-border); border-radius: calc(var(--hf-radius) - 2px);
  padding: 8px 12px; margin-bottom: 8px;
}
.variant summary { cursor: pointer; font-weight: 700; font-size: 14px; list-style: revert; }
.variant .vhook { font-weight: 600; margin: 8px 0 6px; }
.variant .dreh { color: var(--hf-text-muted); font-size: 13px; margin: 4px 0 0; }
.variant .dreh-szenen { color: var(--hf-text-muted); font-size: 13px; margin: 2px 0 0;
  padding-left: 18px; }
.variant .dreh-szenen li { margin: 2px 0; }

/* Drehbuch-Format (2026-08-15): Spickzettel + Drehbuch aus denselben Szenen */
.dreh-fakten {
  background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: calc(var(--hf-radius) - 2px); padding: 8px 12px; margin-bottom: 8px;
}
.dreh-fakten summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.fakten-liste { margin: 8px 0 2px; padding-left: 18px; font-size: 13px; color: var(--hf-text); }
.fakten-liste li { margin: 3px 0; }

.spick, .drehbuch {
  background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: calc(var(--hf-radius) - 2px); padding: 6px 10px; margin: 6px 0;
}
.spick summary, .drehbuch summary {
  cursor: pointer; font-weight: 600; font-size: 13px; color: var(--hf-text-muted);
}
.spick-schritte { margin: 8px 0 2px; padding-left: 20px; }
.spick-schritte li { margin: 5px 0; }
.sp-sagen { display: block; color: var(--hf-text); }
.sp-stumm { display: block; color: var(--hf-text-muted); font-style: italic; font-size: 13px; }
.sp-tun { display: block; color: var(--hf-text-muted); font-size: 12.5px; }

.szene { border-top: 1px solid var(--hf-border); padding: 8px 0; }
.szene:first-of-type { border-top: 0; margin-top: 6px; }
.sz-kopf {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--hf-text-muted); margin-bottom: 4px; font-variant-numeric: tabular-nums;
}
.sz-zeile { display: grid; grid-template-columns: 52px 1fr; gap: 8px; margin: 3px 0; align-items: baseline; }
.sz-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 4px; padding: 1px 0; text-align: center; align-self: start; margin-top: 2px;
}
.sz-tag-tun { background: var(--hf-warning-light); color: var(--hf-warning); }
.sz-tag-sag { background: var(--hf-success-light); color: var(--hf-success); }
.sz-tag-tipp { color: var(--hf-text-muted); border: 1px dashed var(--hf-border); }
.sz-tun { font-size: 13px; color: var(--hf-text-muted); }
.sz-sag { font-size: 14.5px; color: var(--hf-text); }
.sz-tipp { font-size: 12.5px; color: var(--hf-text-muted); }

.strat-mix { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 8px 0 18px; }
/* Editierbarer Mix mit Ist-Spalte (Jan 2026-08-18): Format | Soll-Eingabe | Ist */
.mix-grid { grid-template-columns: 1fr auto auto; align-items: center; margin-bottom: 0; }
.mix-grid input[type="number"] {
  width: 64px; padding: 4px 6px; border: 1px solid var(--hf-border);
  border-radius: calc(var(--hf-radius) - 2px); background: var(--hf-card);
  color: var(--hf-text); font: inherit; text-align: right;
}
.mix-grid .mix-ist { text-align: right; white-space: nowrap; }
.strat-mix .fmt { color: var(--hf-text); }
.strat-mix .pct { color: var(--hf-accent); font-weight: 700; text-align: right; }
.pillar {
  background: var(--hf-card); border: 1px solid var(--hf-border); border-radius: calc(var(--hf-radius) - 2px);
  padding: 10px 14px; margin-bottom: 8px;
}
.pillar b { color: var(--hf-primary); }

/* --- 4b. Feed-Tabs / Filter-Leiste (Feedback-Workflow) ------------- */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--hf-border); }
.tab {
  padding: 9px 14px; text-decoration: none; color: var(--hf-text-muted);
  font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--hf-text); }
.tab.active { color: var(--hf-primary); border-bottom-color: var(--hf-primary); }
.tab-error { color: var(--wb-copper); }
.tab-error.active { color: var(--wb-copper); border-bottom-color: var(--wb-copper); }

/* --- 4f. Hashtag-Schatz (Stufen, Vorschläge, Caption-Mix) ---------- */
.hashtag-mix { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ht-chip {
  display: inline-flex; align-items: baseline; font-size: 13px;
  border: 1px solid var(--hf-border); border-radius: 999px; padding: 4px 10px;
  color: var(--hf-primary); background: var(--hf-card);
}
.ht-count {
  font-weight: 600; font-size: 12px; color: var(--hf-text-muted);
  margin-left: 7px; padding-left: 7px; border-left: 1px solid var(--hf-border);
  font-variant-numeric: tabular-nums;
}
.ht-x, .ht-plus {
  border: 0; background: none; cursor: pointer; font: inherit; font-size: 11px;
  line-height: 1; padding: 0; margin-left: 7px; color: var(--hf-text-muted);
}
.ht-x:hover { color: var(--wb-remove-hover); }
.ht-plus { font-size: 14px; font-weight: 700; color: var(--wb-accept); }
.ht-plus:hover { color: var(--wb-accept-hover); }
.ht-vorschlag { border-style: dashed; }
.ht-accepted { border-color: var(--wb-accept); border-style: solid; }
.pp-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.posting-panel {
  background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: calc(var(--hf-radius) - 2px); padding: 10px 14px; margin: 10px 0;
}
.posting-panel .posting-paket { border-top: 0; margin-top: 0; padding-top: 0; }
.pp-pills { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.pp-pill {
  border: 1px solid var(--hf-border); background: none; color: var(--hf-text-muted);
  border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; font: inherit;
}
.pp-pill.active { color: var(--hf-primary); border-color: var(--hf-primary); font-weight: 600; }

/* --- 4e. Posting-Paket je Variante (T021) --------------------------- */
.posting-paket {
  border-top: 1px dashed var(--hf-border); margin-top: 10px; padding-top: 8px;
}
.posting-paket p { margin: 4px 0; font-size: 13px; }
.posting-paket .hashtags { color: var(--hf-primary); word-break: break-word; }

/* --- 4d. Kommentar-Stimmung (T015) --------------------------------- */
.stimmung {
  background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: calc(var(--hf-radius) - 2px); padding: 10px 14px; margin: 10px 0;
}
.stimmung p { margin: 6px 0 0; font-size: 14px; }
.stimmung-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stimmung-positiv { border-left: 3px solid var(--wb-brass); }
.stimmung-gemischt { border-left: 3px solid var(--wb-shade); }
.stimmung-negativ { border-left: 3px solid var(--wb-copper); }
.stimmung-meter {
  display: inline-block; width: 90px; height: 8px; border-radius: 4px;
  background: var(--hf-border); overflow: hidden;
}
.stimmung-fill { display: block; height: 100%; background: var(--hf-primary); }

/* --- 4c. Fehler-Tab (T014) ----------------------------------------- */
.card-error { border-left: 3px solid var(--wb-copper); }
.error-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px;
}

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  background: var(--hf-card); border: 1px solid var(--hf-border); border-radius: var(--hf-radius);
  padding: 12px 14px; margin-bottom: 18px;
}
.filter-bar label {
  display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600;
  color: var(--hf-text-muted);
}
.filter-bar select, .filter-bar input {
  background: var(--hf-background); border: 1px solid var(--hf-border); color: var(--hf-text);
  border-radius: calc(var(--hf-radius) - 2px); padding: 7px 10px; font: inherit;
}
.filter-bar input[type="number"] { width: 120px; }
.filter-bar label.check {
  flex-direction: row; align-items: center; gap: 6px; font-weight: 500; padding-bottom: 7px;
}

/* Wissens-Seite (Stufe 1): eine Liste über alle vier Wissens-Quellen */
.wissen-liste { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.wissen-liste li {
  background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.wissen-liste li.ungueltig { opacity: .62; }
.wissen-liste li.ungueltig .w-text { text-decoration: line-through; }
.w-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.w-text { margin: 0; }
.w-aktion { margin: 0; }

/* Herkunfts-Block auf der Karte: welches Wissen steckt in diesem Text */
/* Antwortquote — die eine Kennzahl des Posteingangs (Community-Plan, Gruppe F) */
.quote-karte { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.quote-zahl { font-size: 38px; font-weight: 700; line-height: 1; flex: none; }
.quote-zahl span { font-size: 20px; font-weight: 600; margin-left: 2px; }
.kopierbar:hover { border-color: var(--hf-accent); }

.herkunft-liste { list-style: none; padding: 0; margin: 8px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.herkunft-liste label { display: flex; align-items: flex-start; gap: 8px; font-size: 14.5px; cursor: pointer; }
.herkunft-liste input { margin-top: 4px; flex: none; }

/* „Video-Idee erstellen"-Dialog (2026-08-18): eine Einstiegsstelle statt vier
   gestapelter submit-bar-Zeilen. Die .idee-form erbt die submit-bar-Lehren:
   min-width:0 ist Pflicht, sonst hält ein Feld mit eigener Mindestbreite — das
   Dateifeld hat eine — die Flex-Zeile auf und schiebt den Knopf aus dem Fenster
   (auf dem Handy als waagerechtes Scrollen sichtbar, siehe T071). */
.idee-start { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.idee-start .sub { margin: 0; }
.idee-dialog {
  border: 1px solid var(--hf-border); border-radius: var(--hf-radius);
  background: var(--hf-card); color: var(--hf-text);
  width: min(560px, 92vw); padding: 0; box-shadow: var(--hf-shadow);
}
.idee-dialog::backdrop { background: color-mix(in srgb, var(--wb-page) 55%, transparent); }
.idee-inhalt { padding: 18px 20px 20px; }
.idee-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.idee-kopf h2 { margin: 0; font-size: 18px; }
.idee-opt {
  border: 1px solid var(--hf-border); border-radius: calc(var(--hf-radius) - 2px);
  background: var(--hf-background); padding: 10px 12px; margin-top: 8px;
}
.idee-opt[open] { border-color: var(--hf-primary); background: var(--hf-sidebar-active); }
.idee-opt summary { cursor: pointer; list-style: revert; }
.idee-opt summary b { font-size: 14px; }
.idee-opt summary .sub { display: block; margin: 2px 0 0; font-size: 13px; }
.idee-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.idee-form input {
  flex: 1; background: var(--hf-card); border: 1px solid var(--hf-border); color: var(--hf-text);
  border-radius: var(--hf-radius); padding: 9px 12px; font: inherit;
  min-width: 0;
}
/* Behandlungsart + Hinweis beim Einwurf (Welle 7, Jan-Entscheid 19.08.): eigene
   Zeile unter dem Link-Feld, gleiche Feldoptik wie .idee-form input. */
.idee-form select, .idee-form textarea {
  flex: 1 1 100%; background: var(--hf-card); border: 1px solid var(--hf-border); color: var(--hf-text);
  border-radius: var(--hf-radius); padding: 9px 12px; font: inherit;
  min-width: 0;
}
.idee-form textarea { resize: vertical; }

/* --- 4c. Legende (Feed-Kopf) ----------------------------------- */
.legend {
  background: var(--hf-card); border: 1px solid var(--hf-border); border-radius: var(--hf-radius);
  padding: 10px 14px; margin-bottom: 18px; font-size: 13px;
}
.legend summary { cursor: pointer; font-weight: 700; list-style: revert; color: var(--hf-text); }
.legend-body { display: grid; gap: 10px; margin-top: 10px; }
.legend-group h4 { margin: 0 0 3px; font-size: 12px; color: var(--hf-primary); }
.legend-group p { margin: 0; color: var(--hf-text-muted); line-height: 1.5; }
.legend-group p b { color: var(--hf-text); }

/* --- 4d. Kommentar-Ideen auf der Karte --------------------------- */
.comment-insights { background: var(--hf-accent-light); border-color: var(--hf-accent); }
.comment-insights > summary { color: var(--hf-accent); }

.section-head {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--hf-text-muted); margin: 20px 0 10px;
}
.card.is-done { opacity: .68; }

.banner-info {
  background: var(--hf-accent-light); border: 1px solid var(--hf-accent); color: var(--hf-accent);
  padding: 10px 14px; border-radius: var(--hf-radius); margin-bottom: 16px; font-size: 14px;
}

/* --- 5. Buttons / Aktionen -------------------------------------- */
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prod-actions { display: flex; gap: 6px; }
.seiten-leiste { display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 18px 0 6px; flex-wrap: wrap; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
/* Einheitlicher Primär-Stil für ALLE Buttons (Jan 2026-07-24: „auf der ganzen
   Plattform Einheit durch die Buttons") — vorher war .btn weiß und wurde nur in
   .profile-form auf blau überschrieben. */
.btn {
  display: inline-block; cursor: pointer; text-decoration: none;
  padding: 8px 14px; border-radius: var(--hf-radius); background: var(--hf-primary);
  color: var(--wb-on-fill); font-weight: 600; font-size: 14px; border: 1px solid var(--hf-primary);
}
.btn:hover { background: var(--hf-primary-dark); border-color: var(--hf-primary-dark); color: var(--wb-on-fill); }
.btn.gruen { background: var(--hf-success-btn); border-color: var(--hf-success-btn); }
.btn.gruen:hover { filter: brightness(0.92); }
.btn.rot { background: var(--hf-danger); border-color: var(--hf-danger); }
.btn.rot:hover { filter: brightness(0.92); }
.btn.sekundaer { background: var(--hf-card); color: var(--hf-primary); border-color: var(--hf-border); }
/* Hover wechselt nur die KANTE. Fläche und Tinte bleiben, wie das jeweilige Design sie
   für den Ruhezustand gewählt hat — damit ist der Hover-Kontrast per Bauart derselbe wie
   in Ruhe, in jedem Design, auch in einem künftigen. Vorher wechselte hier die Fläche
   auf `--hf-background`, während die Tinte für `--hf-card` gewählt war: gemessen am
   13.09. über alle sechs Designs und beide Themes ergab das 1,06:1 bis 1,09:1. */
.btn.sekundaer:hover { border-color: var(--hf-primary); }
/* --- 5b. Bewertungs-Zeile 1-10 (Creator-Memory v2, ersetzt Daumen) ------
   Bauwelle 1 Paket A (T109): der Bewertungsblock ist die letzte Zeile der Karte,
   nicht mehr hinter "👍 Bewerten" eingeklappt — linksbündig, volle Breite. */
.rating-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.rating-form .frage { font-size: 13px; font-weight: 700; }
.rating-nums { display: flex; gap: 6px; }
.rate-btn input[type="radio"] { display: none; }
.rate-btn:has(input:checked).rate-good { background: var(--hf-success-light); border-color: var(--hf-success); color: var(--hf-success); }
.rate-btn:has(input:checked).rate-bad { background: var(--hf-danger-light); border-color: var(--hf-danger); color: var(--hf-danger); }
.rating-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 3px; font-size: 12px; cursor: pointer;
  border: 1px solid var(--hf-border); border-radius: 999px; padding: 3px 9px;
  color: var(--hf-text-muted); user-select: none;
}
.tag-chip input[type="checkbox"] { display: none; }
.tag-chip:hover { border-color: var(--hf-primary); color: var(--hf-text); }
/* Vorlagen-Treue (abgenommen 18.08., nachgezogen 19.08.): grün/orange dauerhaft
   sichtbar — positiv/negativ muss ohne Anklicken erkennbar sein. Gewählt = voller Ton;
   var(--hf-card) als Schriftfarbe bleibt in Light wie Dark lesbar. */
.tag-chip.tag-pos { background: var(--hf-success-light); border-color: var(--hf-success); color: var(--hf-success); }
.tag-chip.tag-neg { background: var(--hf-warning-light); border-color: var(--hf-warning); color: var(--hf-warning); }
.tag-chip.tag-pos:hover, .tag-chip.tag-pos:has(input:checked) { background: var(--hf-success-btn); border-color: var(--hf-success-btn); color: var(--hf-card); }
.tag-chip.tag-neg:hover, .tag-chip.tag-neg:has(input:checked) { background: var(--hf-warning-btn); border-color: var(--hf-warning-btn); color: var(--hf-card); }
.rating-notiz {
  /* textareas erben die Seitenschrift nicht — ohne inherit rendert der Browser Monospace */
  width: 100%; font-family: inherit; font-size: 13px; padding: 6px 10px;
  border: 1px solid var(--hf-border);
  border-radius: calc(var(--hf-radius) - 2px); background: var(--hf-card); color: var(--hf-text);
  resize: vertical;
}
.rating-submit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rate-btn {
  /* label, kein button: ohne eigenes Zentrieren säße die Zahl oben links aus der
     Box heraus (Bauwelle-1-Regression, Jan 2026-08-19) */
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--hf-border); background: var(--hf-card); cursor: pointer;
  font-size: 12px; font-weight: 600; width: 28px; height: 28px; padding: 0; line-height: 1;
  border-radius: calc(var(--hf-radius) - 2px); color: var(--hf-text-muted);
}
.rate-btn:hover { border-color: var(--hf-primary); color: var(--hf-primary); }
.rate-btn.on.rate-good { background: var(--hf-success-light); border-color: var(--hf-success); color: var(--hf-success); }
.rate-btn.on.rate-bad { background: var(--hf-danger-light); border-color: var(--hf-danger); color: var(--hf-danger); }
.rating-grund {
  background: var(--hf-background); border: 1px solid var(--hf-border); color: var(--hf-text);
  border-radius: calc(var(--hf-radius) - 2px); padding: 4px 7px; font-size: 12px; font: inherit;
}

/* --- 5d. Stufenkarte (Bauwelle 1 Paket A, T109) -------------------------- */
.stufen { margin-top: 4px; }
.pill.art { color: var(--wb-on-fill); background: var(--hf-primary); border-color: var(--hf-primary); font-weight: 700; }
/* NEU-Stempel (Jan 2026-08-19). Accent gegen Weiß 5,2:1; Dark braucht dunkle Schrift,
   weil der Accent dort hell ist (#60a5fa — mit #18181b 7,0:1, mit Weiß nur 2,3:1). */
.pill.neu { color: var(--wb-on-fill); background: var(--hf-accent); border-color: var(--hf-accent); font-weight: 700; }
[data-theme="dark"] .pill.neu { color: var(--hf-card); }
.einwurf-box {
  border: 1px solid var(--hf-border); border-left: 3px solid var(--hf-accent);
  background: var(--hf-card); border-radius: var(--hf-radius);
  padding: 10px 14px; margin-bottom: 14px; display: grid; gap: 6px;
}
.einwurf-box p { margin: 0; font-size: 13.5px; }
.fuss { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hf-border);
  display: flex; flex-direction: column; gap: 10px; }
.fuss-zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fuss-aktionen { justify-content: space-between; }
.fuss-aktionen-rechts { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }

/* --- 5c. Creator-Memory abwählen (Strategie-Seite) ---------------------- */
.pillar-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pillar-row .btn-x { flex: none; }
.dismissed-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  color: var(--hf-text-muted); text-decoration: line-through; font-size: 13px;
  padding: 6px 2px; border-bottom: 1px solid var(--hf-border);
}
.dismissed-item form { text-decoration: none; }
.btn-link {
  border: 0; background: transparent; color: var(--hf-primary); cursor: pointer;
  font-size: 12px; text-decoration: underline; padding: 0; font: inherit;
}

/* --- 6. Formulare / Listen (Kanäle, Profil, Performance) ---------- */
.add-form { display: flex; gap: 8px; margin-bottom: 18px; }
.add-form input, .profile-form input, .profile-form textarea, .add-form select {
  width: 100%; background: var(--hf-card); border: 1px solid var(--hf-border);
  color: var(--hf-text); border-radius: var(--hf-radius); padding: 10px 12px; font: inherit;
}
.add-form select { width: auto; }
.chan-list { list-style: none; margin: 0; padding: 0; }
.chan-list li {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--hf-card); border: 1px solid var(--hf-border); border-radius: var(--hf-radius);
  padding: 10px 14px; margin-bottom: 8px; box-shadow: var(--hf-shadow);
}
.chan-list a { text-decoration: none; font-weight: 600; color: var(--hf-primary); }
.btn-x {
  border: 0; background: transparent; color: var(--hf-text-muted); cursor: pointer;
  font-size: 15px; padding: 4px 8px; border-radius: calc(var(--hf-radius) - 2px);
}
.btn-x:hover { color: var(--hf-danger); background: var(--hf-danger-light); }
.profile-form { display: flex; flex-direction: column; gap: 14px; }
/* Labels in Textfarbe statt hellgrau (Jan 2026-07-24: „Überschriften besser lesbar") */
.profile-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--hf-text); font-size: 13px; }
.profile-form input, .profile-form textarea { font-weight: 400; color: var(--hf-text); }
.profile-form textarea { resize: vertical; line-height: 1.5; }
.profile-form select, .add-form select {
  background: var(--hf-card); border: 1px solid var(--hf-border); color: var(--hf-text);
  border-radius: var(--hf-radius); padding: 10px 12px; font: inherit; font-weight: 400;
}
.profile-form .btn { align-self: flex-start; padding: 10px 18px; }

/* --- 6b. Voice-Eingabe (Profil einsprechen) ------------------------- */
.voice-box {
  background: var(--hf-card); border: 1px solid var(--hf-border); border-radius: var(--hf-radius);
  box-shadow: var(--hf-shadow); padding: 14px 16px; margin-bottom: 18px;
}
.voice-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.voice-btn { width: auto; }
.voice-btn.voice-recording { background: var(--hf-danger); }
.voice-btn.voice-recording:hover { background: var(--hf-danger); }
.voice-status { font-size: 13px; color: var(--hf-text-muted); font-weight: 600; }
.voice-status.voice-error { color: var(--hf-danger); }
.voice-note { margin: 8px 0 0; }
#voiceTranscriptBox { margin: 10px 0 0; }
label.voice-filled {
  background: var(--hf-accent-light); border-radius: var(--hf-radius);
  padding: 8px 10px; margin: -8px -10px 0;
}
.voice-field-hint {
  color: var(--hf-accent); font-size: 12px; font-weight: 600; margin-bottom: 2px;
}

/* --- 7. Responsive (Sidebar -> Topbar unter 768px) ---------------- */
@media (max-width: 768px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    position: static; height: auto; width: 100%; flex: none;
    flex-direction: row; align-items: center; gap: 10px; overflow-x: auto;
    border-right: 0; border-bottom: 1px solid var(--hf-border);
    padding: 10px 12px;
  }
  .sidebar .brand { padding: 4px 10px 4px 0; white-space: nowrap; }
  .sidebar nav { flex-direction: row; flex: none; }
  .sidebar nav a { white-space: nowrap; }
  .sidebar-foot { flex-direction: row; margin-top: 0; margin-left: auto; }
  /* .theme-toggle stand hier mit drin, solange der Umschalter im Fuß der Seitenleiste
     saß und dort in einer Zeile mit dem Scan-Knopf lag. Seit dem Umzug ins Konto-Menü
     ist er der einzige Knopf in seinem Feld und soll dessen Breite nehmen. */
  .btn-scan { width: auto; white-space: nowrap; }
}

@media (max-width: 560px) {
  .thumb img, .thumb-ph { width: 64px; height: 64px; }
  main { padding: 20px 14px 80px; }
}

/* T071: Auf dem Handy scrollte die ganze Seite waagerecht. Bei 420 px Fensterbreite
   gemessen waren es drei Verursacher, alle im Inhalt (die Seitenleiste scrollt bereits
   in sich selbst): eine Compliance-Pille mit langem Hinweistext (831 px breit), ein
   Auswahlfeld im Profil und die Tabelle der Beobachtungs-Seite. Breites darf breit
   bleiben — aber es scrollt im eigenen Kasten, nicht im Dokument. */
@media (max-width: 768px) {
  .pill { max-width: 100%; white-space: normal; }
  main select, main input, main textarea { max-width: 100%; }
  main table { display: block; overflow-x: auto; max-width: 100%; }
}

/* --- 8. Kanäle-Liste (channels.html) ---------------------------- */
.chan-list li { display: block; padding: 14px 16px; }
.chan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.chan-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.region-badge { border: 0; }
.region-badge.region-de { color: var(--hf-warning); background: var(--hf-warning-light); border-color: var(--hf-warning); }
.chan-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.chan-stats { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--hf-text-muted); margin-bottom: 6px; }
.chan-stats b { color: var(--hf-text); font-weight: 600; }
.chan-bio { font-size: 13px; color: var(--hf-text-muted); margin: 0 0 8px; display: -webkit-box;
            -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chan-bio.muted { font-style: italic; }
.chan-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: var(--hf-accent-light); color: var(--hf-accent); border: 1px solid var(--hf-accent);
}
.chan-list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }

/* --- 9. Meine Videos (performance.html) ------------------------- */
.own-list { list-style: none; margin: 0 0 4px; padding: 0; }
.own-list li { border-bottom: 1px solid var(--hf-border); padding: 10px 0; }
.own-list .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.own-list .pill { font-variant-numeric: tabular-nums; }
.own-list details { margin-top: 6px; }
.own-list summary { cursor: pointer; font-size: 12px; color: var(--hf-text-muted); }
.enrich-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.enrich-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--hf-text-muted); font-weight: 600; }
.enrich-form input, .enrich-form textarea { font-weight: 400; color: var(--hf-text); }
.enrich-form .btn { align-self: flex-end; }

/* Fit-Score-Begründungen (aufklappbar unter den Pillen) */
.fit-notes { margin: 6px 0 2px; }
.fit-notes summary { cursor: pointer; font-size: 12px; color: var(--hf-text-muted); }
.fit-notes dl { margin-top: 6px; }

/* --- 10. Onboarding-Wizard v2 + Video-Arten (2026-07-24) -------- */
/* Fortschrittsbalken zentriert, Pfeile zwischen den Schritten (Jan 2026-08-17) */
.wizard-progress {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: center;
  margin: 4px 0 22px; padding: 0; list-style: none;
}
.wizard-progress li {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--hf-text-muted); padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--hf-border); background: var(--hf-card);
}
.wizard-progress li.current {
  color: var(--wb-on-fill); background: var(--hf-primary); border-color: var(--hf-primary); font-weight: 600;
}
.wizard-progress li.done { color: var(--hf-success); border-color: var(--hf-success); }
.wizard-progress li.done::before { content: "✓"; font-weight: 700; }
.wizard-progress li.wsep {
  border: 0; background: none; padding: 0; font-size: 15px; font-weight: 700;
  color: var(--hf-border); user-select: none;
}
.verify-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 4px; }
.verify-row input { flex: 1; min-width: 220px; }
a.btn-scan { display: inline-block; text-decoration: none; text-align: center; }
.wstep { display: none; }
.wstep.active { display: block; }
.wstep h2 { margin-top: 0; }
.wizard-nav { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.wizard-nav .spacer { flex: 1; }
.arten-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px; margin-top: 8px;
}
.arten-check {
  display: flex !important; gap: 10px; align-items: flex-start;
  border: 1px solid var(--hf-border); border-radius: calc(var(--hf-radius) - 2px);
  padding: 10px 12px; cursor: pointer; font-weight: normal !important;
  background: var(--hf-card);
}
.arten-check:has(input:checked) {
  border-color: var(--hf-primary); background: var(--hf-sidebar-active);
}
.arten-check input { width: auto !important; margin-top: 3px; }
.arten-check .sub { margin: 0; font-size: 12px; }
.watchrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.watchrow input { flex: 1; min-width: 140px; }
.wizard-summary dt { font-weight: 600; margin-top: 8px; }
.wizard-summary dd { margin: 2px 0 0; color: var(--hf-text-muted); }

/* ---- U2: Karten-Stapel und Drehbuch-Bildschirm (§6.3) -------------------------
   Nur bestehende Tokens (--hf-*). Keine rohen Farbwerte: die Gestaltung aus Jans
   Vorlage soll in U6 ein reiner Token-Tausch bleiben. */
.stapel-kopf { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.stapel-zaehler { margin: 0; font-weight: 700; color: var(--hf-text); }
/* T239: der Filter-Zusatz ist leiser als die Zahl, in derselben Farbe — lesbar wie der Satz. */
.stapel-filter { font-weight: 400; }
.stapel-kopf-rechts { display: flex; gap: 8px; flex-wrap: wrap; }
.stapel-karte { background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius); box-shadow: var(--hf-shadow); padding: 20px; }
.stapel-bild { width: 100%; max-height: 200px; object-fit: cover;
  border-radius: var(--hf-radius); margin-bottom: 14px; }
.stapel-karte .hook { margin: 0 0 10px; font-size: 22px; line-height: 1.3; }
.stapel-warum { margin: 0 0 8px; color: var(--hf-text-muted); }
.stapel-machart { margin: 0 0 16px; font-weight: 600; color: var(--hf-text); }
.stapel-haupt { margin-bottom: 12px; }
.stapel-neben { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.btn-gross { display: inline-block; width: 100%; text-align: center;
  padding: 14px 18px; font-size: 17px; font-weight: 700; }
.warum > summary { cursor: pointer; font-weight: 600; color: var(--hf-text-muted);
  padding: 8px 0; }
.warum-inhalt { padding-top: 8px; border-top: 1px solid var(--hf-border); }
.danach { background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius); padding: 14px; margin-bottom: 16px; }
.danach-titel { margin: 0 0 10px; font-weight: 700; }
.danach-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Fokus-Bildschirm ohne Navigationsleiste (R8) — eigene Hülle statt .app-shell. */
body.fokus { background: var(--hf-background); color: var(--hf-text); }
.fokus-wrap { max-width: 720px; margin: 0 auto; padding: 16px 16px 110px;
  min-height: 100vh; }
.fokus-kopf { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; }
.fokus-inhalt .hook { font-size: 22px; line-height: 1.3; margin: 0 0 16px; }
.fokus-inhalt h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--hf-text-muted); margin: 20px 0 8px; }
.sprech-text { background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius); padding: 14px; margin: 0 0 10px; line-height: 1.55; }
/* Eigene Ebene über dem Inhalt: werkbank.css hebt `main` und `.flash` auf z-index 1, und
   seit U5 steht das Drehbuch fest in der Werkbank — ohne z-index lag der Inhalt über dem
   Knopf „Gedreht“ (probe_drehbuch_leiste.py). */
.fokus-fuss { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; padding: 12px 16px;
  background: var(--hf-background); border-top: 1px solid var(--hf-border); }
.fokus-fuss form { max-width: 720px; margin: 0 auto; }

/* --- Einrichtung (U3, §6.5): eine Frage je Bildschirm ---------------------- */
/* Nur bestehende Tokens, keine rohen Farbwerte, keine neuen Schriften — die
   Gestaltung kommt in U6 aus Jans Vorlage und soll dann ein Token-Tausch sein. */
.einr-fortschritt { margin: 0 0 20px; }
.einr-balken { height: 6px; border-radius: 999px; background: var(--hf-border);
  overflow: hidden; }
.einr-balken > span { display: block; height: 100%; background: var(--hf-primary);
  transition: width .25s ease; }
.einr-zaehler { margin: 6px 0 0; font-size: 12px; }
.einr-fuss { display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-top: 20px; }
.einr-fuss .btn { flex: 1; min-width: 140px; }
.einr-treffer { border: 1px solid var(--hf-border); border-radius: var(--hf-radius);
  background: var(--hf-card); padding: 12px 14px; margin: 10px 0 0; }
.einr-befund { border: 1px solid var(--hf-border); border-radius: var(--hf-radius);
  background: var(--hf-card); padding: 4px 14px 14px; margin: 0 0 14px; }
.einr-befund h2 { margin: 14px 0 4px; }
.einr-befund p { margin: 0; }
.einr-empfohlen { border-color: var(--hf-primary); }
.einr-warten { margin-top: 18px; }
.einr-schritt { font-size: 17px; margin: 0 0 12px; }
/* Der Balken eines laufenden Schritts zeigt Bewegung, nicht einen erfundenen Anteil:
   wie weit ein Lauf ist, wissen wir nicht — wie lange er schon läuft, steht daneben. */
.einr-balken-laeuft > span { width: 40%; animation: einr-wandern 1.6s ease-in-out infinite; }
@keyframes einr-wandern {
  0% { margin-left: -40%; } 100% { margin-left: 100%; }
}

/* --- 14. Dreh-Liste + „Wie lief das Video?" (B1, Entwurf 18.09.) -------------
   Keine eigenen Farbwerte: alles aus den Tokens oben. Die Zeilen sind bewusst
   keine .card — eine Dreh-Liste ist eine Liste, keine Kartensammlung (im Entwurf
   „tile"-Zeilen mit Titel, Machart und Knopfzeile). */
.dreh-zahl { font-weight: 700; color: var(--hf-text); font-variant-numeric: tabular-nums; }
.dreh-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.dreh-filter-titel {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--hf-text-muted);
}
.dreh-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dreh-chips .chip { text-decoration: none; cursor: pointer; }
/* Der gewählte Chip ist gefüllt. Jedes Design, das .chip selbst einfärbt, braucht dazu
   seine eigene Ausnahme (siehe werkbank.css) — sonst steht die Wahl unsichtbar da. */
/* Tinte auf Papier, gedreht — dasselbe Paar, das jede Ansicht für Text und Fläche
   benutzt. Der Akzent wäre hier zu hell gewesen: weiße Schrift auf --hf-accent trägt in
   der hellen Ansicht 3,66:1 und damit weniger als die geforderten 4,5:1 (gemessen von
   scripts/probe_b1_drehliste.py in 3 der 12 Design/Ansicht-Kombinationen). */
.dreh-chips .chip-an { background: var(--hf-text); color: var(--hf-background); border-color: var(--hf-text); }
.dreh-zeile {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; padding: 12px 14px; margin-bottom: 8px;
  background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius);
}
.dreh-zeile-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 260px; }
.dreh-zeile-text b { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--hf-text); }
.dreh-zeile-text small { font-size: 12px; color: var(--hf-text-muted); }
.dreh-zeile-text .pill { align-self: flex-start; margin-top: 4px; }
.dreh-zeile-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dreh-zeile-flach { background: transparent; }
.dreh-abgedreht { margin-top: 22px; }
.dreh-abgedreht > summary {
  cursor: pointer; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.dreh-abgedreht > summary .section-head { margin: 0; }
.dreh-abgedreht > summary .sub { margin: 0; font-variant-numeric: tabular-nums; }
.dreh-hinweis { color: var(--hf-text-muted); font-size: 14px; margin: 10px 0 0; }
.dreh-fuss { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.dreh-fuss .sub { margin: 0; }

.gelaufen-karte { font-weight: 600; color: var(--hf-text); }
.gelaufen-wahl { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.gelaufen-antwort {
  display: flex; flex-direction: column; gap: 2px; cursor: pointer;
  padding: 12px 14px; border: 1px solid var(--hf-border); border-radius: var(--hf-radius);
  background: var(--hf-card);
}
/* Die getroffene Wahl ist sichtbar, bevor gespeichert wird — sonst weiß niemand, was
   „Speichern" gleich schreibt. */
.gelaufen-antwort:has(input:checked) { border-color: var(--hf-accent); background: var(--hf-accent-light); }
.gelaufen-antwort input { position: absolute; opacity: 0; pointer-events: none; }
/* Das Feld ist unsichtbar, aber weiterhin mit der Tastatur erreichbar — ohne diese
   Zeile wanderte der Fokus durch die drei Antworten, ohne dass man sähe, wo er steht. */
.gelaufen-antwort:has(input:focus-visible) { outline: 2px solid var(--hf-focus-ring); outline-offset: 2px; }
.gelaufen-name { font-weight: 600; color: var(--hf-text); }
.gelaufen-zu { font-size: 13px; color: var(--hf-text-muted); }
.gelaufen-fuss { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* „Verwerfen: Warum?" (T197) nimmt die 10er-Skala der Bewertungszeile — dort ist das
   Feld abgeschaltet (display: none) und die Skala nur mit dem Finger bedienbar. Hier
   bleibt es unsichtbar, aber mit der Tastatur erreichbar, wie die Antworten darüber. */
.verwerfen-skala .rate-btn { position: relative; }
.verwerfen-skala .rate-btn input[type="radio"] { display: block; position: absolute; opacity: 0; pointer-events: none; }
.verwerfen-skala .rate-btn:has(input:focus-visible) { outline: 2px solid var(--hf-focus-ring); outline-offset: 2px; }

/* --- 15. Die zwei Übergänge (Jan 18.09.) ------------------------------------
   EINE Regel: ändert sich die Ebene, ist es Tiefe (500 ms); bleibt sie gleich, ist es
   Schub (300 ms). Keyframes und Bahnkurven unverändert aus dem Entwurf
   (design/2026-09-18-prototyp-werkstatt.html). Welcher Bildschirm auf welcher Ebene
   liegt, steht in webui/app.py (UEBERGANG_EBENE), nicht hier.

   Gebaut ist der EINTRETENDE Halbzug: eine server-gerenderte Seite hat den Bildschirm,
   den sie ablöst, nicht mehr im Dokument. `--richtung` dreht ihn für den Rückweg um. */
@keyframes schubRein { from { transform: translateX(var(--weg)); } to { transform: translateX(0); } }
@keyframes tiefeRein { from { opacity: 0; transform: scale(var(--rein-von)); } to { opacity: 1; transform: scale(1); } }
@keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }

[data-uebergang] { --weg: 100%; --rein-von: .90; }
[data-uebergang][data-richtung="zurueck"] { --weg: -100%; --rein-von: 1.10; }
.rein[data-uebergang="schub"] { animation: schubRein 300ms cubic-bezier(.22,.9,.2,1) both; }
.rein[data-uebergang="tiefe"] { animation: tiefeRein 500ms cubic-bezier(.32,.72,0,1) both; }
/* Der eintretende Bildschirm startet neben der Fläche: ohne diesen Schnitt entsteht für
   die Dauer des Schubs eine waagerechte Bildlaufleiste. Nur dort, wo er wirklich liegt. */
main:has(> .uebergang), body.fokus:has(> .uebergang) { overflow-x: clip; }
/* Wer weniger Bewegung eingestellt hat, bekommt sie nicht — die Seite erscheint. */
@media (prefers-reduced-motion: reduce) {
  .rein[data-uebergang] { animation: einblenden 200ms linear both; }
}

/* --- 16. Kommentare (B2, Entwurf 18.09.) -------------------------------------
   Keine eigenen Farbwerte: alles aus den Tokens oben. Der Posteingang bleibt eine
   Liste (Jan-Entscheid W-B1) — deshalb braucht er keine Karten-Mechanik, nur die
   Zahl im Kopf und den Kasten, der auf die Kommentar-Ideen führt. */
.kom-zahl, .kom-ideen-zahl { font-weight: 700; font-variant-numeric: tabular-nums; }
.kom-zahl { color: var(--hf-text); }
.kom-ideen-kasten a { text-decoration: none; color: var(--hf-text); }
.kom-ideen-kasten a:hover { text-decoration: underline; }
/* Die Gründe auf „Mehr" sind Knöpfe, keine Beschriftungen: sie schreiben ihren Text
   ins Feld. Ohne diese Zeile sähen sie aus wie Pillen und niemand tippte darauf. */
button.chip { cursor: pointer; font-family: inherit; }
button.chip:focus-visible { outline: 2px solid var(--hf-focus-ring); outline-offset: 2px; }
/* --- 17. B3: Profil und Quellen (Entwurf 18.09.) ---------------------------
   Fünf Bildschirme: Profil (Reiter) · Strategie · Quellen · Wissen über dich · Trends.
   Alle Farben kommen aus der Token-Schicht oben (`--hf-*`); eine rohe Farbe hier würde
   bei einem Design-Wechsel stehen bleiben, während der Rest der Seite mitgeht. */

/* Der Rückweg auf den Elternbildschirm. Er ersetzt die Ebene nicht, die der Übergang
   fährt — er zeigt sie nur an: wo dieser Knopf steht, liegt der Bildschirm unter
   seinem Ziel. */
.zurueck {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--hf-text-muted); text-decoration: none;
  font-size: 14px; margin-bottom: 10px;
}
.zurueck:hover { color: var(--hf-text); }
.zurueck span { font-size: 18px; line-height: 1; }

.profil-block { margin-bottom: 26px; }
.profil-block-kopf { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.profil-block-kopf .section-head { margin-bottom: 8px; }

.profil-kachel {
  background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius); padding: 12px 14px; margin-bottom: 8px;
}
.profil-kachel-titel {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--hf-text-muted); margin-bottom: 4px;
}
.profil-kachel-text { margin: 0; color: var(--hf-text); }
.profil-kachel-leer { color: var(--hf-text-muted); font-style: italic; }
.profil-fuss { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }

/* Eine Zeile, die auf einen anderen Bildschirm führt. Sie ist ein Link, kein Knopf:
   ein Wechsel des Bildschirms ist Navigation, und nur so trägt sie den Referer, aus
   dem der Übergang seine Herkunft liest. */
.profil-zeile {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius); padding: 13px 14px; margin-bottom: 8px;
  text-decoration: none; color: var(--hf-text);
}
.profil-zeile:hover { border-color: var(--hf-accent); }
.profil-zeile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profil-zeile-text b { color: var(--hf-text); }
.profil-zeile-text small { color: var(--hf-text-muted); font-size: 13px; }
.profil-zeile-pfeil { color: var(--hf-text-muted); font-size: 20px; line-height: 1; flex: none; }
/* Die Betonung kommt aus dem Schriftgewicht, nicht aus der Farbe: `--hf-accent` trägt
   gegen `--hf-card` nur 3,99:1 in drei von zwölf Kombinationen aus Design und Ansicht
   (klipwerk, nachtschicht und signal im Hellmodus — gemessen, nicht geschätzt).
   `--hf-text` trägt in allen zwölf. Dieselbe Lehre wie am 19.09. beim gefüllten Chip. */
.quellen-zahl {
  color: var(--hf-text); font-weight: 700; font-variant-numeric: tabular-nums; flex: none;
}

.quellen-gruppe { margin-bottom: 18px; }
.quellen-gruppe-kopf { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.quellen-gruppe-titel {
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--hf-text-muted);
}
/* Die Wege sind `<details>`, kein Panel, das ein Skript ein- und ausblendet: der
   Bildschirm bleibt ohne JavaScript bedienbar, und der W13-Zaun deckt Formulare. */
.quellen-weg {
  background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius); margin-bottom: 8px;
}
.quellen-weg[open] { border-color: var(--hf-accent); }
.quellen-weg > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 14px; cursor: pointer; list-style: none;
}
.quellen-weg > summary::-webkit-details-marker { display: none; }
.quellen-weg > summary::after {
  content: "+"; color: var(--hf-text-muted); font-size: 18px; line-height: 1; flex: none;
}
.quellen-weg[open] > summary::after { content: "–"; }
.quellen-weg-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quellen-weg-text small { color: var(--hf-text-muted); font-size: 13px; }
.quellen-weg-inhalt { padding: 0 14px 14px; }
.quellen-feld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.quellen-feld-label { font-size: 13px; color: var(--hf-text-muted); }

.quellen-liste-kopf { display: flex; align-items: baseline; gap: 10px; margin-top: 22px; }
.quellen-liste-kopf .section-head { margin-bottom: 8px; }
.quellen-zeile {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--hf-border); border-radius: var(--hf-radius);
  padding: 11px 14px; margin-bottom: 6px;
}
.quellen-zeile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quellen-zeile-text small { color: var(--hf-text-muted); font-size: 13px; }
.quellen-fuss { margin-top: 26px; }

.ziele-form { margin-bottom: 18px; }
.ziele-feld { display: flex; flex-direction: column; gap: 4px; }
.ziele-feld-label { font-size: 13px; color: var(--hf-text-muted); }
.ziele-feld textarea { width: 100%; }
.ziele-knoepfe { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* --- 18. B4: Zahlen und die Verknüpfung (Entwurf 18.09.) -------------------
   Farben ausschließlich aus der Token-Schicht. Die Balken tragen ihre Fläche über
   `--hf-text`, nicht über die Akzentfarbe: gemessen trägt `--hf-accent` gegen
   `--hf-card` in drei von zwölf Kombinationen aus Design und Ansicht nur 3,99:1. */
.zahlen-kacheln {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin-bottom: 22px;
}
.zahlen-kachel {
  background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.zahlen-kachel-titel { font-size: 12px; color: var(--hf-text-muted); }
.zahlen-kachel-titel small { display: block; font-size: 11px; }
.zahlen-kachel-wert {
  font-size: 26px; font-weight: 700; color: var(--hf-text);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}

.zahlen-verlauf {
  background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius); padding: 14px; height: 140px;
}
.zahlen-saeulen { display: flex; align-items: flex-end; gap: 3px; height: 100%; }
.zahlen-saeulen i {
  flex: 1; min-width: 4px; min-height: 2px; display: block;
  background: var(--hf-text); border-radius: 2px 2px 0 0;
}
.zahlen-bandfuss {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-size: 12px; color: var(--hf-text-muted); margin: 6px 0 22px;
}

.zahlen-machart {
  display: flex; align-items: center; gap: 12px; padding: 9px 0;
  border-bottom: 1px solid var(--hf-border);
}
.zahlen-machart-name { flex: 0 0 34%; min-width: 0; color: var(--hf-text); }
.zahlen-machart-balken {
  flex: 1; height: 8px; background: var(--hf-sidebar-active);
  border-radius: 4px; overflow: hidden;
}
.zahlen-machart-balken i { display: block; height: 100%; background: var(--hf-text); }
.zahlen-machart-wert {
  flex: none; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--hf-text);
}
.zahlen-machart-wert small { font-weight: 400; color: var(--hf-text-muted); }

.zahlen-fehlt {
  background: var(--hf-card); border: 1px dashed var(--hf-border);
  border-radius: var(--hf-radius); padding: 14px; margin-bottom: 22px;
}
.zahlen-fehlt p { margin: 0 0 6px; }

/* Die Frage, nicht die Tatsache: sie steht abgesetzt, damit niemand sie für eine
   gesetzte Verknüpfung hält. */
.zuordnung-frage {
  background: var(--hf-card); border: 1px solid var(--hf-accent);
  border-radius: var(--hf-radius); padding: 13px 14px; margin-bottom: 10px;
}
.zuordnung-paar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.zuordnung-seite { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.zuordnung-label { font-size: 12px; color: var(--hf-text-muted); }
.zuordnung-pfeil { color: var(--hf-text-muted); font-size: 20px; flex: none; }
.zuordnung-knoepfe { display: flex; gap: 10px; align-items: center; margin-top: 10px; }

/* Der Beleg und der ungeprüfte Satz des Modells stehen in ZWEI Flächen (N1). Der Beleg
   ist als Zitat gesetzt — eingerückt, mit eigener Kante — und trägt darunter, was für ihn
   gilt. Seit T215 Form E zwei Zitate aus dem Quelltext, je mit Herkunft darüber. */
.zuordnung-beleg {
  margin: 11px 0 9px; padding: 2px 0 2px 12px;
  border-left: 3px solid var(--hf-accent);
}
.zuordnung-beleg p { margin: 0; font-size: 14px; font-style: italic; color: var(--hf-text); }
.zuordnung-beleg p + p { margin-top: 6px; }
.zuordnung-beleg .beleg-quelle {
  display: block; font-size: 12px; font-style: normal; color: var(--hf-text-muted);
}
/* Der Zusammenhang um die Stelle — Satz davor, Anfang und Rest ihres Satzes — ist nicht
   Stelle: dasselbe Farbpaar wie die Beschriftung darunter (--hf-text-muted auf der
   Kartenfläche), kein neues. */
.zuordnung-beleg .beleg-davor,
.zuordnung-beleg .beleg-danach { color: var(--hf-text-muted); }
.zuordnung-beleg cite {
  display: block; margin-top: 3px; font-size: 12px; font-style: normal;
  color: var(--hf-text-muted);
}
/* Die Kennzeichnung steht VOR dem Satz, nicht dahinter: wer den Satz liest, hat sie
   dann schon gelesen. */
.zuordnung-grund { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 14px; }
.zuordnung-grund-fuss { margin: 3px 0 0; font-size: 12px; color: var(--hf-text-muted); }
/* Gefüllt, und zwar mit Tinte auf Papier, gedreht — dasselbe Paar wie beim gewählten
   Dreh-Chip und aus demselben Grund: --hf-accent als Fläche trägt in drei der zwölf
   Design/Ansicht-Kombinationen nur 3,66:1 (gemessen 19.09., B1). Jedes Design, das
   .chip selbst einfärbt, braucht dazu seine eigene Ausnahme (werkbank.css) — sonst
   steht die Kennzeichnung unsichtbar da und der ungeprüfte Satz sieht aus wie der
   geprüfte. */
.chip-unbestaetigt {
  background: var(--hf-text); color: var(--hf-background); border-color: var(--hf-text);
  flex: none;
}

.zahlen-videos { margin-top: 26px; }
.zahlen-videos > summary {
  display: flex; align-items: baseline; gap: 10px; cursor: pointer;
  padding: 12px 0; border-top: 1px solid var(--hf-border);
}
.zahlen-videos > summary .section-head { margin: 0; }
.zahlen-videos-inhalt { padding-top: 8px; }
.zahlen-band {
  display: flex; align-items: flex-end; gap: 4px; height: 90px;
  background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius); padding: 10px;
}
.zahlen-band i { flex: 1; min-height: 2px; display: block; border-radius: 2px 2px 0 0; }
.zahlen-band i.ueber { background: var(--hf-text); }
.zahlen-band i.unter { background: var(--hf-text-muted); }
.zahlen-video {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--hf-border); padding: 10px 0;
}
.zahlen-video-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.zahlen-video-text small { color: var(--hf-text-muted); font-size: 13px; }
.zahlen-video-ab {
  flex: none; font-weight: 700; color: var(--hf-text); font-variant-numeric: tabular-nums;
}
/* Von Hand zuordnen (B4, Review-Befund F5): die Auswahl steht in der Videozeile, damit
   sie dort ist, wo die Frage entsteht. */
.zahlen-vonhand { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.zahlen-vonhand-feld { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.zahlen-vonhand select { max-width: 220px; }

/* --- 18. B6: Video einwerfen und In Arbeit (Entwurf 18.09.) ------------------
   Zwei Bildschirme des Entwurfs: `einwerfen` als eigene Seite, `arbeit` als Ablage auf
   dem Ideen-Bildschirm. Alle Farben aus der Token-Schicht oben (`--hf-*`); das
   Werkstatt-Aussehen trägt werkbank.css, Abschnitt 15. Wo etwas gewählt oder gefüllt
   ist, steht das Paar Tinte/Papier gedreht (`--hf-text` auf `--hf-background`) — das
   einzige Paar, das in allen zwölf Kombinationen aus Design und Ansicht trägt
   (Lehre B1, 19.09.). */

/* Unsichtbar, aber für die Vorlesehilfe da. */
.einwurf-unsichtbar {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Eine Spalte wie im Entwurf (760 px), auch am Rechner. */
.einwurf-seite { max-width: 760px; margin: 0 auto; }
.einwurf { display: flex; flex-direction: column; gap: 16px; }

/* Umschalter Link · Datei · Sprechen und der Stil darunter: Radioknöpfe, damit der
   Bildschirm ohne Skript umschaltet und die Pfeiltasten wandern wie bei jeder Auswahl.
   Das Feld selbst ist unsichtbar, aber fokussierbar — der Fokus zeigt sich am Etikett. */
.einwurf-wahl, .einwurf-segmente {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 3px;
  border: 1px solid var(--hf-border); border-radius: 999px; background: var(--hf-background);
  max-width: 100%;
}
.einwurf-wahl { align-self: center; }
.einwurf-wahl input, .einwurf-segmente input {
  position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0;
}
.einwurf-wahl label, .einwurf-segmente label {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 999px; cursor: pointer; white-space: nowrap;
  font-size: 14px; font-weight: 500; color: var(--hf-text-muted);
}
.einwurf-wahl input:checked + label, .einwurf-segmente input:checked + label {
  background: var(--hf-text); color: var(--hf-background);
}
.einwurf-wahl input:focus-visible + label, .einwurf-segmente input:focus-visible + label {
  outline: 2px solid var(--hf-focus-ring); outline-offset: 2px;
}
/* Abgeschaltet wie im Entwurf (`.wahl[disabled]`): gedämpft, nicht wählbar. */
.einwurf-segmente input:disabled + label { cursor: not-allowed; opacity: .55; }

/* Ein Kasten je Weg, mit Kopfzeile wie im Entwurf: links der Weg, rechts, was er nimmt. */
.einwurf-panel {
  background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius); padding: 12px; margin: 0;
}
.einwurf-kopf {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 2px 4px 10px;
}
.einwurf-kopf, .einwurf-etikett {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--hf-text-muted);
}
.einwurf-kachel { display: block; padding: 4px; }
.einwurf-feld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.einwurf-feld input, .einwurf-feld textarea, .regeln-text {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 15px;
  color: var(--hf-text); background: var(--hf-background);
  border: 1px solid var(--hf-border); border-radius: var(--hf-radius);
}
.einwurf-feld textarea { min-height: 96px; resize: vertical; }
.einwurf-feld input::placeholder, .einwurf-feld textarea::placeholder,
.regeln-text::placeholder { color: var(--hf-text-muted); }

/* „Erkannt“: welche Marke der eingefügte Link trägt. Nur Anzeige, keine Knöpfe. */
.einwurf-marken { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.einwurf-marken .chip {
  font-size: 13px; font-weight: 500; padding: 5px 11px;
  background: var(--hf-background); color: var(--hf-text-muted); border-color: var(--hf-border);
}
.einwurf-marken .chip.chip-an {
  background: var(--hf-text); color: var(--hf-background); border-color: var(--hf-text);
}
.einwurf-hinweis { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--hf-text-muted); }

/* Ablagefeld für die Datei — und derselbe Platz für die Sprachnotiz. Die gestrichelte
   Kante trägt `--hf-text-muted`: `--hf-border` wäre auf der Karte kaum zu sehen. */
.einwurf-ablage {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 24px 16px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--hf-text-muted); border-radius: var(--hf-radius);
  color: var(--hf-text);
}
.einwurf-ablage input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.einwurf-ablage:has(input:focus-visible) { outline: 2px solid var(--hf-focus-ring); outline-offset: 2px; }
.einwurf-ablage.ueber { border-style: solid; border-color: var(--hf-text); }
.einwurf-ablage svg { color: var(--hf-text-muted); }
.einwurf-ablage b { font-size: 15px; font-weight: 600; }
.einwurf-ablage small { font-size: 13px; color: var(--hf-text-muted); }
.einwurf-dateiname {
  margin-top: 4px; padding: 4px 8px; border-radius: 6px; font-size: 13px;
  background: var(--hf-background); color: var(--hf-text); border: 1px solid var(--hf-border);
}

.einwurf-stil { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; }
.einwurf-stil .einwurf-hinweis { margin: 0; text-align: center; }

/* Der feste Fuß: klebt unten, bis der Inhalt zu Ende ist. Der Schatten in der Farbe
   der Fläche lässt den Inhalt darunter weich auslaufen statt an einer Kante. */
.einwurf-fuss {
  position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: center;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--hf-background); box-shadow: 0 -14px 20px var(--hf-background);
}
.einwurf-fuss .btn-gross { width: 100%; }
/* Der Knopf eines Wegs, der gerade nicht darf (YouTube-Link, Sprechen ohne verstandenen
   Text), sieht abgeschaltet aus — sonst tippt man und nichts geschieht. */
.einwurf-fuss .btn:disabled { opacity: .55; cursor: not-allowed; }
@media (min-width: 769px) { .einwurf-fuss .btn-gross { width: auto; min-width: 260px; } }

/* Sichtbar ist nur der gewählte Weg. Ohne `:has()` stehen alle untereinander. */
@supports selector(:has(a)) {
  .einwurf:has(#weg-link:checked) .einwurf-weg:not([data-weg="link"]),
  .einwurf:has(#weg-datei:checked) .einwurf-weg:not([data-weg="datei"]),
  .einwurf:has(#weg-sprechen:checked) .einwurf-weg:not([data-weg="sprechen"]),
  .einwurf:not(:has(#weg-link:checked)) .einwurf-anweisungen { display: none; }
}
/* Ein Artikel nimmt weder Hinweis noch Stil — dann gibt es den Kasten nicht. */
.einwurf[data-link-art="artikel"] .einwurf-anweisungen { display: none; }

/* --- 18b. T209: Einsprechen auf Profil, Strategie und „Video einwerfen“ -----------
   Farben nur aus der Token-Schicht; das Werkstatt-Aussehen trägt werkbank.css. Der
   Platz der Sprachnotiz ist ein Knopf: gedrückt gehalten nimmt er auf, und solange die
   Aufnahme läuft, ist seine Kante durchgezogen. Kein Scrollen, kein Markieren und kein
   Kontextmenü beim Halten — sonst bricht das Handy die Aufnahme ab. */
.voice-btn svg { vertical-align: -3px; }
/* Dasselbe für „Einsprechen“ auf Profil und Strategie — ohne diese Zeile nahm der Browser
   einen rutschenden Finger als Scrollen und brach die Aufnahme ab (Befund B2, Runde 1). */
.voice-btn[data-ziel] { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button.einwurf-ablage {
  width: 100%; font: inherit; background: none;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
button.einwurf-ablage:focus-visible { outline: 2px solid var(--hf-focus-ring); outline-offset: 2px; }
button.einwurf-ablage:disabled { cursor: progress; }
.einwurf-ablage[aria-pressed="true"] { border-style: solid; border-color: var(--hf-danger); }
.einwurf-status { margin: 10px 4px 8px; }

/* In Arbeit: die Ablage auf dem Ideen-Bildschirm (Jans Feedback 18.09.: „Neu schreiben
   blockiert nicht“). Unter 1080 px klebt sie am unteren Rand, darüber steht sie als
   Spalte rechts neben der Karte. Sie klebt, statt fest zu stehen: ein festes Element
   innerhalb von `.uebergang` hinge nach einem Übergang an dessen Transform statt am
   Fenster (Lehre aus dem Entwurf, 18.09.). */
.stapel-spalte { min-width: 0; }
.ablage {
  background: var(--hf-card); border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius); box-shadow: var(--hf-shadow); padding: 6px;
}
.ablage-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px; }
.ablage-zeile + .ablage-zeile { border-top: 1px solid var(--hf-border); }
.ablage-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ablage-text b { font-size: 15px; font-weight: 600; color: var(--hf-text); }
.ablage-text small { font-size: 13px; color: var(--hf-text-muted); }
.ablage-marke {
  flex: none; padding: 4px 8px; border-radius: 6px; white-space: nowrap;
  font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums;
  background: var(--hf-background); color: var(--hf-text-muted); border: 1px solid var(--hf-border);
}
.ablage .btn { flex: none; }
/* Höchstens die Hälfte des Bildes: mit fünf fertigen Einwürfen hätte die klebende
   Ablage sonst den Stapel darunter fast ganz verdeckt. Der Rest rollt in ihr. */
.stapel-raster.mit-ablage .ablage {
  position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 3;
  margin-top: 16px; max-height: 45vh; overflow-y: auto;
}
@media (min-width: 1080px) {
  .stapel-raster.mit-ablage {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start;
  }
  .stapel-raster.mit-ablage .ablage { position: static; margin-top: 0; max-height: none; }
}
