/* E-Mail-Marketing (seit 13.10.2026 ganz in der Zentrale, unter Vertrieb) und die Seite Vertrieb.
   Eigene Datei, nur Klassen mit Präfix em- und vt-, damit nichts anderes in der Zentrale betroffen ist.
   Aufbau wie ein Posteingang in Close: Reiter als Kacheln, links die Arbeitsliste, rechts der Vorgang.
   Die Reiterfarben hat Moritz am 27. und 28.08.2026 festgelegt: Rückmeldung Türkis, KI-Vorschläge Lila, Anruf Grün,
   Termine Blau, Wiedervorlage Violett, Verloren Rot, die Archive grau und ruhig. */

:root {
  --em-tuerkis: var(--marke-tief);
  --em-tuerkis-zart: var(--marke-zart);
  --em-lila: oklch(0.52 0.17 318);
  --em-lila-zart: oklch(0.958 0.03 318);
  --em-gruen: oklch(0.5 0.13 155);
  --em-gruen-zart: oklch(0.957 0.035 155);
  --em-blau: oklch(0.5 0.13 262);
  --em-blau-zart: oklch(0.956 0.026 262);
  --em-violett: oklch(0.47 0.16 290);
  --em-violett-zart: oklch(0.956 0.03 290);
  --em-rot: oklch(0.53 0.17 25);
  --em-rot-zart: oklch(0.962 0.025 25);
  --em-gelb: oklch(0.5 0.11 75);
  --em-gelb-zart: oklch(0.965 0.045 88);
  --em-grau: oklch(0.45 0.02 230);
  --em-grau-zart: oklch(0.958 0.006 230);
}

.em-f-tuerkis { --k: var(--em-tuerkis); --k-zart: var(--em-tuerkis-zart); }
.em-f-lila { --k: var(--em-lila); --k-zart: var(--em-lila-zart); }
.em-f-gruen { --k: var(--em-gruen); --k-zart: var(--em-gruen-zart); }
.em-f-blau { --k: var(--em-blau); --k-zart: var(--em-blau-zart); }
.em-f-violett { --k: var(--em-violett); --k-zart: var(--em-violett-zart); }
.em-f-rot { --k: var(--em-rot); --k-zart: var(--em-rot-zart); }
.em-f-grau { --k: var(--em-grau); --k-zart: var(--em-grau-zart); }

.em-leise {
  color: var(--tinte-3);
}

.em-klein {
  margin: 8px 0 0;
  color: var(--tinte-3);
  font-size: 12.5px;
  line-height: 1.45;
}

.em-warn {
  color: var(--em-rot);
  font-weight: 560;
}

.em-punkt {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--k, var(--tinte-3));
}

.em-textknopf {
  padding: 0;
  border: 0;
  background: none;
  color: var(--marke-tief);
  font: inherit;
  font-size: 13.5px;
  font-weight: 580;
  cursor: pointer;
}

.em-textknopf:hover {
  text-decoration: underline;
}

.em-icon-knopf {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--tinte-3);
  cursor: pointer;
}

.em-icon-knopf:hover {
  background: var(--flaeche-3);
  color: var(--tinte);
}

.em-reihe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* ---------- Marken (Zustände auf Zeile und im Vorgang) ---------- */

.em-marke {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--flaeche-3);
  color: var(--tinte-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.em-t-tuerkis { background: var(--em-tuerkis-zart); color: var(--em-tuerkis); }
.em-t-lila { background: var(--em-lila-zart); color: var(--em-lila); }
.em-t-gruen { background: var(--em-gruen-zart); color: var(--em-gruen); }
.em-t-blau { background: var(--em-blau-zart); color: var(--em-blau); }
.em-t-violett { background: var(--em-violett-zart); color: var(--em-violett); }
.em-t-rot { background: var(--em-rot-zart); color: var(--em-rot); }
.em-t-gelb { background: var(--em-gelb-zart); color: var(--em-gelb); }
.em-t-grau { background: var(--em-grau-zart); color: var(--em-grau); }
.em-t-tuerkis-voll { background: var(--em-tuerkis); color: #fff; }
.em-t-lila-voll { background: var(--em-lila); color: #fff; }
.em-t-gruen-voll { background: var(--em-gruen); color: #fff; }
.em-t-blau-voll { background: var(--em-blau); color: #fff; }
.em-t-violett-voll { background: var(--em-violett); color: #fff; }
.em-t-rot-voll { background: var(--em-rot); color: #fff; }
.em-t-grau-voll { background: var(--em-grau); color: #fff; }
/* „dran“: wer auf dich wartet. Rot schlägt die Reiterfarbe (Moritz 27.08.2026). */
.em-t-dran { background: var(--em-rot-zart); color: var(--em-rot); }

/* ---------- Kopf ---------- */

.em-seite .titelzeile {
  margin-bottom: 16px;
}

.em-kopf-rechts {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.em-suchfeld {
  display: inline-flex;
  flex: 1 1 260px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 360px;
  max-width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--flaeche);
  box-shadow: var(--schatten-1);
  color: var(--tinte-3);
  cursor: text;
}

.em-suchfeld:focus-within {
  box-shadow: inset 0 0 0 2px var(--marke-tief);
}

.em-suche {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--tinte);
  font: inherit;
  font-size: 15px;
}

.em-suche::-webkit-search-cancel-button {
  cursor: pointer;
}

.em-auffrischen {
  flex: none;
  width: 40px;
  min-height: 40px;
  padding: 0;
}

.em-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.em-live-punkt {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--em-gruen);
  box-shadow: 0 0 0 0 color-mix(in oklch, var(--em-gruen) 50%, transparent);
  animation: em-puls 2.4s var(--ease-out) infinite;
}

.em-live-punkt.aus {
  background: var(--tinte-3);
  animation: none;
}

@keyframes em-puls {
  0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--em-gruen) 45%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .em-live-punkt {
    animation: none;
  }
}

.em-wartend {
  font-weight: 560;
  color: var(--tinte-2);
}

/* ---------- Bereiche: Coldmailing allgemein und Bewerber (seit 20.10.2026) ---------- */

/* Umschalter über den Reitern im Aussehen der Segmente der Zentrale (.segment): am Mac kompakt links, am Telefon über
   die ganze Breite. Wird er schmaler als die langen Namen, stehen die Kurzformen da, nichts bricht um oder läuft über. */
.em-bereich-wahl {
  container: em-bereich / inline-size;
  flex: none;
  width: min(100%, 460px);
  margin: 0 0 14px;
}

.em-bereich-wahl .em-bereich-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  font-size: 14px;
  white-space: nowrap;
}

.em-bereich-lang,
.em-bereich-kurz {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.em-bereich-kurz {
  display: none;
}

@container em-bereich (max-width: 419.98px) {
  .em-bereich-lang {
    display: none;
  }

  .em-bereich-kurz {
    display: inline;
  }
}

.em-bereich-zahl {
  flex: none;
}

/* Telefon: mit offenem Vorgang steht nur der Vorgang da (wie Reiter und Titel). */
@media (max-width: 899.98px) {
  .em-seite[data-vorgang-offen] .em-bereich-wahl {
    display: none;
  }
}

/* Suchtreffer aus dem anderen Bereich: dessen Name als umrandete Marke neben der Praxis, ruhiger als ein Zustand. */
.em-bereich-marke {
  flex: none;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--linie);
  color: var(--tinte-2);
}

/* Analyse: für welchen Bereich die Zahlen eines Abschnitts gelten. */
.em-bereich-schild {
  margin-left: 10px;
  vertical-align: 3px;
  letter-spacing: 0;
}

/* ---------- Reiter als Kacheln ---------- */

.em-reiter {
  display: flex;
  gap: 8px;
  margin: 0 calc(-1 * var(--seite)) 14px;
  padding: 2px var(--seite) 6px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  /* Einrasten mit dem Seitenrand: sonst klebt die erste Kachel (Lagebild) am Telefon angeschnitten am Rand. */
  scroll-padding-inline: var(--seite);
}

.em-reiter::-webkit-scrollbar {
  display: none;
}

.em-reiter-lage,
.em-reiter-arbeit,
.em-reiter-archiv {
  display: flex;
  gap: 8px;
}

/* Lagebild vorn (seit 29.10.2026): Glas wie die Kacheln des Lagebilds, mit feiner Linie von den Arbeitsreitern
   getrennt, damit man sieht, dass hier der Überblick beginnt. */
.em-reiter-lage {
  padding-right: 8px;
  border-right: 1px solid var(--linie);
}

.em-reiter-archiv {
  margin-left: auto;
  padding-left: 8px;
}

.em-reiter-kachel {
  display: grid;
  flex: none;
  gap: 3px;
  justify-items: start;
  min-width: 118px;
  padding: 10px 14px 11px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--flaeche);
  box-shadow: var(--schatten-1);
  color: var(--tinte-2);
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  transition:
    transform 140ms var(--ease-out),
    background-color 140ms var(--ease-out);
}

.em-reiter-kachel:hover {
  background: var(--flaeche-2);
}

.em-reiter-kachel:active {
  transform: scale(0.97);
}

.em-reiter-zahl {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--tinte);
  font-size: 24px;
  font-weight: 680;
  line-height: 1;
  letter-spacing: -0.02em;
}

.em-reiter-zahl svg {
  width: 22px;
  height: 22px;
  color: var(--tinte-2);
}

.em-reiter-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 580;
  white-space: nowrap;
}

/* Rückmeldung und KI-Vorschläge mit Inhalt: die Zahl trägt die Reiterfarbe, damit Wartendes auffällt. */
.em-reiter-kachel.em-wach .em-reiter-zahl {
  color: var(--k);
}

.em-reiter-kachel[aria-pressed='true'] {
  background: var(--nacht);
  box-shadow: none;
  color: oklch(0.86 0.02 220);
}

.em-reiter-kachel[aria-pressed='true'] .em-reiter-zahl,
.em-reiter-kachel[aria-pressed='true'] .em-reiter-zahl svg {
  color: #fff;
}

.em-reiter-kachel[aria-pressed='true'] .em-punkt {
  box-shadow: 0 0 0 2px var(--nacht), 0 0 0 3px color-mix(in oklch, var(--k) 60%, transparent);
}

/* Die Archive (Alle Leads, Analyse) ruhiger: „die will ich gar nicht so präsent haben“. */
.em-reiter-kachel.em-archiv:not([aria-pressed='true']) {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--linie);
}

.em-reiter-kachel.em-archiv:not([aria-pressed='true']) .em-reiter-zahl {
  color: var(--tinte-2);
  font-size: 20px;
}

.em-reiter-kachel.em-lage:not([aria-pressed='true']) {
  background: var(--glas);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--glas-schatten);
}

.em-reiter-kachel.em-lage:not([aria-pressed='true']) .em-reiter-zahl svg {
  color: var(--k);
}

/* ---------- Raum: Liste und Vorgang ---------- */

.em-raum {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.em-spalte-liste {
  min-width: 0;
}

.em-spalte-vorgang {
  min-width: 0;
  container-type: inline-size;
}

/* Telefon: Liste oder Vorgang, nie beides. */
@media (max-width: 899.98px) {
  .em-seite:not([data-vorgang-offen]) .em-spalte-vorgang {
    display: none;
  }

  .em-seite[data-vorgang-offen] .em-spalte-liste,
  .em-seite[data-vorgang-offen] .em-reiter,
  .em-seite[data-vorgang-offen] .titelzeile {
    display: none;
  }

  /* Ohne großen Titel steht oben die schmale Kopfleiste der Zentrale: der Vorgang beginnt darunter. */
  .em-seite[data-vorgang-offen] {
    padding-top: calc(var(--oben) + 54px);
  }
}

@media (min-width: 900px) {
  /* Am Mac scrollen Liste und Vorgang je für sich, die Seite selbst steht (wie ein Postfach). */
  .em-seite:not([data-analyse]) {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    padding-bottom: 0;
    overflow: hidden;
  }

  .em-seite:not([data-analyse]) .em-raum {
    flex: 1;
    min-height: 0;
    grid-template-columns: clamp(300px, 28vw, 420px) minmax(0, 1fr);
    padding-bottom: 20px;
  }

  .em-seite:not([data-analyse]) .em-spalte-liste {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: var(--flaeche);
    border-radius: var(--radius-l);
    box-shadow: var(--schatten-1);
  }

  .em-seite:not([data-analyse]) .em-liste {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .em-seite:not([data-analyse]) .em-spalte-vorgang {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: var(--radius-l);
  }

  .em-v-zurueck {
    display: none !important;
  }
}

/* ---------- Liste ---------- */

.em-liste-kopf {
  display: grid;
  gap: 4px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--linie-2);
}

@media (max-width: 899.98px) {
  .em-liste-kopf {
    padding: 0 2px 10px;
    border: 0;
  }

  .em-liste {
    overflow: hidden;
    background: var(--flaeche);
    border-radius: var(--radius-l);
    box-shadow: var(--schatten-1);
  }
}

.em-liste-titel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.em-liste-titel strong {
  font-weight: 640;
}

.em-liste-titel .em-leise {
  margin-left: auto;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.em-liste-hinweis {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0;
  color: var(--tinte-3);
  font-size: 13px;
  line-height: 1.4;
}

.em-liste-suche {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--tinte-2);
  font-size: 13px;
}

.em-zeile {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 12px 16px 12px 18px;
  border-bottom: 1px solid var(--linie-2);
  background: var(--flaeche);
  cursor: pointer;
  outline: none;
  transition: background-color 120ms ease;
}

.em-zeile:hover {
  background: var(--flaeche-2);
}

.em-zeile:focus-visible {
  box-shadow: inset 0 0 0 2px var(--marke-tief);
}

.em-zeile::before {
  content: '';
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.em-zeile.gewaehlt {
  background: var(--marke-zart);
}

.em-zeile.gewaehlt::before {
  background: var(--marke-tief);
}

/* Liegengeblieben: drei Tage nicht angefasst, rot umrandet (Moritz 27.08.2026). */
.em-zeile.liegt::before {
  background: var(--em-rot);
}

.em-zeile-oben {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.em-zeile-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--tinte);
  font-size: 15px;
  font-weight: 580;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.em-zeile.ungelesen .em-zeile-name {
  font-weight: 700;
}

.em-neu-punkt {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--em-blau);
}

.em-zeile-zeit {
  flex: none;
  color: var(--tinte-3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.em-zeile.ungelesen .em-zeile-zeit {
  color: var(--em-blau);
  font-weight: 600;
}

.em-zeile-ort {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  color: var(--tinte-2);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.em-zeile-km {
  flex: none;
  color: var(--tinte-3);
}

.em-zeile-grund {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--em-lila-zart);
  color: var(--tinte);
  font-size: 13px;
  line-height: 1.4;
}

.em-zeile-wortlaut {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--tinte-2);
  font-size: 13.5px;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.em-zeile-merkmale {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.em-zeile-seq {
  color: var(--tinte-3);
  font-size: 12px;
  font-weight: 520;
}

.em-seq-laeuft {
  color: var(--em-tuerkis);
}

.em-zeile-quelle {
  color: var(--tinte-3);
  font-size: 11.5px;
}

.em-zeile-taten {
  position: absolute;
  top: 8px;
  right: 10px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 120ms ease;
}

.em-zeile:hover .em-zeile-taten,
.em-zeile:focus-within .em-zeile-taten {
  opacity: 1;
}

@media (hover: none) {
  .em-zeile-taten {
    position: static;
    justify-self: end;
    opacity: 1;
  }
}

.em-zeile-tat {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--flaeche);
  box-shadow: var(--schatten-1);
  color: var(--tinte-2);
  cursor: pointer;
}

.em-zeile-tat:hover {
  color: var(--tinte);
  background: var(--flaeche-2);
}

.em-mehr-laden {
  margin: 12px 0;
  width: calc(100% - 24px);
  margin-inline: 12px;
}

/* Reiter Termine: Filter nach Terminstand je Lead (seit 13.10.2026). */
.em-termin-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.em-termin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--flaeche-3);
  color: var(--tinte-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 580;
  cursor: pointer;
}

.em-termin-chip-zahl {
  color: var(--tinte);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.em-termin-chip[aria-pressed='true'] {
  background: var(--nacht);
  color: oklch(0.86 0.02 220);
}

.em-termin-chip[aria-pressed='true'] .em-termin-chip-zahl {
  color: #fff;
}

/* ---------- Leer, Laden ---------- */

.em-leer {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 48px 24px;
  color: var(--tinte-3);
  text-align: center;
}

.em-leer svg {
  width: 30px;
  height: 30px;
}

.em-leer strong {
  color: var(--tinte);
  font-size: 16.5px;
  font-weight: 620;
}

.em-leer-vorgang {
  min-height: 100%;
  align-content: center;
  background: var(--flaeche);
  border-radius: var(--radius-l);
  box-shadow: var(--schatten-1);
}

.em-skelett {
  border-radius: 10px;
  background: linear-gradient(90deg, var(--flaeche-3) 0%, var(--flaeche-2) 50%, var(--flaeche-3) 100%);
  background-size: 200% 100%;
  animation: em-schimmer 1.4s ease-in-out infinite;
}

@keyframes em-schimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.em-skelett-zeile-liste {
  height: 92px;
  margin: 10px 14px;
}

.em-skelett-titel {
  width: 46%;
  height: 26px;
  margin-bottom: 12px;
}

.em-skelett-zeile {
  width: 70%;
  height: 16px;
  margin-bottom: 18px;
}

.em-skelett-block {
  height: 220px;
}

.em-v-laden {
  padding: 22px;
  background: var(--flaeche);
  border-radius: var(--radius-l);
  box-shadow: var(--schatten-1);
}

/* ---------- Vorgang ---------- */

.em-vorgang {
  display: grid;
  gap: 12px;
  align-content: start;
}

.em-v-kopf {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  background: var(--flaeche);
  border-radius: var(--radius-l);
  box-shadow: var(--schatten-1);
}

.em-v-zurueck {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  margin: -4px 0 2px -6px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--marke-tief);
  font: inherit;
  font-size: 15px;
  font-weight: 580;
  cursor: pointer;
}

.em-v-kopfzeile {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.em-v-name {
  flex: 1 1 260px;
  min-width: 0;
}

.em-v-name h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 660;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.em-v-stelle {
  margin-top: 3px;
  color: var(--tinte-2);
  font-size: 14.5px;
}

.em-v-taten {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.em-close-ort {
  display: contents;
}

.em-mehr {
  width: 34px;
  padding: 0;
}

.em-v-marken {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.em-v-kontakt {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 14px;
}

.em-kontakt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tinte);
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

a.em-kontakt,
button.em-kontakt {
  color: var(--marke-tief);
  cursor: pointer;
}

.em-kontakt svg {
  flex: none;
  color: var(--tinte-3);
}

.em-v-quelle {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding-top: 10px;
  border-top: 1px solid var(--linie-2);
  font-size: 13px;
}

.em-v-quelle-l {
  color: var(--tinte-3);
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Pipeline: wohin der Vorgang gehört, nach Zielreiter gruppiert. */
.em-pipeline {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  background: var(--flaeche);
  border-radius: var(--radius-l);
  box-shadow: var(--schatten-1);
}

.em-pipeline-titel {
  color: var(--tinte-3);
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.em-pipeline-gruppen {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.em-pipeline-gruppe {
  display: grid;
  gap: 5px;
}

.em-pipeline-ziel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--k);
  font-size: 12px;
  font-weight: 640;
}

.em-pipeline-ziel::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--k);
}

.em-pipeline-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.em-stufe {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--k-zart);
  color: var(--tinte);
  font: inherit;
  font-size: 13.5px;
  font-weight: 560;
  cursor: pointer;
  transition:
    transform 120ms var(--ease-out),
    background-color 140ms ease;
}

.em-stufe:hover {
  background: color-mix(in oklch, var(--k) 16%, var(--flaeche));
}

.em-stufe:active {
  transform: scale(0.97);
}

.em-stufe[aria-pressed='true'] {
  background: var(--k);
  color: #fff;
}

.em-stufe.laedt {
  opacity: 0.6;
}

/* Körper: schmal eine Spalte (Antwort zuerst), breit Verlauf links und Antwort rechts. */
.em-v-koerper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.em-v-haupt,
.em-v-seite {
  display: contents;
}

/* Schmal: erst antworten, dann was ansteht, die Termine und was die Automatik weiß, dann der Verlauf (er kann lang sein). */
.em-antwort { order: 1; }
.em-schritt { order: 2; }
.em-termine-karte { order: 3; }
.em-ueberblick { order: 4; }
.em-verlauf { order: 5; }
.em-sequenzmail { order: 6; }
.em-nachtragen { order: 7; }

@container (min-width: 840px) {
  .em-v-koerper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.85fr);
    align-items: start;
  }

  .em-v-haupt,
  .em-v-seite {
    display: grid;
    gap: 12px;
    min-width: 0;
  }

  .em-v-haupt {
    grid-column: 1;
    grid-row: 1;
  }

  .em-v-seite {
    grid-column: 2;
    grid-row: 1;
  }

  .em-verlauf { order: 1; }
  .em-sequenzmail { order: 2; }
  .em-antwort { order: 1; }
  .em-schritt { order: 2; }
  .em-termine-karte { order: 3; }
  .em-ueberblick { order: 4; }
  .em-nachtragen { order: 5; }
}

.em-karte {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 16px 18px;
  background: var(--flaeche);
  border-radius: var(--radius-l);
  box-shadow: var(--schatten-1);
}

.em-karte-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.em-karte-kopf h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 640;
  letter-spacing: -0.01em;
}

.em-karte-stand {
  color: var(--tinte-3);
  font-size: 12.5px;
  text-align: right;
}

details.em-karte > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  list-style: none;
  cursor: pointer;
  font-weight: 620;
}

details.em-karte > summary::-webkit-details-marker {
  display: none;
}

details.em-karte > summary::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid var(--tinte-3);
  border-bottom: 2px solid var(--tinte-3);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms var(--ease-out);
}

details.em-karte[open] > summary::after {
  transform: translateY(2px) rotate(-135deg);
}

details.em-karte > summary .em-leise {
  font-weight: 450;
  font-size: 13px;
}

.em-unterkopf {
  margin-top: 4px;
  color: var(--tinte-3);
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.em-hinweis {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--flaeche-3);
  color: var(--tinte-2);
  font-size: 13.5px;
  line-height: 1.45;
}

.em-hinweis svg {
  flex: none;
  margin-top: 1px;
}

.em-hinweis-rot {
  background: var(--em-rot-zart);
  color: var(--em-rot);
  font-weight: 560;
}

/* Antwort */
.em-antwort {
  box-shadow: var(--schatten-1), inset 0 3px 0 var(--marke-tief);
}

.em-antwort-freigegeben {
  box-shadow: var(--schatten-1), inset 0 3px 0 var(--em-blau);
}

.em-entwurf-text,
.em-seq-text {
  width: 100%;
  min-height: 260px;
  padding: 14px 16px;
  border: 0;
  border-radius: 14px;
  background: var(--flaeche-2);
  box-shadow: inset 0 0 0 1px var(--linie);
  color: var(--tinte);
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
  outline: none;
  field-sizing: content;
  max-height: 70vh;
}

.em-entwurf-text:focus,
.em-seq-text:focus {
  background: var(--flaeche);
  box-shadow: inset 0 0 0 2px var(--marke-tief);
}

.em-entwurf-text[readonly] {
  color: var(--tinte-2);
}

.em-entwurf-fuss {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.em-entwurf-stand {
  font-size: 12.5px;
}

.em-entwurf-an {
  margin-left: auto;
  font-size: 12.5px;
}

.em-schreibt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: var(--marke-zart);
  color: var(--marke-tief);
  font-size: 14px;
  font-weight: 560;
}

.em-schreibt-punkte {
  display: inline-flex;
  gap: 4px;
}

.em-schreibt-punkte i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: em-hopp 1.2s ease-in-out infinite;
}

.em-schreibt-punkte i:nth-child(2) { animation-delay: 0.15s; }
.em-schreibt-punkte i:nth-child(3) { animation-delay: 0.3s; }

@keyframes em-hopp {
  0%, 80%, 100% { opacity: 0.3; transform: none; }
  40% { opacity: 1; transform: translateY(-3px); }
}

.em-anhaenge {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  background: var(--flaeche-2);
  box-shadow: inset 0 0 0 1px var(--linie-2);
}

.em-anhaenge-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 620;
}

.em-anhaenge-kopf .em-leise {
  font-weight: 450;
  font-size: 12px;
}

.em-anhang {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13.5px;
}

.em-anhang svg {
  flex: none;
  color: var(--tinte-3);
}

.em-anhang-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.em-anhang .em-leise {
  flex: none;
  font-size: 12px;
}

.em-anhang .em-icon-knopf {
  margin-left: auto;
}

.em-anhaenge-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.em-ziel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.em-ziel-l {
  color: var(--tinte-2);
  font-size: 13.5px;
  font-weight: 560;
}

.em-ziel-feld {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 38px;
  padding: 8px 12px;
  font-size: 14.5px;
}

.em-neu-schreiben {
  padding-top: 10px;
  border-top: 1px solid var(--linie-2);
}

.em-impuls-teil {
  display: grid;
  gap: 8px;
}

.em-impuls-frage {
  margin: 0;
  color: var(--tinte-2);
  font-size: 13.5px;
}

.em-impuls,
.em-eigen {
  min-height: 0;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}

.em-eigen {
  min-height: 180px;
}

.em-modus {
  justify-self: start;
}

/* Verlauf */
.em-verlauf-liste {
  display: grid;
  gap: 10px;
}

.em-nachricht {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--flaeche-2);
  box-shadow: inset 0 0 0 1px var(--linie-2);
}

.em-nachricht.em-rein {
  background: var(--marke-zart);
  box-shadow: inset 3px 0 0 var(--marke-tief);
}

.em-nachricht-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 13px;
}

.em-nachricht-wer {
  font-weight: 650;
  color: var(--tinte);
}

.em-rein .em-nachricht-wer {
  color: var(--marke-tief);
}

.em-nachricht-betreff {
  min-width: 0;
  color: var(--tinte-2);
  overflow-wrap: anywhere;
}

/* Über welches Postfach eine ausgehende Mail lief (seit 20.10.2026): klein und gedämpft neben „Wir“. */
.em-nachricht-postfach {
  min-width: 0;
  color: var(--tinte-3);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.em-nachricht-zeit {
  margin-left: auto;
  color: var(--tinte-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.em-text {
  color: var(--tinte);
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.em-nachricht-anhang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tinte-2);
  font-size: 12.5px;
}

details.em-auto {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--linie-2);
}

details.em-auto > summary {
  list-style: none;
  cursor: pointer;
}

details.em-auto > summary::-webkit-details-marker {
  display: none;
}

details.em-auto .em-nachricht-wer,
details.em-auto .em-nachricht-betreff {
  color: var(--tinte-3);
}

.em-vermerk {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 2px 4px;
  color: var(--tinte-2);
  font-size: 13px;
  line-height: 1.45;
}

.em-vermerk svg {
  flex: none;
  margin-top: 2px;
  color: var(--tinte-3);
}

.em-vermerk span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.em-vermerk time {
  flex: none;
  color: var(--tinte-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.em-sequenzmail .em-sequenz-titel {
  font-weight: 620;
}

.em-sequenz-betreff {
  font-weight: 600;
  font-size: 14px;
}

/* Jetzt senden und Bearbeiten der Sequenzmail (20.10.2026) */
.em-seq-betreff {
  width: 100%;
  font-weight: 600;
}

.em-seq-text {
  min-height: 220px;
}

.em-sofort-laeuft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--em-blau);
  font-weight: 600;
  font-size: 13.5px;
}

/* Termine je Lead (seit 13.10.2026) */
.em-termin-stand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--k-zart, var(--flaeche-3));
}

.em-termin-stand > span:nth-child(2) {
  font-size: 13.5px;
  font-weight: 580;
}

.em-termin-stand .em-klein {
  grid-column: 1 / -1;
  margin: 0;
}

.em-termine {
  display: grid;
  gap: 8px;
}

.em-termin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--flaeche-2);
  box-shadow: inset 0 0 0 1px var(--linie-2);
}

.em-termin-text {
  display: grid;
  flex: 1 1 180px;
  gap: 2px;
  min-width: 0;
  font-size: 13.5px;
}

.em-termin-text strong {
  font-weight: 620;
}

.em-termin-beleg {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Rechte Spalte */
.em-aufgaben {
  display: grid;
  gap: 8px;
}

.em-aufgabe {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--flaeche-2);
  box-shadow: inset 0 0 0 1px var(--linie-2);
}

.em-aufgabe-anruf {
  background: var(--em-gruen-zart);
  box-shadow: inset 3px 0 0 var(--em-gruen);
}

.em-aufgabe-text {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
  font-size: 13.5px;
}

.em-aufgabe-text strong {
  font-weight: 620;
}

.em-ohne {
  margin: 0;
  font-size: 13.5px;
}

.em-timer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.em-chip-knopf {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--flaeche);
  box-shadow: inset 0 0 0 1px var(--linie);
  color: var(--tinte);
  font: inherit;
  font-size: 13.5px;
  font-weight: 560;
  cursor: pointer;
}

.em-chip-knopf:hover {
  background: var(--em-gruen-zart);
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--em-gruen) 40%, transparent);
}

.em-chip-knopf.laedt {
  opacity: 0.55;
}

.em-feldreihe {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.em-feldreihe .eingabefeld {
  flex: 1 1 120px;
  width: auto;
  min-width: 0;
  min-height: 38px;
  padding: 7px 10px;
  font-size: 14.5px;
}

.em-feldspalte {
  display: grid;
  gap: 6px;
}

.em-feldspalte .eingabefeld {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14.5px;
}

details.em-wv > summary {
  color: var(--marke-tief);
  font-size: 13.5px;
  font-weight: 580;
  cursor: pointer;
}

details.em-wv[open] > summary {
  margin-bottom: 8px;
}

.em-fakten {
  display: grid;
}

.em-fakt {
  display: grid;
  gap: 2px;
  padding: 9px 0;
  border-bottom: 1px solid var(--linie-2);
}

.em-fakt:first-child {
  padding-top: 0;
}

.em-fakt:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.em-fakt-l {
  color: var(--tinte-3);
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.em-fakt-w {
  font-size: 14px;
  font-weight: 580;
  overflow-wrap: anywhere;
}

.em-fakt-u {
  color: var(--tinte-3);
  font-size: 12.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.em-fakt-k {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.em-fakt-rot .em-fakt-l,
.em-fakt-rot .em-fakt-w {
  color: var(--em-rot);
}

.em-fakt-gruen .em-fakt-w {
  color: var(--em-gruen);
}

.em-blatt-felder {
  display: grid;
  gap: 8px;
  margin: 4px 4px 16px;
}

/* ---------- Analyse ---------- */

.em-analyse {
  display: grid;
  gap: 18px;
}

.em-a-abschnitt {
  display: grid;
  gap: 10px;
}

.em-a-kopf h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 640;
  letter-spacing: -0.015em;
}

.em-a-kopf p {
  margin: 4px 0 0;
  color: var(--tinte-3);
  font-size: 13.5px;
}

/* Abmahnliste (28.10.2026): je Abmahner ein Profil, darunter seine Mandanten. */
.em-a-abmahnliste {
  display: grid;
  gap: 18px;
}

.em-a-abmahner {
  display: grid;
  gap: 10px;
}

.em-a-kopf h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 16px;
  font-weight: 640;
  letter-spacing: -0.01em;
}

.em-a-pipeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  background: var(--flaeche);
  border-radius: var(--radius-l);
  box-shadow: var(--schatten-1);
}

.em-a-stufe {
  position: relative;
  display: grid;
  gap: 2px;
  align-content: start;
  min-width: 0;
  padding: 16px 18px 16px 22px;
  border-left: 1px solid var(--linie-2);
}

.em-a-stufe:first-child {
  border-left: 0;
}

.em-a-pfeil {
  position: absolute;
  top: 50%;
  left: -10px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--flaeche);
  box-shadow: 0 0 0 1px var(--linie-2);
  color: var(--tinte-3);
  transform: translateY(-50%);
}

.em-a-pfeil svg {
  width: 12px;
  height: 12px;
}

.em-a-titel {
  color: var(--tinte-3);
  font-size: 12.5px;
  font-weight: 600;
}

.em-a-wert {
  color: var(--tinte);
  font-size: 26px;
  font-weight: 680;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.em-a-unter {
  color: var(--tinte-3);
  font-size: 12.5px;
}

.em-a-tuerkis .em-a-wert { color: var(--em-tuerkis); }
.em-a-gruen .em-a-wert { color: var(--em-gruen); }
.em-a-blau .em-a-wert { color: var(--em-blau); }
.em-a-rot .em-a-wert { color: var(--em-rot); }
.em-a-gelb .em-a-wert { color: var(--em-gelb); }

.em-a-kacheln {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.em-a-kachel {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 14px 16px;
  background: var(--flaeche);
  border-radius: var(--radius-m);
  box-shadow: var(--schatten-1);
}

.em-a-kachel .em-a-wert {
  font-size: 22px;
}

/* Kacheln der Termine je Lead sind Knöpfe nach „Alle Leads“ mit genau diesem Terminstand.
   Oben ausgerichtet: ein Knopf zentriert seinen Inhalt sonst senkrecht. */
button.em-a-knopf {
  align-content: start;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 140ms ease;
}

button.em-a-knopf:hover {
  background: var(--flaeche-2);
}

button.em-a-knopf:active {
  transform: scale(0.98);
}

.em-a-termine {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 1199.98px) {
  .em-a-termine {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.em-a-tabelle table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  white-space: nowrap;
}

.em-a-tabelle th {
  position: sticky;
  top: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--linie);
  background: var(--flaeche);
  color: var(--tinte-3);
  font-size: 12px;
  font-weight: 620;
  text-align: left;
}

.em-a-tabelle td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--linie-2);
  vertical-align: middle;
}

.em-a-tabelle tr:last-child td {
  border-bottom: 0;
}

.em-a-tabelle .em-z {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.em-a-name {
  font-weight: 580;
}

.em-a-name .em-leise {
  font-weight: 450;
  font-size: 12px;
}

.em-a-aus td {
  color: var(--tinte-3);
}

.em-a-gut {
  color: var(--em-gruen);
  font-weight: 600;
}

td.em-a-rot {
  color: var(--em-rot);
  font-weight: 650;
}

td.em-a-gelb {
  color: var(--em-gelb);
  font-weight: 620;
}

.em-a-null {
  color: var(--em-rot);
  font-weight: 650;
}

.em-a-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.em-a-hand td:first-child {
  box-shadow: inset 3px 0 0 var(--em-rot);
}

.em-a-hand .em-a-name {
  color: var(--em-rot);
}

.em-a-grund {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--tinte-2);
}

.em-a-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--marke-tief);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.em-a-link:hover {
  text-decoration: underline;
}

.em-a-mess {
  display: grid;
  gap: 5px;
  min-width: 120px;
}

.em-a-mess-text {
  font-variant-numeric: tabular-nums;
}

.em-a-mess-spur {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--em-tuerkis-zart);
}

.em-a-mess-fuellung {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--em-tuerkis);
}

.em-a-mess-fast {
  background: var(--em-gelb-zart);
}

.em-a-mess-fast .em-a-mess-fuellung {
  background: var(--em-gelb);
}

.em-a-mess-voll {
  background: var(--em-rot-zart);
}

.em-a-mess-voll .em-a-mess-fuellung {
  background: var(--em-rot);
}

@media (max-width: 1199.98px) {
  .em-a-pipeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .em-a-stufe:nth-child(4) {
    border-left: 0;
  }

  .em-a-stufe:nth-child(n + 4) {
    border-top: 1px solid var(--linie-2);
  }

  .em-a-stufe:nth-child(4) .em-a-pfeil {
    display: none;
  }
}

@media (max-width: 699.98px) {
  .em-a-pipeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .em-a-stufe:nth-child(n) {
    border-left: 1px solid var(--linie-2);
    border-top: 0;
  }

  .em-a-stufe:nth-child(odd) {
    border-left: 0;
  }

  .em-a-stufe:nth-child(n + 3) {
    border-top: 1px solid var(--linie-2);
  }

  .em-a-stufe:nth-child(odd) .em-a-pfeil {
    display: none;
  }

  .em-a-kacheln {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .em-a-wert {
    font-size: 22px;
  }
}

/* ---------- Telefon ---------- */

@media (max-width: 899.98px) {
  .em-seite .titelzeile {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .em-kopf-rechts {
    width: 100%;
  }

  .em-suchfeld {
    width: auto;
  }

  .em-reiter-archiv {
    margin-left: 0;
    padding-left: 0;
  }

  .em-reiter-kachel {
    min-width: 104px;
    padding: 9px 12px 10px;
  }

  .em-reiter-zahl {
    font-size: 21px;
  }

  .em-v-kopf {
    padding: 14px 16px;
  }

  .em-v-name h2 {
    font-size: 20px;
  }

  .em-v-taten {
    justify-content: flex-start;
    width: 100%;
  }

  .em-karte {
    padding: 14px 15px;
  }

  .em-entwurf-text,
  .em-seq-text {
    min-height: 220px;
    font-size: 16px;
  }

  .em-ziel-feld,
  .em-feldreihe .eingabefeld,
  .em-feldspalte .eingabefeld,
  .em-impuls,
  .em-eigen,
  .em-seq-betreff {
    font-size: 16px;
  }
}

/* Knopf „Im E-Mail-Marketing“ unter den Meldungen im Chat (teile/em-knoepfe.js) ist ein Link. */
a.emk-knopf {
  text-decoration: none;
}

/* ---------- Seite Vertrieb ---------- */

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

.vt-karte {
  --k: var(--tinte-2);
  --k-zart: var(--flaeche-3);
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px 18px 18px;
  color: var(--tinte);
  text-decoration: none;
  transition: transform 140ms var(--ease-out);
}

.vt-karte:active {
  transform: scale(0.985);
}

.vt-tuerkis { --k: var(--em-tuerkis); --k-zart: var(--em-tuerkis-zart); }
.vt-violett { --k: var(--em-violett); --k-zart: var(--em-violett-zart); }
.vt-gruen { --k: var(--em-gruen); --k-zart: var(--em-gruen-zart); }
.vt-blau { --k: var(--em-blau); --k-zart: var(--em-blau-zart); }
.vt-grau { --k: var(--em-grau); --k-zart: var(--em-grau-zart); }

.vt-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vt-kopf > svg:last-child {
  margin-left: auto;
  color: var(--tinte-3);
}

.vt-symbol {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--k-zart);
  color: var(--k);
}

.vt-titel {
  font-size: 16.5px;
  font-weight: 640;
}

.vt-zahl {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 4px;
  font-size: 34px;
  font-weight: 680;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.vt-zahl-text {
  color: var(--tinte-2);
  font-size: 14px;
  font-weight: 560;
  letter-spacing: 0;
}

.vt-laedt {
  color: var(--tinte-3);
}

.vt-unter {
  color: var(--tinte-3);
  font-size: 13.5px;
}

.vt-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.vt-detail {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--flaeche-3);
  color: var(--tinte-2);
  font-size: 12.5px;
  font-weight: 540;
}

.vt-detail strong {
  color: var(--tinte);
  font-weight: 680;
}

/* ---------- Analyse: Lagebild (seit 29.10.2026) ---------- */

/* Moritz: „von aussen alles sehen … mit glass optic und genauen kpis … niemand darf verloren gehen“. Glas wie im
   Überblick (--glas, .glas, .ub-punkt aus ueberblick.css), dahinter dieselben zarten Farbflächen auf der ganzen Analyse.
   Lagefarben mit dem Palettenprüfer geprüft (Protan und Deutan, Nachbarn mindestens ΔE 8,8, bei normalem Sehen 24,5):
   Anruf fällig und Steht still sind die Warnfarben, dann Läuft, Automatik, Kontakt anderswo, Termin, Kunde, Wartet,
   Abgesagt; die großen Mengen ohne Spalte grau. Text bleibt in Tinte, die Farbe tragen Balken, Punkte und Bänder. */
:root {
  --lb-anruf: #cf3d0b;
  --lb-steht: #e2aa12;
  --lb-laeuft: #009397;
  --lb-automatik: #9d41ab;
  --lb-anderswo: #79953e;
  --lb-termin: #2c5dbd;
  --lb-kunde: #2cab70;
  --lb-geparkt: #66449e;
  --lb-verloren: #de3951;
  --lb-sequenz: oklch(0.83 0.012 230);
  --lb-sequenzende: oklch(0.72 0.014 230);
  --lb-zu: oklch(0.58 0.016 230);
  --lb-sonst: oklch(0.68 0.012 230);
  --lb-anruf-tinte: oklch(0.47 0.16 38);
  --lb-steht-tinte: oklch(0.52 0.11 75);
  /* 02.11.2026: Liegt (Warnung, Magenta zwischen Automatik und Abgesagt) und Telefon ist dran (Blau zwischen Läuft und
     Termin, heller als Termin). Text bleibt Tinte, die Farbe tragen nur Balken, Punkte und Bänder. */
  --lb-liegen: #c2187e;
  --lb-liegen-tinte: oklch(0.47 0.18 350);
  --lb-telefon: #1b8fd6;
}

.em-lb-ton-anruf { --lb: var(--lb-anruf); --lb-tinte: var(--lb-anruf-tinte); }
.em-lb-ton-steht { --lb: var(--lb-steht); --lb-tinte: var(--lb-steht-tinte); }
.em-lb-ton-liegen { --lb: var(--lb-liegen); --lb-tinte: var(--lb-liegen-tinte); }
.em-lb-ton-telefon { --lb: var(--lb-telefon); }
.em-lb-ton-laeuft { --lb: var(--lb-laeuft); }
.em-lb-ton-automatik { --lb: var(--lb-automatik); }
.em-lb-ton-anderswo { --lb: var(--lb-anderswo); }
.em-lb-ton-termin { --lb: var(--lb-termin); }
.em-lb-ton-kunde { --lb: var(--lb-kunde); }
.em-lb-ton-geparkt { --lb: var(--lb-geparkt); }
.em-lb-ton-verloren { --lb: var(--lb-verloren); }
.em-lb-ton-sequenz { --lb: var(--lb-sequenz); }
.em-lb-ton-sequenzende { --lb: var(--lb-sequenzende); }
.em-lb-ton-zu { --lb: var(--lb-zu); }
.em-lb-ton-sonst { --lb: var(--lb-sonst); }

/* Bühne: Lagebild und Analyse liegen auf den Farbflächen des Überblicks. Lagen in rem statt Prozent, damit sie auch ohne
   festen Hintergrund (iPhone) oben bei Lagebild und Kennzahlen stehen. */
.em-seite[data-analyse] {
  background:
    var(--koernung),
    radial-gradient(52rem 34rem at 6% -6rem, oklch(0.9 0.08 195 / 0.5), transparent 64%),
    radial-gradient(44rem 30rem at 102% 6rem, oklch(0.93 0.06 165 / 0.42), transparent 62%),
    radial-gradient(50rem 32rem at 58% 56rem, oklch(0.94 0.05 85 / 0.38), transparent 64%),
    var(--grund);
  background-attachment: fixed;
}

.em-lb {
  display: grid;
  gap: 16px;
  min-width: 0;
  margin-bottom: 12px;
}

.em-lb[aria-busy='true'] > :not(.em-lb-skelett) {
  opacity: 0.55;
  transition: opacity 160ms ease;
}

.em-lb-skelett {
  height: 420px;
  border-radius: var(--radius-xl);
}

.em-lb-dot {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lb, var(--tinte-3));
}

/* ---------- Kopf und Statuszeile ---------- */

.em-lb-kopf {
  display: grid;
  gap: 6px;
  padding: 0 2px;
}

.em-lb-kopf h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  font-size: 24px;
  font-weight: 690;
  letter-spacing: -0.022em;
}

.em-lb-kopf > p {
  max-width: 78ch;
  margin: 0;
  color: var(--tinte-2);
  font-size: 14px;
  line-height: 1.45;
}

.em-lb-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.em-lb-status-teil {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--glas-zart);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 0 0 1px var(--haarlinie);
  color: var(--tinte-2);
  font-size: 12.5px;
  font-weight: 560;
  white-space: nowrap;
}

.em-lb-status-teil svg {
  flex: none;
  color: var(--tinte-3);
}

.em-lb-status-warn {
  background: oklch(0.97 0.045 88 / 0.8);
  color: var(--em-gelb);
}

.em-lb-status-warn svg {
  color: var(--em-gelb);
}

.em-lb-statuspunkt {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gruen);
  box-shadow: 0 0 0 3px oklch(0.52 0.13 155 / 0.16);
}

/* ---------- Kennzahlen ---------- */

.em-lb-kacheln {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.em-lb-kachel {
  position: relative;
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  padding: 15px 16px 16px;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: var(--glas);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--glas-schatten);
  color: var(--tinte);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), box-shadow 160ms ease;
}

.em-lb-kachel:active {
  transform: scale(0.98);
}

.em-lb-kachel:focus-visible {
  outline: 2px solid var(--marke-tief);
  outline-offset: 2px;
}

.em-lb-kachel[aria-pressed='true'] {
  box-shadow: var(--glas-schatten-hoch), inset 0 0 0 2px var(--marke-tief);
}

.em-lb-kachel-titel {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--tinte-2);
  font-size: 13px;
  font-weight: 630;
}

.em-lb-kachel-titel svg {
  flex: none;
}

.em-lb-kachel-wert {
  margin-top: 2px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.em-lb-kachel-unter {
  color: var(--tinte-3);
  font-size: 12.5px;
  line-height: 1.35;
}

/* Warnfarben: Zeichen, Farbstreifen oben und warm getöntes Glas, die Zahl bleibt Tinte. */
.em-lb-k-warn {
  background: linear-gradient(150deg, color-mix(in oklch, var(--lb) 15%, oklch(1 0 0 / 0.86)), oklch(1 0 0 / 0.62));
}

.em-lb-k-warn::before {
  content: '';
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--lb);
}

.em-lb-k-warn .em-lb-kachel-titel {
  color: var(--tinte);
}

.em-lb-k-warn .em-lb-kachel-titel svg {
  color: var(--lb-tinte);
}

.em-lb-k-anruf { --lb: var(--lb-anruf); --lb-tinte: var(--lb-anruf-tinte); }
.em-lb-k-steht { --lb: var(--lb-steht); --lb-tinte: var(--lb-steht-tinte); }
.em-lb-k-liegen { --lb: var(--lb-liegen); --lb-tinte: var(--lb-liegen-tinte); }

/* Im Prozess: dunkles Glas wie „Für dich“ im Überblick, die eine große Zahl der Ansicht. */
.em-lb-k-held {
  background: linear-gradient(150deg, oklch(0.28 0.035 232 / 0.95), oklch(0.2 0.03 238 / 0.97));
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.14), 0 22px 44px -26px oklch(0.2 0.04 235 / 0.6);
  color: #fff;
}

.em-lb-k-held .em-lb-kachel-titel {
  color: oklch(0.86 0.07 195);
}

.em-lb-k-held .em-lb-kachel-unter {
  color: oklch(0.83 0.015 230);
}

.em-lb-k-held[aria-pressed='true'] {
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.14), 0 22px 44px -26px oklch(0.2 0.04 235 / 0.6), inset 0 0 0 2px var(--marke);
}

.em-lb-kachel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.em-lb-minichip {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--flaeche-3);
  color: var(--tinte-2);
  font-size: 11.5px;
  font-weight: 560;
  white-space: nowrap;
}

/* Abgleich der Kanäle in einer Zeile unter den Kacheln. */
.em-lb-kanalzeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding: 10px 16px;
  border-radius: 16px;
  background: var(--glas-zart);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 0 0 1px var(--haarlinie);
  color: var(--tinte-2);
  font-size: 13px;
}

.em-lb-kanalzeile-titel {
  color: var(--tinte);
  font-weight: 650;
}

.em-lb-kanalzahl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.em-lb-kanalzahl svg {
  flex: none;
  color: var(--marke-tief);
}

.em-lb-kanalzahl strong {
  color: var(--tinte);
  font-weight: 690;
}

/* ---------- Blöcke ---------- */

.em-lb-block {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px 20px 20px;
  border-radius: 26px;
  scroll-margin-top: 64px;
}

.em-lb-blockkopf {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.em-lb-blockkopf-text {
  min-width: 0;
}

.em-lb-blockkopf h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 17px;
  font-weight: 660;
  letter-spacing: -0.01em;
}

.em-lb-blockkopf p {
  max-width: 82ch;
  margin: 5px 0 0;
  color: var(--tinte-3);
  font-size: 13.5px;
  line-height: 1.45;
}

.em-lb-untertitel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 660;
}

.em-lb-untertitel svg {
  flex: none;
  color: var(--lb-anruf-tinte);
}

.em-lb-untertext {
  margin: -4px 0 0;
  color: var(--tinte-3);
  font-size: 13px;
}

.em-lb-zahlmarke {
  min-width: 26px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--lb-anruf);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}

.em-lb-zahlmarke-ruhig {
  background: var(--flaeche-3);
  color: var(--tinte-2);
}

.em-lb-mehr {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: oklch(1 0 0 / 0.62);
  box-shadow: 0 0 0 1px var(--haarlinie);
  color: var(--marke-tief);
  font: inherit;
  font-size: 13px;
  font-weight: 630;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms var(--ease-out);
}

.em-lb-mehr:active {
  transform: scale(0.98);
}

.em-lb-mehr-breit {
  justify-self: start;
}

.em-lb-leer {
  margin: 0;
}

/* Marken: Lage, Prüfer-Urteil und Stand eines Postens. */
.em-lb-marke {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 22px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--flaeche-3);
  color: var(--tinte-2);
  font-size: 11.5px;
  font-weight: 630;
  line-height: 1.3;
}

.em-lb-lagemarke {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tinte-2);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.em-lb-u-anruf,
.em-lb-s-anruf { background: color-mix(in oklch, var(--lb-anruf) 12%, white); color: var(--lb-anruf-tinte); }
.em-lb-u-frei,
.em-lb-s-frei { background: var(--em-tuerkis-zart); color: var(--em-tuerkis); }
/* Wechsel auf Selbstzahlerpatienten (seit 29.10.2026): eigene ruhige Farbe, nie rot. */
.em-lb-u-wechsel,
.em-lb-s-wechsel { background: oklch(0.956 0.022 275); color: oklch(0.45 0.09 275); }
.em-lb-u-halt,
.em-lb-s-halt { background: var(--em-gelb-zart); color: var(--em-gelb); }
.em-lb-u-offen,
.em-lb-s-offen { background: var(--em-grau-zart); color: var(--em-grau); }
.em-lb-s-angelegt { background: var(--em-blau-zart); color: var(--em-blau); }
.em-lb-s-gesendet { background: var(--em-gruen-zart); color: var(--em-gruen); }
.em-lb-s-verworfen { background: var(--em-grau-zart); color: var(--em-grau); text-decoration: line-through; }

.em-lb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.em-lb-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Fließdiagramm ---------- */

.em-lb-fluss-buehne {
  position: relative;
  min-width: 0;
}

.em-lb-fluss-flaeche {
  min-width: 0;
  min-height: 120px;
}

.em-lb-fluss-quelle {
  margin: 0 0 8px;
  color: var(--tinte-2);
  font-size: 13px;
}

.em-lb-fluss-quelle strong {
  color: var(--tinte);
  font-size: 15px;
}

.em-lb-sankey {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: inherit;
  -webkit-user-select: none;
  user-select: none;
}

.em-lb-band {
  fill: var(--lb);
  fill-opacity: 0.34;
  transition: fill-opacity 160ms ease;
}

.em-lb-band.em-lb-ton-anruf,
.em-lb-band.em-lb-ton-steht {
  fill-opacity: 0.62;
}

.em-lb-band.em-lb-ton-sequenz,
.em-lb-band.em-lb-ton-sequenzende,
.em-lb-band.em-lb-ton-zu {
  fill-opacity: 0.46;
}

/* Vorlauf: ruhiges Grundband, die Abschnitte der Pfade darüber bleiben unsichtbar, bis ein Weg gezeigt wird. */
.em-lb-grundband {
  fill: oklch(0.62 0.018 230);
  fill-opacity: 0.3;
  transition: fill-opacity 160ms ease;
}

.em-lb-grundband.em-lb-ja {
  fill: var(--marke-tief);
  fill-opacity: 0.22;
}

.em-lb-band.em-lb-band-vor {
  fill-opacity: 0;
}

.em-lb-sankey[data-gewaehlt] .em-lb-band,
.em-lb-sankey[data-gewaehlt] .em-lb-grundband {
  fill-opacity: 0.1;
}

.em-lb-sankey[data-gewaehlt] .em-lb-band.gewaehlt {
  fill-opacity: 0.8;
}

.em-lb-sankey[data-hervor] .em-lb-band,
.em-lb-sankey[data-hervor] .em-lb-grundband {
  fill-opacity: 0.07;
}

.em-lb-sankey[data-hervor] .em-lb-band.an {
  fill-opacity: 0.86;
}

.em-lb-sankey[data-hervor] .em-lb-band.em-lb-band-vor:not(.an),
.em-lb-sankey[data-gewaehlt]:not([data-hervor]) .em-lb-band.em-lb-band-vor:not(.gewaehlt) {
  fill-opacity: 0;
}

.em-lb-balken {
  fill: var(--lb, oklch(0.45 0.02 230));
}

.em-lb-art-quelle .em-lb-balken,
.em-lb-art-antwort .em-lb-balken,
.em-lb-art-zweig .em-lb-balken {
  fill: oklch(0.42 0.02 230);
}

.em-lb-knoten[data-knoten='ja'] .em-lb-balken {
  fill: var(--marke-tief);
}

.em-lb-treffer {
  fill: transparent;
}

.em-lb-klickbar {
  cursor: pointer;
}

.em-lb-klickbar:focus {
  outline: none;
}

.em-lb-klickbar:focus-visible .em-lb-balken,
.em-lb-knoten.gewaehlt .em-lb-balken {
  stroke: var(--tinte);
  stroke-width: 2px;
}

.em-lb-beschriftung {
  fill: var(--tinte);
  stroke: oklch(0.99 0.004 205 / 0.9);
  stroke-width: 4px;
  stroke-linejoin: round;
  paint-order: stroke;
}

.em-lb-name {
  fill: var(--tinte-2);
  font-size: 12px;
  font-weight: 600;
}

.em-lb-wert {
  fill: var(--tinte);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.em-lb-wert-gross {
  font-size: 16px;
}

.em-lb-warn .em-lb-name,
.em-lb-knoten.gewaehlt .em-lb-name {
  fill: var(--tinte);
}

.em-lb-warnzeichen {
  fill: none;
  stroke: var(--lb-tinte, var(--lb));
  stroke-width: 2.4px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.em-lb-tipp {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: grid;
  gap: 2px;
  max-width: 260px;
  padding: 8px 11px;
  border-radius: 12px;
  background: oklch(0.2 0.02 228 / 0.93);
  box-shadow: 0 12px 28px -12px oklch(0.2 0.02 228 / 0.5);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.35;
  pointer-events: none;
}

.em-lb-tipp[hidden] {
  display: none;
}

.em-lb-tipp strong {
  font-size: 16px;
  font-weight: 700;
}

.em-lb-tipp-extra {
  color: oklch(0.86 0.07 195);
}

.em-lb-fussnote {
  margin: 0;
  color: var(--tinte-3);
  font-size: 12.5px;
  line-height: 1.45;
}

.em-lb-zahlen summary {
  width: fit-content;
  color: var(--marke-tief);
  font-size: 13px;
  font-weight: 620;
  cursor: pointer;
}

.em-lb-tab-rahmen {
  margin-top: 8px;
  overflow-x: auto;
}

.em-lb-tab {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.em-lb-tab th,
.em-lb-tab td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--linie-2);
  text-align: left;
  white-space: nowrap;
}

.em-lb-tab th {
  color: var(--tinte-3);
  font-size: 12px;
  font-weight: 620;
}

.em-lb-tab tfoot td {
  border-bottom: 0;
  font-weight: 650;
}

.em-lb-tab .em-z {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Wer steht wo ---------- */

.em-lb-filterleiste {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 13px;
}

.em-lb-filterchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--tinte);
  color: #fff;
  font-weight: 600;
}

.em-lb-filterchip strong {
  padding: 0 7px;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.18);
}

.em-lb-spurindex {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.em-lb-spurknopf {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.66);
  box-shadow: 0 0 0 1px var(--haarlinie);
  color: var(--tinte-2);
  font: inherit;
  font-size: 13px;
  font-weight: 580;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.em-lb-spurknopf strong {
  color: var(--tinte);
  font-weight: 700;
}

/* Spalten nebeneinander, waagerecht wischbar mit Einrasten (am Mac mit dem Trackpad, am Telefon mit dem Daumen). */
.em-lb-spuren {
  position: relative;
  display: grid;
  grid-auto-columns: minmax(292px, 308px);
  grid-auto-flow: column;
  align-items: start;
  gap: 12px;
  margin: 0 -4px;
  padding: 2px 4px 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.em-lb-spur {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border-radius: 20px;
  background: oklch(1 0 0 / 0.44);
  box-shadow: inset 0 3px 0 var(--lb, var(--linie)), inset 0 0 0 1px oklch(1 0 0 / 0.7), 0 0 0 1px var(--haarlinie);
  scroll-snap-align: start;
}

.em-lb-spur.em-lb-warn {
  background: color-mix(in oklch, var(--lb) 9%, oklch(1 0 0 / 0.5));
}

.em-lb-spur-kopf {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 2px 0;
}

.em-lb-spur-kopf h4 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 14.5px;
  font-weight: 670;
}

.em-lb-spur-zahl {
  min-width: 28px;
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--lb, var(--tinte-3)) 16%, white);
  color: var(--tinte);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.em-lb-spur-text {
  margin: -5px 2px 0;
  color: var(--tinte-3);
  font-size: 12px;
  line-height: 1.4;
}

.em-lb-spur-karten {
  display: grid;
  gap: 8px;
}

.em-lb-spur-leer {
  margin: 0;
  padding: 10px 2px;
  color: var(--tinte-3);
  font-size: 13px;
}

/* Eine Lage gewählt: ihre Spalte über die ganze Breite, die Karten als Raster. */
.em-lb-spuren.em-lb-eine {
  grid-auto-columns: auto;
  grid-auto-flow: row;
  overflow: visible;
  scroll-snap-type: none;
}

.em-lb-eine .em-lb-spur-karten {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

/* ---------- Karte je Lead ---------- */

.em-lb-karte {
  position: relative;
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 12px 13px 11px;
  border-radius: 16px;
  background: oklch(1 0 0 / 0.86);
  box-shadow: 0 1px 2px oklch(0.2 0.02 228 / 0.05), 0 0 0 1px var(--haarlinie);
  transition: transform 160ms var(--ease-out), box-shadow 160ms ease, background-color 160ms ease;
}

.em-lb-karte-kopf {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.em-lb-karte-name {
  flex: 1;
  min-width: 0;
}

.em-lb-karte-name h5 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.em-lb-karte-ort {
  margin-top: 1px;
  color: var(--tinte-3);
  font-size: 12.5px;
}

/* Der Name ist der Knopf zum Vorgang, seine Fläche reicht über die ganze Karte. Close, „Warum“ und das Urteil liegen
   darüber und bleiben einzeln klickbar. */
.em-lb-oeffnen {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.em-lb-oeffnen::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.em-lb-oeffnen:focus-visible {
  outline: none;
}

.em-lb-oeffnen:focus-visible::after {
  box-shadow: 0 0 0 2px var(--marke-tief);
}

.em-lb-close,
.em-lb-warum,
.em-lb-urteil .em-lb-marke,
.em-lb-ring {
  position: relative;
  z-index: 1;
}

.em-lb-stufe {
  color: var(--tinte-2);
  font-size: 12.5px;
  line-height: 1.35;
}

.em-lb-reihe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.em-lb-kanaele {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.em-lb-kanal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--flaeche-3);
  color: var(--tinte-2);
  font-size: 11.5px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.em-lb-kanal svg {
  flex: none;
  color: var(--tinte-3);
}

.em-lb-kanal-zuletzt {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--marke-tief);
  color: var(--tinte);
}

.em-lb-kanal-zuletzt svg {
  color: var(--marke-tief);
}

.em-lb-kanal-nie {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--linie);
  color: var(--tinte-3);
}

.em-lb-mails {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  color: var(--tinte-2);
  font-size: 12.5px;
}

.em-lb-mails strong {
  color: var(--tinte);
  font-weight: 700;
}

.em-lb-empfehlung {
  margin: 0;
  padding-left: 9px;
  border-left: 2px solid var(--lb, var(--marke));
  color: var(--tinte);
  font-size: 12.5px;
  line-height: 1.42;
}

/* Auf den Karten im Brett höchstens drei Zeilen Empfehlung und Einstieg; ganz steht der Einstieg unter „Heute anrufen“
   und im Hinweis beim Zeigen. */
.em-lb-spur .em-lb-empfehlung,
.em-lb-spur .em-lb-vorgabe {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.em-lb-urteil {
  display: grid;
  gap: 5px;
}

.em-lb-vorgabe {
  margin: 0;
  color: var(--tinte-2);
  font-size: 12.5px;
  line-height: 1.42;
}

.em-lb-vorgabe strong {
  color: var(--tinte);
}

.em-lb-karte-fuss {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
  font-size: 12px;
}

.em-lb-close {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--marke-tief) 32%, transparent);
  color: var(--marke-tief);
  font-size: 12px;
  font-weight: 630;
  text-decoration: none;
}

/* Potenzial: Ring mit Zahl, eine Farbe von hell (gering) nach dunkel (hoch). */
.em-lb-ring {
  display: grid;
  flex: none;
  justify-items: center;
  width: 44px;
}

.em-lb-ring svg {
  display: block;
}

.em-lb-ring-spur {
  fill: none;
  stroke: var(--linie-2);
  stroke-width: 3.5;
}

.em-lb-ring-wert {
  fill: none;
  stroke: var(--p, var(--tinte-3));
  stroke-width: 3.5;
  stroke-linecap: round;
}

.em-lb-ring-zahl {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  place-items: center;
  height: 38px;
  font-size: 12.5px;
  font-weight: 700;
}

.em-lb-ring-stufe {
  color: var(--tinte-3);
  font-size: 10.5px;
  font-weight: 620;
}

.em-lb-p-hoch { --p: var(--marke-tief); }
.em-lb-p-mittel { --p: oklch(0.64 0.1 198); }
.em-lb-p-gering { --p: oklch(0.8 0.07 198); }
.em-lb-p-keins { --p: var(--linie); }

.em-lb-pbalken {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.em-lb-pbalken-spur {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--linie-2);
}

.em-lb-pbalken-fuellung {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--p);
}

.em-lb-pbalken-text {
  color: var(--tinte-3);
  font-size: 12px;
  white-space: nowrap;
}

.em-lb-pbalken-text strong {
  color: var(--tinte);
}

/* ---------- Listen: mehr als 5 Mails, übrige Posten ---------- */

.em-lb-liste {
  display: grid;
  gap: 6px;
}

.em-lb-zeile {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) minmax(118px, 0.85fr) 118px minmax(150px, 1.15fr) minmax(150px, 1fr) minmax(180px, 1.5fr) 62px;
  align-items: start;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  background: oklch(1 0 0 / 0.8);
  box-shadow: 0 0 0 1px var(--haarlinie);
  font-size: 13px;
  transition: box-shadow 160ms ease, background-color 160ms ease;
}

.em-lb-zeile-kopf {
  padding-block: 0;
  background: transparent;
  box-shadow: none;
  color: var(--tinte-3);
  font-size: 12px;
  font-weight: 620;
}

.em-lb-z-praxis {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.em-lb-z-praxis .em-lb-oeffnen {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.em-lb-z-lage {
  display: grid;
  justify-items: start;
  gap: 5px;
  min-width: 0;
}

.em-lb-z-mails {
  display: grid;
  gap: 2px;
  color: var(--tinte-2);
  font-variant-numeric: tabular-nums;
}

.em-lb-z-mails strong {
  color: var(--tinte);
}

.em-lb-z-potenzial {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.em-lb-gruende {
  color: var(--tinte-3);
  font-size: 11.5px;
  line-height: 1.4;
}

.em-lb-z-empfehlung {
  color: var(--tinte-2);
  line-height: 1.42;
}

.em-lb-z-close {
  justify-self: end;
}

/* ---------- Tagescharge ---------- */

.em-lb-urteile {
  margin: 0;
  color: var(--tinte-2);
  font-size: 13px;
}

.em-lb-urteile strong {
  color: var(--tinte);
}

.em-lb-heute,
.em-lb-posten {
  display: grid;
  gap: 10px;
}

.em-lb-anrufe {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

.em-lb-anruf {
  --lb: var(--lb-anruf);
  box-shadow: inset 0 3px 0 var(--lb-anruf), 0 1px 2px oklch(0.2 0.02 228 / 0.05), 0 0 0 1px var(--haarlinie);
}

.em-lb-einstieg {
  margin: 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: color-mix(in oklch, var(--lb-anruf) 7%, white);
  color: var(--tinte);
  font-size: 13px;
  line-height: 1.45;
}

.em-lb-einstieg-titel {
  display: block;
  margin-bottom: 2px;
  color: var(--lb-anruf-tinte);
  font-size: 11.5px;
  font-weight: 690;
}

.em-lb-warum {
  font-size: 12.5px;
}

.em-lb-warum summary {
  width: fit-content;
  color: var(--marke-tief);
  font-weight: 620;
  cursor: pointer;
}

.em-lb-warum p {
  margin: 6px 0 0;
  color: var(--tinte-2);
  line-height: 1.45;
}

.em-lb-posten-zeile {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 2fr);
  align-items: start;
  gap: 6px 16px;
  padding: 11px 14px;
  border-radius: 14px;
  background: oklch(1 0 0 / 0.8);
  box-shadow: 0 0 0 1px var(--haarlinie);
  font-size: 13px;
  transition: box-shadow 160ms ease, background-color 160ms ease;
}

.em-lb-posten-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  grid-column: 1 / -1;
}

.em-lb-posten-zeile .em-lb-z-praxis {
  grid-row: 2 / span 3;
  grid-column: 1;
}

.em-lb-posten-zeile .em-lb-grund,
.em-lb-posten-zeile .em-lb-vorgabe,
.em-lb-posten-zeile .em-lb-zeiten {
  grid-column: 2;
}

.em-lb-grund {
  margin: 0;
  color: var(--tinte-2);
  line-height: 1.45;
}

.em-lb-zeiten {
  color: var(--tinte-3);
  font-size: 12px;
}

/* ---------- Wirkung der Nachfass-Mails ---------- */

.em-lb-wirkung-raster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 32px;
}

.em-lb-balkenliste {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  margin: 0;
}

/* Alle Zeilen in einem Raster (subgrid), damit die Balken links bündig beginnen. */
.em-lb-balken {
  display: grid;
  grid-template-columns: minmax(96px, max-content) minmax(80px, 1fr) max-content;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.em-lb-balken-zeile {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
  font-size: 13px;
}

.em-lb-balken-name {
  min-width: 0;
  color: var(--tinte-2);
}

.em-lb-balken-spur {
  height: 14px;
  border-radius: 0 4px 4px 0;
  background: oklch(0.2 0.02 228 / 0.05);
}

.em-lb-balken-fuellung {
  display: block;
  min-width: 2px;
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: var(--marke-tief);
}

.em-lb-wenig .em-lb-balken-fuellung {
  background: color-mix(in oklch, var(--marke-tief) 38%, white);
}

.em-lb-balken-wert {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.em-lb-balken-wert strong {
  font-weight: 700;
}

.em-lb-balken-wert span {
  color: var(--tinte-3);
  font-size: 12px;
}

.em-lb-achse {
  color: var(--tinte-3);
  font-size: 11px;
}

.em-lb-achse-spur {
  display: flex;
  justify-content: space-between;
}

/* ---------- Mac mit Zeiger: Hover ---------- */

@media (hover: hover) and (pointer: fine) {
  .em-lb-kachel:hover {
    transform: translateY(-2px);
    box-shadow: var(--glas-schatten-hoch);
  }

  .em-lb-kachel[aria-pressed='true']:hover {
    box-shadow: var(--glas-schatten-hoch), inset 0 0 0 2px var(--marke-tief);
  }

  .em-lb-k-held:hover,
  .em-lb-k-held[aria-pressed='true']:hover {
    box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.14), 0 26px 50px -24px oklch(0.2 0.04 235 / 0.66), inset 0 0 0 2px var(--marke);
  }

  .em-lb-karte:hover {
    transform: translateY(-1px);
  }

  .em-lb-karte:hover,
  .em-lb-zeile:not(.em-lb-zeile-kopf):hover,
  .em-lb-posten-zeile:hover {
    background: #fff;
    box-shadow: 0 10px 24px -16px oklch(0.2 0.02 228 / 0.42), 0 0 0 1px var(--haarlinie);
  }

  .em-lb-anruf:hover {
    box-shadow: inset 0 3px 0 var(--lb-anruf), 0 10px 24px -16px oklch(0.2 0.02 228 / 0.42), 0 0 0 1px var(--haarlinie);
  }

  .em-lb-karte:hover .em-lb-oeffnen,
  .em-lb-zeile:hover .em-lb-oeffnen,
  .em-lb-posten-zeile:hover .em-lb-oeffnen {
    color: var(--marke-tief);
  }

  .em-lb-spurknopf:hover,
  .em-lb-mehr:hover {
    background: #fff;
  }

  .em-lb-close:hover {
    background: var(--marke-zart);
  }
}

/* ---------- Schmaler: Mac-Fenster und Tablet ---------- */

@media (max-width: 1199.98px) {
  .em-lb-zeile {
    grid-template-columns: minmax(140px, 1.2fr) minmax(112px, 0.8fr) 110px minmax(140px, 1fr) minmax(140px, 1fr);
  }

  .em-lb-zeile-kopf span:nth-child(n + 6) {
    display: none;
  }

  .em-lb-z-empfehlung {
    grid-column: 1 / -2;
  }

  .em-lb-z-close {
    grid-column: -2 / -1;
    grid-row: 2;
  }
}

/* ---------- Telefon ---------- */

@media (max-width: 899.98px) {
  .em-lb-kopf h2 {
    font-size: 22px;
  }

  .em-lb-kacheln {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .em-lb-kachel {
    padding: 12px 13px 13px;
    border-radius: 18px;
  }

  .em-lb-kachel-wert {
    font-size: 28px;
  }

  .em-lb-kachel-titel {
    font-size: 12.5px;
  }

  .em-lb-kanalzeile {
    gap: 4px 12px;
    padding: 10px 13px;
    font-size: 12.5px;
  }

  .em-lb-kanalzeile-titel {
    flex-basis: 100%;
  }

  .em-lb-block {
    gap: 12px;
    padding: 14px 14px 16px;
    border-radius: 22px;
  }

  .em-lb-blockkopf p {
    font-size: 13px;
  }

  /* Spalten am Telefon: eine fast über die ganze Breite, die nächste schaut heraus, Wischen rastet ein. */
  .em-lb-spuren {
    grid-auto-columns: 86%;
    margin: 0 -14px;
    padding: 2px 14px 10px;
    scroll-padding-inline: 14px;
  }

  .em-lb-spurindex {
    flex-wrap: nowrap;
    margin: 0 -14px;
    padding: 0 14px 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .em-lb-spurindex::-webkit-scrollbar {
    display: none;
  }

  .em-lb-eine .em-lb-spur-karten,
  .em-lb-anrufe {
    grid-template-columns: minmax(0, 1fr);
  }

  .em-lb-zeile {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
  }

  .em-lb-zeile-kopf {
    display: none;
  }

  .em-lb-z-praxis {
    grid-column: 1;
  }

  .em-lb-z-close {
    grid-column: 2;
    grid-row: 1;
  }

  .em-lb-z-lage,
  .em-lb-z-mails,
  .em-lb-z-kanaele,
  .em-lb-z-potenzial,
  .em-lb-z-empfehlung {
    grid-column: 1 / -1;
  }

  .em-lb-z-lage {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .em-lb-z-mails {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
  }

  .em-lb-posten-zeile {
    grid-template-columns: minmax(0, 1fr);
  }

  .em-lb-posten-zeile .em-lb-z-praxis,
  .em-lb-posten-zeile .em-lb-grund,
  .em-lb-posten-zeile .em-lb-vorgabe,
  .em-lb-posten-zeile .em-lb-zeiten {
    grid-row: auto;
    grid-column: 1;
  }

  .em-lb-wirkung-raster {
    grid-template-columns: minmax(0, 1fr);
  }

  .em-lb-balken {
    grid-template-columns: minmax(84px, max-content) minmax(56px, 1fr) max-content;
    gap: 8px 10px;
  }

  .em-lb-balken-wert {
    display: grid;
    gap: 0;
    justify-items: end;
  }
}

/* ---------- Ohne Transparenz und ohne Bewegung ---------- */

@media (prefers-reduced-transparency: reduce) {
  .em-reiter-kachel.em-lage:not([aria-pressed='true']),
  .em-lb-kachel,
  .em-lb-status-teil,
  .em-lb-kanalzeile {
    background: var(--flaeche);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .em-lb-k-held {
    background: var(--nacht);
  }

  .em-lb-spur,
  .em-lb-karte,
  .em-lb-zeile:not(.em-lb-zeile-kopf),
  .em-lb-posten-zeile {
    background: var(--flaeche);
  }
}

@media (prefers-reduced-motion: reduce) {
  .em-lb-kachel,
  .em-lb-karte,
  .em-lb-band,
  .em-lb-mehr,
  .em-lb-zeile,
  .em-lb-posten-zeile {
    transition: none;
  }

  .em-lb-kachel:hover,
  .em-lb-karte:hover {
    transform: none;
  }
}

/* ---------- Systematik (seit 02.11.2026) ---------- */

/* Moritz: „diese systematik will ich dann in einem baumdiagramm in dem email markeitng tab auch einsehen können wann was
   kommt und warum wir was machen“. Glas wie im Lagebild. Oben die Kennzahlen, darunter der Baum von oben nach unten mit
   Verbindungslinien und der Gabelung heiß oder nein, rechts die Erklärung des gewählten Knotens (am Telefon ein Blatt
   von unten). Farbe trägt nur der Zustand (Ziel erreicht oder nicht) und die Auswahl, Text bleibt Tinte. */
.em-sy {
  display: grid;
  gap: 16px;
  min-width: 0;
  margin-bottom: 12px;
}

.em-sy[aria-busy='true'] > :not(.em-sy-skelett) {
  opacity: 0.55;
  transition: opacity 160ms ease;
}

.em-sy-skelett {
  min-height: 420px;
  border-radius: 22px;
}

.em-sy-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.em-sy-zeitraum button {
  min-height: 34px;
}

.em-sy-kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
  gap: 12px;
}

.em-sy-kachel {
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px 15px;
  overflow: hidden;
  border-radius: 22px;
  background: var(--glas);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--glas-schatten);
  color: var(--tinte);
}

.em-sy-kachel::before {
  content: '';
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--linie);
}

.em-sy-kachel.em-sy-gut::before { background: var(--gruen); }
.em-sy-kachel.em-sy-schlecht::before { background: var(--rot); }

.em-sy-kachel-titel {
  color: var(--tinte-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.em-sy-kachel-wert {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.em-sy-kachel-wert strong {
  font-size: 30px;
  font-weight: 720;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.em-sy-einheit {
  color: var(--tinte-3);
  font-size: 12.5px;
}

.em-sy-kachel-fuss {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12.5px;
}

.em-sy-ziel {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--flaeche-3);
  color: var(--tinte-2);
  font-weight: 600;
}

.em-sy-trend { color: var(--tinte-3); }
.em-sy-trend-gut { color: var(--gruen); font-weight: 600; }
.em-sy-trend-schlecht { color: var(--rot); font-weight: 600; }

.em-sy-spark {
  width: 100%;
  height: 32px;
  margin-top: 4px;
  stroke: var(--marke-tief);
}

.em-sy-spark-leer {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--flaeche-3);
  color: var(--tinte-3);
  font-size: 12px;
}

.em-sy-kachel-text {
  margin: 4px 0 0;
  color: var(--tinte-3);
  font-size: 12.5px;
  line-height: 1.45;
}

.em-sy-raum {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: start;
  gap: 16px;
}

/* ---------- Baum ---------- */

.em-sy-baum {
  display: grid;
  min-width: 0;
}

.em-sy-wurzel {
  display: grid;
  gap: 8px;
  justify-self: center;
  max-width: 640px;
  padding: 14px 18px;
  border-radius: 22px;
  background: linear-gradient(150deg, oklch(0.28 0.035 232 / 0.95), oklch(0.2 0.03 238 / 0.97));
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.14), 0 22px 44px -26px oklch(0.2 0.04 235 / 0.6);
  color: #fff;
}

.em-sy-wurzel-titel {
  display: flex;
  align-items: center;
  gap: 8px;
  color: oklch(0.86 0.07 195);
  font-size: 15px;
  font-weight: 680;
}

.em-sy-wurzel-zahlen {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: oklch(0.83 0.015 230);
  font-size: 13px;
}

.em-sy-wurzel-zahlen strong {
  color: #fff;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

/* Jede Zeile hängt mit einer Linie an der Zeile darüber, eine Gabelung verzweigt sich in zwei Stränge. */
.em-sy-zeile {
  position: relative;
  display: grid;
  gap: 14px;
  padding-top: 28px;
}

.em-sy-zeile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 28px;
  margin-left: -1px;
  background: var(--linie);
}

.em-sy-gabel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.em-sy-gabel::before { height: 14px; }

.em-sy-gabel::after {
  content: '';
  position: absolute;
  top: 13px;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--linie);
}

.em-sy-gabel > .em-sy-zweig::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  width: 2px;
  height: 15px;
  margin-left: -1px;
  background: var(--linie);
}

.em-sy-zweig {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border-radius: 22px;
  background: var(--glas);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--glas-schatten);
}

.em-sy-zweig-kopf {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px 10px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--tinte);
  text-align: left;
  cursor: pointer;
}

.em-sy-zweig-kopf:hover { background: var(--flaeche-2); }

.em-sy-zweig-titel {
  font-size: 16px;
  font-weight: 680;
  line-height: 1.3;
}

.em-sy-zweig-kurz {
  grid-column: 1 / -1;
  color: var(--tinte-2);
  font-size: 13.5px;
  line-height: 1.45;
}

.em-sy-kinder {
  display: grid;
  gap: 6px;
  margin: 0 0 2px 14px;
  padding: 0 0 0 14px;
  border-left: 2px solid var(--linie);
  list-style: none;
}

.em-sy-kinder > li {
  position: relative;
  min-width: 0;
}

.em-sy-kinder > li::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -14px;
  width: 12px;
  height: 2px;
  background: var(--linie);
}

.em-sy-kind {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--haarlinie);
  border-radius: 12px;
  background: oklch(1 0 0 / 0.55);
  color: var(--tinte);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

.em-sy-kind:hover { background: var(--flaeche-2); }

.em-sy-kind-titel {
  min-width: 0;
  overflow-wrap: anywhere;
}

.em-sy-zweig-kopf[aria-pressed='true'],
.em-sy-kind[aria-pressed='true'] {
  outline: 2px solid var(--marke-tief);
  outline-offset: -2px;
  background: var(--marke-zart);
}

.em-sy-pille {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--flaeche-3);
  color: var(--tinte-3);
  font-size: 12px;
  white-space: nowrap;
}

.em-sy-pille strong {
  color: var(--tinte);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Erklärung ---------- */

.em-sy-detail {
  position: sticky;
  top: 12px;
  display: grid;
  align-content: start;
  gap: 12px;
  max-height: calc(100vh - 24px);
  padding: 18px 18px 20px;
  overflow: auto;
  border-radius: 22px;
  background: var(--glas);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--glas-schatten);
  color: var(--tinte);
}

.em-sy-detail-leer {
  display: grid;
  gap: 8px;
  color: var(--tinte-2);
  font-size: 14px;
  line-height: 1.5;
}

.em-sy-detail-leer strong { color: var(--tinte); font-size: 15px; }
.em-sy-detail-leer p { margin: 0; }

.em-sy-detail-kopf {
  position: relative;
  display: grid;
  gap: 6px;
  padding-right: 34px;
}

.em-sy-detail-kopf h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 720;
  line-height: 1.25;
}

.em-sy-detail-kurz {
  margin: 0;
  color: var(--tinte-2);
  font-size: 14.5px;
  line-height: 1.5;
}

.em-sy-pfad {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.em-sy-pfad button {
  padding: 1px 8px;
  border: 0;
  border-radius: 999px;
  background: var(--flaeche-3);
  color: var(--tinte-2);
  font-size: 12px;
  cursor: pointer;
}

.em-sy-detail-zu {
  position: absolute;
  top: -4px;
  right: -6px;
  display: none;
}

.em-sy-detail-zahl {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--flaeche-2);
}

.em-sy-detail-zahl strong {
  font-size: 24px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}

.em-sy-detail-zahl span { color: var(--tinte-2); font-size: 13px; }
.em-sy-detail-vorher { color: var(--tinte-3) !important; }

.em-sy-abschnitt {
  display: grid;
  gap: 4px;
}

.em-sy-abschnitt h5 {
  margin: 0;
  color: var(--tinte-3);
  font-size: 12.5px;
  font-weight: 680;
  letter-spacing: 0.01em;
}

.em-sy-abschnitt p,
.em-sy-abschnitt li {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
}

.em-sy-abschnitt ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.em-sy-abschnitt code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--flaeche-3);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.em-sy-detail-kinder {
  display: grid;
  gap: 6px;
}

.em-sy-fehler { min-height: 160px; }

/* Am Telefon: alles untereinander, die Gabelung wird zur Liste, die Erklärung ein Blatt von unten. */
@media (max-width: 899px) {
  .em-sy-raum { grid-template-columns: minmax(0, 1fr); }
  .em-sy-gabel { grid-template-columns: minmax(0, 1fr); }
  .em-sy-gabel::after,
  .em-sy-gabel > .em-sy-zweig::before { display: none; }
  .em-sy-gabel::before { height: 28px; }
  .em-sy-detail {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 60;
    max-height: 74vh;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: var(--flaeche);
    box-shadow: 0 -18px 40px -20px oklch(0.2 0.03 235 / 0.45);
    transform: translateY(105%);
    transition: transform 220ms ease;
  }
  .em-sy-detail[data-offen] { transform: translateY(0); }
  .em-sy-detail-zu { display: inline-flex; }
  .em-sy-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .em-sy-kachel { padding: 12px 13px 13px; border-radius: 18px; }
  .em-sy-kachel-wert strong { font-size: 24px; }
  .em-sy-kachel-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .em-sy-detail { transition: none; }
}

/* Systematik: Kästen nicht strecken (sonst Lücken im kürzeren Zweig der Gabelung). */
.em-sy-zweig { align-content: start; }
.em-sy-gabel { align-items: start; }

/* Hinweis zur Systematik oben im Lagebild (seit 02.11.2026). */
.em-lb-sy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
}

.em-lb-sy-text {
  display: grid;
  gap: 3px;
  min-width: 0;
  max-width: 820px;
  color: var(--tinte-2);
  font-size: 13.5px;
  line-height: 1.45;
}

.em-lb-sy-text strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tinte);
  font-size: 14.5px;
}

.em-lb-sy-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.em-lb-sy-knopf {
  min-height: 34px;
}

/* ---------- Seit 02.11.2026: Reiter als schlanke Leiste, Lagebild mit Arbeit zuerst ----------
   Moritz: „auf dem screen darf gleichzeitig nicht zuviel sein … genau weiß was man tun muss“. Die Reiter waren
   Kacheln mit großer Zahl (rund 70 Pixel hoch), jetzt eine Zeile: Name, Zahl. */

.em-reiter-kachel {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
}

.em-reiter-name {
  font-size: 14px;
  font-weight: 600;
}

.em-reiter-zahl {
  min-height: 0;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: oklch(0.2 0.02 228 / 0.07);
  color: var(--tinte-2);
  font-size: 12.5px;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.em-reiter-symbol {
  display: inline-flex;
  color: var(--k, var(--tinte-2));
}

.em-reiter-kachel.em-wach .em-reiter-zahl {
  background: var(--k);
  color: #fff;
}

.em-reiter-kachel[aria-pressed='true'] .em-reiter-zahl {
  background: oklch(1 0 0 / 0.16);
  color: #fff;
}

.em-reiter-kachel[aria-pressed='true'] .em-reiter-symbol {
  color: #fff;
}

.em-reiter-kachel.em-archiv:not([aria-pressed='true']) .em-reiter-zahl {
  font-size: 12.5px;
  color: var(--tinte-3);
}

/* Auswertung im Lagebild: zugeklappt, eine Zeile mit dem, was darin steht. */
.em-lb-auswertung {
  border-radius: var(--radius-xl, 28px);
  background: var(--glas);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--glas-schatten);
}

.em-lb-auswertung-kopf {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 18px;
  color: var(--tinte-2);
  cursor: pointer;
  list-style: none;
}

.em-lb-auswertung-kopf::-webkit-details-marker {
  display: none;
}

.em-lb-auswertung-kopf > span {
  display: grid;
  flex: 1;
  gap: 1px;
  min-width: 0;
}

.em-lb-auswertung-kopf strong {
  color: var(--tinte);
  font-size: 16px;
}

.em-lb-auswertung-kopf > span > span {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.em-lb-auswertung[open] .em-lb-auswertung-kopf > svg:last-child {
  transform: rotate(180deg);
}

.em-lb-auswertung-inhalt {
  display: grid;
  gap: 16px;
  padding: 0 12px 14px;
}

/* Kennzahlen des Lagebilds kompakt (seit 02.11.2026): am großen Bildschirm alle acht in einer Reihe, die Zahl kleiner,
   der Satz darunter einzeilig. Sie bleiben Filter für „Wer steht wo“. */
.em-lb-kachel {
  padding: 11px 13px 12px;
  border-radius: 18px;
}

.em-lb-kachel-wert {
  font-size: 26px;
}

.em-lb-kachel-unter {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.em-lb-kachel-titel {
  overflow: hidden;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 1280px) {
  .em-lb-kacheln {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
  }
  .em-lb-kachel-chips {
    display: none;
  }
}

/* ---------------------------------------------------------------------------------------------------------------------
   ⛔ 12.11.2026 „Wer ist wie weit“ (public/js/email/settings.js), ganz oben im Lagebild. Moritz: „das man einfach
   richtig sieht wer gerade wie weit ist von der laune und so prozentmäßig einfach eingeordnet [...] statusanzeigen [...]
   niemals etwas untergehen kann“. Eine Karte je Vorgang, der Status links als Farbkante, rechts Laune, Chance, Fortschritt.
   --------------------------------------------------------------------------------------------------------------------- */
/* Gelb fehlte als Farbhilfe (Tokens --em-gelb standen schon oben). */
.em-f-gelb { --k: var(--em-gelb); --k-zart: var(--em-gelb-zart); }

.em-sb {
  gap: 14px;
}

.em-sb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.em-sb-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid color-mix(in oklab, var(--k) 28%, transparent);
  border-radius: 999px;
  background: var(--k-zart);
  color: var(--k);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.em-sb-chip strong {
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.em-sb-chip[aria-pressed='true'] {
  border-color: var(--k);
  background: var(--k);
  color: #fff;
}

.em-sb-liste {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.em-sb-karte {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 10px 22px;
  padding: 14px 18px 14px 16px;
  border: 1px solid var(--linie-2);
  border-left: 5px solid var(--k);
  border-radius: 18px;
  background: color-mix(in oklab, var(--flaeche) 88%, transparent);
}

.em-sb-links,
.em-sb-rechts {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.em-sb-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.em-sb-status {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--k-zart);
  color: var(--k);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.em-sb-marke,
.em-sb-wer {
  color: var(--tinte-3);
  font-size: 12px;
  font-weight: 600;
}

.em-sb-name {
  justify-self: start;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tinte);
  font: inherit;
  font-size: 16.5px;
  font-weight: 680;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.em-sb-name:hover {
  text-decoration: underline;
}

.em-sb-ort {
  color: var(--tinte-3);
  font-size: 13px;
}

.em-sb-lage {
  margin: 2px 0 0;
  color: var(--k);
  font-size: 14px;
  font-weight: 620;
}

.em-sb-oton {
  margin: 0;
  color: var(--tinte-2);
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.45;
}

.em-sb-werte {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.em-sb-wert {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.em-sb-wert-name {
  color: var(--tinte-3);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.em-sb-wert-fuss,
.em-sb-wert-leer {
  color: var(--tinte-3);
  font-size: 12px;
  line-height: 1.35;
}

.em-sb-zahl {
  color: var(--tinte);
  font-size: 20px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.em-sb-laune {
  display: grid;
  gap: 3px;
  color: var(--k);
}

.em-sb-laune strong {
  font-size: 14px;
  font-weight: 680;
}

.em-sb-punkte {
  display: flex;
  gap: 4px;
}

.em-sb-punkte i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--linie);
}

.em-sb-punkte i.an {
  background: var(--k);
}

.em-sb-balken {
  display: block;
  height: 10px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--flaeche-3);
}

.em-sb-balken i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--em-tuerkis), var(--em-gruen));
}

.em-sb-warum,
.em-sb-einwand {
  margin: 4px 0 0;
  color: var(--tinte-2);
  font-size: 13px;
  line-height: 1.45;
}

.em-sb-tun {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding-top: 10px;
  border-top: 1px solid var(--linie-2);
}

.em-sb-schritt {
  flex: 1 1 280px;
  margin: 0;
  color: var(--tinte);
  font-size: 14px;
  line-height: 1.4;
}

.em-sb-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.em-sb-knopf {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--linie);
  border-radius: 999px;
  background: var(--flaeche);
  color: var(--tinte);
  font: inherit;
  font-size: 14px;
  font-weight: 620;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.em-sb-anrufen {
  border-color: var(--em-tuerkis);
  background: var(--em-tuerkis);
  color: #fff;
}

.em-sb-ohne {
  align-self: center;
  color: var(--tinte-3);
  font-size: 13px;
}

.em-sb-mehr {
  justify-self: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--linie);
  border-radius: 999px;
  background: var(--flaeche);
  color: var(--tinte-2);
  font: inherit;
  font-size: 14px;
  font-weight: 620;
  cursor: pointer;
}

.em-sb-leer {
  margin: 0;
  color: var(--tinte-3);
}

@media (max-width: 760px) {
  .em-sb-karte {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 14px 12px 12px;
  }

  .em-sb-werte {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .em-sb-knoepfe {
    width: 100%;
  }

  .em-sb-anrufen {
    flex: 1 1 auto;
    justify-content: center;
  }
}
